Before you begin
API for integration
Affise allows you to manage your postback links and pixel codes via API, which may save your time when setting up S2S and C2S integration.
Add a postback
Use this method to add a global or a local postback. You need to specify the offer ID to add the postback for this particular offer.
The method: POST /3.0/partner/postback.
The cURL request for adding a local postback for conversions of the Approved status:
curl --request POST \
--url https://api-rocketcompany.affise.com/3.0/partner/postback \
--header 'api-key: 4sdf87fsdfd8723lkjhrn324' \
--header 'content-type: application/x-www-form-urlencoded' \
--cookie PHPSESSID=lqci0k9p1d4ft892gclhj9nokl \
--data offer_id=319671 \
--data url=https://postback.affiliate.new/ \
--data status=confirmed
Edit a postback
Use this method to edit a global or a local postback.
The method: POST /3.0/partner/postback/{ID}
The cURL request for editing the postback from the previous example (changing the link and the conversions status):
curl --request POST \
--url https://api-rocketcompany.affise.com/3.0/partner/postback/239 \
--header 'api-key: 4sdf87fsdfd8723lkjhrn324' \
--header 'content-type: application/x-www-form-urlencoded' \
--cookie PHPSESSID=lqci0k9p1d4ft892gclhj9nokl \
--data 'url=https://postback.affiliate.new?ua={uagent}' \
--data status=pending
Add a pixel
Use this method to add a pixel code for a particular offer. Pay attention to the code format.
The method: POST /3.0/partner/pixel.
The cURL request for adding an Iframe pixel code:
curl --request POST \
--url https://api-rocketcompany.affise.com/3.0/partner/pixel \
--header 'api-key: 4sdf87fsdfd8723lkjhrn324' \
--header 'content-type: application/x-www-form-urlencoded' \
--cookie PHPSESSID=lqci0k9p1d4ft892gclhj9nokl \
--data offer_id=313422 \
--data 'name=New pixel' \
--data 'code=<iframe src="https://www.facebook.com/tr?id=222&ev=Event&cd[Game]=PBR&noscript=1"/></iframe>
' \
--data code_type=iframe
🔎 If you face the Access denied error, check, you have access to the offer.
After you added a pixel code, your account manager should moderate it, which may take a while.
Edit a pixel
Use this method to edit a pixel code for a particular offer. Pay attention to the code format.
🔎 In the API request, you need to use the ID of the pixel code. You can find it on the offer's page:
The method: POST /3.0/partner/pixel/{ID}.
The cURL request for editing a name of a pixel code:
curl --request POST \
--url https://api-rocketcompany.affise.com/3.0/partner/pixel/34 \
--header 'api-key: 4sdf87fsdfd8723lkjhrn324' \
--header 'content-type: application/x-www-form-urlencoded' \
--cookie PHPSESSID=lqci0k9p1d4ft892gclhj9nokl \
--data 'name=Iframe pixel code' \
--data 'code=<iframe src="https://www.facebook.com/tr?id=222&ev=Event&cd[Game]=PBR&noscript=1"/></iframe>
' \
--data code_type=iframe
🔎 If you face the Access denied error, check, you have access to the offer.
Please contact the Affise Customer Support team regarding all raised questions via the e-mail: [email protected].