Time to read: 8 min

The article covers the following topics:

API Integration rules

First of all, User and Affiliate need to have an individual API-keys, to set API Integration.

User can find API key in 'Users' Tab - > 'Users management' -> 'User edit page':

Affiliate can easily find individual API-key in his/her Affiliate's panel in 'Profile' Tab - > 'API-key' section.

❗ Only the General manager has permission to get the "User edit page".

❗ All API requests must include an API-key header, or API-key GET parameter for client authentication.

Also, to start using API, you need an Affise API document, which includes all available methods to work with. Get acquainted with Affise API v.3.1. Doc here.

Keep in mind that your API URL leads to API Doc.

Commonly Used Methods

Here will be introduced commonly used methods with examples of usage which concerns to:

  • Affiliate managing (POST New affiliate, POST Add partner's postback, POST Disable affiliate) and

  • Pixels managing (POST Pixel add).

API Request Structure: GET/POST + api domain + path + ? + api-key=189471975956279174174.

It should be noted that header content-type - application/x-www-form-urlencoded is used on an ongoing basis.

❗ GET methods provide pagination with 100 entries per page. If you want to get data for a specific page, add the &page parameter to the request.

Example:

https://api-rocketcompany.affise.com/3.0/offers?api-key=a227fe0ec61dd5467368266c12345678&page=3

[POST] New Affiliate

To create a new Affiliate via API, you need to navigate to the 'Affiliate managing' section in API Doc and choose the 'New Affiliate' method (follow the link).

This method includes two required parameters:

  • email - Affiliate's email.

  • password - Affiliate's password.

Example on how to add new Affiliate via API:

1) First of all, make sure that headers are entered correctly:

2) Enter required and all needed parameters in body section:

If all the data entered correctly, a new Affiliate would be created successfully:

[POST] Add partner's postback

To add the Affiliate's postback via API, you need to navigate to the 'Affiliate managing' section in API Doc and choose the 'Add partner postback' method (follow the link).

This method includes two required parameters:

  • url- Affiliate's postback.

  • pid- Affiliate ID.

Example on how to add Affiliate's postback via API:

1) First of all, make sure that headers are entered correctly:

2) Enter required and all needed parameters in the body section. If all the data entered correctly, the Affiliate's postback would be created successfully:

If you are able not to add offer_id, then the global postback will be set at the Affiliate level. If you specify offer_id, then the personal postback will be set at the offer level.

[POST] Disable Affiliate

To disable Affiliate from offer via API, you need to navigate to the 'Affiliate managing' section in API Doc and choose the 'Disable affiliate' method (follow the link).

This method includes two required parameters:

  • offer_id- Offer ID.

  • pid- Affiliate ID.

Example on how to disable Affiliate from offer via API:

1) First of all, make sure that headers are entered correctly:

2) Enter required and all needed parameters in the body section. If all the data entered correctly, the Affiliate would be disabled from the offer:

[POST] Add Pixel

To add the Affiliate's pixel via API, you need to navigate to the 'Other managing' section in API Doc and choose the 'Pixel Add' method (follow the link).

This method includes five required parameters:

  • pid - Affiliate ID.

  • offer_id - Offer ID.

  • name - pixel's name.

  • code - pixel code (<script>…code…</scipt>, <img …>, <iframe src=“…”></iframe>).

  • code_type - pixel type ( javascript, iframe, image).

Example on how to add Affiliate's pixel via API:

1) First of all, make sure that headers are entered correctly:

2) Enter required and all needed parameters in the body section. If all the data entered correctly, the Affiliate's pixel would be added successfully:

You may also find the following articles helpful:


If you have more questions on the API Integration, feel free to contact the Affise Support Team via [email protected] or your Dedicated Account Manager.

Did this answer your question?