doc.2performant.com Open in urlscan Pro
2606:4700:20::681a:5c4  Public Scan

URL: https://doc.2performant.com/
Submission: On July 31 via api from US — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

   
 * [Public] Users
 * 01. POST User Sign In
 * [Advertiser] Programs
 * 01. GET Advertiser Programs
 * 02. GET Advertiser Program by id
 * [Advertiser] Commissions
 * 01. GET Commissions
 * 01. GET Commissions
 * 02. GET Affiliate Commission by id
 * 03. POST Commission
 * 03. POST Commission
 * 03. POST Commission
 * 04. PUT Commission (change com_value)
 * 04. PUT Commission
 * 04. PUT Commission
 * 04. PUT Commission
 * 05. PUT Accept Commission
 * 05. PUT Accept Commission
 * 06. PUT Reject Commission
 * 06. PUT Reject Commission
 * 06. PUT Reject Commission
 * 06. PUT Reject Commission
 * 07. PUT Update Sale Commission (change sale_value)
 * [Affiliate] Programs
 * 01. GET Affiliate Programs
 * 02. GET Affiliate Program by id
 * 03. GET My Affiliate Request
 * [Affiliate] Commissions
 * 01. GET Commissions
 * 01. GET Commissions
 * 01. GET Commissions
 * [Affiliate] Banners
 * 01. GET Banners
 * [Affiliate] Advertiser Promotions
 * 01. GET Advertiser Promotions Export
 * 02. GET Advertiser Promotions
 * [Affiliate] Google Ads Linker Tracking Settings
 * 01. POST Tracking Settings
 * 01. POST Tracking Settings
 * 01. POST Tracking Settings


2PERFORMANT API DOCUMENTATION





[PUBLIC] USERS




SAMPLE USAGE OF THE 2PERFORMANT API USING CURL

Mandatory header for any request in 2Performant API is Content-Type:
application/json.

Currently we are supporting only JSON format.

In order to make any request to 2Performant API, you first need to login into
platform.

curl -H "Content-Type: application/json" -X POST -d '{"user":{"email":"mail@example.com","password":"secret"}}' -i https://api.2performant.com/users/sign_in.json 

In response you will receive several headers that defines your session. These
are: access-token | client | expiry | token-type | uid

access-token: 6OWAj4libu5uHdLdohbgSA - this header identifies the request itself

client: JymM8cJ3YJUtjpp1nSlNNw - this header identifies the client who is making
requests

uid: email@example.com - unique identifier of the user

expiry: 1469168844 - token expiration timestamp

token-type: Bearer - token type RFC-6750

After accessing a resource in 2Performat API, in headers, you will receive a new
access-token. You should inject the value of that access-token in the header of
the next request and so on.

Example:

Request for login:

curl -H "Content-Type: application/json" -X POST -d '{"user":{"email":"mail@example.com","password":"secret"}}' -i https://api.2performant.com/users/sign_in.json 

Response Headers:

 
HTTP/1.1 200 OK 
access-token: Oz2f08p3PKMyRvtj5YVz4g 
Cache-Control: max-age=0, private, must-revalidate 
client: T7DYzC9m7FKEb 
Content-Type: application/json; charset=utf-8 
Date: Fri, 08 Jul 2016 06:38:43 GMT 
ETag: W/"719180083732e7eba29786879299b0a2" 
expiry: 1469169522 
Server: nginx/1.4.6 (Ubuntu) 
Set-Cookie: email=mail%40example.com; path=/ 
token-type: Bearer 
uid: mail@example.com 
Vary: Origin 
X-Content-Type-Options: nosniff 
X-Frame-Options: SAMEORIGIN 
X-Request-Id: 06ca352a-8fd4-42fa-9c58-1b7717d7891e 
X-Runtime: 0.127986 
X-XSS-Protection: 1; mode=block 
Content-Length: 505 
Connection: keep-alive 

In the next request client should inject mandatory access-token | client | uid
headers:

curl -H "Content-Type: application/json" -H "access-token: l2iMaok8nKmSjN19Z10OQQ" -H "client: T7DYzC9m7FKEb" -H "uid: mail@example.com" -i https://api.2performant.com/affiliate/commissions.json 

Response Headers:

 
HTTP/1.1 200 OK 
access-token: l2iMaok8nKmSjN19Z10OQQ 
Cache-Control: max-age=0, private, must-revalidate 
client: T7DYzC9m7FKEb 
Content-Type: application/json; charset=utf-8 
Date: Fri, 08 Jul 2016 06:54:30 GMT 
ETag: W/"ec773f7165c4eacce4c78ccc8d611622" 
expiry: 1469004547 
Server: nginx/1.4.6 (Ubuntu) 
Set-Cookie: _projectrev_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkQY7AFQ%3D--5680f35c747; path=/; HttpOnly 
token-type: Bearer 
uid: mail@example.com 
Vary: Origin 
X-Content-Type-Options: nosniff 
X-Frame-Options: SAMEORIGIN 
X-Request-Id: f8e7b18d-4d86-51fc-b837-d261ac5427f2 
X-Runtime: 0.102666 
X-XSS-Protection: 1; mode=block 
Content-Length: 74 
Connection: keep-alive 




[PUBLIC] USERS - 01. POST USER SIGN IN





Action for sign in to the API

Throttled endpoints

This is part of the throttled endpoints.

You can make a maximum of 100 requests to these endpoints per minute. The
endpoints will have a common request count.

When you reach the threshold, a 5 minute penalty will be applied. The server
will return 429(Too many requests) status during this time.



https://api.2performant.com/users/sign_in

Berechtigung: public  


HEADER

Feld Typ Beschreibung user-key String

User's sign-in identifier available in your 2Performant account, in the settings
area.
For affiliates: https://network.2performant.com/affiliate/settings
For advertisers: https://network.2performant.com/advertiser/settings/general

 * Header-Example:

{
  "user-key": "87ce6e61fc73f38911b571ae37c95ccdb0ccbddce6d2113ad7bea14e8c07"
}


PARAMETER

Feld Typ Beschreibung user object

User object

  email string

User email

  password string

User password

 * Request-Example:

{
  "user": {
    "email": "email@example.com",
    "password": "userSecretPasword"
  }
}


SUCCESS 200

Feld Typ Beschreibung user object

User object

  id integer

User unique id

  email string

User email

  login string

User login

  name string

User name

  role string

User role, one of ['affiliate', 'advertiser']

  unique_code string

User unique code

  created_at datetime

Date and time of the creation of this user

  avatar_url string

User avatar path

  newsletter_subscription boolean

True if user is subscribed to 2Performant newsletter

  user_info string

User Info object

    address string

User address

    city string

User city

    country string

User country

    display_name string

User displayed name

    firstname string

User first name

    lastname string

User last name

    organization string

User organization

    phone string

User phone number

    state string

User state of living

    typeofbusiness string

User type of business

 * Success-Response:

HTTP/1.1 200 OK
{
  "user": {
    "email": "1337@example.com",
    "id": 1337,
    "login": "login_name",
    "name": "Username",
    "role": "affiliate",
    "unique_code": "48535e84b2",
    "created_at": "2015-06-12T21:19:33Z",
    "avatar_url": "https://img.2performant.com/system/paperclip/user/avatar/000/000/1337/1337/image.jpg",
    "newsletter_subscription": true,
    "user_info": {
      "address": "Abbey Road 5",
      "city": "London",
      "country": "United Kingdom",
      "display_name": "regular",
      "firstname": "Kaci",
      "lastname": "Ernser",
      "organization": "Hirthe-Ritchi",
      "phone": "(186)285-7925",
      "state": "",
      "typeofbusiness": "firefighter"
    }
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


429

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error

 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Invalid login credentials. Please try again."
  ]
}

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 429 Too Many Requests
{
  "errors": [
    "Too many requests"
  ]
}


[ADVERTISER] PROGRAMS



Routes that handles requests related to Program resource for users with
advertiser role.

Currently supporting actions:

index - Listing programs in 2Performant platform

show - Show specific program identified by id or slug.




[ADVERTISER] PROGRAMS - 01. GET ADVERTISER PROGRAMS





Action for accessing programs in 2Performant



https://api.2performant.com/advertiser/programs

Berechtigung: advertiser  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung page optional integer

Page number

Standardwert: 1

perpage optional integer

Resources per page

Standardwert: 20

filter optional object

Filter object that contains optional fields for filtering resource results

  query optional string

Filter by on of fields [name, description, tos] can be full text searched using
syntax

  category optional string

Filter by Category name

  country optional string

Filter by Country name

sort optional object

Sort object that contains any optional fields for sorting

  approved_commission_count optional string

Sort results asc or desc by price

  click_count optional string

Sort results asc or desc by actions

  epc optional string

Sort results asc or desc by clicks


SUCCESS 200

Feld Typ Beschreibung programs array

List of programs

  id integer

Program unique id

  slug string

Program slug

  name string

Program name

  base_url string

URL without protocol

  main_url string

URL to program website

  description string

Program Description

  activated_at datetime

Date then the program status became active

  user_id integer

User unique id of the advertiser who owns the program

  unique_code string

Program unique code

  status string

Program status

  cookie_life integer

Time covered from click to actions converted into commissions (in days)

  tos object

Program Terms of Service

  redirect_args string

Included parameters in to redirect link

  product_feeds_count integer

Number of feeds in this program

  products_count integer

Number of products in all program feeds

  banners_count integer

Number of available banners in program

  approval_time integer

Time in which not processed commissions will be automatically approved (in days)

  currency string

The currency of the conversions made by this program

  working_currency_code string

The currency in which this program is paying generated commissions

  auto_approve_affiliates boolean

If true everyone applying to your program will be immediately approved

  enable_leads boolean

True if your program supports leads conversion

  enable_sales boolean

True if your program supports sales conversion

  default_lead_commission_amount decimal

Program default lead commission amount

  default_lead_commission_type string

The program's default lead commission type. Possible values: "fixed", "variable"

  default_sale_commission_rate decimal

Program default sale commission rate

  default_sale_commission_type string

The program's default sale commission type. Possible values: "fixed", "percent",
"variable"

  approved_commission_count_rate integer

The percentage of approved commissions from the total number of generated
commissions

  approved_commission_amount_rate decimal

The percentage of the amount of the approved commissions from the total amount
of generated commissions

  payment_type string

Advertiser Payment type - could be prepaid, postpaid

  balance_indicator string

Multi-state indicator that shows program health. could be [black, red, orange,
yellow, green]

  downtime integer

Percentage of time in a time interval in which the program has been suspended
due to lack of funds

  average_payment_time integer

Average time in which a commission is payed

  logo_id integer

Logo unique id

  logo_path string

URL to the program logo

  user_login string

Advertiser user login

  category object

Category object

    name string

Program category name

    id integer

Category unique id

    programs_count integer

Number of programs in this category

    average_approval_rate_amount integer

Average of approval_rate_amount for all programs in the category

    average_approval_rate_count integer

Average of approval_rate_count for all programs in the category

    oldest_pending_commission integer

How many days ago was registered a commission that sill have status pending

  selling_countries array

List of countries

    id integer

Id of the country

    code string

Code of the country

    name string

Name of the country

    currency string

Currency of the country

  advertisers_traffic_sources array

List of traffic sources

    traffic_source_id integer

Id of the traffic source

    usage string

Traffic source usage. Can be ["yes", "maybe", "no"]

    status string

Traffic source status

    end_at datetime

The date the traffic source was deactivated

    name string

Traffic source name

  ignore_ips array

List of IPs from witch the redirect is ignored

    ip string

Ignored IP

metadata object

Object containing useful information about presented resources

  pagination object

Pagination object

    results integer

Total number of available resources

    pages integer

Total number of available pages

    current_page integer

Index of the current page

  search object

Search result Object

    status array

List of searched statuses grouped by status name

      value integer

Status name

      count integer

How many programs are in result with status equal to value

    category_name array

List of categories grouped by name

      value integer

Category name

      count integer

Number of programs in this category

    country_name array

List of countries grouped by name

      value integer

Country name

      count integer

Number of programs working with this country

  available object

Available programs object

    status array

List of available statuses grouped by status name

      value integer

Status name

      count integer

How many programs are available with status equal to value

    category_name array

List of categories grouped by name

      value integer

Category name

      count integer

Number of available programs in this category

    country_name array

List of countries grouped by name

      value integer

Country name

      count integer

Number of programs working with this country

 * Success-Response:

