Skip to content
ajar.Get started

Reservation create

booking.reservation.create

View connector

Finalise a prepared pay-at-property reservation

POST /v1/operations/booking.reservation.create

Headers

Authorization: Bearer YOUR_CONNECTOR_TOKEN
x-booking-token: YOUR_BOOKING_TOKEN
x-idempotency-key: YOUR_UNIQUE_ATTEMPT_KEY
Content-Type: application/json

x-idempotency-key identifies one intended action. Generate a unique value, such as crypto.randomUUID(), before sending it. Use 1–128 letters, numbers, hyphens, underscores or periods. A duplicate attempt is rejected; it does not return a cached success. If a request times out, check the provider’s state before starting a new attempt with a new key. See the idempotency guide.

Use your connector bearer token and caller-held guest token in x-booking-token.

Inputs

ParameterExample typeExample value
checkout_refstring"fictional-checkout-ref"
confirm_bookbooleantrue

Example input

{
  "checkout_ref": "fictional-checkout-ref",
  "confirm_book": true
}
Open JSON schema

Input schema

{
  "$id": "https://useajar.com/schemas/booking/reservation-create.input.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "checkout_ref": {
      "maxLength": 128,
      "minLength": 1,
      "type": "string"
    },
    "confirm_book": {
      "const": true
    }
  },
  "required": [
    "checkout_ref",
    "confirm_book"
  ],
  "type": "object"
}