Update an affiliate
curl --request PUT \
--url https://api.referralful.com/v1/affiliates/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"paypal_email": "<string>",
"wise_email": "<string>",
"state": "<string>"
}
'import requests
url = "https://api.referralful.com/v1/affiliates/{id}"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"paypal_email": "<string>",
"wise_email": "<string>",
"state": "<string>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: '<string>',
last_name: '<string>',
email: '<string>',
paypal_email: '<string>',
wise_email: '<string>',
state: '<string>'
})
};
fetch('https://api.referralful.com/v1/affiliates/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.referralful.com/v1/affiliates/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => '<string>',
'last_name' => '<string>',
'email' => '<string>',
'paypal_email' => '<string>',
'wise_email' => '<string>',
'state' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.referralful.com/v1/affiliates/{id}"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"paypal_email\": \"<string>\",\n \"wise_email\": \"<string>\",\n \"state\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.referralful.com/v1/affiliates/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"paypal_email\": \"<string>\",\n \"wise_email\": \"<string>\",\n \"state\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.referralful.com/v1/affiliates/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"paypal_email\": \"<string>\",\n \"wise_email\": \"<string>\",\n \"state\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "affiliate",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"paypal_email": "<string>",
"wise_email": "<string>",
"state": "<string>",
"stripe_customer_id": "<string>",
"confirmed_at": "2023-11-07T05:31:56Z",
"visitors": 123,
"leads": 123,
"conversions": 123,
"campaign": {
"id": "<string>",
"object": "campaign",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"url": "<string>",
"private": true,
"commission_percent": 123,
"commission_amount_cents": 123,
"commission_currency": "<string>",
"minimum_payout_cents": 123,
"days_before_referrals_expire": 123,
"days_before_commissions_are_due": 123,
"max_commissions": 123,
"max_commission_period_in_months": 123
},
"links": [
{
"id": "<string>",
"object": "affiliate_link",
"url": "<string>",
"token": "<string>",
"visitors": 123,
"leads": 123,
"conversions": 123,
"affiliate_id": "<string>"
}
],
"coupon": {
"id": "<string>",
"object": "affiliate_coupon",
"token": "<string>",
"affiliate_id": "<string>"
}
}API Reference
Update an affiliate
PUT
/
affiliates
/
{id}
Update an affiliate
curl --request PUT \
--url https://api.referralful.com/v1/affiliates/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"paypal_email": "<string>",
"wise_email": "<string>",
"state": "<string>"
}
'import requests
url = "https://api.referralful.com/v1/affiliates/{id}"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"paypal_email": "<string>",
"wise_email": "<string>",
"state": "<string>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: '<string>',
last_name: '<string>',
email: '<string>',
paypal_email: '<string>',
wise_email: '<string>',
state: '<string>'
})
};
fetch('https://api.referralful.com/v1/affiliates/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.referralful.com/v1/affiliates/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => '<string>',
'last_name' => '<string>',
'email' => '<string>',
'paypal_email' => '<string>',
'wise_email' => '<string>',
'state' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.referralful.com/v1/affiliates/{id}"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"paypal_email\": \"<string>\",\n \"wise_email\": \"<string>\",\n \"state\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.referralful.com/v1/affiliates/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"paypal_email\": \"<string>\",\n \"wise_email\": \"<string>\",\n \"state\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.referralful.com/v1/affiliates/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"paypal_email\": \"<string>\",\n \"wise_email\": \"<string>\",\n \"state\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "affiliate",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"paypal_email": "<string>",
"wise_email": "<string>",
"state": "<string>",
"stripe_customer_id": "<string>",
"confirmed_at": "2023-11-07T05:31:56Z",
"visitors": 123,
"leads": 123,
"conversions": 123,
"campaign": {
"id": "<string>",
"object": "campaign",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"url": "<string>",
"private": true,
"commission_percent": 123,
"commission_amount_cents": 123,
"commission_currency": "<string>",
"minimum_payout_cents": 123,
"days_before_referrals_expire": 123,
"days_before_commissions_are_due": 123,
"max_commissions": 123,
"max_commission_period_in_months": 123
},
"links": [
{
"id": "<string>",
"object": "affiliate_link",
"url": "<string>",
"token": "<string>",
"visitors": 123,
"leads": 123,
"conversions": 123,
"affiliate_id": "<string>"
}
],
"coupon": {
"id": "<string>",
"object": "affiliate_coupon",
"token": "<string>",
"affiliate_id": "<string>"
}
}Authorizations
Use your API secret as the username, with an empty password.
Path Parameters
Body
application/json
Response
200 - application/json
OK
Example:
"affiliate"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
