cURL
curl --request PUT \
--url https://firstpromoter.com/api/v1/payouts/update \
--header 'X-API-KEY: <api-key>'import requests
url = "https://firstpromoter.com/api/v1/payouts/update"
headers = {"X-API-KEY": "<api-key>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://firstpromoter.com/api/v1/payouts/update', 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://firstpromoter.com/api/v1/payouts/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://firstpromoter.com/api/v1/payouts/update"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://firstpromoter.com/api/v1/payouts/update")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://firstpromoter.com/api/v1/payouts/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 2710287,
"status": "completed",
"amount": 3000,
"date_paid": null,
"due_date": "2024-10-11T00:00:00.000Z",
"unit": "cash",
"created_at": "2024-09-12T14:02:53.135Z",
"has_issues": false,
"reward": null,
"promoter": {
"id": 8262622,
"status": "active",
"cust_id": "",
"email": "[email protected]",
"created_at": "2024-05-27T17:43:38.935Z",
"temp_password": "xsKyiS",
"default_promotion_id": 9441115,
"pref": "w4wfj9q",
"default_ref_id": "testxeak1xz1",
"note": "This is a test promoter. You can use it to test the integration.",
"w8_form_url": null,
"w9_form_url": null,
"parent_promoter_id": null,
"earnings_balance": {
"cash": 23000
},
"current_balance": {
"cash": 23000
},
"paid_balance": null,
"auth_token": "bFahsKx8v9_zL9sPTZCDH8JnQAbTeDpy"
},
"campaign": {
"id": 15161,
"name": "Test new campaign",
"landing_url": "http://testmax.maxwelladapoe1.com/",
"description": "",
"private": false,
"color": "#00bcd4",
"default_webhook_url": "",
"auto_approve_rewards": true,
"auto_approve_promoters": true
}
}{
"error": "Payment not found"
}{
"error": "You need to find the payout by id."
}Payouts
Change payouts status
This call allows you to change the status of the payout. For example, you can mark the payout as completed once it has been paid.
PUT
/
update
cURL
curl --request PUT \
--url https://firstpromoter.com/api/v1/payouts/update \
--header 'X-API-KEY: <api-key>'import requests
url = "https://firstpromoter.com/api/v1/payouts/update"
headers = {"X-API-KEY": "<api-key>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://firstpromoter.com/api/v1/payouts/update', 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://firstpromoter.com/api/v1/payouts/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://firstpromoter.com/api/v1/payouts/update"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://firstpromoter.com/api/v1/payouts/update")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://firstpromoter.com/api/v1/payouts/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 2710287,
"status": "completed",
"amount": 3000,
"date_paid": null,
"due_date": "2024-10-11T00:00:00.000Z",
"unit": "cash",
"created_at": "2024-09-12T14:02:53.135Z",
"has_issues": false,
"reward": null,
"promoter": {
"id": 8262622,
"status": "active",
"cust_id": "",
"email": "[email protected]",
"created_at": "2024-05-27T17:43:38.935Z",
"temp_password": "xsKyiS",
"default_promotion_id": 9441115,
"pref": "w4wfj9q",
"default_ref_id": "testxeak1xz1",
"note": "This is a test promoter. You can use it to test the integration.",
"w8_form_url": null,
"w9_form_url": null,
"parent_promoter_id": null,
"earnings_balance": {
"cash": 23000
},
"current_balance": {
"cash": 23000
},
"paid_balance": null,
"auth_token": "bFahsKx8v9_zL9sPTZCDH8JnQAbTeDpy"
},
"campaign": {
"id": 15161,
"name": "Test new campaign",
"landing_url": "http://testmax.maxwelladapoe1.com/",
"description": "",
"private": false,
"color": "#00bcd4",
"default_webhook_url": "",
"auto_approve_rewards": true,
"auto_approve_promoters": true
}
}{
"error": "Payment not found"
}{
"error": "You need to find the payout by id."
}Authorizations
Query Parameters
ID of payout inside FirstPromoter
The new payout status.
Available options:
pending, processing, completed Response
Success response
Example:
2710287
Example:
"completed"
Example:
3000
Example:
null
Example:
"2024-10-11T00:00:00.000Z"
Example:
"cash"
Example:
"2024-09-12T14:02:53.135Z"
Example:
false
Example:
null
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I