Composer call samples
Use the Varicent Incentives API to perform actions, such as listing rows in a calculation or rows in a table.
List calculation rows
Use this call to list all rows in a calculation in your Varicent Incentives model.
Request
GET - api/v1/calculations/{calcid}/data
Note
The calculation ID can be obtained from the GET - api/v1/calculations
call response in the id
field.
Sample call
curl -X GET -H "Authorization: Bearer API_KEY" -H "Model: YOUR_CLIENT_MODEL” -H "Content-Type: application/json" https:// YOUR_ICM10_API_SERVER_ADDRESS/api/v1/calculations/{calcid}/data
Sample response
{ "columnDefinitions": [ { "name": "PayeeID_", "type": "String", "isKey": true, "nullable": false }, { "name": "CompPlanID", "type": "String", "isKey": true, "nullable": false }, { "name": "AttributeID", "type": "String", "isKey": true, "nullable": false }, { "name": "PeriodString", "type": "String", "isKey": true, "nullable": false }, { "name": "PeriodString2", "type": "String", "isKey": true, "nullable": false }, { "name": "Value_", "type": "Decimal", "isKey": false, "nullable": false } ], "data": [ [ "PAYEE_ID1", "AE", "KPI PERIODIC CREDIT [ACTUALS]", "2013-01 JAN", "2013-01 JAN", 88500 ], [ "PAYEE_ID2", "AE", "KPI PERIODIC CREDIT [ACTUALS]", "2013-01 JAN", "2013-02 FEB", 96866.1 ], }
List table rows
Use this call to list all rows in a table in your Varicent Incentives model.
Request
GET - api/v1/customtables/{table}/inputforms/{id}/data
Note
System tables, such as the Payee table, have an underscore after the table name. For example, Payee_
. The table
name can be obtained from the GET /api/v1/customtables
call response. The id
is zero (0).
Sample call
curl -X GET -H "Authorization: Bearer API_KEY" -H "Model: YOUR_CLIENT_MODEL” -H "Content-Type: application/json" https://YOUR_ICM10_API_SERVER/api/v1/customtables/{table}/inputforms/{id}/data
Sample response
{ "columnDefinitions": [ { "name": "PayeeID_", "type": "String", "isKey": true, "nullable": false }, { "name": "Name_", "type": "String", "isKey": false, "nullable": false }, { "name": "Parent_", "type": "String", "isKey": false, "nullable": true, "values": "/api/v1/customtables/Payee_/inputforms/0/ data?fields=PayeeID_,Name_" }, { "name": "Salutation_", "type": "String", "isKey": false, "nullable": true, "values": "/api/v1/customtables/Salutation_/inputforms/0/ data?fields=Salutation_" }, { "name": "Email_", "type": "String", "isKey": false, "nullable": false }, { "name": "Phone_", "type": "String", "isKey": false, "nullable": false }, { "name": "Extension_", "type": "String", "isKey": false, "nullable": false }, { "name": "TitleID_", "type": "String", "isKey": false, "nullable": true, "values": "/api/v1/customtables/Title_/inputforms/0/ data?fields=TitleID_,Title_" }, { "name": "Reports_To_", "type": "String", "isKey": false, "nullable": true, "values": "/api/v1/customtables/Payee_/inputforms/0/ data?fields=PayeeID_,Name_" }, { "name": "Payee_Currency_", "type": "String", "isKey": false, "nullable": true, "values": "/api/v1/customtables/Currency_/inputforms/0/ data?fields=CurrencyID_,Name_" }, { "name": "Date_of_Hire_", "type": "Date", "isKey": false, "nullable": true }, { "name": "Termination_Date_", "type": "Date", "isKey": false, "nullable": true }, { "name": "Comment_", "type": "LongString", "isKey": false, "nullable": false }, { "name": "Admin", "type": "String", "isKey": false, "nullable": true, "values": "/api/v1/customtables/Boolean/inputforms/0/ data?fields=Boolean,YesNo" }, { "name": "Language", "type": "String", "isKey": false, "nullable": true, "values": "/api/v1/customtables/Languages/inputforms/0/ data?fields=Language_Key" } ], "data": [ [ "PAYEE_ID_0011", "Tim Duncann", null, null, "49@ibm", "", "", null, null, "USD", "2011-12-13T00:00:00", null, "", null, "ENG" ], [ "PAYEE_ID_0013", "Blair Wrightt", null, null, "50@ibm", "", "", null, null, "USD", "2012-04-06T00:00:00", null, "", null, "ENG" ] ] }