Selecting a client for an activity record. This action can take place prior to creating an activity. It would normal be used if creating an activity on a client, where the activity is not related to a job.
Client list
List clients in order to select a client when creating a new activity record.
Example request:
Parameter | Description | Examples | Explanation |
---|---|---|---|
Action | Defines the the API call | action=clientslist | If not specified records for the API area are returned, or its structure |
Parameters described in overview | user=user&password=user&version=3.1 | Username, password and API version | |
Company | The company context | company=1 | Synergist company (data-set) |
Style | Which kind of data is required | style=modelstructure / style=modeldata | Request either meta-data (structure) or actual data |
Modelstructure | Name of model required | Modelstructure=clientslist/ Modelstructure=clientdetails | Defines the fields returned. There are two available models |
View | ID for a pre-existing query (called a “view”) | view=SELECTVIEW44486 | Use the “viewlist” call to obtain these values (see below) |
page | Data page to return | page=1 | Page numbering starts at 0 |
rows | Number of records/rows to return. | rows=2 | 0 = return all rows |
Response | Returned data | See below | A JSON string containing the data available for this area, for the specified company/user |
http:///jsonapi/activities.json?style=modeldata&modelstructure=clientslist&action=clientslist&company=1&view=SELECTVIEW44486&version=3.1&user=user&password=user
Example response
{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"totalrows": 480,
"totalpages": 48,
"responsemessage": "",
"pagerows": 10,
"pagenumber": 1,
"success": true,
"data": [
{
"clientUuid": "C28D517EC2F14921B347C4E1744E0CBC",
"clientTimeStampModified": 1496750532,
"clientRecordVersionNumber": 730,
"clientCode": "1/GRA",
"clientName": "Granada",
"clientCategoryName": "Client",
"clientPhone": "0171 698 9800",
"clientCategory": 3,
"clientHandlerUserID": 239,
"clientWebURL": "www.onedayx.com",
"clientEmail": "[email protected]",
"clientInactive": false,
"clientType": "Arts 1",
"clientOpStatus": "Bronze",
"clientMarketSector": "Arts, Sport, Entertainment1",
"clientOnHold": true,
"clientHandlerFullName": "Aaron Cronshaw"
},
{
"clientUuid": "ADA9CBAD7BA43447A94DF6E39A5D03AA",
"clientTimeStampModified": 1496750447,
"clientRecordVersionNumber": 99,
"clientCode": "1/C4036",
"clientName": "999 Inc",
"clientCategoryName": "Client",
"clientPhone": "",
"clientCategory": 3,
"clientHandlerUserID": 239,
"clientWebURL": "",
"clientEmail": "",
"clientInactive": false,
"clientType": "B2B2",
"clientOpStatus": "",
"clientMarketSector": "Tourism",
"clientOnHold": false,
"clientHandlerFullName": "Aaron Cronshaw"
},
etc., etc.,
}