{"__v":2,"_id":"566b84833113f30d009587ea","category":{"__v":4,"_id":"55312175c68f493900aebb43","pages":["55312175c68f493900aebb45","566bf164737e260d00c698de","566bf46e737e260d00c698e1","566bf708cb3d040d00abae1f"],"project":"55312174c68f493900aebb3f","version":"55312174c68f493900aebb42","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-04-17T15:06:29.145Z","from_sync":false,"order":0,"slug":"documentation","title":"Documentation"},"project":"55312174c68f493900aebb3f","user":"5531215e29603d2300011341","version":{"__v":10,"_id":"55312174c68f493900aebb42","project":"55312174c68f493900aebb3f","createdAt":"2015-04-17T15:06:28.598Z","releaseDate":"2015-04-17T15:06:28.598Z","categories":["55312175c68f493900aebb43","566b431d03b4b20d00d02c3a","566b58f212bc0517005d3068","566b59110506f40d0034f148","566b7cc94d1a4d0d00801c00","566b82d130cdb417008d217d","566b855b4d1a4d0d00801c04","566b856f03870a0d008ee7a7","566c42d2f0a5dc0d009acbab","566c443d85dc790d0062c134"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"0.7.0","version":"0.7"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-12-12T02:20:51.468Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"All Open Exchange Rates API errors currently use the same format.\n\nHere's an example, produced when an invalid `app_id` is provided:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"error\\\": true,\\n  \\\"status\\\": 401,\\n  \\\"message\\\": \\\"invalid_app_id\\\",\\n  \\\"description\\\": \\\"Invalid App ID provided - please sign up at https://openexchangerates.org/signup, or contact support:::at:::openexchangerates.org.\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Error Status Codes Reference\"\n}\n[/block]\nThere are several potential errors, the most common listed below:\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Message\",\n    \"h-1\": \"Status Code\",\n    \"h-2\": \"Details\",\n    \"h-3\": \"Example\",\n    \"0-0\": \"\\\"not_found\\\"\",\n    \"1-0\": \"\\\"missing_app_id\\\"\",\n    \"2-0\": \"\\\"invalid_app_id\\\"\",\n    \"3-0\": \"\\\"not_allowed\\\"\",\n    \"4-0\": \"\\\"access_restricted\\\"\",\n    \"5-0\": \"\\\"invalid_base\\\"\",\n    \"0-1\": \"404\",\n    \"1-1\": \"401\",\n    \"2-1\": \"401\",\n    \"3-1\": \"429\",\n    \"4-1\": \"403\",\n    \"5-1\": \"400\",\n    \"5-2\": \"Client requested rates for an unsupported base currency\",\n    \"4-2\": \"Access restricted for repeated over-use (status: 429), or other reason given in ‘description’ (403).\",\n    \"3-2\": \"Client doesn’t have permission to access requested route/feature\",\n    \"2-2\": \"Client provided an invalid App ID\",\n    \"1-2\": \"Client did not provide an App ID\",\n    \"0-2\": \"Client requested a non-existent resource/route\"\n  },\n  \"cols\": 3,\n  \"rows\": 6\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"\",\n  \"body\": \"If you get an error that is not documented here, or experience some other issue with the API, please contact us.\"\n}\n[/block]","excerpt":"The Open Exchange Rates API will return JSON error messages if something goes wrong, to help you debug your applications and raise alerts.","slug":"errors","type":"basic","title":"Errors"}

Errors

The Open Exchange Rates API will return JSON error messages if something goes wrong, to help you debug your applications and raise alerts.

All Open Exchange Rates API errors currently use the same format. Here's an example, produced when an invalid `app_id` is provided: [block:code] { "codes": [ { "code": "{\n \"error\": true,\n \"status\": 401,\n \"message\": \"invalid_app_id\",\n \"description\": \"Invalid App ID provided - please sign up at https://openexchangerates.org/signup, or contact support@openexchangerates.org.\"\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "Error Status Codes Reference" } [/block] There are several potential errors, the most common listed below: [block:parameters] { "data": { "h-0": "Message", "h-1": "Status Code", "h-2": "Details", "h-3": "Example", "0-0": "\"not_found\"", "1-0": "\"missing_app_id\"", "2-0": "\"invalid_app_id\"", "3-0": "\"not_allowed\"", "4-0": "\"access_restricted\"", "5-0": "\"invalid_base\"", "0-1": "404", "1-1": "401", "2-1": "401", "3-1": "429", "4-1": "403", "5-1": "400", "5-2": "Client requested rates for an unsupported base currency", "4-2": "Access restricted for repeated over-use (status: 429), or other reason given in ‘description’ (403).", "3-2": "Client doesn’t have permission to access requested route/feature", "2-2": "Client provided an invalid App ID", "1-2": "Client did not provide an App ID", "0-2": "Client requested a non-existent resource/route" }, "cols": 3, "rows": 6 } [/block] [block:callout] { "type": "info", "title": "", "body": "If you get an error that is not documented here, or experience some other issue with the API, please contact us." } [/block]