PynBookingPynBooking API v2

PynBooking API Reference

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.

Authentication

Generate Access Token

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.

Credential-based authentication

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:

  • Store credentials securely (never in plaintext or client-side code).
  • Use environment variables for credential storage in development.
  • Use secrets management solutions in production environments.
  • Implement credential rotation policies.

Token-based authentication

Token-based authentication offers improved security and performance compared to sending credentials with each request.

Implementation steps:

  1. Generate a fresh token (JWT) using your API credentials.
  2. Include the token in subsequent API calls.
  3. Implement token renewal before expiration (every 1 hour).
  4. Handle token validation and errors appropriately.
POST /access-token/generate

Parameters

Body parameters
clientId string required
Your unique API client identifier. You can find this in your PynBooking dashboard under Settings → API Keys.
clientSecret string required
Your API client secret key. Keep this value secure and never expose it in client-side code.

Returns

Returns an object containing the access token and its expiration timestamp. The token expires after 1 hour.

Response body
data.accessToken string
The Bearer token to use in subsequent API requests. Include it in the Authorization header.
data.expiresAt string
ISO 8601 timestamp indicating when the token expires. Generate a new token before this time.
Rate limit — Maximum 10 token generations per hour per client. Cache and reuse your token until it expires.
POST /access-token/generate
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"
  }'
const response = await fetch('https://api-access-service.pynbooking.com/access-token/generate', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    clientId: 'your-client-id',
    clientSecret: 'your-client-secret'
  })
});
const data = await response.json();
$response = Http::post('https://api-access-service.pynbooking.com/access-token/generate', [
    'clientId'     => 'your-client-id',
    'clientSecret' => 'your-client-secret',
]);

$token = $response['data']['accessToken'];
import requests

response = requests.post(
    'https://api-access-service.pynbooking.com/access-token/generate',
    json={
        'clientId': 'your-client-id',
        'clientSecret': 'your-client-secret',
    }
)
token = response.json()['data']['accessToken']
Response 200 OK
{
  "status": "ok",
  "data": {
    "accessToken": "eW91ci1jbGllbnQtaWQ.a8f2e9b1...",
    "expiresAt": "2026-03-18T13:34:56Z"
  }
}

Conventions

All API endpoints follow these conventions. Ensure your requests conform to these standards for consistent behavior.

Data Formats

Formats
Datesformat
YYYY-MM-DD — All date fields use ISO 8601 date format. Example: 2026-03-18
Currencyformat
ISO 4217 — Three-letter currency codes. Example: RON, EUR, USD
Languageformat
ISO 639-1 — Two-letter language codes. Example: EN, RO, DE
Base Configuration
Base URL
https://api.pynbooking.com

Content-Type
application/json

Authorization
Authorization: Bearer <token>
PMS

PMS API

PMS API › Reservations

List Today's Reservations

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.

GET /reservation/list/

Parameters

This endpoint takes no request parameters. It automatically returns all reservations for today's date.

Returns

An enveloped JSON response containing an array of reservation objects for today's date.

Response fields
idstring
Unique reservation identifier. Use this ID when adding folio items or querying reservation details.
checkInDatestring
Arrival date in YYYY-MM-DD format.
checkOutDatestring
Departure date in YYYY-MM-DD format.
reservationTypeinteger
Numeric code identifying the reservation type (e.g., individual, group, corporate).
roomIdstring
Internal room identifier.
roomTypestring
Room category (e.g., "Dubla", "Single", "Suite").
roomTypeIdstring
Internal room type identifier.
roomNamestring
Assigned room number or name as configured in the PMS.
sourcestring
Booking source (e.g., "Individual", "Booking.com", "Expedia").
propertyNamestring
Property name this reservation belongs to.
propertyIdstring
Internal property identifier.
statusstring
Reservation status. Possible values: Confirmata (confirmed), Anulata (cancelled), Pending.
checkInboolean
Whether the guest has completed check-in. true if checked in, false if still expected.
guestIdstring
Primary guest unique identifier.
guestNamestring
Primary guest's full name.
guestPhonestring
Primary guest's phone number with country code.
guestsarray
Array of all guests on this reservation. Each object contains guestId, guestName, and guestPhone.
Note — This endpoint returns reservations for the current server date. It includes all reservations regardless of their check-in status — use the checkIn field to filter arrivals from in-house guests.
GET /reservation/list/
curl https://api.pynbooking.com/reservation/list/ \
  -H "Authorization: Bearer YOUR_TOKEN"
