Documentation
Product ID | Product Name | Agregator Price |
---|---|---|
1028 | MTN Corporate DATA 150MB - 30 days | 43.00 |
1029 | MTN Corporate DATA 250MB - 30 days | 72.00 |
1030 | MTN Corporate DATA 1GB - 30 days | 285.00 |
1031 | MTN Corporate DATA 2GB - 30 days | 570.00 |
1032 | MTN Corporate DATA 3GB - 30 days | 855.00 |
1033 | MTN Corporate DATA 4GB - 30 days | 1140.00 |
1035 | MTN Corporate DATA 10GB - 30 days | 2850.00 |
1036 | MTN Corporate DATA 12GB - 30 days | 3420.00 |
1037 | MTN Corporate DATA 15GB - 30 days | 4274.00 |
1038 | MTN Corporate DATA 20GB - 30 days | 5699.00 |
1039 | Airtel CG - 300mb (7days) | 93.00 |
1040 | Airtel CG - 500mb (30days) | 156.00 |
1041 | Airtel CG - 1gb (30days) | 312.00 |
1042 | Airtel CG - 2gb (30days) | 624.00 |
1043 | Airtel CG - 5gb (30days) | 1560.00 |
1044 | Airtel 100MB 7Days | 50.00 |
1045 | MTN Corporate DATA MTN CG 500mb - 30days | 143.00 |
1046 | Airtel CG - 10gb (30days) | 3120.00 |
1047 | Airtel CG - 15gb (30days) | 4680.00 |
1048 | Airtel CG - 20gb (30days) | 6240.00 |
Authorization
All requests need to pass Authentication token in the headers like this.
1) Make sure you pass Content-Type : application/json , Accept : application/json , and Authorization: Bearer headers
2) If you want to create object use POST method with JSON body.
3) If you want to retrieve object - use GET request.
4) Platform responds with very useful response headers, that you as a developer might wish to log
Remember access tokens are long-lived, that expire after one year.
API EndPoint: https://lagosnetwork.com/api/v1/
Buy Data Endpoint
POST: https://lagosnetwork.com/api/v1/buy-dataParameters
Parameter Name
Parameter Value
dataplan
Product ID
recipient
Phone Number 080...
request_id
unique identifier
Header
Authorization
Bearer 'access token'
Accept
application/json
Response
{
"order_id": 59, >
"successful": true,
"response_code": 200,
"message": "MTN MSE 1GB successfully processed to 08060678106",
"wallet" : 200000
}
Me Endpoint
GET: https://lagosnetwork.com/api/v1/meResponse
{
"response_code": 200,
"user": {
"id": 1,
"name": "Firname Surname",
"email": "registered-email@mail.com",
"phone": "08023410006",
"user_group": "merchant",
"wallet": "1000",
"email_verified_at": null,
"created_at": "2024-12-08T04:12:38.000000Z",
"updated_at": "2024-12-10T11:53:04.000000Z",
"simserverID": 1
}
}
Order Tracking Endpoint
GET: https://lagosnetwork.com/api/v1/queryParameters
Parameter Name
Parameter Value
order_id
as returned by the Buy Data endpoint
Response
{
"successful": true,
"response_code": 200,
"message": "Dear Customer, You have successfully shared 1GB Data to 08060678106. Your SME data balance is 5224.12GB expires 23/02/2024. Thankyou"
}
Order Tracking with Request ID
GET: https://lagosnetwork.com/api/v1/enquiryParameters
Parameter Name
Parameter Value
request_id
as provided in your request to the Buy Data endpoint
Response
{
"successful": true,
"response_code": 200,
"message": "Dear Customer, You have successfully shared 1GB Data to 08060678106. Your SME data balance is 5224.12GB expires 23/02/2024. Thankyou"
}
Query Order List Endpoint
POST: https://lagosnetwork.com/api/v1/qlistParameters
Parameter Name
Parameter Value
begin_time
Query start time
end_time
Query end time
status
order status (successful 201, pending 202, failed 203, default 0 find all status)
page_no
page number (default 1)
page_size
page size (default 40)
dataplan
Product ID (default 0, query all dataplan)
Header
Authorization
Bearer 'access token'
Accept
application/json
Response
{
'order_list':
[
{
'dataplan': 1028,
'message': 'DearCustomer,
Youhavesuccessfullyshared150MBDatato2347042388190.Thank\xa0you.',
'order_id': '20241230175958-101-0001',
'order_status': 201,
'price': 43.0,
'recipient': '07042388190',
'request_id': '8Z82397F3u5nm92B508H98iim0oi1yp',
'updated_at': '2024-12-3018: 00: 00',
'wallet_after': 21462.0,
'wallet_before': 21505.0
},
{
'dataplan': 1028,
'message': 'DearCustomer,
Youhavesuccessfullyshared150MBDatato2347042388190.Thank\xa0you.',
'order_id': '20241230192555-101-0003',
'order_status': 201,
'price': 43.0,
'recipient': '07042388190',
'request_id': '8Z84397F3u6nm92B508H98iim0oi1yp',
'updated_at': '2024-12-3019: 25: 58',
'wallet_after': 21376.0,
'wallet_before': 21419.0
}
],
'response_code': 200,
'total_page': 1
}
Response Code | Message |
---|---|
200 | Successful |
201 | Processing |
202 | Pending |
203 | Failed |
204 | Unknow error |
206 | Invalid Phone Number |
207 | Phone Number Doesn't Match selected Network |
208 | Invalid Data Plan |
209 | Duplicates Transactions |
215 | Low Balance |
422 | Unproccessable content |