Bol Get Offer Ids
Summary of Changes: (The purpose of this table is to keep traceability and Product team to highlight the things that were changed into the scope, based on comments or discussions)
Date | Version | Created / Updated | Notes |
---|---|---|---|
10/05/2023 | v1.0 | Bogomil Pavlov | First publish |
The purpose of this document is to describe how to get the offer ids from Bol which we user for all type of offer updates.
P.S. Please have in mind if we can incorporate this flow with Offer Creation!
We want to get the offer ids for all products with: Product Account > Product Status = “Offer Created”Product Account > List / Update the Whole Item = Not Needed
This will be our trigger and we want to make additional request:
API Call: POST https://api.bol.com/retailer/offers/export
API Docs: https://api.bol.com/retailer/public/redoc/v9/retailer.html#tag/Offers/operation/post-offer-export
No body or parameters required.
Sample Response:
{
"processStatusId": "832785609",
"eventType": "CREATE_OFFER_EXPORT",
"description": "Create an offer export.",
"status": "PENDING",
"createTimestamp": "2023-08-28T22:20:34+02:00",
"links": [
{
"rel": "self",
"href": "https://api.bol.com/shared/process-status/832785609",
"method": "GET"
}
]
}
The product offer export is asynchronous and we will have to create a new feed in Marketplace Feeds table.
After each successfully send feed for get offer ids we will receive the processStatusId
from the response and need to store it in Marketplace Feeds table with the rest of the details as follows.
Bol Field | Hemi Field | Comment |
---|---|---|
processStatusId |
Marketplace Feed > External ID | |
Marketplace Feed > Account | For which account is the feed generated. | |
eventType |
Marketplace Feed > External Type | |
Marketplace Feed > Type | Hardcoded as “Offer Export“ | |
createTimestamp |
Marketplace Feed > Submitted Date | When the feed is submitted |
Marketplace Feed > Sent Objects Count | How many products we have pushed in the feed | |
Marketplace Feed > Status | If the external status is “PENDING“ we want to set the status as “Processing“. | |
If the external status is “SUCCESS“ or “FAILURE” or “TIMEOUT” we want to set the status as “Completed“. | ||
status |
Marketplace Feed > External Status |
However there is one more step we have to do in order to get the actual offer export file we need to get the response for the Offer Export Feed and obtain the entity id:
API Call: GET https://api.bol.com/shared/process-status/{processStatusId}
API Doc: ReDoc
Query Parameters
process-status |
string
Example: process-status/987654321
Unique id which we use for reading the response |
---|
Sample Request:
API Call: GET https://api.bol.com/shared/process-status/832785609
Parameters Mapping:
Bol Field | Hemi Field | Comment |
---|---|---|
processStatusId |
Marketplace Feed > External ID |
Sample Response:
{
"processStatusId": "832785609",
"entityId": "4a7e756b-f367-48eb-8218-6998ce3d6e34",
"eventType": "CREATE_OFFER_EXPORT",
"description": "Create an offer export.",
"status": "SUCCESS",
"createTimestamp": "2023-08-28T22:20:34+02:00"
}
From the response we want to get the entityId
and use it for the actual offer export file:
API Call: GET https://api.bol.com/retailer/offers/export/{entityId}
API Doc: https://api.bol.com/retailer/public/redoc/v9/retailer.html#tag/Offers/operation/get-offer-export
Sample Response:
offerId,ean,conditionName,conditionCategory,conditionComment,bundlePricesPrice,fulfilmentDeliveryCode,stockAmount,onHoldByRetailer,fulfilmentType,mutationDateTime,referenceCode,correctedStock
48ab1ab2-311b-40fe-b189-4ceee881d10b,3275056058603,NEW,NEW,,9.99,24uurs-21,1,false,FBR,2023-08-28 20:17:35.911 UTC,Test123456,1
ba48352e-5ad9-48d6-b2b6-725f47816cb0,5059370020885,NEW,NEW,,1.00,3-5d,4,false,FBR,2023-08-21 21:30:13.027 UTC,Test123,0
2a9644cc-98a6-459f-b14f-5e9f93cd6997,3275055840834,NEW,NEW,,9.99,24uurs-21,1,false,FBR,2023-08-16 12:56:16.612 UTC,TEST001,1
We will receive .csv (comma delimiter) response with the offerIds which we want to store as Product Account > Channel Item Id. In order to map the correct offer we can use the ean from the file and map it against our Product Account > Marketplace EAN (with priority) or Product > EAN. Please note we want to update all product account which have:Product Account > Product Status = “Offer Created”Product Account > List / Update the Whole Item = Not Needed And add the Product Account > Channel Item Id with the actual offerId from the file.
This is our final step of the offer creation and we can treat that the offer is ready for sale.