curl --request PUT \
--url https://api.journeybee.io/v1/deals/{uuid}/commission \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"calculation": {
"entries": [
{
"payment_stage_id": 123,
"calculation": {
"value": "<string>",
"scalingConfig": {
"customFieldId": 123,
"tiers": [
{
"optionId": 123,
"value": 123
}
]
},
"number_of_occurrences": 123,
"periodRates": {
"enabled": true,
"periods": [
{
"periodNumber": 123,
"startOccurrence": 123,
"endOccurrence": 123,
"value": 123
}
]
}
},
"override": {
"amount": 1,
"currency_code": "<string>",
"note": "<string>",
"document_url": "<string>",
"document_asset_uuid": "<string>"
}
}
]
}
}
'import requests
url = "https://api.journeybee.io/v1/deals/{uuid}/commission"
payload = { "calculation": { "entries": [
{
"payment_stage_id": 123,
"calculation": {
"value": "<string>",
"scalingConfig": {
"customFieldId": 123,
"tiers": [
{
"optionId": 123,
"value": 123
}
]
},
"number_of_occurrences": 123,
"periodRates": {
"enabled": True,
"periods": [
{
"periodNumber": 123,
"startOccurrence": 123,
"endOccurrence": 123,
"value": 123
}
]
}
},
"override": {
"amount": 1,
"currency_code": "<string>",
"note": "<string>",
"document_url": "<string>",
"document_asset_uuid": "<string>"
}
}
] } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
calculation: {
entries: [
{
payment_stage_id: 123,
calculation: {
value: '<string>',
scalingConfig: {customFieldId: 123, tiers: [{optionId: 123, value: 123}]},
number_of_occurrences: 123,
periodRates: {
enabled: true,
periods: [{periodNumber: 123, startOccurrence: 123, endOccurrence: 123, value: 123}]
}
},
override: {
amount: 1,
currency_code: '<string>',
note: '<string>',
document_url: '<string>',
document_asset_uuid: '<string>'
}
}
]
}
})
};
fetch('https://api.journeybee.io/v1/deals/{uuid}/commission', 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.journeybee.io/v1/deals/{uuid}/commission",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'calculation' => [
'entries' => [
[
'payment_stage_id' => 123,
'calculation' => [
'value' => '<string>',
'scalingConfig' => [
'customFieldId' => 123,
'tiers' => [
[
'optionId' => 123,
'value' => 123
]
]
],
'number_of_occurrences' => 123,
'periodRates' => [
'enabled' => true,
'periods' => [
[
'periodNumber' => 123,
'startOccurrence' => 123,
'endOccurrence' => 123,
'value' => 123
]
]
]
],
'override' => [
'amount' => 1,
'currency_code' => '<string>',
'note' => '<string>',
'document_url' => '<string>',
'document_asset_uuid' => '<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.journeybee.io/v1/deals/{uuid}/commission"
payload := strings.NewReader("{\n \"calculation\": {\n \"entries\": [\n {\n \"payment_stage_id\": 123,\n \"calculation\": {\n \"value\": \"<string>\",\n \"scalingConfig\": {\n \"customFieldId\": 123,\n \"tiers\": [\n {\n \"optionId\": 123,\n \"value\": 123\n }\n ]\n },\n \"number_of_occurrences\": 123,\n \"periodRates\": {\n \"enabled\": true,\n \"periods\": [\n {\n \"periodNumber\": 123,\n \"startOccurrence\": 123,\n \"endOccurrence\": 123,\n \"value\": 123\n }\n ]\n }\n },\n \"override\": {\n \"amount\": 1,\n \"currency_code\": \"<string>\",\n \"note\": \"<string>\",\n \"document_url\": \"<string>\",\n \"document_asset_uuid\": \"<string>\"\n }\n }\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://api.journeybee.io/v1/deals/{uuid}/commission")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"calculation\": {\n \"entries\": [\n {\n \"payment_stage_id\": 123,\n \"calculation\": {\n \"value\": \"<string>\",\n \"scalingConfig\": {\n \"customFieldId\": 123,\n \"tiers\": [\n {\n \"optionId\": 123,\n \"value\": 123\n }\n ]\n },\n \"number_of_occurrences\": 123,\n \"periodRates\": {\n \"enabled\": true,\n \"periods\": [\n {\n \"periodNumber\": 123,\n \"startOccurrence\": 123,\n \"endOccurrence\": 123,\n \"value\": 123\n }\n ]\n }\n },\n \"override\": {\n \"amount\": 1,\n \"currency_code\": \"<string>\",\n \"note\": \"<string>\",\n \"document_url\": \"<string>\",\n \"document_asset_uuid\": \"<string>\"\n }\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.journeybee.io/v1/deals/{uuid}/commission")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"calculation\": {\n \"entries\": [\n {\n \"payment_stage_id\": 123,\n \"calculation\": {\n \"value\": \"<string>\",\n \"scalingConfig\": {\n \"customFieldId\": 123,\n \"tiers\": [\n {\n \"optionId\": 123,\n \"value\": 123\n }\n ]\n },\n \"number_of_occurrences\": 123,\n \"periodRates\": {\n \"enabled\": true,\n \"periods\": [\n {\n \"periodNumber\": 123,\n \"startOccurrence\": 123,\n \"endOccurrence\": 123,\n \"value\": 123\n }\n ]\n }\n },\n \"override\": {\n \"amount\": 1,\n \"currency_code\": \"<string>\",\n \"note\": \"<string>\",\n \"document_url\": \"<string>\",\n \"document_asset_uuid\": \"<string>\"\n }\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"calculation": {
"entries": [
{
"payment_stage_id": 123,
"calculation": {
"value": "<string>",
"scalingConfig": {
"customFieldId": 123,
"tiers": [
{
"optionId": 123,
"value": 123
}
]
},
"number_of_occurrences": 123,
"periodRates": {
"enabled": true,
"periods": [
{
"periodNumber": 123,
"startOccurrence": 123,
"endOccurrence": 123,
"value": 123,
"scalingConfig": {
"customFieldId": 123,
"tiers": [
{
"optionId": 123,
"value": 123
}
]
}
}
]
},
"split": {
"oneOff": {
"value": "<string>",
"scalingConfig": {
"customFieldId": 123,
"tiers": [
{
"optionId": 123,
"value": 123
}
]
},
"number_of_occurrences": 123,
"periodRates": {
"enabled": true,
"periods": [
{
"periodNumber": 123,
"startOccurrence": 123,
"endOccurrence": 123,
"value": 123,
"scalingConfig": {
"customFieldId": 123,
"tiers": [
{
"optionId": 123,
"value": 123
}
]
}
}
]
}
},
"recurring": {
"value": "<string>",
"scalingConfig": {
"customFieldId": 123,
"tiers": [
{
"optionId": 123,
"value": 123
}
]
},
"number_of_occurrences": 123,
"periodRates": {
"enabled": true,
"periods": [
{
"periodNumber": 123,
"startOccurrence": 123,
"endOccurrence": 123,
"value": 123,
"scalingConfig": {
"customFieldId": 123,
"tiers": [
{
"optionId": 123,
"value": 123
}
]
}
}
]
}
}
}
},
"override": {
"amount": 123,
"currency": {
"uuid": "<string>",
"code": "<string>"
},
"note": "<string>",
"document": {
"uuid": "<string>",
"file_url": "<string>",
"file_name": "<string>",
"mime_type": "<string>"
}
}
}
]
}
}Set the commission calculation for a deal
Override the commission calculation on a deal. This replaces the entire calculation structure. Use this to manually adjust commissions after they’ve been auto-applied from a commission rule. The structure matches the commission rule format — see POST /v1/commissions for the full calculation schema documentation.
Each entry may carry a manual override to set a fixed commission instead of the calculation: provide amount (whole currency units), currency_code, and optionally a markdown note and a document_url (pdf/csv/excel, fetched into Journeybee’s CDN) or document_asset_uuid. Manual overrides require the company’s commission-overrides setting to be enabled (otherwise 403). Setting the commission recalculates the deal’s pending payment records.
curl --request PUT \
--url https://api.journeybee.io/v1/deals/{uuid}/commission \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"calculation": {
"entries": [
{
"payment_stage_id": 123,
"calculation": {
"value": "<string>",
"scalingConfig": {
"customFieldId": 123,
"tiers": [
{
"optionId": 123,
"value": 123
}
]
},
"number_of_occurrences": 123,
"periodRates": {
"enabled": true,
"periods": [
{
"periodNumber": 123,
"startOccurrence": 123,
"endOccurrence": 123,
"value": 123
}
]
}
},
"override": {
"amount": 1,
"currency_code": "<string>",
"note": "<string>",
"document_url": "<string>",
"document_asset_uuid": "<string>"
}
}
]
}
}
'import requests
url = "https://api.journeybee.io/v1/deals/{uuid}/commission"
payload = { "calculation": { "entries": [
{
"payment_stage_id": 123,
"calculation": {
"value": "<string>",
"scalingConfig": {
"customFieldId": 123,
"tiers": [
{
"optionId": 123,
"value": 123
}
]
},
"number_of_occurrences": 123,
"periodRates": {
"enabled": True,
"periods": [
{
"periodNumber": 123,
"startOccurrence": 123,
"endOccurrence": 123,
"value": 123
}
]
}
},
"override": {
"amount": 1,
"currency_code": "<string>",
"note": "<string>",
"document_url": "<string>",
"document_asset_uuid": "<string>"
}
}
] } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
calculation: {
entries: [
{
payment_stage_id: 123,
calculation: {
value: '<string>',
scalingConfig: {customFieldId: 123, tiers: [{optionId: 123, value: 123}]},
number_of_occurrences: 123,
periodRates: {
enabled: true,
periods: [{periodNumber: 123, startOccurrence: 123, endOccurrence: 123, value: 123}]
}
},
override: {
amount: 1,
currency_code: '<string>',
note: '<string>',
document_url: '<string>',
document_asset_uuid: '<string>'
}
}
]
}
})
};
fetch('https://api.journeybee.io/v1/deals/{uuid}/commission', 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.journeybee.io/v1/deals/{uuid}/commission",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'calculation' => [
'entries' => [
[
'payment_stage_id' => 123,
'calculation' => [
'value' => '<string>',
'scalingConfig' => [
'customFieldId' => 123,
'tiers' => [
[
'optionId' => 123,
'value' => 123
]
]
],
'number_of_occurrences' => 123,
'periodRates' => [
'enabled' => true,
'periods' => [
[
'periodNumber' => 123,
'startOccurrence' => 123,
'endOccurrence' => 123,
'value' => 123
]
]
]
],
'override' => [
'amount' => 1,
'currency_code' => '<string>',
'note' => '<string>',
'document_url' => '<string>',
'document_asset_uuid' => '<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.journeybee.io/v1/deals/{uuid}/commission"
payload := strings.NewReader("{\n \"calculation\": {\n \"entries\": [\n {\n \"payment_stage_id\": 123,\n \"calculation\": {\n \"value\": \"<string>\",\n \"scalingConfig\": {\n \"customFieldId\": 123,\n \"tiers\": [\n {\n \"optionId\": 123,\n \"value\": 123\n }\n ]\n },\n \"number_of_occurrences\": 123,\n \"periodRates\": {\n \"enabled\": true,\n \"periods\": [\n {\n \"periodNumber\": 123,\n \"startOccurrence\": 123,\n \"endOccurrence\": 123,\n \"value\": 123\n }\n ]\n }\n },\n \"override\": {\n \"amount\": 1,\n \"currency_code\": \"<string>\",\n \"note\": \"<string>\",\n \"document_url\": \"<string>\",\n \"document_asset_uuid\": \"<string>\"\n }\n }\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://api.journeybee.io/v1/deals/{uuid}/commission")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"calculation\": {\n \"entries\": [\n {\n \"payment_stage_id\": 123,\n \"calculation\": {\n \"value\": \"<string>\",\n \"scalingConfig\": {\n \"customFieldId\": 123,\n \"tiers\": [\n {\n \"optionId\": 123,\n \"value\": 123\n }\n ]\n },\n \"number_of_occurrences\": 123,\n \"periodRates\": {\n \"enabled\": true,\n \"periods\": [\n {\n \"periodNumber\": 123,\n \"startOccurrence\": 123,\n \"endOccurrence\": 123,\n \"value\": 123\n }\n ]\n }\n },\n \"override\": {\n \"amount\": 1,\n \"currency_code\": \"<string>\",\n \"note\": \"<string>\",\n \"document_url\": \"<string>\",\n \"document_asset_uuid\": \"<string>\"\n }\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.journeybee.io/v1/deals/{uuid}/commission")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"calculation\": {\n \"entries\": [\n {\n \"payment_stage_id\": 123,\n \"calculation\": {\n \"value\": \"<string>\",\n \"scalingConfig\": {\n \"customFieldId\": 123,\n \"tiers\": [\n {\n \"optionId\": 123,\n \"value\": 123\n }\n ]\n },\n \"number_of_occurrences\": 123,\n \"periodRates\": {\n \"enabled\": true,\n \"periods\": [\n {\n \"periodNumber\": 123,\n \"startOccurrence\": 123,\n \"endOccurrence\": 123,\n \"value\": 123\n }\n ]\n }\n },\n \"override\": {\n \"amount\": 1,\n \"currency_code\": \"<string>\",\n \"note\": \"<string>\",\n \"document_url\": \"<string>\",\n \"document_asset_uuid\": \"<string>\"\n }\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"calculation": {
"entries": [
{
"payment_stage_id": 123,
"calculation": {
"value": "<string>",
"scalingConfig": {
"customFieldId": 123,
"tiers": [
{
"optionId": 123,
"value": 123
}
]
},
"number_of_occurrences": 123,
"periodRates": {
"enabled": true,
"periods": [
{
"periodNumber": 123,
"startOccurrence": 123,
"endOccurrence": 123,
"value": 123,
"scalingConfig": {
"customFieldId": 123,
"tiers": [
{
"optionId": 123,
"value": 123
}
]
}
}
]
},
"split": {
"oneOff": {
"value": "<string>",
"scalingConfig": {
"customFieldId": 123,
"tiers": [
{
"optionId": 123,
"value": 123
}
]
},
"number_of_occurrences": 123,
"periodRates": {
"enabled": true,
"periods": [
{
"periodNumber": 123,
"startOccurrence": 123,
"endOccurrence": 123,
"value": 123,
"scalingConfig": {
"customFieldId": 123,
"tiers": [
{
"optionId": 123,
"value": 123
}
]
}
}
]
}
},
"recurring": {
"value": "<string>",
"scalingConfig": {
"customFieldId": 123,
"tiers": [
{
"optionId": 123,
"value": 123
}
]
},
"number_of_occurrences": 123,
"periodRates": {
"enabled": true,
"periods": [
{
"periodNumber": 123,
"startOccurrence": 123,
"endOccurrence": 123,
"value": 123,
"scalingConfig": {
"customFieldId": 123,
"tiers": [
{
"optionId": 123,
"value": 123
}
]
}
}
]
}
}
}
},
"override": {
"amount": 123,
"currency": {
"uuid": "<string>",
"code": "<string>"
},
"note": "<string>",
"document": {
"uuid": "<string>",
"file_url": "<string>",
"file_name": "<string>",
"mime_type": "<string>"
}
}
}
]
}
}Authorizations
API key authentication. Use "Bearer <api_key>" or "Api-Key <api_key>".
Path Parameters
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Body
Deal commission calculation. Entries may carry a manual override.
Show child attributes
Show child attributes
Response
Default Response
Show child attributes
Show child attributes