Follow

Setting API Integration with Affiliate

Time to read: 6 min

topic.pngThe 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':

Screenshot_36.png

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

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

 import.png 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.

click__1_.pngKeep in mind that your API URL leads to API Doc. Find out more about API-keys here.

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). 

click__1_.png Find out more about Commonly Used API methods here

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. 

[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: 

Screenshot_67.png

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

Screenshot_68.png

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

Screenshot_40.png

[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: 

Screenshot_70.png

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:

Screenshot_71.png

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: 

Screenshot_75.png

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:

Screenshot_44.png

[POST] Pixel Add

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: 

Screenshot_73.png

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:

Screenshot_74.png

article.pngYou 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 support@affise.com or your Dedicated Account Manager.

Written by Anastasia Deryugina

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.