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

# Retrieve a batch

> Returns a specific batch by ID, including underlying input data and allocation to reports.



## OpenAPI

````yaml GET /batches/{batch_id}
openapi: 3.1.0
info:
  title: Mangrove - API
  version: 1.1.0
servers:
  - url: https://app.gomangrove.com/api/v1
security:
  - sec0: []
paths:
  /batches/{batch_id}:
    get:
      summary: Retrieve a batch
      description: >-
        Returns a specific batch by ID, including underlying input data and
        allocation to reports.
      operationId: retrieve-batch
      parameters:
        - name: batch_id
          in: path
          description: Batch friendly ID (e.g., bat_abc123def456)
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    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: []
                    input_data:
                      - data_point:
                          id: in_abc123
                          slug: feedstock-mass
                          data_point_type: Mass of Feedstock
                          value: 50.5
                          unit: t
                          status: complete
                        event:
                          id: evt_xyz789
                          slug: feedstock-delivery
                          event_type: Feedstock Delivery
                          tracking_id: FD-001
                          start_time: '2025-01-15T00:00:00.000Z'
                          end_time: '2025-01-15T23:59:59.000Z'
                    report_allocations:
                      - allocation:
                          id: 1
                          amount: 50.25
                          unit: t
                        amount: 50.25
                        unit: t
                        report:
                          id: rpt_abc123
                          name: Q1 2025 Report
                          report_type: quarterly
                          status: complete
                    downstream_batch_allocations: []
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: bat_abc123def456
                  tracking_id:
                    type: string
                  start_time:
                    type: string
                    format: date-time
                  end_time:
                    type: string
                    format: date-time
                  state:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  primary_output:
                    type: object
                    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
                  input_data:
                    type: array
                    items:
                      type: object
                      properties:
                        data_point:
                          type: object
                        event:
                          type: object
                  report_allocations:
                    type: array
                    items:
                      type: object
                  downstream_batch_allocations:
                    type: array
                    items:
                      type: object
        '404':
          description: '404'
          content:
            application/json:
              examples:
                Result:
                  value:
                    status: error
                    statusCode: 404
                    errors:
                      - message: record not found
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: error
                  statusCode:
                    type: integer
                    example: 404
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: record not found
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: ''

````