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 Account Cart Associations API

You can create associations between an account and one or more carts. After cart associations exist for an account, those carts are accessible across any device. You can delete associations as required.There are two ways to access the cart: with an [Account Management Authentication Tokens](/docs/api/accounts/post-v-2-account-members-tokens) and without one.### With an `Account Management Authentication` tokenThese endpoints are for users who authenticated implicitly and require an Account Management Authentication token in the header to access the account cart associations APIs. For more information, see the [Account Token](/docs/api/accounts/post-v-2-account-members-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 an `Account Management Authentication` tokenThese endpoints are for users who use the Client Credentials Token and do not require an account management authentication token in the header to access the account cart associations APIs. For more information, see the [Authentication](/docs/authentication/security) documentation.This user acts as a system administrator and can call any account cart association operations for any account 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 account` - Ensure that the type is `account` and is present.* `403` - `Cannot associate more than one account`.* `403` - `Account 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 Account 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 Account 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 Account 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.

Account Cart Associations 2

You can create associations between an account and one or more carts. After cart associations exist for an account, those carts are accessible across any device. You can delete as…

POST
/v2/carts/{cartID}/relationships/accounts
Create an Account Cart Association
createAccountCartAssociation 2 params body → 200204400403422
DELETE
/v2/carts/{cartID}/relationships/accounts
Delete Account Cart Association
deleteAccountCartAssociation 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), Response.ErrorResponse (1 property), CartsRelationshipsAccountsData (1 property). Each schema is shown below with its type and property counts.

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

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

elastic-path-account-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 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
Elastic Path Authentication Realms API