Menu
Dessert Data
A love for ingesting data

Commission Junction

Publisher API

Psst... Dessert Data connects all your marketing data into a neatly organized database. You can use the same query to pull spend for Bing, TikTok, or Google.

Don't worry about APIs changes or database uptime. We handle all that for you.

GET STARTED FREE

Overview

Commission Junction provides incredibly robust and developer friendly APIs.
The steps are:
  1. Create a personal access token
  2. Identify your publisher (or advertiser) id
  3. Query the API

Create a personal access token

Go to Personal Access Tokens and create a new token. Make sure to note the created token.

Identify your publisher ID

Simply log into your dashboard at CJ.com and look at the URL, and find your ID located in your account drop downCJ Business ID

Query the API

Query the publisher API using standard GraphQL syntax. The biggest recommendation for Typescript users is to make sure you're not injecting unsupported newlines. The easiest thing is to you copy your query onto a single line.

cURL example


curl --location 'https://commissions.api.cj.com/query'  
  --header 'Content-Type: application/json'  
  --header 'Authorization: Bearer ${personal access token}'  
  --data '{
    "query":"{ 
      publisherCommissions(
        forPublishers: ["${publisherId}"], 
        sincePostingDate:"2023-03-01T00:00:00Z",
        beforePostingDate:"2023-03-21T00:00:00Z")
        {count payloadComplete records 
              {actionTrackerName 
              websiteName 
              advertiserName 
              postingDate 
              pubCommissionAmountUsd 
              orderId 
              shopperId 
              publisherName 
              websiteName 
              items { 
                  quantity 
                  perItemSaleAmountPubCurrency 
                  totalCommissionPubCurrency 
              }
            }
        }
    }"
    ,"variables":{}}