Utility Endpoints
Surereach provides few utility endpoints which are documented here.
Base URL
Utility endpoints are well separated from the actual API to prevent any conflicts to api/v1/surereach/users path.
https://api.surereach.io/api/v1/surereach/users
Get API Usage
GET /get-api-usage
Calculate and determine the API usage which will be used.
Example Usage
- cURL
- Python
curl --location 'https://api.surereach.io/api/v1/surereach/users/get-api-usage' \
--header 'Authorization: Bearer <TOKEN>'
import requests
url = "https://api.surereach.io/api/v1/surereach/users/get-api-usage"
headers = {
'Authorization': 'Bearer <TOKEN>'
}
response = requests.request("GET", url, headers=headers)
Example Response
{
"data": [
{
"api_route": "/api/v1/surereach/users/get-api-usage",
"credit_used": "0",
"request_id": "GXJxuRLJJh2Ih7EuXTs0GceEH",
"response_code": "200",
"timestamp": "2023-07-03 10:25:49.563000",
"user_mobile": "+916397460121"
},
{
"api_route": "/api/v1/surereach/users/get-details-from-din",
"credit_used": "1",
"request_id": "d7Pgo62n0XM4l7fEgrhziSK6p",
"response_code": "200",
"timestamp": "2023-07-03 10:26:03.151000",
"user_mobile": "+916397468099"
}
],
"message": "Success",
"message_code": "success",
"status_code": 200,
"success": true
}
Get Credit Balance
GET /get-credits-balance
Calculate and determine the available credits.
Example Usage
- cURL
- Python
curl --location 'https://api.surereach.io/api/v1/surereach/users/get-credits-balance' \
--header 'Authorization: Bearer <TOKEN>'
import requests
url = "https://api.surereach.io/api/v1/surereach/users/get-credits-balance"
headers = {
'Authorization': 'Bearer <TOKEN>'
}
response = requests.request("GET", url, headers=headers)
Example Response
{
"data": {
"credits": 450
},
"message": "Success",
"message_code": "success",
"status_code": 200,
"success": true
}
Get Recharge History
GET /get-recharge-history
Return recharge history.
Example Usage
- cURL
- Python
curl --location 'https://api.surereach.io/api/v1/surereach/users/get-recharge-history' \
--header 'Authorization: Bearer <TOKEN>'
import requests
url = "https://api.surereach.io/api/v1/surereach/users/get-recharge-history"
headers = {
'Authorization': 'Bearer <TOKEN>'
}
response = requests.request("GET", url, headers=headers)
Example Response
{
"data": [
{
"credits_added": 116,
"recharge_id": "7ZnTW7cG3oUcsQhrrErJz7d6N",
"recharged_on": "2023-07-04 07:44:26.785000"
}
],
"message": "Success",
"message_code": "success",
"status_code": 200,
"success": true
}