{
    "openapi": "3.1.0",
    "info": {
        "title": "UsHost API",
        "version": "1.0.0",
        "description": "Public UsHost API. Every response uses the {success, data, message, errors} envelope. Authentication by property token (Authorization: Bearer, or X-Api-Key)."
    },
    "servers": [
        {
            "url": "http://localhost:8000/api/v1"
        }
    ],
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer"
            }
        }
    },
    "security": [
        {
            "bearerAuth": []
        }
    ],
    "paths": {
        "/me": {
            "get": {
                "operationId": "me",
                "tags": [
                    "Credential"
                ],
                "summary": "Property data and token permissions",
                "description": "Returns the property to which the credential belongs and the token scopes, without accessing operational data. It is recommended as the first call, to validate the token. The `timezone` field indicates the property time zone: API dates are in UTC and must be converted to this time zone to determine the operating day.\n\nNo specific scope required.",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "example": {
                                    "success": true,
                                    "data": {
                                        "company": {
                                            "id": 1,
                                            "name": "Hotel Aurora",
                                            "currency": "BRL",
                                            "timezone": "America/Sao_Paulo",
                                            "language": "pt"
                                        },
                                        "token": {
                                            "name": "ERP do hotel",
                                            "prefix": "ush_a1b2c3d4",
                                            "scopes": [
                                                "reservations:view",
                                                "guests:view"
                                            ],
                                            "expires_at": null
                                        }
                                    },
                                    "message": "",
                                    "errors": []
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid, revoked or expired token. The message is the same in all three cases."
                    },
                    "403": {
                        "description": "The API is disabled for the property, or the token does not have the required scope."
                    },
                    "404": {
                        "description": "The id does not exist in **this** property."
                    },
                    "429": {
                        "description": "Burst limit exceeded, or plan quota exhausted with blocking enabled."
                    }
                }
            }
        },
        "/reservations": {
            "get": {
                "operationId": "reservations.index",
                "tags": [
                    "Reservations"
                ],
                "summary": "List reservations",
                "description": "Returns the property reservations, newest first. For incremental synchronization, use `updated_since`.\n\nRequires the `reservations:view` scope, or a token with no scopes, which has full access.",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Reservation status. The parameter may be repeated to filter by more than one status.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "code",
                        "in": "query",
                        "required": false,
                        "description": "Reservation code, as shown in the panel.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "external_id",
                        "in": "query",
                        "required": false,
                        "description": "Reservation identifier at the source OTA.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "description": "Returns the records changed since this instant (ISO-8601).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "check_in_from",
                        "in": "query",
                        "required": false,
                        "description": "Check-in on or after this date.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "check_in_to",
                        "in": "query",
                        "required": false,
                        "description": "Check-in on or before this date.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Requested page. Starts at 1.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Records per page, up to 100.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "id": 4821,
                                            "code": "RSV-2026-0481",
                                            "status": "confirmed",
                                            "channel": "direct",
                                            "is_day_use": false,
                                            "currency": "BRL",
                                            "total_amount": "1360.00",
                                            "deposit_amount": "340.00",
                                            "discount_amount": "0.00",
                                            "rate_plan_id": 7,
                                            "notes": "Chegada prevista para as 22h.",
                                            "external_id": null,
                                            "guest": {
                                                "id": 912,
                                                "name": "Marina Duarte",
                                                "email": "marina@example.com",
                                                "phone": "+5511988887777"
                                            },
                                            "rooms": [
                                                {
                                                    "room_id": 33,
                                                    "room_name": "204",
                                                    "check_in_date": "2026-10-12",
                                                    "check_out_date": "2026-10-16",
                                                    "adults": 2,
                                                    "children": 1
                                                }
                                            ],
                                            "confirmed_at": "2026-09-06T13:22:04+00:00",
                                            "checked_in_at": null,
                                            "checked_out_at": null,
                                            "cancelled_at": null,
                                            "created_at": "2026-09-06T13:20:51+00:00",
                                            "updated_at": "2026-09-06T13:22:04+00:00"
                                        }
                                    ],
                                    "meta": {
                                        "page": 1,
                                        "per_page": 25,
                                        "total": 53,
                                        "last_page": 3
                                    },
                                    "message": "",
                                    "errors": []
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid, revoked or expired token. The message is the same in all three cases."
                    },
                    "403": {
                        "description": "The API is disabled for the property, or the token does not have the required scope."
                    },
                    "404": {
                        "description": "The id does not exist in **this** property."
                    },
                    "429": {
                        "description": "Burst limit exceeded, or plan quota exhausted with blocking enabled."
                    }
                }
            },
            "post": {
                "operationId": "reservations.store",
                "tags": [
                    "Reservations"
                ],
                "summary": "Create a reservation",
                "description": "Creates the reservation with the same validations as the panel: availability, maximum occupancy and minimum nights. The `external_id` field is read-only. Store the returned `code` to locate the reservation later. A property suspended under the subscription plan does not accept new reservations: the response is `422`, with the reason in `errors.company_id`.\n\nRequires the `reservations:create` scope, or a token with no scopes, which has full access.",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "description": "Optional. Repeating the call with the same key returns the original response without executing again.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "example": {
                                    "success": true,
                                    "data": {
                                        "id": 4821,
                                        "code": "RSV-2026-0481",
                                        "status": "confirmed",
                                        "channel": "direct",
                                        "is_day_use": false,
                                        "currency": "BRL",
                                        "total_amount": "1360.00",
                                        "deposit_amount": "340.00",
                                        "discount_amount": "0.00",
                                        "rate_plan_id": 7,
                                        "notes": "Chegada prevista para as 22h.",
                                        "external_id": null,
                                        "guest": {
                                            "id": 912,
                                            "name": "Marina Duarte",
                                            "email": "marina@example.com",
                                            "phone": "+5511988887777"
                                        },
                                        "rooms": [
                                            {
                                                "room_id": 33,
                                                "room_name": "204",
                                                "check_in_date": "2026-10-12",
                                                "check_out_date": "2026-10-16",
                                                "adults": 2,
                                                "children": 1
                                            }
                                        ],
                                        "confirmed_at": "2026-09-06T13:22:04+00:00",
                                        "checked_in_at": null,
                                        "checked_out_at": null,
                                        "cancelled_at": null,
                                        "created_at": "2026-09-06T13:20:51+00:00",
                                        "updated_at": "2026-09-06T13:22:04+00:00"
                                    },
                                    "message": "",
                                    "errors": []
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid, revoked or expired token. The message is the same in all three cases."
                    },
                    "403": {
                        "description": "The API is disabled for the property, or the token does not have the required scope."
                    },
                    "404": {
                        "description": "The id does not exist in **this** property."
                    },
                    "409": {
                        "description": "The same `Idempotency-Key` was reused with a different body."
                    },
                    "422": {
                        "description": "Invalid data. Field-level details are returned in `errors`."
                    },
                    "429": {
                        "description": "Burst limit exceeded, or plan quota exhausted with blocking enabled."
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "rate_plan_id": {
                                        "type": "integer",
                                        "description": "Rate plan that determines the stay price."
                                    },
                                    "check_in_date": {
                                        "type": "string",
                                        "description": "Check-in date."
                                    },
                                    "check_out_date": {
                                        "type": "string",
                                        "description": "Check-out date."
                                    },
                                    "adults": {
                                        "type": "integer",
                                        "description": "Adults in the room."
                                    },
                                    "children": {
                                        "type": "integer",
                                        "description": "Children in the room."
                                    },
                                    "guest": {
                                        "type": "object",
                                        "description": "Reservation guest, with `name` and at least one contact."
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Free-text note, displayed on the reservation record."
                                    }
                                },
                                "required": [
                                    "rate_plan_id",
                                    "check_in_date",
                                    "check_out_date",
                                    "adults",
                                    "guest"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/reservations/{id}": {
            "get": {
                "operationId": "reservations.show",
                "tags": [
                    "Reservations"
                ],
                "summary": "Get one reservation",
                "description": "Returns one reservation by id. An id that belongs to another property returns `404`, not `403`.\n\nRequires the `reservations:view` scope, or a token with no scopes, which has full access.",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "example": {
                                    "success": true,
                                    "data": {
                                        "id": 4821,
                                        "code": "RSV-2026-0481",
                                        "status": "confirmed",
                                        "channel": "direct",
                                        "is_day_use": false,
                                        "currency": "BRL",
                                        "total_amount": "1360.00",
                                        "deposit_amount": "340.00",
                                        "discount_amount": "0.00",
                                        "rate_plan_id": 7,
                                        "notes": "Chegada prevista para as 22h.",
                                        "external_id": null,
                                        "guest": {
                                            "id": 912,
                                            "name": "Marina Duarte",
                                            "email": "marina@example.com",
                                            "phone": "+5511988887777"
                                        },
                                        "rooms": [
                                            {
                                                "room_id": 33,
                                                "room_name": "204",
                                                "check_in_date": "2026-10-12",
                                                "check_out_date": "2026-10-16",
                                                "adults": 2,
                                                "children": 1
                                            }
                                        ],
                                        "confirmed_at": "2026-09-06T13:22:04+00:00",
                                        "checked_in_at": null,
                                        "checked_out_at": null,
                                        "cancelled_at": null,
                                        "created_at": "2026-09-06T13:20:51+00:00",
                                        "updated_at": "2026-09-06T13:22:04+00:00"
                                    },
                                    "message": "",
                                    "errors": []
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid, revoked or expired token. The message is the same in all three cases."
                    },
                    "403": {
                        "description": "The API is disabled for the property, or the token does not have the required scope."
                    },
                    "404": {
                        "description": "The id does not exist in **this** property."
                    },
                    "429": {
                        "description": "Burst limit exceeded, or plan quota exhausted with blocking enabled."
                    }
                }
            }
        },
        "/reservations/{id}/cancel": {
            "post": {
                "operationId": "reservations.cancel",
                "tags": [
                    "Reservations"
                ],
                "summary": "Cancel a reservation",
                "description": "Cancels the reservation. Cancellation through the API **does not issue a refund**: refunds are processed in the panel.\n\nRequires the `reservations:edit` scope, or a token with no scopes, which has full access.",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "description": "Optional. Repeating the call with the same key returns the original response without executing again.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "example": {
                                    "success": true,
                                    "data": {
                                        "id": 4821,
                                        "code": "RSV-2026-0481",
                                        "status": "confirmed",
                                        "channel": "direct",
                                        "is_day_use": false,
                                        "currency": "BRL",
                                        "total_amount": "1360.00",
                                        "deposit_amount": "340.00",
                                        "discount_amount": "0.00",
                                        "rate_plan_id": 7,
                                        "notes": "Chegada prevista para as 22h.",
                                        "external_id": null,
                                        "guest": {
                                            "id": 912,
                                            "name": "Marina Duarte",
                                            "email": "marina@example.com",
                                            "phone": "+5511988887777"
                                        },
                                        "rooms": [
                                            {
                                                "room_id": 33,
                                                "room_name": "204",
                                                "check_in_date": "2026-10-12",
                                                "check_out_date": "2026-10-16",
                                                "adults": 2,
                                                "children": 1
                                            }
                                        ],
                                        "confirmed_at": "2026-09-06T13:22:04+00:00",
                                        "checked_in_at": null,
                                        "checked_out_at": null,
                                        "cancelled_at": null,
                                        "created_at": "2026-09-06T13:20:51+00:00",
                                        "updated_at": "2026-09-06T13:22:04+00:00"
                                    },
                                    "message": "",
                                    "errors": []
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid, revoked or expired token. The message is the same in all three cases."
                    },
                    "403": {
                        "description": "The API is disabled for the property, or the token does not have the required scope."
                    },
                    "404": {
                        "description": "The id does not exist in **this** property."
                    },
                    "409": {
                        "description": "The same `Idempotency-Key` was reused with a different body."
                    },
                    "422": {
                        "description": "Invalid data. Field-level details are returned in `errors`."
                    },
                    "429": {
                        "description": "Burst limit exceeded, or plan quota exhausted with blocking enabled."
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "description": "Reason recorded in the reservation history."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/guests": {
            "get": {
                "operationId": "guests.index",
                "tags": [
                    "Guests"
                ],
                "summary": "List guests",
                "description": "Returns the property guests. Document and address are not exposed, as they are sensitive personal data.\n\nRequires the `guests:view` scope, or a token with no scopes, which has full access.",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Search by name, e-mail or phone.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "description": "Returns the records changed since this instant (ISO-8601).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Requested page. Starts at 1.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Records per page, up to 100.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "id": 912,
                                            "name": "Marina Duarte",
                                            "email": "marina@example.com",
                                            "phone": "+5511988887777",
                                            "birth_date": "1988-04-17",
                                            "nationality": "BR",
                                            "preferred_language": "pt",
                                            "person_type": "individual",
                                            "marketing_consent": true,
                                            "created_at": "2026-03-02T18:41:09+00:00",
                                            "updated_at": "2026-09-06T13:20:51+00:00"
                                        }
                                    ],
                                    "meta": {
                                        "page": 1,
                                        "per_page": 25,
                                        "total": 53,
                                        "last_page": 3
                                    },
                                    "message": "",
                                    "errors": []
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid, revoked or expired token. The message is the same in all three cases."
                    },
                    "403": {
                        "description": "The API is disabled for the property, or the token does not have the required scope."
                    },
                    "404": {
                        "description": "The id does not exist in **this** property."
                    },
                    "429": {
                        "description": "Burst limit exceeded, or plan quota exhausted with blocking enabled."
                    }
                }
            },
            "post": {
                "operationId": "guests.store",
                "tags": [
                    "Guests"
                ],
                "summary": "Create a guest",
                "description": "Creates the guest in the credential property. An e-mail address that is already registered returns `422`.\n\nRequires the `guests:create` scope, or a token with no scopes, which has full access.",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "description": "Optional. Repeating the call with the same key returns the original response without executing again.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "example": {
                                    "success": true,
                                    "data": {
                                        "id": 912,
                                        "name": "Marina Duarte",
                                        "email": "marina@example.com",
                                        "phone": "+5511988887777",
                                        "birth_date": "1988-04-17",
                                        "nationality": "BR",
                                        "preferred_language": "pt",
                                        "person_type": "individual",
                                        "marketing_consent": true,
                                        "created_at": "2026-03-02T18:41:09+00:00",
                                        "updated_at": "2026-09-06T13:20:51+00:00"
                                    },
                                    "message": "",
                                    "errors": []
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid, revoked or expired token. The message is the same in all three cases."
                    },
                    "403": {
                        "description": "The API is disabled for the property, or the token does not have the required scope."
                    },
                    "404": {
                        "description": "The id does not exist in **this** property."
                    },
                    "409": {
                        "description": "The same `Idempotency-Key` was reused with a different body."
                    },
                    "422": {
                        "description": "Invalid data. Field-level details are returned in `errors`."
                    },
                    "429": {
                        "description": "Burst limit exceeded, or plan quota exhausted with blocking enabled."
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Full name."
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Contact e-mail."
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Phone number with country code."
                                    },
                                    "birth_date": {
                                        "type": "string",
                                        "description": "Date of birth."
                                    },
                                    "nationality": {
                                        "type": "string",
                                        "description": "Nationality."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/guests/{id}": {
            "get": {
                "operationId": "guests.show",
                "tags": [
                    "Guests"
                ],
                "summary": "Get one guest",
                "description": "Returns one guest by id.\n\nRequires the `guests:view` scope, or a token with no scopes, which has full access.",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "example": {
                                    "success": true,
                                    "data": {
                                        "id": 912,
                                        "name": "Marina Duarte",
                                        "email": "marina@example.com",
                                        "phone": "+5511988887777",
                                        "birth_date": "1988-04-17",
                                        "nationality": "BR",
                                        "preferred_language": "pt",
                                        "person_type": "individual",
                                        "marketing_consent": true,
                                        "created_at": "2026-03-02T18:41:09+00:00",
                                        "updated_at": "2026-09-06T13:20:51+00:00"
                                    },
                                    "message": "",
                                    "errors": []
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid, revoked or expired token. The message is the same in all three cases."
                    },
                    "403": {
                        "description": "The API is disabled for the property, or the token does not have the required scope."
                    },
                    "404": {
                        "description": "The id does not exist in **this** property."
                    },
                    "429": {
                        "description": "Burst limit exceeded, or plan quota exhausted with blocking enabled."
                    }
                }
            },
            "put": {
                "operationId": "guests.update",
                "tags": [
                    "Guests"
                ],
                "summary": "Update a guest",
                "description": "Updates the record. Only the fields sent are changed.\n\nRequires the `guests:edit` scope, or a token with no scopes, which has full access.",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "description": "Optional. Repeating the call with the same key returns the original response without executing again.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "example": {
                                    "success": true,
                                    "data": {
                                        "id": 912,
                                        "name": "Marina Duarte",
                                        "email": "marina@example.com",
                                        "phone": "+5511988887777",
                                        "birth_date": "1988-04-17",
                                        "nationality": "BR",
                                        "preferred_language": "pt",
                                        "person_type": "individual",
                                        "marketing_consent": true,
                                        "created_at": "2026-03-02T18:41:09+00:00",
                                        "updated_at": "2026-09-06T13:20:51+00:00"
                                    },
                                    "message": "",
                                    "errors": []
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid, revoked or expired token. The message is the same in all three cases."
                    },
                    "403": {
                        "description": "The API is disabled for the property, or the token does not have the required scope."
                    },
                    "404": {
                        "description": "The id does not exist in **this** property."
                    },
                    "409": {
                        "description": "The same `Idempotency-Key` was reused with a different body."
                    },
                    "422": {
                        "description": "Invalid data. Field-level details are returned in `errors`."
                    },
                    "429": {
                        "description": "Burst limit exceeded, or plan quota exhausted with blocking enabled."
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Full name."
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Contact e-mail."
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Phone number with country code."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/rooms": {
            "get": {
                "operationId": "rooms.index",
                "tags": [
                    "Inventory"
                ],
                "summary": "List rooms",
                "description": "Returns the property units, each with its status and room type.\n\nRequires the `rooms:view` scope, or a token with no scopes, which has full access.",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "room_type_id",
                        "in": "query",
                        "required": false,
                        "description": "Only rooms of this type.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "only_active",
                        "in": "query",
                        "required": false,
                        "description": "Excludes deactivated rooms.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Requested page. Starts at 1.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Records per page, up to 100.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "id": 33,
                                            "name": "204",
                                            "floor": "2",
                                            "status": "occupied",
                                            "is_active": true,
                                            "room_type": {
                                                "id": 3,
                                                "name": "Suíte Luxo"
                                            }
                                        }
                                    ],
                                    "meta": {
                                        "page": 1,
                                        "per_page": 25,
                                        "total": 53,
                                        "last_page": 3
                                    },
                                    "message": "",
                                    "errors": []
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid, revoked or expired token. The message is the same in all three cases."
                    },
                    "403": {
                        "description": "The API is disabled for the property, or the token does not have the required scope."
                    },
                    "404": {
                        "description": "The id does not exist in **this** property."
                    },
                    "429": {
                        "description": "Burst limit exceeded, or plan quota exhausted with blocking enabled."
                    }
                }
            }
        },
        "/availability": {
            "get": {
                "operationId": "availability",
                "tags": [
                    "Inventory"
                ],
                "summary": "Daily availability",
                "description": "Returns, per day, the total, occupied and available units. The check-out day is not counted as occupied.\n\nRequires the `rooms:view` scope, or a token with no scopes, which has full access.",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "required": true,
                        "description": "First day of the range.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": true,
                        "description": "Last day of the range.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "room_type_id",
                        "in": "query",
                        "required": false,
                        "description": "Restricts the result to one room type.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "example": {
                                    "success": true,
                                    "data": {
                                        "days": [
                                            {
                                                "date": "2026-10-12",
                                                "total_rooms": 24,
                                                "occupied": 19,
                                                "available": 5
                                            },
                                            {
                                                "date": "2026-10-13",
                                                "total_rooms": 24,
                                                "occupied": 21,
                                                "available": 3
                                            }
                                        ]
                                    },
                                    "message": "",
                                    "errors": []
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid, revoked or expired token. The message is the same in all three cases."
                    },
                    "403": {
                        "description": "The API is disabled for the property, or the token does not have the required scope."
                    },
                    "404": {
                        "description": "The id does not exist in **this** property."
                    },
                    "429": {
                        "description": "Burst limit exceeded, or plan quota exhausted with blocking enabled."
                    }
                }
            }
        },
        "/room-types": {
            "get": {
                "operationId": "room-types.index",
                "tags": [
                    "Inventory"
                ],
                "summary": "List room types",
                "description": "Returns the property accommodation types, with occupancy, beds and amenities.\n\nRequires the `room_types:view` scope, or a token with no scopes, which has full access.",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "id": 3,
                                            "name": "Suíte Luxo",
                                            "description": "Vista para o mar, banheira e varanda.",
                                            "is_active": true,
                                            "occupancy": {
                                                "base": 2,
                                                "max": 4,
                                                "max_adults": 3,
                                                "max_children": 2
                                            },
                                            "beds": {
                                                "double": 1,
                                                "single": 2
                                            },
                                            "amenities": [
                                                "air_conditioning",
                                                "smart_tv",
                                                "minibar"
                                            ]
                                        }
                                    ],
                                    "meta": {
                                        "page": 1,
                                        "per_page": 25,
                                        "total": 53,
                                        "last_page": 3
                                    },
                                    "message": "",
                                    "errors": []
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid, revoked or expired token. The message is the same in all three cases."
                    },
                    "403": {
                        "description": "The API is disabled for the property, or the token does not have the required scope."
                    },
                    "404": {
                        "description": "The id does not exist in **this** property."
                    },
                    "429": {
                        "description": "Burst limit exceeded, or plan quota exhausted with blocking enabled."
                    }
                }
            }
        },
        "/rate-plans": {
            "get": {
                "operationId": "rate-plans.index",
                "tags": [
                    "Inventory"
                ],
                "summary": "List rate plans",
                "description": "Returns the published rate plans, with base price, meal plan and cancellation policy. The `id` is the `rate_plan_id` required to create a reservation.\n\nRequires the `rate_plans:view` scope, or a token with no scopes, which has full access.",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "room_type_id",
                        "in": "query",
                        "required": false,
                        "description": "Only rate plans for this room type.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "only_active",
                        "in": "query",
                        "required": false,
                        "description": "Excludes deactivated rate plans.",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "id": 7,
                                            "name": "Tarifa Flexível com café",
                                            "description": "Cancelamento gratuito até a véspera.",
                                            "room_type_id": 3,
                                            "base_price": "340.00",
                                            "extra_adult_price": "80.00",
                                            "extra_child_price": "40.00",
                                            "min_nights": 1,
                                            "max_nights": null,
                                            "meal_plan": "breakfast",
                                            "cancellation_policy": "flexible",
                                            "is_default": true,
                                            "is_active": true
                                        }
                                    ],
                                    "meta": {
                                        "page": 1,
                                        "per_page": 25,
                                        "total": 53,
                                        "last_page": 3
                                    },
                                    "message": "",
                                    "errors": []
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid, revoked or expired token. The message is the same in all three cases."
                    },
                    "403": {
                        "description": "The API is disabled for the property, or the token does not have the required scope."
                    },
                    "404": {
                        "description": "The id does not exist in **this** property."
                    },
                    "429": {
                        "description": "Burst limit exceeded, or plan quota exhausted with blocking enabled."
                    }
                }
            }
        }
    }
}
