Update a commission formula
PATCH
/api/v1/commission-formulas/{id}
const url = 'https://example.com/api/v1/commission-formulas/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","start_datetime":"2026-04-15T12:00:00Z","end_datetime":"2026-04-15T12:00:00Z","expression":{"type":"literal","value":{"type":"number","value":1}}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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 } } }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string format: uuid
Commission formula ID
Request Body required
Section titled “Request Body required ” Media type application/json
object
name
Updated name for the commission formula (omit to leave unchanged)
string
start_datetime
Updated start date-time (omit to leave unchanged)
string format: date-time
end_datetime
Updated end date-time. Pass null to clear the expiry, omit to leave unchanged.
string format: date-time
expression
One of: discriminator: type
ExpressionLiteral
Updated expression formula (omit to leave unchanged)
object
type
required
string
value
required
One of: discriminator: type
ValueNumber
object
type
required
string
value
required
number
ValueString
object
type
required
string
value
required
string
ValueBool
object
type
required
string
value
required
boolean
ExpressionAttribute
Updated expression formula (omit to leave unchanged)
object
type
required
string
name
required
Name of the attribution attribute
string
ExpressionProperty
Updated expression formula (omit to leave unchanged)
object
type
required
string
name
required
Name of the property key in the attribution’s dynamic property bag
string
ExpressionBinaryOp
Updated expression formula (omit to leave unchanged)
object
type
required
string
left
required
object recursive
op
required
One of: discriminator: type
OperatorAdd
object
type
required
string
OperatorSubtract
object
type
required
string
OperatorMultiply
object
type
required
string
OperatorDivide
object
type
required
string
OperatorEqual
object
type
required
string
OperatorNotEqual
object
type
required
string
OperatorGreaterThan
object
type
required
string
OperatorLessThan
object
type
required
string
OperatorAnd
object
type
required
string
OperatorOr
object
type
required
string
right
required
object recursive
ExpressionUnaryOp
Updated expression formula (omit to leave unchanged)
object
type
required
string
op
required
One of: discriminator: type
UnaryOperatorNot
object
type
required
string
UnaryOperatorNegate
object
type
required
string
expr
required
object recursive
ExpressionIf
Updated expression formula (omit to leave unchanged)
object
type
required
string
condition
required
object recursive
then_branch
required
object recursive
else_branch
required
object recursive
Responses
Section titled “ Responses ”Commission formula updated successfully
Bad request
Media type application/json
object
error_code
required
string
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
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
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
message
required
string
Example
{ "error_code": "UNAUTHORIZED", "message": "Authentication credentials were not provided or are invalid."}