Overview
This API endpoint allows you to fetch all sites associated with your company. Sites represent the top-level locations in the Mosler hierarchy (Company → Site → Building → Floor → Room → Bed).
Endpoint Details
Method
GET
URL
Copy https://api.mosler.in/api/v3/location/sites
Authentication
apikeystringYes Your API key for authentication Content-TypestringNo application/json
Query Parameters
pagenumberNo Page number for pagination (default: 1) limitnumberNo Number of sites per page (default: 100, max: 100)
Response Format
Success Response
messagestringSuccess message describing the operation codenumberStatus code indicating successful operation errorbooleanAlways false for successful responses dataobjectObject containing sites data and pagination info
Data Object Structure
sitesarrayArray of site objects paginationobjectPagination information totalnumberTotal number of sites available
Site Object Structure
namestringThe name of the site _idstringThe unique identifier of the site
currentPagenumberCurrent page number totalPagesnumberTotal number of pages available hasNextbooleanWhether there are more pages hasPreviousbooleanWhether there are previous pages
Response Examples
Successful Response
Copy {
"message" : "Sites retrieved successfully" ,
"code" : 7005 ,
"error" : false ,
"data" : {
"sites" : [
{
"name" : "Delhi" ,
"_id" : "6660745995a565fe29d81897"
} ,
{
"name" : "Bangalore" ,
"_id" : "6530f9dce0c1bd73ded0d1be"
}
] ,
"pagination" : {
"currentPage" : 1 ,
"totalPages" : 1 ,
"hasNext" : false ,
"hasPrevious" : false
} ,
"total" : 2
}
}