Files
JiriUhlir 0e05fef335 first
2026-07-16 11:56:15 +02:00

39 lines
1.6 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Objednávky přepravy a svozu
| Endpoint služby | Upstream CPL | Popis |
|---|---|---|
| `POST /orders/batch` | `POST order/batch` | vytvoření objednávek (max 100), vrací `batchId` |
| `GET /orders/batch/{batchId}` | `GET order/batch/{batchId}` | stav zpracování |
| `POST /orders/create-and-wait` | (kombinace) | synchronní obálka |
| `GET /orders` | `GET order` | vyhledání objednávek |
| `POST /orders/cancel` | `POST order/cancel` | zrušení objednávky |
## Typy objednávek (`orderType`)
- **CollectionOrder** — svoz z registrované adresy zákazníka (pravidelní
odesílatelé). `recipient` se neuvádí.
- **TransportOrder** — vyzvednutí z libovolné adresy; `sender` i `recipient`
jsou povinné.
Povinná pole: `referenceId` (150 znaků), `shipmentCount` (150), `sendDate`.
Volitelné: `productType` (BUSS domácí / IMPO mezinárodní), `customerReference`,
`email`, `note`, `sendTimeFrom`, `sendTimeTo`.
## Stav zpracování
`GET /orders/batch/{batchId}` vrací `items[]` s `importState`
(Accepted/InProcess/Complete/Error) a případným `errorMessage`/`errorCode`.
## Vyhledání
`GET /orders?limit=100&offset=0` — filtry: `orderNumbers`, `orderReferences`
(= referenceId z batch requestu), `customerReferences`, `shipmentNumbers`,
`orderIds`, `dateFrom/dateTo`, `sendDate`, `productType`,
`orderStates` (Created, PickedUp, NotPickedUp, Canceled), `orderType`.
Odpověď vrací i přidělená čísla zásilek (`shipmentNumbers`).
## Zrušení
`POST /orders/cancel?orderReference=ORD-0001` (nebo `customerReference=...`),
volitelné tělo `{"note": "důvod"}`.