Learn how to integrate our APIs into your application
API Basics
BlacBox API provides you with one API for multiple services. You are provided access to numerous features which can be extended for use in any application. With a few notable exceptions, it aims to be RESTful and is structured around the primary resources you would be interacting with.
To use this API, you must first create an account on the BlacBox platform and obtain your API keys.
Sample Requests
We include cURL sample API calls next to each method. You only need to enter your specific parameters to test the calls from the command line. See this tutorial for more information on using cURL with APIs.
If you are unfamiliar with cURL, you may also use Postman. Postman is a simple API development environment that allows you to make HTTP requests. To make testing the API easier, install the BlacBox Postman Collection.
Requests and Response
Both request body data and response data are formatted as JSON. The content type for responses will always be application/JSON. Generally, all responses will be in the following format:
{
"status": [boolean], // Only true if the details provided could be processed and no error occured while processing
"message": [string], // Explains why status is false... Entirely informational. Please only log this but do not use for your checks
"data": [object] // contains actionable result of processing if present
}
While we recommend that developers use HTTP status codes to determine the result of an API call, we have provided a handy status key to let you know upfront if the request was successful or not.
The message key is a string containing a summary of the response and its status. If you try to retrieve a list of customers, the message might say "Customers retrieved." In the event of an error, the message key will include a description of the error, just as it did in the authorization header described above. This is the only key that applies to all requests.
Furthermore, the data key is the location where you want to look for the outcome of your request. Depending on the demand, this can be an object or an array. For example, permission to retrieve a single customer will return a customer object in the data key, whereas if a list is requested, the key will be an array of customers.
The meta key is used to establish context for the data key's contents. For example, when retrieving a list of transactions performed by a customer, pagination parameters can be passed along to limit the result set. The meta key will then include an object with the following properties:
Meta Key Structure
"meta": {
"total": 2,
"skipped": 0,
"perPage": 50,
"page": 1,
"pageCount": 1
}
Key Concepts
This category explains the key concepts behind the Blacbox API integrations.
Messaging Services
Messaging services include channels through which information and alert can be transmitted.
Banking
Banking describes how to use banking tools and dynamics to complete a successful transaction through bank interaction.
Identifications Services
The identification services include the verification and assessment of information and data.
Bill Payments
Bill payments provide curative and streamlined access to billing services.
Airtime Services
Airtime services are available across the primary networks provided by major service providers.
Data Bundle Services
Data bundle services extend across the core network bundles offered by major service providers for internet access.
Cable Tv Services
Cable services dissect cable subscriptions and renewal benefits.