Skip to main content

Fetch Available Service Resources

Purpose

Retrieve available service resources based on the specified criteria.

Request URL

https://fsm.zoho.com/fsm/v1/serviceResource/getAvailableServiceResources

Request Method

GET

Scope

scope=ZohoFSM.modules.custom.READ

Parameters

NameData TypeDescriptionMandatory
start_date_timeDate/DateTime

The start time from which you want to check the availability of the resources. The value must be in the ISO format: YYYY-MM-DD or YYYY-MM-DDThh:mm:ssTZD

If only the date is provided, the start time will be considered as 00:00:00. Encode as required.

Yes
end_date_timeDate/DateTime

The end time of the period for which you want to check the availability of the resources. The value must be in the ISO format: YYYY-MM-DD or YYYY-MM-DDThh:mm:ssTZD.

If this value is not provided, the end of the day of the start_date_time value will be considered. Encode as required.

 
territory_idsStringComma-separated IDs of the territories in which you want to check the availability of the resources. Use "ALL" to include all territories.Yes, if there are multiple territories in the organization
skillsStringCheck the availability of the resources based on their skills. Pass the IDs as comma-separated values. 
service_resource_typeString

Check the availability of the resources based on the type of the resource. The acceptable values are:

- ALL

- Agent

- Crew

- Equipment

 
service_resource_nameStringCheck the availability of the resource using their name 
service_resource_idsStringCheck the availability of the resources using their IDs (the id in the Service_Resources key present in the List Users API response). Pass the IDs as comma-separated values. 
ignore_conflicting_appointmentsBoolean

Whether to consider service resources with appointments as available or not.

true: service resources with appointments will be considered as available.

false: service resources with appointments will not be considered as available.

Unless specified, this will be considered true.

 
ignore_timeoff_conflictBoolean

Whether to consider service resources on time off as available or not.

true: service resources on time off will be considered as available.

false: service resources on time off will not be considered as available.

Unless specified, this will be considered true.

 
get_unavailable_resourcesBoolean

Whether to include unavailable resources in the response.

true: resources with assigned appointments, who are on time off, or are unavailable for some reason will be included. The property is_available will be set to false for them.

false: resources with assigned appointments, who are on time off, or are unavailable for some reason will be excluded. 

Unless specified, this will be considered false.

 

Sample Request

Copiedcurl --request GET 'https://fsm.zoho.com/fsm/v1/serviceResource/getAvailableServiceResources?start_date_time=2025-02-11&territory_ids=1003000000208154' \
--header 'Authorization: Zoho-oauthtoken 1000.xxxx.xxxxxe'

Sample Success Response

Copied{
    "data": [
        {
            "Service_Resources": {
                "Crew": null,
                "Type": "Equipment",
                "User": null,
                "id": "1003000001779513",
                "isActive": true,
                "Name": "Demolition 16 Kg Road Hammer Drill Machine",
                "is_available": true
            },
            "Parent_Crews": [
                {
                    "Start_Date_Time": "2024-09-24T00:00:00+05:30",
                    "id": "1003000001981034",
                    "Name": "Road Repair Crew"
                }
            ],
            "Territories": [
                {
                    "End_Date_Time": null,
                    "Start_Date_Time": "2024-09-02T00:00:00+05:30",
                    "id": "1003000000208154",
                    "Name": "Zylker"
                }
            ]
        }   
    ],
    "info": {
        "count": 1
    }
}

Sample Failure Response

Copied{
    "code": "MANDATORY_NOT_FOUND",
    "details": {
        "param_name": "territory_ids"
    },
    "message": "mandatory param missing",
    "status": "error"
}