Leia mudanças publicadas#
GET /v1/changes retorna eventos publicados com data e next_cursor. Na primeira consulta, omita since. limit aceita de 1 a 100 com padrão 50. A ordenação por occurred_at e UUID fornece paginação estável no histórico disponível.
curl --fail-with-body --get "$IABULA_API_BASE/v1/changes" \
--header "X-API-Key: $IABULA_API_KEY" \
--data-urlencode "limit=50"Continue com since#
Envie o next_cursor recebido como since na chamada seguinte. Preserve o cursor mesmo após data vir vazia para continuar o polling mais tarde. Não reutilize cursores de busca neste feed. Um consumidor deve persistir o cursor apenas depois de processar os eventos com sucesso.
curl --fail-with-body --get "$IABULA_API_BASE/v1/changes" \
--header "X-API-Key: $IABULA_API_KEY" \
--data-urlencode "since=$IABULA_CURSOR" \
--data-urlencode "limit=50"Mudança observada não é conclusão clínica#
Eventos canônicos usam created, updated ou withdrawn. Comparações de fontes podem usar observed_in_source, changed_in_source e removed_from_source. A interpretação depende de entity_type, before, after e evidence.
Sincronização defensiva#
Use o ID do evento para evitar processamento duplicado em sua integração. Leia a classe e origem resumida de evidência; rastreabilidade técnica detalhada permanece interna. A entrega é por consulta HTTP; não há webhook de alterações documentado no V1.
GET /v1/changes#
| Parâmetro | Local | Obrigatório | Tipo e limites |
|---|---|---|---|
| since | query | no | string; maxLength=2048 | null |
| limit | query | no | integer; minimum=1, maximum=100, default=50 |
| HTTP | Content-Type | Schema |
|---|---|---|
| 200 | application/json | ChangePage |
| 400 | application/json | Problem |
| 401 | application/json | Problem |
| 403 | application/json | Problem |
| 429 | application/json | Problem |
| 500 | application/json | Problem |
| 503 | application/json | Problem |
| 422 | application/json | HTTPValidationError |
Campos do contrato OpenAPI#
| Schema.campo | Tipo e limites | Obrigatório |
|---|---|---|
| ChangeEvidence.class | string | yes |
| ChangeEvidence.source | string | null | no |
| ChangeEvidence.attribute | string | null | no |
| ChangePage.data | array<ChangeRecord> | yes |
| ChangePage.next_cursor | string | null | yes |
| ChangeRecord.id | string (uuid) | yes |
| ChangeRecord.entity_type | string | yes |
| ChangeRecord.entity_id | string (uuid) | null | yes |
| ChangeRecord.operation | string: created, updated, withdrawn, observed_in_source, changed_in_source, removed_from_source | yes |
| ChangeRecord.before | ChangeSnapshot | null | no |
| ChangeRecord.after | ChangeSnapshot | null | no |
| ChangeRecord.occurred_at | string (date-time) | yes |
| ChangeRecord.evidence | ChangeEvidence | yes |
| ChangeSnapshot.canonical_name | string | null | no |
| ChangeSnapshot.source_laboratory | string | null | no |
| ChangeSnapshot.source_cnpj | string | null | no |
| ChangeSnapshot.product_name | string | null | no |
| ChangeSnapshot.registration_number | string | null | no |
| ChangeSnapshot.process_number | string | null | no |
| ChangeSnapshot.process_completion_date | string (date) | null | no |
| ChangeSnapshot.regulatory_category_id | string (uuid) | null | no |
| ChangeSnapshot.holder_company_id | string (uuid) | null | no |
| ChangeSnapshot.status | string | null | no |
| ChangeSnapshot.valid_from | string (date) | null | no |
| ChangeSnapshot.valid_to | string (date) | null | no |
| ChangeSnapshot.valid_to_month | string | null | no |
| ChangeSnapshot.code | string | null | no |
| ChangeSnapshot.denomination | string | null | no |
| ChangeSnapshot.dcb_id | string (uuid) | null | no |
| ChangeSnapshot.drug_product_id | string (uuid) | null | no |
| ChangeSnapshot.pharmaceutical_form_id | string (uuid) | null | no |
| ChangeSnapshot.medication_variant_id | string (uuid) | null | no |
| ChangeSnapshot.active_ingredient_id | string (uuid) | null | no |
| ChangeSnapshot.package_description | string | null | no |
| ChangeSnapshot.strength | string | null | no |
| ChangeSnapshot.ean | string | null | no |
| ChangeSnapshot.ggrem | string | null | no |
| HTTPValidationError.detail | array<ValidationError> | 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 |
| ValidationError.loc | array<string | integer> | yes |
| ValidationError.msg | string | yes |
| ValidationError.type | string | yes |
| ValidationError.input | object | no |
| ValidationError.ctx | object | no |