{{YourSetwebhookUrl}}

When a product or one of its ingredients becomes available again, the product snoozed should now be unsnoozed.

Who keeps track of when to unsnooze?

By default, even though you will receive the time when a product should be unsnoozed in a snooze request, Deliverect will send you an unsnooze request when that time expires. If your channel can track when products should be unsnoozed, you can change this setting for the channel link for your channel within Deliverect. We will then no longer send unsnooze requests for products for which the snooze period has expired. It is important to note that even if your channel keeps track of this information, it must still support unsnoozing on-demand before the intended snooze period expires.

Request format

The request sent to your channel API when one or more products should be unsnoozed is similar in format to the request you will receive when products should be snoozed. A crucial difference is that the action should be unsnooze instead of snooze.

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

For the unsnooze action, the data contains items provided as a list of items that have to be unsnoozed.

By default, the list of items you will receive in a unsnooze 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 an unsnooze request for your channel, you will also receive the complete list of all items (allSnoozedItems) that should be unsnoozed (previously usnoozed items included).

Response format

The response should indicate if unsnoozing was successful with a 200 OK status code, and the (JSON) body should consist of a list of results that correspond to the required actions in the request. Each result should repeat the unsnooze action for confirmation.

Like an action, a result also has a data field. For the unsnooze action, the data should contain the ID of the location, as well as a list containing the PLUs of all items currently snoozed. This is also for confirmation. Only use a 200 OK response to indicate that all items listed in the request have been successfully unsnoozed. Also, make sure to only send this response after having unsnoozed all items; the moment your channel sends this response, items must already be unsnoozed in the targeted store.

If the desired unsnooze action cannot be performed, send back an appropriate response and corresponding status. If any of the issues below manifest themselves, make sure to indicate each of them in an array in your response.

🚧

Work in progress

Before this functionality goes live, we will rework the format that you should report issues to us. However, in any case, we will still require you to send back a list of all products currently snoozed.

Issue

What to do

One or more products used in the request do not exist on your end.

Unsnooze all products possible, but send back a failure status (as unsnoozing was not achieved for all products).

The product is already unsnoozed.

Nothing needs to be done, as the desired effect is already achieved. If this is the only type of issue, you can still send back a success status.

For each product that causes an issue, send back its ID and PLU.

Have a look at the example responses to see what format you should use to communicate issues back.

{
    "accountId": "5b****71c6489f0029****d4",
    "locationId": "5c****ecc6489f0001****b8",
    "channelLinkId": "5e****abc11dec0001****9b",
    "operations": [
        {
            "action": "unsnooze",
            "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": "unsnooze",
            "data": {
                "items": [
                    {
                        "_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"
                    }
                ]
            }
        }
    ]
}
{
    "accountId": "5b****71c6489f0029****d4",
    "locationId": "5c****ecc6489f0001****b8",
    "channelLinkId": "5e****abc11dec0001****9b",
    "operations": [
        {
            "action": "unsnooze",
            "data": {
                "items": [
                    {
                        "_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"
                    }
                ]
            }
        }
    ]
}
{
    "accountId": "5b****71c6489f0029****d4",
    "locationId": "5c****ecc6489f0001****b8",
    "channelLinkId": "5e****abc11dec0001****9b",
    "operations": [
        {
            "action": "unsnooze",
            "data": {
                "items": [
                    {
                        "_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"
                    }
                ],
                "allSnoozedItems": []
            }
        }
    ]
}
{
  "results": [
    {
      "action": "unsnooze",
      "data": {
        "locationId": "5c****ecc6489f0001****b8",
        "allSnoozedItems": [
          "PIE1",
          "MSB1"
        ]
      },
      "issues": [
        {
          "description": "Unknown product",
          "data": {
            "_id": "5c****43c6489f0001****3b",
            "plu": "MSB1"
          }
        }
      ]
    }
  ]
}
{
  "results": [
    {
      "action": "unsnooze",
      "data": {
        "locationId": "5c****ecc6489f0001****b8",
        "allSnoozedItems": [
          "PIE1",
          "MSB1"
        ]
      },
      "issues": [
        {
          "description": "Product not snoozed to begin with",
          "data": {
            "_id": "5c****43c6489f0001****65",
            "plu": "PIE1"
          }
        }
      ]
    }
  ]
}