API – List Records

action – list

To list records, pass the action list and specify the recordtype. You can optionally specify any of the additional sort, paging and filter options. Additionally, you can specify an array of values that should be returned for each record. All the rules for passing calculations or templates in the values array work for list values as well – see full details in the Read a Record section.

Sample Request

{ "account": *** your account id ***, "apikey": "*** your api key ***", "action": "list", "recordtype": "person", "values": { "FirstName", "LastName", "MyCalc": "left(FirstName,1)+' '+LastName", "MyTemplate": { "template": "My name is {FirstName}" } } }

Sample Response

{ "success": true, "recordtype": "person", "count": 3, "total": 3, "records": [ { "recordurl": "person/12345", "recordid": 12345, "recordtype": "person", "name": "John Smith", "values": { "FirstName": "John", "LastName": "Smith", "MyCalc": "J Smith", "MyTemplate": "My name is John" }, { "recordurl": "person/23456", "recordid": 23456, "recordtype": "person", "name": "Rob Smith", "values": { "FirstName": "Rob", "LastName": "Smith", "MyCalc": "R Smith", "MyTemplate": "My name is Rob" }, { "recordurl": "person/666", "recordid": 666, "recordtype": "person", "name": "Darth Vader", "values": { "FirstName": "Darth", "LastName": "Vader", "MyCalc": "D Vader", "MyTemplate": "My name is Darth" } ] }

Here is an example restricted using a filter expression:

Sample Request

{ "account": *** your account id ***, "apikey": "*** your api key ***", "action": "list", "recordtype": "person", "filter": "LastName is Smith", "values": { "FirstName", "LastName", "MyCalc": "left(FirstName,1)+' '+LastName" } }

Sample Response

{ "success": true, "recordtype": "person", "count": 2, "total": 2, "records": [ { "recordurl": "person/12345", "recordid": 12345, "recordtype": "person", "name": "John Smith", "values": { "FirstName": "John", "LastName": "Smith", "MyCalc": "J Smith" }, { "recordurl": "person/23456", "recordid": 23456, "recordtype": "person", "name": "Rob Smith", "values": { "FirstName": "Rob", "LastName": "Smith", "MyCalc": "R Smith" } ] }