Payouts
Update Payout
You can only specify properties to update in the properties field as this method will PATCH the existing payout.
Properties not found in the properties field will not be modified.
PATCH
/
v3
/
payouts
/
{id}
Update Payout
curl --request PATCH \
--url https://api.example.com/v3/payouts/{id} \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"id": 123,
"name": "<string>",
"properties": {}
}
'import requests
url = "https://api.example.com/v3/payouts/{id}"
payload = {
"id": 123,
"name": "<string>",
"properties": {}
}
headers = {"Content-Type": "application/json-patch+json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({id: 123, name: '<string>', properties: {}})
};
fetch('https://api.example.com/v3/payouts/{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.example.com/v3/payouts/{id}",
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([
'id' => 123,
'name' => '<string>',
'properties' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+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.example.com/v3/payouts/{id}"
payload := strings.NewReader("{\n \"id\": 123,\n \"name\": \"<string>\",\n \"properties\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json-patch+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.example.com/v3/payouts/{id}")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"id\": 123,\n \"name\": \"<string>\",\n \"properties\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v3/payouts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"id\": 123,\n \"name\": \"<string>\",\n \"properties\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"partnerId": 123,
"partnerName": "<string>",
"name": "<string>",
"uniqueId": "<string>",
"currency": "<string>",
"rewardType": "Unknown",
"fromDate": "2023-11-07T05:31:56Z",
"toDate": "2023-11-07T05:31:56Z",
"amount": {
"value": 123,
"currency": "<string>"
},
"taxAmount": {
"value": 123,
"currency": "<string>"
},
"grossAmount": {
"value": 123,
"currency": "<string>"
},
"rewardCount": 123,
"creationDate": "2023-11-07T05:31:56Z",
"paidDate": "2023-11-07T05:31:56Z",
"acceptedDate": "2023-11-07T05:31:56Z",
"validatedDate": "2023-11-07T05:31:56Z",
"paidByUserId": 123,
"acceptedByUserId": 123,
"validatedByUserId": 123,
"invalidatedDate": "2023-11-07T05:31:56Z",
"invalidatedByUserId": 123,
"status": "Unknown",
"source": "Unknown",
"shouldValidateRewards": true,
"shouldAttachInvoice": true,
"isSelfInvoice": true,
"properties": {},
"rewards": [
{
"id": 123,
"uniqueId": "<string>",
"partnerId": 123,
"dealId": 123,
"status": "Unknown",
"creationDate": "2023-11-07T05:31:56Z",
"amount": {
"value": 123,
"currency": "<string>"
},
"payoutId": 123,
"comment": "<string>",
"rewardType": "Unknown",
"properties": {}
}
]
}{
"errorCode": "Transactions.InvalidCustomerIdentifier",
"errorMessage": "You must specify one customer identifier"
}Path Parameters
The ID of the payout to update.
Body
application/json-patch+jsonapplication/jsontext/jsonapplication/*+json
Response
Payout updated
Available options:
Unknown, Cash, Coupon, Credit, GiftCard Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
Unknown, Draft, Pending, Ready, Paid Available options:
Unknown, Manual, Automatic Show child attributes
Show child attributes
Show child attributes
Show child attributes
Update Payout
curl --request PATCH \
--url https://api.example.com/v3/payouts/{id} \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"id": 123,
"name": "<string>",
"properties": {}
}
'import requests
url = "https://api.example.com/v3/payouts/{id}"
payload = {
"id": 123,
"name": "<string>",
"properties": {}
}
headers = {"Content-Type": "application/json-patch+json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({id: 123, name: '<string>', properties: {}})
};
fetch('https://api.example.com/v3/payouts/{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.example.com/v3/payouts/{id}",
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([
'id' => 123,
'name' => '<string>',
'properties' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+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.example.com/v3/payouts/{id}"
payload := strings.NewReader("{\n \"id\": 123,\n \"name\": \"<string>\",\n \"properties\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json-patch+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.example.com/v3/payouts/{id}")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"id\": 123,\n \"name\": \"<string>\",\n \"properties\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v3/payouts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"id\": 123,\n \"name\": \"<string>\",\n \"properties\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"partnerId": 123,
"partnerName": "<string>",
"name": "<string>",
"uniqueId": "<string>",
"currency": "<string>",
"rewardType": "Unknown",
"fromDate": "2023-11-07T05:31:56Z",
"toDate": "2023-11-07T05:31:56Z",
"amount": {
"value": 123,
"currency": "<string>"
},
"taxAmount": {
"value": 123,
"currency": "<string>"
},
"grossAmount": {
"value": 123,
"currency": "<string>"
},
"rewardCount": 123,
"creationDate": "2023-11-07T05:31:56Z",
"paidDate": "2023-11-07T05:31:56Z",
"acceptedDate": "2023-11-07T05:31:56Z",
"validatedDate": "2023-11-07T05:31:56Z",
"paidByUserId": 123,
"acceptedByUserId": 123,
"validatedByUserId": 123,
"invalidatedDate": "2023-11-07T05:31:56Z",
"invalidatedByUserId": 123,
"status": "Unknown",
"source": "Unknown",
"shouldValidateRewards": true,
"shouldAttachInvoice": true,
"isSelfInvoice": true,
"properties": {},
"rewards": [
{
"id": 123,
"uniqueId": "<string>",
"partnerId": 123,
"dealId": 123,
"status": "Unknown",
"creationDate": "2023-11-07T05:31:56Z",
"amount": {
"value": 123,
"currency": "<string>"
},
"payoutId": 123,
"comment": "<string>",
"rewardType": "Unknown",
"properties": {}
}
]
}{
"errorCode": "Transactions.InvalidCustomerIdentifier",
"errorMessage": "You must specify one customer identifier"
}