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

> Search for customers based on specified criteria



## OpenAPI

````yaml /api-reference/openapi.json post /api/rest/customers/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/customers/search:
    post:
      tags:
        - Customers
      summary: Search Customers
      description: Search for customers based on specified 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: CustomersOrderBy (simplified)
                  nullable: true
                  type: array
                where:
                  default: {}
                  description: >-
                    Boolean expression to filter rows from the table
                    "customers". All fields are combined with a logical 'AND'.
                  nullable: true
                  properties:
                    _and:
                      items:
                        type: object
                        description: CustomersBoolExp (simplified)
                      nullable: true
                      type: array
                    _not:
                      type: object
                      description: CustomersBoolExp (simplified)
                    _or:
                      items:
                        type: object
                        description: CustomersBoolExp (simplified)
                      nullable: true
                      type: array
                    addresses:
                      type: object
                      description: AddressesBoolExp (simplified)
                    addressesAggregate:
                      type: object
                      description: AddressesAggregateBoolExp (simplified)
                    addressesLastUpdatedAt:
                      type: object
                      description: TimestamptzComparisonExp (simplified)
                    balance:
                      type: object
                      description: BigintComparisonExp (simplified)
                    billToCode:
                      type: object
                      description: StringComparisonExp (simplified)
                    billToCustomer:
                      type: object
                      description: CustomersBoolExp (simplified)
                    billToCustomerId:
                      type: object
                      description: StringComparisonExp (simplified)
                    billToSource:
                      type: object
                      description: StringComparisonExp (simplified)
                    breakthroughFuelShippers:
                      type: object
                      description: CustomerIntegrationsMappingBoolExp (simplified)
                    breakthroughFuelShippersAggregate:
                      type: object
                      description: CustomerIntegrationsMappingAggregateBoolExp (simplified)
                    ccEmailAddresses:
                      type: object
                      description: StringArrayComparisonExp (simplified)
                    childCustomers:
                      type: object
                      description: CustomersBoolExp (simplified)
                    childCustomersAggregate:
                      type: object
                      description: CustomersAggregateBoolExp (simplified)
                    collector:
                      type: object
                      description: UsersBoolExp (simplified)
                    collectorId:
                      type: object
                      description: UuidComparisonExp (simplified)
                    computedCreditRating:
                      type: object
                      description: StringComparisonExp (simplified)
                    computedCreditUsage:
                      type: object
                      description: IntComparisonExp (simplified)
                    computedDeliveryMethod:
                      type: object
                      description: StringComparisonExp (simplified)
                    computedInvoiceEmail:
                      type: object
                      description: StringComparisonExp (simplified)
                    computedRemittanceEmail:
                      type: object
                      description: StringComparisonExp (simplified)
                    contacts:
                      type: object
                      description: ContactsBoolExp (simplified)
                    contactsAggregate:
                      type: object
                      description: ContactsAggregateBoolExp (simplified)
                    contactsLastUpdatedAt:
                      type: object
                      description: TimestamptzComparisonExp (simplified)
                    createdAt:
                      type: object
                      description: TimestamptzComparisonExp (simplified)
                    credit:
                      type: object
                      description: JsonbComparisonExp (simplified)
                    customerEmailSettings:
                      type: object
                      description: CustomerEmailSettingsBoolExp (simplified)
                    customerEmailSettingsAggregate:
                      type: object
                      description: CustomerEmailSettingsAggregateBoolExp (simplified)
                    customerIntegrationMappings:
                      type: object
                      description: CustomerIntegrationsMappingBoolExp (simplified)
                    customerIntegrationMappingsAggregate:
                      type: object
                      description: CustomerIntegrationsMappingAggregateBoolExp (simplified)
                    customerIntegrationSettings:
                      type: object
                      description: CustomerIntegrationSettingsBoolExp (simplified)
                    customerIntegrationSettingsAggregate:
                      type: object
                      description: CustomerIntegrationSettingsAggregateBoolExp (simplified)
                    customerRule:
                      type: object
                      description: CustomerRulesBoolExp (simplified)
                    deletedAt:
                      type: object
                      description: TimestampComparisonExp (simplified)
                    deliveryMethods:
                      type: object
                      description: DeliveryMethodsBoolExp (simplified)
                    deliveryMethodsAggregate:
                      type: object
                      description: DeliveryMethodsAggregateBoolExp (simplified)
                    deliveryRoutingRules:
                      type: object
                      description: DeliveryRoutingRulesBoolExp (simplified)
                    deliveryRoutingRulesAggregate:
                      type: object
                      description: DeliveryRoutingRulesAggregateBoolExp (simplified)
                    emailAddress:
                      type: object
                      description: StringComparisonExp (simplified)
                    id:
                      type: object
                      description: StringComparisonExp (simplified)
                    invoiceCreationTimetable:
                      type: object
                      description: InvoiceCreationEventsBoolExp (simplified)
                    invoiceCreationTimetableAggregate:
                      type: object
                      description: InvoiceCreationEventsAggregateBoolExp (simplified)
                    invoiceSplitRules:
                      type: object
                      description: InvoiceSplitRulesBoolExp (simplified)
                    invoiceSplitRulesAggregate:
                      type: object
                      description: InvoiceSplitRulesAggregateBoolExp (simplified)
                    invoices:
                      type: object
                      description: InvoicesBoolExp (simplified)
                    invoicesAggregate:
                      type: object
                      description: InvoicesAggregateBoolExp (simplified)
                    isActive:
                      type: object
                      description: BooleanComparisonExp (simplified)
                    mergedIntoCustomer:
                      type: object
                      description: CustomersBoolExp (simplified)
                    mergedIntoCustomerId:
                      type: object
                      description: StringComparisonExp (simplified)
                    metadata:
                      type: object
                      description: JsonbComparisonExp (simplified)
                    name:
                      type: object
                      description: StringComparisonExp (simplified)
                    notes:
                      type: object
                      description: StringComparisonExp (simplified)
                    onTimeRate:
                      type: object
                      description: NumericComparisonExp (simplified)
                    overdueBalance:
                      type: object
                      description: BigintComparisonExp (simplified)
                    overdueInvoiceCount:
                      type: object
                      description: IntComparisonExp (simplified)
                    paymentDiscountTerms:
                      type: object
                      description: JsonbComparisonExp (simplified)
                    paymentLineItems:
                      type: object
                      description: PaymentLineItemsBoolExp (simplified)
                    paymentLineItemsAggregate:
                      type: object
                      description: PaymentLineItemsAggregateBoolExp (simplified)
                    reminderSequence:
                      type: object
                      description: ReminderSequencesBoolExp (simplified)
                    reminderSequenceId:
                      type: object
                      description: StringComparisonExp (simplified)
                    reminderSettings:
                      type: object
                      description: JsonbComparisonExp (simplified)
                    reminders:
                      type: object
                      description: RemindersBoolExp (simplified)
                    remindersAggregate:
                      type: object
                      description: RemindersAggregateBoolExp (simplified)
                    remittanceLineItems:
                      type: object
                      description: RemittanceLineItemsBoolExp (simplified)
                    remittanceLineItemsAggregate:
                      type: object
                      description: RemittanceLineItemsAggregateBoolExp (simplified)
                    remittanceSettings:
                      type: object
                      description: JsonbComparisonExp (simplified)
                    remittances:
                      type: object
                      description: RemittancesBoolExp (simplified)
                    remittancesAggregate:
                      type: object
                      description: RemittancesAggregateBoolExp (simplified)
                    shipments:
                      type: object
                      description: ShipmentsBoolExp (simplified)
                    shipmentsAggregate:
                      type: object
                      description: ShipmentsAggregateBoolExp (simplified)
                    sourceSystem:
                      type: object
                      description: StringComparisonExp (simplified)
                    sourceSystemId:
                      type: object
                      description: StringComparisonExp (simplified)
                    sourceSystemMeta:
                      type: object
                      description: JsonbComparisonExp (simplified)
                    statementCreationTimetable:
                      type: object
                      description: StatementCreationEventsBoolExp (simplified)
                    statementCreationTimetableAggregate:
                      type: object
                      description: StatementCreationEventsAggregateBoolExp (simplified)
                    statementSchedules:
                      type: object
                      description: StatementSchedulesBoolExp (simplified)
                    statementSchedulesAggregate:
                      type: object
                      description: StatementSchedulesAggregateBoolExp (simplified)
                    statements:
                      type: object
                      description: StatementsBoolExp (simplified)
                    statementsAggregate:
                      type: object
                      description: StatementsAggregateBoolExp (simplified)
                    tmsBalanceCents:
                      type: object
                      description: BigintComparisonExp (simplified)
                    tmsCustomerType:
                      type: object
                      description: StringComparisonExp (simplified)
                    updatedAt:
                      type: object
                      description: TimestamptzComparisonExp (simplified)
                  title: CustomersBoolExp
                  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:
                  customers:
                    items:
                      description: columns and relationships of "customers"
                      nullable: false
                      properties:
                        addresses:
                          items:
                            description: columns and relationships of "addresses"
                            nullable: false
                            properties:
                              city:
                                nullable: true
                                title: String
                                type: string
                              country:
                                $ref: '#/components/schemas/CountryCodeEnum'
                              id:
                                nullable: false
                                title: String
                                type: string
                              stateOrProvince:
                                nullable: true
                                title: String
                                type: string
                              streetLine1:
                                nullable: true
                                title: String
                                type: string
                              streetLine2:
                                nullable: true
                                title: String
                                type: string
                              type:
                                $ref: '#/components/schemas/AddressTypeEnum'
                              zipOrPostalCode:
                                nullable: true
                                title: String
                                type: string
                            title: Addresses
                            type: object
                          nullable: false
                          type: array
                        balance:
                          $ref: '#/components/schemas/bigint'
                        billToCustomerId:
                          nullable: true
                          title: String
                          type: string
                        ccEmailAddresses:
                          items:
                            nullable: false
                            title: String
                            type: string
                          nullable: true
                          type: array
                        createdAt:
                          $ref: '#/components/schemas/timestamptz'
                        customerRule:
                          description: columns and relationships of "customer_rules"
                          nullable: true
                          properties:
                            dueOption:
                              nullable: false
                              title: Int
                              type: integer
                            id:
                              nullable: false
                              title: String
                              type: string
                          title: CustomerRules
                          type: object
                        emailAddress:
                          nullable: true
                          title: String
                          type: string
                        id:
                          nullable: false
                          title: String
                          type: string
                        metadata:
                          $ref: '#/components/schemas/jsonb'
                        name:
                          nullable: true
                          title: String
                          type: string
                        overdueBalance:
                          $ref: '#/components/schemas/bigint'
                        overdueInvoiceCount:
                          nullable: true
                          title: Int
                          type: integer
                        sourceSystem:
                          nullable: true
                          title: String
                          type: string
                        sourceSystemId:
                          nullable: true
                          title: String
                          type: string
                        updatedAt:
                          $ref: '#/components/schemas/timestamptz'
                      title: Customers
                      type: object
                    nullable: false
                    type: array
          description: Responses for POST /api/rest/customers/search
