Create a commission for a referrer
curl --request POST \ --url https://example.com/api/v1/commissions/referrers/example/commissions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "invoiceId": "example", "notes": "example", "percentage": 1, "projectId": "example", "type": "system" }'Creates a commission for the referrer client, linked either to a system invoice (type: "system") or to an external invoice (type: "external"). The external branch records a real external invoice in Chelsea, so externalSource and externalInvoiceNumber are both required. Requires commissions.manage.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Referrer Client identifier (CUID2).
Referrer Client identifier (CUID2).
Request Body
Section titled “Request Body”object
object
The client being invoiced (the payer) — distinct from the referrer client.
The number the originating system gave the invoice. Required: it becomes the recorded external invoice’s own number.
Which system issued the invoice, e.g. SPP. Required: the commission now records a real external invoice in Chelsea rather than a private copy, and an invoice with no origin is a guess.
Responses
Section titled “Responses”The created commission.
object
A commission linking a referrer client to a system invoice or an external invoice.
object
The invoice this commission is against, and the only place its amount comes from. origin is SYSTEM for an invoice this workspace issued and EXTERNAL for one issued elsewhere; externalNumber and documentUrl carry the originating system’s number and a link to the real document.
object
object
Commission percentage of the invoice total.
The referrer Client that earns this commission.
object
Example
{ "data": { "reviewFlagReason": "REFUND" }}Validation error. Parse failures include field paths and expectations.
Validation error with safe field paths and expected values; submitted values are never returned.
object
object
Stable machine-readable error code.
object
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Unauthorized.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Forbidden.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Rate limit exceeded. Wait for Retry-After before retrying.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Headers
Section titled “Headers”Maximum requests in the current quota window.
Quota policy in requests and window seconds, for example 60;w=60.
Requests left in this quota window (zero when blocked).
Seconds until the current quota window resets, when available from the rate-limit store.
Seconds until another request may be attempted.
Chelsea is operated by Arepa Labs LLC