HTTP/1.1 200 OK
{
  "programs": [
    {
      "id": 1337,
      "slug": "advertiser-com",
      "name": "advertiser.com",
      "base_url": "advertiser.com",
      "main_url": "https://www.advertiser.com",
      "description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
      "activated_at": "2015-12-17T12:34:56Z",
      "user_id": 1337,
      "unique_code": "86c26b1f7",
      "status": "active",
      "cookie_life": 30,
      "tos": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
      "redirect_args": "?utm_campaign=2Performant&utm_source=%%affiliate_name%%&utm_medium=CPS",
      "product_feeds_count": 1,
      "products_count": 2547,
      "banners_count": 74,
      "approval_time": 30,
      "currency": "BGN",
      "auto_approve_affiliates": false,
      "enable_leads": false,
      "enable_sales": true,
      "default_lead_commission_amount": null,
      "default_lead_commission_type": null,
      "default_sale_commission_rate": "10.0",
      "default_sale_commission_type": "percent",
      "approved_commission_count_rate": "80.1",
      "approved_commission_amount_rate": "90.2",
      "payment_type": "prepaid",
      "balance_indicator": "green",
      "downtime": "0.0",
      "average_payment_time": 31,
      "logo_id": 1337,
      "logo_path": "https//img.2performant.com/system/paperclip/program_logos/pics/1337/medium/1337.jpg",
      "selling_countries": [
          "name": "Romania",
          "code": "RO",
          "currency": "RON",
          "id": 5
      ],
      "user_login": "advertiserlogin",
      "category": {
        "name": "Fashion",
        "id": 5,
        "programs_count": 25,
        "average_approval_rate_amount": "35.0",
        "average_approval_rate_count": 36,
        "oldest_pending_commission": 0
      },
        "advertiser_traffic_sources": [
            {
                "traffic_source_id": 28,
                "usage": "yes",
                "status": "active",
                "end_at": null,
                "name": "Google Ads - search"
            },
            {
                "traffic_source_id": 29,
                "usage": "no",
                "status": "deleted",
                "end_at": "2023-11-22T12:08:23Z",
                "name": "Google Ads - display"
            },
            {
                "traffic_source_id": 36,
                "usage": "yes",
                "status": "active",
                "end_at": null,
                "name": "Facebook profiles"
            },
            {
                "traffic_source_id": 43,
                "usage": "yes",
                "status": "active",
                "end_at": null,
                "name": "Cashbacks"
            }
        ],
        "most_used_traffic_sources": {
            "Google Ads - search": "yes",
            "Google Shopping Ads (CSS)": "not_defined",
            "Cashbacks": "yes",
            "Coupons/Vouchers": "not_defined"
        },
      "ignore_ips": [
        {
          "id": 90,
          "ip": "192.0.2.0",
          "program_id": 1337,
          "index": 0
        }
      ]
    }
  ],
  "metadata": {
    "facets": {
      "search": {
        "status": [
          {
            "value": "active",
            "count": 35
          }
        ],
        "category_name": [
          {
            "value": "Fashion",
            "count": 35
          }
        ],
        "country_name": [
          {
            "value": "Bulgaria",
            "count": 35
          }
        ],
        "payment_type": [
          {
            "value": "prepaid",
            "count": 35
          }
        ]
      },
      "available": {
        "status": [
          {
            "value": "active",
            "count": 35
          }
        ],
        "category_name": [
          {
            "value": "Fashion",
            "count": 35
          }
        ],
        "country_name": [
          {
            "value": "Bulgaria",
            "count": 35
          }
        ],
        "payment_type": [
          {
            "value": "prepaid",
            "count": 35
          }
        ]
      }
    },
    "pagination": {
      "results": 35,
      "pages": 2,
      "current_page": 1
    }
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error

 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}


[ADVERTISER] PROGRAMS - 02. GET ADVERTISER PROGRAM BY ID





Action for accessing a program in 2Performant by :id of :slug



https://api.2performant.com/advertiser/programs/:id

Berechtigung: advertiser  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung id string

Program unique :id or :slug.
Use default keyword instead of :id parameter to access advertiser program
resource: https://api.2performant.com/advertiser/programs/default


SUCCESS 200

Feld Typ Beschreibung program object

Program object

  id integer

Program unique id

  slug string

Program slug

  name string

Program name

  base_url string

URL without protocol

  main_url string

URL to program website

  description string

Program Description

  activated_at datetime

Date then the program status became active

  user_id integer

User unique id of the advertiser who owns the program

  unique_code string

Program unique code

  status string

Program status

  cookie_life integer

Time covered from click to actions converted into commissions (in days)

  tos object

Program Terms of Service

  redirect_args string

Included parameters in to redirect link

  product_feeds_count integer

Number of feeds in this program

  products_count integer

Number of products in all program feeds

  banners_count integer

Number of available banners in program

  approval_time integer

Time in which not processed commissions will be automatically approved (in days)

  currency string

The currency of the conversions made by this program

  working_currency_code string

The currency in which this program is paying generated commissions

  auto_approve_affiliates boolean

If true everyone applying to your program will be immediately approved

  enable_leads boolean

True if your program supports leads conversion

  enable_sales boolean

True if your program supports sales conversion

  default_lead_commission_amount decimal

Program default lead commission amount

  default_lead_commission_type string

The program's default lead commission type. Possible values: "fixed", "variable"

  default_sale_commission_rate decimal

Program default sale commission rate

  default_sale_commission_type string

The program's default sale commission type. Possible values: "fixed", "percent",
"variable"

  approved_commission_count_rate integer

The percentage of approved commissions from the total number of generated
commissions

  approved_commission_amount_rate decimal

The percentage of the amount of the approved commissions from the total amount
of generated commissions

  payment_type string

Advertiser Payment type - could be prepaid, postpaid

  balance_indicator string

Multi-state indicator that shows program health. could be [black, red, orange,
yellow, green]

  downtime integer

Percentage of time in a time interval in which the program has been suspended
due to lack of funds

  average_payment_time integer

Average time in which a commission is payed

  logo_id integer

Logo unique id

  logo_path string

URL to the program logo

  user_login string

Advertiser user login

  category object

Category object

    name string

Program category name

    id integer

Category unique id

    programs_count integer

Number of programs in this category

    average_approval_rate_amount integer

Average of approval_rate_amount for all programs in the category

    average_approval_rate_count integer

Average of approval_rate_count for all programs in the category

    oldest_pending_commission integer

How many days ago was registered a commission that sill have status pending

  selling_countries array

List of countries

    id integer

Id of the country

    code string

Code of the country

    name string

Name of the country

    currency string

Currency of the country

  advertisers_traffic_sources array

List of traffic sources

    traffic_source_id integer

Id of the traffic source

    usage string

Traffic source usage. Can be ["yes", "maybe", "no"]

    status string

Traffic source status

    end_at datetime

The date the traffic source was deactivated

    name string

Traffic source name

  ignore_ips array

List of IPs from witch the redirect is ignored

    ip string

Ignored IP

  moderations object

A list of moderations objects that represents fields that was modified on the
program object and when new rules will be applied

 * Success-Response:

HTTP/1.1 200 OK
{
  "program": {
    "id": 1337,
    "slug": "advertiser-com",
    "name": "advertiser.com",
    "base_url": "advertiser.com",
    "main_url": "https://www.advertiser.com",
    "description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
    "activated_at": "2015-12-17T12:34:56Z",
    "user_id": 1337,
    "unique_code": "86c26b1f7",
    "status": "active",
    "cookie_life": 30,
    "tos": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
    "redirect_args": "?utm_campaign=2Performant&utm_source=%%affiliate_name%%&utm_medium=CPS",
    "product_feeds_count": 1,
    "products_count": 2547,
    "banners_count": 74,
    "approval_time": 30,
    "currency": "BGN",
    "auto_approve_affiliates": false,
    "enable_leads": false,
    "enable_sales": true,
    "default_lead_commission_amount": null,
    "default_lead_commission_type": null,
    "default_sale_commission_rate": "10.0",
    "default_sale_commission_type": "percent",
    "approved_commission_count_rate": "80.1",
    "approved_commission_amount_rate": "90.2",
    "payment_type": "prepaid",
    "balance_indicator": "green",
    "downtime": "0.0",
    "average_payment_time": 31,
    "logo_id": 1337,
    "logo_path": "https//img.2performant.com/system/paperclip/program_logos/pics/1337/medium/1337.jpg",
    "tos_signed": true,
    "category": {
      "name": "Fashion",
      "id": 5,
      "programs_count": 25,
      "average_approval_rate_amount": "35.0",
      "average_approval_rate_count": 36,
      "oldest_pending_commission": 0
    },
    "advertiser_traffic_sources": [
        {
            "traffic_source_id": 28,
            "usage": "yes",
            "status": "active",
            "end_at": null,
            "name": "Google Ads - search"
        },
        {
            "traffic_source_id": 29,
            "usage": "no",
            "status": "deleted",
            "end_at": "2023-11-22T12:08:23Z",
            "name": "Google Ads - display"
        },
        {
            "traffic_source_id": 36,
            "usage": "yes",
            "status": "active",
            "end_at": null,
            "name": "Facebook profiles"
        },
        {
            "traffic_source_id": 43,
            "usage": "yes",
            "status": "active",
            "end_at": null,
            "name": "Cashbacks"
        }
     ],
    "ignore_ips": [
      {
        "id": 90,
        "ip": "192.0.2.0",
        "program_id": 1337,
        "index": 0
      }
    ],
    "moderations": {
      "cookie_life": {
        "new_value": 60,
        "pending_moderation": true,
        "notice_period": true,
        "enforce_date": "2015-10-21T15:17:21+03:00",
        "attr_to_modify": "cookie_life"
      }
    },
    "selling_countries": [
      {
        "id": 523,
        "name": "Bulgaria",
        "code": "BG",
        "currency": "BGN"
      }
    ]
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error

 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}


[ADVERTISER] COMMISSIONS



Routes that handles requests related to Commission resource for users with
advertiser role.

Currently supporting actions:

index - Listing program commissions of the advertiser registered in 2Performant
platform

show - Show specific commission identified by id

create - Create manual commission

update - Update existing commission

reject - Reject existing commission

accept - Accept existing commission

update_sale - Update sale commission




[ADVERTISER] COMMISSIONS - 01. GET COMMISSIONS





Action for accessing advertiser commissions from 2Performant



https://api.2performant.com/advertiser/programs/default/commissions

Berechtigung: advertiser  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung page optional integer

Page number

Standardwert: 1

perpage optional integer

Resources per page

Standardwert: 20

filter optional object

Filter object that contains any optional fields for filtering

  query optional string

Filter by on of fields [affiliate_name, affiliate_login, affiliate_site_urls,
id, description, transaction_id, amount, transaction_amount] can be full text
searched using syntax

  status optional string

Filter by status from list [pending, accepted, rejected]

  date optional string

Filter by Date, Month in format YYYYMM

  start_date optional string

Filter by Date, select commissions created since the start_date (start_date
included)

  end_date optional string

Filter by Date, select commissions created until the end_date (end_date
included)

  transaction_id optional string

Filter by Transaction unique id

sort optional object

Sort object that contains any optional fields for sorting

  transaction_id optional string

Sort results asc or desc by transaction_id

  date optional string

Sort results asc or desc by date

  commission optional string

Sort results asc or desc by commission

  sale optional string

Sort results asc or desc by sale

  username optional string

Sort results asc or desc by username

  updated optional string

Sort results asc or desc by the timestamp of the commission's last modification


SUCCESS 200

Feld Typ Beschreibung commissions array

Currency of the country

  id integer

Commission id

  actionid integer

Commission action id

  user_id integer

Commission user id

  amount decimal

Commission amount

  initial_amount decimal

Commission initial amount

  status string

Commission status from list [pending, accepted, rejected, paid]

  affrequest_id integer

Commission user id

  description string

Description

  created_at date

Date then the commission was created

  updated_at date

Last date then the commission was updated

  reason array

List of strings that contains possible rejection reasons

  stats_tags array

Commission statistical tags

  history array

Modification histories of the commission

  currency string

Commission currency code

  working_currency_code string

Working currency code of the program at creation of this commission

  program_id integer

Commission program id

  amount_in_working_currency decimal

Commission amount in working currency code of the program

  user object

Affiliate user Object

    id integer

Affiliate user id

    name string

Affiliate user name

    role string

Affiliate user role

    unique_code string

Affiliate user unique code

    login string

Affiliate user login

    avatar_url string

Affiliate user avatar path

  public_action_data object

Action object

    created_at date

Date then the action was created

    updated_at date

Last date then the action was updated

    rate float

Action rate

    amount decimal

Action amount

    ad_type string

Action ad type

    ad_id integer

Action ad id

    source_ip string

Action source IP

    description string

Action description

    working_currency_code string

Working currency code of the program at creation of this commission

    amount_in_working_currency decimal

Commission amount in working currency code of the program

  public_click_data object

Click object

    created_at date

Date then the click was created

    source_ip string

Click source IP

    url string

Source URL of the click

    redirect_to string

Destination URL of the click

    device_type string

Device type deducted from client user agent. Possible values ['Desktop',
'Mobile']

metadata object

Object containing useful information about presented resources

  pagination object

Pagination object

    results integer

Total number of available resources

    pages integer

Total number of available pages

    current_page integer

Index of the current page

  search object

Search result Object

    status array

List of searched statuses grouped by status value

      value string

One of permitted status values

      count integer

How many commissions are in result with status equal to value

    registration_month array

List of groups by month

      value integer

Month in format YYYYMM

      count integer

Number of commissions

  available object

Available commissions Object

    status array

List of available statuses grouped by status value

      value string

One of permitted status value

      count integer

How many commissions are available with status equal to value

    registration_month array

List of groups by month

      value string

Month in format YYYYMM

      count integer

Number of commissions

 * Success-Response:

HTTP/1.1 202 OK
{
  "commissions": [
    {
      "id": 1337,
      "actionid": 12,
      "user_id": 3,
      "amount": "4.96",
      "initial_amount": "3.1",
      "status": "rejected",
      "affrequest_id": 45,
      "description": "Test Product",
      "created_at": "2016-04-13T07:38:42Z",
      "updated_at": "2016-04-13T07:53:59Z",
      "reason": [
        "Test commission"
      ],
      "transaction_id": "1002",
      "stats_tags": null,
      "history": null,
      "currency": "EUR",
      "working_currency_code": "EUR",
      "program_id": 3,
      "amount_in_working_currency": "4.96",
      "actiontype": "sale",
      "user": {
        "id": 3,
        "name": "affiliate.test",
        "role": "affiliate",
        "unique_code": "924e2778a",
        "login": "affiliate.test",
        "avatar_url": "//api.2performant.com/images/avatar-default.jpg"
      },
      "public_action_data": {
        "created_at": "2016-04-13T07:38:42Z",
        "updated_at": "2016-04-13T07:38:42Z",
        "rate": "5.0",
        "amount": "62.0",
        "ad_type": "quicklink",
        "ad_id": 303,
        "source_ip": "192.0.2.0",
        "description": "example description",
        "working_currency_code": "EUR",
        "amount_in_working_currency": "62.0"
      },
      "public_click_data": {
        "created_at": "2016-04-13T07:38:42Z",
        "source_ip": "192.0.2.0",
        "url": "affiliate-site.com",
        "redirect_to": "advertiser-site.com"
      }
    }
  ],
  "metadata": {
    "pagination": {
      "results": 1,
      "pages": 1,
      "current_page": 1
    },
    "facets": {
      "search": {
        "status": [
          {
            "value": "rejected",
            "count": 1
          }
        ],
        "registration_month": [
          {
            "value": "201604",
            "count": 1
          }
        ]
      },
      "available": {
        "status": [
          {
            "value": "rejected",
            "count": 1
          }
        ],
        "registration_month": [
          {
            "value": "201604",
            "count": 1
          }
        ]
      }
    }
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error

 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}


[ADVERTISER] COMMISSIONS - 01. GET COMMISSIONS





Action for accessing advertiser commissions from 2Performant



https://api.2performant.com/advertiser/programs/default/commissions

Berechtigung: advertiser  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung page optional integer

Page number

Standardwert: 1

perpage optional integer

Resources per page

Standardwert: 20

filter optional object

Filter object that contains any optional fields for filtering

  query optional string

Filter by on of fields [affiliate_name, affiliate_login, affiliate_site_urls,
id, description, transaction_id, amount, transaction_amount] can be full text
searched using syntax

  status optional string

Filter by status from list [pending, accepted, rejected]

  date optional string

Filter by Date, Month in format YYYYMM

  start_date optional string

Filter by Date, select commissions created since the start_date (start_date
included)

  end_date optional string

Filter by Date, select commissions created until the end_date (end_date
included)

  transaction_id optional string

Filter by Transaction unique id

sort optional object

Sort object that contains any optional fields for sorting

  transaction_id optional string

Sort results asc or desc by transaction_id

  date optional string

Sort results asc or desc by date

  commission optional string

Sort results asc or desc by commission

  sale optional string

Sort results asc or desc by sale

  username optional string

Sort results asc or desc by username

  updated optional string

Sort results asc or desc by the timestamp of the commission's last modification


SUCCESS 200

Feld Typ Beschreibung commissions array

Currency of the country

  id integer

Commission id

  actionid integer

Commission action id

  user_id integer

Commission user id

  amount decimal

Commission amount

  initial_amount decimal

Commission initial amount

  status string

Commission status from list [pending, accepted, rejected, paid]

  affrequest_id integer

Commission user id

  description string

Description

  created_at date

Date then the commission was created

  updated_at date

Last date then the commission was updated

  reason array

List of strings that contains possible rejection reasons

  stats_tags array

Commission statistical tags

  history array

Modification histories of the commission

  currency string

Commission currency code

  working_currency_code string

Working currency code of the program at creation of this commission

  program_id integer

Commission program id

  amount_in_working_currency decimal

Commission amount in working currency code of the program

  user object

Affiliate user Object

    id integer

Affiliate user id

    name string

Affiliate user name

    role string

Affiliate user role

    unique_code string

Affiliate user unique code

    login string

Affiliate user login

    avatar_url string

Affiliate user avatar path

  public_action_data object

Action object

    created_at date

Date then the action was created

    updated_at date

Last date then the action was updated

    rate float

Action rate

    amount decimal

Action amount

    ad_type string

Action ad type

    ad_id integer

Action ad id

    source_ip string

Action source IP

    description string

Action description

    working_currency_code string

Working currency code of the program at creation of this commission

    amount_in_working_currency decimal

Commission amount in working currency code of the program

  public_click_data object

Click object

    created_at date

Date then the click was created

    source_ip string

Click source IP

    url string

Source URL of the click

    redirect_to string

Destination URL of the click

    device_type string

Device type deducted from client user agent. Possible values ['Desktop',
'Mobile']

metadata object

Object containing useful information about presented resources

  pagination object

Pagination object

    results integer

Total number of available resources

    pages integer

Total number of available pages

    current_page integer

Index of the current page

  search object

Search result Object

    status array

List of searched statuses grouped by status value

      value string

One of permitted status values

      count integer

How many commissions are in result with status equal to value

    registration_month array

List of groups by month

      value integer

Month in format YYYYMM

      count integer

Number of commissions

  available object

Available commissions Object

    status array

List of available statuses grouped by status value

      value string

One of permitted status value

      count integer

How many commissions are available with status equal to value

    registration_month array

List of groups by month

      value string

Month in format YYYYMM

      count integer

Number of commissions

 * Success-Response:

HTTP/1.1 202 OK
{
  "commissions": [
    {
      "id": 1337,
      "actionid": 12,
      "user_id": 3,
      "amount": "4.96",
      "status": "rejected",
      "affrequest_id": 45,
      "description": "Test Product",
      "created_at": "2016-04-13T07:38:42Z",
      "updated_at": "2016-04-13T07:53:59Z",
      "reason": [
        "Test commission"
      ],
      "transaction_id": "1002",
      "stats_tags": null,
      "history": null,
      "currency": "EUR",
      "working_currency_code": "EUR",
      "program_id": 3,
      "amount_in_working_currency": "4.96",
      "actiontype": "sale",
      "user": {
        "id": 3,
        "name": "affiliate.test",
        "role": "affiliate",
        "unique_code": "924e2778a",
        "login": "affiliate.test",
        "avatar_url": "//api.2performant.com/images/avatar-default.jpg"
      },
      "public_action_data": {
        "created_at": "2016-04-13T07:38:42Z",
        "updated_at": "2016-04-13T07:38:42Z",
        "rate": "5.0",
        "amount": "62.0",
        "ad_type": "quicklink",
        "ad_id": 303,
        "source_ip": "192.0.2.0",
        "description": "example description",
        "working_currency_code": "EUR",
        "amount_in_working_currency": "62.0"
      },
      "public_click_data": {
        "created_at": "2016-04-13T07:38:42Z",
        "source_ip": "192.0.2.0",
        "url": "affiliate-site.com",
        "redirect_to": "advertiser-site.com"
      }
    }
  ],
  "metadata": {
    "pagination": {
      "results": 1,
      "pages": 1,
      "current_page": 1
    },
    "facets": {
      "search": {
        "status": [
          {
            "value": "rejected",
            "count": 1
          }
        ],
        "registration_month": [
          {
            "value": "201604",
            "count": 1
          }
        ]
      },
      "available": {
        "status": [
          {
            "value": "rejected",
            "count": 1
          }
        ],
        "registration_month": [
          {
            "value": "201604",
            "count": 1
          }
        ]
      }
    }
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error

 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}


[ADVERTISER] COMMISSIONS - 02. GET AFFILIATE COMMISSION BY ID





Action for accessing a commission in 2Performant by :id



https://api.2performant.com/advertiser/programs/default/commissions/:id

Berechtigung: advertiser  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung id integer

The id of the commission


SUCCESS 200

Feld Typ Beschreibung   id integer

Commission id

  actionid integer

Commission action id

  user_id integer

Commission user id

  amount decimal

Commission amount

  initial_amount decimal

Commission initial amount

  status string

Commission status from list [pending, accepted, rejected, paid]

  affrequest_id integer

Commission user id

  description string

Description

  created_at date

Date then the commission was created

  updated_at date

Last date then the commission was updated

  reason array

List of strings that contains possible rejection reasons

  stats_tags array

Commission statistical tags

  history array

Modification histories of the commission

  currency string

Commission currency code

  working_currency_code string

Working currency code of the program at creation of this commission

  program_id integer

Commission program id

  amount_in_working_currency decimal

Commission amount in working currency code of the program

  user object

Affiliate user Object

    id integer

Affiliate user id

    name string

Affiliate user name

    role string

Affiliate user role

    unique_code string

Affiliate user unique code

    login string

Affiliate user login

    avatar_url string

Affiliate user avatar path

  public_action_data object

Action object

    created_at date

Date then the action was created

    updated_at date

Last date then the action was updated

    rate float

Action rate

    amount decimal

Action amount

    ad_type string

Action ad type

    ad_id integer

Action ad id

    source_ip string

Action source IP

    description string

Action description

    working_currency_code string

Working currency code of the program at creation of this commission

    amount_in_working_currency decimal

Commission amount in working currency code of the program

  public_click_data object

Click object

    created_at date

Date then the click was created

    source_ip string

Click source IP

    url string

Source URL of the click

    redirect_to string

Destination URL of the click

    device_type string

Device type deducted from client user agent. Possible values ['Desktop',
'Mobile']

 * Success-Response:

HTTP/1.1 200 OK
{
  "commission": {
    "id": 1337,
    "actionid": 12,
    "user_id": 3,
    "amount": "4.96",
    "initial_amount": "3.1",
    "status": "rejected",
    "affrequest_id": 45,
    "description": "Test Product",
    "created_at": "2016-04-13T07:38:42Z",
    "updated_at": "2016-04-13T07:53:59Z",
    "reason": [
      "Test commission"
    ],
    "transaction_id": "1002",
    "stats_tags": null,
    "history": null,
    "currency": "EUR",
    "working_currency_code": "EUR",
    "program_id": 3,
    "amount_in_working_currency": "4.96",
    "actiontype": "sale",
    "user": {
      "id": 3,
      "name": "affiliate.test",
      "role": "affiliate",
      "unique_code": "924e2778a",
      "login": "affiliate.test",
      "avatar_url": "//api.2performant.com/images/avatar-default.jpg"
    },
    "public_action_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "updated_at": "2016-04-13T07:38:42Z",
      "rate": "5.0",
      "amount": "62.0",
      "ad_type": "quicklink",
      "ad_id": 303,
      "source_ip": "192.0.2.0",
      "description": "example description",
      "working_currency_code": "EUR",
      "amount_in_working_currency": "62.0"
    },
    "public_click_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "source_ip": "192.0.2.0",
      "url": "affiliate-site.com",
      "redirect_to": "advertiser-site.com"
    }
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error

 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}


[ADVERTISER] COMMISSIONS - 03. POST COMMISSION





Action for creating a commission for an advertiser in 2Performant



https://api.2performant.com/advertiser/programs/default/commissions

Berechtigung: advertiser  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung commission object

The commission object

  user_id integer

Unique id of the affiliate to whom the commission will belong

  amount decimal

The new amount of the commission

  currency_code string

Currency code of the amount. Should be a string of 3 characters example: [EUR,
RON]

  description string

The description of the commission


SUCCESS 200

Feld Typ Beschreibung   id integer

Commission id

  actionid integer

Commission action id

  user_id integer

Commission user id

  amount decimal

Commission amount

  initial_amount decimal

Commission initial amount

  status string

Commission status from list [pending, accepted, rejected, paid]

  affrequest_id integer

Commission user id

  description string

Description

  created_at date

Date then the commission was created

  updated_at date

Last date then the commission was updated

  reason array

List of strings that contains possible rejection reasons

  stats_tags array

Commission statistical tags

  history array

Modification histories of the commission

  currency string

Commission currency code

  working_currency_code string

Working currency code of the program at creation of this commission

  program_id integer

Commission program id

  amount_in_working_currency decimal

Commission amount in working currency code of the program

  user object

Affiliate user Object

    id integer

Affiliate user id

    name string

Affiliate user name

    role string

Affiliate user role

    unique_code string

Affiliate user unique code

    login string

Affiliate user login

    avatar_url string

Affiliate user avatar path

  public_action_data object

Action object

    created_at date

Date then the action was created

    updated_at date

Last date then the action was updated

    rate float

Action rate

    amount decimal

Action amount

    ad_type string

Action ad type

    ad_id integer

Action ad id

    source_ip string

Action source IP

    description string

Action description

    working_currency_code string

Working currency code of the program at creation of this commission

    amount_in_working_currency decimal

Commission amount in working currency code of the program

  public_click_data object

Click object

    created_at date

Date then the click was created

    source_ip string

Click source IP

    url string

Source URL of the click

    redirect_to string

Destination URL of the click

    device_type string

Device type deducted from client user agent. Possible values ['Desktop',
'Mobile']

 * Success-Response:

HTTP/1.1 200 OK
{
  "commission": {
    "id": 1337,
    "actionid": 12,
    "user_id": 3,
    "amount": "4.96",
    "initial_amount": "3.1",
    "status": "rejected",
    "affrequest_id": 45,
    "description": "Test Product",
    "created_at": "2016-04-13T07:38:42Z",
    "updated_at": "2016-04-13T07:53:59Z",
    "reason": [
      "Test commission"
    ],
    "transaction_id": "1002",
    "stats_tags": null,
    "history": null,
    "currency": "EUR",
    "working_currency_code": "EUR",
    "program_id": 3,
    "amount_in_working_currency": "4.96",
    "actiontype": "sale",
    "user": {
      "id": 3,
      "name": "affiliate.test",
      "role": "affiliate",
      "unique_code": "924e2778a",
      "login": "affiliate.test",
      "avatar_url": "//api.2performant.com/images/avatar-default.jpg"
    },
    "public_action_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "updated_at": "2016-04-13T07:38:42Z",
      "rate": "5.0",
      "amount": "62.0",
      "ad_type": "quicklink",
      "ad_id": 303,
      "source_ip": "192.0.2.0",
      "description": "example description",
      "working_currency_code": "EUR",
      "amount_in_working_currency": "62.0"
    },
    "public_click_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "source_ip": "192.0.2.0",
      "url": "affiliate-site.com",
      "redirect_to": "advertiser-site.com"
    }
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error


422

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  detail string

Error detail

    attribute string

Attribute name

 * Error-Response:
 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}

HTTP/1.1 422 Unprocessable Entity
{
  "errors": [
    {
      "title": "Invalid attribute",
      "detail": "Cannot give manual a commission to pending affiliates",
      "source": {
        "attribute": "user_id"
      }
    },
    {
      "title": "Invalid attribute",
      "detail": "can't be blank",
      "source": {
        "attribute": "description"
      }
    }
  ]
}


[ADVERTISER] COMMISSIONS - 03. POST COMMISSION





Action for creating a commission for an advertiser in 2Performant



https://api.2performant.com/advertiser/programs/default/commissions

Berechtigung: advertiser  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung commission object

The commission object

  current_reason optional string

DEPRECATED The reason why changes are made on commission

  user_id integer

Unique id of the affiliate to whom commission belongs

  amount decimal

The new amount of the commission

  currency_code optional string

Currency code of the amount. Should be a string of 3 characters example: [EUR,
RON]. If not provided default will be program working currency code.

  description string

The description of the commission


SUCCESS 200

Feld Typ Beschreibung   id integer

Commission id

  actionid integer

Commission action id

  user_id integer

Commission user id

  amount decimal

Commission amount

  initial_amount decimal

Commission initial amount

  status string

Commission status from list [pending, accepted, rejected, paid]

  affrequest_id integer

Commission user id

  description string

Description

  created_at date

Date then the commission was created

  updated_at date

Last date then the commission was updated

  reason array

List of strings that contains possible rejection reasons

  stats_tags array

Commission statistical tags

  history array

Modification histories of the commission

  currency string

Commission currency code

  working_currency_code string

Working currency code of the program at creation of this commission

  program_id integer

Commission program id

  amount_in_working_currency decimal

Commission amount in working currency code of the program

  user object

Affiliate user Object

    id integer

Affiliate user id

    name string

Affiliate user name

    role string

Affiliate user role

    unique_code string

Affiliate user unique code

    login string

Affiliate user login

    avatar_url string

Affiliate user avatar path

  public_action_data object

Action object

    created_at date

Date then the action was created

    updated_at date

Last date then the action was updated

    rate float

Action rate

    amount decimal

Action amount

    ad_type string

Action ad type

    ad_id integer

Action ad id

    source_ip string

Action source IP

    description string

Action description

    working_currency_code string

Working currency code of the program at creation of this commission

    amount_in_working_currency decimal

Commission amount in working currency code of the program

  public_click_data object

Click object

    created_at date

Date then the click was created

    source_ip string

Click source IP

    url string

Source URL of the click

    redirect_to string

Destination URL of the click

    device_type string

Device type deducted from client user agent. Possible values ['Desktop',
'Mobile']

metadata object

Object containing useful information about presented resources

  deprecations array

Deprecations array

    title integer

Title of the deprecation

    detail integer

Detail description of the deprecation

    links integer

Useful links related to deprecation

 * Success-Response:

HTTP/1.1 200 OK
{
  "commission": {
    "id": 1337,
    "actionid": 12,
    "user_id": 3,
    "amount": "4.96",
    "status": "rejected",
    "affrequest_id": 45,
    "description": "Test Product",
    "created_at": "2016-04-13T07:38:42Z",
    "updated_at": "2016-04-13T07:53:59Z",
    "reason": [
      "Test commission"
    ],
    "transaction_id": "1002",
    "stats_tags": null,
    "history": null,
    "currency": "EUR",
    "working_currency_code": "EUR",
    "program_id": 3,
    "amount_in_working_currency": "4.96",
    "actiontype": "sale",
    "user": {
      "id": 3,
      "name": "affiliate.test",
      "role": "affiliate",
      "unique_code": "924e2778a",
      "login": "affiliate.test",
      "avatar_url": "//api.2performant.com/images/avatar-default.jpg"
    },
    "public_action_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "updated_at": "2016-04-13T07:38:42Z",
      "rate": "5.0",
      "amount": "62.0",
      "ad_type": "quicklink",
      "ad_id": 303,
      "source_ip": "192.0.2.0",
      "description": "example description",
      "working_currency_code": "EUR",
      "amount_in_working_currency": "62.0"
    },
    "public_click_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "source_ip": "192.0.2.0",
      "url": "affiliate-site.com",
      "redirect_to": "advertiser-site.com",
      "device_type": "Mobile"
    }
  }
  "metadata": {
    "deprecations": [
      {
        "title": "Deprecated Field",
        "detail": "The optional field `commission.currency_code` will be mandatory from version 1.1.0",
        "links": "http://doc.2performant.com/"
      },
      {
        "title": "Deprecated Field",
        "detail": "The optional field `commission.current_reason` will be removed from version 1.1.0",
        "links": "http://doc.2performant.com/"
      }
    ]
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error


422

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  detail string

Error detail

    attribute string

Attribute name

 * Error-Response:
 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}

HTTP/1.1 422 Unprocessable Entity
{
  "errors": [
    {
      "title": "Invalid attribute",
      "detail": "Cannot give manual a commission to pending affiliates",
      "source": {
        "attribute": "user_id"
      }
    },
    {
      "title": "Invalid attribute",
      "detail": "can't be blank",
      "source": {
        "attribute": "description"
      }
    }
  ]
}


[ADVERTISER] COMMISSIONS - 03. POST COMMISSION





Action for creating a commission for an advertiser in 2Performant



https://api.2performant.com/advertiser/programs/default/commissions

Berechtigung: advertiser  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung commission object

The commission object

  current_reason optional string

The reason why changes are made on commission (Mandatory on update and reject
commission)

  user_id integer

Unique id of the affiliate to whom commission belongs

  amount decimal

The new amount of the commission

  description string

The description of the commission


SUCCESS 200

Feld Typ Beschreibung   id integer

Commission id

  actionid integer

Commission action id

  user_id integer

Commission user id

  amount decimal

Commission amount

  initial_amount decimal

Commission initial amount

  status string

Commission status from list [pending, accepted, rejected, paid]

  affrequest_id integer

Commission user id

  description string

Description

  created_at date

Date then the commission was created

  updated_at date

Last date then the commission was updated

  reason array

List of strings that contains possible rejection reasons

  stats_tags array

Commission statistical tags

  history array

Modification histories of the commission

  currency string

Commission currency code

  working_currency_code string

Working currency code of the program at creation of this commission

  program_id integer

Commission program id

  amount_in_working_currency decimal

Commission amount in working currency code of the program

  user object

Affiliate user Object

    id integer

Affiliate user id

    name string

Affiliate user name

    role string

Affiliate user role

    unique_code string

Affiliate user unique code

    login string

Affiliate user login

    avatar_url string

Affiliate user avatar path

  public_action_data object

Action object

    created_at date

Date then the action was created

    updated_at date

Last date then the action was updated

    rate float

Action rate

    amount decimal

Action amount

    ad_type string

Action ad type

    ad_id integer

Action ad id

    source_ip string

Action source IP

    description string

Action description

    working_currency_code string

Working currency code of the program at creation of this commission

    amount_in_working_currency decimal

Commission amount in working currency code of the program

  public_click_data object

Click object

    created_at date

Date then the click was created

    source_ip string

Click source IP

    url string

Source URL of the click

    redirect_to string

Destination URL of the click

    device_type string

Device type deducted from client user agent. Possible values ['Desktop',
'Mobile']

 * Success-Response:

HTTP/1.1 200 OK
{
  "commission": {
    "id": 1337,
    "actionid": 12,
    "user_id": 3,
    "amount": "4.96",
    "initial_amount": "3.1",
    "status": "rejected",
    "affrequest_id": 45,
    "description": "Test Product",
    "created_at": "2016-04-13T07:38:42Z",
    "updated_at": "2016-04-13T07:53:59Z",
    "reason": [
      "Test commission"
    ],
    "transaction_id": "1002",
    "stats_tags": null,
    "history": null,
    "currency": "EUR",
    "working_currency_code": "EUR",
    "program_id": 3,
    "amount_in_working_currency": "4.96",
    "actiontype": "sale",
    "user": {
      "id": 3,
      "name": "affiliate.test",
      "role": "affiliate",
      "unique_code": "924e2778a",
      "login": "affiliate.test",
      "avatar_url": "//api.2performant.com/images/avatar-default.jpg"
    },
    "public_action_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "updated_at": "2016-04-13T07:38:42Z",
      "rate": "5.0",
      "amount": "62.0",
      "ad_type": "quicklink",
      "ad_id": 303,
      "source_ip": "192.0.2.0",
      "description": "example description",
      "working_currency_code": "EUR",
      "amount_in_working_currency": "62.0"
    },
    "public_click_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "source_ip": "192.0.2.0",
      "url": "affiliate-site.com",
      "redirect_to": "advertiser-site.com"
    }
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error


422

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  detail string

Error detail

    attribute string

Attribute name

 * Error-Response:
 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}

