You can use this endpoint to trigger an EasySecure sync, instantly. Requires EasyConnect or a publicly accessible APIServer2, version 1.12 or higher.
Name | Type | Required | Description |
---|---|---|---|
p_companyID | string | Yes | The security code you have been provided with, string (32) |
p_locationId | string | Yes | The location's id for which you want the sync to be executed for. All the EasySecure syncs are based and require a location id |
p_userId | string | Yes | The user's EasySecure id, if you want to sync only one user. If you want a total sync for the location, use 0 here |
ERROR_NO_SECURITY_HASH - p_companyId is not provided
ERROR_UNKNOWN_SECURITY_HASH - there is no company found based on the p_companyId provided
NO LOCATIONID PROVIDED - there is no p_locationId provided
NO LOCATION FOUND BASED ON THE ID PROVIDED - there is no location in the EasySecure based on the p_locationId provided
NO USER FOUND BASED ON THE ID PROVIDED - in case there was a p_userId provided, different than 0, but there is no user in the EasySecure based on this id
CURL_ERROR_NO_X - where X is the PHP curl error received when calling the save() method from the AutoSyncController of EasyConnect/APIServer2
NOT OK, NOT JSON X - where X is the message received back from EasyConnect/APIServer2, which is not JSON formatted as we would expect
If sync is OK we return a string of 64 characters - like from the sample 5qWFY1oyOn0pCZ4nOrnW0PCAE9ITYc538FuUn4a9NuvA4yK2XwixIs6wnxCrTY1R, which you will be able to use to retrieve sync status using the call getSyncStatus()
If the p_userId is not provided, then every user is taken into account and the sync becomes full
Sample
Response