Skip to content

Update a commission formula

PATCH
/api/v1/commission-formulas/{id}
curl --request PATCH \
--url https://example.com/api/v1/commission-formulas/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "start_datetime": "2026-04-15T12:00:00Z", "end_datetime": "2026-04-15T12:00:00Z", "expression": { "type": "literal", "value": { "type": "number", "value": 1 } } }'
id
required
string format: uuid

Commission formula ID

Media type application/json
object
name

Updated name for the commission formula (omit to leave unchanged)

string
nullable
start_datetime

Updated start date-time (omit to leave unchanged)

string format: date-time
nullable
end_datetime

Updated end date-time. Pass null to clear the expiry, omit to leave unchanged.

string format: date-time
nullable
expression
One of: discriminator: type
ExpressionLiteral

Updated expression formula (omit to leave unchanged)

object
type
required
string
Allowed values: literal
value
required
One of: discriminator: type
ValueNumber
object
type
required
string
Allowed values: number
value
required
number

Commission formula updated successfully

Bad request

Media type application/json
object
error_code
required
string
Allowed values: UNAUTHORIZED NOT_FOUND INTERNAL_ERROR BAD_REQUEST FORBIDDEN CONFLICT
message
required
string
Example
{
"error_code": "UNAUTHORIZED",
"message": "Authentication credentials were not provided or are invalid."
}

Unauthorized

Media type application/json
object
error_code
required
string
Allowed values: UNAUTHORIZED NOT_FOUND INTERNAL_ERROR BAD_REQUEST FORBIDDEN CONFLICT
message
required
string
Example
{
"error_code": "UNAUTHORIZED",
"message": "Authentication credentials were not provided or are invalid."
}

Commission formula not found

Media type application/json
object
error_code
required
string
Allowed values: UNAUTHORIZED NOT_FOUND INTERNAL_ERROR BAD_REQUEST FORBIDDEN CONFLICT
message
required
string
Example
{
"error_code": "UNAUTHORIZED",
"message": "Authentication credentials were not provided or are invalid."
}

Internal server error

Media type application/json
object
error_code
required
string
Allowed values: UNAUTHORIZED NOT_FOUND INTERNAL_ERROR BAD_REQUEST FORBIDDEN CONFLICT
message
required
string
Example
{
"error_code": "UNAUTHORIZED",
"message": "Authentication credentials were not provided or are invalid."
}