With our API, you can retrieve a list of all locations in the repository, including sub-locations, by simply making a GET request to the locations resource. Additionally, you can retrieve data for a single location by addressing the location as a sub-resource of the locations resource, using the location's unique ID. Not only can you retrieve location data, but you also have the ability to update and create new locations by making a POST request to the locations resource, using the location's unique ID.
Retrieving the location repository
GET ot-base/api/v1/locations
Returns a list with all locations in the location repository, including sub-locations.
Retrieving location data for a single location
GET ot-base/api/v1/locations/{locationId}
Data for a particular location can be retrieved by addressing the location as a sub-resource of the locations resource. Note that you can only use location IDs, but not hierarchical location names, to address a location.
Updating location data, and creating a new location
POST ot-base/api/v1/locations/{locationId}
Data for a particular location can be updated with a POST command.
If the location ID supplied with the command doesn't exist, a new location is created.
Comments
0 comments
Please sign in to leave a comment.