HTTP/1.1 422 Unprocessable Entity
{
  "errors": [
    {
      "title": "Invalid attribute",
      "detail": "Cannot give manual a commission to pending affiliates",
      "source": {
        "attribute": "user_id"
      }
    },
    {
      "title": "Invalid attribute",
      "detail": "can't be blank",
      "source": {
        "attribute": "description"
      }
    }
  ]
}


[ADVERTISER] COMMISSIONS - 04. PUT COMMISSION (CHANGE COM_VALUE)





Action for updating a commission of an advertiser in 2Performant



https://api.2performant.com/advertiser/programs/default/commissions/:id

Berechtigung: advertiser  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung id integer

The unique id of the commission

commission object

The commission object

  reason string

The reason why changes are made on commission

  amount decimal

The new amount of the commission

  currency_code string

Currency code of the amount. Should be a string of 3 characters example: [EUR,
RON]. Default value: EUR

  description string

The description of the commission


SUCCESS 200

Feld Typ Beschreibung   id integer

Commission id

  actionid integer

Commission action id

  user_id integer

Commission user id

  amount decimal

Commission amount

  initial_amount decimal

Commission initial amount

  status string

Commission status from list [pending, accepted, rejected, paid]

  affrequest_id integer

Commission user id

  description string

Description

  created_at date

Date then the commission was created

  updated_at date

Last date then the commission was updated

  reason array

List of strings that contains possible rejection reasons

  stats_tags array

Commission statistical tags

  history array

Modification histories of the commission

  currency string

Commission currency code

  working_currency_code string

Working currency code of the program at creation of this commission

  program_id integer

Commission program id

  amount_in_working_currency decimal

Commission amount in working currency code of the program

  user object

Affiliate user Object

    id integer

Affiliate user id

    name string

Affiliate user name

    role string

Affiliate user role

    unique_code string

Affiliate user unique code

    login string

Affiliate user login

    avatar_url string

Affiliate user avatar path

  public_action_data object

Action object

    created_at date

Date then the action was created

    updated_at date

Last date then the action was updated

    rate float

Action rate

    amount decimal

Action amount

    ad_type string

Action ad type

    ad_id integer

Action ad id

    source_ip string

Action source IP

    description string

Action description

    working_currency_code string

Working currency code of the program at creation of this commission

    amount_in_working_currency decimal

Commission amount in working currency code of the program

  public_click_data object

Click object

    created_at date

Date then the click was created

    source_ip string

Click source IP

    url string

Source URL of the click

    redirect_to string

Destination URL of the click

    device_type string

Device type deducted from client user agent. Possible values ['Desktop',
'Mobile']

 * Success-Response:

HTTP/1.1 200 OK
{
  "commission": {
    "id": 1337,
    "actionid": 12,
    "user_id": 3,
    "amount": "4.96",
    "initial_amount": "3.1",
    "status": "rejected",
    "affrequest_id": 45,
    "description": "Test Product",
    "created_at": "2016-04-13T07:38:42Z",
    "updated_at": "2016-04-13T07:53:59Z",
    "reason": [
      "Test commission"
    ],
    "transaction_id": "1002",
    "stats_tags": null,
    "history": null,
    "currency": "EUR",
    "working_currency_code": "EUR",
    "program_id": 3,
    "amount_in_working_currency": "4.96",
    "actiontype": "sale",
    "user": {
      "id": 3,
      "name": "affiliate.test",
      "role": "affiliate",
      "unique_code": "924e2778a",
      "login": "affiliate.test",
      "avatar_url": "//api.2performant.com/images/avatar-default.jpg"
    },
    "public_action_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "updated_at": "2016-04-13T07:38:42Z",
      "rate": "5.0",
      "amount": "62.0",
      "ad_type": "quicklink",
      "ad_id": 303,
      "source_ip": "192.0.2.0",
      "description": "example description",
      "working_currency_code": "EUR",
      "amount_in_working_currency": "62.0"
    },
    "public_click_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "source_ip": "192.0.2.0",
      "url": "affiliate-site.com",
      "redirect_to": "advertiser-site.com"
    }
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error