components:
  schemas:
    CountryCodeEnum:
      enum:
        - AD
        - AE
        - AF
        - AG
        - AL
        - AM
        - AO
        - AR
        - AT
        - AU
        - AZ
        - BA
        - BB
        - BD
        - BE
        - BF
        - BG
        - BH
        - BI
        - BJ
        - BN
        - BO
        - BR
        - BS
        - BT
        - BW
        - BY
        - BZ
        - CA
        - CD
        - CF
        - CG
        - CH
        - CI
        - CL
        - CM
        - CN
        - CO
        - CR
        - CU
        - CV
        - CY
        - CZ
        - DE
        - DJ
        - DK
        - DM
        - DO
        - DZ
        - EC
        - EE
        - EG
        - ER
        - ES
        - ET
        - FI
        - FJ
        - FM
        - FR
        - GA
        - GB
        - GD
        - GE
        - GH
        - GM
        - GN
        - GQ
        - GR
        - GT
        - GW
        - GY
        - HK
        - HN
        - HR
        - HT
        - HU
        - ID
        - IE
        - IL
        - IN
        - IQ
        - IR
        - IS
        - IT
        - JM
        - JO
        - JP
        - KE
        - KG
        - KH
        - KI
        - KM
        - KN
        - KP
        - KR
        - KW
        - KZ
        - LA
        - LB
        - LC
        - LI
        - LK
        - LR
        - LS
        - LT
        - LU
        - LV
        - LY
        - MA
        - MC
        - MD
        - ME
        - MG
        - MH
        - MK
        - ML
        - MM
        - MN
        - MO
        - MR
        - MT
        - MU
        - MV
        - MW
        - MX
        - MY
        - MZ
        - NA
        - NE
        - NG
        - NI
        - NL
        - 'NO'
        - NP
        - NR
        - NZ
        - OM
        - PA
        - PE
        - PG
        - PH
        - PK
        - PL
        - PR
        - PS
        - PT
        - PW
        - PY
        - QA
        - RO
        - RS
        - RU
        - RW
        - SA
        - SB
        - SC
        - SD
        - SE
        - SG
        - SI
        - SK
        - SL
        - SM
        - SN
        - SO
        - SR
        - SS
        - ST
        - SV
        - SY
        - SZ
        - TD
        - TG
        - TH
        - TJ
        - TL
        - TM
        - TN
        - TO
        - TR
        - TT
        - TV
        - TW
        - TZ
        - UA
        - UG
        - US
        - UY
        - UZ
        - VA
        - VC
        - VE
        - VN
        - VU
        - WS
        - YE
        - ZA
        - ZM
        - ZW
      nullable: false
      title: CountryCodeEnum
    AddressTypeEnum:
      enum:
        - ADDRESS_BOOK
        - CARRIER
        - CARRIER_BILLING
        - COMPANY_ADDRESS
        - CONTACT
        - CUSTOMER_BILLING
        - DELIVERY_RECEIPT
        - LUMPER_RECEIPT
        - SHIPMENT_CONSIGNEE
        - SHIPMENT_PICKUP
        - STOP
        - SUPPORTING_DOC_PARTY
      nullable: false
      title: AddressTypeEnum
    bigint:
      nullable: false
      title: bigint
    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
    jsonb:
      nullable: false
      title: jsonb

````