Guide 4/12
Conventions
Conventions shared by every endpoint.
Envelope
Success: {"ok":true,"dados":…,"meta":{…}}. Error: {"ok":false,"erro":{"codigo","mensagem","campos"}} with the right HTTP status (400, 401, 403, 404, 409, 413, 422, 429, 500). Field names and codes are Portuguese and stable; human messages follow Accept-Language.
{
"ok": true,
"dados": {"id": 41, "total": 4800.00, "moeda": "EUR", "criado_em": "2026-10-28T10:15:00+00:00"},
"meta": {}
}{
"ok": false,
"erro": {
"codigo": "validacao",
"mensagem": "Há dados por corrigir.",
"campos": {"email": "Indique um email válido."}
}
}Headers
X-Request-Idon every response (you may send your own); quote it when reporting a problem.Accept-Language:pt-PT(default),pt-BR,en,es,fr,de— labels such asorigem_rotulocome in that language.Idempotency-Keyon POST (see Idempotency).X-RateLimit-Limit,X-RateLimit-Remaining,X-RateLimit-ResetandRetry-Afteron 429.
Data types
- Dates: ISO 8601 with offset (
2026-10-28T10:15:00+00:00); dates only as2026-10-28. Clinic local time is Europe/Lisbon. - Money: decimal number with 2 places and the currency (
EUR) in the record orx-moeda. - Units: always explicit in the schema (
x-unidade):UF/cm²,cabelos/cm²,enxertos,cm²,mm. Follicular units, grafts and hairs are never interchangeable. - Choices: stable keys in
enum, with readable labels inx-enum-rotulosand<field>_rotuloin responses. - Booleans:
true/false(0/1 is also accepted on input).