422

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  detail string

Error detail

    attribute string

Attribute name

 * Error-Response:
 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}

HTTP/1.1 422 Unprocessable Entity
{
  "errors": [
    {
      "title": "Invalid attribute",
      "detail": "Cannot give manual a commission to pending affiliates",
      "source": {
        "attribute": "user_id"
      }
    },
    {
      "title": "Invalid attribute",
      "detail": "can't be blank",
      "source": {
        "attribute": "description"
      }
    }
  ]
}


[ADVERTISER] COMMISSIONS - 04. PUT COMMISSION





Action for updating a commission of an advertiser in 2Performant



https://api.2performant.com/advertiser/programs/default/commissions/:id

Berechtigung: advertiser  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung id integer

The unique id of the commission

commission object

The commission object

  reason string

The reason why changes are made on commission

  amount decimal

The new amount of the commission

  currency_code string

Currency code of the amount. Should be a string of 3 characters example: [EUR,
RON]

  description string

The description of the commission


SUCCESS 200

Feld Typ Beschreibung   id integer

Commission id

  actionid integer

Commission action id

  user_id integer

Commission user id

  amount decimal

Commission amount

  initial_amount decimal

Commission initial amount

  status string

Commission status from list [pending, accepted, rejected, paid]

  affrequest_id integer

Commission user id

  description string

Description

  created_at date

Date then the commission was created

  updated_at date

Last date then the commission was updated

  reason array

List of strings that contains possible rejection reasons

  stats_tags array

Commission statistical tags

  history array

Modification histories of the commission

  currency string

Commission currency code

  working_currency_code string

Working currency code of the program at creation of this commission

  program_id integer

Commission program id

  amount_in_working_currency decimal

Commission amount in working currency code of the program

  user object

Affiliate user Object

    id integer

Affiliate user id

    name string

Affiliate user name

    role string

Affiliate user role

    unique_code string

Affiliate user unique code

    login string

Affiliate user login

    avatar_url string

Affiliate user avatar path

  public_action_data object

Action object

    created_at date

Date then the action was created

    updated_at date

Last date then the action was updated

    rate float

Action rate

    amount decimal

Action amount

    ad_type string

Action ad type

    ad_id integer

Action ad id

    source_ip string

Action source IP

    description string

Action description

    working_currency_code string

Working currency code of the program at creation of this commission

    amount_in_working_currency decimal

Commission amount in working currency code of the program

  public_click_data object

Click object

    created_at date

Date then the click was created

    source_ip string

Click source IP

    url string

Source URL of the click

    redirect_to string

Destination URL of the click

    device_type string

Device type deducted from client user agent. Possible values ['Desktop',
'Mobile']

 * Success-Response:

HTTP/1.1 200 OK
{
  "commission": {
    "id": 1337,
    "actionid": 12,
    "user_id": 3,
    "amount": "4.96",
    "initial_amount": "3.1",
    "status": "rejected",
    "affrequest_id": 45,
    "description": "Test Product",
    "created_at": "2016-04-13T07:38:42Z",
    "updated_at": "2016-04-13T07:53:59Z",
    "reason": [
      "Test commission"
    ],
    "transaction_id": "1002",
    "stats_tags": null,
    "history": null,
    "currency": "EUR",
    "working_currency_code": "EUR",
    "program_id": 3,
    "amount_in_working_currency": "4.96",
    "actiontype": "sale",
    "user": {
      "id": 3,
      "name": "affiliate.test",
      "role": "affiliate",
      "unique_code": "924e2778a",
      "login": "affiliate.test",
      "avatar_url": "//api.2performant.com/images/avatar-default.jpg"
    },
    "public_action_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "updated_at": "2016-04-13T07:38:42Z",
      "rate": "5.0",
      "amount": "62.0",
      "ad_type": "quicklink",
      "ad_id": 303,
      "source_ip": "192.0.2.0",
      "description": "example description",
      "working_currency_code": "EUR",
      "amount_in_working_currency": "62.0"
    },
    "public_click_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "source_ip": "192.0.2.0",
      "url": "affiliate-site.com",
      "redirect_to": "advertiser-site.com"
    }
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error


422

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  detail string

Error detail

    attribute string

Attribute name

 * Error-Response:
 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}

HTTP/1.1 422 Unprocessable Entity
{
  "errors": [
    {
      "title": "Invalid attribute",
      "detail": "Cannot give manual a commission to pending affiliates",
      "source": {
        "attribute": "user_id"
      }
    },
    {
      "title": "Invalid attribute",
      "detail": "can't be blank",
      "source": {
        "attribute": "description"
      }
    }
  ]
}


[ADVERTISER] COMMISSIONS - 04. PUT COMMISSION





Action for updating a commission of an advertiser in 2Performant



https://api.2performant.com/advertiser/programs/default/commissions/:id

Berechtigung: advertiser  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung id integer

The unique id of the commission

commission object

The commission object

  reason optional string

The reason why changes are made on commission

  current_reason optional string

DEPRECATED (Use reason parameter instead) The reason why changes are made on
commission

  user_id optional integer

DEPRECATED Unique id of the affiliate to whom commission belongs

  amount decimal

The new amount of the commission

  currency_code optional string

Currency code of the amount. Should be a string of 3 characters example: [EUR,
RON]. If not provided default will be program working currency code.

  description string

The description of the commission


SUCCESS 200

Feld Typ Beschreibung   id integer

Commission id

  actionid integer

Commission action id

  user_id integer

Commission user id

  amount decimal

Commission amount

  initial_amount decimal

Commission initial amount

  status string

Commission status from list [pending, accepted, rejected, paid]

  affrequest_id integer

Commission user id

  description string

Description

  created_at date

Date then the commission was created

  updated_at date

Last date then the commission was updated

  reason array

List of strings that contains possible rejection reasons

  stats_tags array

Commission statistical tags

  history array

Modification histories of the commission

  currency string

Commission currency code

  working_currency_code string

Working currency code of the program at creation of this commission

  program_id integer

Commission program id

  amount_in_working_currency decimal

Commission amount in working currency code of the program

  user object

Affiliate user Object

    id integer

Affiliate user id

    name string

Affiliate user name

    role string

Affiliate user role

    unique_code string

Affiliate user unique code

    login string

Affiliate user login

    avatar_url string

Affiliate user avatar path

  public_action_data object

Action object

    created_at date

Date then the action was created

    updated_at date

Last date then the action was updated

    rate float

Action rate

    amount decimal

Action amount

    ad_type string

Action ad type

    ad_id integer

Action ad id

    source_ip string

Action source IP

    description string

Action description

    working_currency_code string

Working currency code of the program at creation of this commission

    amount_in_working_currency decimal

Commission amount in working currency code of the program

  public_click_data object

Click object

    created_at date

Date then the click was created

    source_ip string

Click source IP

    url string

Source URL of the click

    redirect_to string

Destination URL of the click

    device_type string

Device type deducted from client user agent. Possible values ['Desktop',
'Mobile']

metadata object

Object containing useful information about presented resources

  deprecations array

Deprecations array

    title integer

Title of the deprecation

    detail integer

Detail description of the deprecation

    links integer

Useful links related to deprecation

 * Success-Response:

HTTP/1.1 200 OK
{
  "commission": {
    "id": 1337,
    "actionid": 12,
    "user_id": 3,
    "amount": "4.96",
    "status": "rejected",
    "affrequest_id": 45,
    "description": "Test Product",
    "created_at": "2016-04-13T07:38:42Z",
    "updated_at": "2016-04-13T07:53:59Z",
    "reason": [
      "Test commission"
    ],
    "transaction_id": "1002",
    "stats_tags": null,
    "history": null,
    "currency": "EUR",
    "working_currency_code": "EUR",
    "program_id": 3,
    "amount_in_working_currency": "4.96",
    "actiontype": "sale",
    "user": {
      "id": 3,
      "name": "affiliate.test",
      "role": "affiliate",
      "unique_code": "924e2778a",
      "login": "affiliate.test",
      "avatar_url": "//api.2performant.com/images/avatar-default.jpg"
    },
    "public_action_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "updated_at": "2016-04-13T07:38:42Z",
      "rate": "5.0",
      "amount": "62.0",
      "ad_type": "quicklink",
      "ad_id": 303,
      "source_ip": "192.0.2.0",
      "description": "example description",
      "working_currency_code": "EUR",
      "amount_in_working_currency": "62.0"
    },
    "public_click_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "source_ip": "192.0.2.0",
      "url": "affiliate-site.com",
      "redirect_to": "advertiser-site.com",
      "device_type": "Mobile"
    }
  }
  "metadata": {
    "deprecations": [
      {
        "title": "Deprecated Field",
        "detail": "The optional field `commission.currency_code` will be mandatory from version 1.1.0",
        "links": "http://doc.2performant.com/"
      },
      {
        "title": "Deprecated Field",
        "detail": "The optional field `commission.user_id` will be removed from version 1.1.0",
        "links": "http://doc.2performant.com/"
      },
      {
        "title": "Deprecated Field",
        "detail": "The optional field `commission.current_reason` will be removed from version 1.1.0",
        "links": "http://doc.2performant.com/"
      },
      {
        "title": "Deprecated Field",
        "detail": "The optional field `commission.reason` will be mandatory from version 1.1.0",
        "links": "http://doc.2performant.com/"
      }
    ]
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error


422

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  detail string

Error detail

    attribute string

Attribute name

 * Error-Response:
 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}

HTTP/1.1 422 Unprocessable Entity
{
  "errors": [
    {
      "title": "Invalid attribute",
      "detail": "Cannot give manual a commission to pending affiliates",
      "source": {
        "attribute": "user_id"
      }
    },
    {
      "title": "Invalid attribute",
      "detail": "can't be blank",
      "source": {
        "attribute": "description"
      }
    }
  ]
}


[ADVERTISER] COMMISSIONS - 04. PUT COMMISSION





Action for updating a commission of an advertiser in 2Performant



https://api.2performant.com/advertiser/programs/default/commissions/:id

Berechtigung: advertiser  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung id integer

The unique id of the commission

commission object

The commission object

  current_reason optional string

The reason why changes are made on commission (Mandatory on update and reject
commission)

  user_id integer

Unique id of the affiliate to whom commission belongs

  amount decimal

The new amount of the commission

  description string

The description of the commission


SUCCESS 200

Feld Typ Beschreibung   id integer

Commission id

  actionid integer

Commission action id

  user_id integer

Commission user id

  amount decimal

Commission amount

  initial_amount decimal

Commission initial amount

  status string

Commission status from list [pending, accepted, rejected, paid]

  affrequest_id integer

Commission user id

  description string

Description

  created_at date

Date then the commission was created

  updated_at date

Last date then the commission was updated

  reason array

List of strings that contains possible rejection reasons

  stats_tags array

Commission statistical tags

  history array

Modification histories of the commission

  currency string

Commission currency code

  working_currency_code string

Working currency code of the program at creation of this commission

  program_id integer

Commission program id

  amount_in_working_currency decimal

Commission amount in working currency code of the program

  user object

Affiliate user Object

    id integer

Affiliate user id

    name string

Affiliate user name

    role string

Affiliate user role

    unique_code string

Affiliate user unique code

    login string

Affiliate user login

    avatar_url string

Affiliate user avatar path

  public_action_data object

Action object

    created_at date

Date then the action was created

    updated_at date

Last date then the action was updated

    rate float

Action rate

    amount decimal

Action amount

    ad_type string

Action ad type

    ad_id integer

Action ad id

    source_ip string

Action source IP

    description string

Action description

    working_currency_code string

Working currency code of the program at creation of this commission

    amount_in_working_currency decimal

Commission amount in working currency code of the program

  public_click_data object

Click object

    created_at date

Date then the click was created

    source_ip string

Click source IP

    url string

Source URL of the click

    redirect_to string

Destination URL of the click

    device_type string

Device type deducted from client user agent. Possible values ['Desktop',
'Mobile']

 * Success-Response:

HTTP/1.1 200 OK
{
  "commission": {
    "id": 1337,
    "actionid": 12,
    "user_id": 3,
    "amount": "4.96",
    "initial_amount": "3.1",
    "status": "rejected",
    "affrequest_id": 45,
    "description": "Test Product",
    "created_at": "2016-04-13T07:38:42Z",
    "updated_at": "2016-04-13T07:53:59Z",
    "reason": [
      "Test commission"
    ],
    "transaction_id": "1002",
    "stats_tags": null,
    "history": null,
    "currency": "EUR",
    "working_currency_code": "EUR",
    "program_id": 3,
    "amount_in_working_currency": "4.96",
    "actiontype": "sale",
    "user": {
      "id": 3,
      "name": "affiliate.test",
      "role": "affiliate",
      "unique_code": "924e2778a",
      "login": "affiliate.test",
      "avatar_url": "//api.2performant.com/images/avatar-default.jpg"
    },
    "public_action_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "updated_at": "2016-04-13T07:38:42Z",
      "rate": "5.0",
      "amount": "62.0",
      "ad_type": "quicklink",
      "ad_id": 303,
      "source_ip": "192.0.2.0",
      "description": "example description",
      "working_currency_code": "EUR",
      "amount_in_working_currency": "62.0"
    },
    "public_click_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "source_ip": "192.0.2.0",
      "url": "affiliate-site.com",
      "redirect_to": "advertiser-site.com"
    }
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error


422

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  detail string

Error detail

    attribute string

Attribute name

 * Error-Response:
 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}

HTTP/1.1 422 Unprocessable Entity
{
  "errors": [
    {
      "title": "Invalid attribute",
      "detail": "Cannot give manual a commission to pending affiliates",
      "source": {
        "attribute": "user_id"
      }
    },
    {
      "title": "Invalid attribute",
      "detail": "can't be blank",
      "source": {
        "attribute": "description"
      }
    }
  ]
}


[ADVERTISER] COMMISSIONS - 05. PUT ACCEPT COMMISSION





Accept one of the advertiser's commissions



https://api.2performant.com/advertiser/programs/default/commissions/:id/accept

Berechtigung: advertiser  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung id integer

The id of the commission


SUCCESS 200

Feld Typ Beschreibung   id integer

Commission id

  actionid integer

Commission action id

  user_id integer

Commission user id

  amount decimal

Commission amount

  initial_amount decimal

Commission initial amount

  status string

Commission status from list [pending, accepted, rejected, paid]

  affrequest_id integer

Commission user id

  description string

Description

  created_at date

Date then the commission was created

  updated_at date

Last date then the commission was updated

  reason array

List of strings that contains possible rejection reasons

  stats_tags array

Commission statistical tags

  history array

Modification histories of the commission

  currency string

Commission currency code

  working_currency_code string

Working currency code of the program at creation of this commission

  program_id integer

Commission program id

  amount_in_working_currency decimal

Commission amount in working currency code of the program

  user object

Affiliate user Object

    id integer

Affiliate user id

    name string

Affiliate user name

    role string

Affiliate user role

    unique_code string

Affiliate user unique code

    login string

Affiliate user login

    avatar_url string

Affiliate user avatar path

  public_action_data object

Action object

    created_at date

Date then the action was created

    updated_at date

Last date then the action was updated

    rate float

Action rate

    amount decimal

Action amount

    ad_type string

Action ad type

    ad_id integer

Action ad id

    source_ip string

Action source IP

    description string

Action description

    working_currency_code string

Working currency code of the program at creation of this commission

    amount_in_working_currency decimal

Commission amount in working currency code of the program

  public_click_data object

Click object

    created_at date

Date then the click was created

    source_ip string

Click source IP

    url string

Source URL of the click

    redirect_to string

Destination URL of the click

    device_type string

Device type deducted from client user agent. Possible values ['Desktop',
'Mobile']

 * Success-Response:

HTTP/1.1 200 OK
{
  "commission": {
    "id": 1337,
    "actionid": 12,
    "user_id": 3,
    "amount": "4.96",
    "initial_amount": "3.1",
    "status": "rejected",
    "affrequest_id": 45,
    "description": "Test Product",
    "created_at": "2016-04-13T07:38:42Z",
    "updated_at": "2016-04-13T07:53:59Z",
    "reason": [
      "Test commission"
    ],
    "transaction_id": "1002",
    "stats_tags": null,
    "history": null,
    "currency": "EUR",
    "working_currency_code": "EUR",
    "program_id": 3,
    "amount_in_working_currency": "4.96",
    "actiontype": "sale",
    "user": {
      "id": 3,
      "name": "affiliate.test",
      "role": "affiliate",
      "unique_code": "924e2778a",
      "login": "affiliate.test",
      "avatar_url": "//api.2performant.com/images/avatar-default.jpg"
    },
    "public_action_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "updated_at": "2016-04-13T07:38:42Z",
      "rate": "5.0",
      "amount": "62.0",
      "ad_type": "quicklink",
      "ad_id": 303,
      "source_ip": "192.0.2.0",
      "description": "example description",
      "working_currency_code": "EUR",
      "amount_in_working_currency": "62.0"
    },
    "public_click_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "source_ip": "192.0.2.0",
      "url": "affiliate-site.com",
      "redirect_to": "advertiser-site.com"
    }
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error


422

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  detail string

Error detail

    attribute string

Attribute name

 * Error-Response:
 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}

