---
title: "Generate a Customer Segment Clause"
method: POST
path: "/v2/segments/generate"
tags: ["segments"]
---

# Generate a Customer Segment Clause

`POST /v2/segments/generate`

## Request

- Base URL: `https://api.stuut.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.stuut.ai/v2/segments/generate`
- Auth: HTTP bearer

Generate a Customer Segment Clause

## Request body

- GenerateClauseInput
  - `prompt` string, required

## Response `200`

Successful Response

- GeneratedClause: A generated segment clause or an explanation of why one could not be generated.
  - `clause` CustomerSegmentFilterOutput
    - `and` CustomerSegmentFilterOutput[]: Additional filters that must all match.
    - `or` CustomerSegmentFilterOutput[]: Alternative filters where at least one must match.
    - `name` union: The customer's current name, or whether a name is set. Matching ignores capitalization unless case is sensitive.
      - CustomerNameComparator
        - `eq` string
        - `neq` string
        - `in` string[]
        - `nin` string[]
        - `contains` string
        - `not_contains` string
        - `starts_with` string
        - `not_starts_with` string
        - `ends_with` string
        - `not_ends_with` string
        - `case` 'sensitive' | 'insensitive'
      - NullComparator: Test whether a nullable scalar field is null.
        - `null` boolean, required
    - `remoteId` StringComparator: One string comparison with an optional case-sensitivity modifier.
      - `eq` string
      - `neq` string
      - `in` string[]
      - `nin` string[]
      - `contains` string
      - `not_contains` string
      - `starts_with` string
      - `not_starts_with` string
      - `ends_with` string
      - `not_ends_with` string
      - `case` 'sensitive' | 'insensitive'
    - `accountNumber` union: The customer's current account number, or whether one is set.
      - StringComparator: One string comparison with an optional case-sensitivity modifier.
        - `eq` string
        - `neq` string
        - `in` string[]
        - `nin` string[]
        - `contains` string
        - `not_contains` string
        - `starts_with` string
        - `not_starts_with` string
        - `ends_with` string
        - `not_ends_with` string
        - `case` 'sensitive' | 'insensitive'
      - NullComparator: Test whether a nullable scalar field is null.
        - `null` boolean, required
    - `address` AddressFilterOutput
      - `and` AddressFilterOutput[]: Additional filters that must all match.
      - `or` AddressFilterOutput[]: Alternative filters where at least one must match.
      - `country` EqualityComparatorCountryCode
        - `eq` 'AW' | 'AF' | 'AO' | 'AI' | 'AX' | 'AL' | 'AD' | 'AE' | 'AR' | 'AM' | 'AS' | 'AQ' | 'TF' | 'AG' | 'AU' | 'AT' | 'AZ' | 'BI' | 'BE' | 'BJ' | 'BQ' | 'BF' | 'BD' | 'BG' | 'BH' | 'BS' | 'BA' | 'BL' | 'BY' | 'BZ' | 'BM' | 'BO' | 'BR' | 'BB' | 'BN' | 'BT' | 'BV' | 'BW' | 'CF' | 'CA' | 'CC' | 'CH' | 'CL' | 'CN' | 'CI' | 'CM' | 'CD' | 'CG' | 'CK' | 'CO' | 'KM' | 'CV' | 'CR' | 'CU' | 'CW' | 'CX' | 'KY' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DM' | 'DK' | 'DO' | 'DZ' | 'EC' | 'EG' | 'ER' | 'EH' | 'ES' | 'EE' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FR' | 'FO' | 'FM' | 'GA' | 'GB' | 'GE' | 'GG' | 'GH' | 'GI' | 'GN' | 'GP' | 'GM' | 'GW' | 'GQ' | 'GR' | 'GD' | 'GL' | 'GT' | 'GF' | 'GU' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IM' | 'IN' | 'IO' | 'IE' | 'IR' | 'IQ' | 'IS' | 'IL' | 'IT' | 'JM' | 'JE' | 'JO' | 'JP' | 'KZ' | 'KE' | 'KG' | 'KH' | 'KI' | 'KN' | 'KR' | 'KW' | 'LA' | 'LB' | 'LR' | 'LY' | 'LC' | 'LI' | 'LK' | 'LS' | 'LT' | 'LU' | 'LV' | 'MO' | 'MF' | 'MA' | 'MC' | 'MD' | 'MG' | 'MV' | 'MX' | 'MH' | 'MK' | 'ML' | 'MT' | 'MM' | 'ME' | 'MN' | 'MP' | 'MZ' | 'MR' | 'MS' | 'MQ' | 'MU' | 'MW' | 'MY' | 'YT' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NU' | 'NL' | 'NO' | 'NP' | 'NR' | 'NZ' | 'OM' | 'PK' | 'PA' | 'PN' | 'PE' | 'PH' | 'PW' | 'PG' | 'PL' | 'PR' | 'KP' | 'PT' | 'PY' | 'PS' | 'PF' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SA' | 'SD' | 'SN' | 'SG' | 'GS' | 'SH' | 'SJ' | 'SB' | 'SL' | 'SV' | 'SM' | 'SO' | 'PM' | 'RS' | 'SS' | 'ST' | 'SR' | 'SK' | 'SI' | 'SE' | 'SZ' | 'SX' | 'SC' | 'SY' | 'TC' | 'TD' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TM' | 'TL' | 'TO' | 'TT' | 'TN' | 'TR' | 'TV' | 'TW' | 'TZ' | 'UG' | 'UA' | 'UM' | 'UY' | 'US' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'ZA' | 'ZM' | 'ZW'
        - `neq` 'AW' | 'AF' | 'AO' | 'AI' | 'AX' | 'AL' | 'AD' | 'AE' | 'AR' | 'AM' | 'AS' | 'AQ' | 'TF' | 'AG' | 'AU' | 'AT' | 'AZ' | 'BI' | 'BE' | 'BJ' | 'BQ' | 'BF' | 'BD' | 'BG' | 'BH' | 'BS' | 'BA' | 'BL' | 'BY' | 'BZ' | 'BM' | 'BO' | 'BR' | 'BB' | 'BN' | 'BT' | 'BV' | 'BW' | 'CF' | 'CA' | 'CC' | 'CH' | 'CL' | 'CN' | 'CI' | 'CM' | 'CD' | 'CG' | 'CK' | 'CO' | 'KM' | 'CV' | 'CR' | 'CU' | 'CW' | 'CX' | 'KY' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DM' | 'DK' | 'DO' | 'DZ' | 'EC' | 'EG' | 'ER' | 'EH' | 'ES' | 'EE' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FR' | 'FO' | 'FM' | 'GA' | 'GB' | 'GE' | 'GG' | 'GH' | 'GI' | 'GN' | 'GP' | 'GM' | 'GW' | 'GQ' | 'GR' | 'GD' | 'GL' | 'GT' | 'GF' | 'GU' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IM' | 'IN' | 'IO' | 'IE' | 'IR' | 'IQ' | 'IS' | 'IL' | 'IT' | 'JM' | 'JE' | 'JO' | 'JP' | 'KZ' | 'KE' | 'KG' | 'KH' | 'KI' | 'KN' | 'KR' | 'KW' | 'LA' | 'LB' | 'LR' | 'LY' | 'LC' | 'LI' | 'LK' | 'LS' | 'LT' | 'LU' | 'LV' | 'MO' | 'MF' | 'MA' | 'MC' | 'MD' | 'MG' | 'MV' | 'MX' | 'MH' | 'MK' | 'ML' | 'MT' | 'MM' | 'ME' | 'MN' | 'MP' | 'MZ' | 'MR' | 'MS' | 'MQ' | 'MU' | 'MW' | 'MY' | 'YT' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NU' | 'NL' | 'NO' | 'NP' | 'NR' | 'NZ' | 'OM' | 'PK' | 'PA' | 'PN' | 'PE' | 'PH' | 'PW' | 'PG' | 'PL' | 'PR' | 'KP' | 'PT' | 'PY' | 'PS' | 'PF' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SA' | 'SD' | 'SN' | 'SG' | 'GS' | 'SH' | 'SJ' | 'SB' | 'SL' | 'SV' | 'SM' | 'SO' | 'PM' | 'RS' | 'SS' | 'ST' | 'SR' | 'SK' | 'SI' | 'SE' | 'SZ' | 'SX' | 'SC' | 'SY' | 'TC' | 'TD' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TM' | 'TL' | 'TO' | 'TT' | 'TN' | 'TR' | 'TV' | 'TW' | 'TZ' | 'UG' | 'UA' | 'UM' | 'UY' | 'US' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'ZA' | 'ZM' | 'ZW'
        - `in` string[]
        - `nin` string[]
      - `region` EqualityComparatorRegion
        - `eq` 'north_america' | 'latin_america' | 'europe' | 'middle_east_and_africa' | 'asia_pacific'
        - `neq` 'north_america' | 'latin_america' | 'europe' | 'middle_east_and_africa' | 'asia_pacific'
        - `in` Region[]
        - `nin` Region[]
    - `assigneeId` union: The ID of the user assigned to the customer, or whether one is assigned.
      - EqualityComparatorStr
        - `eq` string
        - `neq` string
        - `in` string[]
        - `nin` string[]
      - NullComparator: Test whether a nullable scalar field is null.
        - `null` boolean, required
    - `businessUnitId` union: The ID of the business unit assigned to the customer, or whether one is assigned.
      - EqualityComparatorStr
        - `eq` string
        - `neq` string
        - `in` string[]
        - `nin` string[]
      - NullComparator: Test whether a nullable scalar field is null.
        - `null` boolean, required
    - `currency` union: The customer's default ISO 4217 currency code, or whether one is set.
      - EqualityComparatorCurrency
        - `eq` 'ADP' | 'AED' | 'AFA' | 'AFN' | 'ALK' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'AOK' | 'AON' | 'AOR' | 'ARA' | 'ARL' | 'ARM' | 'ARP' | 'ARS' | 'ATS' | 'AUD' | 'AWG' | 'AZM' | 'AZN' | 'BAD' | 'BAM' | 'BAN' | 'BBD' | 'BDT' | 'BEC' | 'BEF' | 'BEL' | 'BGL' | 'BGM' | 'BGN' | 'BGO' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOL' | 'BOP' | 'BOV' | 'BRB' | 'BRC' | 'BRE' | 'BRL' | 'BRN' | 'BRR' | 'BRZ' | 'BSD' | 'BTN' | 'BUK' | 'BWP' | 'BYB' | 'BYN' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLE' | 'CLF' | 'CLP' | 'CNH' | 'CNX' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CSD' | 'CSK' | 'CUC' | 'CUP' | 'CVE' | 'CYP' | 'CZK' | 'DDM' | 'DEM' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'ECS' | 'ECV' | 'EEK' | 'EGP' | 'ERN' | 'ESA' | 'ESB' | 'ESP' | 'ETB' | 'EUR' | 'FIM' | 'FJD' | 'FKP' | 'FRF' | 'GBP' | 'GEK' | 'GEL' | 'GHC' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GNS' | 'GQE' | 'GRD' | 'GTQ' | 'GWE' | 'GWP' | 'GYD' | 'HKD' | 'HNL' | 'HRD' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'IEP' | 'ILP' | 'ILR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISJ' | 'ISK' | 'ITL' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRH' | 'KRO' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTL' | 'LTT' | 'LUC' | 'LUF' | 'LUL' | 'LVL' | 'LVR' | 'LYD' | 'MAD' | 'MAF' | 'MCF' | 'MDC' | 'MDL' | 'MGA' | 'MGF' | 'MKD' | 'MKN' | 'MLF' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MRU' | 'MTL' | 'MTP' | 'MUR' | 'MVP' | 'MVR' | 'MWK' | 'MXN' | 'MXP' | 'MXV' | 'MYR' | 'MZE' | 'MZM' | 'MZN' | 'NAD' | 'NGN' | 'NIC' | 'NIO' | 'NLG' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEI' | 'PEN' | 'PES' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PLZ' | 'PTE' | 'PYG' | 'QAR' | 'RHD' | 'ROL' | 'RON' | 'RSD' | 'RUB' | 'RUR' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDD' | 'SDG' | 'SDP' | 'SEK' | 'SGD' | 'SHP' | 'SIT' | 'SKK' | 'SLE' | 'SLL' | 'SOS' | 'SRD' | 'SRG' | 'SSP' | 'STD' | 'STN' | 'SUR' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJR' | 'TJS' | 'TMM' | 'TMT' | 'TND' | 'TOP' | 'TPE' | 'TRL' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UAK' | 'UGS' | 'UGX' | 'USD' | 'USN' | 'USS' | 'UYI' | 'UYP' | 'UYU' | 'UYW' | 'UZS' | 'VEB' | 'VED' | 'VEF' | 'VES' | 'VND' | 'VNN' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XCG' | 'XDR' | 'XEU' | 'XFO' | 'XFU' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XRE' | 'XSU' | 'XTS' | 'XUA' | 'XXX' | 'YDD' | 'YER' | 'YUD' | 'YUM' | 'YUN' | 'YUR' | 'ZAL' | 'ZAR' | 'ZMK' | 'ZMW' | 'ZRN' | 'ZRZ' | 'ZWD' | 'ZWL' | 'ZWR': The 3 character [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
        - `neq` 'ADP' | 'AED' | 'AFA' | 'AFN' | 'ALK' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'AOK' | 'AON' | 'AOR' | 'ARA' | 'ARL' | 'ARM' | 'ARP' | 'ARS' | 'ATS' | 'AUD' | 'AWG' | 'AZM' | 'AZN' | 'BAD' | 'BAM' | 'BAN' | 'BBD' | 'BDT' | 'BEC' | 'BEF' | 'BEL' | 'BGL' | 'BGM' | 'BGN' | 'BGO' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOL' | 'BOP' | 'BOV' | 'BRB' | 'BRC' | 'BRE' | 'BRL' | 'BRN' | 'BRR' | 'BRZ' | 'BSD' | 'BTN' | 'BUK' | 'BWP' | 'BYB' | 'BYN' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLE' | 'CLF' | 'CLP' | 'CNH' | 'CNX' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CSD' | 'CSK' | 'CUC' | 'CUP' | 'CVE' | 'CYP' | 'CZK' | 'DDM' | 'DEM' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'ECS' | 'ECV' | 'EEK' | 'EGP' | 'ERN' | 'ESA' | 'ESB' | 'ESP' | 'ETB' | 'EUR' | 'FIM' | 'FJD' | 'FKP' | 'FRF' | 'GBP' | 'GEK' | 'GEL' | 'GHC' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GNS' | 'GQE' | 'GRD' | 'GTQ' | 'GWE' | 'GWP' | 'GYD' | 'HKD' | 'HNL' | 'HRD' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'IEP' | 'ILP' | 'ILR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISJ' | 'ISK' | 'ITL' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRH' | 'KRO' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTL' | 'LTT' | 'LUC' | 'LUF' | 'LUL' | 'LVL' | 'LVR' | 'LYD' | 'MAD' | 'MAF' | 'MCF' | 'MDC' | 'MDL' | 'MGA' | 'MGF' | 'MKD' | 'MKN' | 'MLF' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MRU' | 'MTL' | 'MTP' | 'MUR' | 'MVP' | 'MVR' | 'MWK' | 'MXN' | 'MXP' | 'MXV' | 'MYR' | 'MZE' | 'MZM' | 'MZN' | 'NAD' | 'NGN' | 'NIC' | 'NIO' | 'NLG' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEI' | 'PEN' | 'PES' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PLZ' | 'PTE' | 'PYG' | 'QAR' | 'RHD' | 'ROL' | 'RON' | 'RSD' | 'RUB' | 'RUR' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDD' | 'SDG' | 'SDP' | 'SEK' | 'SGD' | 'SHP' | 'SIT' | 'SKK' | 'SLE' | 'SLL' | 'SOS' | 'SRD' | 'SRG' | 'SSP' | 'STD' | 'STN' | 'SUR' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJR' | 'TJS' | 'TMM' | 'TMT' | 'TND' | 'TOP' | 'TPE' | 'TRL' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UAK' | 'UGS' | 'UGX' | 'USD' | 'USN' | 'USS' | 'UYI' | 'UYP' | 'UYU' | 'UYW' | 'UZS' | 'VEB' | 'VED' | 'VEF' | 'VES' | 'VND' | 'VNN' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XCG' | 'XDR' | 'XEU' | 'XFO' | 'XFU' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XRE' | 'XSU' | 'XTS' | 'XUA' | 'XXX' | 'YDD' | 'YER' | 'YUD' | 'YUM' | 'YUN' | 'YUR' | 'ZAL' | 'ZAR' | 'ZMK' | 'ZMW' | 'ZRN' | 'ZRZ' | 'ZWD' | 'ZWL' | 'ZWR': The 3 character [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
        - `in` Currency[]
        - `nin` Currency[]
      - NullComparator: Test whether a nullable scalar field is null.
        - `null` boolean, required
    - `description` union: A description or classification of the customer.
      - EqualityComparatorStr
        - `eq` string
        - `neq` string
        - `in` string[]
        - `nin` string[]
      - NullComparator: Test whether a nullable scalar field is null.
        - `null` boolean, required
    - `language` union: The customer's preferred BCP-47 language code (e.g. 'de-DE', 'nl-NL'), 'multi' for no single preference, or whether one is set. Drives voice-call language and email translation.
      - EqualityComparatorPartnerLanguageCode
        - `eq` 'ar-EG' | 'ar-SA' | 'bg-BG' | 'ca-ES' | 'da-DK' | 'de-DE' | 'el-GR' | 'en-AU' | 'en-GB' | 'en-IE' | 'en-IN' | 'en-NZ' | 'en-US' | 'es-419' | 'es-ES' | 'et-EE' | 'fi-FI' | 'fr-CA' | 'fr-FR' | 'ga-IE' | 'hi-IN' | 'hu-HU' | 'id-ID' | 'it-IT' | 'ja-JP' | 'ko-KR' | 'lt-LT' | 'lv-LV' | 'nb-NO' | 'nl-BE' | 'nl-NL' | 'no-NO' | 'pl-PL' | 'pt-BR' | 'pt-PT' | 'ro-RO' | 'ru-RU' | 'sk-SK' | 'sv-SE' | 'th-TH' | 'tr-TR' | 'vi-VN' | 'zh-CN' | 'multi'
        - `neq` 'ar-EG' | 'ar-SA' | 'bg-BG' | 'ca-ES' | 'da-DK' | 'de-DE' | 'el-GR' | 'en-AU' | 'en-GB' | 'en-IE' | 'en-IN' | 'en-NZ' | 'en-US' | 'es-419' | 'es-ES' | 'et-EE' | 'fi-FI' | 'fr-CA' | 'fr-FR' | 'ga-IE' | 'hi-IN' | 'hu-HU' | 'id-ID' | 'it-IT' | 'ja-JP' | 'ko-KR' | 'lt-LT' | 'lv-LV' | 'nb-NO' | 'nl-BE' | 'nl-NL' | 'no-NO' | 'pl-PL' | 'pt-BR' | 'pt-PT' | 'ro-RO' | 'ru-RU' | 'sk-SK' | 'sv-SE' | 'th-TH' | 'tr-TR' | 'vi-VN' | 'zh-CN' | 'multi'
        - `in` PartnerLanguageCode[]
        - `nin` PartnerLanguageCode[]
      - NullComparator: Test whether a nullable scalar field is null.
        - `null` boolean, required
    - `customFields` DynamicFieldsOutput: Arbitrary JSON-backed field names with structurally typed comparators.
    - `stats` PartnerStatsFilterOutput
      - `and` PartnerStatsFilterOutput[]: Additional filters that must all match.
      - `or` PartnerStatsFilterOutput[]: Alternative filters where at least one must match.
      - `totalBalance` union: The customer's total outstanding invoice balance.
        - EqualityComparatorDecimalOutput
          - `eq` string, decimal
          - `neq` string, decimal
          - `in` string[]
          - `nin` string[]
        - OrderedComparatorDecimalOutput
          - `gt` string, decimal
          - `gte` string, decimal
          - `lt` string, decimal
          - `lte` string, decimal
      - `netAccountBalance` union: The customer's total outstanding invoice balance minus credits and unapplied payments.
        - EqualityComparatorDecimalOutput
          - `eq` string, decimal
          - `neq` string, decimal
          - `in` string[]
          - `nin` string[]
        - OrderedComparatorDecimalOutput
          - `gt` string, decimal
          - `gte` string, decimal
          - `lt` string, decimal
          - `lte` string, decimal
      - `invoicedLast12Months` union: The total of the customer's open, paid, and uncollectible invoices issued in the last 12 months, in the organization's currency. Invoices dated after today are not counted.
        - EqualityComparatorDecimalOutput
          - `eq` string, decimal
          - `neq` string, decimal
          - `in` string[]
          - `nin` string[]
        - OrderedComparatorDecimalOutput
          - `gt` string, decimal
          - `gte` string, decimal
          - `lt` string, decimal
          - `lte` string, decimal
      - `overdueBalance` union: The customer's total overdue invoice balance.
        - EqualityComparatorDecimalOutput
          - `eq` string, decimal
          - `neq` string, decimal
          - `in` string[]
          - `nin` string[]
        - OrderedComparatorDecimalOutput
          - `gt` string, decimal
          - `gte` string, decimal
          - `lt` string, decimal
          - `lte` string, decimal
      - `openInvoiceCount` union: The customer's number of open invoices.
        - EqualityComparatorInt
          - `eq` integer
          - `neq` integer
          - `in` integer[]
          - `nin` integer[]
        - OrderedComparatorInt
          - `gt` integer
          - `gte` integer
          - `lt` integer
          - `lte` integer
      - `overdueInvoiceCount` union: The customer's number of overdue invoices.
        - EqualityComparatorInt
          - `eq` integer
          - `neq` integer
          - `in` integer[]
          - `nin` integer[]
        - OrderedComparatorInt
          - `gt` integer
          - `gte` integer
          - `lt` integer
          - `lte` integer
      - `oldestOpenInvoiceDueDate` union: The earliest due date among the customer's open invoices, or whether one exists. Accepts a date or a relative ISO 8601 duration: lte -P60D matches customers whose oldest open invoice is at least 60 days past due.
        - OrderedComparatorDateOperand
          - `gt` string: An ISO 8601 date (2026-08-31) or a relative ISO 8601 duration (-P60D).
          - `gte` string: An ISO 8601 date (2026-08-31) or a relative ISO 8601 duration (-P60D).
          - `lt` string: An ISO 8601 date (2026-08-31) or a relative ISO 8601 duration (-P60D).
          - `lte` string: An ISO 8601 date (2026-08-31) or a relative ISO 8601 duration (-P60D).
        - NullComparator: Test whether a nullable scalar field is null.
          - `null` boolean, required
    - `dunningState` union: The ID of the customer's dunning state, or whether one is assigned.
      - EqualityComparatorStr
        - `eq` string
        - `neq` string
        - `in` string[]
        - `nin` string[]
      - NullComparator: Test whether a nullable scalar field is null.
        - `null` boolean, required
  - `error` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/stuut/apis/stuut-api.md) - [All operations](https://skmtc.dev/stuut/apis/stuut-api/llms.txt) - [OpenAPI document](https://skmtc.dev/stuut/apis/stuut-api/revisions/ff0ad16a55ff?raw)
