| Requires any of the roles: | Admin, TenantAdmin, MarketplaceAdmin, AvailabilityReader |
| GET | /service/{ServiceId}/availability | Gets available timeslots for a smartspace within a service on a given time period. |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ServiceId | path | string | Yes | Service ID (GUID) |
| ThingId | query | string | Yes | Thing/smartspace ID (GUID) |
| Start | query | string | Yes | Start date and time from when to collect available timeslots (UTC). |
| End | query | string | No | End date and time until when to collect available timeslots (UTC - 24h from start if not set). |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Version | form | integer | No | Api version |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Data | form | List<TimeslotAvailabilityDto> | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ResponseStatus | form | ResponseStatus | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Available | form | bool | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| From | form | DateTime? | No | |
| To | form | DateTime? | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /service/{ServiceId}/availability HTTP/1.1
Host: api.4spaces.io
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"data":[{"available":false,"from":-62135596800000,"to":-62135596800000}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}