HTTP/1.1 422 Unprocessable Entity
{
  "errors": [
    {
      "title": "Invalid attribute",
      "detail": "Cannot give manual a commission to pending affiliates",
      "source": {
        "attribute": "user_id"
      }
    },
    {
      "title": "Invalid attribute",
      "detail": "can't be blank",
      "source": {
        "attribute": "description"
      }
    }
  ]
}


[ADVERTISER] COMMISSIONS - 05. PUT ACCEPT COMMISSION





Accept one of the advertiser's commissions



https://api.2performant.com/advertiser/programs/default/commissions/:id/accept

Berechtigung: advertiser  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung id integer

The id of the commission


SUCCESS 200

Feld Typ Beschreibung   id integer

Commission id

  actionid integer

Commission action id

  user_id integer

Commission user id

  amount decimal

Commission amount

  initial_amount decimal

Commission initial amount

  status string

Commission status from list [pending, accepted, rejected, paid]

  affrequest_id integer

Commission user id

  description string

Description

  created_at date

Date then the commission was created

  updated_at date

Last date then the commission was updated

  reason array

List of strings that contains possible rejection reasons

  stats_tags array

Commission statistical tags

  history array

Modification histories of the commission

  currency string

Commission currency code

  working_currency_code string

Working currency code of the program at creation of this commission

  program_id integer

Commission program id

  amount_in_working_currency decimal

Commission amount in working currency code of the program

  user object

Affiliate user Object

    id integer

Affiliate user id

    name string

Affiliate user name

    role string

Affiliate user role

    unique_code string

Affiliate user unique code

    login string

Affiliate user login

    avatar_url string

Affiliate user avatar path

  public_action_data object

Action object

    created_at date

Date then the action was created

    updated_at date

Last date then the action was updated

    rate float

Action rate

    amount decimal

Action amount

    ad_type string

Action ad type

    ad_id integer

Action ad id

    source_ip string

Action source IP

    description string

Action description

    working_currency_code string

Working currency code of the program at creation of this commission

    amount_in_working_currency decimal

Commission amount in working currency code of the program

  public_click_data object

Click object

    created_at date

Date then the click was created

    source_ip string

Click source IP

    url string

Source URL of the click

    redirect_to string

Destination URL of the click

    device_type string

Device type deducted from client user agent. Possible values ['Desktop',
'Mobile']

 * Success-Response:

HTTP/1.1 200 OK
{
  "commission": {
    "id": 1337,
    "actionid": 12,
    "user_id": 3,
    "amount": "4.96",
    "initial_amount": "3.1",
    "status": "rejected",
    "affrequest_id": 45,
    "description": "Test Product",
    "created_at": "2016-04-13T07:38:42Z",
    "updated_at": "2016-04-13T07:53:59Z",
    "reason": [
      "Test commission"
    ],
    "transaction_id": "1002",
    "stats_tags": null,
    "history": null,
    "currency": "EUR",
    "working_currency_code": "EUR",
    "program_id": 3,
    "amount_in_working_currency": "4.96",
    "actiontype": "sale",
    "user": {
      "id": 3,
      "name": "affiliate.test",
      "role": "affiliate",
      "unique_code": "924e2778a",
      "login": "affiliate.test",
      "avatar_url": "//api.2performant.com/images/avatar-default.jpg"
    },
    "public_action_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "updated_at": "2016-04-13T07:38:42Z",
      "rate": "5.0",
      "amount": "62.0",
      "ad_type": "quicklink",
      "ad_id": 303,
      "source_ip": "192.0.2.0",
      "description": "example description",
      "working_currency_code": "EUR",
      "amount_in_working_currency": "62.0"
    },
    "public_click_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "source_ip": "192.0.2.0",
      "url": "affiliate-site.com",
      "redirect_to": "advertiser-site.com"
    }
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error


422

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  detail string

Error detail

    attribute string

Attribute name

 * Error-Response:
 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}

HTTP/1.1 422 Unprocessable Entity
{
  "errors": [
    {
      "title": "Invalid attribute",
      "detail": "Cannot give manual a commission to pending affiliates",
      "source": {
        "attribute": "user_id"
      }
    },
    {
      "title": "Invalid attribute",
      "detail": "can't be blank",
      "source": {
        "attribute": "description"
      }
    }
  ]
}


[ADVERTISER] COMMISSIONS - 06. PUT REJECT COMMISSION





Reject one of the advertiser's commissions



https://api.2performant.com/advertiser/programs/default/commissions/:id/reject

Berechtigung: advertiser  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung id integer

The id of the commission

reason string

The reason why the commission is rejected


SUCCESS 200

Feld Typ Beschreibung   id integer

Commission id

  actionid integer

Commission action id

  user_id integer

Commission user id

  amount decimal

Commission amount

  initial_amount decimal

Commission initial amount

  status string

Commission status from list [pending, accepted, rejected, paid]

  affrequest_id integer

Commission user id

  description string

Description

  created_at date

Date then the commission was created

  updated_at date

Last date then the commission was updated

  reason array

List of strings that contains possible rejection reasons

  stats_tags array

Commission statistical tags

  history array

Modification histories of the commission

  currency string

Commission currency code

  working_currency_code string

Working currency code of the program at creation of this commission

  program_id integer

Commission program id

  amount_in_working_currency decimal

Commission amount in working currency code of the program

  user object

Affiliate user Object

    id integer

Affiliate user id

    name string

Affiliate user name

    role string

Affiliate user role

    unique_code string

Affiliate user unique code

    login string

Affiliate user login

    avatar_url string

Affiliate user avatar path

  public_action_data object

Action object

    created_at date

Date then the action was created

    updated_at date

Last date then the action was updated

    rate float

Action rate

    amount decimal

Action amount

    ad_type string

Action ad type

    ad_id integer

Action ad id

    source_ip string

Action source IP

    description string

Action description

    working_currency_code string

Working currency code of the program at creation of this commission

    amount_in_working_currency decimal

Commission amount in working currency code of the program

  public_click_data object

Click object

    created_at date

Date then the click was created

    source_ip string

Click source IP

    url string

Source URL of the click

    redirect_to string

Destination URL of the click

    device_type string

Device type deducted from client user agent. Possible values ['Desktop',
'Mobile']

 * Success-Response:

HTTP/1.1 200 OK
{
  "commission": {
    "id": 1337,
    "actionid": 12,
    "user_id": 3,
    "amount": "4.96",
    "initial_amount": "3.1",
    "status": "rejected",
    "affrequest_id": 45,
    "description": "Test Product",
    "created_at": "2016-04-13T07:38:42Z",
    "updated_at": "2016-04-13T07:53:59Z",
    "reason": [
      "Test commission"
    ],
    "transaction_id": "1002",
    "stats_tags": null,
    "history": null,
    "currency": "EUR",
    "working_currency_code": "EUR",
    "program_id": 3,
    "amount_in_working_currency": "4.96",
    "actiontype": "sale",
    "user": {
      "id": 3,
      "name": "affiliate.test",
      "role": "affiliate",
      "unique_code": "924e2778a",
      "login": "affiliate.test",
      "avatar_url": "//api.2performant.com/images/avatar-default.jpg"
    },
    "public_action_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "updated_at": "2016-04-13T07:38:42Z",
      "rate": "5.0",
      "amount": "62.0",
      "ad_type": "quicklink",
      "ad_id": 303,
      "source_ip": "192.0.2.0",
      "description": "example description",
      "working_currency_code": "EUR",
      "amount_in_working_currency": "62.0"
    },
    "public_click_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "source_ip": "192.0.2.0",
      "url": "affiliate-site.com",
      "redirect_to": "advertiser-site.com"
    }
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error


422

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  detail string

Error detail

    attribute string

Attribute name

 * Error-Response:
 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}

HTTP/1.1 422 Unprocessable Entity
{
  "errors": [
    {
      "title": "Invalid attribute",
      "detail": "Cannot give manual a commission to pending affiliates",
      "source": {
        "attribute": "user_id"
      }
    },
    {
      "title": "Invalid attribute",
      "detail": "can't be blank",
      "source": {
        "attribute": "description"
      }
    }
  ]
}


[ADVERTISER] COMMISSIONS - 06. PUT REJECT COMMISSION





Reject one of the advertiser's commissions



https://api.2performant.com/advertiser/programs/default/commissions/:id/reject

Berechtigung: advertiser  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung id integer

The id of the commission

reason string

The reason why the commission is rejected


SUCCESS 200

Feld Typ Beschreibung   id integer

Commission id

  actionid integer

Commission action id

  user_id integer

Commission user id

  amount decimal

Commission amount

  initial_amount decimal

Commission initial amount

  status string

Commission status from list [pending, accepted, rejected, paid]

  affrequest_id integer

Commission user id

  description string

Description

  created_at date

Date then the commission was created

  updated_at date

Last date then the commission was updated

  reason array

List of strings that contains possible rejection reasons

  stats_tags array

Commission statistical tags

  history array

Modification histories of the commission

  currency string

Commission currency code

  working_currency_code string

Working currency code of the program at creation of this commission

  program_id integer

Commission program id

  amount_in_working_currency decimal

Commission amount in working currency code of the program

  user object

Affiliate user Object

    id integer

Affiliate user id

    name string

Affiliate user name

    role string

Affiliate user role

    unique_code string

Affiliate user unique code

    login string

Affiliate user login

    avatar_url string

Affiliate user avatar path

  public_action_data object

Action object

    created_at date

Date then the action was created

    updated_at date

Last date then the action was updated

    rate float

Action rate

    amount decimal

Action amount

    ad_type string

Action ad type

    ad_id integer

Action ad id

    source_ip string

Action source IP

    description string

Action description

    working_currency_code string

Working currency code of the program at creation of this commission

    amount_in_working_currency decimal

Commission amount in working currency code of the program

  public_click_data object

Click object

    created_at date

Date then the click was created

    source_ip string

Click source IP

    url string

Source URL of the click

    redirect_to string

Destination URL of the click

    device_type string

Device type deducted from client user agent. Possible values ['Desktop',
'Mobile']

 * Success-Response:

HTTP/1.1 200 OK
{
  "commission": {
    "id": 1337,
    "actionid": 12,
    "user_id": 3,
    "amount": "4.96",
    "initial_amount": "3.1",
    "status": "rejected",
    "affrequest_id": 45,
    "description": "Test Product",
    "created_at": "2016-04-13T07:38:42Z",
    "updated_at": "2016-04-13T07:53:59Z",
    "reason": [
      "Test commission"
    ],
    "transaction_id": "1002",
    "stats_tags": null,
    "history": null,
    "currency": "EUR",
    "working_currency_code": "EUR",
    "program_id": 3,
    "amount_in_working_currency": "4.96",
    "actiontype": "sale",
    "user": {
      "id": 3,
      "name": "affiliate.test",
      "role": "affiliate",
      "unique_code": "924e2778a",
      "login": "affiliate.test",
      "avatar_url": "//api.2performant.com/images/avatar-default.jpg"
    },
    "public_action_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "updated_at": "2016-04-13T07:38:42Z",
      "rate": "5.0",
      "amount": "62.0",
      "ad_type": "quicklink",
      "ad_id": 303,
      "source_ip": "192.0.2.0",
      "description": "example description",
      "working_currency_code": "EUR",
      "amount_in_working_currency": "62.0"
    },
    "public_click_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "source_ip": "192.0.2.0",
      "url": "affiliate-site.com",
      "redirect_to": "advertiser-site.com"
    }
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error


422

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  detail string

Error detail

    attribute string

Attribute name

 * Error-Response:
 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}

HTTP/1.1 422 Unprocessable Entity
{
  "errors": [
    {
      "title": "Invalid attribute",
      "detail": "Cannot give manual a commission to pending affiliates",
      "source": {
        "attribute": "user_id"
      }
    },
    {
      "title": "Invalid attribute",
      "detail": "can't be blank",
      "source": {
        "attribute": "description"
      }
    }
  ]
}


[ADVERTISER] COMMISSIONS - 06. PUT REJECT COMMISSION





Reject one of the advertiser's commissions



https://api.2performant.com/advertiser/programs/default/commissions/:id/reject

Berechtigung: advertiser  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung id integer

The id of the commission

reason optional string

The reason why the commission is rejected

commission optional object

DEPRECATED The commission object

  current_reason optional string

DEPRECATED (Use reason parameter instead) The reason why the commission is
rejected

  user_id optional integer

DEPRECATED Unique id of the affiliate to whom commission belongs

  amount optional decimal

DEPRECATED The new amount of the commission

  currency_code optional string

DEPRECATED Currency code of the amount. Should be a string of 3 characters
example: [EUR, RON]. If not provided default will be program working currency
code.

  description optional string

DEPRECATED The description of the commission


SUCCESS 200

Feld Typ Beschreibung   id integer

Commission id

  actionid integer

Commission action id

  user_id integer

Commission user id

  amount decimal

Commission amount

  initial_amount decimal

Commission initial amount

  status string

Commission status from list [pending, accepted, rejected, paid]

  affrequest_id integer

Commission user id

  description string

Description

  created_at date

Date then the commission was created

  updated_at date

Last date then the commission was updated

  reason array

List of strings that contains possible rejection reasons

  stats_tags array

Commission statistical tags

  history array

Modification histories of the commission

  currency string

Commission currency code

  working_currency_code string

Working currency code of the program at creation of this commission

  program_id integer

Commission program id

  amount_in_working_currency decimal

Commission amount in working currency code of the program

  user object

Affiliate user Object

    id integer

Affiliate user id

    name string

Affiliate user name

    role string

Affiliate user role

    unique_code string

Affiliate user unique code

    login string

Affiliate user login

    avatar_url string

Affiliate user avatar path

  public_action_data object

Action object

    created_at date

Date then the action was created

    updated_at date

Last date then the action was updated

    rate float

Action rate

    amount decimal

Action amount

    ad_type string

Action ad type

    ad_id integer

Action ad id

    source_ip string

Action source IP

    description string

Action description

    working_currency_code string

Working currency code of the program at creation of this commission

    amount_in_working_currency decimal

Commission amount in working currency code of the program

  public_click_data object

Click object

    created_at date

Date then the click was created

    source_ip string

Click source IP

    url string

Source URL of the click

    redirect_to string

Destination URL of the click

    device_type string

Device type deducted from client user agent. Possible values ['Desktop',
'Mobile']

metadata object

Object containing useful information about presented resources

  deprecations array

Deprecations array

    title integer

Title of the deprecation

    detail integer

Detail description of the deprecation

    links integer

Useful links related to deprecation

 * Success-Response:

HTTP/1.1 200 OK
{
  "commission": {
    "id": 1337,
    "actionid": 12,
    "user_id": 3,
    "amount": "4.96",
    "status": "rejected",
    "affrequest_id": 45,
    "description": "Test Product",
    "created_at": "2016-04-13T07:38:42Z",
    "updated_at": "2016-04-13T07:53:59Z",
    "reason": [
      "Test commission"
    ],
    "transaction_id": "1002",
    "stats_tags": null,
    "history": null,
    "currency": "EUR",
    "working_currency_code": "EUR",
    "program_id": 3,
    "amount_in_working_currency": "4.96",
    "actiontype": "sale",
    "user": {
      "id": 3,
      "name": "affiliate.test",
      "role": "affiliate",
      "unique_code": "924e2778a",
      "login": "affiliate.test",
      "avatar_url": "//api.2performant.com/images/avatar-default.jpg"
    },
    "public_action_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "updated_at": "2016-04-13T07:38:42Z",
      "rate": "5.0",
      "amount": "62.0",
      "ad_type": "quicklink",
      "ad_id": 303,
      "source_ip": "192.0.2.0",
      "description": "example description",
      "working_currency_code": "EUR",
      "amount_in_working_currency": "62.0"
    },
    "public_click_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "source_ip": "192.0.2.0",
      "url": "affiliate-site.com",
      "redirect_to": "advertiser-site.com",
      "device_type": "Mobile"
    }
  }
  "metadata": {
    "deprecations": [
      {
        "title": "Deprecated Object",
        "detail": "The optional object `commission` will be removed from version 1.1.0",
        "links": "http://doc.2performant.com/"
      },
      {
        "title": "Deprecated Field",
        "detail": "The optional field `reason` will be mandatory from version 1.1.0",
        "links": "http://doc.2performant.com/"
      }
    ]
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error


422

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  detail string

Error detail

    attribute string

Attribute name

 * Error-Response:
 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}

HTTP/1.1 422 Unprocessable Entity
{
  "errors": [
    {
      "title": "Invalid attribute",
      "detail": "Cannot give manual a commission to pending affiliates",
      "source": {
        "attribute": "user_id"
      }
    },
    {
      "title": "Invalid attribute",
      "detail": "can't be blank",
      "source": {
        "attribute": "description"
      }
    }
  ]
}


[ADVERTISER] COMMISSIONS - 06. PUT REJECT COMMISSION





Reject one of the advertiser's commissions



https://api.2performant.com/advertiser/programs/default/commissions/:id/reject

Berechtigung: advertiser  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung id integer

The id of the commission

commission object

The commission object

  current_reason optional string

The reason why changes are made on commission (Mandatory on update and reject
commission)

  user_id integer

Unique id of the affiliate to whom commission belongs

  amount decimal

The new amount of the commission

  description string

The description of the commission


SUCCESS 200

Feld Typ Beschreibung   id integer

Commission id

  actionid integer

Commission action id

  user_id integer

Commission user id

  amount decimal

Commission amount

  initial_amount decimal

Commission initial amount

  status string

Commission status from list [pending, accepted, rejected, paid]

  affrequest_id integer

Commission user id

  description string

Description

  created_at date

Date then the commission was created

  updated_at date

Last date then the commission was updated

  reason array

List of strings that contains possible rejection reasons

  stats_tags array

Commission statistical tags

  history array

Modification histories of the commission

  currency string

