Campaign

List campaign

This API provides the data of created campaigns for the current user's business unit
curl -X POST -H X-API-Key: <API_KEY> -d '{"page": {"offset":0, "limit": 100}, "filter":{"networkVendor":"<vendor name>", "externalCampaignId": "<external campaign id>"}}'
https://api.justtrack.io/management/v0/campaigns

Request

{
    "page": {
        "offset": 0,
        "limit": 100
    },
    "filter": {
        "networkVendor": "<networkVendor>",
        "externalCampaignId": "<external campaign id>"
    }
}
NameTypeDescription

offset

int

offset clause skips the offset rows before beginning to return the response. Default 0

limit

int

limit determines the number of campaigns returned in the response. Default 100

networkVendor

string

networkVendor determines the supported network vendor. Not required

externalCampaignId

string

externalCampaignId determines the network-specific campaignId. Not required

Response

{
  "result": [
    {
      "id": int,
      "campaignTypeId": int,
      "goalId": int,
      "name": "string",
      "networkId": int,
      "optimizationType": "string",
      "clientId": int,
      "createdAt": "string",
      "updatedAt": "string",
      "attributes": [
        {
            "name": "fb_adgroup_id",
            "value": "string"
        },
        {
            "name": "fb_adset_id",
            "value": "string"
        },
        {
            "name": "fb_campaign_id",
            "value": "string"
        },
        {
            "name": "act",
            "value": "string"
        }
      ]
    }
  ]
}

Create campaign

This API allows you to create a campaign. 
curl -X POST -H X-API-Key: <API_KEY> 
https://api.justtrack.io/management/v0/campaign

Request

The general request to the Create Campaign API looks like:

{
    "optimizationType": "string",
    "campaignTypeId": int,
    "clientId": int,
    "networkId": int,
    "countries": ["string", "string"],
    "name": "string",
    "attributes": [
        {
            "name": "string",
            "value": "string"
        },
        ...
    ]
}
NameTypeDescription

optimizationType

string

Available options are "cpa" or "cpi".

campaignTypeId

int

Available options are:

  • 1 for acquision

  • 2 for retargeting

clientId

int

The Id of the client. You can obtain it by using the app API.

networkId

int

The Id of the network. You can obtain it by using the network API.

countries

[]string

The list of the countries in ISO2 format. For example ["DE", "EN"].

name

string

The name of the new campaign.

attributes

The attributes are network-specific data to link JustTrack with the Ad Network.

Attributes

NameTypeDescription

name

string

The attribute name specific for the Ad Network.

value

string

The attribute value specific for the Ad Network.

Attributes Facebook example

"attributes": [
        {
            "name": "fb_adgroup_id",
            "value": "string"
        },
        {
            "name": "fb_adset_id",
            "value": "string"
        },
        {
            "name": "fb_campaign_id",
            "value": "string"
        },
        {
            "name": "act",
            "value": "string"
        }
    ]

Response

{
  "id": int,
  "active": boolean
}

Last updated