Skip to content

Working with campaigns

Campaign list

INFO

GET /campaigns

Example:

http
https://client.adstat.pro/api/campaigns/?period=today&limit=50&offset=0

Query parameters:

ParameterTypeDescription
periodStringTime period for campaign data.
Values: today, all, yesterday, starts_month.
offsetNumberOffset in the result list.
limitNumberMaximum number of campaigns in the response.
campaign_nameStringCampaign name to filter by.
is_activeBooleanStatus filter.
Values: true (active), false (inactive).
If omitted, campaigns in both statuses are returned.

Example successful response:

json
{
	"items": [
		{
			"id": 999999,
			"name": "example",
			"description": "",
			"account_id": "ACC000000",
			"account_name": "SOME_test",
			"status": "not_active",
			"number_of_advertisements": 2,
			"goals": 0,
			"impressions": 0,
			"budget": 0.01,
			"cps": 0,
			"cpm": 0,
			"ctr": 0,
			"cpc": 0,
			"clicks": 0,
			"spent": 0
		}
	],
	"count": 0
}

Response fields:

FieldTypeDescription
itemsArrayList of campaign objects.
idNumberUnique campaign identifier.
nameStringCampaign name.
descriptionStringCampaign description.
account_idStringCabinet identifier the campaign belongs to.
account_nameStringCabinet name the campaign belongs to.
statusStringCampaign status.
number_of_advertisementsNumberNumber of ads in the campaign.
goalsNumberGoals achieved in the campaign.
impressionsNumberAd impressions.
budgetNumberCampaign budget.
cpsNumberCost per goal (CPS).
cpmNumberCost per thousand impressions (CPM).
ctrNumberClick-through rate (CTR).
cpcNumberCost per click (CPC).
clicksNumberAd clicks.
spentNumberTotal amount spent on the campaign.
countNumberNumber of campaigns in the list.