POST /carts

Creates a Cart.

Required Fields

|Field|Details| |-|-| |line_item|Specifies a line item.| |custom_items|Specifies a custom item. Only required if adding a custom item to the cart.| |gift_certificates|Specifies a gift certificate. Only required if adding a gift certificate to the cart.|

Usage Notes

Servers

Request headers

Name Type Required Description
Accept String Yes

The MIME type of the response body.

Default value: "application/json"

Content-Type String Yes

Default value: "application/json"

Query parameters

Name Type Required Description
include[] Array No
  • redirect_urls: Create a direct link to a cart. This can be used for the /POST request for carts.
  • line_items.physical_items.options: The cart returns an abbreviated result. Use this to return physical items product options. To return the extended cart object, use in a /POST request.
  • line_items.digital_items.options: The cart returns an abbreviated result. Use this to return digital items product options. To return the extended cart object, use in a /POST request.
  • promotions.banners: Returns a list of eligible banners.

Request body fields

Name Type Required Description
gift_certificates[] Array No
gift_certificates[].name String Yes

Given name for the gift certificate line item.

gift_certificates[].amount Number Yes
gift_certificates[].message String No

Message shown to recipient, as provided by sender.

gift_certificates[].quantity Integer Yes
gift_certificates[].sender Object Yes
gift_certificates[].sender.name String No
gift_certificates[].sender.email String No
gift_certificates[].theme String Yes

The theme of the gift certificate.

Valid values:

  • "Birthday"
  • "Celebration"
  • "General"
  • "Boy"
  • "Girl"
  • "Christmas"
gift_certificates[].recipient Object Yes
gift_certificates[].recipient.name String No
gift_certificates[].recipient.email String No
customer_id Integer No
line_items[] Array No
channel_id Integer No

The Channel ID. If no channel is specified, defaults to 1.

locale String No

The locale of the cart. Accepts strings of format xx or xx-YY. Uses the ISO-639 standard format.

custom_items[] Array No
custom_items[].sku String No
custom_items[].name String No
custom_items[].quantity Number No
custom_items[].image_url String No

Image of the product or variant.

custom_items[].list_price Number No
currency Object No
currency.code String No

The transactional currency code for the cart, formatted as an ISO-4217 string. This code is required when multi-currency is enabled. Passing a non-transactional display currency will result in a 400 error.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.