//[[restapi:start|RESTful API]]// ====== Send Location ====== ==== Previous Versions ==== [[restapi:send_location_3_34|Tag 34]] ==== Overview ==== Report a device current location to the Campaign Manager. It's supposed to be used from your App if you are developing yours. This method needs to be invoked as a reaction of calling the [[geo#request_device_location|Request Device Location]] method ==== URL ==== Parameters on the following URL are inside braces { } {base_url}/rest/api/tools/sendLocation/{instanceId}/{requestId}/{date}/{latitude}/{longitude}/{publicKey}/{signature} ^ Parameter Name ^ Description ^ | instanceId | An **instance id** is the workspace identification number, //if you don't know yours please request it using our [[misc:otto|ticketing tool]], you will need to provide your Mobile Engagement Campaign Manager's URL and your user login// | | requestId | This the request identifier. Originated by the [[geo#request_device_information|Request Device Information]] method | | date | The current time & date. formatted date string: **yyyy-MM-dd'T'HH:mm:ss.SSSZZ** For more information please review the [[restapi:appx_date#date_format_-_pattern_letters|pattern letters]] quick reference | | latitude | The point latitude Number ([[https://en.wikipedia.org/wiki/Decimal_degrees|decimal notation]]) | | longitude | The point longitude Number ([[https://en.wikipedia.org/wiki/Decimal_degrees|decimal notation]]) | | publicKey | The public key to access this API. //if you don't know yours please request it using our [[misc:otto|ticketing tool]], you will need to provide your Mobile Engagement Campaign Manager's URL and your user login// | | signature | The unique [[restapi:appx_ciphering#SHA256 - Cipher|SHA256]] signature for this call, it's involve all input parameters. To learn about generating the correct signature please visit our [[restapi:appx_call_ex|Java Example]] | ==== Response ==== The Response XML is divided in a static part and a dynamic one, we call it dynamic because it will vary depending on the method you invoke. Please read our [[restapi:appx_resp_xml|Response XML Basics]] section if you want to learn more about the response parts. sendLocation OK Completed 3d97e8ca-fcc9-4f15-8c22-8cbf123c723f 13056708084 LOCATION 8.599172 -71.141196 PENDING uTJoDFuabB6YFvc9s43 AppName IOS 2014-03-17T17:26:23.133-04:30 == Result parameters == ^ Parameter Name ^ Description ^ Possible Values ^ | LocationRequest.requestId | This is your request identifier | Text | | LocationRequest.user | The deviceId or mobile phone number | Text | | LocationRequest.requestType | The request's type. | In this case: LOCATION | | LocationRequest.latitude | The device's latitude. Number ([[https://en.wikipedia.org/wiki/Decimal_degrees|decimal notation]])| Starting value: 0.0 | | LocationRequest.longitude | The device's longitude. Number ([[https://en.wikipedia.org/wiki/Decimal_degrees|decimal notation]])| Starting value: 0.0) | | LocationRequest.status | This is the general status for the operation | Starting value: PENDING | | LocationRequest.clientId | This is your unique id, it represents you on the Campaign Manager Platform | Text | | LocationRequest.appName | The identifier of the application, which will receive the push message. | Text | | LocationRequest.platform | The target platform used | Valid values: \\ **ANDROID \\ IOS** | | LocationRequest.date | Time mark at the origination moment | A formatted date string: **yyyy-MM-dd'T'HH:mm:ss.SSSZZ** \\ For more information please review the [[restapi:appx_date#date_format_-_pattern_letters|pattern letters]] quick reference |