---
title: "Schema Adapters — Documentation"
canonical: "https://repull.dev/docs/calry-schema"
description: "Switch Repull response formats per request with the X-Schema header: native PMS field names, Calry-compatible v2 shapes, or your own custom schema."
updated: "2026-11-30T00:48:58.694Z"
commit: "18314c12fefb59a7545ef7607c0893919de20aa9"
---

# 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/schema/custom`.

Schema adapters transform API responses to match different formats. Set the `X-Schema` header to switch formats per-request.

## Available Schemas

`X-Schema: calry`Default

Default. Matches Calry v2 API format — camelCase, nested primaryGuest/occupancy/financials, room types. Migration = change base URL.

`X-Schema: calry-v1`Legacy

Matches deprecated Calry v1 format — no room types, properties directly bookable. For developers still on v1.

`X-Schema: native`New

Repull 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_live_KEY"

# Use Calry v1 format
curl https://api.repull.dev/v1/properties -H "Authorization: Bearer sk_live_KEY" -H "X-Schema: calry-v1"

# Use native format
curl https://api.repull.dev/v1/properties -H "Authorization: Bearer sk_live_KEY" -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"
}
```
