Introduction

Patricia uses a standard HTTP response code to indicate the success or failure of an API request. Code in the 2xx range indicates success and things working as they should while code in the 4xx range indicates things not going too well. This is mostly a client error. These issues can range from unauthorised access, bad parameters sent to resources not existing.

Status code in the 5xx range denotes issues from our own end, e.g a service is unavailable and it's not possible or otherwise doesn't make sense to gracefully handle the exception.

Code Status Description
200 OK Everything worked as expected
400 Bad Request The request was unacceptable, often due to missing a required parameter
401 Unauthorized No valid API Key was provided
402 Request Failed The parameters were vaild but the request failed
403 Forbidden The API Key doesn't have permission to perform this request
404 Not Found The requested resource doesn't exist

Sample Error Response

{
   "status": false,
   "message": "The selected currency is invalid"
}

The response above happens when a user tries to send an invalid currency.