Get departments, hours and holidays
Returns the rooftop's departments (contact, hours, address), holidays and timezone.
Reads the departments and holidays stored on the rooftop configuration. The timezone is always read fresh from the rooftop record, and is null when none is set or the lookup fails. Department contacts are then compared with the department contact registry that call transfers use:
- For departments already stored, the registry's phone, email, IVR flag, extension and transfer flags are shown in place of the stored ones. This only changes the response.
- Active registry departments that are not stored are added to the response. They are also written back to the stored configuration.
If nothing is stored yet, the call builds the view from the live agent settings (hours, contacts and holidays). It saves that view to the stored configuration, then returns it.
So this GET can write.
Before you call it
-
You need
enterpriseIdandteamId. -
Authentication: No authentication check on this route
-
Rate limit: Not documented
-
Processing: Synchronous. It waits for its lookups and for any write-back. A failed write-back is logged and does not fail the read.
Request
- Pass
enterpriseIdandteamId. - Use the response as the starting point for Save departments, hours and holidays. Send back the full lists you want kept.
All parameters go in the query string.
| Parameter | Type | Required | Description |
|---|---|---|---|
enterpriseId | string | Required | Dealer group ID. |
teamId | string | Required | Rooftop ID. |
Sample request
curl -X GET "https://api.spyne.ai/central-config/v1/vini-config/departments?enterpriseId=<enterpriseId>&teamId=<teamId>"import requests
res = requests.get(
"https://api.spyne.ai/central-config/v1/vini-config/departments",
params={"enterpriseId": "<enterpriseId>", "teamId": "<teamId>"},
)
print(res.status_code, res.json())const qs = new URLSearchParams({ enterpriseId: "<enterpriseId>", teamId: "<teamId>" });
const res = await fetch(`https://api.spyne.ai/central-config/v1/vini-config/departments?${qs}`);
console.log(res.status, await res.json());Sample response
{
"departments": [
{
"name": "sales",
"contact": { "name": "Sales", "phone": "+15550100000", "email": "[email protected]", "isIvr": false },
"timings": {
"monday": { "isAvailable": true, "startTime": "09:00", "endTime": "18:00", "isTransferAvailable": true },
"tuesday": { "isAvailable": true, "startTime": "09:00", "endTime": "18:00", "isTransferAvailable": true },
"wednesday": { "isAvailable": true, "startTime": "09:00", "endTime": "18:00", "isTransferAvailable": true },
"thursday": { "isAvailable": true, "startTime": "09:00", "endTime": "18:00", "isTransferAvailable": true },
"friday": { "isAvailable": true, "startTime": "09:00", "endTime": "18:00", "isTransferAvailable": true },
"saturday": { "isAvailable": true, "startTime": "10:00", "endTime": "16:00", "isTransferAvailable": true },
"sunday": { "isAvailable": false, "isTransferAvailable": true }
}
},
{
"name": "service",
"timings": { "isSameAsSales": true, "monday": { "isAvailable": true, "startTime": "09:00", "endTime": "18:00" } }
}
],
"holidays": [
{
"name": "Thanksgiving",
"reason": "Public holiday",
"date": "2026-11-26",
"recurrence": "yearly",
"open": false,
"hours": [],
"allDepartments": true,
"departments": ["sales", "service"]
}
],
"timezone": "America/Chicago"
}{
"success": false,
"message": "Validation error",
"errors": [{ "code": "too_small", "path": ["teamId"], "message": "Team ID is required" }]
}{ "success": false, "message": "Failed to get Vini departments", "error": "..." }200 OK. This response is not wrapped in success/data.
Response fields
| Parameter | Type | Description |
|---|---|---|
departments[] | array | One entry per department. |
departments[].name | string | Department name. sales, service, parts and finance are built in; others are custom. |
departments[].contact | object | Optional. name, phone, plus optional email, isIvr, extension, transfer_ai_during, transfer_ai_after, transfer_department_during, transfer_department_after, transfer_employee_during, transfer_employee_after. |
departments[].timings | object | Optional. Seven day keys (monday…sunday), each {isAvailable, startTime?, endTime?, isTransferAvailable?, weekOverrides?}. It can also carry a copy marker (isSameAsSales, isSameAsService or sameAs) next to the copied days. |
departments[].address | any | Optional. A concrete address, or {sameAs: "<department or 'rooftop address'>"}. |
holidays[] | array | Holidays. |
holidays[].name, reason, date | string | Holiday details. |
holidays[].recurrence | string or null | monthly, yearly or null. |
holidays[].open | boolean | true if open with special hours. |
holidays[].hours[] | array | {start, end} windows when open. |
holidays[].allDepartments | boolean | true when the holiday applies to every department. |
holidays[].departments | string[] | The departments it applies to. When allDepartments is true, this lists every current department. |
timezone | string or null | Rooftop timezone from the rooftop record. |
Errors
| Status | Reason | When it happens |
|---|---|---|
400 | Validation error | enterpriseId or teamId is missing or empty. |
500 | Failed to get Vini departments | Unexpected error while reading. |
Next
Show the departments and holidays. Edit them, then send the full set with Save departments, hours and holidays.
- Called before: Save rooftop details.
- Called after: Save departments, hours and holidays.
Updated about 1 hour ago
