Return Codes and Errors

The Poken API allows applications to gracefully response to errors by returning HTTP status codes.

With every request a HTTP status code is returned which indicates whether the request was successful or not. If a request was successful the API will return the 200 status code along with the message payload. If the request was not successful then a non-200 status code will be returned with a "response" object which contains the error code(s) and description(s). See the attached schema for the response object.

Possible HTTP status codes:

  • 200 OK - Success
  • 400 Bad Request - The request was invalid.
  • 401 Not Authorized - Authentication credentials were missing or invalid.
  • 403 Forbidden - The request was understood, but it has been refused for some reason.
  • 404 Not Found - The requested URI does not exist.
  • 500 Internal Server Error - Some unexpected error has occurred.
  • 503 Service Unavailable - The API is currently not online

Example error response:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response xmlns="http://xsd.poken.com">
  <error>
    <code>10001</code>
    <description>The alias address provided is already registered.</description>
  </error>
</response>

The error code returned is a unique code which identifies the particular error.

Č
ċ
ď
response.xsd
(1k)
Unknown user,
Jan 25, 2010 6:03 AM