How to automate processes using HilltopAds API?

There are different APIs for publishers and advertisers, usually used to get statistics, but HilltopAds offers many more options for using APIs to automate processes.

How to automate processes using HilltopAds API?

You must have heard about API many times, but what is and how to use it? This article will try to keep the complex simple and find out why API is on everyone's lips.

Data is current as of 09/01/2022.

So what is an API?

API stands for Application Programming Interface. This abbreviation is found everywhere — from command line tools to applications.

Application — applications or programs that you use on your smartphone.
Programming — program developers use API to write code.
Interface — your interaction with the application.

Simply put, this is a set of components with which a computer program (bot or website) can use another program.

We can compare API with a waiter in the restaurant who takes your order, passes it to the kitchen, and then brings it to you.

The beauty of API is that it makes life easier for customers and, in addition, it makes it easier for programmers who develop an application because API is ready-made code, which is why API is so popular.


API in HilltopAds.

There are different APIs for publishers and advertisers, usually used to get statistics, but HilltopAds offers many more options for using APIs to automate processes.

There is an API tab in the "My Account" section. There you will find the API key generator and all API Documentation with examples of requests and responses.

The API key is a unique secret identifier to authenticate requests.

If you have lost the key or suspect that someone might have learned it, then you need to delete the old key and generate a new one.

Benefits of using API for our publishers and advertisers.

There is plenty of data to deal with, so using the HilltopAds network’s API for publishers and advertisers is very helpful.

  • It's easy to compare the effectiveness of HilltopAds advertising formats for webmasters.
  • Key metrics tracking and automatic updates.
  • Saving time on building dynamic reports and collecting statistics.
  • Ease of monitoring key metrics (CPM, revenue) and the ability to make changes quickly.
  • The ability to transfer statistics data to convenient tracking and applications for analyzing the progress of advertising campaigns.
  • Possibility to manage an advertising campaign apart from HilltopAds personal account.

Publisher API.

  • GET /publisher/listStats - Get publisher statistics.
  • GET /publisher/inventory - Returns a list of the publisher's sites and zones.
  • GET /publisher/antiAdBlock - Returns invocation code for specified zone or subId. To prevent ad blocking, this method may return a slightly different code each time, so it is recommended to get a new code every 5 minutes. This code differs from the code you get from a web interface and performs better if you recache it frequently.
  • GET /publisher/balance - Returns publisher balance.

Advertiser API.

  • GET /advertiser/listStats - Get advertiser statistics.
  • PATCH /advertiser/startCampaign - Turn campaign status to "on". Please remember that traffic will start only after the moderator approves the campaign. The current approval state will be indicated in the response.
  • PATCH /advertiser/stopCampaign - Turn campaign status to "off". This will stop traffic, but some inertia (up to 10 minutes) may occur.
  • POST /advertiser/addToBlackList - Stop getting traffic from specified sources. Please remember that some inertia (up to 1 hour) may occur.
  • POST /advertiser/setBlackList
  • DELETE /advertiser/removeFromBlackList - Resume getting traffic from specified source if it was previously blacklisted. This action cancels source blacklisting. Please remember that some inertia (up to 1 hour) may occur.
  • DELETE /advertiser/clearCampaignBlackList - Remove campaign blacklist.
  • POST /advertiser/addToWhiteList - Start getting traffic from a specified source. Please remember that some inertia (up to 1 hour) may occur.
  • POST /advertiser/setWhiteList
  • DELETE /advertiser/removeFromWhiteList - Stop getting traffic from a specified source if it was previously whitelisted. This action cancels source whitelisting. Please remember that some inertia (up to 1 hour) may occur.
  • DELETE /advertiser/clearCampaignWhiteList - Remove campaign whitelist.
  • PATCH /advertiser/setBid - Set up the price of action for a campaign of CPA type, price of click for a campaign of CPC type, or price of 1000 impressions for a campaign of CPM type.
  • PATCH /advertiser/setDestinationUrl - Changes final destination URL for traffic. Please, keep in mind that this action may require moderation. During the moderation process, traffic will be sent to the previous destination URL.
  • GET /advertiser/inventory - Returns a list of advertisers' campaigns and ads.
  • GET /advertiser/campaignBlackList - The list of zones added to the blacklist.
  • GET /advertiser/campaignWhiteList - The list of zones added to the whitelist.
  • GET /advertiser/balance - Returns advertiser balance.

In case of an error during API setup, we have added standard error codes below.

  • 401 - unauthorized — No or invalid API key is provided, or API key is not active.
  • 422 - illegal arguments — Incompatible parameters are used, the required parameter was not provided, or an invalid value of a parameter is passed.

If you need more help setting up the API, feel free to contact our support team, we are always happy to help!

Try the HilltopAds API now, and we're sure you'll love it! 😊