Skip to content

Availability

The availability calls return the time slots in which your workers are free, between two dates. A worker is busy while they have a job scheduled, and, when working hours are enabled for your account, outside their working hours.

These calls are not available on trial plans.

Both calls take the following parameters:

NameTypeDescription
start_atDateTimeRequired. The start of the period to check. The format of the date/time must be iso8601; the slots are returned in the same UTC offset.
end_atDateTimeRequired. The end of the period to check. The format of the date/time must be iso8601.
worker_idsIntegerOnly consider these workers. Repeat the parameter for several workers, e.g. worker_ids[]=4016&worker_ids[]=13045.
tag_idsIntegerOnly consider workers with these tags. Repeat the parameter for several tags.
group_idsIntegerOnly consider workers in these groups. Repeat the parameter for several groups.

A missing start_at or end_at is rejected with a 422 error.

Retrieve Available Time Slots

Request

Returns the time slots in which at least one of the workers is free.

Security
apiKey
Query
api_keystringrequired
start_atstringrequired

Start of the period, iso8601.

Example:start_at=2030-01-07T09:00:00%2B13:00
end_atstringrequired

End of the period, iso8601.

Example:end_at=2030-01-07T11:00:00%2B13:00
worker_ids[]integer

Only consider these workers.

tag_ids[]integer

Only consider workers with these tags.

group_ids[]integer

Only consider workers in these groups.

Headers
Accept-Encodingstringrequired

Must be gzip. The vWork API requires HTTP compression on all requests; requests without it may be rejected with 406 Not Acceptable (see Tech Notes → HTTP Compression).

Value:"gzip"
Example:gzip
GET
/v5/availability/compact.xml
curl -i -X GET \
  'https://go.vworkapp.com/api/v5/availability/compact.xml?api_key=string&start_at=2030-01-07T09%3A00%3A00%252B13%3A00&end_at=2030-01-07T11%3A00%3A00%252B13%3A00&worker_ids%5B%5D=0&tag_ids%5B%5D=0&group_ids%5B%5D=0&api_key=YOUR_API_KEY_HERE' \
  -H 'Accept-Encoding: gzip'

Responses

OK

Headers
Statusstring
Example:"200 OK"
Cache-Controlstring
Example:"max-age=0, private, must-revalidate"
Content-Encodingstring
Example:"gzip"
Bodyapplication/xml; charset=utf-8
string

Raw XML payload — see the example.

Response
<?xml version="1.0" encoding="utf-8"?>
<availability>
    <slots type="array">
        <slot>
            <from type="datetime">2030-01-07T09:00:00+13:00</from>
            <to type="datetime">2030-01-07T11:00:00+13:00</to>
        </slot>
    </slots>
</availability>