API reference · Orders
Update Items Lead Time
https://api.sandbox.cws.digital/partnerOrders/{id}/partnerOrderLinesDescription
Reports the preparation lead time of the items left with the lead time upon request. It is this submission that releases the order for payment: once the lead times are answered, the customer is notified that the order is available.
The pending items are in List Items with Lead Time Upon Request.
Parameters
Path parameters
| Field | Type | Required | Description | Value |
|---|---|---|---|---|
| id | integer | Yes | Id of the partner order ( |
Request body
application/jsonRequired| Field | Type | Required | Description | Value |
|---|---|---|---|---|
| partnerOrderLineList | array of object | Yes | The order items whose lead time is pending. Fields in partnerOrderLineList[] |
partnerOrderLineList[]| Field | Type | Required | Description | Value |
|---|---|---|---|---|
| id | integer | Yes | Order line id — the | |
| leadTime | integer | Yes | Item preparation lead time, in days. Greater than zero. |
Business rules
All pending items, at once
The request must bring all the order items whose lead time is pending. If one is missing, nothing is saved and the response is 422.
There is no partial submission: check the list, answer the whole list.
The order must be waiting for the lead time
Only accepts an order that was born with lead time upon request and that has not had its lead times answered yet. Once answered, the lead time cannot be edited again here.
The status must allow it
The order must be in PRE_ORDER, AWAITING_PAYMENT or PAYMENT_APPROVED. In any other status the update is refused.
What answering the lead time triggers
Once the lead times are saved, three things happen at once:
- the delivery preparation lead time adds the largest reported lead time — and, in stores configured for it, the freight lead time adds it too;
- the order is marked as answered;
- the customer is notified that the order is available for payment.
Responses
- 401
Missing, malformed or expired token.