In this article you'll find:

What is API?

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 web interface or a developer who assembles an aggregated page to view the results and will continuously receive data or will just update the campaign data.

How does it work?

Before start: Please note that Clickadu API allows 200 requests per hour. Further requests will be rejected.

There are many programs for working with 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 the key in the Value field.

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

Click/campaigns/{campaignid}/ token to collapse a token menu, enter the campaign ID in the corresponding field.

api5.png

6. Click Try it out! and copy the 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 a response in SSP.

pasted_image_0.png

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 the Example value and add the necessary parameters.

3. Copy the request from the Request URL field and paste it 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 you will 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:

targeted - will include your parameters;

blocked - will exclude your parameters;

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

api6.png


Here’s an example of an os_type renew request:

api7.png
Did this answer your question?