All APIs respond with a HTTP code. 200 and 201 indicate success, the meaning for other codes are provided below."
Edit me

HTTP Codes

The following are the possible HTTP Codes that may be returned in response to your API requests.

HTTP Code Meaning Details
200 OK The request completed successfully.
201 Created A new resource has been created successfully. The resource is appended to the response.
400 Bad Request The request was malformed. The response body will include an error providing further information (see the Error Codes section below).
401 Unauthorized There is an issue with your API key. Have you specified Authorization as Basic and in encoded in Base64? See here.
403 Forbidden A valid Authentication header has been provided but it does not have permission to access the requested resource.
404 Not Found The requested resource does not exist.
405 Method Not Allowed The HTTP method being requested is not allowed for this specific service.
410 Gone The API being requested has been removed from our servers.
412 Precondition Failed A conditions has not been met to process the request; this might happen where a timestamp provided is too old, for example.
415 Unsupported Media Type An incorrect content type has been provided as part of a request (e.g. something other than “application/json”).
422 Unprocessable Entity Returned in the response where there are validation errors. More details will be provided in response body (see the Error Codes section below).
429 Too Many Requests Indicates that too many requests have been generated in a given amount of time.
500 Internal Server Error There is a problem with our server. Try again later and if the problem persists contact the Nuapay application support team.
501 Not Implemented This response will be returned where a service has not yet been developed or published.
503 Service Unavailable We’re temporarially offline for maintanance. Please try again later.

The JSON Object Returned in the 400 and 422 Responses

When a 400 or a 422 response is returned, the body will contain a JSON object that describes the problem.

The 400 response error object has the following structure:

Path Type Description
returnCode String Error Type Code (see below)
returnDescription String Error description (see below)
details Array The object holds a collection of validation errors. It is returned only where returnCode equals 8002.
details[].code String Error Code (see below)
details[].field String JSON path to the request object property to which the error is related
details[].description Error description The description

The 422 response error object has this structure:

Path Type Description
returnCode String Error Type Code (see below)
returnDescription String Error description (see below)
details Null Only returned where returnCode equals 8002 and holds a list of input validation errors.

Error Details

See the possible error codes in the table below: