Get an activity type

get

/rest/ofscMetadata/v1/activityTypes/{label}

This operation retrieves the details of the specified activity type.

Request

Path Parameters
  • Minimum Length: 1
    Maximum Length: 255
    The unique identifier of the activity type.
Back to Top

Response

Supported Media Types

200 Response

This section describes the 200 status response for this operation.
Body ()
Root Schema : ActivityTypes
Type: object
The collection of activity types. It is not returned for an empty collection.
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : Activity Type
Type: object
Title: Activity Type
The activity type object.
Show Source
  • Title: Active
    Contains one of the following values: true or false.

    If true, then the activity type is listed as a possible value in the 'Activity Type' drop-down list in Manage or Mobility apps while creating an activity. If false, then the activity type is not listed as a value in the drop-down list. The default value is true.

  • Colors
    Title: Colors
    The set of color values for the corresponding status of the activity.
  • Title: Default Duration
    The default duration of the activity type. It is used while creating an activity and when no statistics are available for the activity.
  • Features
    Title: Features
    The set of boolean attributes that define the active features for the activity type.
  • Title: Group Label
    The label of the activity type group.
  • Title: Label
    The unique label assigned to the activity type. For example, IN (Install).
  • Title: Name
    Minimum Length: 1
    Maximum Length: 32
    The translation for the name of the activity type.

    If the language parameter is specified, then the name is provided in that language.

    If the language parameter is not specified, then the name is provided in English, unless the request is performed using an OFSC user account which is linked to an API application (in this case, the name is provided in the language of the user making the request).

  • Title: Segment Max Duration
    Allowed Values: [ 15, 30, 45, 60, 90, 120, 180, 240, 300, 360, 420, 480, 540, 600, 660, 720, 780, 840, 900 ]
    The maximum total duration of segments created for a particular day, for segmentable activities, in minutes. It is returned if the value of isSegmentingEnabled is set to true.

    Allowed values are: 15,30,45,60,90,120,180,240,300,360,420,480,540,600,660,720,780,840,900

  • Title: Segment Min Duration
    Allowed Values: [ 15, 30, 45, 60, 90, 120, 180, 240, 300, 360, 420, 480, 540, 600, 660, 720, 780, 840, 900 ]
    The minimum duration of a single segment created for a particular day, for segmentable activities, in minutes. It is returned if the value of isSegmentingEnabled is set to true.

    Allowed values are: 15,30,45,60,90,120,180,240,300,360,420,480,540,600,660,720,780,840,900

  • Time Slot
    Title: Time Slot
    The collection of time slots.
  • Translations
    Title: Translations
    The list of translations associated with the name of the activity type. The list is only returned if the language parameter is not specified in the request.
Nested Schema : Colors
Type: object
Title: Colors
The set of color values for the corresponding status of the activity.
Show Source
Nested Schema : Features
Type: object
Title: Features
The set of boolean attributes that define the active features for the activity type.
Show Source
  • Contains one of the following values: true or false. If true, then 'creation in buckets' feature is allowed. If false, then 'creation in buckets' feature is not allowed. The default value is false.
  • Contains one of the following values: true or false. If true, then 'mass activities' feature is allowed. If false, then 'mass activities' feature is not allowed. The default value is false.
  • Contains one of the following values: true or false. If true, then 'move between resources' feature is allowed. If false, then 'move between resources' feature is not allowed. The default value is false.
  • Contains one of the following values: true or false. If true, then 'non-scheduled' feature is allowed. If false, then 'non-scheduled' feature is not allowed. The default value is false.
  • Contains one of the following values: true or false. If true, then 'repeating activities' feature is allowed. If false, then 'repeating activities' feature is not allowed. The default value is false.
  • Contains one of the following values: true or false. If true, then 'reschedule' feature is allowed. If false, then 'reschedule' feature is not allowed. The default value is false.
  • Contains one of the following values: true or false. If true, then 'create from incoming interface' feature is allowed. If false, then 'create from incoming interface' feature is not allowed. The default value is false.
  • Contains one of the following values: true or false. If true, then 'search' feature is allowed. If false, then 'search' feature is not allowed. The default value is false.
  • Contains one of the following values: true or false. If true, then 'calculate activity duration using statistics' feature is enabled. If false, then 'calculate activity duration using statistics' feature is not enabled. The default value is false.
  • Contains one of the following values: true or false. If true, then 'calculate delivery window' feature is enabled. If false, then 'calculate delivery window' feature is not enabled. The default value is false.
  • Contains one of the following values: true or false. If true, then 'calculate travel' feature is enabled. If false, then 'calculate travel' feature is not enabled. The default value is false.
  • Contains one of the following values: true or false. If true, then 'location tracking' feature is disabled. If false, then 'location tracking' feature is enabled. The default value is false.
  • Contains one of the following values: true or false. If true, then 'day before trigger' feature is enabled. If false, then 'day before trigger' feature is not enabled. The default value is false.
  • Contains one of the following values: true or false. If true, then 'not started trigger' feature is enabled. If false, then 'not started trigger' feature is not enabled. The default value is false.
  • Contains one of the following values: true or false. If true, then 'reminder and change triggers' feature is enabled. If false, then 'reminder and change triggers' feature is not enabled. The default value is false.
  • Contains one of the following values: true or false. If true, then 'SW warning trigger' feature is enabled. If false, then 'SW warning trigger' feature is not enabled. The default value is false.
  • Contains one of the following values: true or false. If true, then 'segmenting of activity' feature is available. If false, then 'segmenting of activity' feature is not available. The default value is false.
  • Contains one of the following values: true or false. If true, then 'teamwork' feature is available. If false, then 'teamwork' feature is not available. The default value is false.
  • Contains one of the following values: true or false. If true, then 'SLA and Service window use customer time zone (required for routing)' feature is enabled. If false, then 'SLA and Service window use customer time zone (required for routing)' feature is not enabled. The default value is false.
  • Contains one of the following values: true or false. If true, then 'inventory' feature is supported. If false, then 'inventory' feature is not supported. The default value is false.
  • Contains one of the following values: true or false. If true, then 'not-ordered activities' feature is supported. If false, then 'not-ordered activities' feature is not supported. The default value is false.
  • Contains one of the following values: true or false. If true, then 'preferred resources' feature is supported. If false, then 'preferred resources' feature is not supported. The default value is false.
  • Contains one of the following values: true or false. If true, then 'required inventory' feature is supported. If false, then 'required inventory' feature is not supported. The default value is false.
  • Contains one of the following values: true or false. If true, then 'time slots' feature is supported. If false, then 'time slots' feature is not supported. The default value is false.
  • Contains one of the following values: true or false. If true, then 'work skills' feature is supported. If false, then 'work skills' feature is not supported. The default value is false.
  • Contains one of the following values: true or false. If true, then 'work zones' feature is supported. If false, then 'work zones' feature is not supported. The default value is false.
