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

# List all batches

> Returns an array of all batches with filtering and sorting capabilities.



## OpenAPI

````yaml GET /batches
openapi: 3.1.0
info:
  title: Mangrove - API
  version: 1.1.0
servers:
  - url: https://app.gomangrove.com/api/v1
security:
  - sec0: []
paths:
  /batches:
    get:
      summary: List all batches
      description: Returns an array of all batches with filtering and sorting capabilities.
      operationId: list-all-batches
      parameters:
        - name: filter[project_id][eq]
          in: query
          description: Filter by project ID
          schema:
            type: integer
        - name: page
          in: query
          schema:
            type: integer
            format: int32
            default: 1
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
            default: 10
        - name: sort
          in: query
          description: >-
            Comma-separated list of fields to sort by. Prefix with - for
            descending. Available fields: id, start_time, end_time, state,
            created_at, updated_at
          schema:
            type: string
            example: '-created_at'
        - name: filter[id][eq]
          in: query
          description: Filter by exact batch ID
          schema:
            type: string
        - name: filter[state][eq]
          in: query
          description: Filter by batch state
          schema:
            type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    data:
                      - id: bat_abc123def456
                        tracking_id: Q1-2025-001
                        start_time: '2025-01-01T00:00:00.000Z'
                        end_time: '2025-03-31T23:59:59.000Z'
                        state: complete
                        created_at: '2025-01-15T10:00:00.000Z'
                        updated_at: '2025-01-15T10:00:00.000Z'
                        primary_output:
                          id: 1
                          name: Net Carbon Removal
                          unit: t
                          data_point_type_id: 5
                          value: 100.5
                        ledger_balance: 50.25
                        allocations: []
                        model_run:
                          id: 1
                          start_time: '2025-01-01T00:00:00.000Z'
                          end_time: '2025-03-31T23:59:59.000Z'
                          state: complete
                          error_message: null
                          created_at: '2025-01-15T10:00:00.000Z'
                          updated_at: '2025-01-15T10:00:00.000Z'
                          calculations: []
                          output_data_points: []
                        feedstocks: []
                    info:
                      items: 1
                      page_size: 10
                      total_items: 1
                      current_page: 1
                      next_page: null
                      previous_page: null
                      total_pages: 1
                      sort: []
                      filter: []
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: bat_abc123def456
                        tracking_id:
                          type: string
                          example: Q1-2025-001
                        start_time:
                          type: string
                          format: date-time
                        end_time:
                          type: string
                          format: date-time
                        state:
                          type: string
                          example: complete
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
                        primary_output:
                          type: object
                          nullable: true
                          properties:
                            id:
                              type: integer
                            name:
                              type: string
                            unit:
                              type: string
                              nullable: true
                            data_point_type_id:
                              type: integer
                              nullable: true
                            value:
                              type: number
                              nullable: true
                        ledger_balance:
                          type: number
                          nullable: true
                        allocations:
                          type: array
                          items:
                            type: object
                        model_run:
                          type: object
                          nullable: true
                        feedstocks:
                          type: array
                          items:
                            type: object
                  info:
                    type: object
                    properties:
                      items:
                        type: integer
                      page_size:
                        type: integer
                      total_items:
                        type: integer
                      current_page:
                        type: integer
                      next_page:
                        type: integer
                        nullable: true
                      previous_page:
                        type: integer
                        nullable: true
                      total_pages:
                        type: integer
                      sort:
                        type: array
                        items: {}
                      filter:
                        type: array
                        items: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: ''

````