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

# Preview batch generation

> Previews what batches would be created for the given time range. Does not create any batches.



## OpenAPI

````yaml POST /ledgers/{ledger_id}/generate_preview
openapi: 3.1.0
info:
  title: Mangrove - API
  version: 1.1.0
servers:
  - url: https://app.gomangrove.com/api/v1
security:
  - sec0: []
paths:
  /ledgers/{ledger_id}/generate_preview:
    post:
      summary: Preview batch generation
      description: >-
        Previews what batches would be created for the given time range. Does
        not create any batches.
      operationId: generate-preview
      parameters:
        - name: ledger_id
          in: path
          description: Ledger friendly ID (e.g., lgr_abc123def456)
          schema:
            type: string
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - start_time
                - end_time
              properties:
                start_time:
                  type: string
                  format: date-time
                  description: Start of the time range
                end_time:
                  type: string
                  format: date-time
                  description: End of the time range
                data_point_ids:
                  type: array
                  description: >-
                    Optional array of data point friendly IDs. If omitted,
                    auto-discovers from time range.
                  items:
                    type: string
            examples:
              Request Example:
                value:
                  start_time: '2025-01-01T00:00:00.000Z'
                  end_time: '2025-03-31T23:59:59.000Z'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    data:
                      - id: lgr_abc123def456
                        name: Net Carbon Removal
                        count: 3
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        count:
                          type: integer
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: ''

````