Ir al contenido

Referencia de la API

Todas las rutas van con Authorization: Bearer <credencial>: una llave ord_… o un token de OAuth ordat_… (ver Autenticación). La base es https://api.ordenly.app. Las fechas van en UTC (ISO 8601) y los ids son UUID v7.

El documento OpenAPI 3.1 completo está en GET https://api.ordenly.app/v1/openapi.json, sin credencial.

Las rutas de alcance write aceptan la cabecera Idempotency-Key (hasta 200 caracteres ASCII visibles): durante 24 h, repetir la petición con la misma clave y el mismo cuerpo devuelve la respuesta de la primera vez, con Idempotent-Replayed: true, sin hacerla otra vez. Con otro cuerpo, 422 IDEMPOTENCY_KEY_REUSED; si la primera todavía está en marcha, 409 IDEMPOTENCY_IN_PROGRESS con Retry-After. Solo se guardan las respuestas 2xx.

GET /v1/categories

The hotel categories, in the order they are shown

  • Alcance: read
  • Herramienta MCP: list_categories

Parámetros

Nombre Dónde Tipo Obligatorio Qué es
include_inactive consulta true | false No

Respuesta 200

Una lista en data. Cada elemento:

Campo Tipo Obligatorio Qué es
id string (uuid) Sí
name string Sí
icon string o null Sí
default_group_id string (uuid) Sí
default_group_name string Sí
default_priority low | medium | high | critical Sí
sort integer Sí
active boolean Sí

Errores: 400 Invalid input · 401 The credential is missing, invalid or expired · 402 The hotel plan does not include the public API, or it is read-only · 403 The credential does not have the scope this route requires · 429 More than 120 requests in a minute with the same key · 500 Internal error

GET /v1/locations

Search a location by name or code

  • Alcance: read
  • Herramienta MCP: search_locations

Parámetros

Nombre Dónde Tipo Obligatorio Qué es
q consulta string, hasta 120 caracteres No
site_id consulta string (uuid) No
kind consulta building | floor | room | area | other No
include_inactive consulta true | false No
limit consulta integer, mín. 1, máx. 100 No

Respuesta 200

Una lista en data. Cada elemento:

Campo Tipo Obligatorio Qué es
id string (uuid) Sí
site_id string (uuid) Sí
parent_id string (uuid) o null Sí
kind building | floor | room | area | other Sí
name string Sí
code string o null Sí
path string Sí
sort integer Sí
active boolean Sí
qr_token string o null No
report_url string o null No The link printed in the QR: opens the report form, or the app for staff. Admins only
qr_hash string o null No SHA-256 of the old ordenly:// QR token, to recognise a scan without the token
report_hash string o null No SHA-256 of the token in the QR link, to recognise a scan without network

Errores: 400 Invalid input · 401 The credential is missing, invalid or expired · 402 The hotel plan does not include the public API, or it is read-only · 403 The credential does not have the scope this route requires · 429 More than 120 requests in a minute with the same key · 500 Internal error

GET /v1/locations/tree

The hotel tree, flat and in reading order

  • Alcance: read
  • Herramienta MCP: list_locations

Parámetros

Nombre Dónde Tipo Obligatorio Qué es
site_id consulta string (uuid) No
include_inactive consulta true | false No

Respuesta 200

Una lista en data. Cada elemento:

Campo Tipo Obligatorio Qué es
id string (uuid) Sí
site_id string (uuid) Sí
parent_id string (uuid) o null Sí
kind building | floor | room | area | other Sí
name string Sí
code string o null Sí
path string Sí
sort integer Sí
active boolean Sí
qr_token string o null No
report_url string o null No The link printed in the QR: opens the report form, or the app for staff. Admins only
qr_hash string o null No SHA-256 of the old ordenly:// QR token, to recognise a scan without the token
report_hash string o null No SHA-256 of the token in the QR link, to recognise a scan without network
depth integer Sí

Errores: 400 Invalid input · 401 The credential is missing, invalid or expired · 402 The hotel plan does not include the public API, or it is read-only · 403 The credential does not have the scope this route requires · 429 More than 120 requests in a minute with the same key · 500 Internal error

GET /v1/sites

The hotel sites with their time zone

  • Alcance: read
  • Herramienta MCP: list_sites

Respuesta 200

Una lista en data. Cada elemento:

Campo Tipo Obligatorio Qué es
id string (uuid) Sí
name string Sí
timezone string Sí
address string o null Sí
housekeeping_day_start string Sí When the housekeeping day starts at the property, HH:MM, 05:00 by default
active boolean Sí

