Create a Nova Poshta waybill for an order
np_create_waybillCreates a Nova Poshta waybill (ТТН) for a store order: resolves the city and branch from the order, applies the sender and parcel defaults, adds cash on delivery for unpaid cash-on-delivery orders and writes the waybill number back to the order. When the city or branch is ambiguous it creates nothing and returns the candidates (status needs_choice).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"order_ref": "<order_ref>"
},
"name": "np_create_waybill"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| payer | No | Who pays for delivery | |
| seats | No | Number of parcels (seats) | |
| city_ref | No | City Ref chosen among candidates | |
| width_cm | No | ||
| height_cm | No | ||
| length_cm | No | ||
| order_ref | Yes | Order reference from list_orders, e.g. prom:312874561 | |
| ship_date | No | Shipping date YYYY-MM-DD; default today | |
| weight_kg | No | Weight; default from settings | |
| cod_amount | No | Cash on delivery; 0 disables it | |
| description | No | Cargo description | |
| connection_id | No | Nova Poshta connection id from list_connections; default: the main one | |
| warehouse_ref | No | Branch/parcel-locker Ref chosen among candidates | |
| declared_value | No | Declared value; default = order total |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ttn | No | ||
| city | No | ||
| demo | No | ||
| note | No | ||
| plan | No | ||
| status | Yes | created | needs_choice | skipped | error | |
| label_url | No | ||
| order_ref | Yes | ||
| warehouse | No | ||
| cod_amount | No | ||
| written_back | No | ||
| delivery_cost | No | ||
| declared_value | No | ||
| status_changed | No | ||
| write_back_note | No | ||
| label_100x100_url | No | ||
| estimated_delivery_date | No |