Campaigns
?cuid=<customer ID>
query string parameter is needed for all Campaigns endpoints below.
POST /campaign
1 | { |
Create a new campaign for the given customer
Response will include {cid: [CAMPAIGN ID]}
to be used in future API calls
GET /campaign
Requires cuid as query string1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23[
// Example Response
{
"cid": INT (cid),
"cuid": INT (cuid as supplied),
"start": 1432339200,
"end": 1436572740,
"name": "Campaign 1",
"enabled": BIT (true or false),
"freq": INT (Offer frequency cap),
"dailySpend": FLOAT (2 decimal places)
},
{
"cid": INT (cid),
"cuid": INT (cuid as supplied),
"start": 1433980800,
"end": 1435967940,
"name": "Campaign 2",
"enabled": BIT (true or false),
"freq": INT (Offer frequency cap),
"dailySpend": FLOAT (2 decimal places)
}
]
Get a list of owned campaigns by the advertiser..
GET /campaign/:cid
Requires cuid as query string1
2
3
4
5
6
7
8
9
10
11// Example Response
{
"cid": INT (cid),
"cuid": INT (cuid as supplied),
"start": 1432339200,
"end": 1436572740,
"name": "Campaign 1",
"enabled": BIT (true or false),
"freq": INT (Offer frequency cap),
"dailySpend": FLOAT (2 decimal places)
}
Get a specific campaign owned by the advertiser.
PUT /campaign/:cid
* Denotes optional parameter1
2
3
4
5
6
7{
*name: STRING,
*start: INT (Timestamp),
*end: INT (Timestamp),
*frequency: INT,
*dailySpend: FLOAT (2 decimal places)
}
Edit a campaign owned by the advertiser. Only supplied fields are edited. $set behaviour
PUT /campaign/:cid/pause
Pause the given campaign
PUT /campaign/:cid/resume
Resume the given campaign
DELETE /campaign/:cid
Removes the campaign from API access.