Get products
curl --request GET \
--url https://api.dancity.app/api/v1/products \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dancity.app/api/v1/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dancity.app/api/v1/products"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"statusCode": 200,
"message": "SUCCESS",
"allProduct": [
{
"_id": "69b674f4f2afe9e7484cb814",
"name": "Airtel Airtime",
"service": "AIRTIME",
"min": 50,
"max": 50000,
"discount": 2
},
{
"_id": "69b674daf2afe9e7484cb7d2",
"name": "Glo Airtime",
"service": "AIRTIME",
"min": 50,
"max": 50000,
"discount": 2
},
{
"_id": "69b674c0f2afe9e7484cb790",
"name": "MTN Airtime",
"service": "AIRTIME",
"min": 50,
"max": 50000,
"discount": 1.5
},
{
"_id": "69b67513f2afe9e7484cb858",
"name": "T2 Mobile Airtime",
"service": "AIRTIME",
"min": 50,
"max": 50000,
"discount": 2
}
]
}{
"success": false,
"message": "Invalid API key or IP not allowlisted",
"statusCode": 401
}{
"success": false,
"message": "Sorry, something went wrong. Please try again later",
"statusCode": 500
}Products & services
Get products
Fetch products. Filter by service (service name) when needed.
GET
/
api
/
v1
/
products
Get products
curl --request GET \
--url https://api.dancity.app/api/v1/products \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dancity.app/api/v1/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dancity.app/api/v1/products"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"statusCode": 200,
"message": "SUCCESS",
"allProduct": [
{
"_id": "69b674f4f2afe9e7484cb814",
"name": "Airtel Airtime",
"service": "AIRTIME",
"min": 50,
"max": 50000,
"discount": 2
},
{
"_id": "69b674daf2afe9e7484cb7d2",
"name": "Glo Airtime",
"service": "AIRTIME",
"min": 50,
"max": 50000,
"discount": 2
},
{
"_id": "69b674c0f2afe9e7484cb790",
"name": "MTN Airtime",
"service": "AIRTIME",
"min": 50,
"max": 50000,
"discount": 1.5
},
{
"_id": "69b67513f2afe9e7484cb858",
"name": "T2 Mobile Airtime",
"service": "AIRTIME",
"min": 50,
"max": 50000,
"discount": 2
}
]
}{
"success": false,
"message": "Invalid API key or IP not allowlisted",
"statusCode": 401
}{
"success": false,
"message": "Sorry, something went wrong. Please try again later",
"statusCode": 500
}