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.

GEThttps://api.alia.cx/admin/agencies/{agencyId}/calendar

Required scopecalendar:read

Path parameters

  • agencyIdstringRequired

    Agency ID from GET /me that this API key may access.

Query parameters

  • datestring

    One local calendar day. Do not combine with startDate or endDate.

    pattern ^\d{4}-\d{2}-\d{2}$

  • startDatestring

    Inclusive local range start. Requires endDate; do not combine with date.

    pattern ^\d{4}-\d{2}-\d{2}$

  • endDatestring

    Exclusive local range end. Requires startDate; the range may span at most 42 days.

    pattern ^\d{4}-\d{2}-\d{2}$

  • timezonestring

    IANA time zone used to interpret local dates. Defaults to Europe/Brussels.

Responses

200OKCalendar read completed.
  • successbooleanRequired

    Always true for a successful read.

    One oftrue

  • dataobjectRequired

    Appointments and agents for the requested local-date window.

    Show 7 child fields
    • datestringRequired

      The requested date, or the start of a date range.

    • timezonestringRequired

      Time zone used to interpret local dates.

    • rangeobjectRequired

      Half-open instant range used for the read.

      Show 2 child fields
      • startstringRequired
      • endstringRequired
    • agencyobjectRequired

      The resolved agency and CRM provider.

      Show 4 child fields
      • idnumber or stringRequired

        One ofInfinity-InfinityNaN

      • namestring or nullRequired
      • providerstringRequired

        One ofwhiseomnicasaapimorealsuite

      • whiseAgencyIdnumber or string or null

        One ofInfinity-InfinityNaN

    • agentsarray of objectsRequired

      Agents in the calendar scope.

      Show 14 child fields
      • idstringRequired
      • providerIdstring or null
      • agentIdnumber or string or null

        One ofInfinity-InfinityNaN

      • namestringRequired
      • firstNamestring or null
      • lastNamestring or null
      • emailstring or null
      • mobilestring or null
      • directLinestring or null
      • officeExternalIdstring or null
      • initialsstringRequired
      • colorstring or null
      • isShadowboolean or null
      • whiseIdnumber or string or null

        One ofInfinity-InfinityNaN

    • appointmentsarray of objectsRequired

      Appointments that overlap the requested half-open range.

      Show 19 child fields
      • idstringRequired
      • providerIdstringRequired
      • subjectstring or null
      • notesstring or null
      • statusobject or null
        Show 3 child fields
        • idstring or number or null

          One ofInfinity-InfinityNaN

        • namestring or null
        • baseActionIdnumber or string or null

          One ofInfinity-InfinityNaN

      • typeobject or null
        Show 2 child fields
        • idstring or number or null

          One ofInfinity-InfinityNaN

        • namestring or null
      • startstringRequired

        pattern ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$

      • endstringRequired

        pattern ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$

      • allDaybooleanRequired
      • locationstring or null
      • agentIdsarray of stringsRequired
      • providerAgentIdsarray of stringsRequired
      • createdAtstring or null
      • updatedAtstring or null
      • propertyobject or null
        Show 3 child fields
        • idstring or number or null

          One ofInfinity-InfinityNaN

        • labelstring or null
        • addressstring or null
      • contactsarray of objectsRequired
        Show 6 child fields
        • idstring or number or null

          One ofInfinity-InfinityNaN

        • namestring or null
        • firstNamestring or null
        • lastNamestring or null
        • emailstring or null
        • phonesarray of objectsRequired
          Show 3 child fields
          • labelstringRequired
          • sourcestringRequired
          • valuestringRequired
      • durationMinutesnumber or string or null

        One ofInfinity-InfinityNaN

      • whiseIdnumber or string or null

        One ofInfinity-InfinityNaN

      • whiseAgentIdsarray or null
    • metadataobjectRequired

      Read metadata.

      Show 5 child fields
      • fetchedAtstringRequired
      • cachedbooleanRequired
      • sourcestringRequired

        One ofwhiseomnicasaapimorealsuite

      • totalAppointmentsnumber or stringRequired

        One ofInfinity-InfinityNaN

      • totalAgentsnumber or stringRequired

        One ofInfinity-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.