Add to cart
Add offers to cart with an action. If the action is "ADD" it is considered to be enrollment whereas "REMOVE" is considered to be de-enrollment.
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 |
mutation Mutation($salesJourneyId:String,$items: [ItemInput]) {
upsertItem(salesJourneyId:$salesJourneyId,items:$items){
salesJourneyId
cart{
cartItems{
catalogId
purchasedOfferId
status
action
}
}
}
}
{
"salesJourneyId": "{{ salesJourneyId }}",
"items": [
{
"itemType": "ADDON",
"catalogId":"EPO-90-200007",
"actionType":"ADD",
"quantity" : 1
}
]
}
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 | POST |
[
{
"itemType": "ADDON",
"catalogId": "EPO-90-200008",
"actionType": "ADD",
"quantity": 1
}
]
None
None
{
"salesJourneyId": "5c0c6542-ef81-4d8f-95e5-6f67f3c30d8d",
"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 | POST |
[
{
"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