Hoppa till innehållet

Commissions

Sales agents' commission settlements: paid invoices and credit notes per agent, one line per invoice and sales order, settled once. Addressed by settlementNumber. The agent and the commission terms are set on the sales order and the quote in Fluit.

4 calls GET POST Base URL https://api.fluit.cloud/preview

Authentication, error codes, rate limits, idempotency and pagination apply to every call and are documented once under Getting started.

GET /commission-settlements

List commission settlements

Returns sales agents' commission settlements, newest first, each with its lines: one per invoice and sales order, credit notes negative. Amounts are in the tenant's base currency. The response is paged: items , totalCount , page and pageSize .

commissions:read

Query parameters

Field Type Description
agentCustomerNumber string Returns only the settlements of the sales agent with this customer number.
status enum Filters on the settlement's status. Draft Approved Paid Cancelled
page integer Page to return, 1-based. Default 1.
pageSize integer Number of records per page. Default 50, max 200.

Responses

200 PagedResult_PublicCommissionSettlementResponse

Paginated response: the fields below sit in items[], wrapped in totalCount, page, pageSize, totalPages, hasPreviousPage and hasNextPage. Paginated

Field Type Description
agentCustomerNumber string · nullable Customer number of the sales agent.
agentName string · nullable
approvedAt string(date-time) · nullable
currencyCode string · nullable ISO 4217 base currency of every amount.
lines CommissionSettlementLine[] · nullable
paidDate string(date) · nullable
settlementNumber string · nullable Unique settlement number, e.g. PROV-2026-00001 .
status enum Lifecycle of a commission settlement. Draft Approved Paid Cancelled
toDate string(date) Paid invoices and credit notes up to and including this date are included.
totalBasisAmount decimal
totalCommissionAmount decimal
400 ProblemDetails Unknown status.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl "https://api.fluit.cloud/preview/commission-settlements" \
  -H "X-Api-Key: fluit_live_sk_..."
Response 200
{
  "aggregates": [
    {
      "currencyCode": "SEK",
      "key": "string",
      "mixedCurrencies": true,
      "value": "299.00"
    }
  ],
  "hasNextPage": true,
  "hasPreviousPage": true,
  "items": [
    {
      "agentCustomerNumber": "ABC-001",
      "agentName": "Acme AB",
      "approvedAt": "2026-06-11T09:24:13.418",
      "currencyCode": "SEK",
      "lines": [
        {
          "basisAmount": "299.00",
          "commissionAmount": "299.00",
          "commissionRate": "299.00",
          "commissionType": "Percent",
          "customerName": "Acme AB",
          "invoiceDate": "2026-06-11",
          "invoiceNumber": "INV-2026-0912",
          "isCreditNote": true,
          "orderNumber": "SO-2026-1041"
        }
      ],
      "paidDate": "2026-06-11",
      "settlementNumber": "ABC-001",
      "status": "Draft",
      "toDate": "2026-06-11",
      "totalBasisAmount": "299.00",
      "totalCommissionAmount": "299.00"
    }
  ],
  "page": 1,
  "pageSize": 50,
  "totalCount": 137,
  "totalPages": 3
}

Base URL https://api.fluit.cloud/preview. The response example is generated from the schema: the shape is right, the values are made up.

POST /commission-settlements

Create a commission settlement

Creates a draft settlement with every paid invoice and credit note of the agent dated up to and including toDate whose commission has not been settled. An invoice is settled once. Approve it with POST /preview/commission-settlements/{settlementNumber}/approve .

commissions:write Requires Idempotency-Key

Body required

Field Type Description
agentCustomerNumber Required string Customer number of the sales agent (a customer with the Agent role).
notes string · nullable Optional note on the settlement.
toDate Required string(date) Paid invoices and credit notes dated up to and including this date are included.

Responses

201 PublicCommissionSettlementResponse
  • Location — URL of the newly created resource.
Field Type Description
agentCustomerNumber string · nullable Customer number of the sales agent.
agentName string · nullable
approvedAt string(date-time) · nullable
currencyCode string · nullable ISO 4217 base currency of every amount.
lines CommissionSettlementLine[] · nullable
paidDate string(date) · nullable
settlementNumber string · nullable Unique settlement number, e.g. PROV-2026-00001 .
status enum Lifecycle of a commission settlement. Draft Approved Paid Cancelled
toDate string(date) Paid invoices and credit notes up to and including this date are included.
totalBasisAmount decimal
totalCommissionAmount decimal
400 ProblemDetails The customer is not a sales agent ( Commission.NotAnAgent ), or there is nothing to settle ( CommissionSettlement.NothingToSettle ).
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
409 ProblemDetails Another settlement took the same invoices at the same time ( CommissionSettlement.ConcurrentSettlement ).
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl -X POST "https://api.fluit.cloud/preview/commission-settlements" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d @body.json
Response 201
{
  "agentCustomerNumber": "ABC-001",
  "agentName": "Acme AB",
  "approvedAt": "2026-06-11T09:24:13.418",
  "currencyCode": "SEK",
  "lines": [
    {
      "basisAmount": "299.00",
      "commissionAmount": "299.00",
      "commissionRate": "299.00",
      "commissionType": "Percent",
      "customerName": "Acme AB",
      "invoiceDate": "2026-06-11",
      "invoiceNumber": "INV-2026-0912",
      "isCreditNote": true,
      "orderNumber": "SO-2026-1041"
    }
  ],
  "paidDate": "2026-06-11",
  "settlementNumber": "ABC-001",
  "status": "Draft",
  "toDate": "2026-06-11",
  "totalBasisAmount": "299.00",
  "totalCommissionAmount": "299.00"
}

