Returns one or more client (organizations) records
Client List
| Parameter | Mandatory | Description | Examples | More Info |
|---|---|---|---|---|
| API | Yes | The API area | clients.json | |
| General | Yes | Parameters described in overview | Authorization: Bearer <access_token> header — see Synergist API Authentication | Structure of an API call |
| Model Structure | Yes | Name of model required | modelstructure=clientslist | Using data models |
| View | No | Stored filter applied | Using views | |
| Sort | No | Change the view's default sort order | sort=CLIENT | Sorting |
| Filters | No | Filter by a key field | Filters | |
| Company | Yes | The company number | company=1 |
Example request:
Authorization: Bearer <access_token>
http://<SERVER>/jsonapi/clients.json?company=1&version=6&&company=1&style=modeldata&modelstructure=clientslist&view=-1001
Example response:
{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"totalrows": 502,
"totalpages": 251,
"responsemessage": "",
"pagerows": 2,
"pagenumber": 1,
"success": true,
"data": [
{
"clientUuid": "A246FBB5E59C41A1AC29A00A8F82FC66",
"clientTimeStampModified": 1518195468,
"clientRecordVersionNumber": 105,
"clientCustomField323": "",
"clientCode": "1/GS",
"clientName": "Great Sites",
"clientCategoryName": "Client",
"clientPhone": "",
"clientCategory": 3,
"clientHandlerUserID": 121,
"clientWebURL": "",
"clientEmail": "",
"clientInactive": false,
"clientType": "",
"clientOpStatus": "",
"clientMarketSector": "B2B",
"clientOnHold": false,
"clientHandlerFullName": "Alan Shearer (mike email)"
}
]
}CSV request:
This call will return the same data as above but as a simple downloaded CSV file
If "modelstructure=view", and a view number also specified, the CSV will contain the columns associated with the view - rather than a standard model
Authorization: Bearer <access_token>
http://<SERVER>/csvapi/clients.csv?company=1&version=6&&company=1&modelstructure=view&view=-1001
Example request (legacy username/password):
http://<SERVER>/csvapi/clients.csv?company=1&version=6&&company=1&modelstructure=view&view=-1001&user=<username>&password=<password>