Skip to main content

Campaign

List campaign

This API provides the data of created campaigns for the current user's organization

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
offsetintoffset clause skips the offset rows before beginning to return the response. Default 0
limitintlimit determines the number of campaigns returned in the response. Default 100
networkVendorstringnetworkVendor determines the supported network vendor. Not required
externalCampaignIdstringexternalCampaignId determines the network-specific campaign ID. 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,
"externalCampaignId": string,
"clientId": int,
"networkId": int,
"countries": ["string", "string"],
"name": "string",
"attributes": [
{
"name": "string",
"value": "string"
},
...
]
}

NameTypeDescription
optimizationTypestringAvailable options are cpa or cpi.
campaignTypeIdintAvailable options are: 1 for acquisition, 2 for retargeting
externalCampaignIdintSource Campaign ID. Provided by the partner
clientIdintThe ID of the client. You can obtain it by using the app API.
networkIdintThe ID of the network. You can obtain it by using the network API.
countries[]stringThe list of the countries in ISO2 format. For example ["DE", "EN"].
namestringThe name of the new campaign.
attributesAttributes listThe attributes are network-specific data to link JustTrack with the Ad Partner.
info

Depending on the partner, externalCampaignId may refer to different fields, e.g. source campaign id, campaign uuid, ...

Attributes

NameTypeDescription
namestringThe attribute name specific for the Ad Partner.
valuestringThe attribute value specific for the Ad Partner.

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
}