{"_id":"55fa37ca8065a10d004e5bbf","category":{"_id":"5915e54f7c2c552d008b8549","project":"54e405191e51932d006abc39","version":"55fa37c88065a10d004e5bb6","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-05-12T16:39:43.277Z","from_sync":false,"order":1,"slug":"guides","title":"Resources"},"__v":9,"project":"54e405191e51932d006abc39","version":{"_id":"55fa37c88065a10d004e5bb6","project":"54e405191e51932d006abc39","__v":11,"createdAt":"2015-09-17T03:47:20.956Z","releaseDate":"2015-09-17T03:47:20.956Z","categories":["55fa37ca8065a10d004e5bb7","55fa37ca8065a10d004e5bb8","55fa37ca8065a10d004e5bb9","55fa37ca8065a10d004e5bba","55fca6bf34ae7c0d00ab8ea0","55ff80fd9e7ccf0d000a1d93","560220af7435de0d00fabd0d","56107f21bb9d920d00303e70","563e184077681a0d00d96a02","56fafc6596ec7e0e002ac85f","5915e54f7c2c552d008b8549","59499fcd64b5f5002690bbc1","59c451b7772699001c0f1df1","59c9b42dec84880010c1f348"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"REST V3","version_clean":"3.1.0","version":"3.1"},"parentDoc":null,"user":"54e4044e8ef7552300409dcb","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-08-06T06:05:53.134Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"The API returns json with an error code and description in case of any error during the request as shown. In case the error is in a specific field, it also returns the field name in error object.\n\n## HTTP STATUS CODE REFERENCE\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"HTTP Status Code\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"200 OK\",\n    \"0-1\": \"Worked as expected\",\n    \"2-0\": \"400 Bad Request\",\n    \"3-0\": \"401 Not Authorized\",\n    \"8-0\": \"500 Server Error\",\n    \"8-1\": \"Internal Server Error\",\n    \"3-1\": \"Authentication Error\",\n    \"2-1\": \"Bad request to API. Missing a field or an invalid field\",\n    \"1-0\": \"202 Accepted\",\n    \"1-1\": \"Accepted, but not final response\",\n    \"4-0\": \"402 Request Failed\",\n    \"4-1\": \"Request to the API failed\",\n    \"5-0\": \"404 Not Found\",\n    \"5-1\": \"Cannot be Found\",\n    \"6-0\": \"409 Conflict\",\n    \"6-1\": \"Incorrect Values Supplied (eg. Insufficient balance, wrong MFA response, incorrect micro deposits, etc.)\",\n    \"7-0\": \"429 Too Many Requests\",\n    \"7-1\": \"Too many requests hit the API too quickly.\",\n    \"9-0\": \"503 Service Unavailable\",\n    \"9-1\": \"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance.\"\n  },\n  \"cols\": 2,\n  \"rows\": 10\n}\n[/block]\n## ERROR CODES REFERENCE\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"ERROR_CODE\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"0\",\n    \"0-1\": \"Success\",\n    \"1-0\": \"10\",\n    \"1-1\": \"Accepted, but action pending\",\n    \"2-0\": \"100\",\n    \"2-1\": \"Incorrect Client Credentials\",\n    \"3-0\": \"110\",\n    \"3-1\": \"Incorrect User Credentials\",\n    \"4-0\": \"120\",\n    \"4-1\": \"Unauthorized Fingerprint\",\n    \"5-0\": \"200\",\n    \"5-1\": \"Error in Payload (Error in payload formatting)\",\n    \"6-0\": \"300\",\n    \"6-1\": \"Unauthorized action (User/Client not allowed to perform this action)\",\n    \"7-0\": \"400\",\n    \"7-1\": \"Incorrect Values Supplied (eg. Insufficient balance, wrong MFA response, incorrect micro deposits)\",\n    \"11-0\": \"500\",\n    \"11-1\": \"Server Error\",\n    \"8-0\": \"404\",\n    \"8-1\": \"Object not found\",\n    \"9-0\": \"429\",\n    \"9-1\": \"Too many requests hit the API too quickly.\",\n    \"10-0\": \"450\",\n    \"10-1\": \"Idempotency key already in use\",\n    \"12-0\": \"503\",\n    \"12-1\": \"Service Unavailable. The server is currently unable to handle the request due to a temporary overload or scheduled maintenance.\"\n  },\n  \"cols\": 2,\n  \"rows\": 13\n}\n[/block]\n## Sample Error Format\n\nFollowing is the sample error format for our APIs\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"error\\\": {\\n    \\\"en\\\": \\\"<user:id> not valid\\\"\\n  },\\n  \\\"error_code\\\": \\\"400\\\",\\n  \\\"http_code\\\": \\\"409\\\",\\n  \\\"success\\\": false\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Please remember to check the HTTP status code and the JSON associated with the error to better understand what exactly went wrong. Specially `error_code` & `error`.\",\n  \"title\": \"Understanding Error Codes\"\n}\n[/block]","excerpt":"Common Errors returned and their formats","slug":"errors","type":"basic","title":"Errors"}

Errors

Common Errors returned and their formats

The API returns json with an error code and description in case of any error during the request as shown. In case the error is in a specific field, it also returns the field name in error object. ## HTTP STATUS CODE REFERENCE [block:parameters] { "data": { "h-0": "HTTP Status Code", "h-1": "Description", "0-0": "200 OK", "0-1": "Worked as expected", "2-0": "400 Bad Request", "3-0": "401 Not Authorized", "8-0": "500 Server Error", "8-1": "Internal Server Error", "3-1": "Authentication Error", "2-1": "Bad request to API. Missing a field or an invalid field", "1-0": "202 Accepted", "1-1": "Accepted, but not final response", "4-0": "402 Request Failed", "4-1": "Request to the API failed", "5-0": "404 Not Found", "5-1": "Cannot be Found", "6-0": "409 Conflict", "6-1": "Incorrect Values Supplied (eg. Insufficient balance, wrong MFA response, incorrect micro deposits, etc.)", "7-0": "429 Too Many Requests", "7-1": "Too many requests hit the API too quickly.", "9-0": "503 Service Unavailable", "9-1": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance." }, "cols": 2, "rows": 10 } [/block] ## ERROR CODES REFERENCE [block:parameters] { "data": { "h-0": "ERROR_CODE", "h-1": "Description", "0-0": "0", "0-1": "Success", "1-0": "10", "1-1": "Accepted, but action pending", "2-0": "100", "2-1": "Incorrect Client Credentials", "3-0": "110", "3-1": "Incorrect User Credentials", "4-0": "120", "4-1": "Unauthorized Fingerprint", "5-0": "200", "5-1": "Error in Payload (Error in payload formatting)", "6-0": "300", "6-1": "Unauthorized action (User/Client not allowed to perform this action)", "7-0": "400", "7-1": "Incorrect Values Supplied (eg. Insufficient balance, wrong MFA response, incorrect micro deposits)", "11-0": "500", "11-1": "Server Error", "8-0": "404", "8-1": "Object not found", "9-0": "429", "9-1": "Too many requests hit the API too quickly.", "10-0": "450", "10-1": "Idempotency key already in use", "12-0": "503", "12-1": "Service Unavailable. The server is currently unable to handle the request due to a temporary overload or scheduled maintenance." }, "cols": 2, "rows": 13 } [/block] ## Sample Error Format Following is the sample error format for our APIs [block:code] { "codes": [ { "code": "{\n \"error\": {\n \"en\": \"<user:id> not valid\"\n },\n \"error_code\": \"400\",\n \"http_code\": \"409\",\n \"success\": false\n}", "language": "json" } ] } [/block] [block:callout] { "type": "info", "body": "Please remember to check the HTTP status code and the JSON associated with the error to better understand what exactly went wrong. Specially `error_code` & `error`.", "title": "Understanding Error Codes" } [/block]