Skip to content

Create a commission formula

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

ID of the partner this formula belongs to

string format: uuid
workspace_id
required

ID of the workspace this formula belongs to

string format: uuid
schema_id
required

ID of the attribution schema this formula is associated with

string format: uuid
name
required

Name of the commission formula

string
description

Optional description of the commission formula

string
nullable
start_datetime
required

Date and time from which this formula is active

string format: date-time
end_datetime

Date and time until which this formula is active

string format: date-time
nullable
currency
required

ISO 4217 currency code (e.g. EUR, USD)

string
expression
required
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 created successfully

Media type application/json
object
id
required

ID of the newly created commission formula

string format: uuid
Example generated
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

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."
}

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."
}