API Health
On API Health, you can easily understand the health status of the API and its returned Status Codes.
To check the operational status of our service, you can use the following request. If the response you receive includes an HTTP status code of 200, it confirms the availability of your API.
Note: Do not forget to include the header as stated above. Perhaps, This works fine without it.
curl -X GET \
'https://api.staging.ogaranya.com'
#Errors
The response body contains a JSON payload with additional information.
Please, note that not all error responses will contain the error code and name. More and more errors will get their codes in the future.
For example:
Here is the error you get when you are not authenticated:
{
"status":"Error",
"message":"You don't come to a party without your Token and Public key",
}
You get this when you make a call to an unavailable endpoint:
{
"status":"Error",
"message":"This page is missing, so is Nigeria's budget
}
Anytime a wrong data type or unexpected data is sent, you get the below error:
{
"status":"Error",
"message":"Invalid Parameter",
"code":"E0001",
}
When you call on a wrong or unavailable gateway:
{
"status":"Error",
"message":" "We are not able to reach the gateway. We have reported this to the administrator. Please send your command again or use other payment gateway as stated below.\n\n",,
"code":"E0024",
}
When you input a wrong token,publickey or unauthurised:
{
"status":"Error",
"message":" "I lost my glasses so I am finding it hard to find your credentials on the list of authorised users. Help look for my glasses.\n\n",,
"code":"401",
}