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

# Get transaction history

> Get history of transactions for the site. Requires an organisational bearer token.



## OpenAPI

````yaml GET /rewards/{site_id}/transactions
openapi: 3.1.0
info:
  title: Axle API Docs
  description: >-
    For full documentation please see our official docs at <a
    href='http://docs.axle.energy'>docs.axle.energy</a>
  version: 1.4.6
servers:
  - url: https://api-sandbox.axle.energy
security: []
tags:
  - name: 1. Authentication
    description: Authenticate yourself with the Axle API
  - name: 2. Meters
    description: Find key info about your sites
  - name: 3. Sites
    description: Register your sites with Axle; configure market participation
  - name: 4. Assets
    description: Register your assets with Axle
  - name: 5. Data
    description: Send asset metrics to Axle, for analysis and optimisation purposes
  - name: 6. Rewards
    description: >-
      Determine how much your users have earned by participating with Axle;
      allow balance withdrawal
  - name: 7. Validation
    description: Validate structured data against Axle's rules
  - name: 8. Examples
    description: Get example data for testing
paths:
  /rewards/{site_id}/transactions:
    get:
      tags:
        - 6. Rewards
      summary: Get Transaction History
      description: >-
        Get history of transactions for the site. Requires an organisational
        bearer token.
      operationId: get_transaction_history_rewards__site_id__transactions_get
      parameters:
        - required: true
          schema:
            type: string
            format: uuid
            title: Site Id
          name: site_id
          in: path
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionDataResponse'
        '404':
          description: Site not found or not authorized to access
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    TransactionDataResponse:
      properties:
        site_id:
          type: string
          format: uuid
          title: Site Id
          description: ID of the site
        transactions:
          items:
            $ref: '#/components/schemas/TransactionDatumResponse'
          type: array
          title: Transactions
          description: List of transactions for the site
        is_below_withdrawal_minimum:
          type: boolean
          title: Is Below Withdrawal Minimum
          description: >-
            If the user is below the minimum withdrawal threshold (if
            configured)
          default: false
        days_until_minimum_wait_time_met:
          type: integer
          title: Days Until Minimum Wait Time Met
          description: How many days the user needs to wait to withdraw (if configured)
      type: object
      required:
        - site_id
        - transactions
      title: TransactionDataResponse
      description: Response model for transaction history.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TransactionDatumResponse:
      properties:
        transaction_type:
          allOf:
            - $ref: '#/components/schemas/UserTransactionType'
          description: Type of the transaction
        transaction_id:
          type: string
          format: uuid
          title: Transaction Id
          description: ID of the transaction
        start_time:
          type: string
          format: date-time
          title: Start Time
          description: |-
            For transaction_type = 'flex event': when the event started
            For transaction_type = 'flex period': month start
            For transaction_type = 'withdrawal': when the withdrawal happened
        end_time:
          type: string
          format: date-time
          title: End Time
          description: |-
            For transaction_type = 'flex event': when the event ended
            For transaction_type = 'flex period': month end
            Not present for other transaction_type values
        settlement_date:
          type: string
          format: date
          title: Settlement Date
          description: >-
            Date on which the transaction was settled, if known. For flex
            periods this is the payout date — the period start for in-advance
            payments and the period end for arrears payments. Clients should
            prefer this over start_time/end_time when displaying a single date
            for the transaction.
        flex_kwh:
          type: number
          title: Flex Kwh
          description: >-
            Stored to the nearest watt-hour (3dp)

            For transaction_type = 'flex event': the change in energy flow
            during

            the event relative to the baseline in kwh. +ve indicates additional
            energy

            imported (or less energy exported). -ve indicates additional energy

            exported (or less energy imported).

            Not present for other transaction_type values
        credit_pence:
          type: integer
          title: Credit Pence
          description: Amount credited in pence
        payment_status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatus'
          description: >-
            Payment lifecycle status. Only present for withdrawal transactions
            that have an associated payment record.
      type: object
      required:
        - transaction_id
        - credit_pence
      title: TransactionDatumResponse
      description: Response model for single transaction.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    UserTransactionType:
      type: string
      enum:
        - flex period
        - flex period top-up
        - flex event
        - withdrawal
        - invoice paid
        - goodwill credit
        - signup bonus
        - correction
        - VPP Signup Bonus
        - Referred Credit
        - Referrer Credit
        - Recurring Referrer Credit
        - FR SC Referred Credit
        - FR SC Referrer Credit
        - FR SC Signup Bonus
      title: UserTransactionType
      description: An enumeration.
    PaymentStatus:
      type: string
      enum:
        - pending_approval
        - approved
        - processing
        - posted
        - failed
        - rejected
        - cancelled
        - returned
      title: PaymentStatus
      description: Payment lifecycle states
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: auth/token-form

````