Documentation
gettour
Returns the complete information of the tour.
π‘ Full representation of a circuit. This is the main product that can be booked using this system considering a brochure and a departure date. We can identify a circuit through its itinerary code and brochure code. The same circuit can be repeated in different brochures.
We must distinguish two types of itineraries:
Tourist circuit (excursions): Short trip made for leisure, sport or study. Circuit: An itinerary is a closed trip, usually predefined, that returns to the starting point when it ends.
Endpoints
https://newapi.vpttours.com/gettour
Postman request
{
"logindata": {
"useremail": "{{vpt_login}}",
"userpass": "{{vpt_pass}}",
"integrator_token": "XXXXXX"
},
"requestdata": {
"brochure": 185,
"code": 6971,
"language": "1"
}
}
Response
Response fields
- catalog [int] β Catalog code the circuit belongs to.
- brochure [int] β Brochure code the circuit belongs to.
- code [int] β Circuit code.
- name [string] β Circuit name.
- minprice [int] β Minimum price per person in double.
- currency [int] β Currency code of the minimum price.
- length [int] β Duration in days.
- rates [array:rate] β Circuit categories.
- supplements [array:supplement] β Supplements of the circuit.
- discounts [array:discount] β Discounts of the circuit.
- departuredates [array:date] β Circuit departure dates.
- hotels [array:service] β Hotels included in the circuit.
- cities [array:city] β Cities the circuit passes through.
- itinerary [array:itineraryline] β Shows the day-by-day itinerary.
- optionals [array] β Informational list of optional services associated with the circuit. For booking data, use
getoptionals. - pickups [array:pickup] β Pick-up points.
- foodplan [int] β Returns food plan code, food plan name and codetype.
- trfin / trfout β Transfers (values: additional / included / not included).
- iatacitystart / iatacityend β IATA codes of the starting and ending cities.
Circuit optionals
The optionals node returned by gettour is informational only.
Do not use the brochure or code values from this node to book a circuit optional.
To obtain the booking data for an optional service, use getoptionals.
For circuit optional reservations, use the values returned by the same getoptionals item:
codfoviaβbooktour.brochurecoditineβbooktour.codefechainiβbooktour.date
If the same optional service appears more than once in getoptionals, treat each result independently and do not combine brochure, code, date or price values from different results.
Comportamiento
gettour returns supplements and discounts with a comportamiento field.
The value returned in comportamiento corresponds to the internal codconce: a grouping or concept code used to classify related supplements and discounts.
This field must not be confused with the specific supplement code.
codeβ specific supplement code (codsuple). This is the code used to select or apply a specific supplement when required.comportamientoβ grouping/concept code (codconce) associated with the supplement.
For example:
{
"code": "123",
"comportamiento": "15"
}
In this example, 123 is the specific supplement code, while 15 is the concept/grouping code.
Likewise, a supplement with code: "15" is not related to another supplement simply because that other supplement has comportamiento: "15".
Existing integrations that identify specific supplements by code must continue using that field.
For example:
supplement.code == "15"β PRE additional nightsupplement.code == "16"β POST additional night
This behavior has not changed.
Optional and automatic supplements
The isoptional field indicates whether a supplement requires explicit selection.
isoptional: trueβ the supplement is selectable and must be explicitly included when applicable.isoptional: falseβ the supplement is not optional and is applied automatically by the pricing process when its configured conditions are met.
Non-optional supplements may include, for example, single-room supplements, mandatory supplements for specific departure dates or periods, and municipal taxes or similar mandatory charges.
A supplement returned by gettour with isoptional: false does not need to be manually added to the supplements array in getbookprice.
getbookprice applies it automatically when the corresponding conditions are met.
For example:
{
"code": "594",
"name": "TASA MUNICIPALES",
"amount": "70.00",
"percent": "0.00",
"isoptional": false,
"comportamiento": "18"
}
In this case:
594is the specific supplement code.18is its concept/grouping code (codconce).isoptional: falseindicates that it is automatically applied when its conditions are met.
iscommissionable
The iscommissionable field indicates whether the supplement is commissionable:
trueβ commissionablefalseβ not commissionable
This field is informational and does not change the existing supplement logic.
observaciones
The observaciones field contains additional information about the supplement when available.
It is informational, does not participate in the price calculation and does not need to be sent back to the API.
amount and percent
amountcontains the fixed amount configured for the supplement.percentcontains the percentage when the supplement or discount is percentage-based.
When percent is 0, the configured fixed amount is used.
The number of times an amount is applied cannot be determined from amount alone. It depends on the conditions of the specific supplement, such as passenger eligibility, room occupancy, departure dates or other booking conditions.
For this reason, the definitive price must always be obtained from getbookprice.