Response 200
{
  "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"
        }
      ]
    }
  ]
}
PMS API › Reservations

Find Reservation by Room

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.

POST /reservation/roomSearch/

Parameters

Body parameters
roomNostringrequired
The room number to search for. Must match the room name as configured in the PMS (e.g., "401", "Suite A").

Returns

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.

Response fields
idstring
Unique reservation identifier.
checkInDatestring
Arrival date in YYYY-MM-DD format.
checkOutDatestring
Departure date in YYYY-MM-DD format.
roomIdstring
Internal room identifier.
roomTypestring
Room category (e.g., "Dubla", "Single", "Suite").
roomTypeIdstring
Internal room type identifier.
roomNamestring
Room number matching the search query.
sourcestring
Booking source (e.g., "Individual", "Booking.com", "Expedia").
propertyNamestring
Property name this reservation belongs to.
propertyIdstring
Internal property identifier.
statusstring
Reservation status: Confirmata, Anulata, or Pending.
checkInboolean
Whether the guest has completed check-in.
guestNamestring
Primary guest's full name.
guestsarray
Array of guest objects with guestId, guestName, and guestPhone.
Note — If no reservation is found for the specified room, the data array will be empty. This does not indicate an error — the room may simply be unoccupied today.
POST /reservation/roomSearch/
curl -X POST https://api.pynbooking.com/reservation/roomSearch/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "roomNo": "401"
  }'
Response 200
{
  "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"
        }
      ]
    }
  ]
}
PMS API › Billing

List Invoices by Date Range

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.

POST /invoice/list/

Parameters

Body parameters
startDatestringrequired
Start date of the invoice period. Format: YYYY-MM-DD.
endDatestringrequired
End date of the invoice period. Format: YYYY-MM-DD. Maximum 31 days from startDate.

Returns

An enveloped JSON response containing an array of invoice objects with full financial details.

Response fields
numberstring
Invoice number as assigned by the PMS.
datestring
Invoice issue date.
currencystring
Currency code (e.g., "RON", "EUR").
supplierobject
Supplier (hotel) details: name, id (VAT/company ID), sec_vat_id, country.
clientobject
Client details: name, type ("PF" for individual, "PJ" for company), id, district, city, address, country, pms_id.
payment_methodstring
Payment method used (e.g., "Card", "Cash", "Transfer").
itemsarray
Line items, each with: item_name, item_type, qty, unit_price, price, vat (%), net_price, vat_price, extra_details.
subtotalarray
VAT-grouped subtotals for the invoice.
totalobject
Invoice totals: price (gross), net_price (net), vat_price (total VAT).
Important — The maximum date range is 31 days. Requests exceeding this limit will return an error.
POST /invoice/list/
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"
  }'
Response 200
{
  "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
        }
      }
    ]
}
PMS API › Billing

Add Charges to Reservation

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.

POST /reservation/addFolioItems/

Parameters

Body parameters
idstringrequired
Reservation identifier to charge.
itemsarrayrequired
Array of item objects. Each object must contain: itemName (string), price (number), vat (number), quantity (number). Optionally include apiSource (string) per item.

Returns

An enveloped JSON response containing a map of array indices to the created folio item IDs.

Response fields
folioItemsobject
A key-value map where each key is the item's 1-based index in the request array (as a string) and the value is the created folio item ID.
Note — All items are posted to the same reservation. To charge items to different reservations, make separate API calls.
POST /reservation/addFolioItems/
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"
      }
    ]
  }'
Response 200
{
  "version": "v2",
  "status": "ok",
  "requestId": "req_a1b2c3d4e5",
  "data": {
    "folioItems": {
      "1": 18453,
      "2": 18454
    }
  }
}
PMS API › Billing

List Billing Accounts

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.

POST /sold/list/

Parameters

Body parameters
pageintegeroptional
Page number for pagination (1-based). Each page returns up to 100 records. Defaults to 1.

Returns

An enveloped JSON response containing an array of open account objects.

