Create a booking
Creates a booking from a rateKey verified by checkrate. The call is idempotent thanks to your clientReference.
Request
JSON body
- Name
clientReference- Type
- string
- Description
Your reference, mandatory and unique. A duplicate returns the same booking (
200+X-Idempotent-Replay: true). See Idempotency.
- Name
rateKey- Type
- string
- Description
Offer key verified by
checkrate(price guaranteed 10 minutes).
- Name
customer- Type
- object
- Description
Main contact:
civility,firstName,lastName,email,phone.
- Name
rooms- Type
- object[]
- Description
roomId,boardingId,adults[](civility,firstName,lastName),children[](firstName,lastName,age).
- Name
remarks- Type
- string
- Description
Optional remarks for the hotel.
curl -s -X POST "https://partners.bravebooking.net/v1/1000/bookings" \
-H "X-Api-Key: $API_KEY" \
-H "X-Timestamp: $TIMESTAMP" \
-H "X-Signature: $SIGNATURE" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"clientReference": "PARTNER-2026-000481",
"rateKey": "rk_x9F2kQ8example",
"customer": {
"civility": "Mr",
"firstName": "TEST-A",
"lastName": "TEST-B",
"email": "test@example.com",
"phone": "+21620000000"
},
"rooms": [{
"roomId": "18",
"boardingId": 16,
"adults": [
{ "civility": "Mr", "firstName": "TEST-A", "lastName": "TEST-B" }
],
"children": [
{ "firstName": "TEST-C", "lastName": "TEST-B", "age": 8 }
]
}]
}'
Response
201 Created on creation. 200 OK with the X-Idempotent-Replay: true header if the clientReference was already used — the body is then the existing booking.
{
"reference": "BPG-2026-000123",
"clientReference": "PARTNER-2026-000481",
"status": "confirmed",
"hotel": {
"id": 1803258,
"name": "Villa Demo Stays",
"city": { "id": 146070, "name": "La Marsa" }
},
"checkIn": "2027-01-15",
"checkOut": "2027-01-20",
"rooms": [
{
"roomId": "18",
"name": "Chambre Deluxe Vue Mer",
"boarding": { "id": 16, "name": "Petit-déjeuner" },
"adults": [{ "civility": "Mr", "firstName": "TEST-A", "lastName": "TEST-B" }],
"children": [{ "firstName": "TEST-C", "lastName": "TEST-B", "age": 8 }]
}
],
"amounts": { "total": 2500.0, "fees": 0.0, "currency": "TND" },
"cancellation": [
{ "from": "2026-12-15", "to": "2027-01-14", "type": "PERCENT", "value": 0 },
{ "from": "2027-01-14", "type": "PERCENT", "value": 100, "nature": "NO_SHOW" }
],
"createdAt": "2026-11-13T10:16:02+01:00"
}
Possible statuses
status | Meaning |
|---|---|
confirmed | Booking confirmed (instant offer) |
pending | On request (onRequest), awaiting confirmation |
Errors
400 validation_failed (guests inconsistent with the rateKey occupancy), 422 rate_expired (price guarantee elapsed), 422 stop_sales. See Errors.