PUT {{URL_BASE}}/orders/admin/bulk
Applies to several orders what Order modification does to a single one: it accepts both the content of each order and its status and delivery date.
Each order in the batch is processed independently: the response carries one result per order, and the failure of one does not stop the rest.
<aside> π
Within each order, the only required field is id. Only what it contains is modified; the rest of the order is left intact. Any other field sent is ignored.
</aside>
| Field | Type | Requirement | Description | Examples |
|---|---|---|---|---|
data |
π‘ List of Objects β Order | π’ Required | Between 1 and 500 orders. See details below. |
No other fields are allowed at the top level of the request body.
Each data record.
| Field | Type | Requirement | Description | Examples |
|---|---|---|---|---|
id |
π Text | π’ Required | Identifier of the order to modify. Accepts the YOM _id or the orderId from the customer's ERP. |
|
| The order number is not accepted.* | "66f0a1b2c3d4e5f6a7b8c9d0" |
|||
products |
π‘ List of Objects | βͺ Optional | Order line items. It supports the same two formats as the single-order endpoint. | |
sellerDiscounts |
π‘ List of Objects | βͺ Optional | Discounts applied by the Seller. | |
shippingAddress |
π Object | βͺ Optional | Delivery address for the order. | |
observation |
π Text | βͺ Optional | Order observation. | "Entregar por la maΓ±ana" |
externalPurchaseOrderId |
π Text | βͺ Optional | Purchase order in the customer's system. | "OC-88231" |
type |
π Text | βͺ Optional | Order type. | |
"order" β order |
||||
"quote" β quote |
"order" |
|||
distributionCenterId |
π ObjectId | βͺ Optional | Order distribution center. | |
*\*Accepts *null to leave it unassigned. |
"650a1b2c3d4e5f6a7b8c9d99" |
|||
distributionCenterName |
π Text | βͺ Optional | Distribution center name. | |
*\*Accepts *null to leave it unassigned. |
"CD Santiago" |
|||
status |
π Text | βͺ Optional | New order status. See valid values below. | "shipped" |
externalStatus |
π Object | βͺ Optional | Order external status, for display only. It carries a single key field, which must match one of the statuses configured for the customer. See external status below. |
{ "key": "en_bodega" } |
estimatedDeliverAt |
π Date | βͺ Optional | Delivery date, in ISO 8601 format. | |
| *\An invalid date is ignored and the previous one is kept. | "2030-01-15T00:00:00.000Z" |
|||
orderId |
π Text | βͺ Optional | Order identifier in the customer's ERP. | |
*\*If the order was identified by its ERP number in *id, this field can only repeat that same value. |
"ERP-99812" |
|||
orderCode |
π Text | βͺ Optional | Order code. | "COD-4471" |
integrationErrorDetails |
π Text | βͺ Optional | Integration error details. | "Timeout al conectar con el ERP" |
When an order includes status fields, its content changes are applied first and the totals are recalculated, and only then is the status transition executed β this way notifications and the ERP submission see the order already in its final form.
In addition to status, each order can carry an external status of the customer's own: a label with its name and its color, which YOM displays as is in the B2B portal, the admin panel, and the mobile app. It is for display only: it does not replace status or modify it, and changing it does not trigger ERP submissions, emails, notifications, or credit movements.
It is sent as an object with a single key field, and it can be sent on its own, without status. The key must match one of the external statuses configured for the customer.
<aside> β οΈ
</aside>
YOM records which external statuses each order has passed through, and that sequence is what draws the order tracking in the B2B portal. YOM maintains that history: it is not sent in the request. Sending the same key the order already has produces no change.
status| --- | --- |
PUT {{URL_BASE}}/orders/admin/bulk
{
"data": [
{
"id": "66f0a1b2c3d4e5f6a7b8c9d0",
"status": "shipped",
"estimatedDeliverAt": "2030-01-15T00:00:00.000Z"
},
{
"id": "ERP-99812",
"products": [
{ "productId": "650a1b2c3d4e5f6a7b8c9d01", "quantity": 8 }
]
},
{
"id": "66f0a1b2c3d4e5f6a7b8c9d2",
"observation": "Entregar por la maΓ±ana",
"status": "delivered"
},
{
"id": "66f0a1b2c3d4e5f6a7b8c9d3",
"externalStatus": { "key": "en_bodega" }
}
]
}