End-to-end flow
The complete journey: search → rate check → booking → status → cancellation. Examples are in JSON; add -H "Accept: application/xml" for XML (see XML format).
Examples use the API_KEY, TIMESTAMP and SIGNATURE variables defined in
the Request signing guide.
1. Search availability
Search by city or by hotel list (200 max). Each offer returns a signed rateKey used in the next steps.
cURL
curl -s -X POST "https://partners.bravebooking.net/v1/1000/availability" \
-H "X-Api-Key: $API_KEY" -H "X-Timestamp: $TIMESTAMP" -H "X-Signature: $SIGNATURE" \
-H "Content-Type: application/json" -H "Accept: application/json" \
-d '{
"city": 146070,
"checkIn": "2027-01-15",
"checkOut": "2027-01-20",
"rooms": [{ "adults": 2, "children": [8] }],
"currency": "TND",
"language": "fr"
}'
Keep the rateKey of the chosen offer, e.g. rk_x9F2kQ8example. Details: Availability.
2. Check the rate (checkrate)
Replaying the rateKey in checkrate verifies the offer is still sellable and guarantees the price for 10 minutes.
cURL
curl -s -X POST "https://partners.bravebooking.net/v1/1000/checkrate" \
-H "X-Api-Key: $API_KEY" -H "X-Timestamp: $TIMESTAMP" -H "X-Signature: $SIGNATURE" \
-H "Content-Type: application/json" -H "Accept: application/json" \
-d '{ "rateKey": "rk_x9F2kQ8example" }'
The response contains expiresAt: after that, search again. Details: Rate check.
3. Book
Send the verified rateKey, your guests, and above all your clientReference: mandatory and unique, it makes the call idempotent (a duplicate returns the same booking, no double charge).
cURL
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 }]
}]
}'
The response (201) contains the gateway reference, e.g. BPG-2026-000123. Details: Create a booking.
Never retry a booking blindly: replay the same request with the same
clientReference, which returns the existing booking. See
Idempotency.
4. Track status
cURL
curl -s "https://partners.bravebooking.net/v1/1000/bookings/BPG-2026-000123" \
-H "X-Api-Key: $API_KEY" -H "X-Timestamp: $TIMESTAMP" -H "X-Signature: $SIGNATURE" \
-H "Accept: application/json"
To sync your records, list bookings by period:
cURL
curl -s "https://partners.bravebooking.net/v1/1000/bookings?from=2026-11-01&to=2026-11-30" \
-H "X-Api-Key: $API_KEY" -H "X-Timestamp: $TIMESTAMP" -H "X-Signature: $SIGNATURE" \
-H "Accept: application/json"
The voucher (booking confirmation) is downloaded via Voucher. Details: Booking detail, List bookings.
5. Cancel
Simulate first to learn the fees, then cancel for real:
cURL — simulation
curl -s -X POST "https://partners.bravebooking.net/v1/1000/bookings/BPG-2026-000123/cancel?simulate=true" \
-H "X-Api-Key: $API_KEY" -H "X-Timestamp: $TIMESTAMP" -H "X-Signature: $SIGNATURE" \
-H "Accept: application/json"
cURL — cancellation
curl -s -X POST "https://partners.bravebooking.net/v1/1000/bookings/BPG-2026-000123/cancel" \
-H "X-Api-Key: $API_KEY" -H "X-Timestamp: $TIMESTAMP" -H "X-Signature: $SIGNATURE" \
-H "Accept: application/json"
Details: Cancellation.
Order of operations, in short
| Step | Call | Key passed |
|---|---|---|
| 1 | POST /v1/{code}/availability | — |
| 2 | POST /v1/{code}/checkrate | rateKey from step 1 |
| 3 | POST /v1/{code}/bookings | verified rateKey + unique clientReference |
| 4 | GET /v1/{code}/bookings/{ref} | reference from step 3 |
| 5 | POST /v1/{code}/bookings/{ref}/cancel | reference from step 3 |