CoreTRM allows external systems to interface with it. External systems are able to request or update CoreTRM using the API of CoreTRM provided they have the necessary security access.
There is a built-in API builder in CoreTRM to help users generate API request urls based on data needed and filter criteria.
The data return can be either in JSON or CSV format.
To access the API Builder for generating API requests, go to System Admin and then to the API Builder->API Requests tab.
Example of Sort Item Refs
Example of Summary Item Refs
Example of Grouping Filter
Testing API Request using Postman

To start building API request, from API Requests view:
to create a new line.*Detail steps on how to select Item Refs. can be found here.*
*Example of Sort Item Refs can be found here.*
*Example of Summary Item Refs can be found here.*
The following additional meta will be included in the data results: "isKeyItemInd","isTimeStampItemInd","canChangeOnUpdateInd","canIncludeOnInsertInd","canIncludeOnDeleteInd".
to confirm creation.
to edit.Use the Filters panel to add filters to the request:

to create a new line.

*Conditions available are "contains", "equals", "greater than", "greater than or equal to", "in", "less than", "less than or equal to", "not contains", "not equals" and "not in".
*Example of Grouping Filters can be found here.*
to confirm creation.
to edit.
After the required data and filters are indicated in API requests and Filters view, CoreTRM will generate the appropriate syntax and a API URL that can be used to retrieve the data from the system.
The API URL can be used by external systems as the API End Point to call the API in order to retrieve data from CoreTRM.

Once the API URL is created as above click on
to preview the data results as shown below.

As part of the JSON data results the system will provide additional information on the Item Refs. Below is the default information provided.

In addition, as part of the JSON data results, the system will also provide information on paging as shown below.

To start selecting Item Refs to be included in the data results:
to open the Item Refs browser pop up.For Example, below we are selecting the contractdate item ref from Contract object.

to add the next item ref.For Example, below we are selecting the contractreference item ref from Contract object.

For Example, below we are selecting counterpartyname item ref from Counterparty object.
a. From the "Object" section select Counterparty.
b. From the "Object Item Refs." section select Counterparty Name.

to confirm the selection.More information about Item Refs can be found in Understanding Item References.
In addition, API functions can also be used as part of the Item Refs selection.
For example, to include the fnIsNull function. If contract description is null, True: set value to "Description is empty" and False: set value to contract description.
to open the Item Refs browser pop up.



to confirm the selection.
More information about API functions can be found in API Functions.
For Example, using Contract object, sort by contractseqnum.

The data result returned from the API will be sorted by contractseqnum as shown below.

For Example, using Valuation object, summarized profitandlossvaluetodate and valuecurrencycode.

The data result returned from the API will display a summary value as shown below.

For Example, using Valuation object, returning Strategy book, Strategy Name and Sum of totalchangevalue.

When a filter criteria involves a grouping function, such as fnSum(i:totalchangevalue) > 0. The filter citeria will have to have "Grouping Filter" checked.

The API will return data with fnSum(i:totalchangevalue) > 0 as shown below.

If "Grouping Filter" is not checked, the system will return an error as shown below:

Once the API Request URL is generated, the data can also be retrieved by an external system from CoreTRM API.
One of the ways to simulate an external system retrieving data from CoreTRM API is to use the Postman application.
Below are the steps to simulate retrieving data from CoreTRM API using Postman:

*The API token will typically expire in 18 to 24 hours depending on the Tenant Settings.*
The endpoint will be typically be similar to https://XXXX.coretrm-app.com/api/tenantid/dataobjectdata/core_contract?itemrefs=contractdate,contractreference,contract.core_counterparty.counterpartyname,commoditieslist,contractdescription,contractapprovalstatus.dm_dataobject_item_lookup.itemdescription,otherpartytype&filter=contractapprovalstatus.dm_dataobject_item_lookup.itemdescription.eq.Proposed.and.otherpartytype.eq.T&perpage=12


