Skip to main content
POST
/
cart
Create Cart
curl --request POST \
  --url https://api.loopreturns.com/api/v1/cart \
  --header 'Content-Type: application/json' \
  --header 'X-Authorization: <api-key>' \
  --data '
{
  "cart": [
    39076568408247
  ],
  "shopify": "c2FtcGxlLXN0cmluZw=="
}
'
{
  "token": "46923497728c9a7b5o8a433zz5c0bbbb683319824778",
  "data": {
    "cart": [
      39076568408247
    ],
    "shopify": "c2FtcGxlLXN0cmluZw=="
  }
}

Authorizations

X-Authorization
string
header
required

Body

application/json
cart
(integer | object)[]
required

An array of product variants.

A product variant, provided either as a plain variant ID or as an object with a variant_id.

Example:

39076568408247

shopify
string

A Base64-encoded liquid cart object, used to reflect any additional transaction details in Shopify such as discounts.

Example:

"c2FtcGxlLXN0cmluZw=="

Response

Success

token
string

The cart's unique identifier.

Example:

"46923497728c9a7b5o8a433zz5c0bbbb683319824778"

data
object

Echoes the contents of the create request.