API reference
UsHost public API, version 1
http://localhost:8000/api/v1
Every path on this page starts here.
The Postman collection and the OpenAPI description are available for download.
Overview
The UsHost API allows systems owned by the property or by its partners to read and write reservation, guest and inventory data.
The credential belongs to the property, not to the user who issued it. Each token has access only to the scopes it was granted, and the property can disable the API at any time.
Authentication
Send the token in one of the two headers below. The header is required on every call.
The token is displayed only once, at issue time, and cannot be recovered. If it is lost, issue a new one or use Rotate on the credentials screen.
Authorization: Bearer ush_a1b2c3d4_...
X-Api-Key: ush_a1b2c3d4_...
Response format
All responses, including errors, use the same envelope.
Lists are paginated and include meta, with the current page and the total number of records.
{
"success": true,
"data": [],
"meta": { "page": 1, "per_page": 25, "total": 53, "last_page": 3 },
"message": "",
"errors": []
}
Writing safely
The Idempotency-Key header is optional on write calls and accepts any unique identifier generated by the client.
A call repeated with the same key and the same body returns the original response without executing again, with the Idempotent-Replay: true header. The same key with a different body returns 409. A key is valid for 24 hours, and only successful responses are stored.
Idempotency-Key: qualquer-identificador-unico-seu
Limits
The burst limit is applied per token. When it is exceeded, the response is 429, and the call may be retried after a short interval.
The monthly plan quota counts successful calls. Calls rejected for an invalid credential and platform failures are not counted. Once the quota is exhausted, additional usage is billed as an overage or blocked, according to the option set under My plan.
Credential
/me
Property data and token permissions
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.
Responses
| Code | Meaning |
|---|---|
200 | Success. The content is returned in data. |
401 | Invalid, revoked or expired token. The message is the same in all three cases. |
403 | The API is disabled for the property, or the token does not have the required scope. |
404 | The id does not exist in this property. |
429 | Burst limit exceeded, or plan quota exhausted with blocking enabled. |
curl -X GET "http://localhost:8000/api/v1/me" \
-H "Authorization: Bearer ush_a1b2c3d4_..."
{
"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": []
}
Reservations
/reservations
List reservations
Returns the property reservations, newest first. For incremental synchronization, use updated_since.
Parameters
| Field | Type | Description |
|---|---|---|
status |
string | Reservation status. The parameter may be repeated to filter by more than one status. |
code |
string | Reservation code, as shown in the panel. |
external_id |
string | Reservation identifier at the source OTA. |
updated_since |
date-time | Returns the records changed since this instant (ISO-8601). |
check_in_from |
date | Check-in on or after this date. |
check_in_to |
date | Check-in on or before this date. |
page |
integer | Requested page. Starts at 1. |
per_page |
integer | Records per page, up to 100. |
Responses
| Code | Meaning |
|---|---|
200 | Success. The content is returned in data. |
401 | Invalid, revoked or expired token. The message is the same in all three cases. |
403 | The API is disabled for the property, or the token does not have the required scope. |
404 | The id does not exist in this property. |
429 | Burst limit exceeded, or plan quota exhausted with blocking enabled. |
curl -X GET "http://localhost:8000/api/v1/reservations" \
-H "Authorization: Bearer ush_a1b2c3d4_..."
{
"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": []
}
/reservations/{id}
Get one reservation
Returns one reservation by id. An id that belongs to another property returns 404, not 403.
Responses
| Code | Meaning |
|---|---|
200 | Success. The content is returned in data. |
401 | Invalid, revoked or expired token. The message is the same in all three cases. |
403 | The API is disabled for the property, or the token does not have the required scope. |
404 | The id does not exist in this property. |
429 | Burst limit exceeded, or plan quota exhausted with blocking enabled. |
curl -X GET "http://localhost:8000/api/v1/reservations/123" \
-H "Authorization: Bearer ush_a1b2c3d4_..."
{
"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": []
}
/reservations
Create a reservation
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.
Request body
| Field | Type | Description |
|---|---|---|
rate_plan_idrequired |
integer | Rate plan that determines the stay price. |
check_in_daterequired |
date | Check-in date. |
check_out_daterequired |
date | Check-out date. |
adultsrequired |
integer | Adults in the room. |
children |
integer | Children in the room. |
guestrequired |
object | Reservation guest, with name and at least one contact. |
notes |
string | Free-text note, displayed on the reservation record. |
Responses
| Code | Meaning |
|---|---|
201 | Created. The response contains the created record. |
401 | Invalid, revoked or expired token. The message is the same in all three cases. |
403 | The API is disabled for the property, or the token does not have the required scope. |
404 | The id does not exist in this property. |
409 | The same Idempotency-Key was reused with a different body. |
422 | Invalid data. Field-level details are returned in errors. |
429 | Burst limit exceeded, or plan quota exhausted with blocking enabled. |
curl -X POST "http://localhost:8000/api/v1/reservations" \
-H "Authorization: Bearer ush_a1b2c3d4_..." \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 7f3c1a" \
-d '{"rate_plan_id":0,"check_in_date":"","check_out_date":"","adults":0,"guest":{}}'
{
"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": []
}
/reservations/{id}/cancel
Cancel a reservation
Cancels the reservation. Cancellation through the API does not issue a refund: refunds are processed in the panel.
Request body
| Field | Type | Description |
|---|---|---|
reason |
string | Reason recorded in the reservation history. |
Responses
| Code | Meaning |
|---|---|
200 | Success. The content is returned in data. |
401 | Invalid, revoked or expired token. The message is the same in all three cases. |
403 | The API is disabled for the property, or the token does not have the required scope. |
404 | The id does not exist in this property. |
409 | The same Idempotency-Key was reused with a different body. |
422 | Invalid data. Field-level details are returned in errors. |
429 | Burst limit exceeded, or plan quota exhausted with blocking enabled. |
curl -X POST "http://localhost:8000/api/v1/reservations/123/cancel" \
-H "Authorization: Bearer ush_a1b2c3d4_..." \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 7f3c1a" \
-d '{}'
{
"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": []
}
Guests
/guests
List guests
Returns the property guests. Document and address are not exposed, as they are sensitive personal data.
Parameters
| Field | Type | Description |
|---|---|---|
search |
string | Search by name, e-mail or phone. |
updated_since |
date-time | Returns the records changed since this instant (ISO-8601). |
page |
integer | Requested page. Starts at 1. |
per_page |
integer | Records per page, up to 100. |
Responses
| Code | Meaning |
|---|---|
200 | Success. The content is returned in data. |
401 | Invalid, revoked or expired token. The message is the same in all three cases. |
403 | The API is disabled for the property, or the token does not have the required scope. |
404 | The id does not exist in this property. |
429 | Burst limit exceeded, or plan quota exhausted with blocking enabled. |
curl -X GET "http://localhost:8000/api/v1/guests" \
-H "Authorization: Bearer ush_a1b2c3d4_..."
{
"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": []
}
/guests/{id}
Get one guest
Returns one guest by id.
Responses
| Code | Meaning |
|---|---|
200 | Success. The content is returned in data. |
401 | Invalid, revoked or expired token. The message is the same in all three cases. |
403 | The API is disabled for the property, or the token does not have the required scope. |
404 | The id does not exist in this property. |
429 | Burst limit exceeded, or plan quota exhausted with blocking enabled. |
curl -X GET "http://localhost:8000/api/v1/guests/123" \
-H "Authorization: Bearer ush_a1b2c3d4_..."
{
"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": []
}
/guests
Create a guest
Creates the guest in the credential property. An e-mail address that is already registered returns 422.
Request body
| Field | Type | Description |
|---|---|---|
namerequired |
string | Full name. |
email |
string | Contact e-mail. |
phone |
string | Phone number with country code. |
birth_date |
date | Date of birth. |
nationality |
string | Nationality. |
Responses
| Code | Meaning |
|---|---|
201 | Created. The response contains the created record. |
401 | Invalid, revoked or expired token. The message is the same in all three cases. |
403 | The API is disabled for the property, or the token does not have the required scope. |
404 | The id does not exist in this property. |
409 | The same Idempotency-Key was reused with a different body. |
422 | Invalid data. Field-level details are returned in errors. |
429 | Burst limit exceeded, or plan quota exhausted with blocking enabled. |
curl -X POST "http://localhost:8000/api/v1/guests" \
-H "Authorization: Bearer ush_a1b2c3d4_..." \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 7f3c1a" \
-d '{"name":""}'
{
"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": []
}
/guests/{id}
Update a guest
Updates the record. Only the fields sent are changed.
Request body
| Field | Type | Description |
|---|---|---|
name |
string | Full name. |
email |
string | Contact e-mail. |
phone |
string | Phone number with country code. |
Responses
| Code | Meaning |
|---|---|
200 | Success. The content is returned in data. |
401 | Invalid, revoked or expired token. The message is the same in all three cases. |
403 | The API is disabled for the property, or the token does not have the required scope. |
404 | The id does not exist in this property. |
409 | The same Idempotency-Key was reused with a different body. |
422 | Invalid data. Field-level details are returned in errors. |
429 | Burst limit exceeded, or plan quota exhausted with blocking enabled. |
curl -X PUT "http://localhost:8000/api/v1/guests/123" \
-H "Authorization: Bearer ush_a1b2c3d4_..." \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 7f3c1a" \
-d '{}'
{
"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": []
}
Inventory
/rooms
List rooms
Returns the property units, each with its status and room type.
Parameters
| Field | Type | Description |
|---|---|---|
room_type_id |
integer | Only rooms of this type. |
only_active |
boolean | Excludes deactivated rooms. |
page |
integer | Requested page. Starts at 1. |
per_page |
integer | Records per page, up to 100. |
Responses
| Code | Meaning |
|---|---|
200 | Success. The content is returned in data. |
401 | Invalid, revoked or expired token. The message is the same in all three cases. |
403 | The API is disabled for the property, or the token does not have the required scope. |
404 | The id does not exist in this property. |
429 | Burst limit exceeded, or plan quota exhausted with blocking enabled. |
curl -X GET "http://localhost:8000/api/v1/rooms" \
-H "Authorization: Bearer ush_a1b2c3d4_..."
{
"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": []
}
/availability
Daily availability
Returns, per day, the total, occupied and available units. The check-out day is not counted as occupied.
Parameters
| Field | Type | Description |
|---|---|---|
fromrequired |
date | First day of the range. |
torequired |
date | Last day of the range. |
room_type_id |
integer | Restricts the result to one room type. |
Responses
| Code | Meaning |
|---|---|
200 | Success. The content is returned in data. |
401 | Invalid, revoked or expired token. The message is the same in all three cases. |
403 | The API is disabled for the property, or the token does not have the required scope. |
404 | The id does not exist in this property. |
429 | Burst limit exceeded, or plan quota exhausted with blocking enabled. |
curl -X GET "http://localhost:8000/api/v1/availability?from=&to=" \
-H "Authorization: Bearer ush_a1b2c3d4_..."
{
"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": []
}
/room-types
List room types
Returns the property accommodation types, with occupancy, beds and amenities.
Responses
| Code | Meaning |
|---|---|
200 | Success. The content is returned in data. |
401 | Invalid, revoked or expired token. The message is the same in all three cases. |
403 | The API is disabled for the property, or the token does not have the required scope. |
404 | The id does not exist in this property. |
429 | Burst limit exceeded, or plan quota exhausted with blocking enabled. |
curl -X GET "http://localhost:8000/api/v1/room-types" \
-H "Authorization: Bearer ush_a1b2c3d4_..."
{
"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": []
}
/rate-plans
List rate plans
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.
Parameters
| Field | Type | Description |
|---|---|---|
room_type_id |
integer | Only rate plans for this room type. |
only_active |
boolean | Excludes deactivated rate plans. |
Responses
| Code | Meaning |
|---|---|
200 | Success. The content is returned in data. |
401 | Invalid, revoked or expired token. The message is the same in all three cases. |
403 | The API is disabled for the property, or the token does not have the required scope. |
404 | The id does not exist in this property. |
429 | Burst limit exceeded, or plan quota exhausted with blocking enabled. |
curl -X GET "http://localhost:8000/api/v1/rate-plans" \
-H "Authorization: Bearer ush_a1b2c3d4_..."
{
"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": []
}
Discovery
The three files below describe the same endpoints as this page and are generated from the same source.