Getting Started

Important

This is a Beta API and is subject to change.

Endpoint

Unlike Refersion’s REST API which has a variety of endpoints, the GraphQL API has a single endpoint:

POST https://graphql.refersion.com

Authentication

The GraphQL API requires an access token for making authenticated requests.

Getting your access token

Refersion merchants can obtain access token by logging into your Refersion account and navigating to Account/Settings/Refersion API/GraphQL.

If you are a Refersion Marketplace user and would like to use GraphQL, please email us at [email protected] to request access. Once GraphQL has been enabled on your account, the token will be available on your Marketplace Profile page.

Making your first query

You can access the GraphQL API endpoint using cURL or any other HTTP client. For the following test example, make sure to replace <ACCESS_TOKEN> with the token you obtained from the Authentication section.

curl

To make a query using curl, send a POST request with your query as the JSON payload.

curl -X POST \
"https://graphql.refersion.com" \
-H "X-Refersion-Key: <YOUR_ACCESS_TOKEN>" \
-H "Content-Type: application/json" \

Example Query

{
    "query": "{  
        offers { 
            commission, 
            type 
        } 
    }"
}
© Refersion, Inc. All rights reserved.