Nested Schema : Time Slot
Type: array
Title: Time Slot
The collection of time slots.
Show Source
Nested Schema : Translations
Type: array
Title: Translations
The list of translations associated with the name of the activity type. The list is only returned if the language parameter is not specified in the request.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : Translation
Type: object
Show Source
  • This field contains language code of a text translation, it conatains two characters length code in responses (e.g. 'en', 'es') but can be used in requests as extended ISO code (e.g. 'en-US') as well as old two character format.
  • This field is used only in responses and returns ISO language code (e.g. 'en-US'). This field is ignored in the requests (use 'language' instead)

Default Response

This section describes the default error response for this operation.
Body ()
Root Schema : Error
Type: object
Error response
Show Source
Back to Top

Examples

The following example shows how to get an activity type by submitting a GET request on the REST resource.

cURL Command Example

The following shows an example of the cURL command.

curl -X GET "https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/activityTypes/6" -u "<CLIENT-ID>@<INSTANCE-NAME>:<CLIENT-SECRET>" -H "Accept: application/json" -H "Content-Type: application/json"

Response Header Example

The following shows an example of the response header.

HTTP/1.1 200 OK
Server: nginx
Date: Mon, 14 Oct 2019 10:32:44 GMT
Content-Type: application/json; charset=utf-8
Connection: close

Response Body Example

The following shows an example of the response body in JSON format.

{
    "label": "6",
    "name": "Phone Install/Upgrade",
    "active": true,
    "groupLabel": "customer",
    "defaultDuration": 48,
    "timeSlots": [
        {
            "label": "08-10"
        },
        {
            "label": "10-12"
        },
        {
            "label": "13-15"
        },
        {
            "label": "15-17"
        },
        {
            "label": "all-day"
        }
    ],
    "colors": {
        "pending": "FFDE00",
        "started": "5DBE3F",
        "suspended": "99FFFF",
        "cancelled": "80FF80",
        "notdone": "60CECE",
        "notOrdered": "FFCC99",
        "warning": "FFAAAA",
        "completed": "79B6EB"
    },
    "features": {
        "isTeamworkAvailable": false,
        "isSegmentingEnabled": false,
        "allowMoveBetweenResources": true,
        "allowCreationInBuckets": true,
        "allowReschedule": true,
        "supportOfNotOrderedActivities": true,
        "allowNonScheduled": true,
        "supportOfWorkZones": true,
        "supportOfWorkSkills": true,
        "supportOfTimeSlots": true,
        "supportOfInventory": true,
        "supportOfLinks": true,
        "supportOfPreferredResources": true,
        "allowMassActivities": false,
        "allowRepeatingActivities": false,
        "calculateTravel": true,
        "calculateActivityDurationUsingStatistics": true,
        "allowToSearch": true,
        "allowToCreateFromIncomingInterface": true,
        "enableDayBeforeTrigger": true,
        "enableReminderAndChangeTriggers": true,
        "enableNotStartedTrigger": true,
        "enableSwWarningTrigger": true,
        "calculateDeliveryWindow": true,
        "slaAndServiceWindowUseCustomerTimeZone": true,
        "supportOfRequiredInventory": true,
        "disableLocationTracking": false
    },
    "translations": [
        {
            "language": "en",
            "name": "Phone Install/Upgrade",
            "languageISO": "en-US"
        },
        {
            "language": "es",
            "name": "Install/Upgrade: Telefono",
            "languageISO": "es-ES"
    ],
    "links": [
        {
            "rel": "canonical",
            "href": "https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/activityTypes/6"
        },
        {
            "rel": "describedby",
            "href": "https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/metadata-catalog/activityTypes"
        }
    ]
}
Back to Top