Schema Adapters
TL;DR
Add X-Schema: native for PMS-native field names, X-Schema: calry for Calry-compatible format, or create custom schemas at /v1/schemas.
Schema adapters transform API responses to match different formats. Set the X-Schema header to switch formats per-request.
Available Schemas
X-Schema: calryDefaultDefault. Matches Calry v2 API format — camelCase, nested primaryGuest/occupancy/financials, room types. Migration = change base URL.
X-Schema: calry-v1LegacyMatches deprecated Calry v1 format — no room types, properties directly bookable. For developers still on v1.
X-Schema: nativeNewRepull native format — snake_case, flatter structure. For developers starting fresh.
Usage
# Use Calry v2 format (default — no header needed) curl https://api.repull.dev/v1/properties -H "Authorization: Bearer sk_test_KEY" -H "X-Workspace-Id: WS_ID" # Use Calry v1 format curl https://api.repull.dev/v1/properties -H "Authorization: Bearer sk_test_KEY" -H "X-Workspace-Id: WS_ID" -H "X-Schema: calry-v1" # Use native format curl https://api.repull.dev/v1/properties -H "Authorization: Bearer sk_test_KEY" -H "X-Workspace-Id: WS_ID" -H "X-Schema: native"
Request Bodies
Schema adapters also parse incoming request bodies. When creating a reservation with X-Schema: calry, send propertyId and primaryGuest. With X-Schema: native, send property_id and guest.
Calry format (POST /v1/reservations)
{
"propertyId": "123",
"checkIn": "2026-06-01",
"checkOut": "2026-06-05",
"primaryGuest": {
"firstName": "Sarah",
"lastName": "Mitchell"
},
"occupancy": { "adults": 2 },
"financials": {
"totalPrice": 1800,
"currency": "USD"
}
}Native format (POST /v1/reservations)
{
"property_id": "123",
"check_in": "2026-06-01",
"check_out": "2026-06-05",
"guest": {
"first_name": "Sarah",
"last_name": "Mitchell"
},
"adults": 2,
"total_price": 1800,
"currency": "USD"
}