Response fields
idstring
Account identifier. Use this as the id parameter when posting charges.
soldNamestring
Display name of the account (e.g., "Corporate - Acme Corp").
soldHashstring
Security hash for the account. Required when posting charges via Add Charges to Account.
clientNamestring|null
Individual client name, if applicable. null for company accounts.
companyNamestring|null
Company name, if applicable. null for individual accounts.
Note — Both id and soldHash are required when posting charges to an account. The hash acts as a verification token to prevent unauthorized charges.
POST /sold/list/
curl -X POST https://api.pynbooking.com/sold/list/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "page": 1
  }'
Response 200
{
  "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"
      }
    ]
}
PMS API › Billing

Add Charges to Account

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.

POST /sold/addFolioItems/

Parameters

Body parameters
idstringrequired
Account identifier from the List Billing Accounts endpoint.
soldHashstringrequired
Security hash for the account, obtained from List Billing Accounts.
itemsarrayrequired
Array of item objects. Each must contain: itemName (string), price (number), vat (number), quantity (number). Optionally include apiSource (string).

Returns

An enveloped JSON response containing a map of array indices to the created folio item IDs.

Response fields
folioItemsobject
A key-value map where each key is the item's 1-based index in the request array (as a string) and the value is the created item ID.
Important — The soldHash must match the account's current hash. If the hash is incorrect or has changed, the request will fail with a validation error.
POST /sold/addFolioItems/
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"
      }
    ]
  }'
Response 200
{
  "version": "v2",
  "status": "ok",
  "requestId": "req_a1b2c3d4e5",
  "data": {
    "folioItems": {
      "1": 18460,
      "2": 18461
    }
  }
}
PMS API › Meal Plans

Get Daily Meal Plan Report

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.

POST /reservation/reportMealPlan/

Parameters

Body parameters
datestringrequired
The date for the meal plan report. Format: YYYY-MM-DD.
mealstringrequired
Meal type to query. Accepted values: breakfast, lunch, dinner.

Returns

An enveloped JSON response containing an array of reservation objects that include the specified meal.

Response fields
idstring
Reservation identifier.
roomNamestring
Room number or name.
checkInDatestring
Arrival date.
checkOutDatestring
Departure date.
nightsinteger
Total number of nights for the reservation.
mealPlanstring
Description of the meal plan included in the reservation (e.g., "Breakfast", "Half Board", "Full Board").
adultNointeger
Number of adults in the reservation.
childNointeger
Number of children in the reservation.
guestNamestring
Primary guest's full name.
barcodesarray
Array of barcode objects, each with barcode (string) and poolAccess (boolean) — used for meal validation and pool access tracking.
Tip — Use the adultNo and childNo fields to calculate total covers. Sum across all results to get the expected guest count for the meal service.
POST /reservation/reportMealPlan/
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"
  }'
Response 200
{
  "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
          }
        ]
      }
    ]
}
PMS API › Meal Plans

Get Meal Plan Report by Period

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.

POST /reservation/reportMealPlanPeriod/

Parameters

Body parameters
datestringrequired
Start date of the period. Format: YYYY-MM-DD.
daysintegerrequired
Number of days to include in the report. Maximum value: 30.

Returns

An enveloped JSON response containing an array of enhanced reservation objects with full guest contact details.

Response fields
idstring
Reservation identifier.
roomNamestring
Room number or name.
checkInDate / checkOutDatestring
Arrival and departure dates in YYYY-MM-DD format.
nightsinteger
Total number of nights.
mealPlanstring
Meal plan description.
adultNo / childNointeger
Number of adults and children in the reservation.
guestFirstName / guestLastNamestring
Guest's first and last name (separate fields, unlike the daily report).
guestPhonestring
Guest phone number with country code.
guestEmailstring
Guest email address.
barcodesarray
Barcode objects with barcode and poolAccess fields.
extraMealsstring|null
Additional meal plan details, if applicable.
Important — The maximum period is 30 days. For longer forecasting, make multiple consecutive requests.
POST /reservation/reportMealPlanPeriod/
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
  }'
Response 200
{
  "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
      }
    ]
}
PMS API › Marketing

List Guest Emails

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.

POST /marketing/emailList/

Parameters

Body parameters
statusstringoptional
Filter guests by status. Values: "" (all guests), "inhouse" (currently in-house), "arrival" (arriving on a date), "departure" (departing on a date). Defaults to "".
datestringoptional
Target date for "arrival" or "departure" status filters. Format: YYYY-MM-DD. Ignored for other statuses.
pageintegeroptional
Page number for pagination (1-based). Defaults to 1.
perPageintegeroptional
Number of records per page. Maximum: 5000. Defaults to 1000.

