> For the complete documentation index, see [llms.txt](https://chekin.gitbook.io/chekin-public-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chekin.gitbook.io/chekin-public-api/api-reference/reservations/create-reservations.md).

# Create Reservations

<mark style="color:green;">`POST`</mark> `/reservations`

The "Create a Reservation" endpoint is designed for adding new reservations into the system. This process involves specifying details such as housing units, guest information, stay dates, and more. It's a crucial function for users who need to input reservation data directly into the system, facilitating real-time booking management

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `JWT <token>`      |

**Body**

<table data-full-width="false"><thead><tr><th width="316">Name</th><th width="103">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>housing</code></td><td>*uuid</td><td>Chekin Housing ID</td></tr><tr><td><code>check_in_date</code></td><td>*date</td><td>Check-in date</td></tr><tr><td><code>check_out_date</code></td><td>*date</td><td>Check-out date</td></tr><tr><td><code>guest_group.known_number_of_guests</code></td><td>*integer</td><td>Number of guests in reservation</td></tr><tr><td><code>room_ids</code></td><td>[uuid]</td><td>Array of room IDs in reservation</td></tr><tr><td><code>external_id</code></td><td>string</td><td>Rerservation ID in partner system</td></tr><tr><td><code>booking_reference</code></td><td>string</td><td>Reservation number from OTA (the one for the guest)</td></tr><tr><td><code>default_leader_full_name</code></td><td>string</td><td>Lead guest full name</td></tr><tr><td><code>default_invite_email</code></td><td>string</td><td>Lead guest email</td></tr><tr><td><code>default_phone_number</code></td><td>string</td><td>Lead guest phone number</td></tr><tr><td><code>default_email_language</code></td><td>string</td><td>Lead guest default language</td></tr><tr><td><code>source_name</code></td><td>string</td><td>Reservation origin name (Ex: Airbnb)</td></tr><tr><td><code>accommodation_type</code></td><td>string</td><td>Type of room/apartment booked. Used for INE statistics reporting (Spain). See <a href="#accommodation-type">Accommodation type</a></td></tr></tbody></table>

#### Accommodation type

`accommodation_type` is optional. It describes the type of room or apartment booked and is used for INE statistics reporting in Spain. Send one of these values, or an empty string to leave it unset:

| Value                    | Description             | INE for hotels | INE for apartments |
| ------------------------ | ----------------------- | :------------: | :----------------: |
| `DOUBLE_ROOM_DOUBLE_USE` | Double room, double use |        ✓       |                    |
| `DOUBLE_ROOM_SINGLE_USE` | Double room, single use |        ✓       |                    |
| `STUDIO`                 | Studio                  |                |          ✓         |
| `APARTMENT_2_4_PAX`      | Apartment 2-4 pax       |                |          ✓         |
| `APARTMENT_4_6_PAX`      | Apartment 4-6 pax       |                |          ✓         |
| `OTHER`                  | Other                   |        ✓       |          ✓         |

If the housing is connected to an INE statistics integration, only the values for that integration are accepted. Any other value returns `400 Bad Request` with the error `This accommodation type is not allowed for this property.` Housings without an INE integration accept any value from the list.

**Response**

{% tabs %}
{% tab title="Request" %}

```json
POST 'https://a.chekin.io/public/api/v1/reservations' \
--header 'Authorization: JWT TOKEN' \
--header 'Content-Type: application/json' \
--data '{
    "housing": "housing_id",
    "guest_group": {
        "known_number_of_guests": 5
    },
    "source_name": "Test",
    "default_leader_full_name": "Test Guest",
    "accommodation_type": "STUDIO",
    "check_in_date": "2025-05-28",
    "check_out_date": "2025-05-30"
}'
```

{% endtab %}

{% tab title="Response" %}

```json
{
    "signup_form_link": "https://guest.chekin.com/link",
    "upselling_link": "https://guest.chekin.com/link",
    "payment_link": "https://guest.chekin.com/link",
    "checkin_online_link": "",
    "lock_link": "https://guest.chekin.com/link",
    "link": "",
    "id": "resrevation_id",
    "housing_id": "",
    "room_ids": [],
    "default_invite_email": "",
    "default_leader_full_name": "",
    "current_leader_full_name": "",
    "default_phone_number": "",
    "default_email_language": "ron",
    "check_in_date": "2024-11-27",
    "check_out_date": "2024-11-28",
    "created_at": "2024-11-21T09:01:23.320374Z",
    "nights_of_stay": 1,
    "source": "",
    "external_id": "",
    "booking_reference": "",
    "guest_group": {
        "id": "",
        "known_number_of_guests": 2,
        "guest_ids": [
            "",
            ""
        ]
    },
    "detailed_statuses": {
        "id": "",
        "check_in_online_email_status": "SENT",
        "identity_verification_status": "COMPLETE",
        "tax_status": "NOT_USED",
        "property_protection_status": "NOT_USED",
        "deposit_status": "NOT_USED",
        "remote_access_status": "NOT_USED",
        "booking_payments_status": "NOT_USED",
        "police_check_in_status": "NOT_USED",
        "police_check_out_status": "NOT_USED",
        "stat_check_in_status": "NOT_USED",
        "stat_check_out_status": "NOT_USED",
        "guests_registration_status": "COMPLETE",
        "general_status": "COMPLETE"
    },
    "payment_method": "OTRO",
    "accommodation_type": "STUDIO",
    "access_start_time": null,
    "access_end_time": null
}
```

{% endtab %}
{% endtabs %}
