getRecords
POST |
/api/widget/getRecords |
Able to request records from the api with optional search text. Results will return all records matching the state and search text provided. For example, record type of “O” – Opportunities which are equivalent to Jobs in TrackerRMS. State can be “”, “open”, “won” or “closed”.
If you provide both "recordtype" and "recordid" in the instructions then a single record will be returned and all other instructions will be discarded.
Sample Request:
{
"trackerrms": {
"getRecords": {
"credentials": {
"username": "my.name@domain.com",
"password": "Welcome123",
"oauthtoken": "1bc7ca1e-8b9a-11e9-bc42-526af7764f64"
},
"instructions": {
"recordtype": "O",
"recordid": 0,
"state": "open",
"searchtext": "",
"onlymyrecords": true,
"numrecords": 100,
"pagenum": 0,
"sortfield": "lastupdateddatetime",
"sortdir": "asc",
"updatedbefore": "2022-01-01 12:00:00",
"updatedafter": "2022-01-01 12:00:00",
"includecustomfields": false
}
}
}
}
Sample Response:
{
"status": 0,
"message": "success",
"count": 2,
"results": [
{
"id": 1034,
"name": "JOB-1034 Java Programmer",
"company": "Western Technical",
"status": "Resume Sent",
"dateopened": "2018-06-30",
"details": []
},
{
"id": 1087,
"name": "JOB-1087 Senior JQuery Developer",
"company": "Crisis Development Inc",
"status": "First Interview",
"dateopened": "2018-07-04",
"details": []
}
]
}
Record Types:
C |
Clients |
N |
Contacts |
L |
Leads |
O |
Opportunities |
P |
Projects |
T |
Tickets |
R |
Resources |
X |
Placements (only Placements in a Working, Offer or Complete state are returned) |
State (example):
open |
Only Open Opportunities |
closed |
Only closed Opportunities |
won |
Only successfully won opportunities |
[blank] |
All Opportunities |
Search Text:
Can include any string value that will filter results based on Opportunity Name.
Additional Details:
The [details] node is an array of supporting data such as associated client, contact, statuses, types, priorities etc that suppliment the record returned.
onlymyrecords (mandatory):
true |
Restricts results to those owned by the user |
false |
Retrieves all records |
numrecords (optional):
[numeric value] |
e.g. 100 for first 100 records (by name) - this is the default if nothing set |
pagenum (optional):
[numeric value] |
e.g. 1 for first page of records - this is the default if nothing set, zero or non-numeric value |
sortfield (optional):
[string value] |
e.g. "lastupdateddatetime" or "firstname" and determines the sort if required (confirm with support for complete list of available columns) |
sortdir (optional):
[string value] |
Use "asc" for ascending and "desc" for descending sort direction |
updatedbefore (optional):
[date value] |
A date value to indicated records required that were updated before a given date and time in the format |
updatedafter (optional):
[date value] |
A date value to indicated records required that were updated after a given date and time in the format |
includecustomfields (optional):
true |
Returns all Custom Fields for the record in key/value pairs |
false |
Excludes Custom Fields (quicker) |
Response status codes:
0 |
success |
1 |
user not found |
2 |
user not active |
99 |
Invalid request |