Mass credit
Update a mass credit template
Changes a template’s name, description, rules or filters. rules replaces the saved rules as a whole.
Requires manage permission on traders.
curl -X PATCH "https://api.hyperprop.com/platform/v1/organization/balance-adjustments/templates/3f2a1b0c-9d8e-4f7a-8b6c-5d4e3f2a1b0c" \
-H "X-API-Key: hp_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"rules": {"maxCreditPerAccount": 1500}}'
PATCH
/
v1
/
organization
/
balance-adjustments
/
templates
/
{templateId}
Update a mass credit template
curl --request PATCH \
--url https://api.hyperprop.com/platform/v1/organization/balance-adjustments/templates/{templateId} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Platform outage - net loss, capped",
"description": "<string>",
"rules": {
"windowStart": "2026-10-21T13:30:00Z",
"windowEnd": "2026-10-21T14:15:00Z",
"lossBasis": "net",
"includeFees": true,
"maxCreditPerAccount": null,
"minCreditPerAccount": null,
"countTowardDailyPnl": false,
"moveHighWaterMark": false,
"requireFlat": false,
"skipAlreadyCredited": true
}
}
'import requests
url = "https://api.hyperprop.com/platform/v1/organization/balance-adjustments/templates/{templateId}"
payload = {
"name": "Platform outage - net loss, capped",
"description": "<string>",
"rules": {
"windowStart": "2026-10-21T13:30:00Z",
"windowEnd": "2026-10-21T14:15:00Z",
"lossBasis": "net",
"includeFees": True,
"maxCreditPerAccount": None,
"minCreditPerAccount": None,
"countTowardDailyPnl": False,
"moveHighWaterMark": False,
"requireFlat": False,
"skipAlreadyCredited": True
}
}
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({
name: 'Platform outage - net loss, capped',
description: '<string>',
rules: {
windowStart: '2026-10-21T13:30:00Z',
windowEnd: '2026-10-21T14:15:00Z',
lossBasis: 'net',
includeFees: true,
maxCreditPerAccount: null,
minCreditPerAccount: null,
countTowardDailyPnl: false,
moveHighWaterMark: false,
requireFlat: false,
skipAlreadyCredited: true
}
})
};
fetch('https://api.hyperprop.com/platform/v1/organization/balance-adjustments/templates/{templateId}', 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.hyperprop.com/platform/v1/organization/balance-adjustments/templates/{templateId}",
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([
'name' => 'Platform outage - net loss, capped',
'description' => '<string>',
'rules' => [
'windowStart' => '2026-10-21T13:30:00Z',
'windowEnd' => '2026-10-21T14:15:00Z',
'lossBasis' => 'net',
'includeFees' => true,
'maxCreditPerAccount' => null,
'minCreditPerAccount' => null,
'countTowardDailyPnl' => false,
'moveHighWaterMark' => false,
'requireFlat' => false,
'skipAlreadyCredited' => true
]
]),
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.hyperprop.com/platform/v1/organization/balance-adjustments/templates/{templateId}"
payload := strings.NewReader("{\n \"name\": \"Platform outage - net loss, capped\",\n \"description\": \"<string>\",\n \"rules\": {\n \"windowStart\": \"2026-10-21T13:30:00Z\",\n \"windowEnd\": \"2026-10-21T14:15:00Z\",\n \"lossBasis\": \"net\",\n \"includeFees\": true,\n \"maxCreditPerAccount\": null,\n \"minCreditPerAccount\": null,\n \"countTowardDailyPnl\": false,\n \"moveHighWaterMark\": false,\n \"requireFlat\": false,\n \"skipAlreadyCredited\": true\n }\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.hyperprop.com/platform/v1/organization/balance-adjustments/templates/{templateId}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Platform outage - net loss, capped\",\n \"description\": \"<string>\",\n \"rules\": {\n \"windowStart\": \"2026-10-21T13:30:00Z\",\n \"windowEnd\": \"2026-10-21T14:15:00Z\",\n \"lossBasis\": \"net\",\n \"includeFees\": true,\n \"maxCreditPerAccount\": null,\n \"minCreditPerAccount\": null,\n \"countTowardDailyPnl\": false,\n \"moveHighWaterMark\": false,\n \"requireFlat\": false,\n \"skipAlreadyCredited\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/organization/balance-adjustments/templates/{templateId}")
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 \"name\": \"Platform outage - net loss, capped\",\n \"description\": \"<string>\",\n \"rules\": {\n \"windowStart\": \"2026-10-21T13:30:00Z\",\n \"windowEnd\": \"2026-10-21T14:15:00Z\",\n \"lossBasis\": \"net\",\n \"includeFees\": true,\n \"maxCreditPerAccount\": null,\n \"minCreditPerAccount\": null,\n \"countTowardDailyPnl\": false,\n \"moveHighWaterMark\": false,\n \"requireFlat\": false,\n \"skipAlreadyCredited\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "3f2a1b0c-9d8e-4f7a-8b6c-5d4e3f2a1b0c",
"name": "Platform outage - net loss, capped",
"description": "<string>",
"rules": {
"windowStart": "2026-10-21T13:30:00Z",
"windowEnd": "2026-10-21T14:15:00Z",
"lossBasis": "net",
"includeFees": true,
"maxCreditPerAccount": null,
"minCreditPerAccount": null,
"countTowardDailyPnl": false,
"moveHighWaterMark": false,
"requireFlat": false,
"skipAlreadyCredited": true
},
"selection": {
"mode": "all",
"filters": {
"planIds": [
"<string>"
],
"statuses": [
"in_progress"
],
"types": [
"evaluation"
],
"createdFrom": "2023-11-07T05:31:56Z",
"createdTo": "2023-11-07T05:31:56Z"
}
},
"createdBy": "ops@yourfirm.com",
"updatedBy": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}{
"success": false,
"statusCode": 400,
"error": "Bad Request",
"message": "A template window needs both `windowStart` and `windowEnd`",
"code": "VALIDATION_ERROR"
}{
"success": false,
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication required",
"code": "UNAUTHORIZED"
}{
"statusCode": 403,
"error": "Forbidden",
"message": "Insufficient permissions",
"code": "INSUFFICIENT_PERMISSIONS"
}{
"success": false,
"statusCode": 404,
"error": "Not Found",
"message": "Template not found",
"code": "TEMPLATE_NOT_FOUND"
}{
"success": false,
"statusCode": 409,
"error": "Conflict",
"message": "A template named \"Outage\" already exists",
"code": "TEMPLATE_EXISTS"
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}{
"success": false,
"statusCode": 503,
"error": "Error",
"message": "Mass credit is not available yet; nothing was changed",
"code": "FEATURE_NOT_READY"
}Authorizations
Organization API key. Format: "hp_live_{key}". Organization admins manage the key in the dashboard.
Path Parameters
Body
application/json
Required string length:
1 - 80Example:
"Platform outage - net loss, capped"
Maximum string length:
500How the credit is computed. Every field is optional (a template or the defaults fill the rest), except the window, which the request or the template must give.
Show child attributes
Show child attributes
Optional: all or filter (a template cannot hold an account list)
Show child attributes
Show child attributes
⌘I
Update a mass credit template
curl --request PATCH \
--url https://api.hyperprop.com/platform/v1/organization/balance-adjustments/templates/{templateId} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Platform outage - net loss, capped",
"description": "<string>",
"rules": {
"windowStart": "2026-10-21T13:30:00Z",
"windowEnd": "2026-10-21T14:15:00Z",
"lossBasis": "net",
"includeFees": true,
"maxCreditPerAccount": null,
"minCreditPerAccount": null,
"countTowardDailyPnl": false,
"moveHighWaterMark": false,
"requireFlat": false,
"skipAlreadyCredited": true
}
}
'import requests
url = "https://api.hyperprop.com/platform/v1/organization/balance-adjustments/templates/{templateId}"
payload = {
"name": "Platform outage - net loss, capped",
"description": "<string>",
"rules": {
"windowStart": "2026-10-21T13:30:00Z",
"windowEnd": "2026-10-21T14:15:00Z",
"lossBasis": "net",
"includeFees": True,
"maxCreditPerAccount": None,
"minCreditPerAccount": None,
"countTowardDailyPnl": False,
"moveHighWaterMark": False,
"requireFlat": False,
"skipAlreadyCredited": True
}
}
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({
name: 'Platform outage - net loss, capped',
description: '<string>',
rules: {
windowStart: '2026-10-21T13:30:00Z',
windowEnd: '2026-10-21T14:15:00Z',
lossBasis: 'net',
includeFees: true,
maxCreditPerAccount: null,
minCreditPerAccount: null,
countTowardDailyPnl: false,
moveHighWaterMark: false,
requireFlat: false,
skipAlreadyCredited: true
}
})
};
fetch('https://api.hyperprop.com/platform/v1/organization/balance-adjustments/templates/{templateId}', 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.hyperprop.com/platform/v1/organization/balance-adjustments/templates/{templateId}",
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([
'name' => 'Platform outage - net loss, capped',
'description' => '<string>',
'rules' => [
'windowStart' => '2026-10-21T13:30:00Z',
'windowEnd' => '2026-10-21T14:15:00Z',
'lossBasis' => 'net',
'includeFees' => true,
'maxCreditPerAccount' => null,
'minCreditPerAccount' => null,
'countTowardDailyPnl' => false,
'moveHighWaterMark' => false,
'requireFlat' => false,
'skipAlreadyCredited' => true
]
]),
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.hyperprop.com/platform/v1/organization/balance-adjustments/templates/{templateId}"
payload := strings.NewReader("{\n \"name\": \"Platform outage - net loss, capped\",\n \"description\": \"<string>\",\n \"rules\": {\n \"windowStart\": \"2026-10-21T13:30:00Z\",\n \"windowEnd\": \"2026-10-21T14:15:00Z\",\n \"lossBasis\": \"net\",\n \"includeFees\": true,\n \"maxCreditPerAccount\": null,\n \"minCreditPerAccount\": null,\n \"countTowardDailyPnl\": false,\n \"moveHighWaterMark\": false,\n \"requireFlat\": false,\n \"skipAlreadyCredited\": true\n }\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.hyperprop.com/platform/v1/organization/balance-adjustments/templates/{templateId}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Platform outage - net loss, capped\",\n \"description\": \"<string>\",\n \"rules\": {\n \"windowStart\": \"2026-10-21T13:30:00Z\",\n \"windowEnd\": \"2026-10-21T14:15:00Z\",\n \"lossBasis\": \"net\",\n \"includeFees\": true,\n \"maxCreditPerAccount\": null,\n \"minCreditPerAccount\": null,\n \"countTowardDailyPnl\": false,\n \"moveHighWaterMark\": false,\n \"requireFlat\": false,\n \"skipAlreadyCredited\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/organization/balance-adjustments/templates/{templateId}")
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 \"name\": \"Platform outage - net loss, capped\",\n \"description\": \"<string>\",\n \"rules\": {\n \"windowStart\": \"2026-10-21T13:30:00Z\",\n \"windowEnd\": \"2026-10-21T14:15:00Z\",\n \"lossBasis\": \"net\",\n \"includeFees\": true,\n \"maxCreditPerAccount\": null,\n \"minCreditPerAccount\": null,\n \"countTowardDailyPnl\": false,\n \"moveHighWaterMark\": false,\n \"requireFlat\": false,\n \"skipAlreadyCredited\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "3f2a1b0c-9d8e-4f7a-8b6c-5d4e3f2a1b0c",
"name": "Platform outage - net loss, capped",
"description": "<string>",
"rules": {
"windowStart": "2026-10-21T13:30:00Z",
"windowEnd": "2026-10-21T14:15:00Z",
"lossBasis": "net",
"includeFees": true,
"maxCreditPerAccount": null,
"minCreditPerAccount": null,
"countTowardDailyPnl": false,
"moveHighWaterMark": false,
"requireFlat": false,
"skipAlreadyCredited": true
},
"selection": {
"mode": "all",
"filters": {
"planIds": [
"<string>"
],
"statuses": [
"in_progress"
],
"types": [
"evaluation"
],
"createdFrom": "2023-11-07T05:31:56Z",
"createdTo": "2023-11-07T05:31:56Z"
}
},
"createdBy": "ops@yourfirm.com",
"updatedBy": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}{
"success": false,
"statusCode": 400,
"error": "Bad Request",
"message": "A template window needs both `windowStart` and `windowEnd`",
"code": "VALIDATION_ERROR"
}{
"success": false,
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication required",
"code": "UNAUTHORIZED"
}{
"statusCode": 403,
"error": "Forbidden",
"message": "Insufficient permissions",
"code": "INSUFFICIENT_PERMISSIONS"
}{
"success": false,
"statusCode": 404,
"error": "Not Found",
"message": "Template not found",
"code": "TEMPLATE_NOT_FOUND"
}{
"success": false,
"statusCode": 409,
"error": "Conflict",
"message": "A template named \"Outage\" already exists",
"code": "TEMPLATE_EXISTS"
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}{
"success": false,
"statusCode": 503,
"error": "Error",
"message": "Mass credit is not available yet; nothing was changed",
"code": "FEATURE_NOT_READY"
}