Relationships of a record#
GET /v1/medications/{id}/relations returns a data list with typed relationships available for the identified medication. Each relationship includes source and target identifiers, type, direction, evidence and validity dates when available.
curl --fail-with-body "$IABULA_API_BASE/v1/medications/$IABULA_MEDICATION_ID/relations" \
--header "X-API-Key: $IABULA_API_KEY"An empty list describes coverage#
The explicit regulatory relationship dataset is not populated in the documented V1 baseline. The route is operational, but consumers must treat empty lists as valid results. HTTP 404 indicates an unknown medication identifier.
Relationships are not recommendations#
Regulatory relationships require traceable evidence. Textual similarity or shared ingredients do not establish interchangeability. The API does not recommend substitution or treatment.
GET /v1/medications/{id}/relations#
| Parameter | Location | Required | Type and bounds |
|---|---|---|---|
| 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 |
OpenAPI contract fields#
| Schema.field | Type and bounds | Required |
|---|---|---|
| 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 |