The PynBooking API is organized around REST. Our API accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes and Bearer token authentication.
One unified platform for hotel management, restaurant operations, and online bookings.
The PynBooking API uses Bearer tokens to authenticate requests. You can generate a new access token by providing your API credentials.
All API requests must include an Authorization header with your Bearer token. Tokens are valid for 1 hour after generation.
Always send authorization requests with valid credentials. Sending requests with missing or incorrect credentials returns a 401 Unauthorized error message, which increases processing overhead and introduces latency.
Consider the following best practices when implementing credential-based authentication:
Token-based authentication offers improved security and performance compared to sending credentials with each request.
Implementation steps:
Returns an object containing the access token and its expiration timestamp. The token expires after 1 hour.
Authorization header.curl -X POST https://api-access-service.pynbooking.com/access-token/generate \
-H "Content-Type: application/json" \
-d '{
"clientId": "your-client-id",
"clientSecret": "your-client-secret"
}'
{
"status": "ok",
"data": {
"accessToken": "eW91ci1jbGllbnQtaWQ.a8f2e9b1...",
"expiresAt": "2026-03-18T13:34:56Z"
}
}
All API endpoints follow these conventions. Ensure your requests conform to these standards for consistent behavior.
YYYY-MM-DD — All date fields use ISO 8601 date format. Example: 2026-03-18ISO 4217 — Three-letter currency codes. Example: RON, EUR, USDISO 639-1 — Two-letter language codes. Example: EN, RO, DEBase URL
https://api.pynbooking.com
Content-Type
application/json
Authorization
Authorization: Bearer <token>
Returns all reservations for the current date, regardless of check-in status.
This endpoint is the primary way to get a real-time view of today's room occupancy. It returns every reservation scheduled for today — confirmed, pending, or already checked in. Use it to drive front-desk dashboards, coordinate housekeeping assignments, manage room occupancy, and power guest-facing kiosks. The response includes guest contact details and room assignments, allowing integrations to personalize the arrival experience or trigger automated welcome messages.
This endpoint takes no request parameters. It automatically returns all reservations for today's date.
An enveloped JSON response containing an array of reservation objects for today's date.
YYYY-MM-DD format.YYYY-MM-DD format.Confirmata (confirmed), Anulata (cancelled), Pending.true if checked in, false if still expected.guestId, guestName, and guestPhone.checkIn field to filter arrivals from in-house guests.curl https://api.pynbooking.com/reservation/list/ \
-H "Authorization: Bearer YOUR_TOKEN"
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": [
{
"id": "2787",
"checkInDate": "2026-03-18",
"checkOutDate": "2026-03-21",
"reservationType": 1,
"roomName": "103",
"roomId": "3",
"roomType": "Dubla",
"roomTypeId": "1",
"source": "Individual",
"propertyName": "Hotel Panoramic",
"propertyId": "1",
"status": "Confirmata",
"checkIn": true,
"guestId": "4268",
"guestName": "Maria Popescu",
"guestPhone": "+40 740 123 456",
"guests": [
{
"guestId": "4268",
"guestName": "Maria Popescu",
"guestPhone": "+40 740 123 456"
}
]
}
]
}
Retrieves today's reservation for a specific room number.
Use this endpoint when you need to look up who is staying in a particular room — for example, when a guest orders room service, when housekeeping reports a maintenance issue, or when a POS terminal needs to charge a room. By providing the room number, you get back the active reservation with full guest details, allowing your system to identify the guest and post charges to the correct folio without manual lookup.
"401", "Suite A").An enveloped JSON response containing reservation data for the specified room. The response structure matches the List Today's Reservations endpoint, filtered to the requested room.
YYYY-MM-DD format.YYYY-MM-DD format.Confirmata, Anulata, or Pending.guestId, guestName, and guestPhone.data array will be empty. This does not indicate an error — the room may simply be unoccupied today.curl -X POST https://api.pynbooking.com/reservation/roomSearch/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"roomNo": "401"
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": [
{
"id": "2790",
"checkInDate": "2026-03-17",
"checkOutDate": "2026-03-20",
"reservationType": 1,
"roomName": "401",
"roomId": "8",
"roomType": "Suite",
"roomTypeId": "3",
"source": "Individual",
"propertyName": "Hotel Panoramic",
"propertyId": "1",
"status": "Confirmata",
"checkIn": true,
"guestId": "4312",
"guestName": "Ion Dumitrescu",
"guestPhone": "+40 721 555 789",
"guests": [
{
"guestId": "4312",
"guestName": "Ion Dumitrescu",
"guestPhone": "+40 721 555 789"
}
]
}
]
}
Retrieves all active reservations that overlap with a specified date range.
Use this endpoint for operational planning and forecasting. Unlike the today-only List Today's Reservations endpoint, this allows you to look ahead and retrieve reservations for any future date range — up to 31 days. This is essential for staffing decisions, revenue forecasting, housekeeping schedules, and preparing for high-occupancy periods. You can optionally filter by room number to check a specific room's upcoming bookings.
YYYY-MM-DD.31.An enveloped JSON response containing an array of reservation objects matching the search criteria. Includes all fields from List Today's Reservations plus additional booking details.
curl -X POST https://api.pynbooking.com/reservation/search/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"date": "2026-03-18",
"days": 7
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": [
{
"id": "2787",
"checkInDate": "2026-03-18",
"checkOutDate": "2026-03-21",
"reservationType": 1,
"roomName": "103",
"roomId": "3",
"roomType": "Dubla",
"roomTypeId": "1",
"source": "Individual",
"total_price": "8775.00",
"propertyName": "Hotel Panoramic",
"propertyId": "1",
"status": "Confirmata",
"checkIn": false,
"guestId": "4268",
"guestName": "Maria Popescu",
"guestPhone": "+40 740 123 456",
"guestEmail": "maria.popescu@email.com",
"guests": [
{
"guestId": "4268",
"guestName": "Maria Popescu",
"guestPhone": "+40 740 123 456",
"guestEmail": "maria.popescu@email.com"
}
]
},
{
"id": "2801",
"checkInDate": "2026-03-20",
"checkOutDate": "2026-03-22",
"reservationType": 1,
"roomName": "205",
"roomId": "5",
"roomType": "Dubla",
"roomTypeId": "1",
"source": "Individual",
"total_price": "4500.00",
"propertyName": "Hotel Panoramic",
"propertyId": "1",
"status": "Confirmata",
"checkIn": false,
"guestId": "4290",
"guestName": "Alexandru Ionescu",
"guestPhone": "+40 755 321 987",
"guestEmail": "alexandru.ionescu@email.com",
"guests": []
}
]
}
Retrieves all invoices issued within a specified date range.
This endpoint is critical for financial reporting, accounting integrations, and tax compliance. It returns complete invoice data including supplier and client details, line items with VAT breakdowns, payment methods, and totals. Use it to synchronize invoice data with external accounting software, generate financial reports, or audit billing records. The maximum date range is 31 days — for longer periods, make multiple paginated requests with consecutive date ranges.
YYYY-MM-DD.YYYY-MM-DD. Maximum 31 days from startDate.An enveloped JSON response containing an array of invoice objects with full financial details.
"RON", "EUR").name, id (VAT/company ID), sec_vat_id, country.name, type ("PF" for individual, "PJ" for company), id, district, city, address, country, pms_id."Card", "Cash", "Transfer").item_name, item_type, qty, unit_price, price, vat (%), net_price, vat_price, extra_details.price (gross), net_price (net), vat_price (total VAT).curl -X POST https://api.pynbooking.com/invoice/list/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"startDate": "2026-03-01",
"endDate": "2026-03-18"
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": [
{
"number": "INV-2026-0451",
"date": "2026-03-15",
"currency": "RON",
"supplier": {
"name": "Hotel Panoramic SRL",
"id": "RO12345678",
"country": "RO"
},
"client": {
"name": "Maria Popescu",
"type": "PF",
"country": "RO"
},
"payment_method": "Card",
"items": [
{
"item_name": "Accommodation - Double Room",
"qty": 3,
"unit_price": 350,
"price": 1050,
"vat": 9,
"net_price": 963.30,
"vat_price": 86.70
}
],
"total": {
"price": 1050,
"net_price": 963.30,
"vat_price": 86.70
}
}
]
}
Posts multiple charges to a guest's room folio in a single request.
When a guest orders several items at once — for example, multiple drinks at the bar or a full room service order — use this endpoint to post all charges in a single API call instead of making individual requests. This reduces network overhead and ensures all items from the same transaction are posted atomically. Each item in the array requires its own name, price, VAT rate, and quantity. The source system identifier (apiSource) helps track where the charges originated for end-of-day reconciliation.
itemName (string), price (number), vat (number), quantity (number). Optionally include apiSource (string) per item.An enveloped JSON response containing a map of array indices to the created folio item IDs.
curl -X POST https://api.pynbooking.com/reservation/addFolioItems/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "2787",
"items": [
{
"itemName": "Espresso",
"price": 12,
"vat": 9,
"quantity": 2,
"apiSource": "BAR"
},
{
"itemName": "Cappuccino",
"price": 15,
"vat": 9,
"quantity": 1,
"apiSource": "BAR"
}
]
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": {
"folioItems": {
"1": 18453,
"2": 18454
}
}
}
Retrieves all open accounts (company contracts, corporate accounts) that can receive charges.
In addition to room folios, PynBooking supports open billing accounts — typically used for corporate clients, travel agencies, or long-term contracts. These accounts allow you to post charges that are not tied to a specific reservation. Use this endpoint to retrieve available accounts before posting items via Add Charges to Account. The soldHash returned for each account is required as a security token when posting charges. Results are paginated at 100 records per page.
1.An enveloped JSON response containing an array of open account objects.
id parameter when posting charges."Corporate - Acme Corp").null for company accounts.null for individual accounts.id and soldHash are required when posting charges to an account. The hash acts as a verification token to prevent unauthorized charges.curl -X POST https://api.pynbooking.com/sold/list/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"page": 1
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": [
{
"id": "501",
"soldName": "Corporate - Acme Corp",
"soldHash": "a1b2c3d4e5f6...",
"clientName": null,
"companyName": "Acme Corp SRL"
},
{
"id": "502",
"soldName": "Travel Agency - SunTravel",
"soldHash": "f6e5d4c3b2a1...",
"clientName": null,
"companyName": "SunTravel SRL"
}
]
}
Posts charges to an open billing account (company or contract account).
This endpoint works similarly to Add Charges to Reservation, but targets open accounts instead of room reservations. Use it to charge products and services to corporate accounts, travel agency accounts, or other contract-based billing accounts. You must first retrieve the account's id and soldHash from List Billing Accounts. The hash is required as a security measure to prevent unauthorized charges to accounts.
itemName (string), price (number), vat (number), quantity (number). Optionally include apiSource (string).An enveloped JSON response containing a map of array indices to the created folio item IDs.
soldHash must match the account's current hash. If the hash is incorrect or has changed, the request will fail with a validation error.curl -X POST https://api.pynbooking.com/sold/addFolioItems/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "501",
"soldHash": "a1b2c3d4e5f6...",
"items": [
{
"itemName": "Conference Room - Full Day",
"price": 500,
"vat": 19,
"quantity": 1,
"apiSource": "EVENTS"
},
{
"itemName": "Catering - Lunch Package",
"price": 45,
"vat": 9,
"quantity": 20,
"apiSource": "EVENTS"
}
]
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": {
"folioItems": {
"1": 18460,
"2": 18461
}
}
}
Retrieves all reservations with a specific meal inclusion for a given date.
This endpoint is essential for kitchen and F&B operations. It returns a list of all guests entitled to a particular meal (breakfast, lunch, or dinner) on a specific date, based on their reservation's meal plan. Use it to forecast how many covers to prepare, verify guest entitlements at the restaurant entrance, and plan food procurement. The response includes guest counts (adults and children separately), room assignments, and barcode data that can be used for meal validation at access points.
YYYY-MM-DD.breakfast, lunch, dinner.An enveloped JSON response containing an array of reservation objects that include the specified meal.
"Breakfast", "Half Board", "Full Board").barcode (string) and poolAccess (boolean) — used for meal validation and pool access tracking.adultNo and childNo fields to calculate total covers. Sum across all results to get the expected guest count for the meal service.curl -X POST https://api.pynbooking.com/reservation/reportMealPlan/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"date": "2026-03-18",
"meal": "breakfast"
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": [
{
"id": "2787",
"roomName": "103",
"checkInDate": "2026-03-17",
"checkOutDate": "2026-03-20",
"nights": 3,
"mealPlan": "Breakfast",
"adultNo": 2,
"childNo": 0,
"guestName": "Maria Popescu",
"barcodes": [
{
"barcode": "BRC-2787-001",
"poolAccess": true
},
{
"barcode": "BRC-2787-002",
"poolAccess": true
}
]
}
]
}
Retrieves meal plan data across a multi-day period, up to 30 days.
This is the extended version of the Daily Meal Plan Report. Instead of querying a single date and meal type, this endpoint returns all meal-inclusive reservations across a date range. It is designed for weekly or monthly planning — use it to forecast F&B demand, prepare purchasing orders, and schedule kitchen staff. The response includes additional guest details (first name, last name, email, phone) compared to the daily report, making it useful for pre-arrival communication about dining arrangements.
YYYY-MM-DD.30.An enveloped JSON response containing an array of enhanced reservation objects with full guest contact details.
YYYY-MM-DD format.barcode and poolAccess fields.curl -X POST https://api.pynbooking.com/reservation/reportMealPlanPeriod/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"date": "2026-03-18",
"days": 7
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": [
{
"id": "2787",
"roomName": "103",
"checkInDate": "2026-03-17",
"checkOutDate": "2026-03-20",
"nights": 3,
"mealPlan": "Half Board",
"adultNo": 2,
"childNo": 1,
"guestFirstName": "Maria",
"guestLastName": "Popescu",
"guestPhone": "+40 740 123 456",
"guestEmail": "maria.popescu@email.com",
"barcodes": [
{
"barcode": "BRC-2787-001",
"poolAccess": true
}
],
"extraMeals": null
}
]
}
Retrieves guest email addresses for marketing and communication purposes.
This endpoint provides access to guest email addresses for building marketing campaigns, sending newsletters, or triggering automated post-stay communications. You can filter by guest status — retrieve all guests, only in-house guests, arrivals for a specific date, or departures. This allows you to send targeted messages such as pre-arrival information, in-stay offers, or post-checkout feedback requests. Results are paginated, supporting up to 5000 records per page for bulk exports.
"" (all guests), "inhouse" (currently in-house), "arrival" (arriving on a date), "departure" (departing on a date). Defaults to ""."arrival" or "departure" status filters. Format: YYYY-MM-DD. Ignored for other statuses.1.5000. Defaults to 1000.An enveloped JSON response containing an array of guest contact records.
"RO", "DE").YYYY-MM-DD format, if available.curl -X POST https://api.pynbooking.com/marketing/emailList/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "inhouse",
"page": 1,
"perPage": 100
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": [
{
"firstName": "Maria",
"lastName": "Popescu",
"email": "maria.popescu@email.com",
"country": "RO",
"dateOfBirth": "1985-06-15",
"marketing_consent": "0"
},
{
"firstName": "Hans",
"lastName": "Mueller",
"email": "hans.m@example.de",
"country": "DE",
"dateOfBirth": "1978-11-02",
"marketing_consent": "0"
}
]
}
Retrieves guest phone numbers for SMS campaigns and direct communication.
This endpoint works identically to List Guest Emails but returns phone numbers instead. The phone number is split into two fields — the country code prefix and the local number — making it easy to format for international SMS gateways. Use the same status filters (all, in-house, arrival, departure) to target the right guest segment for your communication.
"" (all), "inhouse", "arrival", "departure". Defaults to ""."arrival" or "departure" filters. Format: YYYY-MM-DD.1.5000. Defaults to 1000.An enveloped JSON response containing guest records with phone numbers.
"+40" for Romania, "+49" for Germany).YYYY-MM-DD format, if available.phone_country_code + phone. Example: "+40" + "740123456" = "+40740123456".curl -X POST https://api.pynbooking.com/marketing/phoneList/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "arrival",
"date": "2026-03-18",
"page": 1,
"perPage": 100
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": [
{
"firstName": "Maria",
"lastName": "Popescu",
"phone": "740123456",
"phone_country_code": "+40",
"country": "RO",
"dateOfBirth": "1985-06-15"
},
{
"firstName": "Hans",
"lastName": "Mueller",
"phone": "1511234567",
"phone_country_code": "+49",
"country": "DE",
"dateOfBirth": "1978-11-02"
}
]
}
Retrieves all sales transactions (bills) from the restaurant POS system within a date range.
Use this endpoint to pull detailed sales data from PynBooking's restaurant module for financial reconciliation, accounting integrations, or business analytics. Each result represents a closed bill and includes the full breakdown of ordered items with pricing, VAT, table assignment, and store (kitchen/bar) origin. This is the primary endpoint for synchronizing restaurant revenue data with external accounting or ERP systems. The maximum query range is 31 days — for longer periods, make consecutive requests.
YYYY-MM-DD.YYYY-MM-DD. Maximum 31 days from startDate.An enveloped JSON response containing an array of bill objects.
"bill".YYYY-MM-DD format.YYYY-MM-DD HH:MM:SS format."RON", "EUR").name, id (VAT number), sec_vat_id (trade registry), country."Numerar" for cash, "Card").item_name, item_code, store_id, store_name (kitchen/bar origin), table_id, table_name, table_group (restaurant zone), qty, unit_price, price (gross), vat (%), net_price, vat_price, extra_details.vat, price, net_price, vat_price.price (gross), net_price (net), vat_price (total VAT).endDate must not exceed 31 days from startDate, otherwise the request will fail with a validation error.curl -X POST https://api.pynbooking.com/pos/sales/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"startDate": "2026-03-01",
"endDate": "2026-03-15"
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": [
{
"number": "96461",
"doc_type": "bill",
"date": "2026-03-06",
"full_date": "2026-03-06 17:15:43",
"currency": "RON",
"supplier": {
"name": "Restaurant Panoramic SRL",
"id": "RO12345678",
"sec_vat_id": "J08/2776/1994",
"country": "ro"
},
"payment_method": "Numerar",
"items": [
{
"item_name": "Spaghete Carbonara 350g",
"item_code": "102164",
"store_id": "1",
"store_name": "BUCATARIE",
"table_id": "7",
"table_name": "07",
"table_group": "Terasa",
"qty": "1.00",
"unit_price": "22.52",
"price": 25,
"vat": "11",
"net_price": "22.52",
"vat_price": "2.48",
"extra_details": ""
},
{
"item_name": "Cotlet de Berbecut cu Legume 200g/250g",
"item_code": "102199",
"store_id": "1",
"store_name": "BUCATARIE",
"table_id": "7",
"table_name": "07",
"table_group": "Terasa",
"qty": "1.00",
"unit_price": "63.06",
"price": 70,
"vat": "11",
"net_price": "63.06",
"vat_price": "6.94",
"extra_details": ""
}
],
"subtotal": [
{
"vat": 11,
"price": "95.00",
"net_price": "85.58",
"vat_price": "9.42"
}
],
"total": {
"price": "95.00",
"net_price": "85.58",
"vat_price": "9.42"
}
}
]
}
Retrieves comprehensive property information including rooms, rate plans, images, facilities, and policies.
This is the primary endpoint for building a booking interface. It returns the full property profile — contact details, location, room types with capacity and pricing, rate plans with per-night breakdowns, images, facilities, policies, discounts, children policies, and extra adult rates. When check-in and check-out dates are provided along with a currency, the response includes real-time pricing and availability for each room/plan combination. Without dates, only static content is returned (rooms, facilities, policies) without pricing.
EN, RO.YYYY-MM-DD. Include both checkin and checkout to receive pricing data.YYYY-MM-DD.RON, EUR. Defaults to property's base currency.An enveloped JSON response containing the full property profile nested under the property ID.
Name, Stars, City, Address, Latitude, Longitude, Email, Phone, CheckinStart, CheckinEnd, HotelCurrency, PaymentTypes.ID, Name, MaxPeople, Surface, and Plans with pricing breakdowns.checkin and checkout to get real-time pricing and availability.curl -X POST https://api.pynbooking.com/be/hotel/info/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"hotelId": 3745,
"language": "EN",
"checkin": "2026-09-20",
"checkout": "2026-09-22",
"currency": "RON"
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": {
"hotel": {
"3745": {
"Details": {
"ID": "3745",
"Name": "CLOUD 5",
"Stars": "5",
"City": "Brașov",
"Address": "42, DreamLand",
"Latitude": "45.653883",
"Longitude": "25.638210",
"Email": "office@hotel.com",
"Phone": "+40745000000",
"HotelCurrency": "RON",
"CheckinStart": "14:00",
"CheckinEnd": "22:00"
},
"Rooms": {
"6829": {
"ID": 6829,
"Name": "Double Room",
"MaxPeople": 3,
"Surface": 20,
"Plans": {
"1": {
"ID": "1",
"Name": "Room Only",
"HavePrice": 1,
"Valid": 1,
"StandardPrices": {
"Nights": 2,
"TotalPrice": 460,
"MediumPrice": 230,
"Days": {
"2026-09-20": 230,
"2026-09-21": 230
}
}
}
}
}
},
"Facilities": {},
"Policies": {},
"Images": {}
}
}
}
}
Retrieves all available meal plan types for the property.
Returns the list of rate plans (meal plan options) configured for the property. Each plan has an ID, name, associated meal type, and a non-refundable flag. Use the plan IDs when querying availability or creating bookings. Non-refundable plans typically offer lower prices but cannot be cancelled or modified after booking.
An enveloped JSON response containing an array of plan type objects.
true means the booking cannot be cancelled for a refund.curl -X POST https://api.pynbooking.com/be/hotel/plan_types/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"hotelId": 3745
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": {
"PlanTypes": [
{
"ID": "1",
"Name": "Room Only",
"MealID": "1",
"MealName": "Room Only",
"Non-refundable": false
},
{
"ID": "2",
"Name": "Breakfast Included",
"MealID": "2",
"MealName": "Breakfast Included",
"Non-refundable": false
},
{
"ID": "6",
"Name": "Non-refundable Breakfast",
"MealID": "2",
"MealName": "Breakfast Included",
"Non-refundable": true
}
]
}
}
Retrieves daily availability and pricing for a specific room and rate plan across an entire month.
Use this endpoint to build availability calendars. It returns per-day data for a given room type and rate plan combination, including the number of available rooms, whether the date is closed for sale, minimum stay restrictions, arrival/departure restrictions, and the nightly price after any discounts. The response also includes a calendar grid (rows) organized by weeks for easy UI rendering.
2026.RON, EUR.EN.An enveloped JSON response with daily availability data.
date, disp (available count), closed (0/1), min_stay, no_arrivals (0/1), no_departures (0/1), price, discount.price of 0 means no rate is configured for that date. A closed value of 1 means the date is blocked for sale. When no_arrivals is 1, check-in is not allowed on that date.curl -X POST https://api.pynbooking.com/be/hotel/room_availability/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"hotelId": 3745,
"month": 9,
"year": 2026,
"roomId": 6829,
"planId": 1,
"currency": "RON",
"language": "EN"
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": {
"month": "September",
"year": "2026",
"lastDay": 30,
"rooms": {
"2026-09-01": {
"date": "2026-09-01",
"disp": "6",
"closed": 0,
"min_stay": 0,
"no_arrivals": 0,
"no_departures": 0,
"price": 230,
"discount": 0
},
"2026-09-02": {
"date": "2026-09-02",
"disp": "6",
"closed": 0,
"min_stay": 0,
"no_arrivals": 0,
"no_departures": 0,
"price": 230,
"discount": "22.50"
}
}
}
}
Validates a voucher code and returns applicable discounts for the specified dates.
Use this endpoint to check whether a promotional voucher code is valid for a given stay period. If valid, the response includes the discount percentage and which rooms and rate plans the voucher applies to. This should be called before creating a booking with a voucher to verify eligibility and show the guest the discount they will receive. Invalid or expired codes return a Status of -1 with an error message.
YYYY-MM-DD.YYYY-MM-DD.An enveloped JSON response with voucher validation result.
1 = valid, -1 = invalid."1" if the voucher applies to rooms."1" if the voucher applies to offers.curl -X POST https://api.pynbooking.com/be/hotel/voucher/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"hotelId": 3745,
"voucherCode": "SUMMER2026",
"checkin": "2026-09-20",
"checkout": "2026-09-22"
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": {
"Status": 1,
"ID": "1228",
"Code": "SUMMER2026",
"Name": "Summer Promo",
"StartDate": "2026-06-01",
"EndDate": "2026-09-30",
"AppliedForRooms": "1",
"AppliedForOffers": "1",
"Percent": "10",
"Offers": [],
"Rooms": {}
}
}
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": {
"Status": -1,
"Message": "The code 'INVALIDCODE' does not exist"
}
}
Retrieves available add-on services that guests can purchase during booking.
Returns the catalog of extra services (airport transfers, spa treatments, room upgrades, etc.) that can be added to a booking. Each service includes its name, category, description, pricing, and an optional image. Use the service IDs when including extras in the Create Booking request. The Type field indicates the pricing model: per stay, per night, per person, or per person per night.
An enveloped JSON response containing a map of extra service objects.
"1"=per stay, "2"=per night, "3"=per person, "4"=per person/night."0" or "1". If "1", an image URL is available in Url.Picture is "1"."1" if the service is available.curl -X POST https://api.pynbooking.com/be/hotel/extra_services/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"hotelId": 3745
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": {
"extra_services": {
"863": {
"Name": "Airport Transfer",
"CategoryName": "Transfers",
"Description": "Transport from the nearest airport",
"Type": "2",
"Price": "12.00",
"Rooms": "",
"Picture": "1",
"Extension": "jpg",
"Url": "https://d3hj7i5wny7p5d.cloudfront.net/products/55/863/863.jpg",
"Active": "1"
},
"862": {
"Name": "Fitness",
"CategoryName": "Other Services",
"Description": "Access to the modern fitness room",
"Type": "4",
"Price": "15.00",
"Rooms": "",
"Picture": "1",
"Extension": "jpg",
"Url": "https://d3hj7i5wny7p5d.cloudfront.net/products/54/862/862.jpg",
"Active": "1"
}
}
}
}
Retrieves guest reviews and rating scores for the property.
Returns all guest reviews for the property, including positive and negative comments, hotel replies, ratings across multiple categories, and overall scores. Use this to display social proof on your booking interface. Each review includes the guest's first name, country, check-in date, and individual category scores (n1-n16). The overall score is in the nota field (scale 1-5).
EN.An enveloped JSON response with reviews and aggregate scores.
ID, Positive, Negative, Reply, CheckIn, Date, FirstName, CountryCode, CountryName, nota, and category scores n1-n16.curl -X POST https://api.pynbooking.com/be/hotel/reviews/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"hotelId": 3745,
"language": "EN"
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": {
"Reviews": [
{
"ID": "187664",
"Positive": "Perfect location, very clean rooms!",
"Negative": "",
"Reply": "",
"CheckIn": "2026-08-15",
"Date": "2026-08-20 15:03:47",
"FirstName": "Maria",
"CountryCode": "ro",
"CountryName": "Romania",
"nota": "5"
}
],
"ReviewsNo": 1
}
}
Creates a new reservation in pending state.
This endpoint creates a new booking that starts in pending state. It must be confirmed using the Confirm Booking or Confirm Paid endpoint to become active. The request requires full guest details, room selections with per-night pricing, and the total price. For non-refundable plans with online payment configured, the response may include a paymentGatewayRedirectUrl to redirect the guest for payment processing. The password returned is needed for cancellation.
YYYY-MM-DD.YYYY-MM-DD.RO.rooms[].price values.roomId (int), planId (int), offerId (int, optional), quantity (int), price (float), noGuests (int), pricePerDay (object mapping dates to prices), voucherCode (string, optional), voucherDiscount (float, optional), products (array, optional).false for new bookings. Use Confirm Booking to activate.totalPrice must exactly match the sum of all rooms[].price values. Mismatched totals will result in a validation error.Depending on the property's configuration and the selected rate plans, booking confirmation and payment handling may differ:
With payment processor configured — You can send a confirmUrl parameter in your request. In the booking response, you will receive a paymentGatewayRedirectUrl where the guest can be redirected to complete the payment.
Without using the hotel's payment processor — You may handle the payment through your own method. The booking must be confirmed only after payment has been collected.
Automatic Confirmation — If the property does not use pre-authorization with card details, the reservation will be confirmed automatically once the booking request is submitted.
Pre-authorization Enabled — If the property uses pre-authorization, the reservation must be confirmed through the Confirm Booking endpoint. No immediate payment is required at booking time, but the hotel will finalize confirmation after validating the pre-authorization.
confirmUrl is used with non-refundable plans, the guest must be redirected immediately to complete the payment. If you bypass the hotel's payment processor, ensure you confirm the booking only after funds are secured.curl -X POST https://api.pynbooking.com/be/booking/add/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"hotelId": 3745,
"arrivalDate": "2026-09-20",
"departureDate": "2026-09-22",
"guestName": "Elena Marinescu",
"guestEmail": "elena@example.com",
"guestPhone": "+40740555888",
"guestCountryCode": "RO",
"guestAddress": "Str. Exemplu 10",
"currency": "RON",
"language": "RO",
"totalPrice": 460,
"rooms": [{
"roomId": 6829,
"planId": 1,
"quantity": 1,
"price": 460,
"noGuests": 2,
"pricePerDay": {
"2026-09-20": 230,
"2026-09-21": 230
}
}]
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": {
"id": 98765,
"password": "amt413",
"isConfirmed": false,
"paymentGatewayRedirectUrl": "https://secure.pynbooking.direct/saferpay/610172/b09928eaf517411c35e037014261141/" // optional — present only for non-refundable plans with payment processor
}
}
Confirms a pending reservation for "pay at hotel" bookings.
Finalizes a booking that was created with the Create Booking endpoint. This changes the status from pending to confirmed and triggers the guest confirmation email. Use this for bookings where payment will be collected at check-in. For bookings that require online payment, use the Confirm Paid endpoint instead. This endpoint does not capture any payment — it only confirms the reservation.
true when the booking has been successfully confirmed.curl -X POST https://api.pynbooking.com/be/booking/confirmBooking/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"bookId": 98765,
"hotelId": 3745
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": {
"isConfirmed": true
}
}
Marks a booking as paid after funds have been collected.
Use this endpoint to confirm a booking where payment was collected via a payment processor or external payment method. This marks the reservation as both confirmed and paid, which is the final state for prepaid bookings. Typically called after the payment gateway callback confirms a successful transaction. This is different from Confirm Booking, which only confirms without marking as paid.
true when the booking has been successfully confirmed and marked as paid.curl -X POST https://api.pynbooking.com/be/booking/confirmPayed/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"bookId": 98765,
"hotelId": 3745
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": {
"isConfirmed": true
}
}
Cancels an existing reservation.
Cancels a confirmed or pending booking. Requires both the booking ID and the password that was returned when the booking was created. Cancellation is subject to the property's cancellation policy — for non-refundable bookings, the cancellation may still succeed but the guest will not receive a refund. After cancellation, the rooms become available for new bookings.
true when the booking has been successfully cancelled.curl -X POST https://api.pynbooking.com/be/booking/cancel/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"bookId": 98765,
"password": "amt413",
"hotelId": 3745
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": {
"isCanceled": true
}
}
Retrieves complete details of an existing booking.
Returns the full booking record including guest information, room assignments, rate plans, pricing, and current status. Use this to display booking confirmations, build management dashboards, or verify booking details before check-in. The response includes all rooms booked with their individual pricing and any extras added.
An enveloped JSON response containing the booking details.
ID, HotelID, Name, Address, CountryCode, Phone, Email, CheckIn, CheckOut, Nights, Rooms, Persons, Value, Currency, Status, Password.ID, RoomID, RoomName, PlanID, PlanName, Price, GuestNumber, Products.curl -X POST https://api.pynbooking.com/be/booking/info/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"bookId": 98765,
"hotelId": 3745
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": {
"book": {
"98765": {
"Details": {
"ID": "98765",
"HotelID": "3745",
"Name": "Elena Marinescu",
"Address": "Str. Exemplu 10",
"CountryCode": "RO",
"Phone": "+40740555888",
"Email": "elena@example.com",
"CheckIn": "2026-09-20",
"CheckOut": "2026-09-22",
"Nights": "2",
"Rooms": "1",
"Persons": "2",
"Value": "460",
"Currency": "RON",
"Status": "1",
"Password": "amt413"
},
"Rooms": {
"151848": {
"ID": "151848",
"RoomID": "6829",
"RoomName": "Double Room",
"PlanID": "1",
"PlanName": "Room Only",
"Price": "460",
"GuestNumber": "2",
"Products": {}
}
}
}
}
}
}
Retrieves affiliate account information and linked cities.
Returns the affiliate profile including company name, contact details, and the list of cities where affiliated properties are located. Each city includes coordinates and a URL slug for use with the City Hotels endpoint. This endpoint requires affiliate-level API credentials — standard property credentials will return an authentication error.
No body parameters required. Authentication determines the affiliate account.
An enveloped JSON response with affiliate profile and linked cities.
ID, Name, Latitude, Longitude, Url (slug), Apartments (count).AffiliateName, AffiliateUrl, Email, Phone, AffiliateType.curl -X POST https://api.pynbooking.com/be/affiliate/info/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": {
"cities": [
{
"ID": "199",
"Name": "Brașov",
"Latitude": "45.63334",
"Longitude": "25.58333",
"Url": "brasov",
"Apartments": "1"
}
],
"info": {
"AffiliateName": "Travel Agency",
"AffiliateUrl": "https://agency.com",
"Email": "contact@agency.com",
"Phone": "+40241752452",
"AffiliateType": "custom"
}
}
}
Retrieves all affiliated hotels in a specific city with optional availability.
Returns the list of hotels available in a city for the affiliate's portfolio. Each hotel includes basic details, images, and availability status. When check-in and check-out dates are provided, the response includes real-time availability counts and minimum pricing. The city parameter uses the URL slug from the Affiliate Details endpoint. This is the primary endpoint for building a city-level hotel listing page.
EN.YYYY-MM-DD.YYYY-MM-DD.An enveloped response with currency rates and a list of hotels.
Details, Images, Valid, Availability, MinPrice.curl -X POST https://api.pynbooking.com/be/affiliate/city_hotels/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"city": "brasov",
"language": "EN",
"checkin": "2026-09-20",
"checkout": "2026-09-22"
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": {
"rates": {
"EUR": "5.0937",
"GBP": "5.8986",
"USD": "4.427",
"RON": 1
},
"hotels": {
"3745": {
"Details": {
"Name": "CLOUD 5",
"Stars": "5",
"City": "Brașov"
},
"Images": {},
"Valid": 1,
"Availability": 13,
"MinPrice": 230
}
}
}
}
Retrieves current exchange rates relative to the property's base currency.
Returns live exchange rates for supported currencies (EUR, GBP, USD) relative to the property's base currency (RON = 1). Use these rates for client-side price conversion when displaying prices in the guest's preferred currency. Rates are updated daily by the National Bank.
An enveloped JSON response with exchange rates.
curl -X POST https://api.pynbooking.com/be/currency/rates/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"hotelId": 3745
}'
{
"version": "v2",
"status": "ok",
"requestId": "req_a1b2c3d4e5",
"data": {
"rates": {
"EUR": "5.0937",
"GBP": "5.8986",
"USD": "4.427",
"RON": 1
}
}
}
The PynBooking API uses conventional HTTP response codes to indicate the success or failure of an API request. Codes in the 2xx range indicate success, 4xx indicate client errors, and 5xx indicate server errors.
{
"version": "v2",
"status": "error",
"requestId": "req_a1b2c3d4e5",
"data": null,
"error": {
"message": "invalid credentials",
"code": "unauthorized"
}
}