Waybills
POST /v1/waybills issues a waybill (guía de remisión, XML 1.1.0): the document that covers goods while they travel, from a departure address to one or more recipients.
Request
Section titled “Request”curl https://api.flashpi.com.ec/v1/waybills \ -H "Authorization: Bearer $FLASHPI_API_KEY" \ -H "Idempotency-Key: shipment-SH-7710" \ -H "Content-Type: application/json" \ -d @waybill.json{ "issuerId": "01a0fd6a-d098-76ca-b492-1bcb6505a7bd", "establishment": "001", "emissionPoint": "001", "issueDate": "2026-10-15", "departureAddress": "Km 12 vía a Daule, Guayaquil", "carrier": { "idType": "ruc", "id": "0190000000001", "name": "Transportes Andinos Cía. Ltda." }, "licensePlate": "GBA1234", "transportStartDate": "2026-10-15", "transportEndDate": "2026-10-16", "recipients": [ { "id": "1790000000001", "name": "Supermercados La Pradera S.A.", "address": "Av. Amazonas N34-12, Quito", "transferReason": "Sale", "destinationEstablishment": "003", "route": "Guayaquil - Santo Domingo - Quito", "supportingDocument": { "type": "invoice", "number": "001-001-000000123", "authorizationNumber": "1510202601179000000000110010010000001239052713811", "issueDate": "2026-10-15" }, "items": [ { "code": "CAF-500", "description": "Ground coffee 500 g", "quantity": "24" }, { "code": "CAF-GR1", "description": "Coffee beans 1 kg", "quantity": "10" } ] } ]}| Field | Required | Notes |
|---|---|---|
departureAddress |
Yes | Where the transport starts. |
carrier |
Yes | Who carries the goods: idType (not final_consumer), id and name. |
licensePlate |
Yes | The vehicle’s plate, up to 20 characters. |
transportStartDate, transportEndDate |
Yes | The start, not before the issue date, and the end, not before the start. |
recipients |
Yes | 1 to 100 destinations, see below. |
Each recipient has:
| Field | Required | Notes |
|---|---|---|
id, name, address |
Yes | Who receives the goods, and where. |
transferReason |
Yes | Why the goods move (a sale, a transfer between establishments, a return…). |
items |
Yes | 1 to 1000 goods, each with description and quantity (up to 6 decimals), and optionally code, auxiliaryCode and up to 3 additionalDetails. |
supportingDocument |
No | The document that supports the transfer, usually the sales invoice: type, number, authorizationNumber (10, 37 or 49 digits) and issueDate. |
destinationEstablishment |
No | The recipient’s establishment code. |
route |
No | The route. |
customsDocument |
No | The single customs document (DAU), for imports and exports. |
A waybill has no prices, taxes or payments, so it takes no expectedTotal. The fields every request shares work as everywhere.
Response
Section titled “Response”202 Accepted. A waybill’s totals are null, its counterparty is the carrier, and its email.status is skipped, because a waybill request has no email address:
{ "id": "01a14182-44ab-71bb-ad6d-76fbecb9ee53", "type": "waybill", "environment": "test", "status": "processing", "issuerId": "01a0fd6a-d098-76ca-b492-1bcb6505a7bd", "establishment": "001", "emissionPoint": "001", "sequential": 45, "number": "001-001-000000045", "accessKey": "1510202606179000000000110010010000000458031462713", "issueDate": "2026-10-15", "xmlVersion": "1.1.0", "counterparty": { "id": "0190000000001", "name": "Transportes Andinos Cía. Ltda." }, "totals": null, "authorization": { "number": null, "authorizedAt": null }, "ride": { "status": "pending", "template": null, "generatedAt": null }, "email": { "requested": true, "status": "skipped", "deliveries": [], "warnings": [] }, "sriMessages": [], "failure": null, "voidedAt": null, "createdAt": "2026-10-15T21:40:18.731Z", "updatedAt": "2026-10-15T21:40:18.731Z"}The waybill’s XML has no issue date of its own, so its RIDE prints the transport dates. Download the RIDE with GET /v1/documents/{id}/pdf to send it along with the goods. With options.waitForAuthorization the answer can be 200 OK with the final status (Sync and async modes). The waybill.authorized and waybill.rejected webhooks report the SRI’s decision.
To reference the waybill on the invoice of the same goods, send its number as the invoice’s waybillNumber.
Errors
Section titled “Errors”| Answer | When |
|---|---|
422 validation_failed |
For example transportStartDate before the issue date (date_too_early), transportEndDate before the start, or a carrier identified as a final consumer. |
409 sequential_already_used, sequentials_exhausted |
See Sequentials. |