Skip to content

Retrieve cart

Get the current cart if available for the session

Variables - Details

Name Description Required
itemType offer type, for OTT's is usually 'ADDON' Required
actionType Action to be done on the offer, Eg : ADD/REMOVE Required
quantity Quantity of offer instance to be added to cart Required
salesJourneyId sales journey id that was received when sales session is initialized Required
catalogId Unique identifier of the offer in the catalog Required

API Specs

GraphQL API

Ready

This API is available in both integration and production.

HTTP Item HTTP Value
Url https://{host}/graphql
Method POST

 
query query_sales($salesJourneyId:String) { 
    sales(salesJourneyId:$salesJourneyId){
        salesJourneyId
        cart{
            cartItems{
                catalogId
                purchasedOfferId
                status
                action
            }
        }
    }
}

 
{
    "salesJourneyId": "{{ salesJourneyId }}"
}

None

None

 
{
    "salesJourneyId" : "32423423",
    "cart": {
        "cartItems": [
            {
                "catalogId": "EPO-90-200008",
                "purchasedOfferId": "xxxx",
                "status": "NEW",
                "action": "ADD"
            }
        ]
    }
}

 
{
    "errors" : []
}

Coming soon

REST API

Info

This API is available in integration. Will be available in production in few days.

HTTP Item HTTP Value
Url https://{host}/cart
Method GET

 
[
    {
        "itemType": "ADDON",
        "catalogId": "EPO-90-200008",
        "actionType": "ADD",
        "quantity": 1
    }
]

None

None

 
{
    "salesJourneyId" : "32423423",
    "cart": {
        "cartItems": [
            {
                "catalogId": "EPO-90-200008",
                "purchasedOfferId": "xxxx",
                "status": "NEW",
                "action": "ADD"
            }
        ]
    }
}

 
{
    "errorCode" :  "",
    "errorMessage" : "",
    "severity" : ""
}

Coming soon

REST API - V2

Info

This API is available in integration. Will be available in production in few days.

HTTP Item HTTP Value
Url https://{host}/v2/partners/{partnerId}/accounts/{serviceAccountNumber}/salesJourneys/{salesJourneyId}/cart
Method GET

 
[
    {
        "offerCode": "EPO-90-200009",
        "action": "ADD"
    }
]

None

Param Name Description Required
partnerId Partner id such as xglobal/comcast Required
serviceAccountNumber XBO service account number Required
salesJourneyId The id you got from init step Required

 
{
    "salesJourneyId": "e6bd4244-aeed-488a-98ff-2c749676d1cc",
    "offers": [
        {
            "offerCode": "EPO-90-200009",
            "action": "ADD"
        }
    ]
}

 
{
    "errorCode" :  "",
    "errorMessage" : "",
    "severity" : ""
}

Coming soon