Validate Meter Number
meter_number
: Meter numberint
disco_name
: disco namestring
mtype
: Meter Type truestring
import requests
import json
data = {"meternumber": 1111111111111 ,
"disconame": "Ikeja Electric", "mtype": 'prepaid' }
user_token = 'eacf1ab727d134b254361d834c28a2bf6ab0a111'
headers = {
"Content-Type": "application/json",
"Authorization": f'Token {user_token}'
}
# jsonify the payload
data = json.dumps(payload)
Send a post request with the payload
url = "https://www.subpadi.com/api/validatemeter/"
res = requests.post(url, data=data, headers=headers)
Response
{
"invalid": false,
"name": "David Dele",
"address": "87 AJIMATU OFF MURITALA STREET",
"content": {
"Customer_Name": "David Dele",
"Address": "87 AJIMATU OFF MURITALA STREET",
"Meter_Number": "43067784709",
"Customer_Arrears": "",
"Minimum_Amount": 7.49,
"Min_Purchase_Amount": 7.49,
"Can_Vend": "yes",
"Business_Unit": "",
"Meter_Type": "PREPAID",
"WrongBillersCode": false
}
}
View code in other programming languages here