Supported event types
Event types are the different categories or classifications of events that you can subscribe to receive notifications about. When subscribing you can customize the types of updates and notifications you wish to receive as per your requirements.
Different delivery methods support different types of events. The table below displays all the supported delivery methods for each event type.
| Subscription event type | Supported delivery method |
|---|---|
Webhooks GCP Pub/Sub AWS SQS |
|
Webhooks GCP Pub/Sub AWS SQS |
|
Webhooks GCP Pub/Sub AWS SQS |
|
GCP Pub/Sub AWS SQS |
|
GCP Pub/Sub AWS SQS |
|
GCP Pub/Sub AWS SQS |
|
GCP Pub/Sub AWS SQS |
Process status subscription
The PROCESS_STATUS subscription event provides information about the status of an asynchronous request towards Retailer API and offers the following types.
| Event name | Description |
|---|---|
|
The request was successfully completed. |
|
The request failed. Examine the process status error message for more information. |
|
The request timed out. This means the downstream service was unable to process all the requests in a specified timeframe, and therefore we timed out your request. |
An example of a push message after creating a process status subscription is provided below.
{
"retailerId":1234567,
"timestamp":"2020-02-02T23:23:23+01:00",
"event":{
"resource":"PROCESS_STATUS",
"type":"SUCCESS",
"resourceId":"1234567"
}
}
The event.resourceId in this message is the processStatusId from the call.
Shipment subscription
The SHIPMENT subscription event allows you to monitor shipment status of the order, and has the following types.
| Event name | Description |
|---|---|
|
A shipment has changed its shipment status. |
The resourceId in the message body is the shipmentId which you can use with the Get a shipment by shipment id endpoint to see in detail what changed in the transport.transportEvents element.
An example of a push message after creating an update transport event subscription is provided below.
{
"retailerId":1234567,
"timestamp":"2020-02-02T23:23:23+01:00",
"event":{
"resource":"SHIPMENT",
"type":"UPDATE_TRANSPORT_EVENT",
"resourceId":"0837872b-f805-45f3-8f60-3233ea933ed7"
}
}
Order subscription
The ORDER subscription event allows you to receive notifications about new orders and order item cancellation requests. It has the following types:
| Event type | Description |
|---|---|
|
An new order has been created |
|
A cancellation was requested for one or more order items |
The resourceId in the message body contains the orderId which you can use with the Get Order By Id endpoint to retrieve the full order details.
An example of a push message that is sent after a new order is created is shown below.
{
"retailerId":1234567,
"timestamp":"2020-02-02T23:23:23+01:00",
"event":{
"resource":"ORDER",
"type":"ORDER_CREATED",
"resourceId":"A123456789"
}
}
Price star boundary subscription
The PRICE_STAR_BOUNDARY event type sends a message whenever a retailer has a sellable offer for a product with updated price star boundaries.
In the notification, you receive the EAN of the product that has undergone changes in its price star boundaries. Use this EAN to retrieve the updated boundaries by using the Get price star boundaries by EAN endpoint.
For more information on price star boundaries, see the functional documentation.
This subscription event has the following types:
| Event type | Description |
|---|---|
|
Indicates that a change in price star boundaries has occurred for a product you are offering. |
An example of a push message after the price star boundary of a product has changed is given below:
{
"retailerId": 1234567,
"timestamp": "2020-02-02T23:23:23+01:00",
"event": {
"resource": "PRICE_STAR_BOUNDARY",
"type": "CHANGE",
"resourceId": "0045496429577"
},
"metadata": {
"BPID": "9300000079089746",
"country": "NL",
"ean": "0045496429577"
},
"links": [
{
"url": "https://api.bol.com/retailer/products/0045496429577/price-star-boundaries",
"method": "GET"
}
]
}
The event.resourceId within the message corresponds to the EAN of the product for which the boundary has been updated.
The metadata.BPID in the message corresponds to the bol product ID for this product.
Competing offer subscription
The COMPETING_OFFER event type sends a message whenever a retailer has a sellable offer for a product, and any of the competing offers have undergone changes.
Every notification will include the corresponding EAN linked to the updated competing offers. Use this EAN to fetch the most recent competing offers using the Get a list of competing offers by EAN endpoint.
For more information on competing offers, see the functional documentation.
The following fields are subject to potential changes:
-
offerId
-
retailerId
-
countryCode
-
bestOffer
-
price
-
fulfilmentMethod
-
condition
-
ultimateOrderTime
-
minDeliveryDate
-
maxDeliveryDate
This subscription event has the following types:
| Event type | Description |
|---|---|
|
Indicates that a change in competing offers has occurred for a product you are offering. |
An example of a push message after the competing offers of a product have changed is given below:
{
"retailerId": 1234567,
"timestamp": "2020-02-02T23:23:23+01:00",
"event": {
"resource": "COMPETING_OFFER",
"type": "CHANGE",
"resourceId": "0045496429577"
},
"metadata": {
"BPID": "9300000079089746",
"country": "NL",
"ean": "0045496429577"
},
"links": [
{
"url": "https://api.bol.com/retailer/products/0045496429577/offers",
"method": "GET"
}
]
}
The event.resourceId within the message corresponds to the EAN of the product for which the competing offers have been updated.
The metadata.BPID in the message corresponds to the bol product ID for this product.
| If your offer becomes unsellable, you still receive one final notification about the competing offers that have undergone changes. |
Offers subscriptions
The Offers subscriptions events has the following types:
| Event type | Description | ||
|---|---|---|---|
|
The Some examples are:
|
|
The For instance:
|
An example of the structure of the event is as follows:
{
"retailerId": "1234567", (1)
"timestamp": "2020-02-02T23:23:23+01:00", (2)
"event": {
"resource": "OFFER_FOR_SALE", (3)
"type": "FOR_SALE", (4)
"resourceId": "c6b3b17d-8db1-4d03-8784-d993de083a7b", (5)
"metadata": {
"countryCode": "NL" (6)
},
"links": []
}
}
| 1 | retailerId references the Id of the retailer which information belongs to. This is a numeric value passed as a String. |
| 2 | timestamp refers to the time of creation of the event. |
| 3 | event.resource Refers to the resource the event came from. For this event, this is OFFER_FOR_SALE or OFFER_NOT_FOR_SALE. |
| 4 | event.type Refers to the event type that happened. For this event, this would be either FOR_SALE or NOT_FOR_SALE. |
| 5 | event.resourceId Identifies the resource where this event happened. For this event, the resourceId is the offerId. |
| 6 | metadata.countryCode Refers to the country in which this offer went online. This can either be NL or BE. |