API reference · Orders · Marketplace Management
Update Order Status - Marketplace
- Method
- PUT
- Route
-
/partnerOrders/store/:id - 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.
Correction to the collection · 2026-10-06
orderReasonCanceled is required when the target status is CANCELED. The public collection still shows the field as optional.
Confirmed by the CWS Platform technology team. This page already shows the corrected contract; the public collection does not yet.
Description
Allows the originating store to move an order that was created there to the next status, saving along with it the data that status requires.
The body, the transitions and the response are identical to those of the store route. The difference is the scope and a configuration prerequisite — see The store must be enabled.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer | Yes | Id of the partner order (partnerOrderId), the id field of the listing. |
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
status |
string | Yes | Target status. See Where the order can go. |
supplierOrderId |
string | Conditional | Order number in your system. Required when status is READY. |
supplierInvoiceNumber |
string | No | Invoice (nota fiscal) number. Accepted in READY and SHIPPED. |
supplierInvoiceSerie |
string | No | Invoice series. Accepted in READY and SHIPPED. |
supplierInvoiceKey |
string | No | Invoice access key. Accepted in READY and SHIPPED. |
supplierInvoiceDate |
string | No | Invoice issue date, in YYYY-MM-DD or YYYYMMDD. Any other format rejects the request with 422. |
trackingCode |
string | Conditional | Tracking code. Required in SHIPPED, except with an own carrier. |
urlTrackingCode |
string | No | Carrier tracking URL. Accepted in SHIPPED. |
ownCarrier |
string | No | Indicates delivery by own carrier. Accepted in SHIPPED. |
orderObservation |
string | No | Free-form note saved on the order. Accepted in READY, SHIPPED and DELIVERED. |
orderReasonCanceled |
integer | Conditional | Cancellation reason id. Required in CANCELED — see Cancellation reasons. |
The invoice fields are only saved when the order does not yet have an invoice: resending them on an order that has already been marked with an invoice does not overwrite the values.
Business rules
Where the order can go
The target status is accepted from a specific current status. Outside that combination, the response is 422.
status sent |
Required current status | Specific fields |
|---|---|---|
APPROVED |
order awaiting payment, without credit or with payment in store | — |
READY |
PAYMENT_APPROVED |
supplierOrderId required |
SHIPPED |
READY |
trackingCode required, except with ownCarrier |
DELIVERED |
SHIPPED |
— |
STRAYED |
SHIPPED |
— |
RETURNED |
DELIVERED |
— |
AWAITING_PAYMENT |
AWAITING_PAYMENT |
— |
CANCELED |
any | orderReasonCanceled required |
Payment approval is sent as APPROVED, not as PAYMENT_APPROVED — it is the order that ends up in PAYMENT_APPROVED. The other values of the status enum (PRE_ORDER, PAYMENT_APPROVED, COMPLETED, WITHOUT_CREDIT_LIMIT, STORE_PAYMENT) are used to filter the listing, but are not accepted here: the request responds 422.
Order under an approval workflow
On an order with an approval workflow (approvalWorkflow: true) not yet approved, the only status accepted is CANCELED. Any other responds 422.
Cancellation reasons
orderReasonCanceled receives the reason id:
| Id | Reason | Id | Reason |
|---|---|---|---|
| 2 | 7-day regret | 20 | Payment declined |
| 3 | Logistics problem | 21 | Customer position missing |
| 4 | Description error | 22 | No credit |
| 5 | Lost in transit | 23 | Expired |
| 6 | Missing payment | 24 | Incorrect customer |
| 7 | Store position missing | 26 | Wrong order |
| 8 | Inventory shortfall | 27 | Integration failure |
| 9 | Different brand | 28 | Incorrect sales rep |
| 10 | Damaged product | 29 | Chargeback |
| 11 | Incorrect product | 30 | Fraud – Product recovered |
| 12 | Counterfeit part | 31 | Suspected fraud |
| 13 | Wrong store price | 32 | Assisted repurchase |
| 14 | Pre-order | 33 | Commercial approval denied |
| 15 | Incorrect price | 34 | Order canceled by the sales rep |
| 16 | Wrong composition | 35 | Quotation edited |
| 17 | Shipping delay | ||
| 18 | Duplicate order | ||
| 19 | Test purchase |
Who can cancel
When the order was created in another store — you are the supplier, not the origin —, cancellation depends on the originating store having enabled cancellation by the seller. It is a setting of theirs, not yours: until they enable it, your CANCELED responds 422, and the one who cancels is the originating store itself. With the permission on, cancellation takes effect normally. An order originated in your own store does not go through this check.
Response · 200
The whole order, in the same format as Get Order Details, already with the new status and the corresponding record in orderStatusLogs.
The store must be enabled
Updating orders through the originating store depends on a setting of the store itself. Without it, the request responds 422 without touching the order. Enabling it is done by CWS.
Errors
| Code | When |
|---|---|
| 400 | The body is not valid JSON. The detail comes in error. |
| 422 | Transition not allowed from the current status, required field of the status missing, status outside the accepted values, supplierInvoiceDate in an invalid format, order pending approval workflow, or cancellation not allowed. The reason comes in message. |
| 422 | The store is not enabled to update marketplace orders — see The store must be enabled. |
| 400 | Order validation failure. The reason comes in message. |
| 404 | The order does not exist or is not in your scope. |
| 401 | Token missing, malformed or expired. |
Example request
curl --request PUT 'https://ws.autorei.net/partnerOrders/store/:id' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data '{
"status": "READY",
"supplierOrderId": "PED-ERP-77120",
"supplierInvoiceNumber": "1234",
"supplierInvoiceSerie": "1",
"supplierInvoiceDate": "2026-09-02"
}' Example responses
200Success — ready for shipping
{
"attendant": null,
"orderId": 900100,
"id": 900201,
"status": "READY",
"approvalWorkflow": false,
"workflowIsApproved": false,
"approvalCredit": null,
"subTotal": 35.91,
"subTotalFormats": {
"value": "35,91",
"mask": "R$ 35,91"
},
"taxes": {
"taxPurpose": null,
"taxPurposeId": null,
"st": 0,
"ipi": 0,
"icms": 0,
"pis": 0,
"cofins": 0,
"totalTax": 0
},
"freightTotal": 45.73,
"freightTotalFormats": {
"value": "45,73",
"mask": "R$ 45,73"
},
"total": 81.64,
"totalFormats": {
"value": "81,64",
"mask": "R$ 81,64"
},
"dateCreated": "2026-09-01T13:26:05Z",
"lastUpdated": "2026-09-01T13:27:26Z",
"invoiceNote": null,
"leadTimeByRequestDone": true,
"order": {
"origin": "SHOP",
"originStoreName": "Loja Exemplo",
"originStoreId": 4210,
"originStoreSubdomain": "lojaexemplo",
"originStorePartnerId": 5050,
"drivenPrice": false,
"manualPrice": false
},
"seller": {
"id": 5050,
"name": "Loja Exemplo",
"document": "30.424.972/0001-74"
},
"customer": {
"id": 700101,
"name": "Ana Paula Ribeiro",
"contactName": "Ana Paula Ribeiro",
"email": "ana.ribeiro@exemplo.com.br",
"phone": "(11) 98765-4321",
"type": "pf",
"document": "700.413.648-56",
"stateRegistration": null,
"optinTracking": null,
"trackingPhone": null,
"dateCreated": "2026-08-20T09:15:00Z",
"registrationAddress": {
"street": "Avenida Paulista",
"number": "1578",
"quarter": "Bela Vista",
"city": "São Paulo",
"state": "SP",
"zipcode": "01310-100",
"farmerStateRegistration": null
},
"customerAttributes": [
{
"name": "OPTIN_NEWSLETTER",
"value": "true"
}
]
},
"payments": [
{
"id": 4490201,
"paymentType": "BANK_SLIP",
"gateway": "GATEWAY_DE_PAGAMENTO",
"paymentInstallmentsValue": 81.64,
"paymentInstallments": 1
}
],
"deliveries": [
{
"address": {
"id": 4470701,
"name": "Endereço de entrega",
"street": "Avenida Paulista",
"number": "1578",
"quarter": "Bela Vista",
"city": "São Paulo",
"state": "SP",
"zipcode": "01310-100",
"deliveryAddressCode": null,
"addressType": "RESIDENTIAL"
},
"freight": {
"value": 45.73,
"valueFormats": {
"value": "45,73",
"mask": "R$ 45,73"
},
"name": "CORREIO - SEDEX",
"type": "INTELIPOST",
"freightTime": 4,
"packingTime": 0,
"realValue": 45.73,
"realValueFormats": {
"value": "45,73",
"mask": "R$ 45,73"
},
"realName": "CORREIO - SEDEX",
"realType": "INTELIPOST",
"intelipostQuoteId": "202956238407743",
"intelipostDeliveryMethodId": "2",
"intelipostDeliveryMethodExternalId": "94"
},
"products": [
{
"id": 500101,
"name": "Produto Exemplo A",
"mfrPartCode": "FE-500101",
"composition": "UNITARY",
"virtualQuantity": 0,
"realQuantity": 1,
"quantity": 1,
"price": 35.91,
"priceFormats": {
"value": "35,91",
"mask": "R$ 35,91"
},
"leadTime": 0,
"partnerOrderLineId": 4490101,
"isLeadTimeByRequest": false,
"stockPrice": 39.9,
"stockPriceFormats": {
"value": "39,90",
"mask": "R$ 39,90"
},
"totalCost": 52.15,
"totalCostFormats": {
"value": "52,15",
"mask": "R$ 52,15"
},
"netCost": 52.15,
"netCostFormats": {
"value": "52,15",
"mask": "R$ 52,15"
},
"marginAfterDiscountPercentage": null,
"interestRate": null,
"anticipationRate": null,
"realSalePrice": 35.91,
"realSalePriceFormats": {
"value": "35,91",
"mask": "R$ 35,91"
},
"drivenPrice": false,
"partnerPartCode": "SKU-A-001",
"partnerInternalPartCode": null,
"warehouse": {
"id": 1001,
"name": "Depósito Central",
"zipcode": "01310-100"
},
"brand": {
"id": 4460101,
"name": "Fabricante Exemplo"
},
"specialRules": {},
"needsAgronomicRecipe": "false",
"salesUnitOfMeasurement": null,
"salePriceByUnitOfMeasurement": null,
"unitaryQuantityInSalesUnitOfMeasurement": null,
"totalQuantityInSalesUnitOfMeasurement": null,
"whoAddedItemToCart": "client",
"customKey": null,
"categoryId": 31519,
"categoryName": "Categoria Exemplo"
}
]
}
],
"paymentPartnerReceiver": [
{
"participant": "marketplace",
"name": "Loja Exemplo",
"typeReceiver": "PRIMARY",
"paymentFees": "true",
"splitedBy": "TOTAL",
"splitedPercentage": 100,
"splitedValue": "81,64",
"value": "81,64"
}
],
"orderStatusLogs": [
{
"status": "READY",
"date": "2026-09-02T11:12:40Z"
}
],
"totalMarginAfterDiscountPercentage": null,
"markup": null,
"whoCreatedPreOrder": "client",
"whoSelectedPayment": "client",
"commissionAssignedAttendantId": null,
"commissionAssignedAttendantCode": null,
"commissionAssignedAttendantDoc": null,
"approvalLevels": [],
"customCartId": null,
"cartTypeName": null,
"cartTypeExternalId": null,
"supplierOrderId": "PED-ERP-77120",
"supplierInvoiceNumber": "1234",
"supplierInvoiceSerie": "1",
"supplierInvoiceDate": "2026-09-02T00:00:00Z"
} 200Success — shipped
{
"attendant": null,
"orderId": 900100,
"id": 900201,
"status": "SHIPPED",
"approvalWorkflow": false,
"workflowIsApproved": false,
"approvalCredit": null,
"subTotal": 35.91,
"subTotalFormats": {
"value": "35,91",
"mask": "R$ 35,91"
},
"taxes": {
"taxPurpose": null,
"taxPurposeId": null,
"st": 0,
"ipi": 0,
"icms": 0,
"pis": 0,
"cofins": 0,
"totalTax": 0
},
"freightTotal": 45.73,
"freightTotalFormats": {
"value": "45,73",
"mask": "R$ 45,73"
},
"total": 81.64,
"totalFormats": {
"value": "81,64",
"mask": "R$ 81,64"
},
"dateCreated": "2026-09-01T13:26:05Z",
"lastUpdated": "2026-09-01T13:27:26Z",
"invoiceNote": null,
"leadTimeByRequestDone": true,
"order": {
"origin": "SHOP",
"originStoreName": "Loja Exemplo",
"originStoreId": 4210,
"originStoreSubdomain": "lojaexemplo",
"originStorePartnerId": 5050,
"drivenPrice": false,
"manualPrice": false
},
"seller": {
"id": 5050,
"name": "Loja Exemplo",
"document": "30.424.972/0001-74"
},
"customer": {
"id": 700101,
"name": "Ana Paula Ribeiro",
"contactName": "Ana Paula Ribeiro",
"email": "ana.ribeiro@exemplo.com.br",
"phone": "(11) 98765-4321",
"type": "pf",
"document": "700.413.648-56",
"stateRegistration": null,
"optinTracking": null,
"trackingPhone": null,
"dateCreated": "2026-08-20T09:15:00Z",
"registrationAddress": {
"street": "Avenida Paulista",
"number": "1578",
"quarter": "Bela Vista",
"city": "São Paulo",
"state": "SP",
"zipcode": "01310-100",
"farmerStateRegistration": null
},
"customerAttributes": [
{
"name": "OPTIN_NEWSLETTER",
"value": "true"
}
]
},
"payments": [
{
"id": 4490201,
"paymentType": "BANK_SLIP",
"gateway": "GATEWAY_DE_PAGAMENTO",
"paymentInstallmentsValue": 81.64,
"paymentInstallments": 1
}
],
"deliveries": [
{
"address": {
"id": 4470701,
"name": "Endereço de entrega",
"street": "Avenida Paulista",
"number": "1578",
"quarter": "Bela Vista",
"city": "São Paulo",
"state": "SP",
"zipcode": "01310-100",
"deliveryAddressCode": null,
"addressType": "RESIDENTIAL"
},
"freight": {
"value": 45.73,
"valueFormats": {
"value": "45,73",
"mask": "R$ 45,73"
},
"name": "CORREIO - SEDEX",
"type": "INTELIPOST",
"freightTime": 4,
"packingTime": 0,
"realValue": 45.73,
"realValueFormats": {
"value": "45,73",
"mask": "R$ 45,73"
},
"realName": "CORREIO - SEDEX",
"realType": "INTELIPOST",
"intelipostQuoteId": "202956238407743",
"intelipostDeliveryMethodId": "2",
"intelipostDeliveryMethodExternalId": "94"
},
"products": [
{
"id": 500101,
"name": "Produto Exemplo A",
"mfrPartCode": "FE-500101",
"composition": "UNITARY",
"virtualQuantity": 0,
"realQuantity": 1,
"quantity": 1,
"price": 35.91,
"priceFormats": {
"value": "35,91",
"mask": "R$ 35,91"
},
"leadTime": 0,
"partnerOrderLineId": 4490101,
"isLeadTimeByRequest": false,
"stockPrice": 39.9,
"stockPriceFormats": {
"value": "39,90",
"mask": "R$ 39,90"
},
"totalCost": 52.15,
"totalCostFormats": {
"value": "52,15",
"mask": "R$ 52,15"
},
"netCost": 52.15,
"netCostFormats": {
"value": "52,15",
"mask": "R$ 52,15"
},
"marginAfterDiscountPercentage": null,
"interestRate": null,
"anticipationRate": null,
"realSalePrice": 35.91,
"realSalePriceFormats": {
"value": "35,91",
"mask": "R$ 35,91"
},
"drivenPrice": false,
"partnerPartCode": "SKU-A-001",
"partnerInternalPartCode": null,
"warehouse": {
"id": 1001,
"name": "Depósito Central",
"zipcode": "01310-100"
},
"brand": {
"id": 4460101,
"name": "Fabricante Exemplo"
},
"specialRules": {},
"needsAgronomicRecipe": "false",
"salesUnitOfMeasurement": null,
"salePriceByUnitOfMeasurement": null,
"unitaryQuantityInSalesUnitOfMeasurement": null,
"totalQuantityInSalesUnitOfMeasurement": null,
"whoAddedItemToCart": "client",
"customKey": null,
"categoryId": 31519,
"categoryName": "Categoria Exemplo"
}
]
}
],
"paymentPartnerReceiver": [
{
"participant": "marketplace",
"name": "Loja Exemplo",
"typeReceiver": "PRIMARY",
"paymentFees": "true",
"splitedBy": "TOTAL",
"splitedPercentage": 100,
"splitedValue": "81,64",
"value": "81,64"
}
],
"orderStatusLogs": [
{
"status": "SHIPPED",
"date": "2026-09-02T11:12:40Z"
}
],
"totalMarginAfterDiscountPercentage": null,
"markup": null,
"whoCreatedPreOrder": "client",
"whoSelectedPayment": "client",
"commissionAssignedAttendantId": null,
"commissionAssignedAttendantCode": null,
"commissionAssignedAttendantDoc": null,
"approvalLevels": [],
"customCartId": null,
"cartTypeName": null,
"cartTypeExternalId": null
} Used in
Related endpoints
Generated from the public API collection, published on 2026-09-04: api-docs.cws.digital.