# Active ingredients and Brazilian DCB records

Retrieve ingredients by canonical UUID and understand DCB records, source text and active-ingredient identity.

Canonical: https://iabula.com/docs/en/ingredients

## Canonical ingredient versus published text

A medication's active_ingredient_text is a text field. It is not an ActiveIngredient UUID and does not independently confirm a structured link. GET /v1/ingredients/{id} requires a real canonical ingredient UUID from an approved catalog link.

> V1 does not include an ingredient name-search endpoint. Do not use medication IDs here or construct IDs from text.

## Retrieve by identifier

```bash
curl --fail-with-body "$IABULA_API_BASE/v1/ingredients/$IABULA_INGREDIENT_ID" \
  --header "X-API-Key: $IABULA_API_KEY"
```

Set IABULA_INGREDIENT_ID to an existing canonical identifier. The response contains id, name, dcbs and evidence. Each DCB contains id, code, denomination and evidence. An unknown ingredient returns HTTP 404; this is not evidence that the substance does not exist.

## What DCB records add

DCB means Denominação Comum Brasileira, the Brazilian common denomination. The adopted dataset provides the public number and denomination. Do not infer clinical properties, therapeutic equivalence or recommendations from a name. Evidence identifies source data and supported catalog links.

- [Active-ingredient guide](https://iabula.com/docs/en/guides/obter-principio-ativo)
- [Provenance and coverage](https://iabula.com/docs/en/provenance)

## GET /v1/ingredients/{id}

| Parameter | Location | Required | Type and bounds |
| --- | --- | --- | --- |
| id | path | yes | string (uuid) |

| HTTP | Content-Type | Schema |
| --- | --- | --- |
| 200 | application/json | IngredientDetail |
| 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 |
| --- | --- | --- |
| DCBDetail.id | string (uuid) | yes |
| DCBDetail.code | string | yes |
| DCBDetail.denomination | string | yes |
| DCBDetail.evidence | Evidence | yes |
| 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 |
| IngredientDetail.id | string (uuid) | yes |
| IngredientDetail.name | string | yes |
| IngredientDetail.dcbs | array<DCBDetail> | yes |
| IngredientDetail.evidence | array<Evidence> | yes |
| 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 |
| ValidationError.loc | array<string \| integer> | yes |
| ValidationError.msg | string | yes |
| ValidationError.type | string | yes |
| ValidationError.input | object | no |
| ValidationError.ctx | object | no |

## Resources

- [OpenAPI JSON](https://iabula.com/openapi.json)
- [Swagger](https://iabula.com/docs/swagger)
- [Documentation index](https://iabula.com/llms.txt)
