Views for Cart modifying operations

The views can be requested by adding a views query parameter to your request with at least one of the following views:

Views

ViewDescription

miniCart

Returns a subset of Cart data.

Examples

Request

curl -D- -X POST <base_url>/api/v1/carts/<cartId>/lines?views=miniCart \
    -H 'Authorization: Bearer <ACCESS_TOKEN>'
    -H 'Content-Type: application/json' \
    -d '{
        ...<the parameters for the request>...
    }'

MiniCart Response

{
    "miniCart": {
        "customProperties": [
            {
                "id": "{id}",
                "key": "{propKey}",
                "value": "{propValue}"
            }
        ],
        "createdDate": "{createdDate}",
        "cultureCode": "{cultureCode}",
        "discount": "{discountAmount}",
        "discountTotal": "{discountTotalAmount}",
        "id": "{id}",
        "note": "{note}",
        "orderLines": [
            {
                "discount": "{discountAmount}",
                "discounts": "{[discount1Amount, discount2Amount]}",
                "id": "{id}",
                "price": "{priceAmount}",
                "priceGroupId": "{priceGroupId}",
                "productCatalogId": "{productCatalogId}",
                "productName": "{productName}",
                "quantity": "{quantityNumber}",
                "sku": "{sku}",
                "total": "{totalAmount}",
                "unitDiscount": "{unitDiscountAmount}",
                "variantSku": "{variantSku}",
                "tax": "{taxAmount}",
                "taxRate": "{taxRateAmount}",
                "customProperties": [
                    {
                        "id": "{id}",
                        "key": "{propKey}",
                        "value": "{propValue}"
                    }
                ]
            }
        ],
        "orderTotal": "{orderTotalAmount}",
        "paymentTotal": "{paymentTotalAmount}",
        "shippingTotal": "{shippingTotalAmount}",
        "subTotal": "{subTotalAmount}",
        "tax": "{taxAmount}"
    }
}

Last updated