Errores: 401 The credential is missing, invalid or expired · 402 The hotel plan does not include the public API, or it is read-only · 403 The credential does not have the scope this route requires · 429 More than 120 requests in a minute with the same key · 500 Internal error

GET /v1/tickets

List issues, with filters and cursor pagination

  • Alcance: read
  • Herramienta MCP: search_tickets

Parámetros

Nombre Dónde Tipo Obligatorio Qué es
status consulta new | assigned | in_progress | on_hold | closed | cancelled o array de new | assigned | in_progress | on_hold | closed | cancelled No
priority consulta low | medium | high | critical o array de low | medium | high | critical No
kind consulta incident | recurring o array de incident | recurring No
overdue consulta true | false No
created_from consulta string (date-time) No
created_to consulta string (date-time) No
closed_since consulta string (date-time) No
category_id consulta string (uuid) No
location_id consulta string (uuid) No
group_id consulta string (uuid) No
assignee_user_id consulta string (uuid) No
mine consulta true | false No
reported_by_me consulta true | false No
unassigned consulta true | false No
q consulta string, hasta 120 caracteres No
cursor consulta string, hasta 120 caracteres No
limit consulta integer, mín. 1, máx. 100 No

Respuesta 200

Una lista en data. Cada elemento:

Campo Tipo Obligatorio Qué es
id string (uuid) Sí
number integer Sí The hotel number: #1043
kind incident | recurring Sí recurring: a task that comes from a template
scheduled_for string o null Sí The target date of a recurring task
template_id string (uuid) o null Sí The recurring task this occurrence comes from; null for an issue
title string Sí
status new | assigned | in_progress | on_hold | closed | cancelled Sí
priority low | medium | high | critical Sí
category object o null Sí
location object o null Sí
assignee object o object o null Sí
group_id string (uuid) o null Sí
due_at string o null Sí
sla_breached boolean Sí
hold_reason string o null Sí
hold_until string o null Sí
created_at string Sí
updated_at string Sí
started_at string o null Sí When it was first started
origin staff | external Sí external: reported without an account, from the QR of a location
in_scope boolean Sí Whether the asker sees it in full or only this basic record (ADR-006)

Errores: 400 Invalid input · 401 The credential is missing, invalid or expired · 402 The hotel plan does not include the public API, or it is read-only · 403 The credential does not have the scope this route requires · 429 More than 120 requests in a minute with the same key · 500 Internal error

POST /v1/tickets

Create an issue. With a client id, repeating it does not duplicate

  • Alcance: write
  • Herramienta MCP: create_ticket

Cuerpo (JSON)

Campo Tipo Obligatorio Qué es
id string (uuid) No
site_id string (uuid) No
title string, hasta 200 caracteres No
description string, hasta 5000 caracteres o null No
category_id string (uuid) Sí
location_id string (uuid) o null No
asset_id string (uuid) o null No
priority low | medium | high | critical No
attachment_ids array de string (uuid) No

Respuesta 201

Campo Tipo Obligatorio Qué es
id string (uuid) Sí
number integer Sí The hotel number: #1043
kind incident | recurring Sí recurring: a task that comes from a template
scheduled_for string o null Sí The target date of a recurring task
template_id string (uuid) o null Sí The recurring task this occurrence comes from; null for an issue
title string Sí
status new | assigned | in_progress | on_hold | closed | cancelled Sí
priority low | medium | high | critical Sí
category object o null Sí
location object o null Sí
assignee object o object o null Sí
group_id string (uuid) o null Sí
due_at string o null Sí
sla_breached boolean Sí
hold_reason string o null Sí
hold_until string o null Sí
created_at string Sí
updated_at string Sí
started_at string o null Sí When it was first started
origin staff | external Sí external: reported without an account, from the QR of a location
in_scope boolean Sí Whether the asker sees it in full or only this basic record (ADR-006)
asset object o null Sí The affected equipment, if any (F2.5)
reminders array de object Sí The pending reminders that are yours: your own and those you set
checklist array de object Sí The steps of a recurring task; empty on an issue or out of scope
attachments array de object Sí
comments array de object Sí
description string o null Sí
reporter object Sí
external_report object o null Sí Who reported it from the QR, only if they left it, and only in scope. Erased 30 days after closing
closed_at string o null Sí
closed_by string (uuid) o null Sí
repair_cost number o null Sí What the repair cost, in the hotel currency; null out of scope
repair_cost_note string o null Sí
hold_postponed_count integer Sí
on_hold_seconds integer Sí
due_at_manual boolean Sí
close_photo_required boolean Sí Whether closing it requires a photo of the work done: the template for a task, the hotel for the rest
activity array de object Sí
status_history array de object Sí
permissions array de view_detail | edit | assign | self_assign | unassign | start | hold | close | check_item | remind | reopen | cancel | set_priority | set_due | comment | set_cost Sí

