VPT API 2.0

Version 2.0 Status: production (evolving) Format: JSON

⬇ Download Postman collection
✉ Contact support

Note: All requests are POST and must include logindata and requestdata inside the in field.

Overview

Product structure
Catalogs, brochures, tours
Request structure
Login + requestdata
Working examples
cURL + PHP
Get access
Credentials

Product structure

VPT mainly sells organized tours across Europe and sightseeing tours around Madrid.
Tours are structured into brochures, which are grouped inside catalogs.
Each client may access catalogs depending on language and localization.

Important: When booking a tour (service), you get two locators:
  • Reservation locator: the main reservation ID (includes services).
  • ReservationService locator: the locator of the booked service.
A single reservation may include multiple reservationServices, useful for grouping services for the same passengers.

Request structure

Key Type Required Description
logindata object Yes User credentials
logindata.useremail string Yes Login email
logindata.userpass string Yes Login password
requestdata object Yes Endpoint-specific parameters
Tip: Always send a single in field containing the full JSON payload.

Examples

cURL

curl -X POST https://newapi.vpttours.com/getcatalogs   -d 'in={"logindata":{"useremail":"john@doe.com","userpass":"secret"},"requestdata":{"language":1}}'

PHP

$payload = [
  "logindata" => ["useremail" => "john@doe.com", "userpass" => "secret"],
  "requestdata" => ["language" => 1],
];

echo "<form action='https://newapi.vpttours.com/getcatalogs' method='post'>";
echo "<input type='hidden' name='in' value='" . json_encode($payload, JSON_UNESCAPED_SLASHES) . "'>";
echo "<input type='submit' value='Send'>";
echo "</form>";

Common errors

Code Meaning Fix / Notes
401 Invalid credentials Check useremail / userpass
422 Missing/invalid requestdata Verify required fields for the endpoint
500 Server error Retry; if persists, contact support team
2101 Incorrect tour code Brochure and tour codes do not match, or both are invalid. It may also indicate the codes don't match the user's currency, the language doesn't match the user, or the tour is not available.
2107 Incorrect foodplan The foodplan sent in getbookprice is not valid. As a rule of thumb, send 0 unless specified otherwise.
2102 Incorrect departure date The selected departure date does not exist for the given tour.
2119 At least one passenger is mandatory If the tour is a radial excursion, the passenger count must be sent inside requestdata, not inside rooms.