Who is this page for?

You are a third party integrator with a system containing data that represents occupancies for a space. A basic example would be a PMS provider that contains reservations in a hotel and you want to sync your reservations into the betterspace platform.

What you need before creating occupancies

  • You need to subscribe to the occupancy API. Please refer to the Authentication Page for more details.

  • You will need API access to a location, more precisely a client Id and client secret (to create an access token) for this location including the company Id and location Id. Please refer to the Authentication Page for more details.

Get a list of all spaces

An occupancy needs a space which it is attached to. As both systems contain spaces (or rooms), you need to find the correct mapping between the spaces. Most of the time the spaces have a clear name which can be used for the mapping. You should also only care for the space names and ignore the subspaces in this case. For example:

GET https://bs360-dev-apim.azure-api.net/occupancy/api/v1/companies/{companyId}/locations/{locationId}/spaces
Request - with example data
GET https://bs360-dev-apim.azure-api.net/occupancy/api/v1/companies/480c7da7-5911-441b-8aa4-3f3333dad75c/locations/e440d5a3-9b33-44c9-b46b-16c70d7d1ef8/spaces
Request - with placeholder
Example Response
curl Example - make sure to replace {companyId} and {locationId}

Get all occupancies

Please make sure a use a fitting date range to request all occupancies. Longer ranges will result in bigger response delays.

GET https://bs360-dev-apim.azure-api.net/occupancy/api/v1/companies/{companyId}/locations/{locationId}/occupancies?startDate={startDate}&endDate={endDate}
Request - with placeholder
GET https://bs360-dev-apim.azure-api.net/occupancy/api/v1/companies/480c7da7-5911-441b-8aa4-3f3333dad75c/locations/e440d5a3-9b33-44c9-b46b-16c70d7d1ef8/occupancies?startDate=2024-08-31T22:00:00Z&endDate=2024-09-02T22:00:00Z
Request - with example data
Example Response
curl example - make sure to replace {companyId}, {locationId}, {startDate} and {endDate}

Create an occupancy for a space

POST https://bs360-dev-apim.azure-api.net/occupancy/api/v1/companies/{companyId}/locations/{locationId}/occupancies
Request - with placeholder
POST https://bs360-dev-apim.azure-api.net/occupancy/api/v1/companies/480c7da7-5911-441b-8aa4-3f3333dad75c/locations/e440d5a3-9b33-44c9-b46b-16c70d7d1ef8/occupancies
Request - with example data
Example Payload
Example Response
curl example - make sure to replace {companyId} and {locationId}

Edit an occupancy

PUT https://bs360-dev-apim.azure-api.net/occupancy/api/v1/companies/{companyId}/locations/{locationId}/occupancies/import/{occupancyId}
Request - with placeholder
PUT https://bs360-dev-apim.azure-api.net/occupancy/api/v1/companies/480c7da7-5911-441b-8aa4-3f3333dad75c/locations/e440d5a3-9b33-44c9-b46b-16c70d7d1ef8/occupancies/import/5b697ab8-3ed2-495e-be26-ec3d81e6bd95
Request - with example data
Example Playload
Example Response
curl Example - make sure to replace {companyId}, {locationId} and {occupancyId}

Delete an occupancy from a space

DELETE https://bs360-dev-apim.azure-api.net/occupancy/api/v1/companies/{companyId}/locations/{locationId}/occupancies/import/{occupancyId}
Request - with placeholder
DELETE https://bs360-dev-apim.azure-api.net/occupancy/api/v1/companies/480c7da7-5911-441b-8aa4-3f3333dad75c/locations/e440d5a3-9b33-44c9-b46b-16c70d7d1ef8/occupancies/import/5b697ab8-3ed2-495e-be26-ec3d81e6bd95
Request - with placeholder
curl Example - make sure to replace {companyId}, {locationId} and {occupancyId}