Obtaining Activity Category Id

Hi
When using the API /api/v2/workforcemanagement/businessunits/{businessUnitId}/activitycodes, I notice it contains the Category in the form of name only and no Category Id. e.g.

   "id": "afb94311-e089-4ff0-b2b0-15g06f8d51f6",
   "name": "Sick Leave",
   "active": true,
   "defaultCode": false,
   **"category": "TimeOff",**
   "lengthInMinutes": 120,

I need to use the Category for unique grouping in reporting etc. I'm working on the assumption (because I don't have the rights to check) that multiple Categories can be added with the same name and, based on this being correct, I need the Category Id for unique grouping. So I have two questions please:

  1. Is it possible to add two Activity Categories with the same name
  2. If so, is there an API that will return the Category name and Id

But really, regardless of the answer to 1, it would be useful to have 2, if there is such an API.

Thanks
Richard

Activity categories are built-in and not extensible. So, there is no possibility of having two activity categories with the same name. Also, category here isn't 'name' it is the string representation of the enum values noted in the API document: category (string) The category of the activity code. Valid values: OnQueueWork, Break, Meal, Meeting, OffQueueWork, TimeOff, Training, Unavailable, Unscheduled.

1 Like

Hi @Langsford_Jay
Thanks, that clears it up :slight_smile:
Cheers

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.