Elastic Path Commerce Development

Request Methods

Request Methods

Cortex uses HTTP methods to perform actions and invoke changes on a resource. Cortex supports the following HTTP methods:
  • GET: Read a resource

  • PUT: Update an existing resource

  • POST: Create a new resource

  • DELETE: Delete a resource

Requests using unsupported methods return either status code 405 Method Not Allowed or 403 Forbidden.

Cortex supports JSON resource representations, so requests must set the HTTP Content-Type header to application/json. Requests without this header, or requests using another media type, will return the following status code: 415 Unsupported Media Type.

For example, the following request retrieves a shopper's shopping cart:
GET http://api.elasticpath.net/cortex/carts/mobee/default
Content-Type: application/json