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

# List of subscriptions

> Lists subscriptions within a required date range, filterable by `status` and `customer_id`. Subscriptions are created through Create a document with `document_type=subscription`.



## OpenAPI

````yaml get /v2/subscriptions/list
openapi: 3.0.1
info:
  title: SwipeAPI
  version: '2.0'
  description: >-
    The Swipe Partner API — invoicing, payments, and GST compliance for your
    application. Create GST invoices and other documents, manage customers,
    vendors, products and inventory, record payments, and generate e-invoices
    and e-way bills.


    - Docs & guides: https://developers.getswipe.in

    - Quickstart: https://developers.getswipe.in/quickstart

    - Rate limit: 1 request/second per API key

    - All dates are DD-MM-YYYY
servers:
  - url: https://app.getswipe.in/api/partner
security:
  - bearerAuth: []
paths:
  /v2/subscriptions/list:
    get:
      tags:
        - Subscriptions V2
      summary: List of subscriptions
      description: >-
        Lists subscriptions within a required date range, filterable by `status`
        and `customer_id`. Subscriptions are created through Create a document
        with `document_type=subscription`.
      operationId: get_transactions
      parameters:
        - name: start_date
          in: query
          description: Start date for the list, [DD-MM-YYYY]
          required: true
          schema:
            type: string
            default: 01-01-2024
        - name: end_date
          in: query
          description: End date for the list, [DD-MM-YYYY]
          required: true
          schema:
            type: string
            default: 31-12-2024
        - name: status
          in: query
          description: Filter list based on status of the document
          schema:
            type: string
            enum:
              - all
              - active
              - expired
              - error
              - cancelled
            default: all
        - name: num_records
          in: query
          description: Number of records to fetch(max 100)
          schema:
            type: string
            default: 10
        - name: page
          in: query
          description: Page number
          schema:
            type: integer
            default: 1
        - name: customer_id
          in: query
          description: Customer ID
          schema:
            type: string
            default: ''
      responses:
        '200':
          description: Subscription List fetched successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSubscriptionsV2'
        '400':
          description: Error in fetching subscription list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionErrorResponseV2'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionErrorResponseV2'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionErrorResponseV2'
components:
  schemas:
    ListSubscriptionsV2:
      properties:
        success:
          type: boolean
          description: Success flag
          example: true
        message:
          type: string
          description: Message
          example: Details Fetched
        error_code:
          type: string
          description: Error code
          example: ''
        errors:
          type: object
          description: Error details
        data:
          $ref: '#/components/schemas/ListSubscriptionDataV2'
      type: object
    SubscriptionErrorResponseV2:
      properties:
        success:
          type: boolean
          default: true
          example: true
        message:
          type: string
          description: Success Message
          example: Message
        error_code:
          type: string
          description: Error Code
          example: ''
        errors:
          type: object
          description: Error details
        data:
          type: object
          description: Data
      type: object
    ListSubscriptionDataV2:
      properties:
        transactions:
          type: array
          description: List of subscriptions
          items:
            $ref: '#/components/schemas/SubscriptionDetailsV2'
        total_records:
          type: integer
          description: Total number of records
          example: 10
      type: object
    SubscriptionDetailsV2:
      properties:
        customer_id:
          type: string
          description: Customer ID
          example: Cust123
        customer_name:
          type: string
          description: Customer Name
          example: CUST123
        subscription_date:
          type: string
          description: Subscription Date
          example: 10 June 2024
        subscription_start_time:
          type: string
          description: Subscription Start Time
          example: 10 June 2024
        subscription_end_time:
          type: string
          description: Subscription End Time
          example: 10 Aug 2024
        sub_serial_number:
          type: string
          description: Subscription Serial Number
          example: SUB-123
        repeat_every:
          type: integer
          description: Repeat Every
          example: 1
        repeat_unit:
          type: string
          description: Repeat Unit
          example: months
          enum:
            - days
            - weeks
            - months
            - years
        status:
          type: string
          description: Subscription Status
          example: active
          enum:
            - active
            - expired
            - cancelled
        invoice_count:
          type: integer
          description: Invoices Count
          example: 1
        invoices:
          type: array
          description: List of invoices under this subscription
          items:
            $ref: '#/components/schemas/InvoiceV2'
        last_created_invoice:
          type: string
          description: Last Created Invoice Date
          example: 10 June 2024
        upcoming_date:
          type: string
          description: Upcoming Date
          example: 10 June 2024
        hash_id:
          type: string
          description: Hash ID
          example: SUB123
        total_amount:
          type: number
          description: Total Amount
          example: 1000
      type: object
    InvoiceV2:
      properties:
        name:
          type: string
          description: Customer Name
          example: CUST123
        id:
          type: string
          description: Customer ID
          example: Cust123
        serial_number:
          type: string
          description: Serial Number
          example: INV-123
        status:
          type: string
          description: Status
          example: active
          enum:
            - paid
            - pending
            - cancelled
        hash_id:
          type: string
          description: Hash ID
          example: SUB123
        record_time:
          type: string
          description: Record Time
          example: 10 June 2024
        total_amount:
          type: number
          description: Total Amount
          example: 1000
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is an API key from the [API
        Integration](https://app.getswipe.in/user?tab=api_integration) section
        of your dashboard. Keys are scoped to the company they are generated in
        — for testing, [add a separate test
        company](https://community.getswipe.in/t/how-to-add-new-company-on-web/1191)
        and generate the key there, so requests never touch your real books.

````