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

# Count subscriptions that changed to a specific status in a date range

> Count subscriptions that changed to a specific status in a date range



## OpenAPI

````yaml /generated/specs/operations.json get /api/v1/subscription_history/count-by-status
openapi: 3.0.0
info:
  title: Raul API - Operaciones
  description: Suscripciones, GPS, actividades, visitas y operacion tecnica.
  version: 2.0.0
  contact: {}
servers:
  - url: https://api.raul.ugps.io
    description: Production
security: []
tags: []
paths:
  /api/v1/subscription_history/count-by-status:
    get:
      tags:
        - Subscription History
      summary: Count subscriptions that changed to a specific status in a date range
      description: Count subscriptions that changed to a specific status in a date range
      operationId: SubscriptionHistoryController_countByStatus
      parameters:
        - name: status_changed
          required: true
          in: query
          description: Status ID to count (2 = Desactivado)
          schema:
            type: number
        - name: date_from
          required: true
          in: query
          description: Start date (ISO 8601)
          schema:
            type: string
        - name: date_to
          required: true
          in: query
          description: End date (ISO 8601)
          schema:
            type: string
        - name: client_id
          required: false
          in: query
          description: Filter by client ID
          schema:
            type: string
      responses:
        '200':
          description: Count of status changes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusChangesCountResponseDto'
      security:
        - bearerAuth: []
components:
  schemas:
    StatusChangesCountResponseDto:
      type: object
      properties:
        count:
          type: number
          description: Number of status changes
        status_id:
          type: number
          description: Status ID
        status_name:
          type: string
          description: Status name
        date_from:
          type: string
          description: Start date of range
        date_to:
          type: string
          description: End date of range
      required:
        - count
        - status_id
        - status_name
        - date_from
        - date_to
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer token authentication

````