For the complete documentation index, see llms.txt. This page is also available as Markdown.

Cart Items

Manage Cart items

Adding multiple products to cart

post

Adds multiple products to the specified cart and creates cart items. The maximum batch size is 200.

Required scopes
This endpoint requires the following scopes:
  • : Needed to manage carts. This scope is only required for OAuth2 authorization method to authorize the request with the `access_token`.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Bodyobject · cartItemRequest[]
idstringOptional

Cart item's unique identifier.

keepAsSeparateLineItembooleanOptional

Indicates that products are maintained as individual entries in the cart, rather than being consolidated. When identical products are added multiple times, each addition creates a new line item instead of increasing the quantity of an existing one.

itemYrnstring · min: 1Optional

A unique identifier of a global resource, which stores information about the resource, such as its type, ID or name of the tenant. This field should not be provided when itemType is EXTERNAL and request contains external product.

itemTypeall ofOptional
string · enumOptionalPossible values:
and
objectOptional

Optional field which allows fetching external prices if set to EXTERNAL.

taxCodestringOptional

Tax code. Tax indicated in this field overrides the site's default tax value.

quantitynumber · doubleRequired

Quantity of the product added to cart.

weightDependentbooleanOptionalDeprecated

Deprecated, use product weightDependent attribute that is stored in the database. If set to true, the storefront displays a hint that the total price of the product may vary depending on the product’s actual weight.

Responses
200

The request was successful. Items have been added to the cart.

application/json
indexintegerOptional

Index of the processed cart item, matching the position in the request body.

statusintegerRequired

HTTP response status code.

idstring · min: 1Optional

Cart item's unique identifier.

errorMessagestringOptional

Descriptive error message for debugging purposes.

yrnstring · min: 1Optional

A unique identifier of a global resource, which stores information about the resource, such as its type, ID or name of the tenant.

post/cart/{tenant}/carts/{cartId}/itemsBatch

Updating multiple products in cart

put

Updates multiple cart items in the specified cart. The maximum batch size is 50.

Required scopes
This endpoint requires the following scopes:
  • : Needed to manage carts. This scope is only required for OAuth2 authorization method to authorize the request with the `access_token`.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
cartIdstringRequired

Cart unique identifier generated when a cart is created.

tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Bodyall of[]
idstringRequired

Cart item's unique identifier.

keepAsSeparateLineItembooleanOptional

Indicates that products are maintained as individual entries in the cart, rather than being consolidated. When identical products are added multiple times, each addition creates a new line item instead of increasing the quantity of an existing one.

itemYrnstring · min: 1Optional

A unique identifier of a global resource, which stores information about the resource, such as its type, ID or name of the tenant. This field should not be provided when itemType is EXTERNAL and request contains external product.

itemTypeall ofOptional
string · enumOptionalPossible values:
and
objectOptional

Optional field which allows fetching external prices if set to EXTERNAL.

taxCodestringOptional

Tax code. Tax indicated in this field overrides the site's default tax value.

quantitynumber · doubleRequired

Quantity of the product added to cart.

weightDependentbooleanOptionalDeprecated

Deprecated, use product weightDependent attribute that is stored in the database. If set to true, the storefront displays a hint that the total price of the product may vary depending on the product’s actual weight.

Responses
207

The request was successful. Items have been updated in the cart.

application/json

Per-entry results for batch cart item updates.

indexintegerOptional

Index of the processed cart item, matching the position in the request body.

idstringOptional

Cart item unique identifier.

codeintegerOptional

HTTP status code for this entry.

statusstringOptional

HTTP status description for this entry.

messagestringOptional

Message describing the outcome or error for this entry.

detailsstring[]Optional

Additional detail messages for this entry.

put/cart/{tenant}/carts/{cartId}/itemsBatch

Retrieving all products added to a cart

get

Retrieves all items added to the specified cart.

Required scopes
This endpoint requires the following scopes:
  • : Needed to manage carts. This scope is only required for OAuth2 authorization method to authorize the request with the `access_token`.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
cartIdstringRequired

Cart unique identifier generated when a cart is created.

tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Responses
200

The request was successful. Cart items details are returned.

application/json

Cart item details.

idstringOptional

Cart item's unique identifier generated when the item is added to cart.

keepAsSeparateLineItembooleanOptional

Indicates that products are maintained as individual entries in the cart, rather than being consolidated. When identical products are added multiple times, each addition creates a new line item instead of increasing the quantity of an existing one.

yrnstring · min: 1Optional

A unique identifier of a global resource, which stores information about the resource, such as its type, ID or name of the tenant.

itemYrnstring · min: 1Optional

A unique identifier of a global resource, which stores information about the resource, such as its type, ID or name of the tenant.

typestring · enumOptionalPossible values:
quantitynumber · doubleRequired

Quantity of the product added to cart.

effectiveQuantitynumber · doubleRequired

Effective quantity of the product added to cart.

taxCodestringOptional

Tax code. Tax indicated in this field overrides the site's default tax value.

totalTaxnumber · doubleOptional

Product total tax amount.

