# Submit a request for device location with address details sends location co-ordinates to z-maps to get address ## Endpoints **POST** `/api/v1/mdm/devices/{device_id}/locations_with_address` ## Request Details ### Request URL `https://{server-hostname}:8383/api/v1/mdm/devices/{device_id}/locations_with_address` ### Scope `MDMInventory.CREATE` ### Header `Authorization: d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers - **Content-Type** (`string`, Mandatory): `application/json` - **Accept** (`string`, Mandatory): `application/json` ### Path Parameters - **device_id** (`string`, Mandatory): Unique identifier of the device. Obtain from the [Get Device List](https://www.manageengine.com/products/desktop-central/help/api/onpremise/devices-get-device-list.html) response. ### Request Body `application/json` - JSON Object - **id** (`long`, Mandatory): Device ID to request location for. Fetch from [Get Device List](https://www.manageengine.com/products/desktop-central/help/api/onpremise/devices-get-device-list.html). - **no_of_days** (`integer`, Optional): Number of days of location history to retrieve. - **from** (`long`, Optional): Start timestamp in milliseconds since epoch for the location range. - **to** (`long`, Optional): End timestamp in milliseconds since epoch for the location range. ## Sample Request ```curl curl --request POST \ --url https://appdomain/api/v1/mdm/devices/{device_id}/locations_with_address \ --header 'Accept: application/json' \ --header 'Authorization: d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/json' \ --data '{"no_of_days":7,"from":1522066653883,"id":9007199254741000,"to":1557128715277}' ``` ### Sample Request Body Request location with address for last 7 days ```json { "no_of_days": 7, "from": 1522066653883, "id": 9007199254741000, "to": 1557128715277 } ``` ## Response Parameters ### HTTP Code 200 Response Body — `application/json` - JSON Object - **export_batch_id** (`long`): Batch ID used to query the result via the GET endpoint. - **wait** (`integer`): Time in seconds to wait before calling GET for results. - **status** (`string`): Request status (e.g., `SCHEDULED`). ### Possible Response Codes - **200**: HTTP code ## Sample Response: HTTP 200 Location request scheduled successfully ```json { "export_batch_id": 900234566788909, "wait": 500, "status": "SCHEDULED" } ``` ![ ](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **Duration:** 1 minute | **Threshold:** 30 | **Lock period:** 5 minutes Duration - Time window for the threshold. Threshold - Number of API calls allowed within the specified duration. Lock Period - Wait time before consecutive API requests.