Get departments, hours and holidays

Returns the rooftop's departments (contact, hours, address), holidays and timezone.

GEThttps://api.spyne.ai/central-config/v1/vini-config/departments
AuthNone (route has no auth check)Rate limitNot documentedProcessingSynchronous. A failed write-back is logged and does not fail the read.

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 enterpriseId and teamId.

  • 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

Requiredalways send
Request checklist
  1. Pass enterpriseId and teamId.
  2. 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.

ParameterTypeRequiredDescription
enterpriseIdstringRequiredDealer group ID.
teamIdstringRequiredRooftop 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

ParameterTypeDescription
departments[]arrayOne entry per department.
departments[].namestringDepartment name. sales, service, parts and finance are built in; others are custom.
departments[].contactobjectOptional. 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[].timingsobjectOptional. 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[].addressanyOptional. A concrete address, or {sameAs: "<department or 'rooftop address'>"}.
holidays[]arrayHolidays.
holidays[].name, reason, datestringHoliday details.
holidays[].recurrencestring or nullmonthly, yearly or null.
holidays[].openbooleantrue if open with special hours.
holidays[].hours[]array{start, end} windows when open.
holidays[].allDepartmentsbooleantrue when the holiday applies to every department.
holidays[].departmentsstring[]The departments it applies to. When allDepartments is true, this lists every current department.
timezonestring or nullRooftop timezone from the rooftop record.

Errors

StatusReasonWhen it happens
400Validation errorenterpriseId or teamId is missing or empty.
500Failed to get Vini departmentsUnexpected error while reading.

Next

Show the departments and holidays. Edit them, then send the full set with Save departments, hours and holidays.


Did this page help you?