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

# Search Bills

> Advanced search for bills with complex filtering criteria



## OpenAPI

````yaml /api-reference/openapi.json post /api/rest/bills/search
openapi: 3.1.0
info:
  description: >-
    Upwell is Accounts Receivable automation software for the logistics
    industry. We serve freight brokers, carriers, factors, and anyone who needs
    to get transportation invoices paid.


    Learn more at:


    - [Upwell.com](https://upwell.com)
  title: Upwell REST API
  version: 3.30.2
  termsOfService: https://upwell.com/legal
  contact:
    name: Upwell
    url: https://upwell.com
    email: contact@upwell.com
servers:
  - url: https://api.upwell.com
    description: Production server
  - url: https://staging.api.upwell.com
    description: Staging server
security: []
tags:
  - name: Invoice Approval
    description: Endpoints for managing customer invoice approval workflow
paths:
  /api/rest/bills/search:
    post:
      tags:
        - Bills
      summary: Search Bills
      description: Advanced search for bills with complex filtering criteria
      parameters:
        - description: >-
            Your API key will be used for authentication of the request.
            `Authorization: YOUR_API_KEY`
          in: header
          name: authorization
          schema:
            type: string
        - in: query
          name: limit
          schema:
            default: 10
            type: integer
        - in: query
          name: offset
          schema:
            default: 0
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              properties:
                limit:
                  default: 10
                  nullable: true
                  title: Int
                  type: integer
                offset:
                  default: 0
                  nullable: true
                  title: Int
                  type: integer
                orderBy:
                  default: {}
                  items:
                    type: object
                    description: BillsOrderBy (simplified)
                  nullable: true
                  type: array
                where:
                  default: {}
                  description: >-
                    Boolean expression to filter rows from the table "bills".
                    All fields are combined with a logical 'AND'.
                  nullable: true
                  properties:
                    _and:
                      items:
                        type: object
                        description: BillsBoolExp (simplified)
                      nullable: true
                      type: array
                    _not:
                      type: object
                      description: BillsBoolExp (simplified)
                    _or:
                      items:
                        type: object
                        description: BillsBoolExp (simplified)
                      nullable: true
                      type: array
                    billLineItems:
                      type: object
                      description: BillLineItemsBoolExp (simplified)
                    billLineItemsAggregate:
                      type: object
                      description: BillLineItemsAggregateBoolExp (simplified)
                    billLineItemsLastUpdatedAt:
                      type: object
                      description: TimestamptzComparisonExp (simplified)
                    billPaymentLineItems:
                      type: object
                      description: BillPaymentLineItemsBoolExp (simplified)
                    billPaymentLineItemsAggregate:
                      type: object
                      description: BillPaymentLineItemsAggregateBoolExp (simplified)
                    carrier:
                      type: object
                      description: CarriersBoolExp (simplified)
                    carrierId:
                      type: object
                      description: StringComparisonExp (simplified)
                    carrierInvoices:
                      type: object
                      description: CarrierInvoicesBoolExp (simplified)
                    carrierInvoicesAggregate:
                      type: object
                      description: CarrierInvoicesAggregateBoolExp (simplified)
                    checkOrAchNumber:
                      type: object
                      description: StringComparisonExp (simplified)
                    createdAt:
                      type: object
                      description: TimestamptzComparisonExp (simplified)
                    currency:
                      type: object
                      description: CurrencyCodeEnumComparisonExp (simplified)
                    dispatcherEmail:
                      type: object
                      description: StringComparisonExp (simplified)
                    dueDate:
                      type: object
                      description: StringComparisonExp (simplified)
                    id:
                      type: object
                      description: StringComparisonExp (simplified)
                    issueDate:
                      type: object
                      description: StringComparisonExp (simplified)
                    mcleodSettlementTransferError:
                      type: object
                      description: StringComparisonExp (simplified)
                    mcleodSettlementTransferResponse:
                      type: object
                      description: JsonbComparisonExp (simplified)
                    mcleodSettlementTransferredAt:
                      type: object
                      description: TimestamptzComparisonExp (simplified)
                    notes:
                      type: object
                      description: StringComparisonExp (simplified)
                    payToAccount:
                      type: object
                      description: StringComparisonExp (simplified)
                    proNumber:
                      type: object
                      description: StringComparisonExp (simplified)
                    referenceNumber:
                      type: object
                      description: StringComparisonExp (simplified)
                    sourceSystem:
                      type: object
                      description: StringComparisonExp (simplified)
                    sourceSystemId:
                      type: object
                      description: StringComparisonExp (simplified)
                    sourceSystemMeta:
                      type: object
                      description: JsonbComparisonExp (simplified)
                    status:
                      type: object
                      description: StringComparisonExp (simplified)
                    terms:
                      type: object
                      description: StringComparisonExp (simplified)
                    totalAmount:
                      type: object
                      description: IntComparisonExp (simplified)
                    updatedAt:
                      type: object
                      description: TimestamptzComparisonExp (simplified)
                    vendor:
                      type: object
                      description: VendorsBoolExp (simplified)
                    vendorId:
                      type: object
                      description: StringComparisonExp (simplified)
                  title: BillsBoolExp
                  type: object
              type: object
        description: >-
          Query parameters can also be provided in the request body as a JSON
          object
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  bills:
                    items:
                      description: columns and relationships of "bills"
                      nullable: false
                      properties:
                        billLineItems:
                          items:
                            description: columns and relationships of "bill_line_items"
                            nullable: false
                            properties:
                              createdAt:
                                $ref: '#/components/schemas/timestamptz'
                              description:
                                nullable: true
                                title: String
                                type: string
                              id:
                                nullable: false
                                title: String
                                type: string
                              item:
                                nullable: true
                                title: String
                                type: string
                              lineNumber:
                                nullable: false
                                title: String
                                type: string
                              quantity:
                                $ref: '#/components/schemas/numeric'
                              sourceSystem:
                                nullable: true
                                title: String
                                type: string
                              sourceSystemId:
                                nullable: true
                                title: String
                                type: string
                              totalAmount:
                                nullable: true
                                title: Int
                                type: integer
                              unitPrice:
                                nullable: true
                                title: Int
                                type: integer
                              updatedAt:
                                $ref: '#/components/schemas/timestamptz'
                            title: BillLineItems
                            type: object
                          nullable: false
                          type: array
                        carrierId:
                          nullable: false
                          title: String
                          type: string
                        checkOrAchNumber:
                          nullable: true
                          title: String
                          type: string
                        createdAt:
                          $ref: '#/components/schemas/timestamptz'
                        currency:
                          $ref: '#/components/schemas/CurrencyCodeEnum'
                        dueDate:
                          nullable: true
                          title: String
                          type: string
                        id:
                          nullable: false
                          title: String
                          type: string
                        issueDate:
                          nullable: true
                          title: String
                          type: string
                        notes:
                          nullable: true
                          title: String
                          type: string
                        payToAccount:
                          nullable: true
                          title: String
                          type: string
                        proNumber:
                          nullable: false
                          title: String
                          type: string
                        referenceNumber:
                          nullable: true
                          title: String
                          type: string
                        sourceSystem:
                          nullable: false
                          title: String
                          type: string
                        sourceSystemId:
                          nullable: true
                          title: String
                          type: string
                        sourceSystemMeta:
                          $ref: '#/components/schemas/jsonb'
                        status:
                          nullable: true
                          title: String
                          type: string
                        terms:
                          nullable: true
                          title: String
                          type: string
                        totalAmount:
                          nullable: false
                          title: Int
                          type: integer
                        updatedAt:
                          $ref: '#/components/schemas/timestamptz'
                        vendor:
                          description: Vendors
                          nullable: true
                          properties:
                            createdAt:
                              $ref: '#/components/schemas/timestamptz'
                            id:
                              nullable: false
                              title: String
                              type: string
                            name:
                              nullable: false
                              title: String
                              type: string
                            sourceSystem:
                              nullable: false
                              title: String
                              type: string
                            sourceSystemId:
                              nullable: false
                              title: String
                              type: string
                            sourceSystemMeta:
                              $ref: '#/components/schemas/jsonb'
                            updatedAt:
                              $ref: '#/components/schemas/timestamptz'
                          title: Vendors
                          type: object
                        vendorId:
                          nullable: true
                          title: String
                          type: string
                      title: Bills
                      type: object
                    nullable: false
                    type: array
          description: Responses for POST /api/rest/bills/search
components:
  schemas:
    timestamptz:
      nullable: false
      title: timestamptz
      type: string
      format: date-time
      description: >-
        A timestamp with timezone in ISO 8601 format, such as
        2024-12-16T21:57:14.525733+00:00
    numeric:
      nullable: false
      title: numeric
    CurrencyCodeEnum:
      enum:
        - AED
        - AUD
        - BRL
        - CAD
        - CHF
        - CNY
        - EGP
        - EUR
        - GBP
        - HKD
        - IDR
        - INR
        - JPY
        - KRW
        - MXN
        - MYR
        - NZD
        - QAR
        - SAR
        - SGD
        - THB
        - TRY
        - TWD
        - USD
        - VND
        - ZAR
      nullable: false
      title: CurrencyCodeEnum
    jsonb:
      nullable: false
      title: jsonb

````