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

# List Batches

> List Batches using the specified filter.



## OpenAPI

````yaml https://cdn.ecrypt.dev/swagger/reporting-v6-swagger.json post /api/Batch
openapi: 3.0.4
info:
  title: Ecrypt.Reporting.UI.Api
  description: Ecrypt API
  contact:
    name: Ecrypt
    url: https://www.ecrypt.com/
    email: Engineering@Ecrypt.com
  version: 1.0.0.0
servers:
  - url: https://reporting.ecrypt.com/
    description: Ecrypt Reporting Api.
security:
  - X-Api-Key: []
paths:
  /api/Batch:
    post:
      tags:
        - Batch
      summary: List Batches
      description: List Batches using the specified filter.
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchResponse'
        '204':
          description: No Content
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    BatchRequest:
      required:
        - endDate
        - startDate
      type: object
      properties:
        startDate:
          type: string
          description: "Start date, all date times are in UTC.\r\n\r\nFormat:\r\n- yyyy-MM-dd\r\n- yyyy-MM-ddTHH:mm\r\n- yyyy-MM-ddTHH:mm:ss\r\n- yyyy-MM-ddTHH:mm:ss.fff"
          format: date-time
          default: '2025-01-01'
        endDate:
          type: string
          description: "End date, all date times are in UTC.\r\n\r\nFormat:\r\n- yyyy-MM-dd\r\n- yyyy-MM-ddTHH:mm\r\n- yyyy-MM-ddTHH:mm:ss\r\n- yyyy-MM-ddTHH:mm:ss.fff"
          format: date-time
          default: '2025-02-01'
        sortColumn:
          maxLength: 100
          minLength: 0
          pattern: ^[A-Za-z0-9]*$
          type: string
          description: "Sort column, the column being used for sorting. The default is batch `Id`.\r\n\r\nValid Options:\r\n- `Id`\r\n- `Closed`\r\n- `Sales`\r\n- `Refunds`\r\n- `Voids`\r\n- `GrossRevenue`\r\n- `RefundTotal`\r\n- `NetIncome`\r\n- `Status`"
          default: Id
          nullable: true
        page:
          maximum: 2147483647
          minimum: 1
          type: integer
          description: Page, the of results being requested.
          format: int32
          default: 1
          nullable: true
        pageSize:
          maximum: 1000
          minimum: 1
          type: integer
          description: Page size, the number of items being requested for the page.
          format: int32
          default: 20
          nullable: true
        sortOrder:
          maxLength: 20
          minLength: 0
          pattern: ^[A-Za-z]*$
          type: string
          description: "Sort order, the sort columns desired sort direction. The default is `DESC`.\r\n\r\nExamples:\r\n- `ASC`\r\n- `DESC`"
          default: DESC
          nullable: true
      additionalProperties: false
      nullable: true
    BatchResponse:
      type: object
      properties:
        batches:
          $ref: '#/components/schemas/BatchPagedList'
      additionalProperties: false
      nullable: true
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
      nullable: true
    BatchPagedList:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Batch'
          nullable: true
        page:
          type: integer
          format: int32
        pageSize:
          type: integer
          format: int32
        totalCount:
          type: integer
          format: int64
      additionalProperties: false
      nullable: true
    Batch:
      type: object
      properties:
        id:
          type: integer
          description: Ecrypt Batch ID.
          format: uint64
        closed:
          type: string
          description: Closed date time represented in UTC.
          format: date-time
        status:
          $ref: '#/components/schemas/SETTLEMENT_BATCH_STATUSCODE'
        sales:
          type: integer
          description: Number of sales in the batch.
          format: int32
        refunds:
          type: integer
          description: Number of refunds in the batch.
          format: int32
        voids:
          type: integer
          description: Number of voids in the batch.
          format: int32
        grossRevenue:
          type: number
          description: Gross revenue is the total of sales and captured authorizations.
          format: decimal
        refundTotal:
          type: number
          description: Refunds total amount for the batch.
          format: decimal
        netIncome:
          type: number
          description: Net income is the `Gross Revenue` minus the `Refund Total`.
          format: decimal
      additionalProperties: false
      nullable: true
    SETTLEMENT_BATCH_STATUSCODE:
      enum:
        - INITIALIZING
        - ACTIVE
        - DISABLED
        - ERROR
        - DELETED
        - INPROGRESS
        - COMPLETED
      type: string
      x-enumNames:
        - INITIALIZING
        - ACTIVE
        - DISABLED
        - ERROR
        - DELETED
        - INPROGRESS
        - COMPLETED
      x-enumDescriptions:
        - settlement batch is initializing
        - settlement batch is active
        - settlement batch is disabled
        - settlement batch is error
        - settlement batch is deleted
        - settlement batch is inprogress
        - settlement batch is completed
  securitySchemes:
    X-Api-Key:
      type: apiKey
      description: Enter your API key
      name: X-Api-Key
      in: header

````