get/cart/{tenant}/carts/{cartId}/items

Adding a product to cart

post

Adds a product to the specified cart and creates a cart item.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
cartIdstringRequired

Cart unique identifier generated when a cart is created.

tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Query parameters
siteCodestringRequired

Site unique identifier. A site is a specific shop.

If the tenant owns only one shop, the value should be set to main.

Body
idstringOptional

Cart item's unique identifier.

keepAsSeparateLineItembooleanOptional

Indicates that products are maintained as individual entries in the cart, rather than being consolidated. When identical products are added multiple times, each addition creates a new line item instead of increasing the quantity of an existing one.

itemYrnstring · min: 1Optional

A unique identifier of a global resource, which stores information about the resource, such as its type, ID or name of the tenant. This field should not be provided when itemType is EXTERNAL and request contains external product.

itemTypeall ofOptional
string · enumOptionalPossible values:
and
objectOptional

Optional field which allows fetching external prices if set to EXTERNAL.

taxCodestringOptional

Tax code. Tax indicated in this field overrides the site's default tax value.

quantitynumber · doubleRequired

Quantity of the product added to cart.

weightDependentbooleanOptionalDeprecated

Deprecated, use product weightDependent attribute that is stored in the database. If set to true, the storefront displays a hint that the total price of the product may vary depending on the product’s actual weight.

Responses
201

The request was successful. The product has been added to the cart.

application/json
post/cart/{tenant}/carts/{cartId}/items

Deleting all products added to a cart

delete

Removes all products from the specified cart and deletes the cart items.

Required scopes
This endpoint requires the following scopes:
  • : Needed to manage carts. This scope is only required for OAuth2 authorization method to authorize the request with the `access_token`.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
cartIdstringRequired

Cart unique identifier generated when a cart is created.

tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Responses
204

The request was successful. Products have been deleted from the cart.

No content

delete/cart/{tenant}/carts/{cartId}/items

No content

Retrieving a cart item

get

Retrieves a specified cart item's details.

Required scopes
This endpoint requires the following scopes:
  • : Needed to manage carts. This scope is only required for OAuth2 authorization method to authorize the request with the `access_token`.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
itemIdstringRequired

Cart item's unique identifier generated when the product is added to the cart.

cartIdstringRequired

Cart unique identifier generated when a cart is created.

tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Responses
200

The request was successful. Cart item details are returned.

application/json

Cart item details.

idstringOptional

Cart item's unique identifier generated when the item is added to cart.

keepAsSeparateLineItembooleanOptional

Indicates that products are maintained as individual entries in the cart, rather than being consolidated. When identical products are added multiple times, each addition creates a new line item instead of increasing the quantity of an existing one.

yrnstring · min: 1Optional

A unique identifier of a global resource, which stores information about the resource, such as its type, ID or name of the tenant.

itemYrnstring · min: 1Optional

A unique identifier of a global resource, which stores information about the resource, such as its type, ID or name of the tenant.

typestring · enumOptionalPossible values:
quantitynumber · doubleRequired

Quantity of the product added to cart.

effectiveQuantitynumber · doubleRequired

Effective quantity of the product added to cart.

taxCodestringOptional

Tax code. Tax indicated in this field overrides the site's default tax value.

totalTaxnumber · doubleOptional

Product total tax amount.

get/cart/{tenant}/carts/{cartId}/items/{itemId}

Updating a cart item

put

Updates a specified cart item.

Required scopes
This endpoint requires the following scopes:
  • : Needed to manage carts. This scope is only required for OAuth2 authorization method to authorize the request with the `access_token`.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
itemIdstringRequired

Cart item's unique identifier generated when the product is added to the cart.

cartIdstringRequired

Cart unique identifier generated when a cart is created.

tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Query parameters
partialbooleanOptional
OptionDescription
trueA partial product update will be performed.
falseA full product replacement will be performed.
Default: false
Body
itemYrnstring · min: 1Optional

A unique identifier of a global resource, which stores information about the resource, such as its type, ID or name of the tenant.

itemTypeall ofOptional
string · enumOptionalPossible values:
and
objectOptional

Optional field which allows fetching external prices if set to EXTERNAL.

quantitynumber · doubleOptional

Quantity of the product added to cart.

taxCodestringOptional

Tax code. Tax indicated in this field overrides the site's default tax value.

Responses
204

The request was successful. The cart item has been updated.

No content

put/cart/{tenant}/carts/{cartId}/items/{itemId}

No content

Removing an item from cart

delete

Removes a specified product from cart and deletes the cart item.

Required scopes
This endpoint requires the following scopes:
  • : Needed to manage carts. This scope is only required for OAuth2 authorization method to authorize the request with the `access_token`.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
itemIdstringRequired

Cart item's unique identifier generated when the product is added to the cart.

cartIdstringRequired

Cart unique identifier generated when a cart is created.

tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Responses
204

The request was successful. The item has been removed from cart.

No content

delete/cart/{tenant}/carts/{cartId}/items/{itemId}

No content

Last updated

Was this helpful?