Skip to main content

Update Order API

Updates the details of an existing order before a shipment has been assigned. Supports changing the warehouse, payment status, shipping address, and order items.

Method: PUT Endpoint: /custom/api/v1/order

Request Fields​

Top-Level Fields​

FieldTypeRequiredDescriptionExample
order_idstringYesUnique ID of the order to updateORDKDKHOFL07I
orderobjectYesFields to update on the ordersee below

Order Fields​

FieldTypeRequiredDescriptionExample
payment_statusstringOptionalUpdated payment statuspaid, unpaid
warehouse_idstringOptionalNew warehouse unique IDWHYYB5
package_idstringOptionalNew package unique IDPKGABC123
weightnumberOptionalWeight override in kg0.5
cod_amountnumberOptionalCOD amount to collect990
shipping_addressobjectOptionalUpdated shipping address (see below)
order_items_attributesarrayOptionalItems to add, update, or remove (see below)

Shipping Address Fields​

FieldTypeDescription
namestringRecipient name
phonestringPhone number
emailstringEmail address
addressstringAddress line 1
address_2stringAddress line 2
citystringCity
statestringState
countrystringCountry
zipstringPIN code

Order Item Fields (order_items_attributes)​

FieldTypeRequiredDescription
idstringFor updates/removesInternal item ID
namestringOptionalItem name
skustringOptionalSKU code
quantityintegerOptionalQuantity
variant_idstringOptionalVariant identifier
pricenumberOptionalPrice per unit
weightnumberOptionalItem weight
taxnumberOptionalTax amount
hsnstringOptionalHSN code
_destroybooleanOptionalSet true to remove this item
tax_linesarrayOptionalTax breakdown (see below)

Tax Line Fields​

FieldTypeDescription
ratenumberTax rate (percentage)
pricenumberTax amount
titlestringTax name (e.g., IGST)

Sample Request​

curl --location --request PUT 'https://shazam.velocity.in/custom/api/v1/order' \
--header 'Content-Type: application/json' \
--header 'Authorization: your_access_token' \
--data '{
"order_id": "ORDKDKHOFL07I",
"order": {
"payment_status": "paid",
"warehouse_id": "WHYYB5",
"weight": 0.6,
"cod_amount": 0,
"shipping_address": {
"name": "Saurabh Jindal",
"phone": "8860697807",
"email": "saurabh@velocity.in",
"address": "Incubex, Velocity",
"city": "Bangalore",
"state": "Karnataka",
"country": "India",
"zip": "560102"
},
"order_items_attributes": [
{
"id": "item-uuid-1",
"quantity": 2,
"price": 999.00
}
]
}
}'

Success Response​

{
"status": 1,
"payload": {
"order_id": "ORDKDKHOFL07I",
"message": "Order updated successfully"
}
}

Error Response​

{
"status": 0,
"message": "Order not found"
}

Notes​

  • Only fields passed inside the order object are updated; omitted fields remain unchanged
  • order_id is the unique ID returned when the order was created (e.g., from the forward-shipment or forward-order endpoint), not the external order ID you supplied
  • To remove an order item, include its id and set _destroy: true
  • Updating a warehouse or weight after a shipment is assigned may not take effect; update before courier assignment