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

# Get subscription details



## OpenAPI

````yaml get /v1/subscriptions/{subscription_hash_id}
openapi: 3.0.1
info:
  title: SwipeAPI
  description: Partner API
  version: '2.0'
servers:
  - url: https://app.getswipe.in/api/partner
security:
  - bearerAuth: []
tags:
  - name: Document
    description: Document related operations
  - name: Customer
    description: Customer related operations
  - name: Payment
    description: Payment related operations
  - name: Product
    description: Product related operations
  - name: Utility
    description: Generic operations
  - name: Subscriptions
    description: Subscriptions related operations
  - name: Document V2
    description: Document related operations
  - name: Customer V2
    description: Customer related operations
  - name: Payment V2
    description: Payment related operations
  - name: Product V2
    description: Product related operations
  - name: Subscriptions V2
    description: Subscriptions related operations
  - name: Utility V2
    description: Generic operations
  - name: Vendor V2
    description: Vendor related operations
  - name: EwayBill
    description: EwayBill related operations
  - name: Inventory V2
    description: Inventory related operations
paths:
  /v1/subscriptions/{subscription_hash_id}:
    get:
      tags:
        - Subscriptions
      summary: Get subscription details
      operationId: get_subscription
      parameters:
        - name: subscription_hash_id
          in: path
          description: The hash id of the document
          required: true
          schema:
            type: string
        - name: num_records
          in: query
          description: Number of records to fetch
          schema:
            type: string
            default: '10'
        - name: page
          in: query
          description: Page number
          schema:
            type: integer
            default: 1
      responses:
        '200':
          description: Subscription fetched successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSubscriptionInvoices'
        '400':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionErrorResponse'
        '404':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionErrorResponse'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionErrorResponse'
components:
  schemas:
    GetSubscriptionInvoices:
      type: object
      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
          properties: {}
          description: Error details
        data:
          $ref: '#/components/schemas/SubscriptionData'
    SubscriptionErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
          default: true
        message:
          type: string
          description: Success Message
          example: Message
        error_code:
          type: string
          description: Error Code
          example: ''
        errors:
          type: object
          properties: {}
          description: Error details
        data:
          type: object
          properties: {}
          description: Data
    SubscriptionData:
      type: object
      properties:
        invoices:
          type: array
          description: List of invoices
          items:
            $ref: '#/components/schemas/Invoice'
        total_records:
          type: integer
          description: Total number of records
          example: 10
    Invoice:
      type: object
      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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer authentication header of the form Bearer <token>, where <token>
        is your auth token.

````