API Operators

Coupa supports a number of operators to enable you to query with precision.

- (none/default) exact match/equality

Example: https://example.coupahost.com/api/purchase_orders?id=100

Example will return the Purchase Order with a Coupa ID of 100.

contains (not available for datetime)

Example: https://example.coupahost.com/api/suppliers?name[contains]=.com

Example will return the first 50 suppliers containing ".com" in the Supplier Name field.

starts_with (not available for datetime)

Example: https://example.coupahost.com/api/budget_lines?notes[starts_with]=San%20Francisco

Example will return the first 50 budget lines a note beginning with "San Francisco".

ends_with (not available for datetime)

Example: https://example.coupahost.com/api/items?name[ends_with]=Gray

Example will return the first 50 items with a name ending in "Gray".

gt — greater than (>)

Example: https://example.coupahost.com/api/purchase_orders/version[gt]=1

Example will return the first 50 purchase orders that have a revision of 2 or higher (>1).

lt — less than (<)

Example: https://example.coupahost.com/api/suppliers?updated-at[lt]=2010-01-15

Example will return the first 50 supplier records which were last updated before, but not including, January 15th 2010.

gt_or_eq — greater than or equal to (>=)

Example: https://example.coupahost.com/api/purchase_orders/version[gt_or_eq]=3

Example will return the first 50 purchase orders that have a revision of 3 or higher (>=3).

lt_or_eq — less than or equal to (<=)

Example: https://example.coupahost.com/api/purchase_orders/version[lt_or_eq]=1

Example will return the first 50 supplier records which were last updated before and including January 15th 2010.

not_eq — ot equal to (!=)

Example: https://example.coupahost.com/api/purchase_orders?status[not_eq]=active

Example will return the first 50 supplier records not in "active" status.

in — The in operator allows you to specify multiple values (shorthand for multiple OR conditions).

Example: https://example.coupahost.com/api/invoices?account-type[name][in]=SAP100,SAP200

Example will return the first 50 invoice records where the Chart of Account name is SAP100 or SAP200.

not_in – The not_in operator allows you to specify multiple values to exclude in the query results.

Example: https://example.coupahost.com/api/invoices?status[not_in]=ap_hold,booking_hold

Example will return the first 50 invoices where the Status does not equal ap_hold or booking_hold.

blank (not available for datetime) — true/false operator determines if the field is blank.

Example: https://example.coupahost.com/api/suppliers?po-email[blank]=true

Example will return the first 50 supplier records with a blank PO Email Address.