Hi, I am attempting to use the api to update an individual order status to shipped and provide a carrier and tracking number for an externally purchased label. Unfortunately my api call isnt changing the status. I am making a POST request using the shipments endpoint with the below body. The response confirms they have updated but on the UI they have not.
My query is threefold. Is it possible to update the order in this way and if so, what is wrong with my request? Does the order need to be in a specific state beforehand.
Thanks for any assistance you can provide.
url = f"https://private-anon-4ce064d5e6-veeqo.apiary-mock.com/shipments/{allocation_id}"
headers = {
"Content-Type": "application/json",
"x-api-key": VEEQO_API_KEY
}
payload = {
"shipment": {
"tracking_number_attributes": {
"tracking_number": tracking_number
},
"carrier_id": carrier_id,
"notify_customer": False,
"update_remote_order": True
},
"allocation_id": allocation_id,
"order_id": order_id
}
response = requests.put(url, headers=headers, json=payload)
response.raise_for_status()
print(f"Successfully updated order {order_id} with tracking number {tracking_number} on Veeqo.")
return response.json()