Skip to main content

Example Queries

Deprecated for merchants

The GraphQL API is deprecated for merchants. Merchants should build new integrations on the current version of the Refersion REST API (v2026-08) — see the API Reference.

Queries in this section use a merchant access token. For the marketplace-affiliate equivalents, see GraphQL for Marketplace Affiliates.

Get a list of your conversions from May 2018

Sample query:

{
conversions(created_from: 1525132800 created_to: 1527202238) {
affiliate {
name
email
}
total
commission_total
currency
created
}
}

Sent as:

{"query": "{ conversions(created_from: 1525132800 created_to: 1527202238) { affiliate { name email } total commission_total currency created } }"}

Note: timestamp is in Unix time

Sample response:

{
"data": {
"conversions": [
{
"affiliate": {
"name": "ABC",
"email": "[email protected]"
},
"total": "24.00",
"commission_total": "4.80",
"currency": "USD",
"created": "1526674258"
},
{
"affiliate": {
"name": "DEF",
"email": "[email protected]"
},
"total": "630.00",
"commission_total": "346.50",
"currency": "CAD",
"created": "1526671881"
}
]
}
}

Get a list of affiliates and their referral parameters

Sample query:

{
affiliates {
status
name
email
rfsn_parameter
}
}

Sent as:

{"query": "{ affiliates { status name email rfsn_parameter } }"}

Sample response:

{
"data": {
"affiliates": [
{
"status": "ACTIVE",
"name": "Affiliate A",
"email": "[email protected]",
"rfsn_parameter": "&rfsn=123456.1234c"
},
{
"status": "ACTIVE",
"name": "Influencer B",
"email": "[email protected]",
"rfsn_parameter": "&rfsn=123456.238e5"
}
]
}
}
  • Schema Reference — every query, type and field, including the ones only merchant tokens can see.
  • Filtering and Sorting — the argument rules these examples rely on.
  • Pagination — fetch more than the 200 results a single request returns.