Get activity types

get

/rest/ofscMetadata/v1/activityTypes

This operation retrieves a collection of activity types along with all the information about each activity type.

Request

Query Parameters
  • The translation language code. Based on the value of this parameter, the translation for the name of the activity type is returned in the 'name' field.
    • If the value is specified, then the translated value is returned in the 'name' field and the 'translations' field is not returned in the response.
    • If translation for the specified language does not exist, then the value in the 'name' field is returned in English.
    • If the value is not specified, then the 'translations' field is returned in the response and contains the translations to every language in the system.

    For the list of supported language codes, see Supported Language Codes.

  • The number of activity type records to be returned in the response. The minimum value that can be specified is 1 and the maximum value that can be specified is 100. If the specified value is zero, greater than 100, or if no value is specified, then it defaults to 100.
  • The record number from which the retrieval starts. The default value is zero. If no value is specified, then it defaults to zero. The value zero indicates that the retrieval will start from the beginning of the collection.
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

Example 1

The following example shows how to obtain a collection of activity types by submitting a GET request on the REST resource using cURL.

Use the cURL command with the following syntax:

curl -u 'clientId@instanceName:clientSecret' --url 'https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/activityTypes/?limit=2&offset=2'

Response Header Example

The following shows an example of the response header:

HTTP/1.1 200 OK
Server: nginx
Date: Mon, 14 Oct 2019 09:24:41 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:

{
    "hasMore": true,
    "totalResults": 61,
    "limit": 2,
    "offset": 2,
    "items": [
        {
            "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: Tel??fono",
                    "languageISO": "es-ES"
                }
            ],
            "links": [
                {
                    "rel": "describedby",
                    "href": "https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/metadata-catalog/activityTypes"
                }
            ]
        },
        {
            "label": "7",
            "name": "HSD / High Speed Data install",
            "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": "HSD / High Speed Data install",
                    "languageISO": "en-US"
                },
                {
                    "language": "es",
                    "name": "HSD / Los datos de alta velocidad instalar",
                    "languageISO": "es-ES"
                }
            ],
            "links": [
                {
                    "rel": "describedby",
                    "href": "https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/metadata-catalog/activityTypes"
                }
            ]
        }
    ],
    "links": [
        {
            "rel": "canonical",
            "href": "https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/activityTypes?limit=2&offset=2"
        },
        {
            "rel": "prev",
            "href": "https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/activityTypes?limit=2&offset=0"
        },
        {
            "rel": "next",
            "href": "https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/activityTypes?limit=2&offset=4"
        },
        {
            "rel": "describedby",
            "href": "https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/metadata-catalog/activityTypes"
        }
    ]
}

Example 2

The following example shows how to obtain a collection of activity types by using the language parameter with the GET request on the REST resource.

Use the cURL command with the following syntax:

curl -u 'clientId@instanceName:clientSecret' --url 'https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/activityTypes/?language=en-US&limit=2&offset=2'

Response Header Example

The following shows an example of the response header.

HTTP/1.1 200 OK
Server: nginx
Date: Mon, 14 Oct 2019 09:38:21 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:

{
    "hasMore": true,
    "totalResults": 61,
    "limit": 2,
    "offset": 2,
    "items": [
        {
            "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
            },
            "links": [
                {
                    "rel": "describedby",
                    "href": "https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/metadata-catalog/activityTypes"
                }
            ]
        },
        {
            "label": "7",
            "name": "HSD / High Speed Data install",
            "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
            },
            "links": [
                {
                    "rel": "describedby",
                    "href": "https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/metadata-catalog/activityTypes"
                }
            ]
        }
    ],
    "links": [
        {
            "rel": "canonical",
            "href": "https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/activityTypes?limit=2&offset=2"
        },
        {
            "rel": "prev",
            "href": "https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/activityTypes?limit=2&offset=0"
        },
        {
            "rel": "next",
            "href": "https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/activityTypes?limit=2&offset=4"
        },
        {
            "rel": "describedby",
            "href": "https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/metadata-catalog/activityTypes"
        }
    ]
}
Back to Top