Response Codes

WorkBright uses conventional HTTP status codes to indicate the success or failure of an API request. Additional responses for specific endpoints are noted on their pages.

CodeStatusDescription
200OKSuccessful request - everything worked as expected.
201CreatedResource successfully created.
204No ContentEverything worked as expected, and there is no data to return. (This is typically used for DELETE requests or actions which don't require a JSON response.)
400Bad RequestThe request was unacceptable, often due to either invalid parameters being provided or a parsing error.
401UnauthorizedInvalid API key.
404Not FoundThe requested resource does not exist.
420Request FailedThe parameters were valid, but the request failed. This is typically because some data you provided did not pass validation. Validation error messages are returned via the response body (JSON).
5xxServer ErrorsSomething went wrong on our end.

Links

JSON objects often include a _links section, such as the following:

"_links": {
  "self": {
    "href": "/api/employees/225/employments/225"
  },
  "employee": {
    "href": "/api/employees/225"
  }
},

Although we don't follow all of the various HAL conventions, this _links pattern is loosely based on the HAL JSON API specification. The URI's listed here help clients navigate to various related resources.

Self

The self link will always indicate the URL for the specific resource itself.

Related Resources

Other than the self link, related resources may also be listed in the _links section, such as associations or parent entities.