Quotes
Quote, pay for and cancel a delivery on a customer's behalf.
Create a quote
Prices a shipment and saves the quotation; every call saves a new one. Coordinates are required: resolve free text through `POST /api/address/resolve` first. The cheapest option wins; when no single vehicle fits, a multi-vehicle composition may be offered instead (`vehicle` null, `vehicles` set).
List a sender's quotes
All quotations owned by the sender account, newest first, each with its order if one exists. No filters or paging. Signature only; a user session is not accepted. The sender account is named in `X-Sender-Account-Id`, which is outside the signature: it must belong to the organization of the API key. Missing header: 401 `unauthenticated`. Malformed, unknown or another organization's account: 403 `forbidden` (the same answer for all three).
Get a quote
Opening a quote that has no owner claims it for the sender, provided it is still `active` and not expired; from then on only that sender can read, pay or cancel it. Signature only; a user session is not accepted. The sender account is named in `X-Sender-Account-Id`, which is outside the signature: it must belong to the organization of the API key. Missing header: 401 `unauthenticated`. Malformed, unknown or another organization's account: 403 `forbidden` (the same answer for all three).
List payment methods for a quote
The methods this quote can be paid with, and whether each works right now for the quote's amount. Call it before Pay rather than hard-coding a list. Like Get a quote, it claims an ownerless quote. Signature only; a user session is not accepted. The sender account is named in `X-Sender-Account-Id`, which is outside the signature: it must belong to the organization of the API key. Missing header: 401 `unauthenticated`. Malformed, unknown or another organization's account: 403 `forbidden` (the same answer for all three).
Pay a quote
Creates the order (waybill and delivery) from the quote, marks the quote `accepted`, then starts the payment. Creating the order is idempotent: calling Pay again reuses it, so a failed payment can be retried with another method. The order stays when the payment step fails.
Cancel a quote
Cancels the quote while it is `active` and has no order. Once Pay created an order, cancels that order instead, as long as it still awaits payment. The body carries only the signature fields. Signature only; a user session is not accepted. The sender account is named in `X-Sender-Account-Id`, which is outside the signature: it must belong to the organization of the API key. Missing header: 401 `unauthenticated`. Malformed, unknown or another organization's account: 403 `forbidden` (the same answer for all three).