I’m trying to update orders through the API.
https://shipheropublic.docs.apiary.io/#reference/orders/update-order/update-order
However, every time I make a request to ShipHero api I receive an error.
{
“order_id”: 0,
“message”: “Error updating order”,
“code”: 200,
“response”: “KeyError(‘order_id’,)”
}
This is the payload we are sending to update order endpoint.
{
“token”: “{{shipHeroApiKey}}”,
“order_id”: “104430562”, //shiphero order id
“shipping_address”: {
“province”: “United States”,
“province_code”: “US”,
“city”: “Wilmington”,
“first_name”: “BenTEST”,
“last_name”: “Adams”,
“zip”: “Delaware”,
“country”: “DE”,
“company”: “Advoc8”,
“phone”: “817-549-8352”,
“country_code”: “19804”,
“address1”: “1620 East Ayre Str”,
“address2”: “SUITE #M5318394”
}
}
Also tried to send instead of shiphero order id
=> shiphero order number
using rv_ord_BYE1Pft6bk365 but i still receive the same error.
Any ideas?
Also, regarding webhooks. We’ve registered two webhooks.
“Inventory Update” and “Shipment Update”
{
“Message”: “success”,
“code”: “200”,
“webhooks”: [
{
“url”: “{host}/shiphero/inventory_update”,
“source”: “api”,
“name”: “Inventory Update”
},
{
“url”: “{host}/shiphero/shipment_update”,
“source”: “api”,
“name”: “Shipment Update”
}
]
}
However, when account_id
(3pl account id) is added, on Order and product create (API) I’m receiving “Inventory Update” but with empty body if we don’t add it to the payload.
When are webhooks triggered? Any idea whats wrong here?
Help is REALLY appreciated.