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

> Search bills by query string (matching bill number, employee name, supplier name, client name, or PO document ID).



## OpenAPI

````yaml /api/openapi-cutmake.json get /bills/search
openapi: 3.1.0
info:
  title: VM App API
  version: 0.1.0
servers:
  - url: https://vinmake-erp.onrender.com
security: []
paths:
  /bills/search:
    get:
      tags:
        - Bills
      summary: Search Bills
      description: >-
        Search bills by query string (matching bill number, employee name,
        supplier name, client name, or PO document ID).
      operationId: search_bills_bills_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/BillResponse'
                title: Response Search Bills Bills Search Get
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    BillResponse:
      properties:
        id:
          type: string
          title: Id
        billNumber:
          type: string
          title: Billnumber
        billType:
          type: string
          title: Billtype
        supplierId:
          anyOf:
            - type: string
            - type: 'null'
          title: Supplierid
        supplierName:
          anyOf:
            - type: string
            - type: 'null'
          title: Suppliername
        clientId:
          anyOf:
            - type: string
            - type: 'null'
          title: Clientid
        employeeName:
          anyOf:
            - type: string
            - type: 'null'
          title: Employeename
        employeeId:
          anyOf:
            - type: string
            - type: 'null'
          title: Employeeid
        linkedPoId:
          anyOf:
            - type: string
            - type: 'null'
          title: Linkedpoid
        purchaseOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Purchaseorderid
        purchaseOrderDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Purchaseorderdocumentid
        purchase_order:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Purchase Order
        expenseRequestId:
          anyOf:
            - type: string
            - type: 'null'
          title: Expenserequestid
        managementAccountId:
          anyOf:
            - type: string
            - type: 'null'
          title: Managementaccountid
        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
        dueDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Duedate
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        sourceOfFunds:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourceoffunds
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
        createdAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdat
        createdById:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdbyid
        glPosted:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Glposted
        postedAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Postedat
        grnId:
          anyOf:
            - type: string
            - type: 'null'
          title: Grnid
        matchStatus:
          anyOf:
            - type: string
            - type: 'null'
          title: Matchstatus
        priceVarianceAmount:
          anyOf:
            - type: number
            - type: 'null'
          title: Pricevarianceamount
        taxInvoiceReceivedDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Taxinvoicereceiveddate
        lineItems:
          anyOf:
            - items:
                $ref: '#/components/schemas/BillLineItem'
              type: array
            - type: 'null'
          title: Lineitems
        varianceAmount:
          anyOf:
            - type: number
            - type: 'null'
          title: Varianceamount
          readOnly: true
        variancePct:
          anyOf:
            - type: number
            - type: 'null'
          title: Variancepct
          readOnly: true
      type: object
      required:
        - id
        - billNumber
        - billType
        - varianceAmount
        - variancePct
      title: BillResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BillLineItem:
      properties:
        id:
          type: string
          title: Id
        billId:
          type: string
          title: Billid
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        poQty:
          anyOf:
            - type: number
            - type: 'null'
          title: Poqty
        prevBilled:
          anyOf:
            - type: number
            - type: 'null'
          title: Prevbilled
        billQty:
          anyOf:
            - type: number
            - type: 'null'
          title: Billqty
        qty:
          anyOf:
            - type: number
            - type: 'null'
          title: Qty
        uom:
          anyOf:
            - type: string
            - type: 'null'
          title: Uom
        unitPrice:
          anyOf:
            - type: number
            - type: 'null'
          title: Unitprice
        amount:
          anyOf:
            - type: number
            - type: 'null'
          title: Amount
      type: object
      required:
        - id
        - billId
      title: BillLineItem
    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
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /auth/login

````