Skip to main content

Get a Cart

GET 

/v2/carts/:cartID

Use this endpoint to retrieve a specific cart. If a cart ID does not exist, a new cart will be automatically created.

If the cart is associated with shipping groups, calling this endpoint displays the associated shipping group IDs in the relationships section.

note

The default cart name is Cart. However, you can update the cart name as required. Ensure that the string length of the name is greater than or equal to one. Follow the safe character guidelines for name and description naming. For more information about cart ID naming requirements, see the Safe Characters section.

Query parameters

NameRequiredTypeDescription
includeOptionalstringComma-delimited string of entities that can be included. The information included are items,tax_items, custom_discounts, or promotions.

Request

Path Parameters

    cartID stringrequired

    The unique identifier for this cart that you created.

Responses

OK

Schema
    data object
    id string

    The unique identifier for the cart. Use SDK or create it yourself.

    type string

    The type of object being returned.

    name string

    The name of this cart.

    description string

    A description of the cart.

    discount_settings object
    custom_discounts_enabled boolean

    This parameter enables custom discounts for a cart. When set to true, Elastic Path promotions will not be applied to the new carts. Default is set from cart discount settings for the store. See Cart Settings.

    use_rule_promotions boolean

    When set to true, this parameter allows the cart to use rule promotions.

    payment_intent_id string

    Stripe-assigned unique identifier for the linked Payment Intent

    links object
    self string

    A link to that specific resource.

    meta object
    display_price object
    with_tax object
    amount number

    The raw total of this cart.

    currency string

    The currency set for this cart.

    formatted string

    The tax inclusive formatted total based on the currency.

    without_tax object
    amount number

    The raw total of this cart.

    currency string

    The currency set for this cart.

    formatted string

    The tax inclusive formatted total based on the currency.

    tax object
    amount number

    The raw total of this cart.

    currency string

    The currency set for this cart.

    formatted string

    The tax inclusive formatted total based on the currency.

    discount object
    amount number

    The raw total of this cart.

    currency string

    The currency set for this cart.

    formatted string

    The tax inclusive formatted total based on the currency.

    without_discount object
    amount number

    The raw total of this cart.

    currency string

    The currency set for this cart.

    formatted string

    The tax inclusive formatted total based on the currency.

    shipping object
    amount number

    The raw total of this cart.

    currency string

    The currency set for this cart.

    formatted string

    The tax inclusive formatted total based on the currency.

    timestamps object
    created_at string

    The date this was created.

    updated_at

    The date this was last updated.

    relationships object
    customers object
    data object
    type string

    The type of related object.

    id uuid

    The ID of the customer.

    items object
    data object
    type string

    The type of related object.

    id uuid

    The unique identifier for the cart item

Loading...