Overview

When you send a request to the WinWinKit API, you receive a response that includes an HTTP status code and, in most cases, a response body. To determine your request’s status and handle errors, use the HTTP status code along with the code from the Error Response. Interpret the error starting with the most general information first.

Response HTTP Codes

WinWinKit uses standard HTTP codes to indicate the success or failure of your requests. In general, 2xx HTTP codes correspond to success, 4xx codes are for user-related failures, and 5xx codes are for infrastructure issues.

StatusNameDescription
200OKSuccess.
201CreatedObject created.
400Bad RequestCheck that the request format was correct.
401UnauthorizedThe API key used was missing or invalid.
404Not FoundThe resource was not found.
422Unprocessable EntityCheck that the request data was correct.
429Too Many RequestsThe rate limit was exceeded.
500Internal Server ErrorIndicates an error with WinWinKit servers.

Error Response

The error details that an API returns in the response body whenever the API request isn’t successful. Contains an array of one or more errors.

{
  "errors": [
    {
      "code": "<string>",
      "status": <number>,
      "title": "<string>",
      "source": "<string | null>"
    }
  ]
}

Error Code

The code property is a stable, machine-readable value indicating the exact type of error. The code is hierarchical, with dots separating the information about the error from general to specific. The more information the system has about the error, the more levels the error code includes.

StatusCodeDescription
400BAD_REQUESTThe request is not valid.
400BODY_INVALIDThe request body is the wrong type and is not valid JSON.
401UNAUTHORIZEDThe rate limit was exceeded.
403FORBIDDENThe method and path combination is valid, but not allowed due to access restrictions.
404NOT_FOUNDThe resource does not exist.
404PATH_ERRORThe path is not valid. For example, GET https://api.winwinkit.com/lol is not a valid path in this API.
405METHOD_NOT_ALLOWEDThe method and path combination is not valid in the API.
422PARAMETER_ERROR.INVALIDThe parameter is allowed but has an invalid value or type.
422PARAMETER_ERROR.REQUIREDA required parameter is missing.
500INTERNAL_SERVER_ERRORIndicates an error with WinWinKit servers.