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

# List the batches of a cell specification

> List a specification's batches, each with its ``instance_count``.

Parameters
----------
cell_spec_id : str
    Specification whose batches to list.
limit : int, optional
    Page size, 1–1000. Defaults to 100.
offset : int, optional
    Number of records to skip.
order_by : {"name", "date_manufactured", "created_at", "updated_at"}, optional
    Column to sort by. Defaults to ``created_at``.
order : {"asc", "desc"}, optional
    Sort direction. Defaults to ``desc``.

Returns
-------
CellBatchListResponse
    Page of batches plus the total number matching the filters.



## OpenAPI

````yaml https://api.ionworks.com/openapi.json get /cell_specifications/{cell_spec_id}/cell_batches
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.ionworks.com
    description: Production
security: []
paths:
  /cell_specifications/{cell_spec_id}/cell_batches:
    get:
      tags:
        - Cell Specifications
        - Cell Batches
      summary: List the batches of a cell specification
      description: >-
        List a specification's batches, each with its ``instance_count``.


        Parameters

        ----------

        cell_spec_id : str
            Specification whose batches to list.
        limit : int, optional
            Page size, 1–1000. Defaults to 100.
        offset : int, optional
            Number of records to skip.
        order_by : {"name", "date_manufactured", "created_at", "updated_at"},
        optional
            Column to sort by. Defaults to ``created_at``.
        order : {"asc", "desc"}, optional
            Sort direction. Defaults to ``desc``.

        Returns

        -------

        CellBatchListResponse
            Page of batches plus the total number matching the filters.
      operationId: list_cell_batches_cell_specifications__cell_spec_id__cell_batches_get
      parameters:
        - name: cell_spec_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Cell Spec Id
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            default: 100
            title: Limit
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
        - name: name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Name filter, e.g. ``ilike.%2026%`` for a partial match
            title: Name
          description: Name filter, e.g. ``ilike.%2026%`` for a partial match
        - name: created_at
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Created At
        - name: created_at_gt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Created At Gt
        - name: created_at_lt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Created At Lt
        - name: updated_at
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Updated At
        - name: updated_at_gt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Updated At Gt
        - name: updated_at_lt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Updated At Lt
        - name: order_by
          in: query
          required: false
          schema:
            enum:
              - name
              - date_manufactured
              - created_at
              - updated_at
            type: string
            default: created_at
            title: Order By
        - name: order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: desc
            title: Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CellBatchListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CellBatchListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/CellBatch'
          type: array
          title: Items
        count:
          type: integer
          title: Count
        total:
          type: integer
          title: Total
      type: object
      required:
        - items
        - count
        - total
      title: CellBatchListResponse
      description: Paginated list of cell batches.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CellBatch:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the batch
        organization_id:
          type: string
          title: Organization Id
          description: ID of the organization that owns this batch
        project_id:
          type: string
          title: Project Id
          description: ID of the project that owns this batch
        cell_specification_id:
          type: string
          title: Cell Specification Id
          description: Cell specification this batch is a production run of
        name:
          type: string
          title: Name
          description: Lot name or number, unique (case-insensitively) per specification
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
          description: Free-text notes about the batch
        date_manufactured:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Date Manufactured
          description: Manufacture date of the batch
        properties:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Properties
          description: >-
            Free-form lot metadata (datasheet lot number, QC results). Numeric
            values use the Quantity format.
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By
          description: User ID of the user who created this batch
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the batch was created
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: When the batch was last updated
        instance_count:
          type: integer
          title: Instance Count
          description: Number of cell instances filed under this batch
          default: 0
      type: object
      required:
        - id
        - organization_id
        - project_id
        - cell_specification_id
        - name
        - created_at
        - updated_at
      title: CellBatch
      description: A manufacturing lot of one cell specification, as returned by the API.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````

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