A REST API and webhooks to connect your own software to the MyTourist PMS and channel manager. Open docs, JSON throughout and one token per company profile.
$ curl -G https://app.mytourist.cloud/api/v1/availability \
-H "Authorization: Bearer $MYTOURIST_TOKEN" \
-d arrival=2030-07-01 \
-d departure=2030-07-04
[
{
"id": "81912063",
"name": "Doubleroom Deluxe with balcony",
"rooms_available": 1,
"rates": [
{
"id": 66118004,
"name": "Conform arrangement",
"rate_available": true,
"total_price": 200
},
{
"id": 82010274,
"name": "Bubbles arrangement",
"rate_available": false,
"reasons": ["closedonarrival", "minstay"]
}
]
}
]
Read, create, update and cancel. Updates are partial: you only send what changes. Pick a resource to see its endpoints.
/api/v1/bookings
List, fetch, create, update and cancel. Read and update guests too, and link bookings together.
/bookings
List bookings between dates
/bookings/current-bookings
Bookings currently staying
/bookings/from-debtor
Bookings of a debtor
/bookings/{BOOKING_ID}
Retrieve a booking
/bookings
Create a booking
/bookings/{BOOKING_ID}
Update a booking
/bookings/{BOOKING_ID}
Cancel a booking
/bookings/{BOOKING_ID}/attach
Attach to a booking
/bookings/{BOOKING_ID}/detach
Detach from a booking
/bookings/{BOOKING_ID}/guests
List guests
/bookings/{BOOKING_ID}/guests/{GUEST_ID}
Update a guest
/api/v1/availability
Free room types with the calculated total per rate, and the reason when a rate is not bookable, such as minstay or closedonarrival.
/api/v1/calendar
Fetch prices, availability and restrictions per day, and change them in bulk.
/api/v1/invoices
Manage invoices, lines and payments, finalise them and download the PDF.
/invoices
List invoices
/invoices/{INVOICE_ID}
Retrieve an invoice
/invoices
Create an invoice
/invoices/{INVOICE_ID}
Update an invoice
/invoices/make-final/{INVOICE_ID}
Make an invoice final
/invoices/{INVOICE_ID}
Delete a proforma invoice
/invoices/{INVOICE_ID}/lines
Add a product line
/invoices/{INVOICE_ID}/lines/{LINE_ID}
Update a product line
/invoices/{INVOICE_ID}/lines/{LINE_ID}
Remove a product line
/invoices/payments
List all payments
/invoices/{INVOICE_ID}/payments
Add a payment
/invoices/{INVOICE_ID}/payments/{PAYMENT_ID}
Remove a payment
/invoices/{INVOICE_ID}/pdf
Download an invoice
/api/v1/debtors
The guests and companies that book and pay: search, create, update and delete.
/api/v1/roomtypes
Room types with their rooms, like a double room with room 4 and room 6.
/api/v1/price-rates
The rates per room type, like a weekend package or a long stay rate.
/api/v1/products
Everything you sell besides the room, like final cleaning or breakfast, per guest or per night.
/api/v1/product-categories
Group your products with a name and a colour.
/api/v1/vouchers
Manage vouchers and discount codes for the booking engine from your own system.
/api/v1/tax-rates
Manage VAT rates: a label, the rate and its type.
/api/v1/property
Address and company data of the company profile behind the token.
Three calls you will almost certainly need, in curl, PHP or JavaScript. Copy, add your token, run.
/bookings
curl -X POST https://app.mytourist.cloud/api/v1/bookings \
-H "Authorization: Bearer $MYTOURIST_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"arrival": "2030-07-01",
"departure": "2030-07-04",
"roomtype_id": "81912063",
"rate_id": "66118004",
"number_of_guests": 2,
"debtor_id": "23192010294",
"channel": "api",
"channel_reference": "WEB-10482"
}'
$client = new GuzzleHttp\Client(['base_uri' => 'https://app.mytourist.cloud/api/v1/']);
$res = $client->post('bookings', [
'headers' => ['Authorization' => 'Bearer ' . getenv('MYTOURIST_TOKEN')],
'json' => [
'arrival' => '2030-07-01',
'departure' => '2030-07-04',
'roomtype_id' => '81912063',
'rate_id' => '66118004',
'number_of_guests' => 2,
'channel_reference' => 'WEB-10482',
],
]);
$booking = json_decode($res->getBody(), true);
echo $booking['invoice']['total_amount_incl_vat']; // 200
const res = await fetch('https://app.mytourist.cloud/api/v1/bookings', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.MYTOURIST_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
arrival: '2030-07-01',
departure: '2030-07-04',
roomtype_id: '81912063',
rate_id: '66118004',
number_of_guests: 2,
channel_reference: 'WEB-10482',
}),
});
const booking = await res.json(); // booking.id, booking.invoice
{
"id": 231920102956,
"state": "confirmed",
"arrival": "2030-07-01",
"departure": "2030-07-04",
"roomtype": {
"id": "81912063",
"name": "Doubleroom Deluxe with balcony",
"placed_in_room": "Room 6"
},
"number_of_guests": 2,
"rate": { "id": "66118004", "name": "Conform arrangement" },
"channel": { "label": "api", "reference": "WEB-10482" },
"invoice": {
"id": "P1020077",
"total_amount_incl_vat": 200,
"has_amount_to_pay": true
}
}
/invoices/{INVOICE_ID}
curl https://app.mytourist.cloud/api/v1/invoices/P1020077 \
-H "Authorization: Bearer $MYTOURIST_TOKEN"
# Or as a PDF
curl https://app.mytourist.cloud/api/v1/invoices/P1020077/pdf \
-H "Authorization: Bearer $MYTOURIST_TOKEN" -o invoice.pdf
$res = $client->get('invoices/P1020077', [
'headers' => ['Authorization' => 'Bearer ' . getenv('MYTOURIST_TOKEN')],
]);
$invoice = json_decode($res->getBody(), true);
foreach ($invoice['product_lines'] as $line) {
echo $line['description'] . ': ' . $line['price_incl_vat'] . PHP_EOL;
}
const res = await fetch('https://app.mytourist.cloud/api/v1/invoices/P1020077', {
headers: { 'Authorization': `Bearer ${process.env.MYTOURIST_TOKEN}` },
});
const invoice = await res.json();
const open = invoice.financial_state === 'open';
{
"id": "P1020077",
"type": "proforma",
"financial_state": "open",
"reservation": "231920102956",
"reference": "PO-12345",
"product_lines": [
{
"type": "logies",
"description": "Doubleroom with balcony - 3 night(s) - 2 guest(s)",
"price_incl_vat": "200.00",
"tax_rate": "9.00"
}
],
"tourist_tax": { "amount": "0.00", "based_on_guests": 0 },
"payments": []
}
https://your-app.example/hooks/mytourist
# Simulate a webhook on your own machine
curl -X POST http://localhost:3000/hooks/mytourist \
-d trigger=booking_checkin \
-d id=231920102956 \
-d 'roomtype[placed_in_room]=Room 6'
// Webhooks arrive as form fields, nested data as arrays
$trigger = $_POST['trigger'] ?? null;
if ($trigger === 'booking_checkin') {
$room = $_POST['roomtype']['placed_in_room'];
unlockDoor($room); // your own code
}
http_response_code(200); // anything else is retried
// Express: webhooks arrive as form fields
app.use(express.urlencoded({ extended: true }));
app.post('/hooks/mytourist', (req, res) => {
const { trigger, id } = req.body;
if (trigger === 'booking_created') {
notifyTeam(`New booking ${id}`); // your own code
}
res.sendStatus(200); // anything else is retried
});
{
"trigger": "booking_checkin",
"id": 231920102956,
"state": "confirmed",
"arrival": "2030-07-01",
"departure": "2030-07-04",
"roomtype": { "placed_in_room": "Room 6" },
"access_code": "4711",
"checkin_at": "2030-07-01 15:42:10"
}
Stop polling. Pick a trigger and an https URL in MyTourist, and on every event we send a POST with the trigger field and the full data. For a booking, that is the same data you get when you fetch a booking.
Reply with 200 and the delivery counts as done. Otherwise we retry after 5, 15 and 60 minutes. Tip: test with webhook.site first.
booking_created
A booking has been created
booking_updated
A booking has been changed
booking_cancelled
A booking has been cancelled
booking_checkin
A guest has checked in
booking_checkout
A guest has checked out
debtor_created
A debtor has been created
debtor_updated
A debtor has been changed
payment_received
A payment has been received
A few ideas to get started. Under every card you see the route through the API.
Check availability and rates, create the booking and fetch the invoice, right inside your own website or app.
GET /availability
POST /bookings
Create a code in your lock system for every new booking and write it back to access_code, so it shows up in the guest email.
booking_created
POST /bookings/{id}
Post sales from the bar or shop as product lines on the guest invoice and book the payment.
POST /invoices/{id}/lines
POST /invoices/{id}/payments
Pull bookings, invoices and payments per period and report your own way.
GET /bookings
GET /invoices/payments
Schedule a clean as soon as a guest checks out, in the planning tool your team already uses.
booking_checkout
GET /bookings/current-bookings
Send new guests straight to your CRM or mailing tool and keep their details up to date there.
debtor_created
debtor_updated
In MyTourist under Connections > API. One token per company profile, and resettable: the old one stops immediately.
There is no separate sandbox. Create a trial profile and ask Support to enable the API and webhooks there.
Load the Postman collection or openapi.json. Recent API calls shows your traffic, refreshed every 10 seconds.
At most 10 requests per 10 seconds. Cache what you need often and you stay well under the limit.
No account yet? First have a look at the MyTourist pricing.
No credit card needed
Rather see how it works first? Watch the live demo