Relações de um registro#
GET /v1/medications/{id}/relations retorna data com relações tipadas disponíveis para o medicamento identificado. Cada relação possui identificadores de origem e destino, tipo, direção, evidência e datas de validade quando disponíveis.
curl --fail-with-body "$IABULA_API_BASE/v1/medications/$IABULA_MEDICATION_ID/relations" \
--header "X-API-Key: $IABULA_API_KEY"Uma lista vazia descreve a cobertura#
O dataset regulatório de relações explícitas ainda não está populado no baseline V1 documentado. A rota é operacional, mas consumidores devem tratar listas vazias como resultado válido. HTTP 404 indica que o identificador do medicamento não foi encontrado.
Relações não são recomendações#
Relações regulatórias precisam de evidência rastreável. Sem essa base, semelhança textual e ingredientes compartilhados não demonstram intercambialidade. A API não recomenda substituição ou tratamento.
GET /v1/medications/{id}/relations#
| Parâmetro | Local | Obrigatório | Tipo e limites |
|---|---|---|---|
| id | path | yes | string (uuid) |
| HTTP | Content-Type | Schema |
|---|---|---|
| 200 | application/json | RelationPage |
| 400 | application/json | Problem |
| 401 | application/json | Problem |
| 403 | application/json | Problem |
| 429 | application/json | Problem |
| 500 | application/json | Problem |
| 503 | application/json | Problem |
| 404 | application/json | Problem |
| 422 | application/json | HTTPValidationError |
Campos do contrato OpenAPI#
| Schema.campo | Tipo e limites | Obrigatório |
|---|---|---|
| Evidence.class | string | yes |
| Evidence.source | string | null | no |
| Evidence.dataset | string | null | no |
| Evidence.retrieved_at | string (date-time) | null | no |
| Evidence.source_version | string | null | no |
| Evidence.source_record_id | string | null | no |
| Evidence.source_run_id | string | null | no |
| Evidence.attribute | string | null | no |
| Evidence.rule_version | string | null | no |
| HTTPValidationError.detail | array<ValidationError> | no |
| MedicationRelation.id | string (uuid) | yes |
| MedicationRelation.type | string | yes |
| MedicationRelation.source_id | string (uuid) | yes |
| MedicationRelation.target_id | string (uuid) | yes |
| MedicationRelation.direction | string | yes |
| MedicationRelation.evidence | Evidence | yes |
| MedicationRelation.valid_from | string (date) | null | no |
| MedicationRelation.valid_to | string (date) | null | no |
| Problem.type | string | yes |
| Problem.title | string | yes |
| Problem.status | integer | yes |
| Problem.code | string | yes |
| Problem.detail | string | null | no |
| Problem.request_id | string | yes |
| RelationPage.data | array<MedicationRelation> | yes |
| ValidationError.loc | array<string | integer> | yes |
| ValidationError.msg | string | yes |
| ValidationError.type | string | yes |
| ValidationError.input | object | no |
| ValidationError.ctx | object | no |