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

# Get List of Transactions

> Retrieve a log of API usage, including endpoints accessed and credits consumed.

# Filtering

The `/api/auth/transactions/` endpoint allows you to filter transactions based on various properties. By applying filters directly in your request URL, you can narrow down results to meet specific criteria

## Example:

To retrieve all transactions from the year 2025: `/auth/transactions/?created_at__range=2025-01-01,2025-12-31`

## Available Parameters and Modifiers

Below is the list of parameters and the modifiers you can use for filtering:

<AccordionGroup>
  <Accordion title="created_at">
    Modifiers: **exact, gt, gte, lt, lte, range** <br />
    Example: `?created_at__range=2025-01-01,2025-12-31`
  </Accordion>

  <Accordion title="status">
    Modifiers: **exact** <br />
    Example: `?status__exact=success`
  </Accordion>

  <Accordion title="balance_type">
    Modifiers: **exact** <br />
    Example: `?balance_type__exact=leads_by_icp`
  </Accordion>

  <Accordion title="amount">
    Modifiers: **exact, gt, gte, lt, lte, range** <br />
    Examples: `?amount__lt=-5`
  </Accordion>

  <Accordion title="after_balance">
    Modifiers: **exact, gt, gte, lt, lte, range** <br />
    Examples: `?after_balance__lte=500`
  </Accordion>
</AccordionGroup>

Modifier Descriptions:

* `exact`: Matches the exact value (==)
* `gt`: Greater than (>)
* `gte`: Greter than or equal to (>=)
* `lt`: Lower than (\<)
* `lte`: Lower than or equal to (\<=)
* `range`: Filters values between `x` and `y` (number or date). Syntax: `x,y`

## Date

* Date: yyyy-mm-dd\
  Example: 2025-01-01

* Date and Time: yyyy-mm-ddTHH:MM:SS.ssssss\
  Example: 2025-01-01T02:03:04.000000


## OpenAPI

````yaml get /api/auth/transactions/
openapi: 3.0.3
info:
  title: Generect API
  description: >-
    Welcome to the Generect API documentation. Here we will help you integrate
    and use our API.


    API base url: `api.generect.com`  

    Protocol: `HTTPS`


    # Authentication


    Firstly, add a `API Token` to the enviroment variables `auth_token` in
    `Settings` tab.


    # Rate limits


    Credits: You can request data depending on your data plan and credit
    balance. The default is 10000/month. The estimated number of credits to
    spend is based on the complexity of the query and the number of results. The
    amount spent can be increased by additional data flags in the queries.


    # Note


    _Ensure that you are add a "/" to the end of url._
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.generect.com
security:
  - apiKey: []
tags:
  - name: 1. Auth
    description: Login and get user info
  - name: 2. Transactions
    description: List of latest transactions in your account
  - name: 3. Leads
    description: Fetch information about leads by _link/name/ICP_.
  - name: 4. Companies
    description: Fetch information about companies by link/name/ICP.
paths:
  /api/auth/transactions/:
    get:
      tags:
        - 2. Transactions
      summary: Get List of Transactions
      description: >-
        Retrieve a log of API usage, including endpoints accessed and credits
        consumed.
      operationId: getListOfTransactions
      parameters:
        - name: limit
          in: query
          schema:
            type: string
            example: '100'
          description: Limit of transactions in result
        - name: offset
          in: query
          schema:
            type: string
            example: '0'
          description: Offset in list of transactions
      responses:
        '200':
          description: '200'
          headers:
            Allow:
              schema:
                type: string
                example: GET, HEAD, OPTIONS
            Content-Length:
              schema:
                type: string
                example: '25393'
            Cross-Origin-Opener-Policy:
              schema:
                type: string
                example: same-origin
            Date:
              schema:
                type: string
                example: Mon, 02 Dec 2024 20:50:51 GMT
            Referrer-Policy:
              schema:
                type: string
                example: same-origin
            Server:
              schema:
                type: string
                example: WSGIServer/0.2 CPython/3.11.10
            Vary:
              schema:
                type: string
                example: Accept, Origin
            X-Content-Type-Options:
              schema:
                type: string
                example: nosniff
            X-Frame-Options:
              schema:
                type: string
                example: DENY
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: number
                    example: 8
                  limit:
                    type: number
                    example: 100
                  max_limit:
                    type: number
                    example: 100
                  next:
                    nullable: true
                    example: null
                  offset:
                    type: number
                    example: 5
                  previous:
                    type: string
                    example: >-
                      https://api.generect.com/api/auth/transactions/?amount__lte=-5&created_at__range=2025-01-07T00%3A30%3A00%2C2025-12-31&limit=100
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        after_balance:
                          type: number
                          example: -2400
                        amount:
                          type: number
                          example: -10
                        balance_type:
                          type: string
                          example: leads_by_icp
                        created_at:
                          type: string
                          example: '2025-01-07T13:01:15.397996'
                        description:
                          type: string
                          example: leads info by ICP
                        id:
                          type: string
                          example: 51a800b8-5c0c-4f0b-9c3c-459ea2a3fad6
                        status:
                          type: string
                          example: success
                        updated_at:
                          type: string
                          example: '2025-01-07T13:01:58.195959'
                    example:
                      - id: 51a800b8-5c0c-4f0b-9c3c-459ea2a3fad6
                        created_at: '2025-01-07T13:01:15.397996'
                        updated_at: '2025-01-07T13:01:58.195959'
                        status: success
                        balance_type: leads_by_icp
                        amount: -10
                        description: leads info by ICP
                        after_balance: -2400
                      - id: eaea3124-c337-41f2-9258-4a043a7ea877
                        created_at: '2025-01-07T11:27:54.628500'
                        updated_at: '2025-01-07T11:28:40.966949'
                        status: success
                        balance_type: leads_by_icp
                        amount: -10
                        description: leads info by ICP
                        after_balance: -2390
                      - id: 9f57c8e5-43c6-4baf-9777-7754fe481362
                        created_at: '2025-01-07T00:31:06.785495'
                        updated_at: '2025-01-07T00:31:40.788266'
                        status: success
                        balance_type: leads_by_icp
                        amount: -10
                        description: leads info by ICP
                        after_balance: -2380
              examples:
                '200':
                  value:
                    count: 8
                    next: null
                    previous: >-
                      http://localhost:8000/api/auth/transactions/?amount__lte=-5&created_at__range=2025-01-07T00%3A30%3A00%2C2025-12-31&limit=100
                    limit: 100
                    max_limit: 100
                    offset: 5
                    results:
                      - id: 51a800b8-5c0c-4f0b-9c3c-459ea2a3fad6
                        created_at: '2025-01-07T13:01:15.397996'
                        updated_at: '2025-01-07T13:01:58.195959'
                        status: success
                        balance_type: leads_by_icp
                        amount: -10
                        description: leads info by ICP
                        after_balance: -2400
                      - id: eaea3124-c337-41f2-9258-4a043a7ea877
                        created_at: '2025-01-07T11:27:54.628500'
                        updated_at: '2025-01-07T11:28:40.966949'
                        status: success
                        balance_type: leads_by_icp
                        amount: -10
                        description: leads info by ICP
                        after_balance: -2390
                      - id: 9f57c8e5-43c6-4baf-9777-7754fe481362
                        created_at: '2025-01-07T00:31:06.785495'
                        updated_at: '2025-01-07T00:31:40.788266'
                        status: success
                        balance_type: leads_by_icp
                        amount: -10
                        description: leads info by ICP
                        after_balance: -2380
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: Use 'Token <api-key>' as the value

````