curl --request PATCH \
--url https://api.getoneprofile.ai/affiliate/settings/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"paypal_email": "jsmith@example.com",
"vanity_code": "<string>"
}
'import requests
url = "https://api.getoneprofile.ai/affiliate/settings/"
payload = {
"paypal_email": "jsmith@example.com",
"vanity_code": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({paypal_email: 'jsmith@example.com', vanity_code: '<string>'})
};
fetch('https://api.getoneprofile.ai/affiliate/settings/', 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.getoneprofile.ai/affiliate/settings/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'paypal_email' => 'jsmith@example.com',
'vanity_code' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.getoneprofile.ai/affiliate/settings/"
payload := strings.NewReader("{\n \"paypal_email\": \"jsmith@example.com\",\n \"vanity_code\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.patch("https://api.getoneprofile.ai/affiliate/settings/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"paypal_email\": \"jsmith@example.com\",\n \"vanity_code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/affiliate/settings/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"paypal_email\": \"jsmith@example.com\",\n \"vanity_code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"paypal_email": "<string>",
"paypal_email_confirmed_at": "2023-11-07T05:31:56Z",
"vanity_code": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Update the affiliate settings
Set the PayPal account payouts are sent to, claim the affiliate’s one custom code, or both in one call. Send only what changes. Every change of the payout email restarts the destination hold: a payout will not use an email set within the last few days. The custom code is the name a creator says out loud instead of a random string: first come, first served across the whole program, claimed once and public from then on. When the code is refused, the email is not saved either. Requires a signed-in user, because this is where the money goes and the code is the affiliate’s public name, so an API key is not enough.
curl --request PATCH \
--url https://api.getoneprofile.ai/affiliate/settings/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"paypal_email": "jsmith@example.com",
"vanity_code": "<string>"
}
'import requests
url = "https://api.getoneprofile.ai/affiliate/settings/"
payload = {
"paypal_email": "jsmith@example.com",
"vanity_code": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({paypal_email: 'jsmith@example.com', vanity_code: '<string>'})
};
fetch('https://api.getoneprofile.ai/affiliate/settings/', 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.getoneprofile.ai/affiliate/settings/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'paypal_email' => 'jsmith@example.com',
'vanity_code' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.getoneprofile.ai/affiliate/settings/"
payload := strings.NewReader("{\n \"paypal_email\": \"jsmith@example.com\",\n \"vanity_code\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.patch("https://api.getoneprofile.ai/affiliate/settings/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"paypal_email\": \"jsmith@example.com\",\n \"vanity_code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/affiliate/settings/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"paypal_email\": \"jsmith@example.com\",\n \"vanity_code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"paypal_email": "<string>",
"paypal_email_confirmed_at": "2023-11-07T05:31:56Z",
"vanity_code": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Body
The settings an affiliate changes. Send the ones to change; at least one.
The PayPal account payouts are sent to. Setting a different address restarts the destination hold.
320The affiliate's one custom code: 4-32 lowercase letters, digits or hyphens. It is claimed once and cannot be changed after.
4 - 32Response
Successful Response
What the affiliate has set for themselves: where payouts go and the custom code.
Was this page helpful?