Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

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.

2 operations 1 paths 3 schemas 1 DELETE1 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
25.1126.6886238
Base URL
https://useast.api.elasticpath.com
Authentication
HTTP Bearer
License
Resource Areas
1

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.

Customer Cart Associations 2

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…

POST
/v2/carts/{cartID}/relationships/customers
Create a Customer Cart Association
createCustomerCartAssociation 2 params body → 200204400403422
DELETE
/v2/carts/{cartID}/relationships/customers
Delete Customer Cart Association
deleteCustomerCartAssociation 2 params body → 204400403

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.

Response.ErrorResponse
object
1 property 1 required
CartsRelationshipsCustomersData
object
1 property
Response.ErrorItem
object
5 properties 2 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

elastic-path-customer-cart-associations-api-openapi.yml Raw ↑

Other APIs Elastic Path publishes across the network.

Elastic Path GraphQL API
Elastic Path Account Addresses API
Elastic Path Account Authentication Settings API
Elastic Path Account Cart Associations API
Elastic Path Account Management Authentication API
Elastic Path Account Members API
Elastic Path Account Membership API
Elastic Path Account Membership Settings API
Elastic Path Account Tags API
Elastic Path Accounts API
Elastic Path Administrator Latest Releases Catalog API API
Elastic Path Application Keys API