Skip to main content

Item Availability Webhooks

Introduction

The Online Ordering API allows integrators to subscribe to webhooks that notify the application when the stock level of a restricted item is updated in the POS.

This allows the application to stay in sync with the latest stock levels without needing to continuously poll the API.

When the stock level of an item is updated, a webhook event with the type SALES_RESTRICTION_UPDATED is triggered. The payload of this event includes details about the updated item, including its SKU and the new stock count.

Note

You can also manually check item stock levels by providing a list of SKUs at the Get Item Availability endpoint.

See Checking Item Availability for more information.

Setup

To receive updates from the Online Ordering API about item availability changes, you need to set up a webhook that listens for the SALES_RESTRICTION_UPDATED event. Below are the steps to create and manage webhooks for item availability updates.

Create a New Webhook

To create a new webhook configured to receive item availability events, you need to make a PUT request to the Create a webhook endpoint.

The request should include the event type you want to subscribe to, in this case "resource": "item", "name": "SALES_RESTRICTION_UPDATED", and the URL where you want to receive the webhook notifications.

Example Request

PUT /o/wh/1/webhook
{
"endpointId": "webhookname",
"expandPayments": false,
"expandTransactions": false,
"password": "password",
"provideAccount": true,
"subscribeTo": [
{
"name": "DELIVERED",
"resource": "order"
},
{
"name": "SALES_RESTRICTION_UPDATED",
"resource": "item"
}
],
"url": "https://myawesomewebhook.com",
"username": "username",
"withBasicAuth": false
}

Example Response

{
"endpointId": "webhookname",
"url": "hhttps://myawesomewebhook.com",
"withBasicAuth": false,
"provideAccount": true,
"expandTransactions": false,
"expandPayments": false,
"username": "username",
"password": "password",
"subscribeTo": [
{
"resource": "item",
"name": "SALES_RESTRICTION_UPDATED"
},
{
"resource": "order",
"name": "DELIVERED"
}
]
}

Update an Existing Webhook

To update an existing webhook, you need to make a POST request to the Update Webhook endpoint, with the endpointId of the webhook you want to update.

The request should include the event type you want to subscribe to, in this case SALES_RESTRICTION_UPDATED.

Example Request

POST /o/wh/1/webhook/
{
"endpointId": "webhookname",
"expandPayments": false,
"expandTransactions": false,
"password": "password",
"provideAccount": true,
"subscribeTo": [
{
"name": "DELIVERED",
"resource": "order"
},
{
"name": "SALES_RESTRICTION_UPDATED",
"resource": "item"
}
],
"url": "https://myawesomewebhook.com",
"username": "username",
"withBasicAuth": false
}

Example Response

{
"endpointId": "webhookname",
"url": "hhttps://myawesomewebhook.com",
"withBasicAuth": false,
"provideAccount": true,
"expandTransactions": false,
"expandPayments": false,
"username": "username",
"password": "password",
"subscribeTo": [
{
"resource": "item",
"name": "SALES_RESTRICTION_UPDATED"
},
{
"resource": "order",
"name": "DELIVERED"
}
]
}

Register a Business Location to a Webhook

In order to start receiving webhook events for a specific business location, you need to associate the webhook with that business location by providing the businessLocationId and endpointId at the Add a Business Location to a Webhook endpoint.

Example Request:

PUT /o/wh/1/webhook/{endpointId}/business-locations/{businessLocationId}

Example Response

{
"businessLocationId": 25769803778,
"createdAt": "2025-09-26T14:11:52.105134813Z",
"updatedAt": "2025-09-26T14:11:52.105134813Z",
"warnings": []
}
Note

If the business location is not compliant with the minimum required iOS app version (25.36), a message will be returned in the warnings array of the response.

Sample Webhook Payload

When an availability of an item is updated in one of the business locations, the webhook will send a POST request to your specified URL with a payload similar to the following:

{
"sku": "FT1",
"businessLocationId": 141948669132802,
"count": 48,
"countUpdatedAt": "2025-09-19T17:04:17.005Z",
"type": "ITEM",
"status": "RESTRICTED"
}