Follow

How to create an offer with Payments?

Time to read: 4 min

topic.pngThe article covers the following topics:

General Info

First of all, to get started with API, you need to find your API-key. To do it, just navigate to the 'Users' Tab - > 'Users management' -> 'User edit page':

Screenshot_36.png

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

Next thing you need is API URL, you can find it in the 'Settings' Tab -> 'Settings' -> 'Tracking domains' -> 'URLs' section:

Markup_2020-06-16_at_17.55.35.png

click__1_.pngFind out more about where you can find your/Affiliate's API-key and API URL 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] Add offer

To create a new offer with Payments via API, you need to navigate to the 'Offers' section in the API Doc and choose the 'Add offer' method (follow the link):

chrome-capture__15_.gif

Here you may see a lot of parameters that can be used to create a new offer.

These parameters are required:

  • title - Offer title
  • advertiser - Advertiser ID
  • url - Tracking URL

Example on how to add new offer with Payments via API:

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

offer_caps.png

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

payments.png

Where for general payment:

  • payments[0][countries][] - the offer filter for payouts. Country value in ISO format. To Get the list of countries, you may use the GET /3.1/countries method. 
  • payments[0][country_exclude][]use this field to exclude country(s). 0 - logical "no", 1- logical "yes".
  • payments[0][cities][] - the offer filter for payouts. City ID. To Get the list of cities, you may use the GET /3.1/cities method. 
  • payments[0][devices][] - the offer filter for payouts. Device value. To Get the list of devices, you may use the GET /3.1/devices method. 
  • payments[0][os][] - the offer filter for payouts. Os value. To Get the list of OSes, you may use the GET /3.1/oses method. 
  • payments[0][goal] - the value to specify varied target actions on advertiser's postback level. 
  • payments[0][total] - the payout for conversion from advertiser.
  • payments[0][revenue] - the affiliate's payout amount.
  • payments[0][currency] - set payout currency code in ECB format. To Get the list of currencies, you may use the GET /3.0/currency method. 
  • payments[0][type] - set payment type. Possible values: fixed, percent.
  • payments[0][sub1]the offer filter for payouts.

For personal payment:

  • partner_payments[1][partners][] - Affiliate ID.
  • partner_payments[0][countries][] - the offer filter for personal payouts. Country value in ISO format. To Get the list of countries, you may use the GET /3.1/countries method. 
  • payments[0][country_exclude][]use this field to exclude country(s). 0 - logical "no", 1- logical "yes".
  • partner_payments[0][cities][] - the offer filter for personal payouts. City ID. To Get the list of cities, you may use the GET /3.1/cities method. 
  • partner_payments[0][devices][] - the offer filter for personal payouts. Device value. To Get the list of devices, you may use the GET /3.1/devices method. 
  • partner_payments[0][os][] - the offer filter for personal payouts. Os value. To Get the list of OSes, you may use the GET /3.1/oses method. 
  • partner_payments[0][goal] - the value to specify varied target actions on advertiser's postback level. 
  • partner_payments[0][total] - the payout for conversion from advertiser.
  • partner_payments[0][revenue] - the affiliate's payout amount.
  • partner_payments[0][currency] - set payout currency code in ECB format. To Get the list of currencies, you may use the GET /3.0/currency method. 
  • partner_payments[0][type] - set payment type. Possible values: fixed, percent.
  • partner_payments[0][sub1]the offer filter for personal payouts.

cURL Request

The example of offer creation with Payments via cURL request:

curl --location --request POST 'https://api-rocketcompany.affise.com/3.0/admin/offer' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'api-key: bf09c801ff9b95b14ac8e17d6e4904b6' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'title=OFFER WITH Payments' \
--data-urlencode 'advertiser=5e39279bac611cda7e5765ab' \
--data-urlencode 'url=https://track.gjane.com/hc/click?afclick={clickid}&afpid={pid}&afoffer={offer_id}' \
--data-urlencode 'payments[0][countries][]=RU' \
--data-urlencode 'payments[0][countries][]=US' \
--data-urlencode 'payments[0][country_exclude]=1' \
--data-urlencode 'payments[0][devices][]=desktop' \
--data-urlencode 'payments[0][goal]=2' \
--data-urlencode 'payments[0][total]=100' \
--data-urlencode 'payments[0][revenue]=50' \
--data-urlencode 'payments[0][currency] =USD' \
--data-urlencode 'payments[0][type]=fixed' \
--data-urlencode 'payments[0][sub1]=abc' \
--data-urlencode 'partner_payments[1][partners][]=2' \
--data-urlencode 'partner_payments[1][countries][]=RU' \
--data-urlencode 'partner_payments[1][goal]=3' \
--data-urlencode 'partner_payments[1][total]=80' \
--data-urlencode 'partner_payments[1][revenue]=40' \
--data-urlencode 'partner_payments[1][currency]=USD' \
--data-urlencode 'partner_payments[1][type]=fixed'

article.pngYou may also find the following articles helpful:

 If you have more questions on how to create an offer with Payments via API, 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?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.