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

# Search Invoices

> Search invoices by query string (matching invoice number, client name, sales order, or client PO) and optionally filter by status.



## OpenAPI

````yaml /api/openapi-cutmake.json get /api/v1/invoices/search
openapi: 3.1.0
info:
  title: VM App API
  version: 0.1.0
servers:
  - url: https://vinmake-erp.onrender.com
security: []
paths:
  /api/v1/invoices/search:
    get:
      tags:
        - Invoices
      summary: Search Invoices
      description: >-
        Search invoices by query string (matching invoice number, client name,
        sales order, or client PO) and optionally filter by status.
      operationId: search_invoices_api_v1_invoices_search_get
      parameters:
        - name: q
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Q
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Status
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 10
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/routers__external__invoices__InvoiceResponse
                title: Response Search Invoices Api V1 Invoices Search Get
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    routers__external__invoices__InvoiceResponse:
      properties:
        id:
          type: string
          title: Id
        invoiceNumber:
          type: string
          title: Invoicenumber
        invoiceType:
          anyOf:
            - type: string
            - type: 'null'
          title: Invoicetype
        salesOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Salesorderid
        salesOrderNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Salesordernumber
        clientId:
          anyOf:
            - type: string
            - type: 'null'
          title: Clientid
        clientName:
          anyOf:
            - type: string
            - type: 'null'
          title: Clientname
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        subtotal:
          anyOf:
            - type: number
            - type: 'null'
          title: Subtotal
        taxRate:
          anyOf:
            - type: number
            - type: 'null'
          title: Taxrate
        taxAmount:
          anyOf:
            - type: number
            - type: 'null'
          title: Taxamount
        totalAmount:
          anyOf:
            - type: number
            - type: 'null'
          title: Totalamount
        paidAmount:
          anyOf:
            - type: number
            - type: 'null'
          title: Paidamount
        remainingBalance:
          anyOf:
            - type: number
            - type: 'null'
          title: Remainingbalance
        issuedDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Issueddate
        dueDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Duedate
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
        createdAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdat
        lineItems:
          anyOf:
            - items:
                $ref: '#/components/schemas/InvoiceLineItem'
              type: array
            - type: 'null'
          title: Lineitems
        misaStatus:
          anyOf:
            - type: string
            - type: 'null'
          title: Misastatus
        approvedBy:
          anyOf:
            - type: string
            - type: 'null'
          title: Approvedby
        approvedAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Approvedat
        misaRefId:
          anyOf:
            - type: string
            - type: 'null'
          title: Misarefid
        misaInvoiceCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Misainvoicecode
        misaInvoiceSeries:
          anyOf:
            - type: string
            - type: 'null'
          title: Misainvoiceseries
        misaSignedDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Misasigneddate
        misaErrorCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Misaerrorcode
        misaErrorMessage:
          anyOf:
            - type: string
            - type: 'null'
          title: Misaerrormessage
        misaRetryCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Misaretrycount
        misaLastAttemptAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Misalastattemptat
      type: object
      required:
        - id
        - invoiceNumber
      title: InvoiceResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    InvoiceLineItem:
      properties:
        id:
          type: string
          title: Id
        invoiceId:
          type: string
          title: Invoiceid
        salesOrderLineItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Salesorderlineitemid
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        qty:
          anyOf:
            - type: number
            - type: 'null'
          title: Qty
        unitPrice:
          anyOf:
            - type: number
            - type: 'null'
          title: Unitprice
        amount:
          anyOf:
            - type: number
            - type: 'null'
          title: Amount
      type: object
      required:
        - id
        - invoiceId
      title: InvoiceLineItem
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````