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

# Counting tickets



## OpenAPI

````yaml /api-reference/openapi.json post /v1/tickets/count
openapi: 3.1.0
info:
  title: Qminder API
  version: '1.0'
  description: >-
    The Qminder API allows you to integrate queue management into your own
    applications.
servers:
  - url: https://api.qminder.com
security:
  - sec0: []
tags:
  - name: Locations
    description: Manage physical service locations
  - name: Lines
    description: Manage virtual queues within locations
  - name: Input Fields
    description: Manage custom data fields for locations
  - name: Tickets
    description: Manage visitor queue entries
  - name: Appointments
    description: Manage scheduled appointments
  - name: Users
    description: Manage user accounts and permissions
  - name: Webhooks
    description: Manage webhook subscriptions
paths:
  /v1/tickets/count:
    post:
      tags:
        - Tickets
      summary: Counting tickets
      operationId: counting-tickets
      parameters:
        - name: location
          in: query
          description: Count tickets only in the given Location.
          schema:
            type: integer
            format: int32
        - name: line
          in: query
          description: Count tickets only in the given Line.
          schema:
            type: integer
            format: int32
        - name: status
          in: query
          description: >-
            Count tickets with only the given status. Multiple statuses can be
            searched by separating them with a comma. "NEW" will return tickets
            that are in queue, and have not been called. "CALLED" will return
            tickets that are currently being served. "SERVED" will return
            tickets that have been served. "CANCELLED_BY_CLERK" will return
            tickets that have been removed from queue.
          schema:
            type: string
        - name: caller
          in: query
          description: >-
            Count tickets that have been called by the given user ID. Both
            "CALLED" and "SERVED" tickets will be returned, unless status is
            also specified.
          schema:
            type: string
        - name: minCreated
          in: query
          description: >-
            Count tickets which have been created after the given timestamp. The
            timestamp can be in ISO 8601 format, eg "2020-05-03T00:00:00Z".
            Alternatively, the timestamp can be a Unix timestamp, eg 1588767798.
          schema:
            type: string
            format: date-time
        - name: maxCreated
          in: query
          description: >-
            Count tickets which have been created before the given timestamp.
            The timestamp can be in ISO 8601 format, eg "2020-05-03T00:00:00Z".
            Alternatively, the timestamp can be a Unix timestamp, eg 1588767798.
          schema:
            type: string
            format: date-time
        - name: minCalled
          in: query
          description: >-
            Count tickets which have been called before the given timestamp. The
            timestamp can be in ISO 8601 format, eg "2020-05-03T00:00:00Z".
            Alternatively, the timestamp can be a Unix timestamp, eg 1588767798.
          schema:
            type: string
            format: date-time
        - name: maxCalled
          in: query
          description: >-
            Count tickets which have been called before the given timestamp. The
            timestamp can be in ISO 8601 format, eg "2020-05-03T00:00:00Z".
            Alternatively, the timestamp can be a Unix timestamp, eg 1588767798.
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "statusCode": 200,
                        "count": 59
                    }
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    example: 200
                    default: 0
                  count:
                    type: integer
                    example: 59
                    default: 0
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: X-Qminder-REST-API-Key
      x-default: yourbusinessapikey

````