//[[restapi:start|RESTful API]]// ====== Request Device Location ====== ==== Overview ==== You can request the location for a particular device by using this method, the Campaign Manager will request the current location from the device using a special PUSH message, when the device's location arrive it will deliver the information through your [[restapi:appx_callbacks|Callback URL]]. Please note that this method is just a request, which means that you have to be ready at your end to handle the location information when it arises. ==== URL ==== Parameters on the following URL are inside braces { } {base_url}/rest/api/tools/getLocation/{instanceId}/{to}/{appName}/{platform}/{from}/{carrier}/{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// | | to | This is the device's mobile phone number | | appName \\ OPTIONAL | Your App's name which will receive your Push Notifications \\ Write **//null//** on this placeholder to ignore this parameter| | platform \\ OPTIONAL | The target platform for the push service. \\ Valid values are: **ANDROID**, **IOS** or **null** to ignore | | from \\ OPTIONAL | The short or long code that will originate the SMS if needed \\ Write **//null//** on this placeholder to ignore this parameter | | carrier \\ OPTIONAL | The carrier operator used to fire the SMS if needed \\ Write **//null//** on this placeholder to ignore this parameter | | 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]] | Please note that all **OPTIONAL** parameter are linked, which means that you have to choose between use them all or ignore them all together. ==== 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. getLocation OK Completed 3d97e8ca-fcc9-4f15-8c22-8cbf123c723f 13056708084 LOCATION 0.0 0.0 PENDING uTJoDFuabB6YFvc9s43 AppName IOS 2014-03-17T17:26:23.133-04:30 Please be aware that the **////** tag and its content is a generic object and may apply to other responses in other methods. As this is an asynchronous method this will not contains the actual device's information, you will be receiving an update through your [[restapi:appx_callbacks|Callback URL]] == 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 | ====== Checking Device Location by Coordinates ====== ==== Overview ==== Verify if a particular device is inside a region at this moment. ==== URL ==== Parameters on the following URL are inside braces { } {base_url}/rest/api/tools/checkLocation/{instanceId}/{to}/{appName}/{platform}/{from}/{carrier}/{latitude}/{longitude}/{radius}/{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// | | to | This is the device's mobile phone number | | appName | Your App's name which will receive your Push Notifications | | platform | The target platform for the push service. \\ Valid values are: **ANDROID** or **IOS** | | from \\ OPTIONAL | The short or long code that will originate the SMS if needed \\ Write **//null//** on this placeholder to ignore this parameter | | carrier \\ OPTIONAL | The carrier operator used to fire the SMS if needed \\ Write **//null//** on this placeholder to ignore this parameter | | 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]]) | | radius | The circle radius. Use **meters** for this value | | 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]] | Please note that all **OPTIONAL** parameter are linked, which means that you have to choose between use them all or ignore them all together. ==== 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. checkLocation OK Completed 3d97e8ca-fcc9-4f15-8c22-8cbf123c723f 584241111111 LOCATION 0.0 0.0 PENDING uTJoDFuabB6YFvc9s43 AppName IOS 2014-03-17T17:26:23.133-04:30 8.630554 71.13327 3000.0 Please be aware that the **////** tag and its content is a generic object and may apply to other responses in other methods. As this is an asynchronous method this will not contains the actual device's information, you will be receiving an update through your [[restapi:appx_callbacks|Callback URL]] == Result parameters == ^ Parameter Name ^ Description ^ Possible Values ^ | checkLocationRequest.requestId | This is your request identifier | Text | | checkLocationRequest.user | The deviceId or mobile phone number | Text | | checkLocationRequest.requestType | The request's type. | In this case: CHK_LOCATION | | checkLocationRequest.latitude | The device's latitude. Number ([[https://en.wikipedia.org/wiki/Decimal_degrees|decimal notation]]) | Starting value: 0.0 | | checkLocationRequest.longitude | The device's longitude. Number ([[https://en.wikipedia.org/wiki/Decimal_degrees|decimal notation]]) | Starting value: 0.0) | | checkLocationRequest.status | This is the general status for the operation | Starting value: PENDING | | checkLocationRequest.clientId | This is your unique id, it represents you on the Campaign Manager Platform | Text | | checkLocationRequest.appName | The identifier of the application, which will receive the push message. | Text | | checkLocationRequest.platform | The target platform used | Valid values: \\ **ANDROID \\ IOS** | | checkLocationRequest.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 | | checkLocationRequest.poiLatitude | The point of interest's latitude | Number ([[https://en.wikipedia.org/wiki/Decimal_degrees|decimal notation]]) | | checkLocationRequest.poiLongitude | The point of interest's longitude | Number ([[https://en.wikipedia.org/wiki/Decimal_degrees|decimal notation]]) | | checkLocationRequest.poiRadius | The radius of the point of interest | Number (meters) | | checkLocationRequest.poiName | The point of interest's name. | Text | ====== Create Geo-Fence ====== ==== Overview ==== Create a geographical fence (represented as a circle) that will be watched. This fence is capable to detect when App's users pass through it in any direction. If this happened you will be notified about this through your [[restapi:appx_callbacks|Callback URL]]. This function send a push notification to every device registered into your app so they can save the geo-fence in their platform's device (Android or iOS). Be aware that every platform has their conditions. For example, [[https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/LocationAwarenessPG/RegionMonitoring/RegionMonitoring.html|iOS limits the number of regions that may be simultaneously monitored by a single app]] to twenty. ==== URL ==== Parameters on the following URL are inside braces { } {base_url}/rest/api/tools/createGeoFence/{instanceId}/{name}/{latitude}/{longitude}/{radius}/{eventType}/{msgTitle}/{msgContent}/{rules}/{appName}/{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// | | name | The name identifier for this Geo-Fence. This parameter must be [[restapi:appx_ciphering|Base64 encoded]]. You can't exceed 80 characters | | 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]]) | | radius | The circle radius. Use **meters** for this value | | eventType | The type of event that triggers the geo-fence. Valid values are: ENTER | EXIT | ENTER-EXIT | | msgTitle \\ OPTIONAL | A title for this message. This parameter must be [[restapi:appx_ciphering|Base64 encoded]]. You can't exceed 80 characters. Write **null** to ignore | | msgContent \\ OPTIONAL | The content of the message per se. This parameter must be [[restapi:appx_ciphering|Base64 encoded]]. You can't exceed 200 characters. Write **null** to ignore | | rules \\ OPTIONAL | Powerful mechanism of rules. For more information please read [[restapi:appx_rules|the RULE parameter]] appendix | | appName | Your App's name which will receive your Push Notifications | | 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. createGeoFence OK Completed ef0d1fb5-c7cb-5db2e87f273d test 8.620554 -71.13317 3000.0 geoFence ENTER-EXIT AppTest America/Caracas 2014-03-20T17:55:16.621-04:30 == Result parameters == ^ Parameter Name ^ Description ^ Possible Values ^ | GeoFence.regionId | Region's unique identifier | Text | | GeoFence.name | Geo-Fence's name | Text | | GeoFence.latitude | Region's latitude point. Number ([[https://en.wikipedia.org/wiki/Decimal_degrees|decimal notation]]) | Starting value: 0.0 | | GeoFence.longitude | Region's longitude point. Number ([[https://en.wikipedia.org/wiki/Decimal_degrees|decimal notation]]) | Starting value: 0.0) | | GeoFence.radius | Region's radius | Number (meters) | | GeoFence.type | Campaign type, always **GEOFENCE** for this method | Text | | GeoFence.eventType | The type of event that triggers the geo-fence. | Valid values are: ENTER | EXIT | ENTER-EXIT | | GeoFence.msgTitle | The title of this message. | Text | | GeoFence.msgContent | The content of the message per se. | Text | | GeoFence.rules | The RULE defined at the creation time | Text | | GeoFence.appName | The identifier of the application, who will monitor the region. | Text | | GeoFence.timezone | Timezone used | Text | | GeoFence.update | The date mark when the last update occurs | 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 | ====== Notify Region Event ====== ==== Overview ==== Use this method from the mobile App (if you are developing yours) when a Geo-Fence event occurs. Once the [[:campaign_manager|Campaign Manager]] get the notification it will pass it to the client through the [[restapi:appx_callbacks|Callback URL]]. ==== URL ==== Parameters on the following URL are inside braces { } {base_url}/rest/api/tools/notifyRegionEvent/{instanceId}/{regionId}/{deviceId}/{status}/{date}/{latitude}/{longitude}/{regionType}/{appName}/{platform}/{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// | | regionId | The identifier of the region that trigger the event. | | deviceId | The if of the device running device | | status | The status for this event, entering or leaving Possible values: ENTER | EXIT | | date | The time & date when the event occurs. 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 coordinate's latitude of the device's location when the event happened Number ([[https://en.wikipedia.org/wiki/Decimal_degrees|decimal notation]]) | | longitude | The coordinate's longitude of the device's location when the event happened Number ([[https://en.wikipedia.org/wiki/Decimal_degrees|decimal notation]]) | | regionType | The type of the region that triggers the event Possible values: geofence | beacon | | appName | The App's name which will receive your Push Notifications | | platform | The target platform for the push service. Valid values are: **ANDROID** | **IOS** | | 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. notifyRegionEvent OK Completed true Successful registration == Result parameters == ^ Parameter Name ^ Description ^ Possible Values ^ | successful | Indicates if the notification was posted or not | true \\ false | | message | A human readable explanation | Text | ====== Remove Geo-Fence ====== ==== Overview ==== Remove an existing Geo-Fence. This function send a special push message to every device registered with your App so it can delete the Geo-Fence on the device's platform. ==== URL ==== Parameters on the following URL are inside braces { } {base_url}/rest/api/tools/removeGeoFence/{instanceId}/{regionId}/{appName}/{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// | | regionId | The identifier of the region that trigger the event. | | appName | The App's name which will receive your Push Notifications | | 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. removeGeoFence OK Completed true Region deleted == Result parameters == ^ Parameter Name ^ Description ^ Possible Values ^ | successful | Indicates if the region was deleted or not | true \\ false | | message | A human readable explanation | Text | ====== Retrieving Geo-Fence ====== ==== Overview ==== This method will list all client's Geo-Fences. ==== URL ==== Parameters on the following URL are inside braces { } {base_url}/rest/api/tools/getGeoFences/{instanceId}/{appName}/{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// | | appName | The App's name which will receive your Push Notifications | | 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. getGeoFences OK Completed ef0d1fb5-c7cb-5db2e87f273d test 8.620554 -71.13317 3000.0 geoFence ENTER-EXIT AppTest America/Caracas 2014-03-20T17:55:16.621-04:30 ... 8js7ah23-lolk-mkajhsud02uq folks 82.620554 11.13317 3000.0 geoFence ENTER AppTest America/Caracas 2014-02-02T07:15:14.131-04:30 == Result parameters == ^ Parameter Name ^ Description ^ Possible Values ^ | GeoFence.regionId | Region's unique identifier | Text | | GeoFence.name | Geo-Fence's name | Text | | GeoFence.latitude | Region's latitude point. Number ([[https://en.wikipedia.org/wiki/Decimal_degrees|decimal notation]]) | Starting value: 0.0 | | GeoFence.longitude | Region's longitude point. Number ([[https://en.wikipedia.org/wiki/Decimal_degrees|decimal notation]]) | Starting value: 0.0) | | GeoFence.radius | Region's radius | Number (meters) | | GeoFence.type | Campaign type, always **GEOFENCE** for this method | Text | | GeoFence.eventType | The type of event that triggers the geo-fence. | Valid values are: ENTER | EXIT | ENTER-EXIT | | GeoFence.msgTitle | The title of this message. | Text | | GeoFence.msgContent | The content of the message per se. | Text | | GeoFence.rules | The RULE defined at the creation time | Text | | GeoFence.appName | The identifier of the application, who will monitor the region. | Text | | GeoFence.timezone | Timezone used | Text | | GeoFence.update | The date mark when the last update occurs | 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 | ====== Retrieving Geo-Fence (with pagination & filters) ====== ==== Overview ==== This method will list all client's Geo-Fences. You can filter and paginate your results. ==== URL ==== Parameters on the following URL are inside braces { } {base_url}/rest/api/tools/getGeoFences/{instanceId}/{page}/{resultsPerPage}/{parameters}/{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// | | page | A numeric indicator to fetch a specific page. useful when you are dealing with a large bunch of data and you want to iterate over it | | resultsPerPage | How many items will show per fetch. | | parameters | Use this as search's filters. Please learn more about this by reading the [[restapi:appx_geoline_search|Geo-Fence Inline Search String]] Write **null** on this placeholder if you don't want to use search filters | | 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. getGeoFences OK Completed ef0d1fb5-c7cb-5db2e87f273d test 8.620554 -71.13317 3000.0 geoFence ENTER-EXIT AppTest America/Caracas 2014-03-20T17:55:16.621-04:30 ... 8js7ah23-lolk-mkajhsud02uq folks 82.620554 11.13317 3000.0 geoFence ENTER AppTest America/Caracas 2014-02-02T07:15:14.131-04:30 == Result parameters == ^ Parameter Name ^ Description ^ Possible Values ^ | GeoFence.regionId | Region's unique identifier | Text | | GeoFence.name | Geo-Fence's name | Text | | GeoFence.latitude | Region's latitude point. Number ([[https://en.wikipedia.org/wiki/Decimal_degrees|decimal notation]]) | Starting value: 0.0 | | GeoFence.longitude | Region's longitude point. Number ([[https://en.wikipedia.org/wiki/Decimal_degrees|decimal notation]]) | Starting value: 0.0) | | GeoFence.radius | Region's radius | Number (meters) | | GeoFence.type | Campaign type, always **GEOFENCE** for this method | Text | | GeoFence.eventType | The type of event that triggers the geo-fence. | Valid values are: ENTER | EXIT | ENTER-EXIT | | GeoFence.msgTitle | The title of this message. | Text | | GeoFence.msgContent | The content of the message per se. | Text | | GeoFence.rules | The RULE defined at the creation time | Text | | GeoFence.appName | The identifier of the application, who will monitor the region. | Text | | GeoFence.timezone | Timezone used | Text | | GeoFence.update | The date mark when the last update occurs | 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 | ====== Retrieve Geo-Fence by ID ====== ==== Overview ==== Given a Geo-Fence's Id retrieve the information about it ==== URL ==== Parameters on the following URL are inside braces { } {base_url}/rest/api/tools/getGeoFenceById/{instanceId}/{regionId}/{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// | | regionId | The identifier of the Geo-Fence to look for | | 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. getGeoFenceById OK Completed ef0d1fb5-c7cb-5db2e87f273d test 8.620554 -71.13317 3000.0 geoFence ENTER-EXIT AppTest America/Caracas 2014-03-20T17:55:16.621-04:30 == Result parameters == ^ Parameter Name ^ Description ^ Possible Values ^ | GeoFence.regionId | Region's unique identifier | Text | | GeoFence.name | Geo-Fence's name | Text | | GeoFence.latitude | Region's latitude point. Number ([[https://en.wikipedia.org/wiki/Decimal_degrees|decimal notation]]) | Starting value: 0.0 | | GeoFence.longitude | Region's longitude point. Number ([[https://en.wikipedia.org/wiki/Decimal_degrees|decimal notation]]) | Starting value: 0.0) | | GeoFence.radius | Region's radius | Number (meters) | | GeoFence.type | Campaign type, always **GEOFENCE** for this method | Text | | GeoFence.eventType | The type of event that triggers the geo-fence. | Valid values are: ENTER | EXIT | ENTER-EXIT | | GeoFence.msgTitle | The title of this message. | Text | | GeoFence.msgContent | The content of the message per se. | Text | | GeoFence.rules | The RULE defined at the creation time | Text | | GeoFence.appName | The identifier of the application, who will monitor the region. | Text | | GeoFence.timezone | Timezone used | Text | | GeoFence.update | The date mark when the last update occurs | 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 | ====== Update Geo-Fence ====== ==== Overview ==== Once you have created your Geo-Fence you could use this method to edit it and keeping it updated. The Campaign Manager will notify all devices about this modification by sending a special push message ==== URL ==== Parameters on the following URL are inside braces { } {base_url}/rest/api/tools/editGeoFence/{instanceId}/{regionId}/{name}/{latitude}/{longitude}/{radius}/{eventType}/{msgTitle}/{msgContent}/{rules}/{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// | | regionId | The region's id you want to update | | name | The name identifier for this Geo-Fence. This parameter must be [[restapi:appx_ciphering|Base64 encoded]]. You can't exceed 80 characters | | latitude \\ OPTIONAL | The point latitude Number ([[https://en.wikipedia.org/wiki/Decimal_degrees|decimal notation]]) | | longitude \\ OPTIONAL | The point longitude Number ([[https://en.wikipedia.org/wiki/Decimal_degrees|decimal notation]]) | | radius \\ OPTIONAL | The circle radius. Use **meters** for this value | | eventType \\ OPTIONAL | The type of event that triggers the geo-fence. Valid values are: ENTER | EXIT | ENTER-EXIT | | msgTitle \\ OPTIONAL | A title for this message. This parameter must be [[restapi:appx_ciphering|Base64 encoded]]. You can't exceed 80 characters. Write **null** to ignore | | msgContent \\ OPTIONAL | The content of the message per se. This parameter must be [[restapi:appx_ciphering|Base64 encoded]]. You can't exceed 200 characters. Write **null** to ignore | | rules \\ OPTIONAL | Powerful mechanism of rules. For more information please read [[restapi:appx_rules|the RULE parameter]] appendix | | 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]] | If you don't want to use any **OPTIONAL** parameter you just need to write **null** on that particular placeholder. ==== 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. editGeoFence OK Completed ef0d1fb5-c7cb-5db2e87f273d test 8.620554 -71.13317 3000.0 geoFence ENTER-EXIT AppTest America/Caracas 2014-03-20T17:55:16.621-04:30 == Result parameters == ^ Parameter Name ^ Description ^ Possible Values ^ | GeoFence.regionId | Region's unique identifier | Text | | GeoFence.name | Geo-Fence's name | Text | | GeoFence.latitude | Region's latitude point. Number ([[https://en.wikipedia.org/wiki/Decimal_degrees|decimal notation]]) | Starting value: 0.0 | | GeoFence.longitude | Region's longitude point. Number ([[https://en.wikipedia.org/wiki/Decimal_degrees|decimal notation]]) | Starting value: 0.0) | | GeoFence.radius | Region's radius | Number (meters) | | GeoFence.type | Campaign type, always **GEOFENCE** for this method | Text | | GeoFence.eventType | The type of event that triggers the geo-fence. | Valid values are: ENTER | EXIT | ENTER-EXIT | | GeoFence.msgTitle | The title of this message. | Text | | GeoFence.msgContent | The content of the message per se. | Text | | GeoFence.rules | The RULE defined at the creation time | Text | | GeoFence.appName | The identifier of the application, who will monitor the region. | Text | | GeoFence.timezone | Timezone used | Text | | GeoFence.update | The date mark when the last update occurs | 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 |