Error Codes

Successful API calls will return a 200 OK HTTP header. Errors will produce a different HTTP response code, and will also contain descriptive error messages. You can check for an error by looking at either the HTTP header, or by checking for the presence of an error key in the object returned.