Support Hub/API & Integrations/API Status Codes: What Each Error Means and How to Fix It
Developer

API Status Codes: What Each Error Means and How to Fix It

Every RESTful API response carries a numeric StatusCode. Code 0 means success. Callback responses are different: your server always answers {"status":"done"} with HTTP 200.

CodeStatusWhat it meansWhat to do
0SuccessThe operation completed.Nothing.
1Invalid Request DataThe JSON body is malformed or has invalid values.Send raw JSON in UTF-8 with the header Content-Type: application/json. Check the values.
2Invalid Service Tag IDThe stgid query parameter matches no registered device.Copy the Service Tag ID again from your API Monitor account.
3Invalid RequestThe request does not follow the format of that operation.Compare it with the sample request for the operation.
4Invalid EncryptionThe AES-256 payload could not be decrypted.Check the encryption key and the Base64 encoding.
5Device OfflineThe target device is not connected to Cams now.Check the Device Status page. The command is queued and delivered when the device reconnects.
6Operation TimeoutThe device did not acknowledge the command in time.Check that the device is online, then try again.
7Invalid Auth TokenThe AuthToken does not match the one set for the device.Use the 32-character token from the API Monitor.
8User Already ExistsAn add was tried for a UserID that is already on the device.Update the user instead, or delete the user first.
9User Not FoundThe UserID is not on the device.Check the UserID. Add the user first if needed.
10Template ErrorThe biometric template is corrupt or in an unsupported format.Check the Base64 data, the Size and the Index of the template.
11Device Memory FullThe device reached its limit of users or templates.Delete users or templates that are no longer needed.
13Invalid Security KeyThe security key does not match the one in the API Monitor.Use the same key on both sides.
15Feature Not SupportedThis device model or connection mode does not support the operation.Check the connection mode. DB Pull and File Processing modes support attendance push only, not RESTful commands.
999Unknown ErrorAn unexpected error.Contact Cams support and quote the OperationID.

Tips

  • Generate a unique OperationID for each REST request. The response repeats it, so you can match request and response.
  • REST commands take about 15 seconds to reach the device.
  • Codes 12 and 14 are not used.

Related: Callback URL not receiving data, Add or delete users in bulk.

Need help? Email support@camsbiometrics.com with the OperationID and the StatusCode.

Was this article helpful?