Skip to main content

Automatic Cart Promotion Flow

How to get automatic cart promotions

Use this service to get the information about automatic cart promotions.

Automatic cart promotions are applied automatically when the conditions are accomplish.


Let's get started with the example

Step-by-step examples

This guide shows how to get the details of the content of an active shopping cart using a valid cart token.

Prerequisites!

You will need a valid OAuth access_token to be able to make each call! Please refer to our Authentication Guide to obtain one.

Get cart details

This call returns all the information related to the automatic cart promotions applied.

  • cart-token: The identifier of the cart.
curl --location --request GET 'https://api.oneboxtds.net/onebox-rest2/rest/shoppingCart/details' \
--header 'Accept: application/json' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {{access-token}}'
--data-urlencode 'token={{cart-token}}'

Note: Each automatic promotion will have its value discounted on each ticket in the cart. There is also all the information of the promotion in the automaticCartPromotion node.

{
"@token": "f304561ab5e914073e83a7057cbe2153",
"@currency": "EUR",
"@timeLeft": "130",
"shopping-cart-item": {
"@id": "141097105",
"@type": "TICKET",
"ticket-data": {
"@seatId": "141097105",
"@sessionId": "261687",
"@eventId": "8166",
"@entityId": "60",
"@seatType": "NUMBERED",
"@ticketType": "GENERAL",
"numSeat": "8",
"rowName": "F 4",
"sectorId": "439669",
"viewId": "407942",
"priceZoneId": "53644",
"priceZoneName": "Zona base",
"sectorCode": "Anfiteatro Numerado",
"sectorName": "Anfiteatro Numerado",
"accessibility": "NORMAL",
"visibility": "NORMAL",
"rowBlock": "1",
"rowOrder": "7",
"rowId": "4046151",
"rateId": "16667"
},
"automatic-promotion": {
"@id": "23446",
"promotionComElements": {
"name": "Automatic promo"
},
"value": "10.0",
"limitedUses": "false",
"nonCumulative": "false"
},
"productId": "141097105",
"price-breakdown": {
"base-price": "100.0",
"automatic-promotion": "10.0",
"automatic-cart-promotion": "10.0",
"client-comission": "0.0",
"charges": {
"charge": [
{
"@type": "CHANNEL_CHARGE",
"value": "2.0"
},
{
"@type": "PROMOTER_CHARGE",
"value": "3.0"
}
]
},
"delivery-costs": "0.0",
"final-price": "85.0"
},
"operationsAllowed": {
"issue": "true",
"purchase": "true",
"booking": "false"
}
},
"deliveryCosts": "0.0",
"total-price-breakdown": {
"base-price": "100.0",
"automatic-promotion": "10.0",
"automatic-cart-promotion": "10.0",
"manual-promotion": "0.0",
"manual-discount": "0.0",
"group-cart-promotion": "0.0",
"client-discount": "0.0",
"client-comission": "0.0",
"charges": {
"charge": [
{
"@type": "CHANNEL_CHARGE",
"value": "2.0"
},
{
"@type": "PROMOTER_CHARGE",
"value": "3.0"
}
]
},
"delivery-costs": "0.0",
"insurance": "0.0",
"final-price": "85.0"
},
"cartPromotions": {
"automaticCartPromotion": {
"id": "159",
"name": "automatic promotion 10 €",
"type": "FIXED",
"promotionComElements": {
"name": "automatic promotion 10 €"
},
"nonCumulative": "true"
}
}
}