Unable to create my first Room Location due to missing parent_location_id

I am trying to create my first location by making a POST request to https://api.zoom.us/v2/rooms/locations.

When I make my HTTP request, the Zoom API seems to mandate that I provide a value in the parent_location_id field. This makes perfect sense when you are creating a floor inside a building, creating a building in a city, creating a city in a province, etc. However, it doesn’t make (to me anyway) when you are creating the top level location (say, a country for example). In this scenario, there is no “parent”. The location you are trying to create is the top-most location in the hierarchy.

I have tried specifying a null value, an empty string and I have also tried omitting the parent_location_id field in my HTTP request like so:

First attempt: {"name":"Country 1","parent_location_id":null}
Secont attempt: {"name":"Country 1","parent_location_id":""}
Third attempt: {"name":"Country 1"}

but the API rejects my three attempts and returns the following error message:

{"code":300,"message":"Validation Failed.","errors":[{"field":"parent_location_id","message":"Missing field."}]}

I have tried specifying a bogus parent Id, like so: {"name":"Country 1","parent_location_id":"BOGUS-ID"}

but it gets rejected because the ID i specified is not valid: {"code":4801,"message":"Location does not exist: BOGUS-ID."}.

So I’m at a loss. I don’t know how to create my first location.

Hey @desautelsj
Have you tried calling the List Room locations first?

I found a. support article linked in our docs about that too

@elisa.zoom When I get the list of room locations I get the following result:

REQUEST:
GET https://api.zoom.us/v2/rooms/locations?page_size=100

RESPONSE:
HTTP/1.1 200 OK
{"page_size":100,"next_page_token":"","locations":[]}

As you can see, there are no locations which I expected since I haven’t added my first location yet.

After a lot of trial and error, I finally figured it out. What was preventing me from adding a new location was actually the combination of two problems:

First, I discovered that you need to define your location structure by making the following API call:

PUT https://api.zoom.us/v2/rooms/locations/structure
{"structures":["building","floor"]}

“building” and “floor” are 2 of a possible 6 allowable values: country , state , city , campus , building and floor

Once you have defined your desired structure, you can add new locations.

Second thing I discovered, you must use your account Id as the parent id of a top-most location (such as a country for example). Like this example:

POST https://api.zoom.us/v2/rooms/locations
{"name":"ZoomNet Integration Testing: Building A","parent_location_id":"VjZoEArIT5y-<...snip...>"}
1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.