POSTBookings

Create Booking

/api/v1/bookings/create

Create one or more bookings in a single request. Each item in the items array maps to one product/resource booking. All items share the same customer and top-level metadata, while the response returns grouped booking items with linked resource details.

Authentication Required

Include Bearer token in Authorization header: Authorization: Bearer YOUR_TOKEN

Request Body Fields

FieldTypeRequiredDescription
partnerIdintegerYesPartner ID.
itemsarrayYesOne or more booking items.
items[].productCodestringYesProduct/tour code to book
items[].reservationDateTimestringYesReservation date or datetime (ISO 8601, e.g. 2026-03-25 or 2026-03-25T10:00:00)
items[].quantitiesarrayYesQuantity lines for the item — must contain at least one entry
items[].quantities[].labelstringYesQuantity line label (e.g., adult, child, senior)
items[].quantities[].quantitynumberYesNumber of units for this line (must be > 0)
items[].quantities[].pricenumberYesUnit price for this quantity line (>= 0)
customerobjectYesCustomer details shared across all items
customer.firstNamestringYesCustomer first name
customer.lastNamestringNoCustomer last name
customer.titlestringNoCustomer title (Mr, Mrs, Ms, etc.)
customer.emailstringNoCustomer email address
customer.phonestringNoCustomer phone number
customer.addressstringNoCustomer street address
customer.citystringNoCustomer city
customer.countrystringNoCustomer country code or name
customer.postCodestringNoCustomer postal / ZIP code
customerNotestringNoCustomer note for booking
resellerReferencestringNoReseller booking reference
resellerSourcestringNoReseller source / channel
resellerNotestringNoReseller note for booking
guestsarrayNoGuest list applied to booking
guests[].titlestringNoGuest title
guests[].firstNamestringNoGuest first name
guests[].lastNamestringNoGuest last name
guests[].agenumberNoGuest age
paymentsarrayNoPayment records applied to booking
payments[].methodstringYesPayment method (e.g., CREDIT_CARD, VOUCHER)
payments[].amountnumberYesPayment amount (>= 0)
payments[].referencestringYesGateway or provider payment reference

Request Body Example

Example:

{
  "partnerId": 42,
  "items": [
    {
      "productCode": "TOUR-EIFFEL-SKIP-LINE",
      "reservationDateTime": "2026-03-25T10:00:00",
      "quantities": [
        {
          "label": "adult",
          "quantity": 2,
          "price": 75
        },
        {
          "label": "child",
          "quantity": 1,
          "price": 40
        }
      ]
    }
  ],
  "customer": {
    "title": "Mr",
    "firstName": "John",
    "lastName": "Doe",
    "email": "[email protected]",
    "phone": "+33612345678",
    "address": "15 Avenue de l Opera",
    "city": "Paris",
    "country": "FR",
    "postCode": "75001"
  },
  "customerNote": "Wheelchair accessible entrance requested",
  "resellerReference": "RS-TRAVELMATE-9912",
  "resellerSource": "mytravelmate",
  "resellerNote": "VIP customer, prioritize fast check-in",
  "guests": [
    {
      "title": "Mr",
      "firstName": "John",
      "lastName": "Doe",
      "age": 37
    },
    {
      "title": "Mrs",
      "firstName": "Jane",
      "lastName": "Doe",
      "age": 35
    }
  ],
  "payments": [
    {
      "method": "CREDIT_CARD",
      "amount": 190,
      "reference": "txn-2026-03-20-001"
    },
    {
      "method": "VOUCHER",
      "amount": 40,
      "reference": "voucher-ABCD-2026"
    }
  ]
}

Response

Success Response Example:

{
  "success": true,
  "booking": {
    "bookingNumber": "PC2185IEC",
    "items": [
      {
        "productCode": "TOUR-EIFFEL-SKIP-LINE",
        "reservationDate": "2026-03-25",
        "reservationTime": "10:00",
        "quantities": [
          {
            "label": "adult",
            "quantity": 2,
            "price": 75
          },
          {
            "label": "child",
            "quantity": 1,
            "price": 40
          }
        ],
        "resource": {
          "code": "RES-EIFFEL-1000",
          "name": "Eiffel Tower 10AM Entry",
          "type": "ticket"
        }
      }
    ],
    "guests": [
      {
        "title": "Mr",
        "firstName": "John",
        "lastName": "Doe",
        "age": 37
      },
      {
        "title": "Mrs",
        "firstName": "Jane",
        "lastName": "Doe",
        "age": 35
      }
    ],
    "payments": [
      {
        "method": "CREDIT_CARD",
        "amount": 190,
        "currency": "EUR",
        "reference": "txn-2026-03-20-001"
      },
      {
        "method": "VOUCHER",
        "amount": 40,
        "currency": "EUR",
        "reference": "voucher-ABCD-2026"
      }
    ],
    "customerNote": "Wheelchair accessible entrance requested",
    "resellerReference": "RS-TRAVELMATE-9912",
    "resellerSource": "mytravelmate",
    "resellerNote": "VIP customer, prioritize fast check-in",
    "status": "created",
    "customer": {
      "title": "Mr",
      "firstName": "John",
      "lastName": "Doe",
      "phone": "+33612345678",
      "email": "[email protected]"
    }
  }
}

Error Response

Error Example:

{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Request validation failed"
  }
}

Available Errors

HTTP StatusCodeMeaning
401UNAUTHORIZEDInvalid or missing authentication token
422VALIDATION_ERRORRequest payload validation failed
400INVALID_REQUESTMissing/invalid payload fields: partnerId, items, items[].productCode, items[].reservationDateTime, items[].quantities, or customer.firstName
403FORBIDDENPartner and Product do not match
404NOT_FOUNDProduct not found
409CONFLICTResource not available for requested slot
500INTERNAL_SERVER_ERRORServer error