Skip to main content

Create shopping cart

POST 

/api/cart

Create cart.

Request

Body

required

The field shipping_country is OPTIONAL at creation, but must have a value during the checkout process. It can be updated later via the "Update a shopping cart by ID" endpoint.

    customer_session_id stringrequired

    Customer session id

    currency stringrequired

    Cart's currency

    shipping_country string

    Optional param to shippings configuration

Responses

Successful cart creation

Schema

    cart_id string
    customer_session_id string
    shipping_country string

    line_items

    object[]

  • Array [

  • id string
    supplier string

    product_available_shippings

    object[]

  • Array [

  • id string
    name string
    description string
    country_code string

    price

    object

    amount number
    amount_incl_taxes number
    tax_amount number
    tax_rate number
    currency_code string
  • ]

  • product_brand string
    product_sku string
    product_barcode string
    product_id number
    product_title string

    product_image

    object[]

  • Array [

  • id number
    url string
    width number
    height number
  • ]

  • variant_id numbernullable
    variant_title stringnullable
    variant object[]
    quantity number

    shipping

    object

    nullable

    id string
    name string
    description string

    price

    object

    amount number
    amount_incl_taxes number
    tax_amount number
    tax_rate number
    currency_code string

    price

    object

    amount number
    discount number
    currency_code string
    compare_at number
    amount_incl_taxes number
    compare_at_incl_taxes number
    tax_amount number
    tax_rate number
  • ]

  • subtotal number
    shipping number
    currency string
    available_shipping_countries string[]
Loading...