Create partner
POST
/api/v2/client/partners
const url = 'https://app.affisemmp.com/api/v2/client/partners';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"conversion_postbacks":[{"conversion_type":"y","postback_urls":["v"],"events_mapping":"example","click_filter":[{"param":"d","values":{}}],"geo_filter":{"countries":["bn"],"exclude":true},"cost":7,"send_organic":true}],"name":"b","url":"http://bailey.com/","postback_url":"http://rempel.com/sunt-nihil-accusantium-harum-mollitia","rejected_postback_url":"http://www.considine.com/provident-perspiciatis-quo-omnis-nostrum-aut-adipisci-quidem","traffic_source":"architecto","fingerprint_available":3601,"device_id_available":3600,"impression_fingerprint_available":3601,"impression_device_id_available":3600,"re_attribution":false,"external_id":35}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.affisemmp.com/api/v2/client/partners \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "conversion_postbacks": [ { "conversion_type": "y", "postback_urls": [ "v" ], "events_mapping": "example", "click_filter": [ { "param": "d", "values": {} } ], "geo_filter": { "countries": [ "bn" ], "exclude": true }, "cost": 7, "send_organic": true } ], "name": "b", "url": "http://bailey.com/", "postback_url": "http://rempel.com/sunt-nihil-accusantium-harum-mollitia", "rejected_postback_url": "http://www.considine.com/provident-perspiciatis-quo-omnis-nostrum-aut-adipisci-quidem", "traffic_source": "architecto", "fingerprint_available": 3601, "device_id_available": 3600, "impression_fingerprint_available": 3601, "impression_device_id_available": 3600, "re_attribution": false, "external_id": 35 }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
conversion_postbacks
Array<object>
object
conversion_type
required
Must not be greater than 255 characters.
string
Example
y postback_urls
Must not be greater than 4000 characters.
Array<string>
Example
[ "v"] events_mapping
string
click_filter
Array<object>
object
param
required
Must not be greater than 256 characters.
string
Example
d values
required
Must have at least 1 items.
object
Example
{} geo_filter
object
countries
The code of an existing record in the countries table. Must be 2 characters.
Array<string>
Example
[ "bn"] exclude
boolean
Example
true cost
required
Must not be greater than 99999.99.
number
Example
7 send_organic
boolean
Example
true name
required
Must not be greater than 128 characters.
string
Example
b url
Must be a valid URL.
string
Example
http://bailey.com/ postback_url
Must not be greater than 4000 characters.
string
Example
http://rempel.com/sunt-nihil-accusantium-harum-mollitia rejected_postback_url
Must not be greater than 4000 characters.
string
Example
http://www.considine.com/provident-perspiciatis-quo-omnis-nostrum-aut-adipisci-quidem traffic_source
required
The name of an existing record in the traffic_sources table.
string
Example
architecto fingerprint_available
required
Must be between 3600 and 2592000.
integer
Example
3601 device_id_available
required
Must be between 3600 and 2592000.
integer
Example
3600 impression_fingerprint_available
Must be between 3600 and 2592000.
integer
Example
3601 impression_device_id_available
Must be between 3600 and 2592000.
integer
Example
3600 re_attribution
required
boolean
Example
false external_id
Must be at least 1.
integer
Example
35Responses
Section titled “ Responses ” Media type application/json
object
data
object
id
integer
name
string
url
string
applications
Array
traffic_source
string
attribution_settings
string
postback_url
string
rejected_postback_url
string
external_id
string
affiliate_id
string
is_external
boolean
is_registered
boolean
message
string
Example
{ "data": { "id": 205, "name": "Macey Rempel PhD", "url": "http://www.ernser.org/harum-mollitia-modi-deserunt-aut-ab-provident-perspiciatis-quo.html", "applications": [], "traffic_source": null, "attribution_settings": null, "postback_url": null, "rejected_postback_url": null, "external_id": null, "affiliate_id": null, "is_external": true, "is_registered": false }, "message": "Partner has been successfully created."}