Base URL https://api.fluit.cloud/preview. The response example is generated from the schema: the shape is right, the values are made up.

GET /commission-settlements/{settlementNumber}

Get a commission settlement

Returns the settlement with one line per invoice and sales order: the commissionable net amount, the commission type and rate, and the commission. Credit notes are negative. Amounts are in the tenant's base currency. Responses carry a weak ETag; pass it back in If-None-Match to get 304 Not Modified while the settlement is unchanged.

commissions:read Supports ETag

Path parameters

Field Type Description
settlementNumber Required string Number of the settlement, e.g. PROV-2026-00001.

Responses

200 PublicCommissionSettlementResponse
  • ETag — Weak validator for this representation. Pass it back in If-None-Match to get 304 Not Modified while the record is unchanged.
Field Type Description
agentCustomerNumber string · nullable Customer number of the sales agent.
agentName string · nullable
approvedAt string(date-time) · nullable
currencyCode string · nullable ISO 4217 base currency of every amount.
lines CommissionSettlementLine[] · nullable
paidDate string(date) · nullable
settlementNumber string · nullable Unique settlement number, e.g. PROV-2026-00001 .
status enum Lifecycle of a commission settlement. Draft Approved Paid Cancelled
toDate string(date) Paid invoices and credit notes up to and including this date are included.
totalBasisAmount decimal
totalCommissionAmount decimal
304 Empty body.
  • ETag — Weak validator for this representation. Pass it back in If-None-Match to get 304 Not Modified while the record is unchanged.
404 ProblemDetails No settlement with that number.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl "https://api.fluit.cloud/preview/commission-settlements/{settlementNumber}" \
  -H "X-Api-Key: fluit_live_sk_..."
Response 200
{
  "agentCustomerNumber": "ABC-001",
  "agentName": "Acme AB",
  "approvedAt": "2026-06-11T09:24:13.418",
  "currencyCode": "SEK",
  "lines": [
    {
      "basisAmount": "299.00",
      "commissionAmount": "299.00",
      "commissionRate": "299.00",
      "commissionType": "Percent",
      "customerName": "Acme AB",
      "invoiceDate": "2026-06-11",
      "invoiceNumber": "INV-2026-0912",
      "isCreditNote": true,
      "orderNumber": "SO-2026-1041"
    }
  ],
  "paidDate": "2026-06-11",
  "settlementNumber": "ABC-001",
  "status": "Draft",
  "toDate": "2026-06-11",
  "totalBasisAmount": "299.00",
  "totalCommissionAmount": "299.00"
}

Base URL https://api.fluit.cloud/preview. The response example is generated from the schema: the shape is right, the values are made up.

POST /commission-settlements/{settlementNumber}/approve

Approve a commission settlement

Fixes the amount of a draft settlement. It is then paid out to the agent, as a supplier invoice from Fluit or through payroll, and marked as paid in Fluit.

commissions:write Requires Idempotency-Key

Path parameters

Field Type Description
settlementNumber Required string Number of the draft settlement to approve.

Responses

204 Empty body.
404 ProblemDetails No settlement with that number.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
409 ProblemDetails The settlement is not a draft ( CommissionSettlement.NotDraft ).
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl -X POST "https://api.fluit.cloud/preview/commission-settlements/{settlementNumber}/approve" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)"
Response 404
{
  "detail": "string",
  "instance": "string",
  "status": 42,
  "title": "string",
  "type": "string"
}

Base URL https://api.fluit.cloud/preview. The response example is generated from the schema: the shape is right, the values are made up.

Schemas

The objects this group's calls refer to. The field tables above go one level deep and link here rather than repeating the same schema on every endpoint.

CommissionSettlementLine

PublicCommissionSettlementLine

One invoice and sales order in a settlement. Credit notes carry negative amounts.

Field Type Description
basisAmount decimal Commissionable net amount in the base currency. Serialised as a decimal string.
commissionAmount decimal Commission in the base currency. Serialised as a decimal string.
commissionRate decimal The percent, or the order's fixed amount. Serialised as a decimal string.
commissionType enum How the commission on a deal is calculated. Percent FixedAmount
customerName string · nullable Invoice customer — the end customer the agent brokered the deal to.
invoiceDate string(date)
invoiceNumber string · nullable
isCreditNote boolean True for a credit note, which deducts commission.
orderNumber string · nullable Sales order the invoice lines came from. Null for manually added invoice lines.