Update account details
curl --request PATCH \
--url https://{host}/bonus/v1/accounts/{accountId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"isActive": true,
"isAllowedToSpend": true,
"expireBalance": true
}
'import requests
url = "https://{host}/bonus/v1/accounts/{accountId}"
payload = {
"isActive": True,
"isAllowedToSpend": True,
"expireBalance": True
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({isActive: true, isAllowedToSpend: true, expireBalance: true})
};
fetch('https://{host}/bonus/v1/accounts/{accountId}', 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://{host}/bonus/v1/accounts/{accountId}",
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([
'isActive' => true,
'isAllowedToSpend' => true,
'expireBalance' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://{host}/bonus/v1/accounts/{accountId}"
payload := strings.NewReader("{\n \"isActive\": true,\n \"isAllowedToSpend\": true,\n \"expireBalance\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<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://{host}/bonus/v1/accounts/{accountId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"isActive\": true,\n \"isAllowedToSpend\": true,\n \"expireBalance\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/bonus/v1/accounts/{accountId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"isActive\": true,\n \"isAllowedToSpend\": true,\n \"expireBalance\": true\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"message": "<string>",
"details": null
}{
"name": "<string>",
"message": "<string>",
"details": null
}Update account details
Partially updates the account details. If new account property value is not specified, existing value will be used.
PATCH
/
v1
/
accounts
/
{accountId}
Update account details
curl --request PATCH \
--url https://{host}/bonus/v1/accounts/{accountId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"isActive": true,
"isAllowedToSpend": true,
"expireBalance": true
}
'import requests
url = "https://{host}/bonus/v1/accounts/{accountId}"
payload = {
"isActive": True,
"isAllowedToSpend": True,
"expireBalance": True
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({isActive: true, isAllowedToSpend: true, expireBalance: true})
};
fetch('https://{host}/bonus/v1/accounts/{accountId}', 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://{host}/bonus/v1/accounts/{accountId}",
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([
'isActive' => true,
'isAllowedToSpend' => true,
'expireBalance' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://{host}/bonus/v1/accounts/{accountId}"
payload := strings.NewReader("{\n \"isActive\": true,\n \"isAllowedToSpend\": true,\n \"expireBalance\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<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://{host}/bonus/v1/accounts/{accountId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"isActive\": true,\n \"isAllowedToSpend\": true,\n \"expireBalance\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/bonus/v1/accounts/{accountId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"isActive\": true,\n \"isAllowedToSpend\": true,\n \"expireBalance\": true\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"message": "<string>",
"details": null
}{
"name": "<string>",
"message": "<string>",
"details": null
}Authorizations
JWT Authorization header using the Bearer scheme. Example: "Authorization: Bearer {token}"
Path Parameters
Id of account to update
Body
application/jsontext/jsonapplication/*+json
New values for account properties
Changes whether the account is active. Null will leave the current value unchanged.
Changes whether the account is allowed to spend funds. Null will leave the current value unchanged.
Cancels all pending transactions and expire available balance. False will do nothing
Response
OK
Last modified on August 10, 2026
⌘I