Create a fiscal delivery
const url = 'https://api.timbro.dev/v1/fiscal_documents/example/deliveries';const options = { method: 'POST', headers: { 'idempotency-key': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"recipientEmail":"hello@example.com"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.timbro.dev/v1/fiscal_documents/example/deliveries \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'idempotency-key: example' \ --data '{ "recipientEmail": "hello@example.com" }'Queues delivery of a fiscal document; delivery remains pending until the document is ready.
Authorizations
Sección titulada «Authorizations»Parameters
Sección titulada «Parameters»Path Parameters
Sección titulada «Path Parameters»Fiscal document whose delivery is requested.
Header Parameters
Sección titulada «Header Parameters»Request Bodyrequired
Sección titulada «Request Bodyrequired»Request delivery of an already issued fiscal document.
Request delivery of an already issued fiscal document.
object
Examplegenerated
{ "recipientEmail": "hello@example.com"}Responses
Sección titulada «Responses»Default Response
The request could not be understood or is not valid for this merchant account.
The request could not be understood or is not valid for this merchant account.
object
object
Stable machine-readable code. Branch on this, never on message.
Human-readable. Wording may change; not a stable contract.
Dotted path to the offending request field.
Correlation id, also returned as the Request-Id header.
Example
{ "error": { "type": "invalid_request", "code": "parameter_missing" }}The credential is missing, malformed, or no longer valid.
The credential is missing, malformed, or no longer valid.
object
object
Stable machine-readable code. Branch on this, never on message.
Human-readable. Wording may change; not a stable contract.
Dotted path to the offending request field.
Correlation id, also returned as the Request-Id header.
Example
{ "error": { "type": "authentication_error", "code": "api_key_missing" }}The credential is valid but not permitted to perform this operation on this resource.
The credential is valid but not permitted to perform this operation on this resource.
object
object
Stable machine-readable code. Branch on this, never on message.
Human-readable. Wording may change; not a stable contract.
Dotted path to the offending request field.
Correlation id, also returned as the Request-Id header.
Example
{ "error": { "type": "permission_error", "code": "merchant_account_not_owned" }}No endpoint serves this method and path, or no resource with this identifier exists within the caller's tenant.
No endpoint serves this method and path, or no resource with this identifier exists within the caller's tenant.
object
object
Stable machine-readable code. Branch on this, never on message.
Human-readable. Wording may change; not a stable contract.
Dotted path to the offending request field.
Correlation id, also returned as the Request-Id header.
Example
{ "error": { "type": "invalid_request", "code": "endpoint_not_found" }}The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.
The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.
object
object
Stable machine-readable code. Branch on this, never on message.
Human-readable. Wording may change; not a stable contract.
Dotted path to the offending request field.
Correlation id, also returned as the Request-Id header.
Example
{ "error": { "type": "conflict_error", "code": "idempotency_key_reused" }}The request is well-formed but cannot be carried out for this payment or this merchant account.
The request is well-formed but cannot be carried out for this payment or this merchant account.
object
object
Stable machine-readable code. Branch on this, never on message.
Human-readable. Wording may change; not a stable contract.
Dotted path to the offending request field.
Correlation id, also returned as the Request-Id header.
Example
{ "error": { "type": "invalid_request", "code": "merchant_account_not_ready" }}Too many requests. Retry after the interval in the Retry-After header.
Too many requests. Retry after the interval in the Retry-After header.
object
object
Stable machine-readable code. Branch on this, never on message.
Human-readable. Wording may change; not a stable contract.
Dotted path to the offending request field.
Correlation id, also returned as the Request-Id header.
Example
{ "error": { "type": "rate_limit_error", "code": "rate_limit_exceeded" }}The gateway failed before reaching a payment outcome. Retry with the same Idempotency-Key.
The gateway failed before reaching a payment outcome. Retry with the same Idempotency-Key.
object
object
Stable machine-readable code. Branch on this, never on message.
Human-readable. Wording may change; not a stable contract.
Dotted path to the offending request field.
Correlation id, also returned as the Request-Id header.
Example
{ "error": { "type": "api_error", "code": "internal_error" }}The payment provider rejected the request or could not be reached before anything was submitted. Safe to retry with the same Idempotency-Key.
The payment provider rejected the request or could not be reached before anything was submitted. Safe to retry with the same Idempotency-Key.
object
object
Stable machine-readable code. Branch on this, never on message.
Human-readable. Wording may change; not a stable contract.
Dotted path to the offending request field.
Correlation id, also returned as the Request-Id header.
Example
{ "error": { "type": "provider_error", "code": "provider_unavailable" }}