Read an agency calendar
Reads CRM appointments for one authorized agency. Your API key needs calendar:read. Pass either date for one local day, or both startDate and endDate for a half-open local-date range of at most 42 days; endDate is exclusive. The response contains only appointments that overlap the requested range.
https://api.alia.cx/ admin/ agencies/ {agencyId}/ calendarRequired scopecalendar:read
Path parameters
agencyIdstringRequiredAgency ID from
GET /methat this API key may access.
Query parameters
datestringOne local calendar day. Do not combine with
startDateorendDate.pattern ^\d{4}-\d{2}-\d{2}$
startDatestringInclusive local range start. Requires
endDate; do not combine withdate.pattern ^\d{4}-\d{2}-\d{2}$
endDatestringExclusive local range end. Requires
startDate; the range may span at most 42 days.pattern ^\d{4}-\d{2}-\d{2}$
timezonestringIANA time zone used to interpret local dates. Defaults to
Europe/Brussels.
Responses
successbooleanRequiredAlways true for a successful read.
One of
truedataobjectRequiredAppointments and agents for the requested local-date window.
Show 7 child fieldsHide child fields
datestringRequiredThe requested date, or the start of a date range.
timezonestringRequiredTime zone used to interpret local dates.
rangeobjectRequiredHalf-open instant range used for the read.
Show 2 child fieldsHide child fields
startstringRequiredendstringRequired
agencyobjectRequiredThe resolved agency and CRM provider.
Show 4 child fieldsHide child fields
idnumber or stringRequiredOne of
Infinity-InfinityNaNnamestring or nullRequiredproviderstringRequiredOne of
whiseomnicasaapimorealsuitewhiseAgencyIdnumber or string or nullOne of
Infinity-InfinityNaN
agentsarray of objectsRequiredAgents in the calendar scope.
Show 14 child fieldsHide child fields
idstringRequiredproviderIdstring or nullagentIdnumber or string or nullOne of
Infinity-InfinityNaNnamestringRequiredfirstNamestring or nulllastNamestring or nullemailstring or nullmobilestring or nulldirectLinestring or nullofficeExternalIdstring or nullinitialsstringRequiredcolorstring or nullisShadowboolean or nullwhiseIdnumber or string or nullOne of
Infinity-InfinityNaN
appointmentsarray of objectsRequiredAppointments that overlap the requested half-open range.
Show 19 child fieldsHide child fields
idstringRequiredproviderIdstringRequiredsubjectstring or nullnotesstring or nullstatusobject or nullShow 3 child fieldsHide child fields
idstring or number or nullOne of
Infinity-InfinityNaNnamestring or nullbaseActionIdnumber or string or nullOne of
Infinity-InfinityNaN
typeobject or nullShow 2 child fieldsHide child fields
idstring or number or nullOne of
Infinity-InfinityNaNnamestring or null
startstringRequiredpattern ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$
endstringRequiredpattern ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$
allDaybooleanRequiredlocationstring or nullagentIdsarray of stringsRequiredproviderAgentIdsarray of stringsRequiredcreatedAtstring or nullupdatedAtstring or nullpropertyobject or nullShow 3 child fieldsHide child fields
idstring or number or nullOne of
Infinity-InfinityNaNlabelstring or nulladdressstring or null
contactsarray of objectsRequiredShow 6 child fieldsHide child fields
idstring or number or nullOne of
Infinity-InfinityNaNnamestring or nullfirstNamestring or nulllastNamestring or nullemailstring or nullphonesarray of objectsRequiredShow 3 child fieldsHide child fields
labelstringRequiredsourcestringRequiredvaluestringRequired
durationMinutesnumber or string or nullOne of
Infinity-InfinityNaNwhiseIdnumber or string or nullOne of
Infinity-InfinityNaNwhiseAgentIdsarray or null
metadataobjectRequiredRead metadata.
Show 5 child fieldsHide child fields
fetchedAtstringRequiredcachedbooleanRequiredsourcestringRequiredOne of
whiseomnicasaapimorealsuitetotalAppointmentsnumber or stringRequiredOne of
Infinity-InfinityNaNtotalAgentsnumber or stringRequiredOne of
Infinity-InfinityNaN
Errors
- 400Bad requestThe calendar request is invalid.
- 401UnauthorizedThe bearer token is missing or invalid. Invalid partner API keys use the calendar error envelope; missing or non-partner credentials use the existing admin JSON-RPC envelope.
- 403ForbiddenThe API key cannot read this agency calendar.
- 404Not foundThe agency calendar could not be found.
- 429Too many requestsThe calendar read rate limit has been reached.
- 501ErrorThe agency CRM does not support calendar reads.
- 502Bad gatewayThe CRM returned an invalid or incomplete calendar response.
- 503Service unavailableThe CRM calendar is temporarily unavailable.
- 504ErrorThe CRM calendar request timed out.
Error response envelopes vary by authentication path. Inspect the response schema for each status before decoding errors.