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

# Count Dawakhana Orders

> 
### Overview

This API returns the number of **Dawakhana orders** of your workspace in each status, for dashboard counters. The counts cover every matching order, regardless of paging.

`from`, `to` and `admissionId` filter the status counts the same way as [List Dawakhana Orders](/api-reference/doc-tool/ipd-api/dawakhana/list-dawakhana-orders). `clearancePending` is the number of admissions still waiting for the in-house pharmacy's discharge clearance, and is not affected by the filters.



## OpenAPI

````yaml get /ipd/v1/service/dawakhana/orders/count
openapi: 3.0.0
info:
  title: Ekacare API & Webhook Documentation
  contact: {}
  version: '1.0'
servers:
  - description: Production
    url: https://api.eka.care
  - description: Stage/Sandbox
    url: https://api.dev.eka.care
security: []
paths:
  /ipd/v1/service/dawakhana/orders/count:
    get:
      tags:
        - IPD API
      summary: Count Dawakhana Orders
      description: >-

        ### Overview


        This API returns the number of **Dawakhana orders** of your workspace in
        each status, for dashboard counters. The counts cover every matching
        order, regardless of paging.


        `from`, `to` and `admissionId` filter the status counts the same way as
        [List Dawakhana
        Orders](/api-reference/doc-tool/ipd-api/dawakhana/list-dawakhana-orders).
        `clearancePending` is the number of admissions still waiting for the
        in-house pharmacy's discharge clearance, and is not affected by the
        filters.
      operationId: CountIpdDawakhanaOrders
      parameters:
        - name: auth
          in: header
          required: true
          schema:
            type: string
          example: >-
            eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJiX2lkIjoiMTIzNDU2IiwiY2xpZW50X2lkIjoiNzg5MCIsImV4dHJhX2ZpZWxkIjoiZXh0cmFfZmllbGRfZGF0YSJ9.q9KzBI6f4l3OyM_EkB5Quq0l9EEMFh5JS-fx3F_PHUM
        - name: from
          in: query
          description: >-
            Only orders created on or after this time (ISO-8601 date or epoch
            milliseconds). Ignored with `admissionId`.
          required: false
          schema:
            type: string
        - name: to
          in: query
          description: >-
            Only orders created on or before this time (ISO-8601 date or epoch
            milliseconds). Ignored with `admissionId`.
          required: false
          schema:
            type: string
        - name: admissionId
          in: query
          description: Only orders of this IPD admission (all dates).
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK — the order counts.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/IpdDawakhanaCounts'
              example:
                success: true
                data:
                  CREATED: 4
                  DISPATCHED: 12
                  CANCELLED: 1
                  RETURNED: 2
                  PARTIALLY_RETURNED: 1
                  clearancePending: 3
        '400':
          description: Bad Request — `from` or `to` is not a valid date.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IpdServiceFailure'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IpdServiceError'
      deprecated: false
components:
  schemas:
    IpdDawakhanaCounts:
      title: IpdDawakhanaCounts
      type: object
      properties:
        CREATED:
          type: number
          description: Orders waiting to be dispatched.
        DISPATCHED:
          type: number
          description: Dispatched orders.
        CANCELLED:
          type: number
          description: Cancelled orders.
        RETURNED:
          type: number
          description: Fully returned orders.
        PARTIALLY_RETURNED:
          type: number
          description: Partially returned orders.
        clearancePending:
          type: number
          description: Admissions waiting for the in-house pharmacy's discharge clearance.
    IpdServiceFailure:
      title: IpdServiceFailure
      type: object
      properties:
        success:
          type: boolean
          description: Always `false`.
        error:
          type: string
          description: Human-readable error message.
    IpdServiceError:
      title: IpdServiceError
      type: object
      properties:
        message:
          type: string
          description: Human-readable error message.

````

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