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

# User Subscription Search with Pagination

> Retrieves subscriptions (active and inactive) for filtered date period. New subscribers and updated (unsubscribed) subscribers are returned based on date range. For broad range searches (for pulling large dataset) where only the date range is provided, a maximum of 1 day is allowed, i.e dateFrom must equal dateTo. Please also note that transactions are not updated when refunded / voided. Instead, they have a corresponding refund transaction which can be linked to the original transaction via the originalTransactionId field.



## OpenAPI

````yaml /api-reference/mitigation-api/paysight_mitigation_api.yaml post /api/mitigation/subscriptions
openapi: 3.0.0
info:
  title: Paysight Mitigation API
  version: 1.0.0
  description: >-
    API for handling mitigation-related customer service operations such as
    search and refund
servers:
  - url: https://test.paysight.io
    description: Test Server
security:
  - ApiKeyAuth: []
paths:
  /api/mitigation/subscriptions:
    post:
      tags:
        - API for Chargeback Mitigation Providers
      summary: User Subscription Search with Pagination
      description: >-
        Retrieves subscriptions (active and inactive) for filtered date period.
        New subscribers and updated (unsubscribed) subscribers are returned
        based on date range. For broad range searches (for pulling large
        dataset) where only the date range is provided, a maximum of 1 day is
        allowed, i.e dateFrom must equal dateTo. Please also note that
        transactions are not updated when refunded / voided. Instead, they have
        a corresponding refund transaction which can be linked to the original
        transaction via the originalTransactionId field.
      parameters:
        - $ref: '#/components/parameters/ClientId'
        - $ref: '#/components/parameters/UserEmail'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionRequest'
      responses:
        '200':
          description: List of subscriptions
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  count:
                    type: integer
                  pageNumber:
                    type: integer
                  moreResults:
                    type: boolean
                  subscriptions:
                    type: array
                    items:
                      $ref: '#/components/schemas/Subscription'
components:
  parameters:
    ClientId:
      name: ClientId
      in: header
      required: true
      description: >-
        Your Paysight Tenant/Client Id. This is the id of the parent company
        listed in https://app.paysight.io/management/companies. Alternatively,
        this will be provided by Paysight
      schema:
        type: string
    UserEmail:
      name: UserEmail
      in: header
      required: true
      description: The email address of the party or group making the request
      schema:
        type: string
  schemas:
    SubscriptionRequest:
      type: object
      required:
        - pageNumber
      description: Request to fetch subscriptions with filters like email and date range
      properties:
        pageNumber:
          type: integer
          description: Page number for pagination
        limit:
          type: integer
          description: >-
            The maxium number of results to return per page. Default is 100.
            Maxiumum is 1000.
        emails:
          type: array
          description: List of customer emails
          items:
            type: string
        orderIds:
          type: array
          description: List of order IDs
          items:
            type: integer
        dateFrom:
          type: string
          format: date
          description: Start date filter for subscription or unsubscription
        dateTo:
          type: string
          format: date
          description: End date filter for subscription or unsubscription
    Subscription:
      type: object
      description: Subscription record returned by mitigation subscriptions endpoint
      properties:
        parentCompanyId:
          type: integer
          description: Identifier of the parent company
        companyId:
          type: integer
          description: ID of the company owning the subscription
        mid:
          type: string
          description: Merchant Identification Number
        descriptor:
          type: string
          description: Transaction descriptor shown to customers
        id:
          type: integer
          description: Internal subscription ID
        customerId:
          type: integer
          description: ID of the subscribed customer
        subDate:
          type: string
          format: date-time
          description: Date the subscription started
        unsubDate:
          type: string
          format: date-time
          description: Date the subscription ended (if applicable)
        orderId:
          type: integer
          description: Order ID associated with the subscription
        active:
          type: boolean
          description: Whether the subscription is currently active
        unsubscribeOrderId:
          type: integer
          description: Order ID of the unsubscribe action
        email:
          type: string
          description: Customer email address
        subId:
          type: integer
          description: Subscription plan ID
        frozen:
          type: boolean
          description: Indicates if the subscription is frozen and not billing
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Your Paysight API key

````