Skip to content

Download a referrer's commission statement PDF

GET
/commissions/referrers/{clientId}/pdf
Code sample: Shell / cURL
curl --request GET \
--url 'https://example.com/api/v1/commissions/referrers/example/pdf?report=all&payment=paid&payout=paid' \
--header 'Authorization: Bearer <token>'

Generates a PDF statement of the referrer’s commissions, returned as an attachment via Content-Disposition. Callers without commissions.manage can only download the statement of the referrer client they are themselves linked to, and only see commissions approved for the referrer. report picks the kind (all, paid, to-pay for what is left to pay, split into the earnings whose invoice was received (the referrer’s invoice is on file) and the approved ones still waiting for it, each with its own total, awaiting-client for commissions waiting for the client’s payment); commissionIds (comma-separated) narrows it to a selection; q, from, to, company, status (repeat it to match any of several statuses), payment and payout (each paid or unpaid) apply the same filters as the invoices table.

clientId
required

Referrer Client identifier (CUID2).

string
>= 1 characters

Referrer Client identifier (CUID2).

report
string
Allowed values: all paid to-pay awaiting-client
commissionIds
string
q
string
from
string
to
string
company
string
status
string
payment
string
Allowed values: paid unpaid
payout
string
Allowed values: paid unpaid

PDF statement of the referrer’s commissions.

Media typeapplication/pdf

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Forbidden.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Not found.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.