Idempotency and External Identifiers
Current idempotency model for document creation and delivery callbacks in the Numora Public API developer preview.
Scope
This page explains the current idempotency model used by the Numora Public API developer preview.
The important distinction is:
- document creation currently centers on
external_id - delivery callbacks currently center on
execution_id - a generic header-based idempotency contract is not yet the primary public model
Current Preview Model
In the current preview, Numora uses resource-specific identifiers for retry safety.
Document creation
POST /v1/documents
Use external_id when your system needs to create or retry the same logical document submission safely.
Current behavior:
external_idis scoped to the same user and schema- resubmitting the same
external_idfor the same schema returns the existing document resource instead of creating a new logical document
Practical meaning:
- use one stable
external_idper upstream business document - do not generate a new
external_idon every retry
Delivery callback
POST /v1/documents/{id}/delivery
Use execution_id when your external worker needs to retry the same delivery callback safely.
Current behavior:
- the callback is idempotent by
execution_id - replaying the same
execution_idwith the same delivery data is accepted - replaying the same
execution_idwith different delivery data returns409 conflict
What About Idempotency-Key
Some API ecosystems use a generic Idempotency-Key header for all mutating requests.
That is not the main current contract for Numora public API preview routes.
For the current preview, prefer:
external_idfor document creation reconciliationexecution_idfor delivery callback reconciliation
Do not assume that sending Idempotency-Key alone gives retry safety across all /v1 mutating routes.
Recommended Usage
For upstream document systems
When your ERP, email ingestion service, or document queue submits a document:
- choose a stable
external_id - keep that value unchanged when retrying the same business document
- store the returned Numora
document.id
Example:
{
"schema": "invoice_v2",
"file_url": "https://example.com/invoice-001.pdf",
"external_id": "ap-100024"
}For external delivery workers
When your worker writes to a destination system outside Numora:
- generate one stable
execution_idfor that delivery attempt - reuse it if you need to replay the same callback
- never reuse it for a semantically different delivery result
Recommended Mental Model
document.id: Numora-assigned resource identifierexternal_id: client-assigned business identifier for document creation reconciliationexecution_id: client-assigned attempt identifier for delivery callback reconciliation