The FLITBASE API uses JSON objects within a REST-like URI and method structure. The HTTP methods GET
, POST
, and DELETE
are used for querying, sending, and deleting, respectively.
The following table defines the status codes you may receive from our API:
HTTP Status Code | Meaning |
---|---|
200 | Success |
401 | Failure. Unauthorized Request |
404 | Failure. Non-existing endpoint |
422 | Failure. Validation error |
500 | Failure. Unexpected error with our system |
Errors in the URI of your request would expectedly result in response with an error status code of 404
which has the following format:
{
"status": "error",
"message": "endpoint not found"
}
This is an example JSON response for a Validation Error
.
{
"status": "error",
"message": "validation error",
"errors": [
{
"type": "required",
"message": "The 'currency' field is required.",
"field": "currency"
}
]
}
Successful requests are marked by a status
value of success
; a sample is shown below.
For successful requests, this is a sample response.
{
"status": "success",
"data": [
{
"id": "1d44a533-e401-491b-98b5-cfc085fd8fc1",
"name": "my other wallet",
"balances": {
"BTC": 0,
"NGN": 68.00000001
}
}
]
}
Detailed examples of successful requests are found in the documentation for each endpoint.