Returns

An enveloped JSON response containing an array of guest contact records.

Response fields
firstNamestring
Guest's first name.
lastNamestring
Guest's last name.
emailstring
Guest's email address.
countrystring
Two-letter country code (e.g., "RO", "DE").
dateOfBirthstring
Guest's date of birth in YYYY-MM-DD format, if available.
marketing_consentstring
Guest's marketing consent status. "0" or empty string if not consented.
Important — Guest email data is subject to GDPR and data protection regulations. Ensure you have proper consent before using email addresses for marketing purposes. PynBooking requires you to register your data processing company name and request IP address.
POST /marketing/emailList/
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
  }'
Response 200
{
  "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"
      }
    ]
}
PMS API › Marketing

List Guest Phone Numbers

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.

POST /marketing/phoneList/

Parameters

Body parameters
statusstringoptional
Filter guests by status. Values: "" (all), "inhouse", "arrival", "departure". Defaults to "".
datestringoptional
Target date for "arrival" or "departure" filters. Format: YYYY-MM-DD.
pageintegeroptional
Page number for pagination. Defaults to 1.
perPageintegeroptional
Records per page. Maximum: 5000. Defaults to 1000.

Returns

An enveloped JSON response containing guest records with phone numbers.

Response fields
firstNamestring
Guest's first name.
lastNamestring
Guest's last name.
phonestring
Local phone number without country code prefix.
phone_country_codestring
International dialing prefix (e.g., "+40" for Romania, "+49" for Germany).
countrystring
Two-letter country code.
dateOfBirthstring
Guest's date of birth in YYYY-MM-DD format, if available.
Tip — To construct the full international number, concatenate phone_country_code + phone. Example: "+40" + "740123456" = "+40740123456".
POST /marketing/phoneList/
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
  }'
Response 200
{
  "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"
      }
    ]
}
Restaurant

Restaurant API

Restaurant API

Get Sales

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.

POST /pos/sales/

Parameters

Body parameters
startDatestringrequired
Start date of the sales range. Format: YYYY-MM-DD.
endDatestringrequired
End date of the sales range. Format: YYYY-MM-DD. Maximum 31 days from startDate.

Returns

An enveloped JSON response containing an array of bill objects.

Response fields — bill object
numberstring
Bill number as assigned by the POS system.
doc_typestring
Document type. Typically "bill".
datestring
Bill date in YYYY-MM-DD format.
full_datestring
Full timestamp of the bill in YYYY-MM-DD HH:MM:SS format.
currencystring
Currency code (e.g., "RON", "EUR").
supplierobject
Restaurant company details: name, id (VAT number), sec_vat_id (trade registry), country.
payment_methodstring
Payment method used (e.g., "Numerar" for cash, "Card").
itemsarray
Ordered items. Each contains: 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.
subtotalarray
VAT-grouped subtotals. Each contains vat, price, net_price, vat_price.
totalobject
Bill totals: price (gross), net_price (net), vat_price (total VAT).
Important — The maximum date range is 31 days. The endDate must not exceed 31 days from startDate, otherwise the request will fail with a validation error.
POST /pos/sales/
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"
  }'
Response 200
{
  "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"
        }
      }
    ]
}
Booking

Booking Engine

Booking EngineProperty API
Booking Engine › Property

Property Details

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.

POST /be/hotel/info/

Parameters

Body parameters
hotelIdintegerrequired
Property identifier.
languagestringrequired
ISO 639-1 language code for localized content. Example: EN, RO.
checkinstringoptional
Check-in date for pricing. Format: YYYY-MM-DD. Include both checkin and checkout to receive pricing data.
checkoutstringoptional
Check-out date for pricing. Format: YYYY-MM-DD.
currencystringoptional
ISO 4217 currency code for prices. Example: RON, EUR. Defaults to property's base currency.

Returns

An enveloped JSON response containing the full property profile nested under the property ID.

Response fields
Detailsobject
Property info: Name, Stars, City, Address, Latitude, Longitude, Email, Phone, CheckinStart, CheckinEnd, HotelCurrency, PaymentTypes.
Roomsobject
Keyed by roomId. Each room has ID, Name, MaxPeople, Surface, and Plans with pricing breakdowns.
Offersobject
Available special offers.
Imagesobject
Property images.
Facilitiesobject
Hotel amenities and services.
Servicesobject
Available services.
Policiesobject
Cancellation and booking policies.
Discountsobject
Early booking, last minute, and nights discounts.
Childrenobject
Children age policies.
Activitiesobject
Available activities.
Tip — Without dates you receive static content only (rooms, facilities, policies). Include checkin and checkout to get real-time pricing and availability.
POST /be/hotel/info/
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"
  }'
Response 200
{
  "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": {}
        }
      }
    }
}
Booking Engine › Property

Rate Plans

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.

POST /be/hotel/plan_types/

Parameters

Body parameters
hotelIdintegerrequired
Property identifier.

Returns

An enveloped JSON response containing an array of plan type objects.

Response fields
IDstring
Unique plan type identifier.
Namestring
Display name of the rate plan.
MealIDstring
Associated meal type identifier.
MealNamestring
Display name of the meal type.
Non-refundableboolean
Whether this plan is non-refundable. true means the booking cannot be cancelled for a refund.
POST /be/hotel/plan_types/
curl -X POST https://api.pynbooking.com/be/hotel/plan_types/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "hotelId": 3745
  }'
Response 200
{
  "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
      }
    ]
  }
}
Booking Engine › Property

Availability & Prices

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.

POST /be/hotel/room_availability/

Parameters

Body parameters
hotelIdintegerrequired
Property identifier.
monthintegerrequired
Month number (1-12).
yearintegerrequired
Four-digit year. Example: 2026.
roomIdintegerrequired
Room type ID from the Property Details response.
planIdintegerrequired
Rate plan ID from the Rate Plans endpoint.
currencystringrequired
ISO 4217 currency code. Example: RON, EUR.
languagestringrequired
ISO 639-1 language code. Example: EN.
offerIdintegeroptional
Offer ID to filter availability for a specific offer.

Returns

An enveloped JSON response with daily availability data.

Response fields
monthstring
Localized month name.
yearstring
Four-digit year.
lastDayinteger
Last day of the month.
roomsobject
Keyed by date. Each entry contains: date, disp (available count), closed (0/1), min_stay, no_arrivals (0/1), no_departures (0/1), price, discount.
Note — A 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.
POST /be/hotel/room_availability/
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"
  }'
Response 200
{
  "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"
        }
      }
    }
}
Booking Engine › Property

Validate Voucher

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.

POST /be/hotel/voucher/

Parameters

Body parameters
hotelIdintegerrequired
Property identifier.
voucherCodestringrequired
The voucher code to validate.
checkinstringrequired
Check-in date. Format: YYYY-MM-DD.
checkoutstringrequired
Check-out date. Format: YYYY-MM-DD.
currencystringoptional
ISO 4217 currency code.
languagestringoptional
ISO 639-1 language code.

Returns

An enveloped JSON response with voucher validation result.

Response fields
Statusinteger
1 = valid, -1 = invalid.
IDstring
Voucher identifier (when valid).
Codestring
The voucher code.
Percentstring
Discount percentage.
AppliedForRoomsstring
"1" if the voucher applies to rooms.
AppliedForOffersstring
"1" if the voucher applies to offers.
Messagestring
Error reason (when Status is -1).
POST /be/hotel/voucher/
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"
  }'
Response 200 Valid
{
  "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": {}
    }
}
Response 200 Invalid
{
  "version": "v2",
  "status": "ok",
  "requestId": "req_a1b2c3d4e5",
  "data": {
      "Status": -1,
      "Message": "The code 'INVALIDCODE' does not exist"
    }
}
Booking Engine › Property

Extra Services

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.

POST /be/hotel/extra_services/

Parameters

Body parameters
hotelIdintegerrequired
Property identifier.

Returns

An enveloped JSON response containing a map of extra service objects.

Response fields
Namestring
Service display name.
CategoryNamestring
Service category.
Descriptionstring
Service description.
Typestring
Pricing model: "1"=per stay, "2"=per night, "3"=per person, "4"=per person/night.
Pricestring
Service price.
Roomsstring
Blank if applies to all rooms.
Picturestring
"0" or "1". If "1", an image URL is available in Url.
Urlstring
Image URL if Picture is "1".
Activestring
"1" if the service is available.
POST /be/hotel/extra_services/
curl -X POST https://api.pynbooking.com/be/hotel/extra_services/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "hotelId": 3745
  }'