Commission currency code

  working_currency_code string

Working currency code of the program at creation of this commission

  program_id integer

Commission program id

  amount_in_working_currency decimal

Commission amount in working currency code of the program

  user object

Affiliate user Object

    id integer

Affiliate user id

    name string

Affiliate user name

    role string

Affiliate user role

    unique_code string

Affiliate user unique code

    login string

Affiliate user login

    avatar_url string

Affiliate user avatar path

  public_action_data object

Action object

    created_at date

Date then the action was created

    updated_at date

Last date then the action was updated

    rate float

Action rate

    amount decimal

Action amount

    ad_type string

Action ad type

    ad_id integer

Action ad id

    source_ip string

Action source IP

    description string

Action description

    working_currency_code string

Working currency code of the program at creation of this commission

    amount_in_working_currency decimal

Commission amount in working currency code of the program

  public_click_data object

Click object

    created_at date

Date then the click was created

    source_ip string

Click source IP

    url string

Source URL of the click

    redirect_to string

Destination URL of the click

    device_type string

Device type deducted from client user agent. Possible values ['Desktop',
'Mobile']

 * Success-Response:

HTTP/1.1 200 OK
{
  "commission": {
    "id": 1337,
    "actionid": 12,
    "user_id": 3,
    "amount": "4.96",
    "initial_amount": "3.1",
    "status": "rejected",
    "affrequest_id": 45,
    "description": "Test Product",
    "created_at": "2016-04-13T07:38:42Z",
    "updated_at": "2016-04-13T07:53:59Z",
    "reason": [
      "Test commission"
    ],
    "transaction_id": "1002",
    "stats_tags": null,
    "history": null,
    "currency": "EUR",
    "working_currency_code": "EUR",
    "program_id": 3,
    "amount_in_working_currency": "4.96",
    "actiontype": "sale",
    "user": {
      "id": 3,
      "name": "affiliate.test",
      "role": "affiliate",
      "unique_code": "924e2778a",
      "login": "affiliate.test",
      "avatar_url": "//api.2performant.com/images/avatar-default.jpg"
    },
    "public_action_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "updated_at": "2016-04-13T07:38:42Z",
      "rate": "5.0",
      "amount": "62.0",
      "ad_type": "quicklink",
      "ad_id": 303,
      "source_ip": "192.0.2.0",
      "description": "example description",
      "working_currency_code": "EUR",
      "amount_in_working_currency": "62.0"
    },
    "public_click_data": {
      "created_at": "2016-04-13T07:38:42Z",
      "source_ip": "192.0.2.0",
      "url": "affiliate-site.com",
      "redirect_to": "advertiser-site.com"
    }
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error


422

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  detail string

Error detail

    attribute string

Attribute name

 * Error-Response:
 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}

HTTP/1.1 422 Unprocessable Entity
{
  "errors": [
    {
      "title": "Invalid attribute",
      "detail": "Cannot give manual a commission to pending affiliates",
      "source": {
        "attribute": "user_id"
      }
    },
    {
      "title": "Invalid attribute",
      "detail": "can't be blank",
      "source": {
        "attribute": "description"
      }
    }
  ]
}


[ADVERTISER] COMMISSIONS - 07. PUT UPDATE SALE COMMISSION (CHANGE SALE_VALUE)





Update sale commission



https://api.2performant.com/advertiser/programs/default/commissions/:id/update_sale

Berechtigung: advertiser  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung id integer

The id of the commission

sale object

The sale object

  amount string

The new amount of the sale

  currency_code string

The currency code of the sale

  reason string

The reason why changes are made on sale

 * Success-Response:

