Names and ids
Wherever an item names a location, category, tag or custom field, you can send its id or its name.
How names match
A location takes its full path, such as Garage > Shelf 2, or just its name if only one location has it. Case doesn't matter.
Nothing is made for you, so a name that doesn't exist is refused with a list of the ones that do. Add a missing location through the API, and anything else in the app or the web app.
Finding the names
List locations gives every location's full path, and tags, categories and fields lists the rest.