> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qobra.co/llms.txt
> Use this file to discover all available pages before exploring further.

# get_statement_compensation

Get the full calculated breakdown of one compensation on a statement.

A compensation is one commission line of a statement. `get_statement` returns
each line as a minimal row; this returns the *whole* displayable variable
breakdown behind its amount — every variable with its `value` (and, when an
admin overrode it, the `value_before_override`) — plus the compensation's
plan, periodicity, ranking and its scopes (drill into their frozen records with
`list_statement_records`). Hidden intermediate variables and the calculation
rules themselves (formulas, tiers) are not exposed.

Identify the statement by `statement_id` (from `list_statements` /
`get_statement`), then name the `compensation` within it.

A statement or compensation you can't access reads exactly like one that doesn't
exist, so the error never reveals anything outside your scope.

## Parameters

<Accordion title="Body" defaultOpen>
  <ParamField body="statement_id" type="string" required>
    The statement's id, as returned by list\_statements or get\_statement.
  </ParamField>

  <ParamField body="compensation" type="string" required>
    The compensation to open, matched by its compensation\_id (as returned by
    get\_statement) or by name (case-insensitive, exact match preferred over
    substring).
  </ParamField>
</Accordion>

## Response

<Accordion title="Body" defaultOpen>
  <ResponseField name="compensation_id" type="string" />

  <ResponseField name="name" type="string" />

  <ResponseField name="plan_name" type="string" />

  <ResponseField name="description" type="string" />

  <ResponseField name="value" type="number" />

  <ResponseField name="currency" type="string">
    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`.
  </ResponseField>

  <ResponseField name="overwritten" type="boolean" />

  <ResponseField name="error" type="boolean">
    True when the compensation or its line errored.
  </ResponseField>

  <ResponseField name="validated" type="boolean" />

  <ResponseField name="manual" type="boolean" />

  <ResponseField name="draw" type="boolean" />

  <ResponseField name="calculation_frequency" type="string">
    How often the compensation is calculated (e.g. EACH\_MONTH, EACH\_QUARTER,
    EACH\_YEAR).
  </ResponseField>

  <ResponseField name="effective_non_financial_reward" type="string" />

  <ResponseField name="ranking" type="object">
    <Expandable title="object properties">
      <ResponseField name="rank" type="integer" />

      <ResponseField name="prize_value" type="any" />

      <ResponseField name="prize_type" type="string" />
    </Expandable>
  </ResponseField>

  <ResponseField name="scopes" type="object[]">
    The compensation's scopes (its calculation perimeters). Drill into a scope's
    frozen records with list\_statement\_records.

    <Expandable title="object properties">
      <ResponseField name="id" type="string" />

      <ResponseField name="letter" type="string">
        The scope's short label within the compensation (A, B, …).
      </ResponseField>

      <ResponseField name="name" type="string" />
    </Expandable>
  </ResponseField>

  <ResponseField name="variables" type="object[]">
    Every displayable variable of the compensation with its value — the full
    calculated breakdown behind the amount. Hidden (intermediate) variables are
    excluded.

    <Expandable title="object properties">
      <ResponseField name="name" type="string" />

      <ResponseField name="type" type="string">
        One of: `float`, `amount`, `percentage`, `string`, `picklist`,
        `multipicklist`, `bool`, `date`, `user`, `object`, `group`,
        `record_status`.
      </ResponseField>

      <ResponseField name="value" type="any">
        The variable's value (final, after any manual override).
      </ResponseField>

      <ResponseField name="overwritten" type="boolean">
        True when an admin manually overrode the computed value.
      </ResponseField>

      <ResponseField name="value_before_override" type="any">
        The computed value before the manual override. Null unless `overwritten`
        is true.
      </ResponseField>

      <ResponseField name="currency" type="string">
        Set only for AMOUNT variables — the statement's calculation currency;
        null otherwise. 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`.
      </ResponseField>

      <ResponseField name="error" type="boolean" />

      <ResponseField name="error_type" type="string">
        When `error` is true, the kind of computation error (e.g.
        DivisionZeroError, DependencyError, TypeError); null otherwise.
      </ResponseField>
    </Expandable>
  </ResponseField>
</Accordion>
