Elastic Path Customer Cart Associations API
You can create associations between a customer and one or more carts. After cart associations exist for a customer, those carts are accessible across any device. You can delete associations as required.There are two ways to access the cart: with a customer token and without one.### With a `customer` tokenThese endpoints are for users who authenticated implicitly and require a customer token in the header to access the customer cart associations APIs. For more information, see the [Customer Token](/docs/customer-management/customer-management-api/customer-tokens) documentation.#### Cart creationShoppers create carts and can use any of the carts that they created to check out an order.:::noteYou can create a cart id, name, and description for the cart. The cart requires a name. Ensure that the string length is greater than or equal to one. Use any symbol in the name and description. For cart id, ensure that you follow the guidelines for safe characters. For more information about cart id naming requirements, see [Safe Characters](/guides/Getting-Started/safe-characters).:::### Without a `customer` tokenThese endpoints are for users who use the Client Credentials Token and do not require a Customer token in the header to access the customer cart associations APIs. For more information, see the [Authentication](/docs/authentication/security) documentation.This user acts as a system administrator and can call any customer cart association operations for any customer and cart.### Error CodesYou might encounter the following response codes, depending on the scenario:* `400` - `The type does not exist or is not listed as customer` - Ensure that the type is `customer` and is present.* `403` - `Cannot associate more than one customer`.* `403` - `Customer does not have the required permissions to fulfill this request`.* `403` - `Invalid json payload` - Check JSON input. The request body must be an array `[]`. If the request body is an object, the error is generated.
Elastic Path Customer Cart Associations API is one of 100 APIs that Elastic Path publishes on the APIs.io network, described by a machine-readable OpenAPI specification.
Tagged areas include Customer Cart Associations. The published artifact set on APIs.io includes an OpenAPI specification and API documentation.
This API exposes 2 operations across 1 path, and defines 3 schemas. It is described by OpenAPI 3.1.0, at version 25.1126.6886238.
Requests are made against 2 base URLs: https://useast.api.elasticpath.com, https://euwest.api.elasticpath.com.
Metadata
The identity and technical contract details declared by the specification.
Authentication & Security 1
Elastic Path Customer Cart Associations API declares
1 security scheme
for authenticating requests.
It accepts HTTP bearer tokens (BearerToken).
By default, every request must be authenticated.
Paths & Operations 2
Across 1 path, the API surfaces 2 operations — 1 DELETE, 1 POST. Each is listed below with its method, path, parameters, and response codes.
You can create associations between a customer and one or more carts. After cart associations exist for a customer, those carts are accessible across any device. You can delete as…
Schemas 3
The contract defines 3 schemas that model the data the API accepts and returns. The most detailed are Response.ErrorItem (5 properties), CartsRelationshipsCustomersData (1 property), Response.ErrorResponse (1 property). Each schema is shown below with its type and property counts.
Specification
The full machine-readable OpenAPI contract behind this narrative.
Source
More from Elastic Path 12
Other APIs Elastic Path publishes across the network.