Skip to main content
All CollectionsIntegrationsAPI
Fetch and update order(s)
Fetch and update order(s)
Andreas Viklund avatar
Written by Andreas Viklund
Updated over 2 years ago

Getting order information and updating an order with new information is easy! With our API, you update orders individually and you need the external_ref in order to locate the order.

These two requests usually go hand in hand, but you don't need to fetch the order before updating it. As long as you know what information you'd like to update, you can go straight to the update order request.

Fetch an order

Don't forget to add the external reference in the endpoint. No need to submit text in the body to fetch order information,

GET /api/orders/<EXTERNAL_REF>

(Empty)

Responses

{
"external_ref" : "A1",
"customer-name" : "Andreas Viklund",
"email" : "andreas.viklund@gordondelivery.com",
"mobile" : "+46 70 228 68 10",
"address" : "Segeltorpsvägen 42",
"zip" : "12553",
"city" : "Älvsjö",
"description" : "",
"notes" : "Knock please",
"deliverygroup" : "Gordon Store",
"deliverydate" : "2023-02-25",
"time-window" : "14:00 - 16:00",
"inventory" : [
{
"quantity" : 1,
"name" : "En låda mat"
}
]
}

Update an order

You can use the same endpoint as you did previously when fetching an order. However, make sure to switch from a 'GET' to a 'PUT' request.

PUT /api/orders/<EXTERNAL_REF>

{
"external_ref" : "A1",
"customer-name" : "Andreas Viklund",
"email" : "andreas.viklund@gordondelivery.com",
"mobile" : "+46 70 228 68 10",
"address" : "Segeltorpsvägen 42",
"zip" : "12553",
"city" : "Älvsjö",
"description" : "",
"notes" : "Knock please",
"deliverygroup" : "Gordon Store",
"deliverydate" : "2023-02-25",
"time-window" : "14:00 - 16:00",
"inventory" : [
{
"quantity" : 1,
"name" : "En låda mat"
}
]
}

Responses

{
"external_ref" : ”A1",
"tracking_id" : "0Zj7YGCUr",
"status" : "OK",
"deliverygroup" : "gordon stockholm"
}

{
"status" : "error",
"message" : "Unable to find deliverygroup,
"external_ref" : "A1"
}

{
"status" : "error",
"message" : "Missing required fields: address, zip, city"
}

Did this answer your question?