Skip to content

Cart Page

The cart page query is to be used on the site cart page. The cart page by default returns the products in the cart to use for rendering the cart content, but can be configured to contain different types of recommendation listings.

Request

Request method

GET or POST

Request URL

https://{cluster-id}.api.esales.apptus.cloud/api/v2/queries/cart-page

Request parameters

Name Type Description Example
market string The visitor market identifier. Must match the corresponding market identifier in the data feed.
Required
UK
touchpoint string The visitor's touchpoint. Valid values are DESKTOP and MOBILE.
Required
DESKTOP
customerKey string A key that uniquely identifies the current visitor.
Using UUIDs as keys are recommended.
Required
0b05119e-eeb8-418a-bbfb-defa0dde417e
sessionKey string A unique key, identifying the session.
Using UUIDs as keys are recommended.
Required
0b05119e-eeb8-418a-bbfb-defa0dde417e
cart string A comma separated list of keys of the items added to the cart. Must match the key of the variant or product in the data feed. Always use the variant key when possible.
Required
1231231,7231232
priceId string A custom price identifier. Must match supplied custom price identifiers in the data feed. EUR
notify boolean A boolean that can be used to disable notifications and behavioural registration for the query. false

Request headers

All request headers are optional, but recommended when eligible.

  • Content-Type - application/json. To prevent automatic browser preflight requests, text/plain is also supported.
  • Accept-Encoding - gzip. Allows responses to be compressed using Gzip.
  • User-Agent - User agent. Enables internal tracking.

Request body

The cart page can be configured to return additional recommendation listings and to omit the cart content in the result if desired. It is typically used with a CART recommendation. The recommendation listing cart parameter may be omitted for cart recommendation listings on the cart page. The provided mandatory cart query parameter will be used by default.

Name Type Description
cart {
include: boolean
}
An object with cart content options. Set include to true to include the cart products in the response.
recommendationLists RecommendationList[ ] A list of recommendations to be included in the response

Request example

A cart page query containing a price limited cart recommendation example is demonstrated using cURL below.

#!/bin/bash
curl -i \
-X POST \
-T request-body.json \
-H "Content-Type: text/plain" \
-H "Accept-Encoding: gzip" \
-H "User-Agent: {client user agent}" \
"https://{cluster-id}.api.esales.apptus.cloud/api/v2/queries/cart-page?cart=200223_74,010353_48&market=EU&sessionKey=4b116e34-0a7a-ce5d-5591-75c62f231967&customerKey=4b116e34-0a7a-ce5d-5591-75c62f231967&touchpoint=DESKTOP"

request-body.json

{
    "cart" : {
      "include": true
    },
    "recommendationLists": [{
          "id": "C1",
          "limit": 4,
          "algorithm": "CART",
          "productFilter": {
              "price": {"min": 0.0, "max": 40.0}
          }
    }]
}

Response

Response headers

X-Response-Time

Response content-type

application/json

Response codes

Response Description
200 Query accepted, content flattened and serialised to JSON, see Response objects.
400 Invalid or missing arguments for this query.
404 End point is not valid.
503 Service unavailable, no products found in the cluster.
5xx Server error such as cluster unavailable or busy. The response body may contain more information about the error.

Response objects

