Salla Platform Docs
    • Overview
    • Authentication
    • Key Concepts
    • Usage Flows
    • Cart
      • Save guest cart data
        POST
      • Generate cart
        POST
      • Get cart
        GET
      • Assign cart to Customer
        POST
      • Apply cart coupon
        POST
      • Remove cart coupon
        DELETE
    • Cart Items
      • Add cart item
        POST
      • Update cart item
        PATCH
      • Delete cart item
        DELETE
    • Schemas
      • SuccessEnvelope
      • GuestDataRequest
      • GuestData
      • Error
      • Money
      • CartTotals
      • TotalLineItem
      • CartItem
      • AssignShippingRequest
      • CartItemsRequest
      • ProductIdentifier
      • CartItemEntry
      • RemoveItemsRequest
      • BadRequest
      • Unauthorized
      • Forbidden
      • NotFound
      • ValidationError
      • Currency
      • AmountLine
      • CartScope
      • CartFeatures
      • CartAmounts
      • CartDiscountEntry
      • CartOptionEntry
      • Cart
      • CartShipping
      • CartItemCreateRequest
      • CartItemUpdateRequest
      • ApplyCouponRequest
      • ErrorEnvelope
      • CartItemOptionInput
      • ErrorObject
      • GenerateCartRequest
    Merchant
    Merchant
    • Merchant API
    • Embedded SDK
    • Salla OAuth 2.0
    Storefront
    Storefront
    • Twilight Engine
    • Twilight SDK
    • Web Components
    • Ecommerce Events
    • Component Bundle
    • Checkout APIs
    • Change Log
    App Functions
    Partner APIs
    Partner APIs
    • App API
    • Shipments & Fulfillment APIs
    • Salla AWB
    • Recurring Payments API
    • Billing System Salla partners
    • Communication Apps
    Dev Tools
    Dev Tools
    • Partners Agent Kit
    • Salla Apps Playbook
    • Salla CLI
    Merchant
    Merchant
    • Merchant API
    • Embedded SDK
    • Salla OAuth 2.0
    Storefront
    Storefront
    • Twilight Engine
    • Twilight SDK
    • Web Components
    • Ecommerce Events
    • Component Bundle
    • Checkout APIs
    • Change Log
    App Functions
    Partner APIs
    Partner APIs
    • App API
    • Shipments & Fulfillment APIs
    • Salla AWB
    • Recurring Payments API
    • Billing System Salla partners
    • Communication Apps
    Dev Tools
    Dev Tools
    • Partners Agent Kit
    • Salla Apps Playbook
    • Salla CLI
    Salla - Opensource
    Salla - Developers Community

    Cart

    Cart response. When include_items=true (default), items array is present.
    When include_items is false, the items property is not present in the response.
    Totals are a clean structure: totals.subtotal, totals.discount, totals.tax, totals.total (each an array of line items).
    Root-level total_to_pay is the amount to be paid.

    {
        "id": "string",
        "store_id": "string",
        "count": 0,
        "checkout_url": "string",
        "currency": {
            "label": "string",
            "code": "string"
        },
        "scope": {
            "id": "string",
            "type": "string"
        },
        "amounts": {
            "property1": {
                "title": "string",
                "type": "string",
                "amount": {
                    "value": 0,
                    "currency": "string"
                }
            },
            "property2": {
                "title": "string",
                "type": "string",
                "amount": {
                    "value": 0,
                    "currency": "string"
                }
            }
        },
        "shipping": {
            "required": true
        },
        "coupon": "string",
        "features": {
            "coupon": true,
            "gift": true,
            "loyalty": true,
            "guest_checkout": true
        },
        "discounts": {
            "property1": {
                "id": "string",
                "type": "string",
                "title": "string",
                "amount": {
                    "value": 0,
                    "currency": "string"
                }
            },
            "property2": {
                "id": "string",
                "type": "string",
                "title": "string",
                "amount": {
                    "value": 0,
                    "currency": "string"
                }
            }
        },
        "settings": {
            "property1": "string",
            "property2": "string"
        },
        "options": [
            {
                "property1": "string",
                "property2": "string"
            }
        ],
        "items": [
            {
                "id": "string",
                "product_id": "string",
                "variant_id": "string",
                "name": "string",
                "url": "string",
                "sku": "string",
                "image": "string",
                "on_sale": true,
                "type": "string",
                "barcode": "string",
                "mpn": "string",
                "gtin": "string",
                "quantity": 0,
                "notes": "string",
                "price": {
                    "amount": 0,
                    "currency": "string"
                },
                "sale_price": {
                    "amount": 0,
                    "currency": "string"
                },
                "sale_end": "string",
                "discounts": {
                    "property1": {
                        "title": "string",
                        "type": "string",
                        "amount": {
                            "value": 0,
                            "currency": "string"
                        }
                    },
                    "property2": {
                        "title": "string",
                        "type": "string",
                        "amount": {
                            "value": 0,
                            "currency": "string"
                        }
                    }
                },
                "features": {
                    "attachments": true,
                    "notes": true
                },
                "amounts": {
                    "property1": {
                        "title": "string",
                        "type": "string",
                        "amount": {
                            "value": 0,
                            "currency": "string"
                        }
                    },
                    "property2": {
                        "title": "string",
                        "type": "string",
                        "amount": {
                            "value": 0,
                            "currency": "string"
                        }
                    }
                },
                "shipping": {
                    "required": true
                },
                "attachments": [
                    "string"
                ],
                "options": [
                    {
                        "property1": "string",
                        "property2": "string"
                    }
                ]
            }
        ]
    }