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

> Lists documents of one `document_type` within a required date range. Filter by `payment_status` to track pending, partially paid, or fully paid documents.



## OpenAPI

````yaml get /v2/doc/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/doc/list:
    get:
      tags:
        - Document V2
      summary: List of documents
      description: >-
        Lists documents of one `document_type` within a required date range.
        Filter by `payment_status` to track pending, partially paid, or fully
        paid documents.
      operationId: get_transactions
      parameters:
        - name: document_type
          in: query
          required: true
          schema:
            type: string
            enum:
              - invoice
              - purchase
              - pro_forma_invoice
              - estimate
              - sales_return
              - purchase_return
              - delivery_challan
              - purchase_order
            default: invoice
        - 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: payment_status
          in: query
          description: Filter list based on payment status of the document.
          schema:
            type: string
            enum:
              - all
              - pending
              - paid
              - 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: 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:
      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/ListTransactionData'
      type: object
    DocListErrorResponse:
      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
    ListTransactionData:
      properties:
        transactions:
          type: array
          description: List of transactions
          items:
            $ref: '#/components/schemas/TransactionListModelV2'
        total_records:
          type: integer
          description: Total number of records
          example: 10
      type: object
    TransactionListModelV2:
      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:
          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
          default: 0
          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/GetPaymentV2'
        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
      type: object
    CustomerV2:
      required:
        - id
        - name
      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
      type: object
    GetPaymentV2:
      required:
        - amount
        - method
      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:
          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'
        payment_date:
          type: string
          description: Payment Date [DD-MM-YYYY]
          example: 14-02-2024
      type: object
    BankDetails:
      required:
        - account_number
        - bank_name
        - branch
        - ifsc
      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
      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.

````