Create Cart
Create a cart object and populate it with one or more product variants. Quantities are not supported — repeat a variant ID to represent a quantity greater than one.
📘 Optional
shopifysnapshotThe
shopifyfield is optional and only needed when the shop is configured to use Shopify Scripts. Most headless stores can omit it.
Required API key scope
- Carts
Authorizations
Body
An array of product variants.
A product variant, provided either as a plain variant ID or as an object with a variant_id.
39076568408247
A Base64-encoded cart snapshot, used to reflect additional transaction details from the commerce provider (e.g. Shopify) such as automatic discounts. Optional — most integrations can omit it.
Loop only consumes this snapshot server-side when the shop is configured
to use Shopify Scripts. When decoded, it is a JSON object shaped like a
subset of the Shopify Ajax cart (/cart.js), including currency,
total_price, total_discount, cart_level_discount_applications, and
per-line items[]. Headless storefronts that don't use Shopify Scripts
should omit this field.
"c2FtcGxlLXN0cmluZw=="