Filtered People List
This process returns a filtered subset of the people for the customer number specified. Secret Hmac Required. Cache Time 1 Hour. Reset if person added or edited. Multiple pages possible.
Body Required
-
Filter array[object]
An array of filter criteria for the fields birthday, hiredate, emp_id, lastname, firstname, dept and title. The birthday and hiredate ignore the year and pass month, week or day values. +1day shows dates 1 day in the future, +-1day show dates 1 day in the past through 1 day in the future. month(7,8,9) day(1,2,3) selects people with dates in July, August and September matching the days listed. The other values can be '=value' or 'in("value1","value2")' or 'like("value1","value2")'
-
SortBy string
The field to sort by (allowed: emp_id, lastname, firstname, dept, title, birthday, hiredate). emp_id is the default.
-
Descending number
If the sort should be in descending order
curl \
-X POST https://Api.StrandVision.com/v1.0/People/Read/Filtered \
-H "Authorization: X-apikey $ACCESS_TOKEN" \
-H "Authorization: X-apidate $ACCESS_TOKEN" \
-H "Authorization: X-apihmac $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"Filter":[{"Birthday":"+-1Week","HireDate":"+1Month","Emp_Id":"like('10%')","LastName":"like('Str%','Be%man')","FirstName":"in('Mike','John')","Dept":"=Sales","Title":"like('VP%')"}],"SortBy":"LastName","Descending":0}'
{
"Filter": [
{
"Birthday": "+-1Week",
"HireDate": "+1Month",
"Emp_Id": "like('10%')",
"LastName": "like('Str%','Be%man')",
"FirstName": "in('Mike','John')",
"Dept": "=Sales",
"Title": "like('VP%')"
}
],
"SortBy": "LastName",
"Descending": 0
}
{
"Filter": [
{
"Birthday": "+-1Week",
"HireDate": "+1Month",
"Emp_Id": "like('10%')",
"LastName": "like('Str%','Be%man')",
"FirstName": "in('Mike','John')",
"Dept": "=Sales",
"Title": "like('VP%')"
}
],
"SortBy": "LastName",
"Descending": 0
}
[
{
"Total": 2,
"Page": "1 of 1",
"Sort": "lastname desc,firstname desc,emp_id desc",
"Filter": "Past 7 Days Birthday; Future 7 Days Birthday; Future 1 Month Hiredate; emp_id LIKE (\"10%\"); lastname LIKE (\"be%man\",\"str%\")",
"People": [
{
"Id": 1234,
"Emp_Id": 1002,
"Created": "Thu, 21 Aug 2014 15:43:00 GMT",
"Deleted": 0,
"Parent": 10028,
"Custno": 10028,
"DispGroup": "Menomonie, WI (10)",
"Source_Id": 1002,
"Location": "Menomonie",
"Email": "csstrand@strandvision.com",
"FirstName": "Carmen",
"LastName": "Strand",
"NickName": "",
"Phone": "",
"Web": "",
"Photo": "https://strandvision.com/.?ImageDB=L94FX874K8C52OFCA7RXL",
"Gender": "Female",
"Dept": "Marketing",
"Title": "Marketing Director",
"Birthday": "Fri, 07 Aug 2037 01:02:03 GMT",
"HireDate": "Thu, 09 Aug 2007 01:02:03 GMT",
"TermDate": "",
"Skip": "Birthdays",
"DateLast": "Fri, 04 Aug 2023 14:25:00 GMT",
"DateEdit": "Thu, 21 Aug 2014 15:43:00 GMT"
},
{
"Id": 1235,
"Emp_Id": 1016,
"Created": "Thu, 21 Aug 2014 15:43:00 GMT",
"Deleted": 0,
"Parent": 10028,
"Custno": 10028,
"DispGroup": "Menomonie, WI (10)",
"Source_Id": 1016,
"Location": "Washington",
"Email": "",
"FirstName": "Ingred",
"LastName": "Bergman",
"NickName": "",
"Phone": "",
"Web": "",
"Photo": "https://strandvision.com/.?ImageDB=LG4FX874KHC52OFCA7RXL",
"Gender": "Female",
"Dept": "Quality Assurance",
"Title": "Quality Assurance Manager",
"Birthday": "Sun, 09 Aug 2037 01:02:03 GMT",
"HireDate": "Mon, 10 Aug 2015 01:02:03 GMT",
"TermDate": "Fri, 12 Aug 2033 00:00:00 GMT",
"Skip": "Anniversaries",
"DateLast": "Fri, 04 Aug 2023 14:25:00 GMT",
"DateEdit": "Thu, 21 Aug 2014 15:43:00 GMT"
}
]
}
]
{
"Total": 17,
"Page": "1 of 2",
"Sort": "gender,lastname,emp_id",
"People": {
"Id": 1016,
"Emp_Id": 1016,
"Created": "Thu, 21 Aug 2014 15:43:00 GMT",
"Deleted": 0,
"Parent": 10028,
"Custno": 10028,
"DispGroup": "Menomonie, WI (10)",
"Source_Id": 1016,
"Location": "Washington",
"Email": "csstrand@strandvision.com",
"FirstName": "Ingred",
"LastName": "Bergman",
"NickName": "string",
"Phone": "string",
"Web": "string",
"Photo": "https://strandvision.com/.?ImageDB=LG4FX874KHC52OFCA7RXL",
"Gender": "Female",
"Dept": "Quality Assurance",
"Title": "Quality Assurance Manager",
"Birthday": "Sun, 09 Aug 2037 01:02:03 GMT",
"HireDate": "Mon, 10 Aug 2015 01:02:03 GMT",
"TermDate": 0,
"Skip": "Birthdays",
"DateLast": "Fri, 21 Jul 2023 22:52:00 GMT",
"DateEdit": "Thu, 21 Aug 2014 15:43:00 GMT"
}
}