Response 200
{
  "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"
        }
      }
    }
}
Booking Engine › Property

Guest Reviews

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).

POST /be/hotel/reviews/

Parameters

Body parameters
hotelIdintegerrequired
Property identifier.
languagestringrequired
ISO 639-1 language code. Example: EN.

Returns

An enveloped JSON response with reviews and aggregate scores.

Response fields
Reviewsarray
Array of review objects. Each contains ID, Positive, Negative, Reply, CheckIn, Date, FirstName, CountryCode, CountryName, nota, and category scores n1-n16.
ReviewsNointeger
Total number of reviews.
Scoreobject
Aggregate rating breakdown.
POST /be/hotel/reviews/
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"
  }'
Response 200
{
  "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
    }
}
Booking EngineBooking API
Booking Engine › Booking

Create Booking

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.

POST /be/booking/add/

Parameters

Body parameters
hotelIdintegerrequired
Property identifier.
arrivalDatestringrequired
Check-in date. Format: YYYY-MM-DD.
departureDatestringrequired
Check-out date. Format: YYYY-MM-DD.
guestNamestringrequired
Full name of the primary guest.
guestEmailstringrequired
Guest's email address for booking confirmation.
guestPhonestringrequired
Guest's phone number with country prefix.
guestCountryCodestringrequired
ISO Alpha-2 country code. Example: RO.
guestAddressstringrequired
Guest's address.
guestCitystringoptional
Guest's city.
currencystringrequired
ISO 4217 currency code for the booking.
languagestringrequired
ISO 639-1 language code.
totalPricefloatrequired
Total booking price. Must equal the sum of all rooms[].price values.
confirmUrlstringoptional
Payment confirmation return URL.
commentstringoptional
Guest comments or special requests.
roomsarrayrequired
Array of room objects. Each room includes 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).

Returns

Response fields
idinteger
Unique booking identifier. Use this for subsequent operations (confirm, cancel, retrieve).
passwordstring
Verification code needed for cancellation.
isConfirmedboolean
Always false for new bookings. Use Confirm Booking to activate.
paymentGatewayRedirectUrlstring
Present for non-refundable plans. Redirect the guest to this URL for payment processing.
Important — The totalPrice must exactly match the sum of all rooms[].price values. Mismatched totals will result in a validation error.

Payment & Confirmation Notes

Depending on the property's configuration and the selected rate plans, booking confirmation and payment handling may differ:

1. Non-refundable Plans

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.

2. Other Plans

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.

Important — Always use the correct confirmation flow depending on the property's configuration and the selected rate plans. When 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.
POST /be/booking/add/
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
      }
    }]
  }'
Response 200
{
  "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
  }
}
Booking Engine › Booking

Confirm Booking

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.

POST /be/booking/confirmBooking/

Parameters

Body parameters
bookIdintegerrequired
The booking identifier returned by Create Booking.
hotelIdintegerrequired
Property identifier.

Returns

Response fields
isConfirmedboolean
true when the booking has been successfully confirmed.
POST /be/booking/confirmBooking/
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
  }'
Response 200
{
  "version": "v2",
  "status": "ok",
  "requestId": "req_a1b2c3d4e5",
  "data": {
    "isConfirmed": true
  }
}
Booking Engine › Booking

Confirm Paid Booking

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.

POST /be/booking/confirmPayed/

Parameters

Body parameters
bookIdintegerrequired
The booking identifier returned by Create Booking.
hotelIdintegerrequired
Property identifier.

Returns

Response fields
isConfirmedboolean
true when the booking has been successfully confirmed and marked as paid.
POST /be/booking/confirmPayed/
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
  }'
Response 200
{
  "version": "v2",
  "status": "ok",
  "requestId": "req_a1b2c3d4e5",
  "data": {
    "isConfirmed": true
  }
}
Booking Engine › Booking

Cancel Booking

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.

POST /be/booking/cancel/

Parameters

Body parameters
bookIdintegerrequired
The booking identifier.
passwordstringrequired
The password returned by the Create Booking response.
hotelIdintegerrequired
Property identifier.

