Are stock adjustment webhooks now being sent for items, instead of variations?

I was under the impression that inventory count event webhooks were only sent for variations, as only variations are able to have stock adjusted. Looking in my Square dashboard, I don’t see any options to adjust stock on an item, only variations. But we received a webhook that referenced an item in the inventory counts.

{
created_at: '2022-02-21T20:50:38.936612063Z', 
data: {
id: '2aa1f3ba-aa07-4fa9-bca8-b03ce4bb2006', 
object: {
inventory_counts: ["{'calculated_at': '2022-02-21T20:50:38.683Z', 'catalog_object_id': 'DK7L4POKJ6PRH67PRYP4DKHN', 'catalog_object_type': 'ITEM', 'location_id': '5TCJYTS0A7S17', 'quantity': '0', 'state': 'IN_STOCK'}"]
}, 
type: 'inventory'
}, 
event_id: '0fa7834e-2e80-4570-8ee1-def4a9f54871', 
merchant_id: 'D1NE7EWCJ2PMA', 
type: 'inventory.count.updated'
}

Since our webhook handler expects variations, this of course caused an error. Should we be expecting this webhook to handle both variations and items, or was this an error? I don’t even see how item stock can be updated, only variation.

:wave: Inventory webhooks should have the item variation in the body. I haven’t been able to replicate this. What’s the application ID for this webhook? :slightly_smiling_face:

sq0idp-_OpWFbMJ0nQp7vhmCjzoKw

What I pasted in the original post is the body from the webhook. DK7L4POKJ6PRH67PRYP4DKHN is an item, not a variation.

Here’s the entire request body:

'{"merchant_id":"D1NE7EWCJ2PMA","type":"inventory.count.updated","event_id":"0fa7834e-2e80-4570-8ee1-def4a9f54871","created_at":"2022-02-21T20:50:38.936612063Z","data":{"type":"inventory","id":"2aa1f3ba-aa07-4fa9-bca8-b03ce4bb2006","object":{"inventory_counts":[{"calculated_at":"2022-02-21T20:50:38.683Z","catalog_object_id":"DK7L4POKJ6PRH67PRYP4DKHN","catalog_object_type":"ITEM","location_id":"5TCJYTS0A7S17","quantity":"0","state":"IN_STOCK"}]}}}'

@Bryan-Square any update on this?

Thanks for bringing this to our attention. It looks like this is an item from Square for Restaurants which has a different model. I’ve let the team know and they will be updating the documentation. :slightly_smiling_face:

1 Like