Campaigntrackly API

seamlessly share your data with upstream and downstream applications
Version: 1.0
BasePath:/wp-json/campaigntrackly/v1/
All rights reserved
http://apache.org/licenses/LICENSE-2.0.html

Access

  1. APIKey KeyParamName:x-ct-key KeyInQuery:false KeyInHeader:true
  2. APIKey KeyParamName:x-ct-secret KeyInQuery:false KeyInHeader:true

Methods

[ Jump to Models ]

Table of Contents

Campaigns

Reports

Tags

Campaigns

Up
get /campaigns
Get user's campaigns (userCampaigns)
Get user's campaigns

Query parameters

date_range (optional)
Query Parameter — Get campaigns date range.Use if you want to get range of specific dates
date (optional)
Query Parameter — Get campaigns by date (full-date, for example, 2021-01-21) or set date range start date format: date
date_to (optional)
Query Parameter — Set campaigns date range end date (for example, 2021-01-21) format: date
category (optional)
Query Parameter — Campaign Category Id
limit (optional)
Query Parameter — Items per page, max. 50, default 20
offset (optional)
Query Parameter — Integer offset for paging

Return type

CampaignsData

Example data

Content-Type: application/json
{
  "total" : 0,
  "campaigns" : [ {
    "date" : "2000-01-23",
    "name" : "Campaign Name",
    "links" : [ {
      "url" : "https://app.campaigntrackly.com/"
    }, {
      "url" : "https://app.campaigntrackly.com/"
    } ],
    "category" : "Category Name"
  }, {
    "date" : "2000-01-23",
    "name" : "Campaign Name",
    "links" : [ {
      "url" : "https://app.campaigntrackly.com/"
    }, {
      "url" : "https://app.campaigntrackly.com/"
    } ],
    "category" : "Category Name"
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK CampaignsData

401

Unauthenticated Request FailedRequest

Example data

Content-Type: Example
{"error":"UNAUTHENTICATED","message":"Please authenticate and try again."}

Up
get /campaign_export
Get user's campaign links data (userCampaignsExport)
Get user's campaign links data

Query parameters

id (required)
Query Parameter — Campaign Id

Return type

Export

Example data

Content-Type: application/json
{
  "date" : "2000-01-23",
  "name" : "Campaign Name",
  "links" : [ {
    "date" : "2023-02-23T03:50:54Z",
    "id" : 0,
    "long_url" : "https://app.campaigntrackly.com/",
    "short_url" : "https://ctrly.io/abc",
    "tags" : [ {
      "name" : "Tag Name",
      "value" : "Tag Value"
    }, {
      "name" : "Tag Name",
      "value" : "Tag Value"
    } ]
  }, {
    "date" : "2023-02-23T03:50:54Z",
    "id" : 0,
    "long_url" : "https://app.campaigntrackly.com/",
    "short_url" : "https://ctrly.io/abc",
    "tags" : [ {
      "name" : "Tag Name",
      "value" : "Tag Value"
    }, {
      "name" : "Tag Name",
      "value" : "Tag Value"
    } ]
  } ],
  "category" : "Category Name"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK Export

401

Unauthenticated Request FailedRequest

Example data

Content-Type: Example
{"error":"UNAUTHENTICATED","message":"Please authenticate and try again."}

Up
get /categories
Get user's campaigns categories (userCategories)
Get user's campaigns categories

Query parameters

limit (optional)
Query Parameter — Items per page, max. 50, default 20
offset (optional)
Query Parameter — Integer offset for paging

Return type

CategoriesData

Example data

Content-Type: application/json
{
  "total" : 0,
  "categories" : [ {
    "favorites" : 1,
    "name" : "Category Name",
    "folder_id" : 6
  }, {
    "favorites" : 1,
    "name" : "Category Name",
    "folder_id" : 6
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK CategoriesData

401

Unauthenticated Request FailedRequest

Example data

Content-Type: Example
{"error":"UNAUTHENTICATED","message":"Please authenticate and try again."}

Up
post /campaigns
Update user's campaign names (userPostCampaigns)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body jsonFormat (optional)
Body Parameter — json object

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK

401

Unauthenticated Request FailedRequest

Example data

Content-Type: Example
{"error":"UNAUTHENTICATED","message":"Please authenticate and try again."}

Up
post /categories
Update campaign category name (userPostCategories)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body jsonFormat (optional)
Body Parameter — json object

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK

401

Unauthenticated Request FailedRequest

Example data

Content-Type: Example
{"error":"UNAUTHENTICATED","message":"Please authenticate and try again."}

Reports

Up
get /report
Get campaign report (campaignReport)
Get campaign report

Query parameters

account_id (required)
Query Parameter — Google Analytic Account ID
campaign_id (required)
Query Parameter — Campaign ID
start_date (required)
Query Parameter — Start date of period (full-date, for example, 2021-01-21) format: date
end_date (required)
Query Parameter — End date of period (full-date, for example, 2021-05-21) format: date
field (required)
Query Parameter — Field

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK

401

Unauthenticated Request FailedRequest

Example data

Content-Type: Example
{"error":"UNAUTHENTICATED","message":"Please authenticate and try again."}

Up
get /report_accounts
Get connected Google Analytic Account ID's (campaignReportAccounts)
Get connected Google Analytic Account ID's

Return type

GoogleAccountsData

Example data

Content-Type: application/json
{
  "accounts" : [ {
    "account_id" : 1234567890,
    "name" : "GA View Name",
    "id" : 0,
    "url" : "https://app.campaigntrackly.com/"
  }, {
    "account_id" : 1234567890,
    "name" : "GA View Name",
    "id" : 0,
    "url" : "https://app.campaigntrackly.com/"
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK GoogleAccountsData

401

Unauthenticated Request FailedRequest

Example data

Content-Type: Example
{"error":"UNAUTHENTICATED","message":"Please authenticate and try again."}

Tags

Up
post /channels
Update channel tags (channelPostTags)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body jsonChannelFormat (optional)
Body Parameter — json object

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK

401

Unauthenticated Request FailedRequest

Example data

Content-Type: Example
{"error":"UNAUTHENTICATED","message":"Please authenticate and try again."}

Up
get /channels
Get channel tags (channelTags)
Get channel tags

Return type

ChannelsData

Example data

Content-Type: application/json
{
  "comments" : "comments",
  "hidden" : 1,
  "id" : 0,
  "source" : "source",
  "medium" : "medium",
  "title" : "title",
  "folder_id" : 5,
  "favorite" : 6
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK ChannelsData

401

Unauthenticated Request FailedRequest

Example data

Content-Type: Example
{"error":"UNAUTHENTICATED","message":"Please authenticate and try again."}

Up
post /contents
Update content tags (contentPostTags)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body jsonFormat (optional)
Body Parameter — json object

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK

401

Unauthenticated Request FailedRequest

Example data

Content-Type: Example
{"error":"UNAUTHENTICATED","message":"Please authenticate and try again."}

Up
get /contents
Get content tags (contentTags)
Get content tags

Return type

ContentsData

Example data

Content-Type: application/json
{
  "id" : 0,
  "tag" : "tag",
  "folder_id" : 6
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK ContentsData

401

Unauthenticated Request FailedRequest

Example data

Content-Type: Example
{"error":"UNAUTHENTICATED","message":"Please authenticate and try again."}

Up
post /customs
Update custom tags (customPostTags)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body jsonFormat (optional)
Body Parameter — json object

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK

401

Unauthenticated Request FailedRequest

Example data

Content-Type: Example
{"error":"UNAUTHENTICATED","message":"Please authenticate and try again."}

Up
get /customs
Get custom tags (customTags)
Get custom tags

Return type

CustomsData

Example data

Content-Type: application/json
{
  "custom" : "custom",
  "values" : [ {
    "tag" : "tag"
  }, {
    "tag" : "tag"
  } ],
  "id" : 0,
  "folder_id" : 6
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK CustomsData

401

Unauthenticated Request FailedRequest

Example data

Content-Type: Example
{"error":"UNAUTHENTICATED","message":"Please authenticate and try again."}

Up
post /terms
Update term tags (termPostTags)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body jsonFormat (optional)
Body Parameter — json object

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK

401

Unauthenticated Request FailedRequest

Example data

Content-Type: Example
{"error":"UNAUTHENTICATED","message":"Please authenticate and try again."}

Up
get /terms
Get term tags (termTags)
Get term tags

Return type

TermsData

Example data

Content-Type: application/json
{
  "id" : 0,
  "tag" : "tag",
  "folder_id" : 6
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK TermsData

401

Unauthenticated Request FailedRequest

Example data

Content-Type: Example
{"error":"UNAUTHENTICATED","message":"Please authenticate and try again."}

Models

[ Jump to Methods ]

Table of Contents

  1. CampaignName
  2. CampaignsData
  3. CampaignsData_campaigns
  4. CampaignsData_links
  5. CategoriesData
  6. CategoriesData_categories
  7. Category
  8. ChannelsData
  9. ContentsData
  10. CustomsData
  11. CustomsData_values
  12. Date
  13. DateTime
  14. Export
  15. Export_links
  16. Export_tags
  17. FailedRequest
  18. GoogleAccountsData
  19. GoogleAccountsData_accounts
  20. Id
  21. LoginData
  22. LoginData_data
  23. LoginResponse
  24. LoginResponse_data
  25. LoginResponse_requirements
  26. ShortUrl
  27. TagName
  28. TagValue
  29. TermsData
  30. Url
  31. jsonChannelFormat
  32. jsonFormat

CampaignName Up

string

CampaignsData Up

Campaigns Data
total (optional)
page (optional)
campaigns (optional)

CampaignsData_campaigns Up

object
id (optional)
name (optional)
date (optional)
category (optional)
links (optional)

CampaignsData_links Up

object
id (optional)
url (optional)

CategoriesData Up

Categories Data
total (optional)
page (optional)
categories (optional)

CategoriesData_categories Up

object
id (optional)
name (optional)
folder_id (optional)
Integer integer
favorites (optional)
Integer integer

Category Up

string

ChannelsData Up

Channels Data
id (optional)
title (optional)
String string
source (optional)
String string
medium (optional)
String string
favorite (optional)
Integer integer
hidden (optional)
Integer integer
folder_id (optional)
Integer integer
comments (optional)
String string

ContentsData Up

Content Data
id (optional)
folder_id (optional)
Integer integer
tag (optional)
String string

CustomsData Up

Custom Data
id (optional)
folder_id (optional)
Integer integer
custom (optional)
String string
values (optional)

CustomsData_values Up

object
id (optional)
tag (optional)
String string

Date Up

string

DateTime Up

string

Export Up

Export
name (optional)
date (optional)
category (optional)
links (optional)

Export_links Up

object
id (optional)
long_url (optional)
short_url (optional)
date (optional)
tags (optional)

Export_tags Up

object
id (optional)
name (optional)
value (optional)

FailedRequest Up

error (optional)
message (optional)

GoogleAccountsData Up

GA data
accounts (optional)

GoogleAccountsData_accounts Up

object
id (optional)
name (optional)
String string
example: GA View Name
url (optional)
account_id (optional)
Long integer format: int64
example: 1234567890

Id Up

integer

LoginData Up

Login
data (optional)

LoginData_data Up

object
token (optional)
String string
expired_at (optional)
String string

LoginResponse Up

Login
response (optional)
String string
code (optional)
String string
data (optional)
requirements (optional)

LoginResponse_data Up

object
token (optional)
String string
expired_at (optional)
String string
access_level (optional)
String string

LoginResponse_requirements Up

object
username (optional)
String string
password (optional)
String string

ShortUrl Up

string

TagName Up

string

TagValue Up

string

TermsData Up

Terms Data
id (optional)
folder_id (optional)
Integer integer
tag (optional)
String string

Url Up

string

jsonChannelFormat Up

object
id (optional)
Long integer format: int64
name (optional)
String string
source (optional)
String string
medium (optional)
String string

jsonFormat Up

object
id (optional)
Long integer format: int64
name (optional)
String string