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



## OpenAPI

````yaml get /v2/doc/list
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:
  /v2/doc/list:
    get:
      tags:
        - Document V2
      summary: List of documents
      operationId: v2_get_transactions
      parameters:
        - name: document_type
          in: query
          required: true
          schema:
            type: string
            default: invoice
            enum:
              - invoice
              - purchase
              - pro_forma_invoice
              - estimate
              - sales_return
              - purchase_return
              - delivery_challan
              - purchase_order
        - name: start_date
          in: query
          description: Start date for the list, [DD-MM-YYY]
          required: true
          schema:
            type: string
            default: 01-01-2024
        - name: end_date
          in: query
          description: End date for the list, [DD-MM-YYY]
          required: true
          schema:
            type: string
            default: 31-12-2024
        - name: payment_status
          in: query
          description: Filter list based on payment status of the document.
          schema:
            type: string
            default: all
            enum:
              - all
              - pending
              - paid
              - cancelled
        - 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
      responses:
        '200':
          description: Documents List fetched successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTransactionsV2'
        '400':
          description: Error in fetching documents list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocListErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocListErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocListErrorResponse'
components:
  schemas:
    ListTransactionsV2:
      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/ListTransactionData'
    DocListErrorResponse:
      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
    ListTransactionData:
      type: object
      properties:
        transactions:
          type: array
          description: List of transactions
          items:
            $ref: '#/components/schemas/TransactionListModelV2'
        total_records:
          type: integer
          description: Total number of records
          example: 10
    TransactionListModelV2:
      type: object
      properties:
        serial_number:
          type: string
          description: Invoice number assigned to document
          example: INV-12
        document_date:
          type: string
          description: Transaction date [DD-MM-YYYY]
          example: 11-06-2024
        customer:
          type: object
          description: Customer Details for the document
          allOf:
            - $ref: '#/components/schemas/CustomerV2'
        due_date:
          type: string
          description: Transaction date [DD-MM-YYYY]
          example: 11-06-2024
        amount_paid:
          type: number
          description: Amount Paid for the document
          example: 28
        amount_pending:
          type: number
          description: Remaining amount to be paid for the document
          example: 90
        reference:
          type: string
          description: Reference Text
        notes:
          type: string
          description: Notes for the document
        terms:
          type: string
          description: Terms and Conditions
        is_created_by_recurring:
          type: integer
          description: Is the invoice created from subscriptions
          example: 0
        net_amount:
          type: number
          description: Net amount of the transaction
          example: 100
        hash_id:
          type: string
          description: Hash id for the document
        payment_status:
          type: string
          description: Payment status of the document
          example: paid
          enum:
            - paid
            - pending
            - cancelled
        payments:
          type: array
          description: List of payments recorded for this document
          items:
            $ref: '#/components/schemas/PaymentV2'
        tax_amount:
          type: number
          description: Tax amount of the transaction
          example: 18
        total_amount:
          type: number
          description: Total amount of the transaction
          example: 118
        total_discount:
          type: number
          description: Discount given on this document
          example: 100
    CustomerV2:
      required:
        - id
        - name
      type: object
      properties:
        id:
          type: string
          description: Unique id for each party.
          example: CUST123
        name:
          type: string
          description: Name of the Party
          example: John Doe
        country_code:
          type: string
          description: Party Phone Number Country code
          example: '91'
        phone_number:
          type: string
          description: Party Phone Number
          example: '1234567890'
        company_name:
          type: string
          description: Company Name
          example: Company Name
        email:
          type: string
          description: Party Email
          example: johndoe@example.com
        gstin:
          type: string
          description: GSTIN
          example: 27AARCS7202C1ZD
    PaymentV2:
      required:
        - amount
        - method
      type: object
      properties:
        amount:
          type: number
          description: Payment Amount
          example: 100
        method:
          type: string
          description: Payment method, use only specified values
          example: upi
          enum:
            - cash
            - card
            - upi
            - netBanking
            - cheque
            - emi
        notes:
          type: string
          description: Any internal notes for payment
          example: Payment notes
        bank_details:
          type: object
          description: >-
            Bank Details, refer Bank Details Object below for parameters, If
            account_number, ifsc matched with existing bank details, it will be
            used, else new bank details will be added to your swipe account. It
            will link document payments to your company bank details.
          allOf:
            - $ref: '#/components/schemas/BankDetails'
    BankDetails:
      required:
        - account_number
        - bank_name
        - branch
        - ifsc
      type: object
      properties:
        account_number:
          type: string
          description: Account Number
          example: '1234567890'
        ifsc:
          type: string
          description: IFSC Code
          example: SBIN0000001
        bank_name:
          type: string
          description: Bank Name
          example: State Bank of India
        branch:
          type: string
          description: Branch
          example: Mumbai
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer authentication header of the form Bearer <token>, where <token>
        is your auth token.

````