Skip to content

List commission formulas

GET
/api/v1/commission-formulas
curl --request GET \
--url 'https://example.com/api/v1/commission-formulas?page=1&per_page=10' \
--header 'Authorization: Bearer <token>'
ids
Array<string>

Filter by commission formula IDs

customer_ids
Array<string>

Filter by customer IDs

partner_ids
Array<string>

Filter by partner IDs

workspace_ids
Array<string>

Filter by workspace IDs

active_at
string format: date-time

Filter formulas active at the given ISO 8601 date-time

page
integer
default: 1 >= 1

Page number for pagination (default: 1)

per_page
integer
default: 10 >= 1 <= 100

Number of items per page for pagination (default: 10)

OK

Media type application/json
object
commission_formulas
required
Array<object>
object
id
required

Unique identifier for the commission formula

string format: uuid
partner_id
required

ID of the partner this formula belongs to

string format: uuid
customer_id
required

ID of the customer 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
events
required

Ordered list of events representing the lifecycle of this commission formula

Array<object>
object
datetime
required

Timestamp when the event occurred

string format: date-time
event
required
One of: discriminator: type
object
type
required
string
Allowed values: create_commission_formula
currency
required

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

string
name
required

Name of the commission formula

string
description

Optional description of the commission formula

string
nullable
formula
required
One of: discriminator: type
ExpressionLiteral

The AST expression defining the commission calculation

object
type
required
string
Allowed values: literal
value
required
One of: discriminator: type
ValueNumber
object
type
required
string
Allowed values: number
value
required
number
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 (null means no expiry)

string format: date-time
nullable
view
required
object
status
required

Current lifecycle status of the commission formula

string
Allowed values: active cancelled
cancel_reason

Reason for cancellation, present only when status is ‘cancelled’

string
nullable
name

Name of the commission formula

string
nullable
description

Optional description of the commission formula

string
nullable
formula
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
start_datetime

Date and time from which this formula is active

string format: date-time
nullable
end_datetime

Date and time until which this formula is active (null means no expiry)

string format: date-time
nullable
created_at

Timestamp when the commission formula was created

string format: date-time
nullable
total
required

Total number of commission formulas matching the query

integer
page
required

Current page number

integer
per_page
required

Number of commission formulas returned per page

integer
Example
{
"commission_formulas": [
{
"events": [
{
"event": {
"type": "create_commission_formula",
"formula": {
"type": "literal",
"value": {
"type": "number"
}
}
}
}
],
"view": {
"status": "active",
"formula": {
"type": "literal",
"value": {
"type": "number"
}
}
}
}
]
}

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