HTTP/1.1 202 OK
{
  "sale": {
      "id": 5,
      "amount": "4.02",
      "currency_code": "EUR",
      "amount_in_working_currency": "4.02",
      "working_currency_code": "EUR"
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error


422

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  detail string

Error detail

    attribute string

Attribute name

 * Error-Response:
 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}

HTTP/1.1 422 Unprocessable Entity
{
  "errors": [
    {
      "title": "Invalid attribute",
      "detail": "Cannot give manual a commission to pending affiliates",
      "source": {
        "attribute": "user_id"
      }
    },
    {
      "title": "Invalid attribute",
      "detail": "can't be blank",
      "source": {
        "attribute": "description"
      }
    }
  ]
}


[AFFILIATE] PROGRAMS



Controller that handles the requests related to affiliate programs




[AFFILIATE] PROGRAMS - 01. GET AFFILIATE PROGRAMS





Action for accessing statistics about an affiliate related program



https://api.2performant.com/affiliate/programs

Berechtigung: affiliate_user


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung page optional integer

Page number

Standardwert: 1

perpage optional integer

Resources per page

Standardwert: 20

filter optional object

Filter object that contains optional fields for filtering resource results

  query optional string

Filter by on of fields [name, description, tos] can be full text searched using
syntax

  category optional string

Filter by Category name

  country optional string

Filter by Country name

  relation optional string

Filter by Relation name from list [not_applied, pending_suspension,
pending_deletion, accepted, rejected, pending]

sort optional object

Sort object that contains any optional fields for sorting

  approved_commission_count optional string

Sort results asc or desc by price

  click_count optional string

Sort results asc or desc by actions

  epc optional string

Sort results asc or desc by clicks


SUCCESS 200

Feld Typ Beschreibung programs array

List of programs

program object

Program object

  id integer

Program unique id

  slug string

Program slug

  name string

Program name

  main_url string

URL to program website

  base_url string

URL without protocol

  description string

Program Description

  activated_at datetime

Date then the program status became active

  user_id integer

User unique id of the advertiser who owns the program

  unique_code string

Program unique code

  status string

Program status

  cookie_life integer

Time covered from click to actions converted into commissions (in days)

  tos object

Program Terms of Service

  product_feeds_count integer

Number of feeds in this program

  products_count integer

Number of products in all program feeds

  banners_count integer

Number of available banners in program

  approval_time integer

Time in which not processed commissions will be automatically approved (in days)

  currency string

The currency of the conversions made by this program

  working_currency_code string

The currency in which this program is paying generated commissions

  enable_leads boolean

True if your program supports leads conversion

  enable_sales boolean

True if your program supports sales conversion

  default_lead_commission_amount decimal

Program default lead commission amount

  default_lead_commission_type string

The program's default lead commission type. Possible values: "fixed", "variable"

  default_sale_commission_rate decimal

Program default sale commission rate

  default_sale_commission_type string

The program's default sale commission type. Possible values: "fixed", "percent",
"variable"

  approved_commission_count_rate integer

The percentage of approved commissions from the total number of generated
commissions

  approved_commission_amount_rate decimal

The percentage of the amount of the approved commissions from the total amount
of generated commissions

  payment_type string

Advertiser Payment type - could be prepaid, postpaid

  balance_indicator string

Multi-state indicator that shows program health. could be [black, red, orange,
yellow, green]

  downtime integer

Percentage of time in a time interval in which the program has been suspended
due to lack of funds

  average_payment_time integer

Average time in which a commission is payed

  logo_id integer

Logo unique id

  logo_path string

URL to the program logo

  user_login string

Advertiser user login

  category object

Category object

    name string

Program category name

    id integer

Category unique id

    programs_count integer

Number of programs in this category

    average_approval_rate_amount integer

Average of approval_rate_amount for all programs in the category

    average_approval_rate_count integer

Average of approval_rate_count for all programs in the category

    oldest_pending_commission integer

How many days ago was registered a commission that sill have status pending

  selling_countries array

List of countries

    id integer

Id of the country

    code string

Code of the country

    name string

Name of the country

    currency string

Currency of the country

  advertisers_traffic_sources array

List of traffic sources

    traffic_source_id integer

Id of the traffic source

    usage string

Traffic source usage. Can be ["yes", "maybe", "no"]

    status string

Traffic source status

    end_at datetime

The date the traffic source was deactivated

    name string

Traffic source name

  ignore_ips array

List of IPs from witch the redirect is ignored

    ip string

Ignored IP

  affrequest object

Affiliate Request object

    status string

Affrequest status

    id integer

Affrequest id

metadata object

Object containing useful information about presented resources

  search object

Search result Object

    status array

List of searched statuses grouped by status name

      value integer

Status name

      count integer

How many programs are in result with status equal to value

    category_name array

List of categories grouped by name

      value integer

Category name

      count integer

Number of programs in this category

    country_name array

List of countries grouped by name

      value integer

Country name

      count integer

Number of programs working with this country

  available object

Available programs object

    status array

List of available statuses grouped by status name

      value integer

Status name

      count integer

How many programs are available with status equal to value

    category_name array

List of categories grouped by name

      value integer

Category name

      count integer

Number of available programs in this category

    country_name array

List of countries grouped by name

      value integer

Country name

      count integer

Number of programs working with this country

  pagination object

Pagination object

    results integer

Total number of available resources

    pages integer

Total number of available pages

    current_page integer

Index of the current page

 * Success-Response:

HTTP/1.1 200 OK
{
  "facets": {
    "search": {
      "status": [
        {
          "value": "active",
          "count": 1
        }
      ],
      "category_name": [
        {
          "value": "Fashion",
          "count": 1
        }
      ],
      "country_name": [
        {
          "value": "Romania",
          "count": 1
        }
      ]
    },
    "available": {
      "status": [
        {
          "value": "inactive",
          "count": 2
        },
        {
          "value": "active",
          "count": 1
        }
      ],
      "category_name": [
        {
          "value": "Fashion",
          "count": 2
        },
        {
          "value": "Electronics, IT&C",
          "count": 1
        }
      ],
      "country_name": [
        {
          "value": "Romania",
          "count": 1
        },
        {
          "value": "Bulgaria",
          "count": 2
        }
      ]
    }
  },
  "programs": [
    {
      id": 1337,
      "slug": "advertiser-com",
      "name": "advertiser.com",
      "base_url": "advertiser.com",
      "main_url": "https://www.advertiser.com",
      "description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
      "activated_at": "2016-06-01T14:08:06Z",
      "user_id": 1337,
      "unique_code": "86c16b1f7",
      "status": "active",
      "cookie_life": 30,
      "tos": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
      "product_feeds_count": 1,
      "products_count": 2547,
      "banners_count": 74,
      "approval_time": 30,
      "currency": "BGN",
      "enable_leads": null,
      "enable_sales": true,
      "default_lead_commission_amount": null,
      "default_lead_commission_type": null,
      "default_sale_commission_rate": "10.0",
      "default_sale_commission_type": "percent",
      "approved_commission_count_rate": "80.1",
      "approved_commission_amount_rate": "90.2",
      "payment_type": "prepaid",
      "balance_indicator": "green",
      "downtime": "0.0",
      "average_payment_time": 31,
      "logo_id": 1337,
      "logo_path": "https//img.2performant.com/system/paperclip/program_logos/pics/1337/medium/1337.jpg",
      "selling_countries": [
          "name": "Romania",
          "code": "RO",
          "currency": "RON",
          "id": 5
       ],
       "advertiser_traffic_sources": [
        {
            "traffic_source_id": 28,
            "usage": "yes",
            "status": "active",
            "end_at": null,
            "name": "Google Ads - search"
        },
        {
            "traffic_source_id": 29,
            "usage": "no",
            "status": "deleted",
            "end_at": "2023-11-22T12:08:23Z",
            "name": "Google Ads - display"
        },
        {
            "traffic_source_id": 36,
            "usage": "yes",
            "status": "active",
            "end_at": null,
            "name": "Facebook profiles"
        },
        {
            "traffic_source_id": 43,
            "usage": "yes",
            "status": "active",
            "end_at": null,
            "name": "Cashbacks"
        }
     ],
      "tos_signed": true,
      "category": {
        "name": "Fashion",
        "id": 5,
        "programs_count": 25,
        "average_approval_rate_amount": "35.0",
        "average_approval_rate_count": 36,
        "oldest_pending_commission": 0
      },
      "ignore_ips": [
        {
          "id": 90,
          "ip": "192.0.2.0",
          "program_id": 1337,
          "index": 0
        }
      ],
      "affrequest": {
        "status": "accepted",
        "id": 180
      }
    }
  ],
  "pagination": {
    "results": 16,
    "pages": 1,
    "current_page": 1
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error

 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}


[AFFILIATE] PROGRAMS - 02. GET AFFILIATE PROGRAM BY ID





Action for accessing a program in 2Performant



https://api.2performant.com/affiliate/programs/:program_id

Berechtigung: affiliate_user


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung program_id integer

Program unique id || slug


SUCCESS 200

Feld Typ Beschreibung program object

Program object

  id integer

Program unique id

  slug string

Program slug

  name string

Program name

  main_url string

URL to program website

  base_url string

URL without protocol

  description string

Program Description

  activated_at datetime

Date then the program status became active

  user_id integer

User unique id of the advertiser who owns the program

  unique_code string

Program unique code

  status string

Program status

  cookie_life integer

Time covered from click to actions converted into commissions (in days)

  tos object

Program Terms of Service

  product_feeds_count integer

Number of feeds in this program

  products_count integer

Number of products in all program feeds

  banners_count integer

Number of available banners in program

  approval_time integer

Time in which not processed commissions will be automatically approved (in days)

  currency string

The currency of the conversions made by this program

  working_currency_code string

The currency in which this program is paying generated commissions

  enable_leads boolean

True if your program supports leads conversion

  enable_sales boolean

True if your program supports sales conversion

  default_lead_commission_amount decimal

Program default lead commission amount

  default_lead_commission_type string

The program's default lead commission type. Possible values: "fixed", "variable"

  default_sale_commission_rate decimal

Program default sale commission rate

  default_sale_commission_type string

The program's default sale commission type. Possible values: "fixed", "percent",
"variable"

  approved_commission_count_rate integer

The percentage of approved commissions from the total number of generated
commissions

  approved_commission_amount_rate decimal

The percentage of the amount of the approved commissions from the total amount
of generated commissions

  payment_type string

Advertiser Payment type - could be prepaid, postpaid

  balance_indicator string

Multi-state indicator that shows program health. could be [black, red, orange,
yellow, green]

  downtime integer

Percentage of time in a time interval in which the program has been suspended
due to lack of funds

  average_payment_time integer

Average time in which a commission is payed

  logo_id integer

Logo unique id

  logo_path string

URL to the program logo

  user_login string

Advertiser user login

  category object

Category object

    name string

Program category name

    id integer

Category unique id

    programs_count integer

Number of programs in this category

    average_approval_rate_amount integer

Average of approval_rate_amount for all programs in the category

    average_approval_rate_count integer

Average of approval_rate_count for all programs in the category

    oldest_pending_commission integer

How many days ago was registered a commission that sill have status pending

  selling_countries array

List of countries

    id integer

Id of the country

    code string

Code of the country

    name string

Name of the country

    currency string

Currency of the country

  advertisers_traffic_sources array

List of traffic sources

    traffic_source_id integer

Id of the traffic source

    usage string

Traffic source usage. Can be ["yes", "maybe", "no"]

    status string

Traffic source status

    end_at datetime

The date the traffic source was deactivated

    name string

Traffic source name

  ignore_ips array

List of IPs from witch the redirect is ignored

    ip string

Ignored IP

  affrequest object

Affiliate Request object

    status string

Affrequest status

    id integer

Affrequest id

  directory_stats object

Program directory status object

    approval_rate_amount integer

Program approval rate amount

    approval_rate_count string

Program approval rate count

    oldest_pending_commission datetime

Number of seconds from creation of the oldest commission in pending status

    tools object

Program tools object

      banner datetime

Date of last update of the banners

      product_store datetime

Date of last update of the product store

 * Success-Response:

HTTP/1.1 200 OK
{
    "program": {
      "id": 1337,
      "slug": "advertiser-com",
      "name": "advertiser.com",
      "base_url": "advertiser.com",
      "main_url": "https://www.advertiser.com",
      "description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
      "activated_at": "2016-06-01T14:08:06Z",
      "user_id": 1337,
      "unique_code": "86c16b1f7",
      "status": "active",
      "cookie_life": 30,
      "tos": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
      "product_feeds_count": 1,
      "products_count": 2547,
      "banners_count": 74,
      "approval_time": 30,
      "currency": "BGN",
      "enable_leads": null,
      "enable_sales": true,
      "default_lead_commission_amount": null,
      "default_lead_commission_type": null,
      "default_sale_commission_rate": "10.0",
      "default_sale_commission_type": "percent",
      "approved_commission_count_rate": "80.1",
      "approved_commission_amount_rate": "90.2",
      "payment_type": "prepaid",
      "balance_indicator": "green",
      "downtime": "0.0",
      "average_payment_time": 31,
      "logo_id": 1337,
      "logo_path": "https//img.2performant.com/system/paperclip/program_logos/pics/1337/medium/1337.jpg",
      "selling_countries": [
        "name": "Romania",
        "code": "RO",
        "currency": "RON",
        "id": 5
      ],
      "advertiser_traffic_sources": [
        {
            "traffic_source_id": 28,
            "usage": "yes",
            "status": "active",
            "end_at": null,
            "name": "Google Ads - search"
        },
        {
            "traffic_source_id": 29,
            "usage": "no",
            "status": "deleted",
            "end_at": "2023-11-22T12:08:23Z",
            "name": "Google Ads - display"
        },
        {
            "traffic_source_id": 36,
            "usage": "yes",
            "status": "active",
            "end_at": null,
            "name": "Facebook profiles"
        },
        {
            "traffic_source_id": 43,
            "usage": "yes",
            "status": "active",
            "end_at": null,
            "name": "Cashbacks"
        }
     ],
      "tos_signed": true,
      "category": {
        "name": "Fashion",
        "id": 5,
        "programs_count": 25,
        "average_approval_rate_amount": "35.0",
        "average_approval_rate_count": 36,
        "oldest_pending_commission": 0
      },
      "ignore_ips": [
        {
          "id": 90,
          "ip": "192.0.2.0",
          "program_id": 1337,
          "index": 0
        }
      ],
      "affrequest": {
        "status": "accepted",
        "id": 66
      },
      "directory_stats": {
        "approval_rate_amount": "100.0",
        "approval_rate_count": 100,
        "oldest_pending_commission": null,
        "tools": {
          "banner": "2015-07-31T21:17:13Z",
          "product_store": "2015-07-31T09:42:54Z"
        }
      }
    }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error

 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}


[AFFILIATE] PROGRAMS - 03. GET MY AFFILIATE REQUEST





Action for accessing statistics about an affiliate program



https://api.2performant.com/affiliate/programs/:program_id/me

Berechtigung: affiliate_user


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung program_id integer

Program unique id || slug


SUCCESS 200

Feld Typ Beschreibung affrequest object

Affiliate Request object

  id integer

Affiliate Request unique id

  status string

Status of the request. One of [pending, accepted, rejected]

  delete_at datetime

Date then the affiliate was deleted from program

  suspend_at datetime

Date then the request will become rejected

  join_date datetime

Date then the request was created

  subscription object

Affiliate Request subscription object

    newsletter boolean

True if user is subscribed to program newsletter

    notifications boolean

True if user is subscribed to notification from this program

 * Success-Response:

HTTP/1.1 200 OK
{
  "affrequest": {
    "id": 236,
    "status": "accepted",
    "delete_at": null,
    "suspend_at": null,
    "join_date": "2015-06-25T08:12:46Z",
    "subscription": {
      "newsletter": false,
      "notifications": false
    }
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error

 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}


[AFFILIATE] COMMISSIONS



Controller that handles the requests related to affiliate commissions




[AFFILIATE] COMMISSIONS - 01. GET COMMISSIONS





Action for accessing affiliate commissions from 2Performant.

Throttled endpoints

This is part of the throttled endpoints.

You can make a maximum of 100 requests to these endpoints per minute. The
endpoints will have a common request count.

When you reach the threshold, a 5 minute penalty will be applied. The server
will return 429(Too many requests) status during this time.



https://api.2performant.com/affiliate/commissions

Berechtigung: affiliate  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung program_id optional integer

Program unique id for filtering commissions

page optional integer

Page number

Standardwert: 1

perpage optional integer

Resources per page

Standardwert: 20

filter optional object

Filter object that contains any optional fields for filtering

  query optional string

Filter by on of fields [campaign_name, campaign_description, campaign_tos, id,
description, transaction_id, amount, transaction_amount] can be full text
searched using syntax

  status optional string

Filter by status from list [pending, accepted, rejected, paid]

  date optional string

Filter by Date, Month in format YYYYMM

  start_date optional string

Filter by Date, select commissions created since the start_date (start_date
included)

  end_date optional string

Filter by Date, select commissions created until the end_date (end_date
included)

sort optional object

Sort object that contains any optional fields for sorting

  transaction_id optional string

Sort results asc or desc by transaction_id

  date optional string

Sort results asc or desc by date

  commission optional string

Sort results asc or desc by commission

  sale optional string

Sort results asc or desc by sale

  username optional string

Sort results asc or desc by username

  updated optional string

Sort results asc or desc by the timestamp of the commission's last modification


SUCCESS 200

Feld Typ Beschreibung commissions array

Array of user commissions

  id integer

Commission id

  actionid integer

Commission action id

  user_id integer

Commission user id

  amount decimal

Commission amount

  initial_amount decimal

Commission initial amount

  status string

Commission status from list ['pending', 'accepted', 'rejected', 'paid']

  affrequest_id integer

Commission user id

  description string

Description

  created_at datetime

Date then the commission was created

  updated_at datetime

Last date then the commission was updated

  reason array

List of strings that contains possible rejection reasons

  stats_tags array

Commission statistical tags

  history array

Modification histories of the commission

  currency string

Commission currency code

  working_currency_code string

Working currency code of the program at creation of this commission

  program_id integer

Commission program id

  amount_in_working_currency decimal

Commission amount in working currency code of the program

  actiontype string

Action type of commission

  program object

Program Object

    name string

Program name

    slug string

Program slug

    payment_type string

Program payment type

    status string

Program status

    user_login string

Advertiser user login

    logo string

Advertiser user avatar path

  public_action_data object

Action object

    created_at datetime

Date then the action was created

    updated_at datetime

Last date then the action was updated

    rate float

Action rate

    amount decimal

Action amount

    ad_type string

Action ad type

    ad_id integer

Action ad id

    source_ip string

Action source IP

    description string

Action description

    working_currency_code string

Working currency code of the program at creation of this commission

    amount_in_working_currency decimal

Commission amount in working currency code of the program

  public_click_data object

Click object

    created_at datetime

Date then the click was created

    source_ip string

Click source IP

    url string

Source URL of the click

    redirect_to string

Destination URL of the click

    device_type string

Device type deducted from client user agent. Possible values ['Desktop',
'Mobile']

metadata object

Object containing useful information about presented resources

  totals object

Object containing total statistics about all commissions

    amount decimal

Total amount of the commissions

    transaction_amount float

Total amount of the transactions

    results integer

Number of total commissions

  pagination object

Pagination object

    results integer

Total number of available resources

    pages integer

Total number of available pages

    current_page integer

Index of the current page

  search object

Search result Object

    status array

List of searched statuses grouped by status value

      value string

One of permitted status values

      count integer

How many commissions are in result with status equal to value

    registration_month array

List of groups by month

      value integer

Month in format YYYYMM

      count integer

Number of commissions

  available object

Available commissions Object

    status array

List of available statuses grouped by status value

      value string

One of permitted status value

      count integer

How many commissions are available with status equal to value

    registration_month array

List of groups by month

      value string

Month in format YYYYMM

      count integer

Number of commissions

 * Success-Response:

HTTP/1.1 200 OK
{
  "commissions": [
    {
      "id": 1337,
      "actionid": 12,
      "user_id": 3,
      "amount": "4.96",
      "initial_amount": "3.1",
      "status": "rejected",
      "affrequest_id": 45,
      "description": "Test Product",
      "created_at": "2016-04-13T07:38:42Z",
      "updated_at": "2016-04-13T07:53:59Z",
      "reason": [
        "Test commission"
      ],
      "transaction_id": "1002",
      "stats_tags": null,
      "history": null,
      "currency": "EUR",
      "working_currency_code": "EUR",
      "program_id": 3,
      "amount_in_working_currency": "4.96",
      "actiontype": "sale",
      "program": {
        "name": "advertiser.com",
        "slug": "advertiser-com",
        "payment_type": "prepaid",
        "status": "active",
        "user_login": "advertiserlogin",
        "logo": "https://img.2performant.com/system/paperclip/program_logos/pics/1337/medium/1337.png"
      },
      "public_action_data": {
        "created_at": "2016-04-13T07:38:42Z",
        "updated_at": "2016-04-13T07:38:42Z",
        "rate": "5.0",
        "amount": "62.0",
        "ad_type": "quicklink",
        "ad_id": 303,
        "source_ip": "192.0.2.0",
        "description": "example description",
        "working_currency_code": "EUR",
        "amount_in_working_currency": "62.0"
      },
      "public_click_data": {
        "created_at": "2016-04-13T07:38:42Z",
        "source_ip": "192.0.2.0",
        "url": "affiliate-site.com",
        "redirect_to": "advertiser-site.com",
        "device_type": "Mobile"
      }
    }
  ],
  "metadata": {
    "totals": {
      "amount": "14.64",
      "transaction_amount": "201.4",
      "results": 2
    },
    "pagination": {
      "results": 2,
      "pages": 1,
      "current_page": 1
    },
    "facets": {
      "search": {
        "status": [
          {
            "value": "pending",
            "count": 1
          }
        ],
        "registration_month": [
          {
            "value": "201607",
            "count": 1
          }
        ]
      },
      "available": {
        "status": [
          {
            "value": "pending",
            "count": 1
          },
          {
            "value": "accepted",
            "count": 1
          }
        ],
        "registration_month": [
          {
            "value": "201607",
            "count": 2
          }
        ]
      }
    }
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error


429

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error

 * Error-Response:
 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}

HTTP/1.1 429 Too Many Requests
{
  "errors": [
    "Too many requests"
  ]
}


[AFFILIATE] COMMISSIONS - 01. GET COMMISSIONS





Action for accessing affiliate commissions from 2Performant.

Throttled endpoints

This is part of the throttled endpoints.

You can make a maximum of 100 requests to these endpoints per minute. The
endpoints will have a common request count.

When you reach the threshold, a 5 minute penalty will be applied. The server
will return 429(Too many requests) status during this time.



https://api.2performant.com/affiliate/commissions

Berechtigung: affiliate  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung program_id optional integer

Program unique id for filtering commissions

page optional integer

Page number

Standardwert: 1

perpage optional integer

Resources per page

Standardwert: 20

filter optional object

Filter object that contains any optional fields for filtering

  query optional string

Filter by on of fields [campaign_name, campaign_description, campaign_tos, id,
description, transaction_id, amount, transaction_amount] can be full text
searched using syntax

  status optional string

Filter by status from list [pending, accepted, rejected, paid]

  date optional string

Filter by Date, Month in format YYYYMM

  start_date optional string

Filter by Date, select commissions created since the start_date (start_date
included)

  end_date optional string

Filter by Date, select commissions created until the end_date (end_date
included)

sort optional object

Sort object that contains any optional fields for sorting

  transaction_id optional string

Sort results asc or desc by transaction_id

  date optional string

Sort results asc or desc by date

  commission optional string

Sort results asc or desc by commission

  sale optional string

Sort results asc or desc by sale

  username optional string

Sort results asc or desc by username

  updated optional string

Sort results asc or desc by the timestamp of the commission's last modification


SUCCESS 200

Feld Typ Beschreibung commissions array

Array of user commissions

  id integer

Commission id

  actionid integer

Commission action id

  user_id integer

Commission user id

  amount decimal

Commission amount

  status string

Commission status from list ['pending', 'accepted', 'rejected', 'paid']

  affrequest_id integer

Commission user id

  description string

Description

  created_at datetime

Date then the commission was created

  updated_at datetime

Last date then the commission was updated

  reason array

List of strings that contains possible rejection reasons

  stats_tags array

Commission statistical tags

  history array

Modification histories of the commission

  currency string

Commission currency code

  working_currency_code string

Working currency code of the program at creation of this commission

  program_id integer

Commission program id

  amount_in_working_currency decimal

Commission amount in working currency code of the program

  program object

Program Object

    name string

Program name

    slug string

Program slug

    payment_type string

Program payment type

    status string

Program status

    user_login string

Advertiser user login

    logo string

Advertiser user avatar path

  public_action_data object

Action object

    created_at datetime

Date then the action was created

    updated_at datetime

Last date then the action was updated

    rate float

Action rate

    amount decimal

Action amount

    ad_type string

Action ad type

    ad_id integer

Action ad id

    source_ip string

Action source IP

    description string

Action description

    working_currency_code string

Working currency code of the program at creation of this commission

    amount_in_working_currency decimal

Commission amount in working currency code of the program

  public_click_data object

Click object

    created_at datetime

Date then the click was created

    source_ip string

Click source IP

    url string

Source URL of the click

    redirect_to string

Destination URL of the click

    device_type string

Device type deducted from client user agent. Possible values ['Desktop',
'Mobile']

metadata object

Object containing useful information about presented resources

  totals object

Object containing total statistics about all commissions

    amount decimal

Total amount of the commissions

    transaction_amount float

Total amount of the transactions

    results integer

Number of total commissions

  pagination object

Pagination object

    results integer

Total number of available resources

    pages integer

Total number of available pages

    current_page integer

Index of the current page

  search object

Search result Object

    status array

List of searched statuses grouped by status value

      value string

One of permitted status values

      count integer

How many commissions are in result with status equal to value

    registration_month array

List of groups by month

      value integer

Month in format YYYYMM

      count integer

Number of commissions

  available object

Available commissions Object

    status array

List of available statuses grouped by status value

      value string

One of permitted status value

      count integer

How many commissions are available with status equal to value

    registration_month array

List of groups by month

      value string

Month in format YYYYMM

      count integer

Number of commissions

 * Success-Response:

HTTP/1.1 200 OK
{
  "commissions": [
    {
      "id": 1337,
      "actionid": 12,
      "user_id": 3,
      "amount": "4.96",
      "status": "rejected",
      "affrequest_id": 45,
      "description": "Test Product",
      "created_at": "2016-04-13T07:38:42Z",
      "updated_at": "2016-04-13T07:53:59Z",
      "reason": [
        "Test commission"
      ],
      "transaction_id": "1002",
      "stats_tags": null,
      "history": null,
      "currency": "EUR",
      "working_currency_code": "EUR",
      "program_id": 3,
      "amount_in_working_currency": "4.96",
      "actiontype": "sale",
      "program": {
        "name": "advertiser.com",
        "slug": "advertiser-com",
        "payment_type": "prepaid",
        "status": "active",
        "user_login": "advertiserlogin",
        "logo": "https://img.2performant.com/system/paperclip/program_logos/pics/1337/medium/1337.png"
      },
      "public_action_data": {
        "created_at": "2016-04-13T07:38:42Z",
        "updated_at": "2016-04-13T07:38:42Z",
        "rate": "5.0",
        "amount": "62.0",
        "ad_type": "quicklink",
        "ad_id": 303,
        "source_ip": "192.0.2.0",
        "description": "example description",
        "working_currency_code": "EUR",
        "amount_in_working_currency": "62.0"
      },
      "public_click_data": {
        "created_at": "2016-04-13T07:38:42Z",
        "source_ip": "192.0.2.0",
        "url": "affiliate-site.com",
        "redirect_to": "advertiser-site.com",
        "device_type": "Mobile"
      }
    }
  ],
  "metadata": {
    "totals": {
      "amount": "14.64",
      "transaction_amount": "201.4",
      "results": 2
    },
    "pagination": {
      "results": 2,
      "pages": 1,
      "current_page": 1
    },
    "facets": {
      "search": {
        "status": [
          {
            "value": "pending",
            "count": 1
          }
        ],
        "registration_month": [
          {
            "value": "201607",
            "count": 1
          }
        ]
      },
      "available": {
        "status": [
          {
            "value": "pending",
            "count": 1
          },
          {
            "value": "accepted",
            "count": 1
          }
        ],
        "registration_month": [
          {
            "value": "201607",
            "count": 2
          }
        ]
      }
    }
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error


429

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error

 * Error-Response:
 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}

HTTP/1.1 429 Too Many Requests
{
  "errors": [
    "Too many requests"
  ]
}


[AFFILIATE] COMMISSIONS - 01. GET COMMISSIONS





Action for accessing affiliate commissions from 2Performant



https://api.2performant.com/affiliate/commissions

Berechtigung: affiliate  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung page optional integer

Page number

Standardwert: 1

perpage optional integer

Resources per page

Standardwert: 20

filter optional object

Filter object that contains any optional fields for filtering

  query optional string

Filter by on of fields [campaign_name, campaign_description, campaign_tos, id,
description, transaction_id, amount, transaction_amount] can be full text
searched using syntax

  status optional string

Filter by status from list [pending, accepted, rejected, paid]

  date optional string

Filter by Date, Month in format YYYYMM

  start_date optional string

Filter by Date, select commissions created since the start_date (start_date
included)

  end_date optional string

Filter by Date, select commissions created until the end_date (end_date
included)

sort optional object

Sort object that contains any optional fields for sorting

  transaction_id optional string

Sort results asc or desc by transaction_id

  date optional string

Sort results asc or desc by date

  commission optional string

Sort results asc or desc by commission

  sale optional string

Sort results asc or desc by sale

  username optional string

Sort results asc or desc by username

  updated optional string

Sort results asc or desc by the timestamp of the commission's last modification


SUCCESS 200

Feld Typ Beschreibung commissions array

Array of user commissions

  id integer

Commission id

  actionid integer

Commission action id

  user_id integer

Commission user id

  amount decimal

Commission amount

  status string

Commission status from list ['pending', 'accepted', 'rejected', 'paid']

  affrequest_id integer

Commission user id

  description string

Description

  created_at datetime

Date then the commission was created

  updated_at datetime

Last date then the commission was updated

  reason array

List of strings that contains possible rejection reasons

  stats_tags array

Commission statistical tags

  history array

Modification histories of the commission

  currency string

Commission currency code

  working_currency_code string

Working currency code of the program at creation of this commission

  program_id integer

Commission program id

  amount_in_working_currency decimal

Commission amount in working currency code of the program

  program object

Program Object

    name string

Program name

    slug string

Program slug

    payment_type string

Program payment type

    user_login string

Advertiser user login

    logo string

Advertiser user avatar path

  public_action_data object

Action object

    created_at datetime

Date then the action was created

    updated_at datetime

Last date then the action was updated

    rate float

Action rate

    amount decimal

Action amount

    ad_type string

Action ad type

    ad_id integer

Action ad id

    source_ip string

Action source IP

    description string

Action description

    working_currency_code string

Working currency code of the program at creation of this commission

    amount_in_working_currency decimal

Commission amount in working currency code of the program

  public_click_data object

Click object

    created_at datetime

Date then the click was created

    source_ip string

Click source IP

    url string

Source URL of the click

    redirect_to string

Destination URL of the click

metadata object

Object containing useful information about presented resources

  totals object

Object containing total statistics about all commissions

    amount decimal

Total amount of the commissions

    transaction_amount float

Total amount of the transactions

    results integer

Number of total commissions

  pagination object

Pagination object

    results integer

Total number of available resources

    pages integer

Total number of available pages

    current_page integer

Index of the current page

  search object

Search result Object

    status array

List of searched statuses grouped by status value

      value string

One of permitted status values

      count integer

How many commissions are in result with status equal to value

    registration_month array

List of groups by month

      value integer

Month in format YYYYMM

      count integer

Number of commissions

  available object

Available commissions Object

    status array

List of available statuses grouped by status value

      value string

One of permitted status value

      count integer

How many commissions are available with status equal to value

    registration_month array

List of groups by month

      value string

Month in format YYYYMM

      count integer

Number of commissions

 * Success-Response:

HTTP/1.1 200 OK
{
  "commissions": [
    {
      "id": 1337,
      "actionid": 12,
      "user_id": 3,
      "amount": "4.96",
      "status": "rejected",
      "affrequest_id": 45,
      "description": "Test Product",
      "created_at": "2016-04-13T07:38:42Z",
      "updated_at": "2016-04-13T07:53:59Z",
      "reason": [
        "Test commission"
      ],
      "transaction_id": "1002",
      "stats_tags": null,
      "history": null,
      "currency": "EUR",
      "working_currency_code": "EUR",
      "program_id": 3,
      "amount_in_working_currency": "4.96",
      "actiontype": "sale",
      "program": {
        "name": "advertiser.com",
        "slug": "advertiser-com",
        "payment_type": "prepaid",
        "user_login": "advertiserlogin",
        "logo": "https://img.2performant.com/system/paperclip/program_logos/pics/1337/medium/1337.png"
      },
      "public_action_data": {
        "created_at": "2016-04-13T07:38:42Z",
        "updated_at": "2016-04-13T07:38:42Z",
        "rate": "5.0",
        "amount": "62.0",
        "ad_type": "quicklink",
        "ad_id": 303,
        "source_ip": "192.0.2.0",
        "description": "example description",
        "working_currency_code": "EUR",
        "amount_in_working_currency": "62.0"
      },
      "public_click_data": {
        "created_at": "2016-04-13T07:38:42Z",
        "source_ip": "192.0.2.0",
        "url": "affiliate-site.com",
        "redirect_to": "advertiser-site.com"
      }
    }
  ],
  "metadata": {
    "totals": {
      "amount": "14.64",
      "transaction_amount": "201.4",
      "results": 2
    },
    "pagination": {
      "results": 2,
      "pages": 1,
      "current_page": 1
    },
    "facets": {
      "search": {
        "status": [
          {
            "value": "pending",
            "count": 1
          }
        ],
        "registration_month": [
          {
            "value": "201607",
            "count": 1
          }
        ]
      },
      "available": {
        "status": [
          {
            "value": "pending",
            "count": 1
          },
          {
            "value": "accepted",
            "count": 1
          }
        ],
        "registration_month": [
          {
            "value": "201607",
            "count": 2
          }
        ]
      }
    }
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error

 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}


[AFFILIATE] BANNERS



Controller that handles the requests related to banners from affiliate programs




[AFFILIATE] BANNERS - 01. GET BANNERS





Action for accessing affiliate banners from 2Performant



https://api.2performant.com/affiliate/banners

Berechtigung: affiliate  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung program_id optional integer

Program unique id

page optional integer

Page number

Standardwert: 1

perpage optional integer

Resources per page

Standardwert: 20

filter optional object

Filter object

  query optional string

Search value

  dimensions optional string

Filter by Dimension value in format <width>x<height> Example: 128x96

  category optional string

Filter by category value

  friendly_type optional string

Filter by resource type. One of [Flash, GIF, JPEG, PNG]

sort optional string

Sort object can contain only one field

  dimensions optional string

Possible values are [asc, desc]

  category optional string

Possible values are [asc, desc]

  friendly_type optional string

Possible values are [asc, desc]

  clicks optional string

Possible values are [asc, desc]

  actions optional string

Possible values are [asc, desc]

  conversion_rate optional string

Possible values are [asc, desc]


SUCCESS 200

Feld Typ Beschreibung banners array

List of banners objects

  id integer

Banner unique id

  img_path string

Banner image path

  dimensions string

Dimension value of the banner in format <width>x<height>
Example: 128x96

  category string

Banner category. Set by advertiser and visible to affiliate

  friendly_type string

Banner type value from list [Flash, GIF, JPEG, PNG]

  height integer

Banner height

  width integer

Banner width

  unique_code string

Banner unique code

  url string

Banner URL

  b_type string

Banner type from list [flash, image]

  conversion_rate float

Banner conversion rate calculated by formula: Number of sales/Number of clicks

  link string

Redirect link

  markup string

Markup code ready to embed

  program string

Program object

    name string

Program name

    slug string

Program slug

    unique_code string

Program unique code

metadata object

Object containing useful information about presented resources

  pagination object

Pagination object

    results integer

Total number of available resources

    pages integer

Total number of available pages

    current_page integer

Index of the current page

search object

Search result Object

  category array

List of searched categories grouped by category value

    value integer

Category name

    count integer

How many banners are in result with category equal to value

  dimensions array

List of searched categories grouped by dimension value

    value integer

Dimension value in format <width>x<height> Example: 128x96

    count integer

How many banners are in result with dimension equal to value

  friendly_type array

List of searched banners grouped by resource type

    value integer

Resource type value from list [Flash, GIF, JPEG, PNG]

    count integer

How many banners are in result with type equal to value

available object

Available banners Object

  category array

List of available banners grouped by category value

    value integer

Category name

    count integer

How many banners are available with category equal to value

  dimensions array

List of available banners grouped by category value

    value integer

Dimension value in format <width>x<height> Example: 128x96

    count integer

How many banners are available with dimension equal to value

  friendly_type array

List of available banners grouped by resource type

    value integer

Resource type value from list [Flash, GIF, JPEG, PNG]

    count integer

How many banners are available with type equal to value

 * Success-Response:

HTTP/1.1 200 OK
{
  "banners": [
    {
      "id": 1337,
      "img_path": "https://img.2performant.com/system/paperclip/banner_pictures/pics/1337/original/1337.jpg",
      "dimensions": "728x90",
      "category": "Акция",
      "friendly_type": "JPEG",
      "width": 728,
      "height": 90,
      "unique_code": "c6f4167fe",
      "url": "https://www.advertiser-site.com/",
      "b_type": "image",
      "conversion_rate": 0,
      "link": "//event.2performant.com/events/click?ad_type=banner&unique=d6f6347fe&aff_code=695a97b32&program_unique=c242fc71e",
      "markup": "<a href=\"//event.2performant.com/events/click?ad_type=banner&unique=c6f4237fe&aff_code=365e39b32&program_unique=c314fbe1e\" target=\"_blank\" rel=\"nofollow\"><img src=\"https://img.2performant.com/system/paperclip/banner_pictures/pics/1337/original/1337.jpg\" alt=\"advertiser-site.com\" title=\"advertiser-site.com\" border=\"0\" height=\"980px\" width=\"200px\" /></a>",
      "program": {
        "name": "advertiser-site.com",
        "slug": "advertiser-site-com",
        "unique_code": "b242fbf2e"
      }
    }
  ],
  "metadata": {
    "pagination": {
      "results": 1249,
      "pages": 63,
      "current_page": 1
    },
    "facets": {
      "search": {
        "category": [
          {
            "value": "General",
            "count": 1
          }
        ],
        "dimensions": [
          {
            "value": "980x200",
            "count": 1
          }
        ],
        "friendly_type": [
          {
            "value": "Flash",
            "count": 1
          }
        ]
      },
      "available": {
        "category": [
          {
            "value": "General",
            "count": 1
          }
        ],
        "dimensions": [
          {
            "value": "980x200",
            "count": 1
          }
        ],
        "friendly_type": [
          {
            "value": "Flash",
            "count": 1
          }
        ]
      }
    }
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error

 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}


[AFFILIATE] ADVERTISER PROMOTIONS



Controller that handles the requests related to promotions defined by
advertisers




[AFFILIATE] ADVERTISER PROMOTIONS - 01. GET ADVERTISER PROMOTIONS EXPORT





Return CSV with promotions published by advertisers in 2Performant. It respects
all params from GET Advertiser Promotions (see below) except pagination!



https://api.2performant.com/affiliate/advertiser_promotions/export

Berechtigung: affiliate  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type

 * Success-Response:

HTTP/1.1 200 OK
Program,Name,Start Date,End Date,Affiliate Description,Customer Description,Coupon,Landing Page,Benefits & Tools
Campaign 1,Summer Sale,2024-06-01,2024-08-31,Great discounts for affiliates,Exclusive deals for customers,SUMMER2024,https://example.com/summer-sale,Bonuses & Special Banners & Challenges
Campaign 2,Back to School Promo,2024-08-15,2024-09-30,Get ready for big earnings,Special offers for students,BTS2024,https://example.com/back-to-school,Bonuses & Special Product Feed


[AFFILIATE] ADVERTISER PROMOTIONS - 02. GET ADVERTISER PROMOTIONS





List promotions published by advertisers in 2Performant



https://api.2performant.com/affiliate/advertiser_promotions

Berechtigung: affiliate  


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung page optional integer

Page number

Standardwert: 1

perpage optional integer

Resources per page

Standardwert: 20

filter optional object

Filter object that contains any optional fields for filtering

  affrequest_status optional string

Filter by the status of the affiliate's relation with the advertiser from list
[accepted]

  coupon optional boolean

Filter by promotions with or without coupon code.

sort optional object

Sort object that contains any optional fields for sorting

  promotion_start optional string

Sort results asc or desc by promotion_start

  promotion_end optional string

Sort results asc or desc by promotion_end

  campaign_name optional string

Sort results asc or desc by campaign_name


SUCCESS 200

Feld Typ Beschreibung advertiser_promotions array

List of promotion objects

  id integer

Promotion unique id

  name string

Promotion name

  affiliate_description string

Description for affiliate

  customer_description string

Description for customers

  coupon string

Coupon code

  promotion_start string

The time when the promotion starts

  promotion_end string

The time when the promotion ends

  landing_page_link string

The URL of the promotion's landing page

  affiliate_challenge boolean

Does the promotion have an associated challenge?

  affiliate_bonus boolean

Does the program award affiliates special bonuses during this promotion?

  banners boolean

Does the program special banners for this promotion?

  product_feeds boolean

Does the program provide special product feeds with the products that are part
of the promotion?

  linked_feeds array

List of product feeds

    id integer

Product feed unique id

    name string

Product feed name

  shopping_event_id integer

If the promotion is related to a shopping event, the shopping event's unique id

  shopping_event_name string

If the promotion is related to a shopping event, the shopping event's name

  affrequest_status string

The status of the relation between the program and the affiliate

  program object

Data about the affiliate program that created the promotion

    id integer

The unique id of the program that created the promotion

    name string

The name of the program that created the promotion

    slug string

The name of the program that created the promotion

metadata object

Object containing useful information about presented resources

  pagination object

Pagination object

    results integer

Total number of available resources

    pages integer

Total number of available pages

    current_page integer

Index of the current page

 * Success-Response:

HTTP/1.1 200 OK
{
  "advertiser_promotions": [
    {
      "id": 253,
      "name": "Black Friday discounts",
      "affiliate_description": "Products with high discounts for interested customers.",
      "customer_description": "Products with high discounts.",
      "coupon": "9HDSB7MN",
      "promotion_start": "2017-11-13T00:00:00Z",
      "promotion_end": "2017-11-18T00:00:00Z",
      "landing_page_link": "https://example.com/black_friday",
      "affiliate_challenge": true,
      "affiliate_bonus": false,
      "banners": true,
      "product_feeds": true,
      "linked_feeds": [
        {
          "id": 12397,
          "name":"Phones"
        },
        {
          "id": 12398,
          "name":"Tablets"
        }
      ],
      "shopping_event_id": 62,
      "shopping_event_name": "Black Friday 2017",
      "affrequest_status": "accepted",
      "program": {
        "id": 497,
        "name": "Electronics incorporated",
        "slug": "electronics-incorporated",
      }
    }
  ]
},
{
  "facets": {
    "available": {
      "affrequest_status": [
        {
          "value": "all",
          "count": 37
        },
        {
          "value": "accepted",
          "count": 21
        }
      }
    ]
  },
  "pagination": {
    "results": 8,
    "pages": 1,
    "current_page": 1
  }
}


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error

 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}


[AFFILIATE] GOOGLE ADS LINKER TRACKING SETTINGS



Controller that handles the requests related to affiliate google ads linker
tracking settings




[AFFILIATE] GOOGLE ADS LINKER TRACKING SETTINGS - 01. POST TRACKING SETTINGS





Action for generating google ads linker tracking settings



https://api.2performant.com/affiliate/google_ads_linker/tracking_settings

Berechtigung: affiliate_user


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung tracking_info array

Tracking information object

  url string

URL to be promoted

  stats_tags optional string

2Performant stats tags

 * Success-Response:

  HTTP/1.1 201 OK
[
  {
      "final_url": "url1.com",
      "tracking_url": "https://b-event.2performant.com/events/click?ad_type=quicklink&aff_code=e5442c1ed&unique=184f69294&redirect_to={lpurl}&st={gclid}%2Ctag1%2C%20tag2",
      "url_suffix": "2pau=e5442c1ed&2ptt=quicklink&2ptu=184f69294&2pdlst={gclid}&utm_source=2parale&utm_medium=quicklink&utm_campaign=e5442c1ed"
  },
  {
      "final_url": "url2.com",
      "tracking_url": "https://b-event.2performant.com/events/click?ad_type=quicklink&aff_code=e5442c1ed&unique=184f69294&redirect_to={lpurl}&st={gclid}%2Ctag1%2C%20tag2",
      "url_suffix": "2pau=e5442c1ed&2ptt=quicklink&2ptu=184f69294&2pdlst={gclid}&utm_source=2parale&utm_medium=quicklink&utm_campaign=e5442c1ed"
  }
]


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error

 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}


[AFFILIATE] GOOGLE ADS LINKER TRACKING SETTINGS - 01. POST TRACKING SETTINGS





Action for generating google ads linker tracking settings



https://api.2performant.com/affiliate/google_ads_linker/tracking_settings

Berechtigung: affiliate_user


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung tracking_info array

Tracking information object

  url string

URL to be promoted

  stats_tags optional string

2Performant stats tags

 * Success-Response:

  HTTP/1.1 201 OK
[
  {
      "final_url": "url1.com",
      "tracking_url": "https://b-event.2performant.com/events/click?ad_type=quicklink&aff_code=e5442c1ed&unique=184f69294&redirect_to={lpurl}&st={gclid}%2Ctag1%2C%20tag2",
      "url_suffix": "2pau=e5442c1ed&2ptt=quicklink&2ptu=184f69294&2pdlst={gclid}&utm_source=2parale&utm_medium=quicklink&utm_campaign=e5442c1ed"
  },
  {
      "final_url": "url2.com",
      "tracking_url": "https://b-event.2performant.com/events/click?ad_type=quicklink&aff_code=e5442c1ed&unique=184f69294&redirect_to={lpurl}&st={gclid}%2Ctag1%2C%20tag2",
      "url_suffix": "2pau=e5442c1ed&2ptt=quicklink&2ptu=184f69294&2pdlst={gclid}&utm_source=2parale&utm_medium=quicklink&utm_campaign=e5442c1ed"
  }
]


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error

 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}


[AFFILIATE] GOOGLE ADS LINKER TRACKING SETTINGS - 01. POST TRACKING SETTINGS





Action for generating google ads linker tracking settings



https://api.2performant.com/affiliate/google_ads_linker/tracking_settings

Berechtigung: affiliate_user


HEADER

Feld Typ Beschreibung access-token String

Request unique access-token.

client String

Users unique client identifier.

uid String

Users unique identifier.

token-type optional String

Token type


PARAMETER

Feld Typ Beschreibung tracking_info array

Tracking information object

  url string

URL to be promoted

  stats_tags optional string

2Performant stats tags

 * Success-Response:

  HTTP/1.1 201 OK
[
  {
      "final_url": "url1.com",
      "tracking_url": "https://b-event.2performant.com/events/click?ad_type=quicklink&aff_code=e5442c1ed&unique=184f69294&redirect_to={lpurl}&st={gclid}%2Ctag1%2C%20tag2",
      "url_suffix": "2pau=e5442c1ed&2ptt=quicklink&2ptu=184f69294&2pdlst={gclid}&utm_source=2parale&utm_medium=quicklink&utm_campaign=e5442c1ed"
  },
  {
      "final_url": "url2.com",
      "tracking_url": "https://b-event.2performant.com/events/click?ad_type=quicklink&aff_code=e5442c1ed&unique=184f69294&redirect_to={lpurl}&st={gclid}%2Ctag1%2C%20tag2",
      "url_suffix": "2pau=e5442c1ed&2ptt=quicklink&2ptu=184f69294&2pdlst={gclid}&utm_source=2parale&utm_medium=quicklink&utm_campaign=e5442c1ed"
  }
]


400

Feld Typ Beschreibung errors array

Errors array

  title string

Error title


401

Feld Typ Beschreibung errors array

Errors array

error string

Description of the error


409

Feld Typ Beschreibung errors array

Errors array

  title string

Error title

  details string

More details about the error

 * Error-Response:
 * Error-Response:
 * Error-Response:

HTTP/1.1 400 Bad Request
{
  "errors": [
    {
      "title": "Unpermitted parameters"
    }
  ]
}

HTTP/1.1 401 Unauthorized
{
  "errors": [
    "Authorized users only."
  ]
}

HTTP/1.1 409 Conflict
{
  "errors": [
    {
      title: "Latest Terms of Service must be signed",
      details: "Sign the latest Terms of Service"
    }
  ]
}


Erstellt mit apidoc 0.29.0 - 2024-07-17T07:38:32.964Z