Returns

Response fields
isCanceledboolean
true when the booking has been successfully cancelled.
Warning — Non-refundable bookings can be cancelled but will not be refunded. The property's cancellation policy determines any applicable fees.
POST /be/booking/cancel/
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
  }'
Response 200
{
  "version": "v2",
  "status": "ok",
  "requestId": "req_a1b2c3d4e5",
  "data": {
    "isCanceled": true
  }
}
Booking Engine › Booking

Get Booking

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.

POST /be/booking/info/

Parameters

Body parameters
bookIdintegerrequired
The booking identifier to look up.
hotelIdintegerrequired
Property identifier.

Returns

An enveloped JSON response containing the booking details.

Response fields
Detailsobject
Booking details: ID, HotelID, Name, Address, CountryCode, Phone, Email, CheckIn, CheckOut, Nights, Rooms, Persons, Value, Currency, Status, Password.
Roomsobject
Keyed by room booking ID. Each contains ID, RoomID, RoomName, PlanID, PlanName, Price, GuestNumber, Products.
POST /be/booking/info/
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
  }'
Response 200
{
  "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": {}
            }
          }
        }
      }
    }
}
Booking EngineAffiliate API
Booking Engine › Affiliate

Affiliate Details

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.

POST /be/affiliate/info/

Parameters

No body parameters required. Authentication determines the affiliate account.

Returns

An enveloped JSON response with affiliate profile and linked cities.

Response fields
citiesarray
Array of city objects. Each contains ID, Name, Latitude, Longitude, Url (slug), Apartments (count).
infoobject
Affiliate profile: AffiliateName, AffiliateUrl, Email, Phone, AffiliateType.
Note — This endpoint requires affiliate-level API credentials. Standard property API keys do not have access.
POST /be/affiliate/info/
curl -X POST https://api.pynbooking.com/be/affiliate/info/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response 200
{
  "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"
    }
  }
}
Booking Engine › Affiliate

City Hotels

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.

POST /be/affiliate/city_hotels/

Parameters

Body parameters
citystringrequired
City URL slug from the Affiliate Details endpoint.
languagestringrequired
ISO 639-1 language code. Example: EN.
checkinstringoptional
Check-in date. Format: YYYY-MM-DD.
checkoutstringoptional
Check-out date. Format: YYYY-MM-DD.

Returns

An enveloped response with currency rates and a list of hotels.

Response fields
ratesobject
Currency exchange rates.
hotelsobject
Keyed by hotelId. Each contains Details, Images, Valid, Availability, MinPrice.
Note — This endpoint requires affiliate-level API credentials.
POST /be/affiliate/city_hotels/
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"
  }'
Response 200
{
  "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
      }
    }
  }
}
Booking EngineCurrency API
Booking Engine › Currency

Currency Rates

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.

POST /be/currency/rates/

Parameters

Body parameters
hotelIdintegerrequired
Property identifier.

Returns

An enveloped JSON response with exchange rates.

Response fields
ratesobject
Currency codes mapped to their exchange rate relative to the base currency, where RON = 1.
POST /be/currency/rates/
curl -X POST https://api.pynbooking.com/be/currency/rates/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "hotelId": 3745
  }'
Response 200
{
  "version": "v2",
  "status": "ok",
  "requestId": "req_a1b2c3d4e5",
  "data": {
    "rates": {
      "EUR": "5.0937",
      "GBP": "5.8986",
      "USD": "4.427",
      "RON": 1
    }
  }
}

Errors

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.

HTTP Status Codes

Error codes
400invalid_request
The request was malformed or contained invalid parameters. Check the error message for specifics.
401unauthorized
Authentication failed. Your token may be invalid, expired, or missing from the request.
403forbidden
Your API credentials don't have permission to access this resource.
404not_found
The requested resource does not exist.
429rate_limited
Too many requests. Back off and retry with exponential backoff.
500internal_error
Something went wrong on our end. Try again later or contact support.

Error response

Response 401 Unauthorized
{
  "version": "v2",
  "status": "error",
  "requestId": "req_a1b2c3d4e5",
  "data": null,
  "error": {
    "message": "invalid credentials",
    "code": "unauthorized"
  }
}
PynBooking API v2 — Built for developers Need help? support@pynbooking.com