Product Feeds
Product feeds are optional in Everflow but can exist at the offer level. There can be 0, 1 or more product feeds associated with any given offer.
The product feeds will only be accessible on offers on which you can currently run traffic (i.e. not blocked and not pending approval on the offer).
Get Offer Product Feeds
/v1/affiliates/offers/:offerId/productfeeds
This endpoint allows you to fetch the product feeds associated with an offer if they exist.
Returns an empty array if no product feeds exist.
Note that the date_valid_from
and date_valid_to
fields are optional and expressed as unix timestamps. They will be set to 0
if they are not specified.
This does not return the contents of the product feeds, only the metadata associated with it. See the endpoints documented below if the contents of the product feed is needed.
Request Example
cURL
curl --request GET 'https://api.eflow.team/v1/offers/<offer_id>/productfeeds' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'content-type: application/json'
Response
{
"product_feeds": [
{
"network_advertiser_product_feed_id": 4,
"network_id": 1,
"network_advertiser_id": 13,
"name": "Example Feed",
"status": "active",
"file_asset_id": 7,
"date_valid_from": 1684072800,
"date_valid_to": 1693490400,
"date_valid_timezone_id": 80,
"relationship": {
"document_file_asset": {
"network_asset_id": 7,
"content_type": "text/csv",
"filename": "product-feed.csv",
"url": "http://usercontent.everflowclient.io/path/to/product-feed.csv",
"file_size": 63702,
"image_width": 0,
"image_height": 0,
"optimized_thumbnail_url": ""
}
},
"time_saved": 1683641508,
"time_created": 1683577762
}
]
}
Get All Product Feeds
/v1/affiliates/productfeeds
This endpoint allows you to fetch all product feeds available, with an optional filter of the offer ids.
Returns an empty array if no product feeds exist.
Paging
This endpoint supports paging. Refer to our User Guide for usage.
Body Params
An optional array of offers IDs for which you would like the product feeds returned.
Request Example
cURL
curl --request GET 'https://api.eflow.team/v1/affiliates/productfeeds' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'content-type: application/json'
Example 1 : Fetch all product feeds related to offers with IDs 1 and 2
{
"filters": {
"network_offer_ids": [1, 2]
}
}
Response
{
"product_feeds": [
{
"network_advertiser_product_feed_id": 1,
"network_id": 1,
"network_advertiser_id": 13,
"name": "Example Product Feed 1",
"status": "active",
"file_asset_id": 1,
"date_valid_from": 0,
"date_valid_to": 0,
"date_valid_timezone_id": 90,
"relationship": {
"document_file_asset": {
"network_asset_id": 1,
"content_type": "text/csv",
"filename": "pf1.csv",
"url": "http://usercontent.everflowclient.io/1/advertisers/13/productfeed/pf1.csv",
"file_size": 58,
"image_width": 0,
"image_height": 0,
"optimized_thumbnail_url": ""
},
"offers": [
{
"network_offer_id": 1,
"network_id": 1,
"name": "Example Offer",
"offer_status": "active"
},
{
"network_offer_id": 2,
"network_id": 1,
"name": "Other Offer",
"offer_status": "active"
}
]
},
"time_saved": 1694612016,
"time_created": 1694612016
}
],
"paging": {
"page": 1,
"page_size": 50,
"total_count": 1
}
}
Get Offer Product Feed by ID
/v1/affiliates/offers/:offerId/productfeeds/:productFeedId
This endpoint allows you to fetch a specific product feed.
Note that the date_valid_from
and date_valid_to
fields are optional and expressed as unix timestamps. They will be set to 0
if they are not specified.
This does not automatically return the contents of the product feed, only the metadata associated with it. The contents of the product feed is either accessible via the endpoint when requesting the relationship, or via the 2 download endpoints documented below.
Relationships
This endpoint supports the following additional relationships. Refer to our User Guide for usage.
Value | Description |
---|---|
product_feed_item | Includes the product feed’s items in the response |
Request Example
cURL
curl --request GET 'https://api.eflow.team/v1/offers/<offer_id>/productfeeds/<product_feed_id>' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'content-type: application/json'
Response
{
"network_advertiser_product_feed_id": 4,
"network_id": 1,
"network_advertiser_id": 13,
"name": "Example feed",
"status": "active",
"file_asset_id": 7,
"date_valid_from": 1684072800,
"date_valid_to": 1693490400,
"date_valid_timezone_id": 80,
"relationship": {
"document_file_asset": {
"network_asset_id": 7,
"content_type": "text/csv",
"filename": "product-feed.csv",
"url": "http://usercontent.everflowclient.io/path/to/product-feed.csv",
"file_size": 63702,
"image_width": 0,
"image_height": 0,
"optimized_thumbnail_url": ""
}
},
"time_saved": 1683641508,
"time_created": 1683577762
}
Download Product Feed contents by ID (standard)
/v1/affiliates/offers/:offerId/productfeeds/:productFeedId/download
This endpoint allows you to download the contents of the product feed.
This endpoint will return the CSV file directly, you can therefore expect a Content-Type
header of text/csv
(unless there is an error in the request).
The CSV file returned here will contain a standard set of columns, regardless of the format that was used by the advertiser when uploading the product feed file. The columns are : sku
, name
, description
, url_link
, price
, url_link_mobile
, image_url
, image_url_mobile
, brand
, availability
, date_valid_from
, date_valid_to
Request Example
cURL
curl --request GET 'https://api.eflow.team/v1/offers/<offer_id>/productfeeds/<product_feed_id>/download' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'content-type: application/json'
Response
The CSV file will be returned directly.
Download Product Feed contents by ID (original)
/v1/affiliates/offers/:offerId/productfeeds/:productFeedId/download/original
This endpoint allows you to download the contents of the product feed in the format in which it was uploaded by the advertiser.
This endpoint will return the CSV file directly, you can therefore expect a Content-Type
header of text/csv
(unless there is an error in the request).
The CSV file returned here will can contain different columns but it guaranteed to contain at least the folowing 4 columns which are required in all product feed files : price
, name
, url_link
, sku
Request Example
cURL
curl --request GET 'https://api.eflow.team/v1/offers/<offer_id>/productfeeds/<product_feed_id>/download/original' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'content-type: application/json'
Response
The CSV file will be returned directly.