Skip to content
Anagen
PT EN
Request assessment

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-Id on 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 as origem_rotulo come in that language.
  • Idempotency-Key on POST (see Idempotency).
  • X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset and Retry-After on 429.

Data types

  • Dates: ISO 8601 with offset (2026-10-28T10:15:00+00:00); dates only as 2026-10-28. Clinic local time is Europe/Lisbon.
  • Money: decimal number with 2 places and the currency (EUR) in the record or x-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 in x-enum-rotulos and <field>_rotulo in responses.
  • Booleans: true/false (0/1 is also accepted on input).