Skip to main content

Updating An Order

Orders can be updated by making a PATCH call to /warehouse/v1/order/{id}. The PATCH route contains a path parameter: id which will be the ID returned from the POST request that created the order.

The same rules must be followed as when the order was created, along with a few additional rules.

  1. The warehouseCode must match the warehouseCode in the original POST that created the order.
  2. The primaryReference must match the primaryReference in the original POST that created the order.
  3. All shipments on the order must have a status of either ENT or HEL.

Below is an example of the request and response when updating the order that was created previously.

Example Request
PATCH /warehouse/v1/orders/6434c71edd3283f909d1bd54 HTTP/1.1
x-api-key: your_api_key
organization-slug: your_organization_slug (if required)
Content-Type: application/json

{
"warehouseCode": "LAW",
"primaryReference": "123456789",
"secondaryReference": "SO000023456",
"shipToAddress": {
"address": {
"organization": "John Smith",
"addressLine1": "1234 Main Street",
"addressLine2": "",
"country": "USA",
"state": "CA",
"city": "Los Angeles",
"postalCode": "90012"
},
"contact": {
"personName": "John Smith",
"phoneNumber": "123-456-7890",
"mobileNumber": "",
"faxNumber": "",
"emailAddress": "john.smith@gmail.com"
}
},
"requiredShipDate": "2023-05-15T00:00:00+00:00",
"orderLines": [
{
"externalLineReference": "001",
"productCode": "HP-SPX360-14-OLED-I7-16GB-1TB-NFBLK",
"quantity": 3,
"quantityUnit": "UNT"
}
],
"additionalReferences": [
{
"key": "ORD",
"value": "ACME1234"
}
],
"note": "BEST RATE - FEDEX OR UPS - 2DAY"
}

If you get a 200 response back, you’ll get the updated order details back in the same response body as creating the order.

Example Response
{
"data": {
"id": "6434c71edd3283f909d1bd54",
"dateCreated": "2023-04-11T02:34:06+00:00",
"dateLastUpdated": "2023-04-11T02:34:06+00:00",
"status": "PRS",
"warehouseCode": "LAW",
"primaryReference": "123456789",
"secondaryReference": "SO000023456",
"shipToAddress": {
"address": {
"organization": "John Smith",
"addressLine1": "1234 Main Street",
"addressLine2": "",
"country": "USA",
"state": "CA",
"city": "Los Angeles",
"postalCode": "90012",
"isResidential": false
},
"contact": {
"personName": "John Smith",
"phoneNumber": "123-456-7890",
"mobileNumber": "",
"faxNumber": "",
"emailAddress": "john.smith@gmail.com"
}
},
"requiredShipDate": "2023-05-15T00:00:00+00:00",
"orderLines": [
{
"lineNumber": "1",
"externalLineReference": "001",
"productCode": "HP-SPX360-14-OLED-I7-16GB-1TB-NFBLK",
"quantity": 3,
"quantityUnit": "UNT",
"lineAttributes": [],
"lineCustomAttributes": [],
"partAttributes": []
}
],
"shipments": [
{
"id": "6434c720dd3283f909d1bd55",
"status": "ENT",
"dateCreated": "2023-04-11T02:34:08+00:00",
"dateLastUpdated": "2023-04-11T02:34:08+00:00",
"warehouseCode": "LAW",
"primaryReference": "123456789",
"secondaryReference": "SO000012345",
"shipToAddress": {
"address": {
"organization": "John Smith",
"addressLine1": "1234 Main Street",
"addressLine2": "",
"country": "USA",
"state": "CA",
"city": "Los Angeles",
"postalCode": "90012",
"isResidential": false
},
"contact": {
"personName": "John Smith",
"phoneNumber": "123-456-7890",
"mobileNumber": "",
"faxNumber": "",
"emailAddress": "john.smith@gmail.com"
}
},
"requiredShipDate": "2023-05-15T00:00:00+00:00",
"packages": [],
"shipmentLines": [
{
"sublines": [],
"lineNumber": "1",
"externalLineReference": "001",
"productCode": "HP-SPX360-14-OLED-I7-16GB-1TB-NFBLK",
"quantity": 1,
"quantityUnit": "UNT",
"lineAttributes": [],
"lineCustomAttributes": [],
"partAttributes": []
}
],
"milestones": [],
"additionalReferences": []
}
],
"additionalReferences": [
{
"key": "ORD",
"value": "ACME1234"
}
],
"note": "BEST RATE - FEDEX OR UPS - 2DAY"
},
"id": "f7b237aa-b866-44b1-83fd-f8f713c392a7",
"resource": [],
"errors": []
}