DEV

Input.

OrderSearchFilter

No description

Fields

createdAt

OrderDateFilter

Enhanced date filter for created_at with various comparison options

currencyCode

CurrencyCode

Filter by currency code

destinationCountryCode

String

Filter by destination country code

orderType

OrderType

The type of Order

organizationId

String

Filter by organization ID

paymentChargeId

String

Filter by payment charge ID

paymentIntentId

String

Filter by payment intent ID

q

String

Fuzzy search text query across searchable attributes using trigram similarity with dynamic threshold. Searchable attributes: - Order identifiers (indexed): accountOrderNumber, id, zonosOrderId, references.zonosOrderNumber - Payment IDs (indexed): paymentIntentId, paymentChargeId - Currency: currencyCode (indexed) - Tracking numbers: trackingNumbers (array, indexed) - Destination party (indexed, denormalized): * destination.person.name, destination.person.phone, destination.person.email, destination.location.locality, destination.location.postalCode, destination.location.administrativeArea, destination.location.administrativeAreaCode (stored as concatenated searchable text field) * destination.location.countryCode (stored as separate indexed column for better precision on short codes) - Service level (indexed, denormalized): serviceLevelCode, serviceLevelDisplayName - Party IDs (JSONB): party IDs stored in parties array - Shipment rating IDs (JSONB): shipment rating IDs stored in shipment_ratings array - Landed costs (JSONB): landedCostId, landedCostShortId (extracted from landed_costs array) - Amount fields: amount (total calculated), amountDetails.amount, amountDetails.currencyCode Note: Destination party and service level data are stored as denormalized columns on the order table when the order is created, enabling efficient fuzzy search without requiring federation joins. Similarity threshold is dynamic based on search text length: - 2 characters or less: 0.1 threshold (for country codes, short IDs) - 3-4 characters: 0.1 to 0.8 (linear interpolation) - 5+ characters: 0.8 threshold (for precise matching of longer strings) Results are ordered by similarity score (best matches first).

serviceLevels

[String!]

A list of ServiceLevel codes or names that are used for an Order

status

OrderStatus

Filter by order status

totalAmount

OrderAmountFilter

Enhanced amount filter for total amount with various comparison options

trackingNumbers

[String!]

Filter by tracking numbers

Was this page helpful?