XML format
The Brave gateway answers in JSON by default and in XML when requested via the Accept header. Both formats carry exactly the same information.
Negotiation via Accept
Accept header | Response |
|---|---|
application/json (or absent, or */*) | JSON |
application/xml | XML |
application/json, application/xml | JSON (first declared wins) |
cURL — XML response
curl -s "https://partners.bravebooking.net/v1/1000/ping" \
-H "X-Api-Key: $API_KEY" -H "X-Timestamp: $TIMESTAMP" -H "X-Signature: $SIGNATURE" \
-H "Accept: application/xml"
Response
<?xml version="1.0" encoding="UTF-8"?>
<PingResponse>
<Status>ok</Status>
<Company>1000</Company>
<Mode>test</Mode>
<Quota>
<PerSecond>10</PerSecond>
<PerDay>20000</PerDay>
<RemainingToday>19982</RemainingToday>
</Quota>
</PingResponse>
Representation rules
- Dates — ISO 8601 (
2027-01-15,2026-11-13T10:15:30+01:00) in both formats, including XML. Thed/m/Yformat only exists on the Cyberesa gateway. - Currencies — ISO 4217 code (
TND,EUR), amounts as decimal numbers. - Arrays — a repeated container element:
<Hotels><Hotel>…</Hotel><Hotel>…</Hotel></Hotels>. - Booleans —
true/falsein JSON,true/falsein XML (Brave gateway; Cyberesa uses'True'/'False'). - Errors —
<ErrorResponse><Code>…</Code><Message>…</Message></ErrorResponse>envelope in XML, on every Brave gateway endpoint.
XML request bodies
Brave gateway POSTs also accept an XML body (Content-Type: application/xml):
POST /v1/{code}/checkrate in XML
<CheckrateRequest>
<RateKey>rk_x9F2kQ8example</RateKey>
</CheckrateRequest>
XSD schema
The official schema of Brave gateway messages is docs/brave-partner.xsd in the gateway repository (partner-gateway). Validate your exchanges against this XSD during acceptance; gateway responses are guaranteed to be compliant.
The Cyberesa gateway has its own XML rules (root = message name, d/m/Y
dates, Available = 'Disponible') — see Cyberesa.