The article covers the following topics:

API request for affiliate creation

https://api.affise.com/docs3.1/#new-affiliate

If there are some custom sign-in fields, some of them are required - then you need to fill them in via API.

  1. Add &custom_fields= parameter

  2. Make API request to all custom fields existent in account:

https://api.affise.com/docs3.1/#custom-fields-list

❗ By using this method you will see only fields that have “View” flag ticked.

In Insomnia it looks like:

Where:

  • custom_fields - is the name of the parameter

  • [123] - is an ID of a certain custom field. IDs of custom fields are depicted in a response to API request to custom fields.

The value you need to indicate in the &custom_fields= parameter depends on the type of a certain custom field.

There are the following types:

Text: the value is specified as a regular text. Type whatever you want.

Select: the value is specified as a serial number of available options.

An example: there are two available options: “Telegram” and “Viber” and you want to select “Telegram”. Then type “1” in a value field (see the screenshot below).

As “Select” type of a field allows ticking only one option, the parameter should look like this:

Checkbox: the value is specified as a serial number of available options. As “Checkbox” type of a field allows ticking several flags, the parameter should look like this:

Radio: the value is specified as a serial number of available options.

An example: there are two available options: “Yes” and “No” and you want to specify “Yes”. Then type “1” in a value field (see the screenshot below).

As “Radio” type of a field allows ticking only one option, the parameter should look like this:

Multiline text: the value is specified as a regular text. Type whatever you want. This type of fields suppose typing text by lines.

In Insomnia it should be done like that:

In Postman it should be done like this:

Hidden text: the value is specified as a regular text. Type whatever you want. (See “Text” example).

API requests to Statistics

In response to almost all requests to Statistics you will see “raw” and “uniq” in “traffic” section:

Where:

  • Raw=clicks

  • Uniq=hosts

API request for adding or deleting a user's image

It is possible to upload an image for a user (user logo, user picture, user avatar) via API. To do it you need to use the API request for user editing:

https://api.affise.com/docs3.1/#add-user

❗ Use the parameter 'avatar'. The image should be uploaded in Base64 format. To convert your picture into this format, use third-party services, like this one (free to use).

We support only JPEG format for image addition via API. If you would like to upload the PNG image - do it via UI.

See the GIF:

Then insert the copied code to the software you use (Postman, Insomnia, etc.).

❗ Uploading the image via API doesn't allow cropping the image in the way you want, that's why we recommend using foursquare images with a size of 200x200 pixels approximately - otherwise, the image will be distorted or cropped automatically in a way you don't like.

If you want to delete the picture via API, you need to make absolutely the same request, but without the parameter's value. Don't add the code of the image, but add the parameter 'avatar' itself and then send the request.

The cURL request for logo deleting:

curl --request POST \
--url https://api-rocketcompany.affise.com/3.0/admin/user/5c9b47a5c0417bbb008b4567 \
--header 'Api-key: c057faba8779ef56bdc493c' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data avatar=

API request for creatives deleting

  1. Make a GET request to an offer and copy creative ID
    https://api.affise.com/docs3.1/#offer-by-id

2. Make a DELETE request with the creative ID in the creatives[] array in URL parameters

The example of the URL:

https://api-rocketcompany.affise.com/3.0/admin/offer/18322/remove-creative?creatives[]=8da458f3-ce4d-4a49-9f96-e0203852df35&api-key=5a1bfd40a4209ef172cee375

You need just the URL of the example shown above. No parameters, no headers are needed.

API request to update User’s Permissions

https://api.affise.com/docs3.1/#update-user-permissions

To edit permissions for a particular user you firstly need to get the full list of his current permissions.

Use this method to do it:

https://api.affise.com/docs3.1/#read-user

Then copy of the part of the response to this method:

It should start with

{

"permissions": {

And should end with 4 curly brackets:

}
}
}
}

After that you need to create a new request in Insomnia/Postman with the following attributes:

  • POST method

  • JSON format of the body (not Form URL encoded)

  • Content type: application/json

  • Api-key: API key of General manager

Then you need to insert the whole copied block to a body of this request.

❗ If you leave “exceptions” arrays as they are, nothing will change. But if you change the value in the “level” parameter and leave the “exceptions” as they are, relevant permissions will be changed. An example: you had “write” value in the “level” parameter, but changed that to “deny” parameter and left the “exceptions” array as it is (you didn’t delete it). Then the relevant permission will be changed to “deny”.

