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

# List CSV import batches

> Your recent CSV uploads for this type, newest first, with their row counts. Use it to confirm that a sync landed.

Returns the page object directly, without the `success` / `message` envelope.



## OpenAPI

````yaml get /admin/datasets/v1/batches/
openapi: 3.1.0
info:
  title: Eka Care Datasets API
  description: >-
    Manage your workspace's formulary catalogs (medications, lab tests, symptoms
    and diagnoses): upload them as JSON or CSV, keep them in sync, read them
    back, and switch on partner search in the Eka Medical Database. Every
    request acts only on the workspace your access token belongs to.
  version: 1.0.0
  contact:
    name: Eka Care Support
    url: https://eka.care/
    email: support@eka.care
servers:
  - url: https://api.eka.care
    description: Production
  - url: https://api.dev.eka.care
    description: Stage/Sandbox
security:
  - BearerAuth: []
tags:
  - name: datasets
paths:
  /admin/datasets/v1/batches/:
    get:
      tags:
        - datasets
      summary: List CSV import batches
      description: >-
        Your recent CSV uploads for this type, newest first, with their row
        counts. Use it to confirm that a sync landed.


        Returns the page object directly, without the `success` / `message`
        envelope.
      operationId: listDatasetBatches
      parameters:
        - $ref: '#/components/parameters/Type'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Offset'
      responses:
        '200':
          description: A page of batches.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchPage'
              example:
                items:
                  - batch_id: 412
                    entity_type: medication
                    status: committed
                    original_filename: catalog.csv
                    total_rows: 1000
                    valid_rows: 1000
                    error_rows: 0
                    inserted_rows: 12
                    updated_rows: 988
                    reactivated_rows: 0
                    created_at: '2026-09-28T02:00:04+00:00'
                    committed_at: '2026-09-28T02:00:09+00:00'
                count: 1
                total: 1
                limit: 100
                offset: 0
                has_more: false
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    Type:
      name: type
      in: query
      required: true
      description: Which catalog to act on.
      schema:
        type: string
        enum:
          - medication
          - lab_test
          - symptom
          - diagnosis
    Limit:
      name: limit
      in: query
      required: false
      description: Page size.
      schema:
        type: integer
        minimum: 1
        maximum: 1000
        default: 100
    Offset:
      name: offset
      in: query
      required: false
      description: Number of items to skip.
      schema:
        type: integer
        minimum: 0
        default: 0
  schemas:
    BatchPage:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              batch_id:
                type: integer
              entity_type:
                type: string
              status:
                type: string
              original_filename:
                type: string
              total_rows:
                type:
                  - integer
                  - 'null'
              valid_rows:
                type:
                  - integer
                  - 'null'
              error_rows:
                type:
                  - integer
                  - 'null'
              inserted_rows:
                type:
                  - integer
                  - 'null'
              updated_rows:
                type:
                  - integer
                  - 'null'
              reactivated_rows:
                type:
                  - integer
                  - 'null'
              created_at:
                type:
                  - string
                  - 'null'
                format: date-time
              committed_at:
                type:
                  - string
                  - 'null'
                format: date-time
        count:
          type: integer
        total:
          type: integer
        limit:
          type: integer
        offset:
          type: integer
        has_more:
          type: boolean
    ErrorResponse:
      type: object
      required:
        - success
        - message
      properties:
        success:
          type: boolean
          const: false
        message:
          type: string
        errors:
          type: array
          description: >-
            Present when validation failed or the shrink guard stopped a
            reconcile.
          items:
            oneOf:
              - $ref: '#/components/schemas/FieldError'
              - $ref: '#/components/schemas/ShrinkGuardError'
    FieldError:
      type: object
      properties:
        index:
          type:
            - integer
            - 'null'
          description: >-
            For a JSON body, the 0-based position of the failing record in the
            list. For a CSV, the 1-based data row (the header row is not
            counted). `null` for a file-level error.
        field:
          type:
            - string
            - 'null'
        msg:
          type: string
        value:
          description: The rejected value.
    ShrinkGuardError:
      type: object
      properties:
        code:
          type: string
          const: shrink_guard
        active_before:
          type: integer
        would_deactivate:
          type: integer
  responses:
    BadRequest:
      description: Invalid request, for example a missing or unknown `type`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            message: >-
              type must be one of 'medication', 'lab_test', 'symptom',
              'diagnosis'
    Unauthorized:
      description: The access token is missing, invalid or expired.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Access token for your workspace.

````