Documentation on order/edit webhook - what is the ID?

We want to be able to track changes to an order so we can contact our EPOS to make sure we are accounting for additions and removals to orders.

The webhook contains the following:

{"order_edit":{"id":40526381212,"app_id":1830279,"created_at":"2023-11-20T10:30:12+00:00","notify_customer":false,"order_id":3883511185564,"staff_note":"","user_id":71571439772,"line_items":{"additions":[],"removals":[{"id":9987825107100,"delta":1}]},"discounts":{"line_item":{"additions":[],"removals":[]}},"shipping_lines":{"additions":[]}}}

The “id” in the removals or additions doesn’t seem to correspond with anything - I’d expect it to be a Product Variant or Product? Or something where we can see what has been added or removed by calling an API endpoint. When we use GET on ProductVariant or Product with this ID it doesn’t return any results.

Hey @belugaed

That’s the order’s line item ID.

Thanks - I can’t see any line item GET endpoints rest or graph (although the original Order object does have a lineitem graph URL). Do we just need to cross reference this via the GET order endpoint?

Could the documentation be updated to describe what IDs are in the responses, some nested objects have multiple ID fields and it’s not immediately obvious what they relate to (in this case, additions id = line_item id.

Do we just need to cross reference this via the GET order endpoint?

Yep!

Could the documentation be updated to describe what IDs are in the responses

Great call. Flagging this with the team.