Register change on order

This request allows change an order by:

  • Adding items;

  • Removing items;

  • Applying discount to the total value of the order

  • Incrementing the total value of the order.

This action can only be done for orders in these status:

  • handling

  • waiting-for-fulfillment.

The Change order resource is needed to use this API request. This is included in OMS - Full access and IntegrationProfile - Fulfillment Oms, among other default roles available in the Admin. Learn more about the License manager roles and resources.

🚧

Prices and discounts expressed in cents

Take note that discountValue, incrementValue and price should be expressed in cents. As such, $100 would be written as 10000 in the request body.

Request body example

curl --location --request POST 'https://{{accountName}}.{{environment}}.com.br/api/oms/pvt/orders/{{orderId}}/changes' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-VTEX-API-AppToken: {{X-VTEX-API-AppToken}}' \
--header 'X-VTEX-API-AppKey: {{X-VTEX-API-AppKey}}' \
--data-raw '{
  "itemsAdded": [
    {
      "id": "1234568064",
      "quantity": 1,
      "price": 0
    },
    {
      "id": "1234568356",
      "quantity": 1,
      "price": 90
    }
  ],
  "itemsRemoved": [
    {
      "id": "267",
      "quantity": 1,
      "price": 8990
    }
  ],
  "reason": "Unavailable Product",
  "discountValue": 8900,
  "incrementValue": 0
}'

Response body example

{
  "date": "2019-02-08T13:54:33.6868469+00:00",
  "orderId": "v502538llux-01",
  "receipt": "535d4581-a2a2-4fd2-a206-1c61eae91b1e"
}
Language
Authentication
URL
Click Try It! to start a request and see the response here!