Earnings API
This page assumes the shared rules in API Conventions — authentication, the two error shapes, batching and identity resolution. It only covers what is specific to earnings.
How It Works
- You get an API Key with the
earnings:readscope - Your backend asks for one or many collaborators (by CPF or email)
- SalesOS answers with the totals, broken down by payout type and by receivable status
Authentication
Endpoint Reference
earnings_status.
Request Schema
string
required
Must be
"earnings_status"array
required
Array of collaborator references (max 500)
Example
Fields
Payout types
paid.by_type splits settled money across the three types the system records:
Receivable stages
receivable covers everything still owed. by_status splits it by stage:
Two stages never appear here:
PAGO (already left, counted in paid) and CANCELADO (will never be paid).
Error Handling
See API Conventions for the two shapes and the status code table.400 — VALIDATION_ERROR
400 — VALIDATION_ERROR
Invalid body, batch over 500, CPF without 11 digits, or an item with neither
cpf nor email.403 — FORBIDDEN
403 — FORBIDDEN
API key is valid but lacks the
earnings:read scope.Rate Limits
Security
- Read-only: this API never creates, approves or changes a payment
- Each key is scoped to a single company — money from another company never appears, even for the same person
- Amounts and documents are never written to logs; only counts are
Next Steps
Player Progress API
Level, XP, coins and ranking
Campaigns API
The catalog those prizes come from