Response example
{
    "cart": [
        {
            "products": [
                {
                    "key": "200223_74",
                    "ticket": "Oy9mYXNoaW9uL0RFU0tUT1AvQ0FSVF9QQUdFL0NBUlQ7Iztwcm9kdWN0X2tleTsyMDAyMjNfNzQ7Izs7IzsjOw",
                    "imageInfo": {
                        "effect": "GALLERY",
                        "images": [
                            {
                                "sources": [
                                    {
                                        "url": "https://apptus-demo-images.s3.eu-central-1.amazonaws.com/img2020-04/200223_Frank_Four_Season_Suit_Blazer_95_Grey_f_list.jpg",
                                        "width": 920
                                    },
                                    {
                                        "url": "https://apptus-demo-images.s3.eu-central-1.amazonaws.com/img2020-04/200223_Frank_Four_Season_Suit_Blazer_95_Grey_f.jpg",
                                        "width": 1667
                                    }
                                ]
                            },
                            {
                                "sources": [
                                    {
                                        "url": "https://apptus-demo-images.s3.eu-central-1.amazonaws.com/img2020-04/200223_Frank_Four_Season_Suit_Blazer_95_Grey_extra[3]_list.jpg",
                                        "width": 920
                                    },
                                    {
                                        "url": "https://apptus-demo-images.s3.eu-central-1.amazonaws.com/img2020-04/200223_Frank_Four_Season_Suit_Blazer_95_Grey_extra[3].jpg",
                                        "width": 1667
                                    }
                                ]
                            }
                        ],
                        "thumbnail": "https://apptus-demo-images.s3.eu-central-1.amazonaws.com/img2020-04/200223_Frank_Four_Season_Suit_Blazer_95_Grey_f_thumbnail.jpg"
                    },
                    "swatch": {
                        "type": "COLORS",
                        "colors": [
                            "#555555"
                        ]
                    },
                    "brand": "Cheap Monday",
                    "title": "Frank Four Season Suit Blazer",
                    "link": "/article/frank-four-season-suit-blazer?attr1_id=74",
                    "sellingPrice": {
                        "min": 499.0,
                        "max": 499.0
                    },
                    "listPrice": {
                        "min": 499.0,
                        "max": 499.0
                    },
                    "inStock": true,
                    "badges": {
                        "primary": [],
                        "secondary": [
                            {
                                "theme": "THEME_1",
                                "label": "Exclusive"
                            }
                        ]
                    },
                    "variants": [
                        {
                            "key": "2002231095044",
                            "ticket": "Oy9mYXNoaW9uL0RFU0tUT1AvQ0FSVF9QQUdFL0NBUlQ7Iztwcm9kdWN0X2tleTsyMDAyMjNfNzQ7MjAwMjIzMTA5NTA0NDsjOyM7Izs",
                            "size": "44",
                            "inStock": true,
                            "link": "/article/frank-four-season-suit-blazer?attr1_id=74",
                            "listPrice": 499.0,
                            "sellingPrice": 499.0
                        }
                       // More variants
                    ]
                }
                // More products
            ],
            "key": "200223"
        }
        // More product groups in cart
    ],
    "recommendationLists": [
        {
            "id": "C1",
            "visualization": "CAROUSEL",
            "visible": true,
            "productGroups": [
                {
                    "products": [
                        {
                            "key": "350098_1",
                            "ticket": "Oy9mYXNoaW9uL0RFU0tUT1AvQ0FSVF9QQUdFL1JFQ19MSVNUL0MxOyM7cHJvZHVjdF9rZXk7MzUwMDk4XzE7IztPQkpFQ1RJVkUkOyM7Izs",
                            "imageInfo": {
                                "effect": "GALLERY",
                                "images": [
                                    {
                                        "sources": [
                                            {
                                                "url": "https://apptus-demo-images.s3.eu-central-1.amazonaws.com/img2020-04/350098_James_Tee_01_White_f_list.jpg",
                                                "width": 920
                                            },
                                            {
                                                "url": "https://apptus-demo-images.s3.eu-central-1.amazonaws.com/img2020-04/350098_James_Tee_01_White_f.jpg",
                                                "width": 1667
                                            }
                                        ]
                                    },
                                    {
                                        "sources": [
                                            {
                                                "url": "https://apptus-demo-images.s3.eu-central-1.amazonaws.com/img2020-04/350098_James_Tee_01_White_s_list.jpg",
                                                "width": 920
                                            },
                                            {
                                                "url": "https://apptus-demo-images.s3.eu-central-1.amazonaws.com/img2020-04/350098_James_Tee_01_White_s.jpg",
                                                "width": 1667
                                            }
                                        ]
                                    }
                                ],
                                "thumbnail": "https://apptus-demo-images.s3.eu-central-1.amazonaws.com/img2020-04/350098_James_Tee_01_White_f_thumbnail.jpg"
                            },
                            "swatch": {
                                "type": "COLORS",
                                "colors": [
                                    "#FEFDFF"
                                ]
                            },
                            "brand": "Chanel",
                            "title": "James Tee",
                            "link": "/article/james-tee?attr1_id=1",
                            "sellingPrice": {
                                "min": 39.0,
                                "max": 39.0
                            },
                            "listPrice": {
                                "min": 39.0,
                                "max": 39.0
                            },
                            "inStock": true,
                            "badges": {
                                "primary": [],
                                "secondary": []
                            },
                            "variants": [
                                {
                                    "key": "3500981001100",
                                    "ticket": "Oy9mYXNoaW9uL0RFU0tUT1AvQ0FSVF9QQUdFL1JFQ19MSVNUL0MxOyM7cHJvZHVjdF9rZXk7MzUwMDk4XzE7MzUwMDk4MTAwMTEwMDsjOyM7Izs",
                                    "size": "XS",
                                    "inStock": true,
                                    "link": "/article/james-tee?attr1_id=1",
                                    "listPrice": 39.0,
                                    "sellingPrice": 39.0
                                }
                                // More variants
                            ]
                        }
                        // More products
                    ],
                    "key": "350098"
                }
                // More product groups
            ],
            "algorithm": "CART"
        }
    ]
}
Name Type Description
cart ProductGroup[ ] A list of ProductGroup, that matched the input cart parameter.
recommendationLists RecommendationList[ ] A list of requested recommendation lists, as specified in request body.

Last update: December 8, 2020
×
Copyright

This online publication is intellectual property of Apptus Technologies. Its contents can be duplicated in part or whole, provided that a copyright label is visibly located on each copy and the copy is used in conjunction with the product described within this document.

All information found in these documents has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither Apptus Technologies nor the authors shall be held liable for possible errors or the consequences thereof.

Software and hardware descriptions cited in these documents might be registered trademarks. All trade names are subject to copyright restrictions and may be registered trademarks. Apptus Technologies essentially adheres to the manufacturer’s spelling. Names of products and trademarks appearing in this document, with or without specific notation, are likewise subject to trademark and trade protection laws and may thus fall under copyright restrictions.

CLOSE