'get_capacity' Response

If any mandatory parameter of the request is missing, the request fails and a corresponding error message is returned.

Upon transaction success, 'get_capacity' returns a record or a list of records matching the properties specified in the request and their parameters:

  • capacity data for the capacity bucket and date defined (if defined, only for the specified capacity categories and time slots)

  • activity duration, if 'calculate_duration' flag in the request is set to 'true'

  • activity travel time, if 'calculate_travel_time' flag in the request is set to 'true'

  • activity capacity categories, if 'calculate_work_skill' flag in the request is set to 'true'

  • time slot data, if 'return_time_slot_info' in the request is set to 'true'

The following table describes the 'get_capacity' response parameters.

'get_capacity' response parameters

Name

Type

Description

activity_duration

int

predicted duration of the activity in minutes

if the 'calculate_duration' is set to 'true' and duration cannot be calculated, the transaction fails and a corresponding error is issued.

If the 'Define duration manually' feature is enabled for the activity type, the method returns the sent 'define_duration' value. Otherwise, the statistical value is used. If no statistical record is available for the activity, the sent 'default_duration' value is returned.

When 'default_duration' is omitted and the 'Define duration manually' feature is enabled for the activity type, the default duration defined at the company level is returned.

activity_travel_time

int

predicted duration of the activity in minutes

If the 'calculate_travel_time' flag is set to 'true' and travel time cannot be calculated, the transaction fails and a corresponding error is issued.

If the activity type ('worktype_label' or 'aworktype') is sent in the request, the functional checks whether the 'Calculate travel' feature is enabled for such activity type. If this feature is disabled, '0' is returned as the 'activity_travel_time' value.

capacity

array

capacity data returned for the day, time slot or capacity category specified as one or several 'capacity' nodes

the number of nodes returned is the same as the number of variants matching the request (e.g. for each possible time slot, date etc.)

time_slot_info

array

time slot data returned for the specified time slot. 'time_slot_info' is only returned when 'return_time_slot_info' is set to 'true'.

'capacity' Array of 'get_capacity' Response

Name

Type

Description

date

date

date for which capacity quota ('quota') and available capacity ('available') is returned

time_slot

string

time slot for which capacity quota ('quota') and available capacity ('available') is returned

work_skill

string

label of the capacity category for which capacity quota ('quota') and available capacity ('available') is returned

if the 'calculate_work_skill' flag is set to 'true' and the work skill cannot be calculated, the transaction fails and a corresponding error is issued

quota

longint

total number of man-minutes available in the bucket for the specified date, time slot and capacity category

available

longint

number of man-minutes available in the bucket for the specified date, time slot and capacity category excluding the minutes already reserved (used) for the same date, time slot and capacity category in the same capacity bucket

Note: The value may be zero or negative, which means that available capacity for the bucket has been exceeded.

location

string

external ID of the capacity bucket for which results are returned

'time_slot_info' Array of 'get_capacity' Response

Name

Type

Description

name

string

name of the time slot for which capacity is requested

label

string

label of the time slot for which capacity is requested

time_from, time_to

time

start and end time of the time slot for which capacity is requested in the HH:MM:SS format