Capacity Planning API

The MoversSuite Capacity Planning API service allows you to view availability of crew, equipment, and packing information on Local Services requests by branch for a given date range. It also provides a visual indication of the percentage used of each resource type established on your system. This information is available to assist sales and surveying personnel in managing service assignments and pricing.

Refer to the Capacity Planning topic for related information. Refer to these two topics for more information.

The Capacity Planning API is utilized through the MoversSuite API Service and related sub-services, such as the WebApiService.

JSON Response

 

This method returns response in JSON format.

 

HTTPS:// Verb/Method:

Response

URL Format:

/api/capacity?start={start_date}&end={end_date}&branchId={branchID}

Returns:

Capacity data for the specified start and end dates against the given Branch ID.

An error returns if the capacity data cannot be found.

 

The following table lists the parameter available for this method request.

 

Parameter

Description

Start

Enter the start date from when you need to calculate the capacity.

End

Enter the end date till when you need to calculate the capacity.

BranchID

Enter the Branch ID against which you need to calculate the capacity.

 

Note

For all the real-time scenarios, a max date range of 150 days has been set between the specified start and end dates.

 

Request Response

By default, capacity data returns in JSON format similar to the example below:

 

{

    "error": null,

    "success": true,

    "data": [

    {

    "date": "2019-9-8",

    "buckets":

[

    {

     "bucketName": "SampleBucket",

     "bucketType": "Equipment Count",

     "resources":

[

    {

       "units": "equipment",

       "total": 8,

       "used": 1,

       "available": 7

     },

     {

        "units": "hours",

        "total": 32,

        "used": 3,

        "available": 29

     }

     ],

         "basis": "equipment",

         "percentage": 13,

         "threshold": 0,

         "colors":

{

          "background": "#008000",

          "foreground": "#FFFFFF"

       }

       },

 

The following table describes the metadata returned by this method.

 

Property

Description

Date

The date for which the Capacity Planning Data is being shown.

Buckets

Contains the details regarding the type of bucket that is being called.

BucketName

Shows the name of the bucket.

BucketType

The type of the bucket such as a bucket of Personnel or Equipment etc.

Resources

Shows the details of the resources that are allocated.

Units

Shows the units of the resources such as hours or crew etc.

Total

This column includes all available amounts for the corresponding bucket. For example, if you have 10 movers available and setup for Capacity Planning, then 10 crew shows in this column along with the defined total number of hours of availability.

Used

The amount of allocated crew and resources display in this column.

Available

The Total Capacity less the Used Capacity show in this column.

Basis

Shows on which basis the capacity is being calculated.

Percentage

Shows the percentage of capacity used.

Threshold

Shows Threshold set for displaying different levels of capacity.

Colors

Contains the details regarding Background and Foreground colors.

Background

Shows the hex code for Background color.

Foreground

Shows the hex code for Foreground color.

 

Response Failure

In scenarios where the parameters aren’t fulfilled, the failure is returned in JSON. In this example, we assume that the branch ID was not provided:

 

{"error":"a 'branchId' is required","success":false,"data":null}