API Reference

Support : API Reference
Retrieve Data - Filters
Overview

The filter parameter is used to limit the amount of data retrieved.

GET: api/{tenantid}/dataobjectdata/{objectid}?itemrefs={comma delimited list of item references}&filter={criteria pairs}

{criteria pairs}

API filters can consist or one or more criteria pairs.

Single: {itemref}.condition.{itemref / value / function}

Multiple: {itemref}.condition.{itemref / value / function}.and.{itemref}.condition.{itemref / value / function}

Learn more about Item References.

Conditions

Param Description
.cn. Contains
.eq. Equal
.ne. Not Equal To
.in. In
.ni. Not In
.lt. Less Than
.gt. Greater Than
.ge. Greater Than or Equal To
.le. Less Than or Equal To

Example API Calls

GET: ContractSeqNum with StartDateTime.GreaterThanOrEqualTo.{YYYY-MM-DD}.and.EndDateTime.LessThan.{YYYY-MM-DD}.

api/{tenantid}/dataobjectdata/core_contract_item?itemrefs=contractseqnum&sortitemrefs=contractseqnum&filter=startdatetime.ge.2019-09-01.and.enddatetime.lt.2019-09-15&perpage=12

GET: ContractSeqNum from ContractItem with ContractItemQuantity.GreaterThanOrEqualTo.{100000}.

api/{tenantid}/dataobjectdata/core_contract_item?itemrefs=contractseqnum&sortitemrefs=contractseqnum&filter=contractitemquantity.ge.100000&perpage=12

Selected Functions

Function Type Param Remarks: Add prefix to itemref as ( i:itemref ) to denote that it is an item ref and not a value.
If fnIf( i:itemref, condition, i:itemref, True: as fixed value or i:itemref, False: as fixed value or i:itemref ) Possible conditions are eq,lt,gt,le,ge,ne
Is Null fnIsNull( i:itemref, True: as fixed value or i:itemref, False: as fixed value or i:itemref )
Date Calculation fnAddDays( i:itemref, fixed value or i:itemref) Days in integer. Same param applies with fnAddMonths(), fnSubtractDays(), fnSubtractMonths()
Math fnAbs( i:itemref) Return an absolute number. Same param for fnMax(), fnMin(), fnCumulative(), fnSum()
Math fnAdd( i:itemref, fixed value or itemref) Same param for fnMultiply(), fnSubstract()
Math fnDivide( i:itemref, fixed value or i:itemref ) Divsion of itemref by divisor value
Nested Functions fnIsNull( i:itemref, True: as fixed value or i:itemref or fnFunction(), False: fnDivide( i:itemref, fixed value or i:itemref or fnFunction() ) ) As well as fixed value or itemrefs, parameters to functions can also be other functions

Example API Calls with Functions

GET: SettlementSeqNum, CounterPartySeq & SettlementCurrencyCode from Settlementdate, applying fnSubtractDays(7 days substracted from Coordinated Universal Time).

api/{tenantid}/dataobjectdata/core_settlement?itemrefs=settlementseqnum,counterpartyseqnum,settlementcurrencycode&sortitemrefs=settlementseqnum&filter=settlementdate.ge.fnSubtractDays(fnUTCDateTime(),7)&perpage=12

GET: The difference in quantity from NominatedQuantity & TransactionQuantity within specific date range, applying fnSubtract(NominatedQuantity - TransactionQuantity).

api/{tenantid}/dataobjectdata/core_transaction?itemrefs=fnSubtract(i:nominatedquantity,i:transactionquantity)&sortitemrefs=transactionseqnum&filter=core_contract_item.startdatetime.ge.2019-09-16.and.core_contract_item.enddatetime.lt.2019-09-21&perpage=12

Try out the API builder which will help to easily format correct item references, functions and filters.