To try sample data, create a free workspace and choose the SaaS Affiliate sample during setup.
On This Page
Details
What to know
Revenue object
A revenue record represents one sale, refund, or adjustment that can be used in payout calculations.
Use external_id to make revenue submissions idempotent for a source.
Use positive amounts for sales and negative amounts for refunds.
Use adjustment records to correct non-refund differences.
A linked refund can include original_revenue_id. The original must be a sale in the same workspace and currency, and all linked refunds together cannot exceed the original sale amount.
Revenue records cannot be edited through the API after creation.
Units and retail prices arrive through revenue file imports. The API returns them on revenue records and does not accept them on create.
Endpoint Examples
Requests and responses
Each example shows the request shape and a shortened successful response. Replace placeholder IDs with values from your workspace.
GET/api/v1/revenues
List revenues
Returns paginated revenue records with optional filters.
Requires read:revenues.
Supports type, revenue_source_id, currency, date_from, date_to, search, per_page, and page.
These fields appear in revenue create and response examples.
Field
Type
Notes
id
string
Allocora revenue ID returned by the API.
revenue_source_id
string
Revenue source that owns the record.
type
string
sale, refund, or adjustment.
amount
decimal string
Canonical amount, returned as a string.
amount_exact
decimal string in responses
The amount exactly as stored, with at least three decimals, for example 12.345.
currency
string
Three-letter code of a supported currency, such as USD, EUR or GBP; another code returns 422. Calculations convert revenue in another currency into the workspace currency at the exchange rate on the date the contract sets (the period end by default).
occurred_at
datetime
When the source transaction happened.
external_id
string
Source transaction ID used for duplicate protection.
external_product_identifier
string or null
Source product identifier for matching and mapping.
original_revenue_id
string or null
For a linked refund, the original sale in the same workspace and currency. Cumulative linked refunds cannot exceed that sale.
quantity
integer or null in responses
Units sold or returned, when a revenue file supplied them. Used by retail price rules.
rrp_unit_price
decimal string or null in responses
Retail price per unit before tax, when a revenue file supplied it.
Related
Continue through the docs
Move from concepts to setup, then to statement output and audit review.