Refersion offers a GraphQI API which allows Marketplace affiliates to fetch their performance data across the brands they promote within the Refersion Marketplace.

What is GraphQL?

GraphQL is a query language used to obtain information from an API. Unlike a REST API where you make multiple requests to different endpoints (URLs), GraphQL makes it easy to get the exact pieces of information you’re looking for from your Marketplace account in a single API request.

What information can I get from GraphQL?

You can get information about conversions, clicks, payments, and more. The easiest way to visualize what data is available is to pull up a mapping of available fields using an external tool like GraphQL Voyager.

Follow these instructions to obtain an introspection query to use within Voyager. Once you have the query, paste it in the introspection box and click Display.

Once that’s complete, you’ll see a graph similar to the image below.

In the above image, each table contains specific fields that can be queried in GraphQL to obtain information about your marketplace account. The lines show how the individual tables are connected together. For example, as an affiliate, you can query for information about yourself from the Affiliate table and also query for information from the Conversion Triggers table to see which triggers are associated with your account.

How do I use GraphQL?

There are a couple of ways to use GraphQL:

  • Use a REST API testing tool
  • Integrate GraphQL with one of our Partners (Affluent or Affilimate)
  • Integrate GraphQL into your code (advanced - requires knowledge of code)

Use a REST API testing tool

A REST API testing tool provides a user-friendly interface for sending requests to any API. If you’d like to play around with GraphQL and see what data is available, or just learn more about how it works, you can use one of the following tools to test out the API:

Here’s an example GraphQL query using Insomnia:

In the example above, when querying the GraphQL API for information about conversions for a marketplace account, complete with click and shop data, GraphQL returned exactly what was asked for.

You can check out more example queries here.

Integrate GraphQL with one of our Partners (Affluent or Affilimate)

If the goal of using the GraphQL API is to route data into another platform to optimize performance or aggregate analytics across different networks, Refersion works with partners like Affluent and Affilimate who specialize in this type of data aggregation.

Both platforms provide unified reporting plus other useful features for conversion optimization and tracking. To integrate with either platform, all you’ll need to do is sign up and follow their instructions for integrating Refersion into their unified dashboards:

Integrate GraphQL into your code (advanced)

If you are looking to do a deep data integration with Refersion, you can integrate the GraphQL API into your code directly. We won’t cover how to do that here; however, here is an article that might be useful.

Did this answer your question?