API reference · Orders · Store Management
Update Item Lead Time
- Method
- PUT
- Route
-
/partnerOrders/:id/partnerOrderLines - Base URL
https://ws.autorei.net- Path parameters
:id- Token
- Requires Bearer token
Opens this request in the public API documentation, the official source of the reference.
Description
Reports the preparation lead time for the items left with lead time on request. This submission is what 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 on Request.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer | Yes | Id of the partner order (partnerOrderId). |
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
partnerOrderLineList |
array | Yes | The order items that have a pending lead time. |
partnerOrderLineList[].id |
integer | Yes | Order line id — the field id from the query, and the deliveries[].products[].partnerOrderLineId from the order details. |
partnerOrderLineList[].leadTime |
integer | Yes | Item preparation lead time, in days. Greater than zero. |
Business rules
All pending items, at once
The request must include all the order items that have a pending lead time. If one is missing, nothing is saved and the response is 422. There is no partial submission: fetch the list, answer the entire list.
The order must be waiting for the lead time
Only accepts an order that was created with an on-request lead time and that has not yet had its lead times answered. 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 rejected.
What answering the lead time triggers
Once the lead times are saved, three things happen at once: the delivery preparation time now adds the longest lead time reported — and, in stores configured for it, the freight time also adds up; the order is marked as answered; and the customer is notified that the order is available for payment.
Response · 200
Array with the order lines, already with the lead times saved.
| Field | Description |
|---|---|
id |
Order line id. |
quantity |
Total quantity of the item. |
leadTime |
Saved preparation lead time, in days. |
salePrice · realSalePrice · defaultPrice |
Line prices. |
stock |
Item's origin inventory. |
partnerOrder |
Partner order id. |
customerType · couponId |
Line customer type and applied coupon, when there is one. |
taxes |
Line taxes, when there are any: taxPurpose, taxPurposeId, st, ipi, icms, pis, cofins, totalTax. |
Errors
| Code | When |
|---|---|
| 400 | The body is not valid JSON. The detail is in error. |
| 422 | The order is not yours; it is not an on-request lead time order or the lead times have already been answered; the status does not allow the update; an item came without id or without leadTime; or one of the pending items is missing. The reason is in message. |
| 401 | Token missing, malformed, or expired. |
Example request
curl --request PUT 'https://ws.autorei.net/partnerOrders/:id/partnerOrderLines' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data '{
"partnerOrderLineList": [
{
"id": 4490101,
"leadTime": 5
},
{
"id": 4490102,
"leadTime": 3
}
]
}' Example responses
200Success — lead times reported
[
{
"id": 4490101,
"quantity": 2,
"leadTime": 5,
"salePrice": 149.9,
"realSalePrice": 149.9,
"defaultPrice": 159.9,
"stock": 4410001,
"partnerOrder": 900201,
"customerType": "pf",
"couponId": null
},
{
"id": 4490102,
"quantity": 1,
"leadTime": 3,
"salePrice": 89.9,
"realSalePrice": 89.9,
"defaultPrice": 89.9,
"stock": 4410002,
"partnerOrder": 900201,
"customerType": "pf",
"couponId": null
}
] Used in
- Use casesEcommerce ERP integration: the typical path through the API
- Use casesB2B procurement and supplies: the typical path through the API
Related endpoints
Generated from the public API collection, published on 2026-09-04: api-docs.cws.digital.