Store Status

e.g. {{YourSetwebhookUrl}}/store_status

Purpose

This will be called when a store status changes.

The content of the webhook event provides information on an individual store status change e.g. Store 1 was closed on Channel 2.

To test this out, you can add the webhook URL in the Location settings of your staging environment within the 'Store Status Webhook URL' field.

Store Status

When a store is set as open or closed online, it can come from one of three sources;

  • A deliberate user decision to stop taking online orders, either from Deliverect frontend or via and integration using the endpoint Update Store Status (open/closed)
  • A deliberate user decision to stop taking online orders, not actioned from Deliverect, but directly from their online ordering application
  • An automated action performed by the ordering platform i.e. in response to reaching a threshold of failed orders

When any of the above actions takes place, a webhook event can be sent to a designated endpoint. This event will include information that a POS partner can sync into their platform for reference. If using this endpoint, it should be provided by the POS as part of the registration flow Register POS.

Webhook Content

The expected properties are defined as follows and the webhook payload example is shown as an example underneath;

AttributeDefinitionFormat
eventTimeTime stated in UTC is when the sync occurred in Deliverect or when the store changed status, depending on which timestamp is the more accurate measurementstr
eventThe values will be either "storeClosed" or "storeOpened"str
sourceThe values will be;
"external" = Deliverect identified a change in store status (typically via polling)
"deliverect" = A Deliverect user has changed the store status.
str
reasonA string specifying any specific reason (if available) e.g. for example noDriversAvailable, closedByUserstr
averageDeliveryTimeIf available, the average delivery time for a store.str
locationIdDeliverect's unique ID of the customer locationstr
posLocationIdThe ID set for the location by the POSstr
channelLinkIdDeliverect's unique identifier of an individual store in a locationstr
channelThe global identifier of the channel platform see Get Integrated Channelsstr
{
    "storeStatusSyncUpdates": [
        {
            "eventTime": "2023-02-15T15:32:33Z",
            "event": "storeClosed",
            "source": "external",
            "reason": null,
            "averageDeliveryTime": null,
            "channelLinkId": "63a34d*******d06fbd72",
            "locationId": "63a34d*******d44fbr53",
            "posLocationId": "AzyXT****yqprFVo",
            "channel": 7
        }
    ]
}
{
    "storeStatusSyncUpdates": [
        {
            "eventTime": "2023-02-15T15:32:33Z",
            "event": "storeOpened",
            "source": "external",
            "reason": null,
            "averageDeliveryTime": null,
            "channelLinkId": "63a34d*******d06fbd72",
            "locationId": "63a34d*******d44fbr53",
            "posLocationId": "AzyXT****yqprFVo",
            "channel": 7
        }
    ]
}

Webhook Response

Content-Type: application/json

Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json