Arguments
Learn about the types of arguments that Coupa supports in conjunction with operators.
Overview
Arguments are made up of attributes, operators and values. They can be appended to any request to limit the results, the available attributes are listed in each business object's detailed documentation. Coupa supports a number of operators in addition to the default equality/exact match.
General Request Format
<url>?<attribute><[operator]>=<value>&...
The first example returns the first 50 active suppliers start with id=1. The second example returns the first 50 POs with a updated-at dategreater than or equal to the specified date.
Example:
https://example.coupahost.com/api/suppliers?status=active https://example.coupahost.com/api/purchase_orders?updated_at[gt_or_eq]=2010-12-31-->
Limit and Offset
You can use limit and offset parameters to paginate results. Remember that the maximum number of results returned are 50 at a time.
Example: To get the first 150 purchase orders:
https://example.coupahost.com/api/purchase_orders https://example.coupahost.com/api/purchase_orders?offset=50 https://example.coupahost.com/api/purchase_orders?offset=100
Searching on a collection
For collections of elements, such as order-lines in this case, use the plural form and ignore the nested singular form.
Example:
<order-header> <order-lines> <order-line> <account> <code>a-c</code> </account> </order-line> </order-lines> </order-header>
Becomes:
https://example.coupahost.com/api/purchase_orders?order-lines[account][code]=a-c
Underscores
When using elements from resources in your arguments any dashes should be converted to underscores.
Example:
<exchange-rate> <from-currency> <code>USD</code> <id type="integer">1</id> </from-currency> </exchange-rate>
Becomes:
https://example.coupahost.com/api/exchange_rates?from_currency_id=1