Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The API supports XML, JSON, and PHP serialization formats. By default JSON formatting is used. So if there is an error detecting the format of the request (due to a bad URL, for example) the error response will be returned in JSON format.

Errors

There are seven types of errors that may be encountered when working with the API:

  1. Sending invalid parameters will result in 400 Bad Request response

    No Format
    HTTP/1.1 400 Bad Request
    Content-Length: 218
    
    {
     "model":
     {
      "message":"The request cannot be fulfilled due to bad syntax.",
      "errors":
      {
       "username":
       {
        "empty":"Please enter a username."
       },
       "new_password":
       {
        "format":"Please enter a password at least 6 characters in length."
       }
      }
     }
    }
  2. Providing invalid credentials will result in a 401 Unauthorized response

    No Format
    HTTP/1.1 401 Unauthorized
    Content-Length: 67
    
    {"message":"The authorization details given appear to be invalid."}

Timestamps

The API returns all timestamps in UTC time using the following ISO 8601 format:

...

Note
titleAlways specify a timezone

If the timezone can not be determined from the timestamp, the system will assume the timezone timestamp is in local time. For this reason you should always specify a timezone in your timestamps. For details on checking or setting the local timezone for the system check your localization settings.

...