{{YourSetwebhookUrl}}

Temporarily marking one or more products as unavailable (e.g., they are out of stock, no ingredients) is called snoozing.

What should a snoozed product look like on my channel?

The desired effect of snoozing a product is that it remains visible in the target store but is unavailable at present. One way of doing this would be by greying out a product's entry, making it unselectable. As a snooze request also contains the length of time, it is possible to show an estimate of when the product will become available again.

If your channel does not support this way of handling snoozed products, the next best thing is to temporarily not display snoozed products on the target store. However, note that this is less clear to customers ordering food online. If they cannot see the snoozed product, they may not understand when, if ever, it will become available again. And that is even if they were aware of the product's existence in the first place.

Request format

To snooze one or more products, your channel API will receive requests in the format shown in the request shown here below. For a combination of accountId, locationId and channelLinkId, the request will contain a list of actions. In this case, the action is snooze.

In general, an action also has a data field. For the snooze action, the data contains items, which is a list of items for snoozing. Note that, for each item in items, you can see the period during which it should be snoozed, with start and end times stored as snoozeStart and snoozeEnd, respectively. The example on the right shows what timestamp format is used for these values.

Note that the _id mentioned in the request is deprecated. The items should be snoozed based on the PLU.

By default, the list of items you will receive in a snooze request from Deliverect will contain only additional items to snooze. If your channel cannot support this, you can change this setting for the channel link of your channel within Deliverect, so each time you receive a snooze request for your channel, you will also receive the complete list of all items (allSnoozedItems) that should be snoozed (previously snoozed items included).

{
    "accountId":"5b****71c6489f0029****d4",
    "locationId":"5c****ecc6489f0001****b8",
    "channelLinkId":"5e****abc11dec0001****9b",
    "operations":[
        {
            "action":"snooze",
            "data":{
                "items":[
                    {
                        "_id":"5c****43c6489f0001****65",
                        "plu":"PIE1",
                        "snoozeStart":"2020-03-24T16:21:54Z",
                        "snoozeEnd":"2020-03-24T22:21:54Z"
                    },
                    {
                        "_id":"5c****43c6489f0001****3b",
                        "plu":"MSB1",
                        "snoozeStart":"2020-03-24T16:21:54Z",
                        "snoozeEnd":"2020-03-24T22:21:54Z"
                    }
                ]
            }
        }
    ]
}
{
    "accountId":"5b****71c6489f0029****d4",
    "locationId":"5c****ecc6489f0001****b8",
    "channelLinkId":"5e****abc11dec0001****9b",
    "operations":[
        {
            "action":"snooze",
            "data":{
                "items":[
                    {
                        "_id":"5c****43c6489f0001****65",
                        "plu":"PIE1",
                        "snoozeStart":"2020-03-24T16:21:54.955000Z",
                        "snoozeEnd":"2020-03-24T22:21:54.955000Z"
                    }
                ],
                "allSnoozedItems":[
                    {
                        "_id":"5c****43c6489f0001****65",
                        "plu":"PIE1",
                        "snoozeStart":"2020-03-24T16:21:54.955000Z",
                        "snoozeEnd":"2020-03-24T22:21:54.955000Z"
                    },
                    {
                        "_id":"5c****43c6489f0001****3b",
                        "plu":"MSB1",
                        "snoozeStart":"2020-03-24T16:21:54.955000Z",
                        "snoozeEnd":"2020-03-24T22:21:54.955000Z"
                    }
                ]
            }
        }
    ]
}

Response format

"ok"