Product Feed
This feature is in beta and is subject to change.
Introduction
Marketplace affiliates can retrieve a list of products from the brands they partner with in the form of a product feed. The product feed can be accessed by making an API call to Refersion's GraphQL endpoint using a valid GraphQL token — just like making any other GraphQL call to our API.
Product Feed is a standalone node in GraphQL with its own unique connections thus, it cannot be connected to tables such as clicks, conversions, affiliates, shops, offers, etc. As an example, if you're looking to retrieve a list of products along with information about a brand's offer you'll need to make two separate requests: one to the product feed table and another to the offers table.
Please note the following:
- Only brands you partner with who have opted into product feed will have their products available in GraphQL.
- SKUs are not required in every e-commerce platform therefore they may not be available for every
product. For this reason, we recommend using the
external_idas a backup product identifier. The external ID is the identifier for the product provided by the merchant's e-commerce platform.
There are four main tables in the product feed. Each table is listed with a short description below. As a note, this table is not inclusive of all fields and filters. Please use a REST client or the GraphQL explorer instructions to see all fields and filters are available for each table.
Table Descriptions
| Table Name | Description |
|---|---|
| ProductFeed | This is the main table with the product's basic properties such as name, description, currency, URL, tags, and external_id. |
| Merchant | This is the specific store that the products in the feed belong to. Merchants are identified by the shop_name, shop_identifier, and id properties. |
| Variant | This table will show information about a product's variants. Here you can get the variant's sku, price, options, and external_id. |
| Image | This table returns the images for the products. Images hang off the product, not the variant — read them through product_feed { images { url } }. |
The SKU lives on the variant, not on the product, and there is no image_url field on either
type. See ProductFeed and
Variant for the exact field lists.
Example Queries
Retrieve a list of merchants (stores) available in the product feed
The root merchants query currently returns Internal server error on every request. Read the
store details through product_feed { merchant { … } } instead, as the second example does.
{
merchants {
id
shop_name
shop_url
shop_identifier
}
}
Sent as:
{"query": "{ merchants { id shop_name shop_url shop_identifier } }"}
Sample response
{
"data": {
"merchants": [
{
"id": "5",
"shop_name": "abc",
"shop_url": "abc.myshopify.com",
"shop_identifier": "abc"
},
{
"id": "1",
"shop_name": "123",
"shop_url": "123.myshopify.com",
"shop_identifier": "123"
}
]
}
}
Retrieve a list of products along with the merchant info, variants and images
{
product_feed(first: 3 offset: 0) {
id
name
description
price
currency
product_url
rfsn_parameter
merchant {
shop_name
shop_url
shop_identifier
}
variants {
name
price
options
sku
}
images {
url
}
}
pageInfo {
total_results {
product_feed
}
}
}
Sent as:
{"query": "{ product_feed(first: 3 offset: 0) { id name description price currency product_url rfsn_parameter merchant { shop_name shop_url shop_identifier } variants { name price options sku } images { url } } pageInfo { total_results { product_feed } } }"}
Sample response
{
"data": {
"product_feed": [
{
"id": "244009",
"name": "Daily Care Lotion",
"description": "No sulfates, just all-natural and fresh.",
"price": 0,
"currency": "USD",
"product_url": "example-shop-1.myshopify.com\/products\/daily-care-lotion",
"rfsn_parameter": null,
"merchant": {
"shop_name": "Example Shop 1",
"shop_url": "example-shop-1.myshopify.com",
"shop_identifier": "Example Shop 1"
},
"variants": [
{
"name": "Default Title",
"price": "16",
"options": "null",
"sku": "DCL-001"
}
],
"images": [
{
"url": "https:\/\/cdn.example-shop-1.com\/daily-care-lotion.jpg"
}
]
},
{
"id": "244012",
"name": "Petite Hand Cream",
"description": "Don't freak out about dry hands. Fits right in your purse so you're always prepared.",
"price": 0,
"currency": "USD",
"product_url": "example-shop-1.myshopify.com\/products\/petite-hand-cream",
"rfsn_parameter": null,
"merchant": {
"shop_name": "Example Shop 1",
"shop_url": "example-shop-1.myshopify.com",
"shop_identifier": "Example Shop 1"
},
"variants": [
{
"name": "Default Title",
"price": "8",
"options": "null",
"sku": ""
}
],
"images": [
{
"url": null
}
]
},
{
"id": "244013",
"name": "Radiance face cream",
"description": "It's so smooth and creamy, pure liquid gold.",
"price": 0,
"currency": "USD",
"product_url": "example-shop-1.myshopify.com\/products\/radiance-face-cream",
"rfsn_parameter": null,
"merchant": {
"shop_name": "Example Shop 1",
"shop_url": "example-shop-1.myshopify.com",
"shop_identifier": "Example Shop 1"
},
"variants": [
{
"name": "Default Title",
"price": "12",
"options": "null",
"sku": "RFC-001"
}
],
"images": [
{
"url": "https:\/\/cdn.example-shop-1.com\/radiance-face-cream.jpg"
}
]
}
],
"pageInfo": {
"total_results": {
"product_feed": 443
}
}
}
}
Related
- Example Queries — marketplace affiliate queries for conversions and payments.
ProductFeed— every field on a product, with its merchant, variants and images.- Pagination — page through feeds larger than 200 products.