# searchCollectionInvoices

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v0/invoice/search:
    post:
      summary: searchCollectionInvoices
      deprecated: false
      description: ''
      operationId: searchCollectionInvoicesUsingPOST
      tags:
        - >-
          Account Receivable/APIs - Account Receivable /Invoice
          Management/invoice-controller
        - invoice-controller
      parameters:
        - name: direction
          in: query
          description: ''
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
        - name: limit
          in: query
          description: ''
          required: false
          schema:
            type: integer
            format: int32
            maximum: 5000
        - name: offset
          in: query
          description: ''
          required: false
          schema:
            type: integer
            format: int32
        - name: orderBy
          in: query
          description: ''
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceSearchRequest'
            example: ''
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ApplicationResponse%C2%ABGenericPaginationResponse%C2%ABInvoiceResponse%C2%BB%C2%BB
          headers: {}
          x-apidog-name: OK
        '400':
          description: ''
          content:
            application/json:
              schema: &ref_0
                $ref: '#/components/schemas/ApplicationResponse'
          headers: {}
          x-apidog-name: Bad Request
        '401':
          description: ''
          content:
            application/json:
              schema: *ref_0
          headers: {}
          x-apidog-name: Unauthorized
        '403':
          description: ''
          content:
            application/json:
              schema: *ref_0
          headers: {}
          x-apidog-name: Forbidden
        '404':
          description: ''
          content:
            application/json:
              schema: *ref_0
          headers: {}
          x-apidog-name: Not Found
        '422':
          description: ''
          content:
            application/json:
              schema: *ref_0
          headers: {}
          x-apidog-name: Unprocessable Request
        '500':
          description: ''
          content:
            application/json:
              schema: *ref_0
          headers: {}
          x-apidog-name: Server Error
      security: []
      x-apidog-folder: >-
        Account Receivable/APIs - Account Receivable /Invoice
        Management/invoice-controller
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/616243/apis/api-18880680-run
components:
  schemas:
    InvoiceSearchRequest:
      type: object
      properties:
        approvalStatuses:
          type: array
          items:
            type: string
            enum:
              - APPROVER_APPROVAL_PENDING
              - APPROVER_APPROVED
              - APPROVER_REJECTED
              - BANK_APPROVED
              - CHECKER_APPROVAL_PENDING
              - CHECKER_APPROVED
              - CHECKER_REJECTED
              - MAKER_APPROVAL_PENDING
              - MAKER_APPROVED
              - MAKER_REJECTED
            description: Approval statuses of the invoice
        balanceAmountFrom:
          type: number
          description: Minimum balance amount for the invoice
        balanceAmountTo:
          type: number
          description: Maximum balance amount for the invoice
        baseAmountFrom:
          type: number
          description: Minimum base amount for the invoice
        baseAmountTo:
          type: number
          description: Maximum base amount for the invoice
        collectionMode:
          type: array
          items:
            type: string
          description: Modes of collection for the invoice
        createdOnFrom:
          type: string
          examples:
            - yyyy-MM-dd HH:mm:ss
          description: Start date and time for invoice creation
        createdOnTo:
          type: string
          examples:
            - yyyy-MM-dd HH:mm:ss
          description: End date and time for invoice creation
        createdVia:
          type: string
          description: Method through which the invoice was created
        customerDeleted:
          type: boolean
          description: Indicates if the customer is deleted
        customerIds:
          type: array
          items:
            type: string
          description: List of customer IDs associated with the invoice
        customerLegalName:
          type: string
          description: Legal name of the customer
        customerStatus:
          type: string
          enum:
            - ACTIVE
            - ALL
            - INACTIVE
          description: Status of the customer
        dispatched:
          type: boolean
          description: Indicates if the invoice has been dispatched
        dispatchedOnFrom:
          type: string
          examples:
            - yyyy-MM-dd HH:mm:ss
          description: Start date and time for invoice dispatch
        dispatchedOnTo:
          type: string
          examples:
            - yyyy-MM-dd HH:mm:ss
          description: End date and time for invoice dispatch
        dueDateFrom:
          type: string
          examples:
            - yyyy-MM-dd HH:mm:ss
          description: Start date and time for invoice due date
        dueDateTo:
          type: string
          examples:
            - yyyy-MM-dd HH:mm:ss
          description: End date and time for invoice due date
        invoiceDateFrom:
          type: string
          examples:
            - yyyy-MM-dd HH:mm:ss
          description: Start date and time for invoice date
        invoiceDateTo:
          type: string
          examples:
            - yyyy-MM-dd HH:mm:ss
          description: End date and time for invoice date
        invoiceIds:
          type: array
          items:
            type: string
          description: List of invoice IDs
        invoiceNumber:
          type: string
          description: Unique number of the invoice
        modifiedOnFrom:
          type: string
          examples:
            - yyyy-MM-dd
          description: Start date for last modification of the invoice
        modifiedOnTo:
          type: string
          examples:
            - yyyy-MM-dd
          description: End date for last modification of the invoice
        name:
          type: string
          description: Name associated with the invoice
        netAmountFrom:
          type: number
          description: Minimum net amount of the invoice
        netAmountTo:
          type: number
          description: Maximum net amount of the invoice
        parentCompanyId:
          type: string
          description: Parent company ID associated with the invoice
        payoutStatus:
          type: array
          items:
            type: string
            enum:
              - FAILED
              - IMPS_CALL_MADE
              - INIT
              - IN_PROGRESS
              - NEFT_CALL_MADE
              - ON_HOLD
              - PAID
              - PENDING
              - REINITIATE
              - SUCCESS
            description: Statuses of the invoice payout
        poNumber:
          type: string
          description: Purchase Order number associated with the invoice
        receivableStatuses:
          type: array
          items:
            type: string
            enum:
              - PAID
              - PARTIAL_PAID
              - REJECT
              - UNPAID
            description: Statuses of the invoice receivable
        sellerId:
          type: string
          pattern: ^CEK[A-Z0-9]{7}$
          description: Unique identifier for the seller
        totalReceivedFrom:
          type: number
          description: Minimum total amount received for the invoice
        totalReceivedTo:
          type: number
          description: Maximum total amount received for the invoice
      title: InvoiceSearchRequest
      x-apidog-orders:
        - approvalStatuses
        - balanceAmountFrom
        - balanceAmountTo
        - baseAmountFrom
        - baseAmountTo
        - collectionMode
        - createdOnFrom
        - createdOnTo
        - createdVia
        - customerDeleted
        - customerIds
        - customerLegalName
        - customerStatus
        - dispatched
        - dispatchedOnFrom
        - dispatchedOnTo
        - dueDateFrom
        - dueDateTo
        - invoiceDateFrom
        - invoiceDateTo
        - invoiceIds
        - invoiceNumber
        - modifiedOnFrom
        - modifiedOnTo
        - name
        - netAmountFrom
        - netAmountTo
        - parentCompanyId
        - payoutStatus
        - poNumber
        - receivableStatuses
        - sellerId
        - totalReceivedFrom
        - totalReceivedTo
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ApplicationResponse«GenericPaginationResponse«InvoiceResponse»»:
      type: object
      properties:
        errorResponse: &ref_2
          $ref: '#/components/schemas/ErrorResponse'
        payload:
          $ref: >-
            #/components/schemas/GenericPaginationResponse%C2%ABInvoiceResponse%C2%BB
        response_code:
          type: integer
          format: int32
        response_message:
          type: string
      title: ApplicationResponse«GenericPaginationResponse«InvoiceResponse»»
      x-apidog-orders:
        - errorResponse
        - payload
        - response_code
        - response_message
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    GenericPaginationResponse«InvoiceResponse»:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceResponse'
        recordsCount:
          type: integer
          format: int64
      title: GenericPaginationResponse«InvoiceResponse»
      x-apidog-orders:
        - data
        - recordsCount
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    InvoiceResponse:
      type: object
      properties:
        approvalStatus: &ref_1
          $ref: '#/components/schemas/EnumModel%C2%ABstring%C2%BB'
        attachmentUrl:
          type: string
        balanceAmount:
          type: number
        baseAmount:
          type: number
        cgst:
          type: number
        createdBy:
          type: string
        createdByEmail:
          type: string
        createdByMobile:
          type: string
        createdByName:
          type: string
        createdOn:
          type: string
          format: date-time
        customerId:
          type: string
        customerLegalName:
          type: string
        description:
          type: string
        dispatched:
          type: boolean
        dispatchedOn:
          type: string
          format: date-time
        dueDate:
          type: string
          format: date
        externalId:
          type: string
        hasKeyContacts:
          type: boolean
        igst:
          type: number
        invoiceAttachments:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/InvoiceAttachmentResponse'
        invoiceDate:
          type: string
          format: date-time
        invoiceId:
          type: string
        invoiceNumber:
          type: string
        modifiedBy:
          type: string
        modifiedByEmail:
          type: string
        modifiedByMobile:
          type: string
        modifiedByName:
          type: string
        modifiedOn:
          type: string
          format: date-time
        netAmount:
          type: number
        partialPaymentAllowed:
          type: boolean
        payableReferenceId:
          type: string
        paymentLink:
          type: string
        payoutStatus: *ref_1
        poNumber:
          type: string
        receivableStatus: *ref_1
        sellerId:
          type: string
        sgst:
          type: number
        tds:
          type: number
        totalReceived:
          type: number
        via:
          type: string
      title: InvoiceResponse
      x-apidog-orders:
        - approvalStatus
        - attachmentUrl
        - balanceAmount
        - baseAmount
        - cgst
        - createdBy
        - createdByEmail
        - createdByMobile
        - createdByName
        - createdOn
        - customerId
        - customerLegalName
        - description
        - dispatched
        - dispatchedOn
        - dueDate
        - externalId
        - hasKeyContacts
        - igst
        - invoiceAttachments
        - invoiceDate
        - invoiceId
        - invoiceNumber
        - modifiedBy
        - modifiedByEmail
        - modifiedByMobile
        - modifiedByName
        - modifiedOn
        - netAmount
        - partialPaymentAllowed
        - payableReferenceId
        - paymentLink
        - payoutStatus
        - poNumber
        - receivableStatus
        - sellerId
        - sgst
        - tds
        - totalReceived
        - via
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    InvoiceAttachmentResponse:
      type: object
      properties:
        attachmentSource:
          type: string
          enum:
            - TALLY_INVOICE
            - UI_INVOICE
        createdBy:
          type: string
        deleted:
          type: boolean
        fileExt:
          type: string
        invoiceAttachmentId:
          type: string
        modifiedBy:
          type: string
        originalFilename:
          type: string
        primary:
          type: boolean
        referenceId:
          type: string
        remarks:
          type: string
        shared:
          type: boolean
        url:
          type: string
      title: InvoiceAttachmentResponse
      x-apidog-orders:
        - attachmentSource
        - createdBy
        - deleted
        - fileExt
        - invoiceAttachmentId
        - modifiedBy
        - originalFilename
        - primary
        - referenceId
        - remarks
        - shared
        - url
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    EnumModel«string»:
      type: object
      properties:
        label:
          type: string
        name:
          type: string
          enum:
            - PAID
            - PARTIAL_PAID
            - REJECT
            - UNPAID
      title: EnumModel«string»
      x-apidog-orders:
        - label
        - name
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ErrorResponse:
      type: object
      properties:
        apiSubErrors:
          type: array
          items:
            $ref: '#/components/schemas/ApiSubError'
        errorMessage:
          type: string
        errorType:
          type: string
          enum:
            - CLIENT_REQUEST_ABORT
            - CLIENT_REQUEST_ERROR
            - INVALID_ACCESS
            - RECORD_NOT_FOUND
            - SYSTEM_ERROR
            - UNAUTHORIZED
            - UNKNOWN_ERROR
            - UNPROCESSABLE_REQUEST
            - VALIDATION_ERROR
        requestId:
          type: string
        timestamp:
          type: string
          examples:
            - yyyy-MM-dd HH:mm:ss
      title: ErrorResponse
      x-apidog-orders:
        - apiSubErrors
        - errorMessage
        - errorType
        - requestId
        - timestamp
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ApiSubError:
      type: object
      title: ApiSubError
      x-apidog-orders: []
      properties: {}
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ApplicationResponse:
      type: object
      properties:
        errorResponse: *ref_2
        payload:
          type: object
          x-apidog-orders: []
          properties: {}
          x-apidog-ignore-properties: []
        response_code:
          type: integer
          format: int32
        response_message:
          type: string
      title: ApplicationResponse
      x-apidog-orders:
        - errorResponse
        - payload
        - response_code
        - response_message
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://ekpayout-uat.enkash.in
    description: Testing Env
security: []

```
