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_id
as 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, image_url, and external_id. |
Image | This table returns the images for the products |
Example Queries
Retrieve a list of merchants (stores) available in the product feed
{
"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
{
"query": "{
product_feed (first: 3 offset: 0) {
id,
name,
description,
price,
sku,
currency,
product_url,
image_url,
rfsn_parameter,
merchant {
shop_name,
shop_url,
shop_identifier
},
variants {
name,
price,
options,
image_url
},
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,
"sku": "",
"currency": "USD",
"product_url": "example-shop-1.myshopify.com\/products\/daily-care-lotion",
"image_url": "",
"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",
"image_url": ""
}
],
"images": [
{
"url": null
}
]
},
{
"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,
"sku": "",
"currency": "USD",
"product_url": "example-shop-1.myshopify.com\/products\/petite-hand-cream",
"image_url": "",
"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",
"image_url": ""
}
],
"images": [
{
"url": null
}
]
},
{
"id": "244013",
"name": "Radiance face cream",
"description": "It's so smooth and creamy, pure liquid gold.",
"price": 0,
"sku": "",
"currency": "USD",
"product_url": "example-shop-1.myshopify.com\/products\/radiance-face-cream",
"image_url": "",
"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",
"image_url": ""
}
],
"images": [
{
"url": null
}
]
}
],
"pageInfo": {
"total_results": {
"product_feed": 443
}
}
}
}