Errores: 400 Invalid input · 401 The credential is missing, invalid or expired · 402 The hotel plan does not include the public API, or it is read-only · 403 The credential does not have the scope this route requires · 429 More than 120 requests in a minute with the same key · 500 Internal error

GET /v1/tickets/{id}

An issue. Out of scope, only the basic record (ADR-006)

  • Alcance: read
  • Herramienta MCP: get_ticket

Parámetros

Nombre Dónde Tipo Obligatorio Qué es
id ruta string (uuid) Sí

Respuesta 200

Campo Tipo Obligatorio Qué es
id string (uuid) Sí
number integer Sí The hotel number: #1043
kind incident | recurring Sí recurring: a task that comes from a template
scheduled_for string o null Sí The target date of a recurring task
template_id string (uuid) o null Sí The recurring task this occurrence comes from; null for an issue
title string Sí
status new | assigned | in_progress | on_hold | closed | cancelled Sí
priority low | medium | high | critical Sí
category object o null Sí
location object o null Sí
assignee object o object o null Sí
group_id string (uuid) o null Sí
due_at string o null Sí
sla_breached boolean Sí
hold_reason string o null Sí
hold_until string o null Sí
created_at string Sí
updated_at string Sí
started_at string o null Sí When it was first started
origin staff | external Sí external: reported without an account, from the QR of a location
in_scope boolean Sí Whether the asker sees it in full or only this basic record (ADR-006)
asset object o null Sí The affected equipment, if any (F2.5)
reminders array de object Sí The pending reminders that are yours: your own and those you set
checklist array de object Sí The steps of a recurring task; empty on an issue or out of scope
attachments array de object Sí
comments array de object Sí
description string o null Sí
reporter object Sí
external_report object o null Sí Who reported it from the QR, only if they left it, and only in scope. Erased 30 days after closing
closed_at string o null Sí
closed_by string (uuid) o null Sí
repair_cost number o null Sí What the repair cost, in the hotel currency; null out of scope
repair_cost_note string o null Sí
hold_postponed_count integer Sí
on_hold_seconds integer Sí
due_at_manual boolean Sí
close_photo_required boolean Sí Whether closing it requires a photo of the work done: the template for a task, the hotel for the rest
activity array de object Sí
status_history array de object Sí
permissions array de view_detail | edit | assign | self_assign | unassign | start | hold | close | check_item | remind | reopen | cancel | set_priority | set_due | comment | set_cost Sí

Errores: 401 The credential is missing, invalid or expired · 402 The hotel plan does not include the public API, or it is read-only · 403 The credential does not have the scope this route requires · 404 Does not exist, or belongs to another hotel · 429 More than 120 requests in a minute with the same key · 500 Internal error

GET /v1/tickets/{id}/comments

The thread of an issue

  • Alcance: read
  • Herramienta MCP: get_ticket_comments

Parámetros

Nombre Dónde Tipo Obligatorio Qué es
id ruta string (uuid) Sí

Respuesta 200

Una lista en data. Cada elemento:

Campo Tipo Obligatorio Qué es
id string (uuid) Sí
body string Sí
author object Sí No user_id when a vendor writes through a link (phase 2)
mentions array de string (uuid) Sí
attachments array de object Sí
created_at string Sí

Errores: 401 The credential is missing, invalid or expired · 402 The hotel plan does not include the public API, or it is read-only · 403 The credential does not have the scope this route requires · 404 Does not exist, or belongs to another hotel · 429 More than 120 requests in a minute with the same key · 500 Internal error

POST /v1/tickets/{id}/comments

Write in the thread, with photos and mentions

  • Alcance: write
  • Herramienta MCP: comment_ticket

Parámetros

Nombre Dónde Tipo Obligatorio Qué es
id ruta string (uuid) Sí

Cuerpo (JSON)

Campo Tipo Obligatorio Qué es
body string, hasta 4000 caracteres Sí
attachment_ids array de string (uuid) No
mentions array de string (uuid) No

Respuesta 201

Una lista en data. Cada elemento:

Campo Tipo Obligatorio Qué es
id string (uuid) Sí
body string Sí
author object Sí No user_id when a vendor writes through a link (phase 2)
mentions array de string (uuid) Sí
attachments array de object Sí
created_at string Sí

Errores: 400 Invalid input · 401 The credential is missing, invalid or expired · 402 The hotel plan does not include the public API, or it is read-only · 403 The credential does not have the scope this route requires · 404 Does not exist, or belongs to another hotel · 429 More than 120 requests in a minute with the same key · 500 Internal error