Reserve products
This method allows the products added to the shopping cart to be reserved for a period of time.
Once the reservation has been confirmed, it is no longer possible to add more products to the cart.
Access method
POST /ShoppingCart/Confirm
Request structure
ShoppingCartId: (string)Required. Cart identifier.LanguageCode: (string)Optional. Language of the returned texts. ISO 639-1 format.
Optionally, in this step you can send the answers to the sale, provider and client level questions. They can also be sent when confirming the sale. See the introduction to question profiles.
-
QuestionsProfiles: (list)Optional. List of question profiles with their answers. Used to answer questions at the sale, provider and client levels. Ticket level questions are answered when adding the product to the cart, not here. See the introduction to question profiles to understand each level.QuestionsProfileId: (string)Required. Question profile identifier. It is obtained from the catalog (SaleQuestionProfileIds,ClientQuestionProfileIds,ProviderQuestionsProfileIds) and from checking question profiles.Questions: (list)Required. Answers to the profile questions.QuestionId: (string)Required. Question identifier (the question'sIdfield returned by checking question profiles).Question: (string)Optional. Question text. Informational.- Value property: depending on the question's
DataType, one of the following properties must be filled in:StringValue(string) /StringCollectionValue(list).BooleanValue(boolean) /BooleanCollectionValue(list).IntegerValue(int) /IntegerCollectionValue(list).DecimalValue(decimal) /DecimalCollectionValue(list).DateTimeValue(dateTime) /DateTimeCollectionValue(list).BinaryValue(string) /BinaryCollectionValue(list). File content encoded in base64.
BinaryMimeType: (string)Optional. File MIME type. Only forDataType= 12 or 13.BinaryExtension: (string)Optional. File extension. Only forDataType= 12 or 13.
Data type (
DataType) → answer propertyThe
DataTypedetermines which property the answer to the question must be sent in.DataTypeType Answer property 0 Text StringValue1 List of texts StringCollectionValue2 Boolean BooleanValue3 List of booleans BooleanCollectionValue4 Date DateTimeValue5 List of dates DateTimeCollectionValue6 Integer number IntegerValue7 List of integers IntegerCollectionValue8 Decimal number DecimalValue9 List of decimals DecimalCollectionValue10 Select one value from a predefined set ( Values)StringValue11 Select multiple values from a predefined set ( Values)StringCollectionValue12 File BinaryValue(+BinaryMimeType,BinaryExtension)13 List of files BinaryCollectionValue(+BinaryMimeType,BinaryExtension)
Request examples
Examples
{
"ShoppingCartId": "j7gjproc9c6sw",
"QuestionsProfiles": [
{
"QuestionsProfileId": "prv8q2k9wla3c",
"Questions": [
{
"QuestionId": "q1mat5kz9p2rt",
"StringValue": "1234ABC"
}
]
}
]
}
Response structure
ExpirationDateTime: (dateTime). Indicates when the reservation will expire. ISO 8601 format (yyyy-MM-ddThh:mm:ss.d).-
Activities: (object). Information about the added activity.-
Products: (list). List of added products.ProductId: (string). Identifier of the added product.CombinedProductId: (string). Identifier of the added combined product.ProductName: (string). Name of the added product.AccessDateTime: (dateTime). Access date and time. ISO 8601 format (yyyy-MM-ddThh:mm:ss.d).Price: (decimal). Rate price.-
PriceMode: (int). Price type.Possible values
- 1: Retail price
- 2: Net
-
Success: (boolean). Indicates whether the reservation was made successfully. Tickets: (list). List of tickets that make up this product.Ticket: (object). Ticket information.TicketId: (string). Ticket identifier.
CancellationPolicy: (object). Indicates the cancellation policies that apply when cancelling this product.IsRefundable: (boolean). Indicates whether free cancellation is available at any point.Rules: (list). List of rules applied when cancelling.Rule: Information about the rule to apply.HoursInAdvanceOfAccess: (int). Number of hours in advance with respect to the access date from which the penalty indicated inPercentagewill be applied.Percentage: (decimal). Penalty percentage on the ticket price.Amount: (decimal). Total penalty amount that will be applied.FromInclusiveDateTime: (dateTime). Date/time from which this rule will apply.ToExclusiveDateTime: (dateTime). Date/time until which this rule will apply.
-
-
Accommodations: (list). Information about accommodations/rooms added to the cart.-
Accommodation: (object). Accommodation information.ProductId: (string). Rate identifier.ProductConditions: (string). Product conditions.AccessDateTime: (dateTime). Check-in date.AccessEndDateTime: (dateTime). Check-out date.Quantity: (int). Quantity of units added.Price: (decimal). Rate price.-
PriceMode: (int). Price type.Possible values
- 1: Retail price
- 2: Net
-
Success: (boolean). Indicates whether the reservation was made successfully. ErrorMessage: (boolean). In case of reservation error, associated message.ChildrenAges: (list). List of the ages of babies/children.int: Age of the baby/child.
NumberOfAdults: (int). Number of adults in this room.NumberOfChildren: (int). Number of children in this room.NumberOfSenior: (int). Number of seniors in this room.NumberOfBabies: (int). Number of babies in this room.NumberOfGeneric: (int). Number of undefined persons in this room.CancellationPolicy: (object). Indicates the cancellation policies that apply when cancelling this product.IsRefundable: (boolean). Indicates whether free cancellation is available at any point.Rules: (list). List of rules applied when cancelling.Rule: Information about the rule to apply.HoursInAdvanceOfAccess: (int). Number of hours in advance with respect to the access date from which the penalty indicated inPercentagewill be applied.Percentage: (decimal). Penalty percentage on the ticket price.Amount: (decimal). Total penalty amount that will be applied.FromInclusiveDateTime: (dateTime). Date/time from which this rule will apply.
-
-
PaymentMethodsNotApplicable: (boolean). Indicates whether payment methods apply to this partner. Partners with a debit contract will need to apply payment methods (PaymentMethodsNotApplicable = false). -
PaymentMethods: (list). Payment methods supported for the partner if working in debit mode.PaymentMethod: (object). Information about the payment method.Id: (string). Payment method identifier.Type: (byte). Payment method type.Name: (string). Payment method name.CommercialName: (string)Optional. Commercial name of the payment method.EnableSendByEmail: (boolean)Optional. Indicates whether this payment method can be used to automatically send a payment link by email.Fields: (list). Array of fillable fields associated with the payment method. These fields can be specified when creating a transaction.Id: (string). Field identifier.Name: (string). Field name.IsRequired: (boolean). Indicates whether the field is mandatory.RegexValidation: (string)Optional. Regular expression that the field value must satisfy.RegexValidationErrorMessage: (string)Optional. Error message to display if the regular expression is not satisfied.DefaultValue: (string)Optional. Default field value to show to the user.-
DataType: (byte). Indicates the data type required by the field value.Possible values
- 0: Text
- 1: Numeric
- 2: Date
- 3: Boolean
-
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
{
"Activities": {
"Products": [
{
"ProductId": "yt1pgb1k61wdc",
"ProductName": "Forfait Adulto + Alquiler snow 2 días ",
"AccessDateTime": "2023-01-25T00:00:00",
"Quantity": 1,
"Price": 119.60,
"PriceMode": 1,
"Success": true,
"Tickets": [
{
"TicketId": "na19qnrm8zh3e"
}
],
"CancellationConditions": {
"IsRefundable": true,
"Rules": [
{
"Percentage": 100.000000000000,
"Amount": 119.60,
"FromInclusiveDateTime": "2023-01-22T00:00:00",
"HoursInAdvanceOfAccess": 72.000000000000
}
]
}
}
]
},
"Accommodations": [
{
"ProductId": "gmw4uitqxsg91",
"ProductConditions": "Reception is opened from 08:00 to 11:00 & from 16:00 to 19:00 all week except Wednesday afternoon it is closed. If client has to arrive out of this hours, pls contact the hotel by phone Importe total estimado de tasas y recargos para esta reserva:22.23 Euro pagaderas a la llegada. Recogida de llaves 17:00-19:00.Hora de entrada 18:00-.Aparcamiento 8.00 EUR Por unidad/noche.Identificación a la llegada.Depósito a la llegada.",
"AccessDateTime": "2023-01-25T00:00:00",
"Quantity": 1,
"Price": 273.0100,
"PriceMode": 1,
"Success": true,
"ErrorMessage": "",
"NumberOfAdults": 1,
"NumberOfChildren": 0,
"NumberOfSenior": 0,
"NumberOfBabies": 0,
"NumberOfGeneric": 0,
"CancellationConditions": {
"IsRefundable": true,
"Rules": [
{
"Percentage": 100.0,
"Amount": 273.0100,
"FromInclusiveDateTime": "2023-01-22T00:00:00",
"HoursInAdvanceOfAccess": 72.0
}
]
}
},
{
"ProductId": "5msetyd6q4rqa",
"ProductConditions": "Reception is opened from 08:00 to 11:00 & from 16:00 to 19:00 all week except Wednesday afternoon it is closed. If client has to arrive out of this hours, pls contact the hotel by phone Importe total estimado de tasas y recargos para esta reserva:22.23 Euro pagaderas a la llegada. Recogida de llaves 17:00-19:00.Hora de entrada 18:00-.Aparcamiento 8.00 EUR Por unidad/noche.Identificación a la llegada.Depósito a la llegada.",
"AccessDateTime": "2023-01-25T00:00:00",
"Quantity": 1,
"Price": 273.0100,
"PriceMode": 1,
"Success": true,
"ErrorMessage": "",
"ChildrenAges": [
5
],
"NumberOfAdults": 2,
"NumberOfChildren": 1,
"NumberOfSenior": 0,
"NumberOfBabies": 0,
"NumberOfGeneric": 0,
"CancellationConditions": {
"IsRefundable": true,
"Rules": [
{
"Percentage": 100.0,
"Amount": 273.0100,
"FromInclusiveDateTime": "2023-01-22T00:00:00",
"HoursInAdvanceOfAccess": 72.0
}
]
}
}
],
"ExpirationDateTime": "2023-01-13T01:19:16.067",
"PaymentMethodsNotApplicable": false,
"PaymentMethods": [
{
"Type": 1,
"Name": "Tarjeta bancaria",
"EnableSendByEmail": true
},
{
"Type": 9,
"Name": "TPV Externo",
"EnableSendByEmail": false
},
{
"Type": 13,
"Name": "Bizum",
"EnableSendByEmail": true
},
{
"Type": 4,
"Name": "Reserva online",
"EnableSendByEmail": false
}
],
"Success": true
}
Additional HTTP headers
- This call accepts an additional header to indicate the partner user who is performing the cart confirmation:
| Header name | Header value |
|---|---|
AdminPartnerUserId |
AdminPartner user identifier |