An activity can have a 'Category' allocated to it. This API provides a list of valid categories. Note that the list of categories can be dependent on the activity type
Category Lookup
| Parameter | Mandatory | Description | Examples | More Info |
|---|---|---|---|---|
| API | Yes | The API area | activities.json | |
| General | Yes | Parameters described in API syntax section | Structure of an API call | |
| Company | Yes | The company number | company=1 | |
| Action | Yes | The action to perform | action=categories | |
| Activity type | Yes | Specify the activity type | activitytype=MAIL |
Example request (OAuth 2.0):
Authorization: Bearer <access_token>
http://<SERVER>/jsonapi/activities.json?&company=1&action=categories&activitytype=MAIL&version=6
Example request (legacy username/password):
http://<SERVER>/jsonapi/activities.json?&company=1&action=categories&activitytype=MAIL&version=6&user=<username>&password=<password>
Example response:
{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"totalrows": 49,
"totalpages": 1,
"responsemessage": "",
"pagerows": 0,
"pagenumber": 1,
"success": true,
"data": [
{
"lookupTime": "00:00:00",
"lookupTimeDisplay": "12:00 AM",
"variable_selected": true
},
{
"lookupTime": "00:30:00",
"lookupTimeDisplay": "12:30 AM",
"variable_selected": false
},
{
"lookupTime": "01:00:00",
"lookupTimeDisplay": "1:00 AM",
"variable_selected": false
},
{
"lookupTime": "01:30:00",
"lookupTimeDisplay": "1:30 AM",
"variable_selected": false
}
]
}Content warning (unresolved, not guessed at): the fields above (lookupTime/lookupTimeDisplay)
are byte-for-byte identical to Time Due Lookup's
response — this looks like the wrong action's content was pasted onto this page. By analogy to the
confirmed STATUS action's output shape (lookupActivityStatus/variable_selected), the real
fields for CATEGORIES are plausibly lookupActivityCategory/variable_selected, but this was not
confirmed with certainty against a live call, so the fields have deliberately not been renamed
here — only the invalid-JSON truncation was fixed. Needs a human/live-test decision before treating
the field names above as authoritative.
