Key field filters

Key field filters

Key field filters

When requesting data you can optionally pass additional parameters that will filter the data returned by a key field.

ParameterDescriptionExamples
Parameters described in overviewAuthorization: Bearer <access_token> header — see Synergist API Authentication&version=6
CompanyThe company contextcompany=1
Record IDID of a specific record to use as a filterclient=1/F667
ResponseReturned dataA JSON string containing the data

In this example a list of activities is returned but is filtered to only return activities for a specific client

Authorization: Bearer <access_token>
http://<SERVER>/jsonapi/activities.json?company=1&version=6&&style=modeldata&modelstructure=activitylist&client=1/F667

Example request (legacy username/password):

http://<SERVER>/jsonapi/activities.json?company=1&version=6&&style=modeldata&modelstructure=activitylist&client=1/F667&user=<username>&password=<password>

To poll for created/modified records..

Authorization: Bearer <access_token>
http://<SERVER>/jsonapi/activities.json?company=1&version=6&&style=modeldata&modelstructure=activitylist&timestampoffsetfrom=-900

Example request (legacy username/password):

http://<SERVER>/jsonapi/activities.json?company=1&version=6&&style=modeldata&modelstructure=activitylist&timestampoffsetfrom=-900&user=<username>&password=<password>

The list of key fields that can be used as filters include:
job=
jobphase=
client/client code=
clientcontact=
supplier=
suppliercontact=
workflow=
search=
uuid=
timestampfrom= (e.g. timestampfrom=1544610321)
timestampto=
timestampoffsetfrom (e.g. timestampoffsetfrom=-900 any records modified in the past 15 mins)
timestampoffsetto
Activity/Activityid=
resource=
datefrom=
dateto=