AlmondTill/G3N API

On this page

schedulableResourceAvailability

query · in the family Reading your records

What it does

One resource’s availability facts over a window (at most 31 days) — its advisory hours, capacity and the reserved bookings; compose free slots from them.

ONE resource's availability facts over [from, to): the advisory weekly hours + the capacity + the RESERVED bookings overlapping the window. The resource must exist in YOUR org group. The client composes free slots. Requires authentication (template class).

Who may call it

Capability area: Reading your records — Looking up and listing the records of your organization.

Arguments

NameTypeRequiredNotes
resourceIdID ID!yesNo further notes.
fromString String!yesNo further notes.
toString String!yesNo further notes.

Returns

SchedulableResourceAvailability SchedulableResourceAvailability! — The availability answer — the SRCD's own words: availability = resource hours − booked appointments (DERIVED; the client composes free slots; zero server timezone math — hours are naive wall-clock ADVISORY).

Example request

query ExampleSchedulableResourceAvailability($resourceId: ID!, $from: String!, $to: String!) {
  schedulableResourceAvailability(resourceId: $resourceId, from: $from, to: $to) {
    resourceId
    capacity
  }
}

Variables:

{
  "resourceId": "01900000-0000-7000-8000-33025eb00000",
  "from": "<from>",
  "to": "<to>"
}

Example response

{
  "data": {
    "schedulableResourceAvailability": {
      "resourceId": "01900000-0000-7000-8000-33025eb00000",
      "capacity": 1
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer