Get Affiliate

Example Request

<?php

//Set up API path and method
$base_url = "https://app.paykickstart.com/api/";
$route = "affiliate";
$url = $base_url . $route;
$post = false;

//Create request data string
$data = http_build_query([
    'auth_token' => '3A0CKD9XafhE',
    'campaign_id' => 146,
    'affiliate' => 'affiliate@email.com'
]);

//Execute cURL request
$ch = curl_init();
if ($post) {
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
} else {
    $url = $url . "?" . $data;
}
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
$output = curl_exec($ch);
curl_close($ch);

//Output Response
echo json_decode($output);

Example Response

{
  "affiliate": {
    "id": 1430,
    "parent_id": null,
    "role": 2,
    "first_name": "Paul",
    "last_name": "English",
    "username": "paulenglish@gmail.com",
    "email": "paulenglish@gmail.com",
    "vendor_show_quick_start": 1,
    "affiliate_show_quick_start": 0,
    "is_premium": 1,
    "is_invited_user": 0,
    "basic_purchase_id": 7445,
    "premium_purchase_id": 7446,
    "company": "",
    "skype": "",
    "phone": "",
    "address_1": "",
    "address_2": "",
    "city": "",
    "state": "North Island",
    "country": "New Zealand",
    "zip": "",
    "tax_form_type": null,
    "tax_form": null,
    "pdf_form": null,
    "status": 1,
    "vendor_status": 1,
    "image": "https://s3.amazonaws.com/img.paykickstart.com/vendor_profile_pics/Qoy96K16AH43",
    "image_auto_generated": 0,
    "token": null,
    "subdomain": "yk3xpk3x",
    "auth_token": "8M0VEULQIj2b",
    "paypal_email": "mobilesiteapplications@gmail.com",
    "paypal_secret": "ZXOt3apj3C14RRwOo0G48kQxKDU",
    "paypal_token": "JhazpY6OIlhYEHmd.fjjsraT9kOPc.BdVNyYnIFg7YVN3AJQnFYMyQ",
    "paypal_note": null,
    "ip_address": "219.88.236.189",
    "refresh_permissions": 0,
    "created_at": "2016-10-11 11:24:33",
    "updated_at": "2016-11-23 12:13:03"
  },
  "links": [
    "http://paykstrt.local/2107/1430"
  ]
}

Returns the affiliate’s details and links.

ARGUMENTS

auth_token

The Paykickstart vendor’s API Key. This field is required.


campaign_id

The affiliate’s campaign’s id. This field is required.

affiliate

The affiliate’s email address or ID. This field is required.