Correct and resubmit delivery note
Only for a returned or not_authorized document. The SRI receives the correction with the same number and the same access key: the document keeps both, gains a revision and goes back to pending.
Your API key, which acts for the one business it was created for: fb_sandbox_… issues in sandbox, fb_test_… in test, the tax authority's testing service, and fb_live_… in live.
In: header
Path Parameters
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
The corrected document. Its number, access key and issue date do not change.
^[^\n\r]*$1 <= length <= 300^[A-Z0-9-]{1,20}$datedate1 <= itemsThe fiscal machine the document is issued from (annex 13). Only when one issues it.
[]Up to 20 pairs of your own, such as your order id, returned as sent and never interpreted; lists filter by them (metadata[key]=value).
{}Only with a sandbox key (422 in test and live, where the SRI decides): the outcome the simulator gives this revision, to rehearse how your system handles each one. Without it, it is authorized.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/v1/ec/delivery-notes/497f6eca-6276-4993-bfeb-53cbbbba6f08/resubmit" \ -H "Content-Type: application/json" \ -d '{ "origin_address": "string", "carrier": { "identification_type": "ruc", "identification": "string", "name": "string" }, "plate": "string", "transport_start": "2019-08-24", "transport_end": "2019-08-24", "recipients": [ { "identification": "string", "name": "string", "address": "string", "email": "user@example.com", "reason": "string", "items": [ { "description": "string", "quantity": "string" } ] } ] }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "country": "ec", "currency": "string", "environment": "sandbox", "status": "pending", "status_transitions": { "pending": "2019-08-24T14:15:22Z", "submitted": "2019-08-24T14:15:22Z", "authorized": "2019-08-24T14:15:22Z", "returned": "2019-08-24T14:15:22Z", "not_authorized": "2019-08-24T14:15:22Z", "annulled": "2019-08-24T14:15:22Z" }, "entity_id": "8161163a-f227-466f-bc01-090a01e80165", "number": "string", "access_key": "stringstringstringstringstringstringstringstrings", "authorization": { "number": "string", "authorized_at": "2019-08-24T14:15:22Z" }, "sri_messages": [ { "code": "string", "message": "string", "detail": "string", "type": "error", "cause": "string", "remedy": "string" } ], "metadata": { "property1": "string", "property2": "string" }, "issued_at": "2019-08-24T14:15:22Z", "delivery_status": "sent", "emails": [ { "to": "string", "status": "sent", "sent_at": "2019-08-24T14:15:22Z", "delivered_at": "2019-08-24T14:15:22Z", "opened_at": "2019-08-24T14:15:22Z", "bounced_at": "2019-08-24T14:15:22Z", "complained_at": "2019-08-24T14:15:22Z", "bounce_type": "permanent" } ], "portal_views": 0, "portal_last_viewed_at": "2019-08-24T14:15:22Z", "channel": "api", "import_id": "13230382-dadc-41f2-963d-e123bd5c0585", "verification": "sri", "listing": { "import_id": "13230382-dadc-41f2-963d-e123bd5c0585", "file": "string", "entry": "string", "sha256": "stringstringstringstringstringstringstringstringstringstringstri", "line": 1, "authorized_at": "2019-08-24T14:15:22Z" }, "object": "delivery_note", "issue_date": "string", "origin_address": "string", "carrier": { "identification_type": "ruc", "identification": "string", "name": "string" }, "plate": "string", "transport_start": "string", "transport_end": "string", "recipients": [ { "identification": "string", "name": "string", "address": "string", "email": "string", "reason": "string", "route": "string", "customs_document": "string", "destination_establishment": "string", "support_document": { "document_type": "factura", "number": "string", "issue_date": "string", "authorization_number": "string" }, "items": [ { "code": "string", "auxiliary_code": "string", "description": "string", "quantity": "string", "additional_info": [ { "name": "string", "value": "string" } ] } ] } ], "fiscal_machine": { "brand": "string", "model": "string", "serial": "string" }, "additional_info": [ { "name": "string", "value": "string" } ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Retrieve delivery note GET
The document with its current status and its access key, as Fiscalbase knows it. It only reads: it does not ask the SRI at that moment; for that there is `POST /v1/ec/documents/{id}/refresh-status`. Send `wait` to answer once the SRI decides on a `pending` or `submitted` one.
Renumber delivery note POST
Only for a `returned` document with error 45, SECUENCIAL REGISTRADO: another document of the RUC already has that number at the SRI. It takes the next number in its series with a new access key, keeps its content and its issue date, gains a revision and goes back to `pending`. In `sandbox` and `test` this happens on its own; in `live` never, because that number belongs to an authorized document that Fiscalbase does not know about.