Skip to main content
Get one statement in full: a row per line (each compensation, plus the manual payments and the draw), the activity log, the validation workflow, the draw balance, the calculation errors and the linked requests. Identify the statement by statement_id, the id of a row list_statements returns, not a user id. payment_status answers “am I paid, and if not, why?” in one read; when an approval holds it up, validation_workflow names the blocking stage and who still has to approve. For a line’s variables and scopes, pass the line’s compensation_id to get_statement_compensation. By default the response carries only the 20 most recent activities, most recent first, and activity_count says how many the statement holds. When activity_count is above the length of activities, call again with include_all_activities set to true to read the whole log.
Example arguments
Every amount here, lines included, is converted into the currency named by currency_mode (payment by default) and labelled with currency, so amount and currency always agree. The conversion block gives the currency the statement stores its amounts in and the rate applied; list_exchange_rates holds the company’s rates per period. A statement with no rate for the requested currency is refused rather than served in another one. Only get_statement_compensation stays in the plan’s calculation currency. A statement with no line reads as not found. A statement you can’t access reads exactly like one that doesn’t exist, so the error never reveals a statement outside your scope.

Parameters

Body

string
required
The id of a row of list_statements, not a user id.
string
Currency every amount (total_amount, each line’s value, balance, minimum_compensation) is converted into and labelled with: ‘payment’ (default) the currency the user is paid in, ‘calculation’ the currency the plan computes in, ‘company’ the company’s currency. One of: company, payment, calculation.
boolean
default:"false"
True to serve the statement’s whole activity log. By default only the 20 most recent activities are served, most recent first; activity_count says how many there are.

Response

Body

string
The statement_id get_statement, get_statement_compensation, list_statement_records and the statement writes take. Not the user’s id.
string
Deep link to open this statement in the Qobra web app.
object
string
string
error (a calculation failed, whatever the lock or the payment), ongoing (open, editable), locked (amounts locked, not paid), paid (sent to payroll). Not the reporting stage of list_statement_periods. One of: error, ongoing, locked, paid.
string
ready (amounts current), calculating (a computation is running), need_refresh (data changed since the last computation, amounts stale). Not the lifecycle status. One of: ready, calculating, need_refresh.
number
Net amount to be paid out, in currency: it already reflects the draw and the manual payments, so it is not just the sum of the compensation lines.
string
The ISO currency code that total_amount is expressed in. One of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYR, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LVL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RMB, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, STD, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYI, UYU, UZS, VEF, VND, VUV, WON, WST, XAF, XAG, XAU, XCD, XOF, XPD, XPF, XPT, XSU, YER, ZAR, ZMK, ZWL.
object
How every amount of this statement reached currency: the currency it is stored in and the rate applied.
string
When the statement last finished computing and was up to date; null if it never reached that state.
boolean
True when a value of one of the statement’s lines was corrected by hand, or a line was entered by hand (a manual payment, or the draw set by hand), a manual payment alone being enough. The overwritten and manual flags of each line in get_statement’s compensations tell which.
object
The draw carried on this statement, its amounts in currency. Null when it has none, or when draws are off for the company (get_company_settings).
string
What the payment waits on:
  • blocked_by_error: a calculation error, to fix first.
  • awaiting_lock: still open, to lock first.
  • awaiting_approval: locked, a mandatory validation-workflow stage is not approved yet (awaited_approvers).
  • awaiting_payroll: locked, nothing blocks it, not yet sent to payroll.
  • paid: sent to payroll. One of: blocked_by_error, awaiting_lock, awaiting_approval, awaiting_payroll, paid.
object[]
The approvers of the workflow stages open now who have not approved yet, optional stages included. Empty when nothing awaits an approval.
object[]
object[]
The statement’s lines, as get_statement lists them without their amounts. Pass this statement’s id and a line’s compensation_id to get_statement_compensation for its breakdown.
boolean
True once the statement is locked and its amounts can no longer change. status cannot tell it for an errored statement, which reports error even when locked and paid.
boolean
True once the statement was sent to payroll.
boolean
True when at least one line failed to compute. See errors for the detail.
string
object
The months this statement covers: a quarterly compensation paid out in June covers April to June, which period alone does not say.
number
Guaranteed floor of this statement, in currency; null when the plan sets none.
object[]
The groups the user belongs to on the statement.
object[]
object[]
The calculation errors, resolved to variable, quota and scope names. Empty when the statement computed cleanly, and for a caller whose role can edit neither compensations nor quotas, even when error is true.
object
The approval stages the statement goes through once locked, who approves each and who already did. Null when no workflow is assigned or the company’s validation workflow is off.
object[]
The statement’s activity log, most recent first: only the 20 most recent unless include_all_activities is true. activity_count says how many the statement holds.
integer
How many activities the statement holds, whatever activities lists. Above the length of activities, call again with include_all_activities=true for the rest.
string[]
The reasons the company requires an adjustment of a statement to cite. Pass one of them as reason to update_statement_adjustments. Null when the company requires none.