Add items to the cart
This method allows us to add activities, accommodations, and/or packages to the shopping cart.
It can be called one or more times, depending on how we need to keep adding items to the cart.
We can add one or several products in one or several calls, depending on the needs of the integration process.
Access method
POST /ShoppingCart/Add
Request structure
ShoppingCartId: (string)Required. Cart identifier.-
Activities: (list)Optional. List of activities to add to the cart.Activity: (object)Optional. Activity information.ProductId: (string)Required. Product identifier.CombinedProductId: (string)Optional. Combined product identifier.GiftCardIdentifier: (string)Optional. Identifier of the gift card being redeemed.AccessDateTime: (date)Required. Access date. ISO 8601 format (yyyy-MM-dd).Quantity: (int)Required. Product quantity.Tickets: (object)Optional. List containing ticket information.TicketId: (string)Required. Ticket identifier.SessionId: (string)Optional. Session identifier.AccessDateTime: (date)Required. Access date. ISO 8601 format (yyyy-MM-dd).-
Questions: (list)Optional. List of answers to ticket questions.QuestionId: (string)Required. Question identifier.StringValue: (string)Required. Answer to the question.
Additional information
- When any of the tickets of the catalog products we want to add to the cart has the
TicketsQuestionsProfileIdproperty filled in, we must check ticket questions to know which ticket questions that activity has. - Depending on the question type, the answer value must be sent in one property or another. For example, if the question is text type (
DataType= 0), theStringValueproperty must be filled in. - Another example: if the question is date type (
DataType= 4), thenDateTimeValuemust be filled in, and so on.
Possible values
- StringValue: Respuesta de la pregunta con un único valoro selección de un valor entre un conjunto de valores predefinidos.
- BooleanValue: Respuesta de la pregunta con true o false.
- DateTimeValue: Respuesta de la pregunta indicando fecha.
- IntegerValue: Respuesta de la pregunta indicando número entero.
- DecimalValue: Respuesta de la pregunta indicando número decimal.
- StringCollectionValue: Selección de varios valores entre un conjunto de valores predefinidos.
- BinaryValue: Archivo.
-
GiftCards: (list)Optional. List of gift cards to add to the cart.ProductIds: (list). List of activity identifiers included in the gift card.(string): Activity identifier.
AccessDateTime: (date)Required. Approximate access date. It is only used for statistical purposes; the customer who redeems the card will be able to choose the actual access dates. ISO 8601 format (yyyy-MM-dd).Message: (string)Optional. Message from the purchaser to the person who will redeem the gift card.Client: (object)Optional. Data of the customer who will redeem the gift card.FullName: (string)Optional. Name.Email: (string)Optional. If this field is provided, the person redeeming the gift card will receive it by email.
-
Accommodations: (list)Optional. List of accommodations to add to the cart.Accommodation: (object)Optional. Accommodation information.EchoToken: (string)Required. Token obtained in the accommodation request.Rates: (list)Required. List of rate identifiers.(string):Required. Rate identifier.
Packages: (list)Optional. List of package groupings to add to the cart.Package: (object)Optional. Package group information.EchoToken: (string)Required. Token obtained in the package request.Packages: (list)Required. List of packages.Package: (object)Required. Package information.Id:Required. Package identifier.Providers: (list)Optional. Object with provider data.Id: (string)Required. Identifier.Activities: (list)Optional. List of activities to add to the cart.Id: (string)Required. Identifier.ProductBaseId: (string)Required. Product base identifier.Tickets: (object)Optional. List containing ticket information.SessionId: (string)Optional. Session identifier.AccessDateTime: (date)Required. Session date.TicketId: (string)Optional. Ticket identifier.
Request examples
Examples
{
"ShoppingCartId": "stf9gy7i3xawa",
"Activities": [
{
"ProductId": "yt1pgb1k61wdc",
"AccessDateTime": "2023-01-25",
"Quantity": 1
}
]
}
{
"ShoppingCartId": "stf9gy7i3xawa",
"Activities": [
{
"ProductId": "yt1pgb1k61wdc",
"AccessDateTime": "2023-01-25",
"Quantity": 1,
"Questions": [
{
"TicketQuestionId": "ik375myid33uq",
"DecimalAnswer": 11.2
}
]
}
]
}
{
"ShoppingCartId": "stf9gy7i3xawa",
"Activities": [
{
"ProductId": "154864ftfmxh",
"AccessDateTime": "2023-01-25",
"Quantity": 1,
"GiftCardIdentifier": "3167250411491835499"
},
{
"ProductId": "gimas51204d",
"AccessDateTime": "2023-01-25",
"Quantity": 1,
"GiftCardIdentifier": "3167250411491835499"
}
]
}
{
"ProductIds": [ "154864ftfmxh", "gimas51204d" ],
"Client":{ "FullName": "Sara Cruz", "Email": "sara.cruz@email.com"},
"AccessDateTime": "2023-01-25",
"Message": "I got you a present for your anniversary"
}
{
"ShoppingCartId": "stf9gy7i3xawa",
"Activities": [
{
"ProductId": "yt1pgb1k61wdc",
"CombinedProductId": "j7gjproc9c6sw",
"AccessDateTime": "2023-01-25",
"Quantity": 1
},
{
"ProductId": "ppyibu8qwb88s",
"CombinedProductId": "j7gjproc9c6sw",
"AccessDateTime": "2023-01-26",
"Quantity": 1
}
]
}
{
"ShoppingCartId": "stf9gy7i3xawa",
"Accommodations": [
{
"EchoToken": "aa5zyx8djys5az9msuhjzcoqge",
"Rates": [
"wdiwc9ehmj4yk"
]
}
]
}
{
"ShoppingCartId": "48siun8ozecx1",
"Activities": [
{
"ProductId": "ppyibu8qwb88s",
"AccessDateTime": "2023-03-18",
"Quantity": 1,
"Tickets": [
{
"TicketId": "5uztgje33ayyw",
"Questions": [
{
"TicketQuestionId": "6inrbj61drob4",
"StringValue": "response of my question"
}
]
}
]
}
]
}
{
"ShoppingCartId": "stf9gy7i3xawa",
"Packages": [
{
"EchoToken": "az9msuhjzcoqgeaa5zyx8djys5",
"Packages": [
{
"Id": "4pdc7ad88qota"
}
]
}
]
}
{
"ShoppingCartId": "hy3gp7cykreog",
"Activities": [
{
"ProductId": "35ro8mcqkzs4q",
"AccessDateTime": "2023-03-21",
"Quantity": 1,
"Tickets": [
{
"TicketId": "6nx1a1pd1wbms",
"Questions": [
{
"TicketQuestionId": "dhci15yyp1y81",
"StringValue": "respuesta"
}
],
"SessionId": "9zobybtjtou6s",
"AccessDateTime": "2023-03-21"
}
]
}
]
}
{
"ShoppingCartId": "{{ShoppingCartId}}",
"Activities": [
{
"ProductId": "yt1pgb1k61wdc",
"AccessDateTime": "2023-01-25",
"Quantity": 1
}
],
"Accommodations": [
{
"EchoToken": "{{EchoToken}}",
"Rates": [
"wdiwc9ehmj4yk"
]
}
]
}
Response structure
It is important to take into account the Id properties returned in the response, because they will be needed to manipulate the products once they have been added to the cart.
-
Activities: (list). List of activities added in the current request. If no activities were added, this property will not appear.Activity: (object). Information about the added activity.Id: (string). Identifier assigned to this activity inside the cart.Activity: (object). Information about the added activity.ProductId: (string). Product identifier.Quantity: (int). Added quantity.AccessDateTime: (dateTime). Access date. ISO 8601 format (yyyy-MM-ddThh:mm:ss).ForceNotAutoAssignSeating: (boolean). Force assigned seating.Tickets: (list). List of tickets.TicketId: (string). Ticket identifier.SessionId: (string). Session identifier.-
Questions: (object). Information about the questions.TicketQuestionId: (string). Question identifier.Question: (string). Question.StringValue: (string). Question answer.
Additional information
- Depending on the question type, the response value is returned in one property or another. For example, if the question is text type (
DataType= 0), theStringValueproperty will be returned. - Another example: if the question is date type (
DataType= 4), then theDateTimeValueproperty will be returned, and so on.
Possible values
- StringValue: Respuesta de la pregunta con un único valoro selección de un valor entre un conjunto de valores predefinidos.
- BooleanValue: Respuesta de la pregunta con true o false.
- DateTimeValue: Respuesta de la pregunta indicando fecha.
- IntegerValue: Respuesta de la pregunta indicando número entero.
- DecimalValue: Respuesta de la pregunta indicando número decimal.
- StringCollectionValue: Selección de varios valores entre un conjunto de valores predefinidos.
- BinaryValue: Archivo.
-
Accommodations: (list). List of accommodations added in the current request. If no accommodations were added, this property will not appear.Accommodation: (object). Information about the added accommodation.Id: (string). Identifier assigned to this accommodation inside the cart.RateId: (string). Rate identifier.
-
Success: (boolean). Value that indicates whether the call was processed correctly or not. Errors: (list). Array of errors.Error: (object).ErrorMessage: (string). Error message explaining why the request was not successful. If it was correct, it will returnnull.ErrorCode: (int). Code that identifies the error.
ErrorEntityBreakDown(list): list that contains objects with the name and ID in case of error.Id(string): identifierName(string): related name of the identifier.
Response examples
Examples
{
"Success": true,
"Activities": [
{
"Id": "ygqbw4q8owhue",
"Activity": {
"ProductId": "yt1pgb1k61wdc",
"Quantity": 1,
"AccessDateTime": "2023-01-25T00:00:00",
"ForceNotAutoAssignSeating": false
}
}
]
}
{
"Success": true,
"Activities": [
{
"Id": "ygqbw4q8owhue",
"Activity": {
"ProductId": "yt1pgb1k61wdc",
"CombinedProductId": "j7gjproc9c6sw",
"Quantity": 1,
"AccessDateTime": "2023-01-25T00:00:00",
"ForceNotAutoAssignSeating": false
}
},
{
"Id": "sdfhiq8owhue",
"Activity": {
"ProductId": "ppyibu8qwb88s",
"CombinedProductId": "j7gjproc9c6sw",
"Quantity": 1,
"AccessDateTime": "2023-01-26T00:00:00",
"ForceNotAutoAssignSeating": false
}
}
]
}
{
"Success": true,
"Accommodations": [
{
"Id": "yhwrziz8bsag1",
"RateId": "wdiwc9ehmj4yk"
}
]
}
{
"Success": true,
"Activities": [
{
"Id": "mi95gbadopeqk",
"Activity": {
"ProductId": "ppyibu8qwb88s",
"Quantity": 1,
"AccessDateTime": "2023-03-18T00:00:00",
"ForceNotAutoAssignSeating": false,
"Tickets": [
{
"TicketId": "5uztgje33ayyw",
"Questions": [
{
"TicketQuestionId": "6inrbj61drob4",
"StringValue": "response to my question"
}
]
}
]
}
}
]
}
{
"Success": true,
}
{
"Success": true,
"Activities": [
{
"Id": "ygqbw4q8owhue",
"Activity": {
"ProductId": "yt1pgb1k61wdc",
"Quantity": 1,
"AccessDateTime": "2023-01-25T00:00:00",
"ForceNotAutoAssignSeating": false
}
}
],
"Accommodations": [
{
"Id": "yhwrziz8bsag1",
"RateId": "wdiwc9ehmj4yk"
}
]
}