API Integration
Posted by Demian Mash on 26 March 2019 03:22 PM

How to set up an API integration

Quick links:

How does it work?

Example: How to update the campaign data

Example: How to get statistics

Example: How to change/renew targeting under the single campaign


What is API?

API allows you to work with campaigns and statistics remotely.

For example, you have some kind of a web interface or a developer who assembles an aggregated page to view the results and will continuously receive data or will just update campaign data.

How does it work?

There are many programs for working with the API. In this guide, let’s try to perform several operations with ‘Postman’.

1. Go to the API section

2. Copy the API authorization key from this field.

3. Log in to ‘Postman’ with your credentials (sign in or go through Google)

4. In the header, you need to add Key - Authorization (tip appears)

Paste key in the Value field.

5. Select the desired endpoint. For example, we want to see data on a specific campaign.

Click /campaigns /{campaignid}/ token to collapse token menu, enter the campaign id in the appropriate field.

6. Click Try it out! and copy Request URL.

7. Insert the URL and click Send. There will be a response in the section “Body - Pretty” section at the bottom of the Postman. It matches with response in SSP.

Example: How to update the campaign data (you need to add what you can change in different statuses)

  1. Increase the campaign Total Budget. Put a PUT request.

  2. Specify the campaign id. Indicate the campaign id and the required changes in the body according to the example. For a sample, you can take Example value and add the necessary parameters.

  1. Copy the request from the Request Url field and paste into the Request field by selecting PUT.

    4. Specify the Headers key authorization and Content-Type: JSON.

5. In the Body tab, select the raw, JSON as in the screenshot. Paste the request in the Body below.

Example: How to get statistics

  1. Decide that you want to receive and collect request

  2. For example, we want to get statistics from the beginning of the year to October.

  3. Fill in the required fields and indicate Group by, that is, on what basis group the data. Select the option by campaign id.

4. Press Try it out and receive the request, then copy it.

5. Go to Postman, choose 'GET request', insert your response link, and click ‘Send’ to get the data.


Example: How to change/renew targeting under the single campaign

Choose a PUT request /campaigns/{campaignid}/{type}/{targeting}/

  1. Enter Campaign ID value.

  2. Select operation type:

    1. targeted - will include your parameters;

    2. blocked - will exclude your parameters;

  3. Choose 'targeting' - what type of targeting would you like to apply changes. Use the dropdown menu to select a targeting type.

Here’s an example of os_type renew request:


#api #API #integration

(0 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name: