Use of XML feed as a data source for the marketplace in API
XML feed with products containing final sales prices is based on the Partner feed module, which allows generating a data source for individual user groups and language versions of the e-shop. A feed containing "public" prices can be used as a data source for the marketplace. These are the ones that a non-logged-in customer sees. The product data source is generated in a separate file and updated several times a day.
Note: If the Partner feed is not available in the e-shop administration in the tab Import/Export -> Partner feed, you need to contact our support, who will activate the module for your website.
In the "Public prices" section, you need to activate the feed of the language version that you want to use as a data source. Once activated and saved, the file will be generated and available through the API within a few minutes. The warehouse_number is used as the product identifier in the feed.
The getFeedUrl method is used to find out the feed URL via the API, which has two parameters, the language code and the feed type.
Sample query for product feed CZ language version:
query {
getFeedUrl(lang_code: "cz", type: products)
}
Query for availability feed (the same for all language versions):
query {
getFeedUrl(lang_code: "cz", type: availability)
}
The answer in both cases is a URL address:
{
"data": {
"getFeedUrl": "https://vase-stranka.flox.cz/api/feed/products/cz"
}
}
To display the contents of the file via the API, the URL can be called directly with the HTTP header BW-API-Key containing a valid access token
HTTP request for feed content:
POST /api/feed/products/cz
HTTP/1.1
Host: your-page.flox.cz
BW-API-Key: Token o....................sqojO1Rr
Content-Type: application/json
Cookie: SSID=1trcfpqbu2lypib1203a01bfla
Content-Length: 27 {"query":"","variables":{}}