> ## Documentation Index
> Fetch the complete documentation index at: https://omniflow-vpn.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get v1panelcodesbatches

> Requires catalog.read. Wholesale batches with their counts. It carries no codes: only their SHA-256 is stored, so there is nothing here that could produce one.



## OpenAPI

````yaml https://raw.githubusercontent.com/kewldan/omniflow/main/api/openapi.yaml get /v1/panel/codes/batches
openapi: 3.0.3
info:
  title: Omniflow API
  version: 1.0.0
  description: >-
    Customer, commerce, payment, wallet, fulfillment, and operations API for
    Omniflow.
servers: []
security: []
paths:
  /v1/panel/codes/batches:
    get:
      tags:
        - panel
      description: >-
        Requires catalog.read. Wholesale batches with their counts. It carries
        no codes: only their SHA-256 is stored, so there is nothing here that
        could produce one.
      operationId: listPanelCodeBatches
      parameters:
        - $ref: '#/components/parameters/PageSize'
      responses:
        '200':
          description: Batches
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PanelCodeBatchList'
        '403':
          $ref: '#/components/responses/Problem'
components:
  parameters:
    PageSize:
      in: query
      name: pageSize
      schema:
        type: integer
        minimum: 1
        maximum: 500
        default: 100
  schemas:
    PanelCodeBatchList:
      type: object
      required:
        - items
        - maxBatchSize
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/PanelCodeBatch'
        maxBatchSize:
          type: integer
    PanelCodeBatch:
      type: object
      required:
        - reference
        - planVersionId
        - quantity
        - unitPriceMinor
        - currency
      properties:
        id:
          type: string
          format: uuid
        reference:
          type: string
          description: What the operator calls the batch. Unique, and what they search for.
        planCode:
          type: string
        planVersionId:
          type: string
          format: uuid
          description: >-
            A version rather than a plan: publishing a new version must not
            change what people already hold a code for.
        planVersion:
          type: integer
        billingPeriod:
          type: string
        quantity:
          type: integer
          minimum: 1
          maximum: 10000
        unitPriceMinor:
          type: integer
          format: int64
          description: >-
            The agreed wholesale price, recorded and never charged. The money
            changed hands outside Omniflow.
        currency:
          type: string
        note:
          type: string
        issued:
          type: integer
          format: int64
          description: Codes nobody has redeemed, and therefore what revoking would kill.
        redeemed:
          type: integer
          format: int64
        revoked:
          type: integer
          format: int64
        expiresAt:
          type: string
          format: date-time
          description: Absent means the codes never expire.
        revokedAt:
          type: string
          format: date-time
        revokeReason:
          type: string
        createdAt:
          type: string
          format: date-time
        createdBy:
          type: string
          format: uuid
    Problem:
      type: object
      required:
        - type
        - title
        - status
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        request_id:
          type: string
  responses:
    Problem:
      description: Request failed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.