CRUD operations for campaigns
Endpoints
Method | Endpoint | Description |
GET | /v3/campaigns | List all campaigns |
POST | /v3/campaigns | Create new campaign |
GET | /v3/campaigns/[id] | Get details for a specific campaign |
PUT | /v3/campaigns/[id] | Update a specific campaign |
DELETE | /v3/campaigns/[id] | Delete a campaign. This is a soft-delete. |
List Campaigns
Method: GET
Endpoint: /v3/campaigns
Parameters
Name | Type | Description |
| integer | Filter campaigns by the given advertiser_id |
Example
Response
{ "data": [ { "advertiser_id": 1552, "advertiser_name": "advertiser 1", "id": 103587, "name": "Campaign 1" }, { "advertiser_id": 1551, "advertiser_name": "advertiser 2", "id": 103578, "name": "Campaign 2" } ] }
Get Campaign
Method: GET
Endpoint: /v3/campaigns/[id]
Example
Response
{ "data": { "advertiser_id": 1001, "advertiser_logo_url_override": null, "id": 2001, "is_enabled": false, "name": "Campaign X", "serving_status": "not_ready" } }
Create Campaign
Method: POST
Endpoint: /v3/campaigns/
Parameters
Parameter | Type | Description |
| string | Name of the campaign. |
| integer | ID of the advertiser the campaign will belong to. |
| string | Optional image url to override the logo set on the advertiser. On POST, the image will be downloaded and thereafter served from a Nativo domain. |
| boolean | The current enabled status of the budget. Set to |
| string | Indicates the ad serving state of the budget. Options include: |
| string | This tag contains Nativo JS and budget information for budgets serving via 3rd party ad server within this campaign. To use this tag, input into your 3rd party adserver. |
Example
Payload
{ "advertiser_id": 1001, "name": "Campaign X" }
Response
{ "data": { "advertiser_id": 1001, "advertiser_logo_url_override": null, "id": 2001, "is_enabled": false, "name": "Campaign X", "serving_status": "not_ready" } }
Update Campaign
Method: PUT
Endpoint: /v3/campaigns/[id]
Example
Update the campaign name.
Payload
{ "name": "Campaign Z" }
Response
{ "data": { "advertiser_id": 1001, "advertiser_logo_url_override": null, "id": 2001, "is_enabled": false, "name": "Campaign Z", "serving_status": "not_ready" } }
Delete Campaign
Method: DELETE
Endpoint: /v3/campaign/[id]
Example
Since these are soft deletes the campaign is still accessible through the GET endpoint. You can distinguish deleted campaigns because their serving_status
field is set to deleted
.
Reponse
{"success": true}