Update Order Products - Venddor API

← Back to API Documentation
PUT /api/orders/{order_id}

This endpoint allows you to update the products within an existing order. You can change the quantities of products or add/remove products from the order.

Path Parameters

Parameter Type Description
order_id* integer ID of the order to update

Request Headers

Header Value Description
Authorization Basic Auth Base64 encoded username:password combination

Request Body Parameters

Parameter Type Required Description
products* object Yes Object containing product information to update in the order. Each key is a product code, and each value is an object with the product details to update.

Product Object Structure

Parameter Type Required Description
amount* string/integer Yes New quantity of the product in the order
Important: When updating an order with multiple products, make sure to specify all products that should remain in the order. Any products not specified in the request will be removed from the order.

Example Request

{
  "products": {
    "7893590691023": {
      "amount": "5"
    },
    "7501006707694": {
      "amount": 17
    }
  }
}

Response

The endpoint returns the ID of the updated order.

Example Success Response (200 OK)

{
  "order_id": "5127"
}

Example Error Response (400 Bad Request)

{
  "message": "Bad Request: Syntax error, malformed JSON",
  "status": 400
}
Tip: If you want to remove a product from the order completely, you can either:
  1. Not include it in the request at all (but make sure to include all other products you want to keep)
  2. Set its amount to 0
Note: When updating order products, the system may recalculate shipping costs, taxes, and other order-related values. Make sure to retrieve the updated order details after making changes to get the most current information.