> ## 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.

# Fetch statement reporting data

> Retrieves statement reporting data. A statement report holds your compensation's data, consolidated around metrics on a statement level.

<Warning>
  This endpoint is deprecated. Use the v2 endpoint instead. See [v2
  documentation](/api_reference/v2/endpoints/data/fetch_statements)
</Warning>

## Pagination

This endpoint is paginated using parameters offset and limit
The “next” key in the response allow you to easily follow pagination to get the
next batch of users

## Variable api keys

This endpoint is based on dynamic fields. This mean that all annotations
that look like `<variable-key>`, will have to or will be replaced by their
actual API keys.


## OpenAPI

````yaml get /v1/reporting
openapi: 3.0.2
info:
  version: 1.0.0
  title: Qobra API
  description: API documentation for Qobra
servers:
  - url: https://api.qobra.co
    description: API
security: []
paths:
  /v1/reporting:
    get:
      tags:
        - public_api
        - v1
        - reporting
      summary: Fetch statement reporting data
      description: >-
        Retrieves statement reporting data. A statement report holds your
        compensation's data, consolidated around metrics on a statement level.
      operationId: GET_/v1/reporting
      parameters:
        - name: offset
          in: query
          schema:
            title: Offset
            description: Optional (minimum:0 - maximum:9223372036854775807)
            default: 0
            minimum: 0
            maximum: 9223372036854776000
            type: integer
          required: false
        - name: limit
          in: query
          schema:
            title: Limit
            description: >-
              Optional (minimum:0 - maximum:2000): if set to 0 return total
              count only
            default: 2000
            minimum: 0
            maximum: 2000
            type: integer
          required: false
      responses:
        '200':
          description: Success operation
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetManyResponseModel_StatementReportingRecordModel_Success
              examples:
                fetch-reporting-success:
                  $ref: >-
                    #/components/examples/GetManyResponseModel_StatementReportingRecordModel_SuccessExample
      deprecated: true
      security:
        - api_key: []
components:
  schemas:
    GetManyResponseModel_StatementReportingRecordModel_Success:
      type: object
      properties:
        count:
          title: Count
          type: integer
          description: Number of records in the response
        next:
          title: Next
          type: string
          description: Next page of the response
        data:
          title: Data
          type: array
          items:
            $ref: '#/components/schemas/StatementReportingRecordModel'
      required:
        - count
        - data
      title: GetManyResponseModel[StatementReportingRecordModel]
    StatementReportingRecordModel:
      type: object
      properties:
        id:
          title: Id
          type: string
          format: ObjectId
          description: Id of the record
        payment:
          title: Payment
          type: number
          description: Amount of the payment
        on_target_earning_currency:
          $ref: '#/components/schemas/CurrencyCode'
        achievement:
          title: Achievement
          type: number
          description: Achievement of the target
        target:
          title: Target
          type: number
          description: Target
        date:
          title: Date
          type: string
          format: date-time
          description: Date
        plan:
          title: Plan
          type: string
          description: Compensation plan name
        target_achievement:
          title: Target Achievement
          type: number
          description: Target achievement
        payment_currency:
          $ref: '#/components/schemas/CurrencyCode'
        target_currency:
          $ref: '#/components/schemas/CurrencyCode'
        achievement_currency:
          $ref: '#/components/schemas/CurrencyCode'
        on_target_earning:
          title: On Target Earning
          type: number
          description: On-target earning amount
        user:
          $ref: '#/components/schemas/UserModel'
      required:
        - id
        - target_currency
        - on_target_earning_currency
        - payment
        - user
        - payment_currency
        - date
        - achievement_currency
        - plan
      title: StatementReportingRecordModel
    CurrencyCode:
      description: Allowed currency codes.
      type: string
      enum:
        - 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
        - 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
        - WST
        - XAG
        - XAU
        - XCD
        - XPD
        - XPT
        - XSU
        - YER
        - ZAR
        - ZMK
        - ZWL
      title: CurrencyCode
    UserModel:
      type: object
      properties:
        id:
          title: Id
          type: string
          format: ObjectId
          description: Id of the user
        email:
          title: Email
          type: string
          description: Email of the user
          format: email
        name:
          title: Name
          type: string
          description: Name of the user
        status:
          $ref: '#/components/schemas/UserStatus'
        role:
          title: Role
          type: string
          description: Role of the user
        currency:
          $ref: '#/components/schemas/CurrencyCode'
        calculation_currency:
          $ref: '#/components/schemas/CurrencyCode'
        <user-attribute-1-api-key>:
          type: string
          description: User attribute 1 value
        <user-attribute-1-api-key>_currency:
          $ref: '#/components/schemas/CurrencyCode'
        <user-attribute-2-api-key>:
          type: string
          description: User attribute 2 value
      required:
        - id
        - email
        - status
        - name
        - role
        - currency
        - calculation_currency
      additionalProperties:
        oneOf:
          - type: string
          - type: integer
      title: UserModel
    UserStatus:
      description: An enumeration.
      type: string
      title: UserStatus
      enum:
        - active
        - archived
        - inactive
        - pending
  examples:
    GetManyResponseModel_StatementReportingRecordModel_SuccessExample:
      value:
        count: 4570
        data:
          - id: 6545110915808dbcc34531ef
            date: '2023-11-30'
            plan: Great plan
            user:
              id: 5537a5b05d6e4824940e9e1bb9a5ebb8
              email: john-doe@company.com
              name: John Doe
              role: Sales Rep
              currency: EUR
              calculation_currency: USD
              country: France
              code: AO32ND56
              ...: ...
            payment: 0
            payment_currency: USD
            target: null
            target_currency: EUR
            target_achievement: null
            on_target_earning: null
            on_target_earning_currency: EUR
            achievement: null
            achievement_currency: EUR
            <custom-metric-1-api-key>: 10000
            <custom-metric-1-api-key>_currency: EUR
            <custom-dimension-1-api-key>:
              - group_1
              - group_2
          - id: 6545110915808dbcc34531ee
            date: '2023-11-30'
            plan: Manual payments
            user:
              id: 5537a5b05d6e4824940e9e1bb9a5ebb8
              email: john-doe@company.com
              name: John Doe
              role: Sales Rep
              currency: EUR
              calculation_currency: USD
              country: France
              code: AO32ND56
              ...: ...
            payment: 0
            payment_currency: USD
            target: null
            target_currency: EUR
            target_achievement: null
            on_target_earning: null
            on_target_earning_currency: EUR
            achievement: null
            achievement_currency: EUR
            <custom-metric-1-api-key>: 10000
            <custom-metric-1-api-key>_currency: EUR
            <custom-dimension-1-api-key>:
              - group_1
              - group_2
          - ...
        next: https://api.qobra.co/v1/reporting?limit=2000&offset=2000
  securitySchemes:
    api_key:
      type: apiKey
      name: X-API-Key
      in: header

````