There is an example of a request in JSON format where some lists of exceptions were added (for “Access to affiliates editing” and “Access to advertisers editing”

permissions):

{

"permissions": {

"general": {

"marketplace": {

"level": "read"

},

"settings": {

"level": "write"

}

},

"notificator": {

"client-subscription": {

"level": "deny"

},

"transport-configuration": {

"level": "deny"

},

"user-subscription": {

"level": "deny"

}

},

"stats": {

"affiliate-postback": {

"level": "read"

},

"clicks-list": {

"level": "read"

},

"comparison-report": {

"level": "read"

},

"conversions-export": {

"level": "read"

},

"conversions-import": {

"level": "write"

},

"conversions-list": {

"level": "read"

},

"entity-account-manager": {

"level": "read",

"default_level": "read"

},

"entity-affiliate-manager": {

"level": "deny"

},

"referral": {

"level": "deny"

},

"server-postback": {

"level": "read"

},

"slice-account_manager_id": {

"level": "deny"

},

"slice-advertiser_id": {

"level": "deny"

},

"slice-affiliate_id": {

"level": "read"

},

"slice-affiliate_manager_id": {

"level": "deny"

},

"slice-browser": {

"level": "deny"

},

"slice-city": {

"level": "read"

},

"slice-connection-type": {

"level": "deny"

},

"slice-country": {

"level": "read"

},

"slice-day": {

"level": "read"

},

"slice-device": {

"level": "read"

},

"slice-goal": {

"level": "read"

},

"slice-landing": {

"level": "deny"

},

"slice-mobile-carrier": {

"level": "deny"

},

"slice-offer_id": {

"level": "read"

},

"slice-os": {

"level": "read"

},

"slice-prelanding": {

"level": "deny"

},

"slice-smart_id": {

"level": "deny"

},

"slice-sub1": {

"level": "deny"

},

"slice-sub2": {

"level": "deny"

},

"slice-trafficback_reason": {

"level": "read"

},

"stats-export": {

"level": "read"

},

"view-custom": {

"level": "read"

},

"view-kpi": {

"level": "deny"

},

"view-retention-rate": {

"level": "deny"

}

},

"users": {

"entity-account-manager": {

"level": "deny"

},

"entity-advertiser": {

"level": "write",

"exceptions": {

"strings": {

"deny": [

"5c24b10a43cf7655008b4567",

"5da43e1d10768e44b351c2c5",

"5e2d96491d4b0b0738afb1b2",

"5e3aecd91d4b0b0738afb3d7",

"5cfa86cf43cf7676008b4604",

"5e58e3c6ac611cda7e576a89"

],

"read": [

"5e7dba10c3d9b3f9f5dd31ff"

]

}

}

},

"entity-affiliate": {

"level": "write",

"exceptions": {

"ints": {

"deny": [

2

],

"read": [

5

]

}

}

},

"entity-affiliate-manager": {

"level": "deny"

},

"entity-common-manager": {

"level": "deny"

},

"entity-preset": {

"level": "deny"

},

"view-users": {

"level": "deny"

}

}

}

}

You need to specify ID’s of certain affiliates/advertisers you want to add to a list of exceptions like it was done in the example above.

See the GIF:

All API requests where you need to specify Currency ID

There are two API requests where you could use currency ID:

https://api.affise.com/docs3.1/#conversions

https://api.affise.com/docs3.1/#by-referral-payments

How to find a currency ID:

  1. Go Daily Statistics page

  2. Choose the needed currency you want to get conversions by:

3. Press the “Apply” button

4. You will see currency ID in a browser’s address bar:

API request for integration with in-house panels

If you have your own Admin panel or a panel for your affiliates and you would like to have there all the information you have in Affise, there is a relevant API method:

https://api.affise.com/docs3.1/#public-auth

You need to integrate this method into your custom Admin/Partner panel, so when you or your affiliate inserts the login and the password, the system authorizes you there. As a result you'll see all the information you have in Affise there.

In fact the method runs in the background when the login/password is inserted.

The following articles can be helpful:


If you have any questions left on API, feel free to address them to Affise Technical Support Team via [email protected] or your internal live-chat as long as to contact your Dedicated Account Manager.

Did this answer your question?