0% found this document useful (0 votes)
5 views

updated api document (STAR)

Uploaded by

Ahmed Iqbal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

updated api document (STAR)

Uploaded by

Ahmed Iqbal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

System Interface Specification

Edition 1.3.20

5/1/2020

1 / 25 Edition: 1.3.5
Table of Contents

1. Abbreviations ........................................................................................................................4
2. Introduction to Interfaces ........................................................................................................6
2.1 Flow Chart...........................................................................................................................6
2.2 General Interfaces................................................................................................................6
2.2.1 Login Interface ..................................................................................................................6
2.2.2 Pre-Charge .......................................................................................................................9
2.2.3 Remote Recharge Interface..............................................................................................12
2.2.4 History............................................................................................................................16
2.2.5 Change Password ...........................................................................................................19
2.2.6 Transaction Report Interface ............................................................................................21
2.2.7 Global ............................................................................................................................32
1. Abbreviations
1P Single phase
3P Three phase
AES Advanced Encryption Standard
App Application
API An application programming interface (API) is an interface or communication
protocol between a client and a server intended to simplify the building of
client-side software
BERC Bangladesh Energy Regulatory Commission

BPDB Bangladesh Power Development Board” was created as a public sector


organization to boost the country’s power sector after the emergence of
Bangladesh as an independent state in 1972. The BPDB is responsible for
the major portion of generation and distribution of electricity mainly in urban
areas of the country. The Board is now under the Power Division of the
Bangladesh Ministry of Power, Energy and Mineral Resources.
DES The Data Encryption Standard is a symmetric-key algorithm for the
encryption of electronic data
DoS In computing, a Denial-of-Service attack is a cyber-attack in which the
perpetrator seeks to make a machine or network resource unavailable to its
intended users by temporarily or indefinitely disrupting services of a host
connected to the Internet
DPDC “Dhaka Power Distribution Company Limited” is a Public Limited Company
under the Power Division of the Ministry of Power, Energy and Mineral
Resources, Government of Bangladesh that manages the distribution of
electricity to the customers of the Dhaka City Corporation area
HTTP Hyper Text Transfer Protocol. HTTP is the underlying protocol used by the
World Wide Web and this protocol defines how messages are formatted and
transmitted, and what actions Web servers and browsers should take in
response to various commands
HTTPS Hypertext Transfer Protocol Secure is an extension of the Hypertext Transfer
Protocol. It is used for secure communication over a computer network, and
is widely used on the Internet
ISP Internet Service Provider
JSON type Java Script Object Notation (JSON) is an open-standard file format that uses
human-readable text to transmit data objects consisting of attribute–value
pairs and array data types (or any other serializable value). JSON is a
language-independent data format.
MD5 MD5 was initially designed to be used as a cryptographic hash function, it
has been found to suffer from extensive vulnerabilities
NBR National Board of Revenue is the central authority for tax administration in
Bangladesh
POS Point of Sales is the time and place where a retail transaction is completed
PPMS Prepayment metering system. It refers to the complete prepayment systems,
application/software, hardware, meters, modems and all other relevant items
as a whole for this project
REST Representational state transfer is a software architectural style that defines a
set of constraints to be used for creating Web services
SHA-1 SHA-1 is a cryptographic hash function which takes an input and produces a
160-bit hash value known as a message digest – typically rendered as a
hexadecimal number, 40 digits long
SSL Secure Sockets Layer
URL Uniform Resource Locator (URL), colloquially termed a web address, is a
reference to a web resource that specifies its location on a computer network
and a mechanism for retrieving it.
USSD “Unstructured Supplementary Service Data” is a Global System for Mobile
(GSM) communication technology that is used to send text between a mobile
phone and an application program in the network
UUID A universally unique identifier is a 128-bit number used to identify
information in computer systems
Web World Wide Web
2. Introduction to Interfaces
The prepayment metering system has 7 interfaces including Login, Get Customer Information,
Electricity Purchase, Remote Recharge, Balance Check, Historical Check, and Change Password. The
prepayment metering system (PPMS) provides an API of REST mode. The client determines types of
business according to the HTTP interface type. For example, interface: Login, URL: interface type of uri:
starpay/login, Method of Request: Post. Generally, input and return values of the interface are JSON
types. HTTP Status Code is used to indicate the status of the server. In general, the code “200” means
OK, “500” Internal Server Error, and “400” Bad Request.
The prepayment system will time stamp audit trails and log files. It also provides confidentiality and
integrity security protection of log files. Audit trails of all user actions are logged. In addition, all
information is available for reporting.
PPMS provides a third party management module that is to manage the new account, password, name,
time and status (For more information, please refer to KD-PQ-0011-User Manual of the Power Vending
System).
2.1 Flow Chart

2.2 General Interfaces


2.2.1 Login Interface
Function description
For third-party/ super vending super vendors will apply to the employer for third-party/ super vending.
After getting approval by BPDB/DPDC the customer can vend through approved third-party/ super
vendor. If the Super vendor is a general retailer the Star can provide a POS directly for energy sales; if
the Super-vendor is a bank or mobile operator, in that case, the PPMS will provide an API interface and
assigns the access account and security key.
Usage
 Conditions
The super-vendor will get an access Web-address from the system admin;
The super-vendor required to register in the system, and will receive name and password by email.
Method of POST
Request

URL http://ip:port/nesco/login

Name Type Description

Parameters app_name String Registration name


app_password String Registration password

postAuthCode String

Example {

"app_name":"pos",

"app_password":"123456",

"postAuthCode":"2316d133-4782-3c83-94fa-0d54530fba50"

Response
parameters Name Type Description
access_token String Authentication token
resultcode String Result code
resultdesc String Result description
balance String Balance
expires_in String Validity of token (seconds). It is a time period starting from
the moment when the user stops the last operation. When
beyond such time period, it is required to authenticate
again.
firstLogin Boolea Whether to log in for the first time
n
Example of // Succeed
Response
HTTP/1.1 200 OK

Content-Type: application/json;charset=UTF-8

"access_token":"eyJhbGciOiJIUzI1NiJ9.eyJzdGFyIjoiNzkwIiwiY3JlYXRlZCI6MTYwOT
M4NDUwNjU5MiwibWF4RGF5IjoiMTYwOTM4NTAwNjU5MiIsImlwIjoiMTkyLjEyNS4xN
TUuMTQzIiwiZXhwIjoxNjA5Mzg1MTA2fQ.tPjyKwYq2tVDiBZWhF9Pc1Qx9IQqalx56cb
3Ua075l8"

"balance":"9177648.52",

"firstLogin":false,

"resultcode":"0",

"expires_in":"600000"

"resultdesc":"Succeed"

Exception

HTTP/1.1 400 Bad Request

Content-Type: application/json;charset=UTF-8

"resultcode":"1010004",

"resultdesc":"Invalid registration password"

Result code

Result code Description Solution


0 Success.
1010006 Incorrect Enter the correct registration name
username or
password

1010007 The account Contact with administrator


has been
locked.
1010008 Device
identification
code is empty

1010009 Device
identification
code is
incorrect

1010010 Invalid IP login

0000009 Redis not


connected

1020004 Please enter


the instrument
number or
customer
number

0000002 Instrument
information
does not exist

1020003 Customer no
has been
locked

2.2.2 Pre-Charge
This function has been developed in order to confirmation of purchase before generate token that
prevent from any discrepancy of payment which is developed based on precharge code .
Conditions
 The purchase amount must be more than 0.
 The purchase amount keeps a decimal point at most.
 The total purchase amount must be less than the balance of the third party where the customer
purchases electricity.
 In the case of more than 1 token, it should be separated by a comma between each token.

Request POST
method

URL http://ip:port/starpay/nesco/preCharge

Request access_token:
Header eyJhbGciOiJIUzI1NiJ9.eyJzdGFyIjoiNzkwIiwiY3JlYXRlZCI6MTYwOTM4NDUwNjU5MiwibWF
4RGF5IjoiMTYwOTM4NTAwNjU5MiIsImlwIjoiMTkyLjEyNS4xNTUuMTQzIiwiZXhwIjoxNjA5
Mzg1MTA2fQ.tPjyKwYq2tVDiBZWhF9Pc1Qx9IQqalx56cb3Ua075l8

Request
parameter
Name Type Description
customerNo String Customer Number
meterNo String Meter number
payinAmount String Amount of electricity purchase
Request {
example
"customerNo":"22189991742",

"meterNo":"",

"payinAmount":501

Response Name Type Description


parameter resultcode String Result code
resultdesc String Result description
data Object Data details
Data
newCurrencyError number Latest error amount
meterNo String
transactionId String
customerNo String
customerName String
fee Object Details of Electricity token : 3P Meter
rent(250/month), Error Amount, TAX,
Rebate(1%), Demand charge(25/kW), Last
Error, PFC, Paid Debt, VAT(5%)
Response // Succeed
example
HTTP/1.1 200 OK

Content-Type: application/json;charset=UTF-8

"data":{

"newCurrencyError":0,

"fee":{

"Energy Cost":"481.84",

"Monthly Rent(pp)(40/month)":"0.00",

"Demand Charge(30/kW)":"0.00",

"Purchase Amount":"501.00",
"Rebate(1%)":"-4.72",

"PFC":"0.00",

"Last Error":"0.02",

"Paid Debt":"0.00",

"VAT(5%)":"23.86"

},

"meterNo":"22189991742",

"transactionId":"40fd1b0f76d164860176d1859bfe0008",

"customerNo":"22189991742",

"customerName":"22189991742"

},

"resultcode":"0",

"resultdesc":"Succeed"

Result code

Result code Description Solution


0 Success
404 No not found Account | Meter | Vending No not found

10001 User information does


not exist

10002 Single transaction is


less than:

10003 Failed to get charge


details

10004 Could not find cached


login information

10005 Please bind sales


station

10006 The recharge amount


exceeds the maximum

10007 The recharge amount


is less than the
minimum value

10008 Third party


Low Balance
10017 Energy cost must be Actual top-up amount after charging
greater than 0 greater than 0

10024 Single transaction is


greater than:

10025 The device is not


installed and activated

2.2.3 Remote Recharge Interface


Function description
The system remotely sends the TOKEN to the meter and feedback the recharge result.
Usage
Request POST
method

URL http://ip:port/starpay/nesco/remoteCharge

Request access_token:
Header eyJhbGciOiJIUzI1NiJ9.eyJzdGFyIjoiNzkwIiwiY3JlYXRlZCI6MTYwOTM4NDUwNj
U5MiwibWF4RGF5IjoiMTYwOTM4NTAwNjU5MiIsImlwIjoiMTkyLjEyNS4xNTU
uMTQzIiwiZXhwIjoxNjA5Mzg1MTA2fQ.tPjyKwYq2tVDiBZWhF9Pc1Qx9IQqalx
56cb3Ua075l8

Request
parameter
Name Type Description
transactionId String Transaction Identification

Request {
example
"transactionId":"40fd1b0f76d164860176d1859bfe0008"

Response Name Type Description


parameter resultcode String Result code
resultdesc String Result description
data Object Data details
Data
orderNo String
newCurrencyError number Latest error amount
meterNo String
orderDate String
customerName String
customerNo String
transactionId String
token String
fee Object Details of Electricity
token : 3P Meter
rent(250/month), Error
Amount, TAX,
Rebate(1%), Demand
charge(25/kW), Last
Error, PFC, Paid Debt,
VAT(5%)
Response // Succeed
example
HTTP/1.1 200 OK

Content-Type: application/json;charset=UTF-8

Success case 1:

"data":{

"orderNo":"506342316116217856",

"newCurrencyError":0.08,

"fee":{

"Monthly Rent(pp)(40/month)":0,

"Energy Cost":481.84,

"Demand Charge(30/kW)":0,

"Purchase Amount":501,

"Rebate(1%)":-4.72,

"PFC":0,

"Last Error":0.02,

"Paid Debt":0,

"VAT(5%)":23.86

},

"meterNo":"22189991742",

"orderDate":"05/01/2021 15:50:25",
"customerName":"22189991742",

"customerNo":"22189991742",

"transactionId":"40fd1b0f76d164860176d1859bfe0008",

"token":"4003-5727-2451-7398-9173"

},

"resultcode":"0",

"resultdesc":"Succeed"

Success case 2:
{

"data":{

"orderNo":"506342316116217856",

"newCurrencyError":0.08,

"fee":{

"Monthly Rent(pp)(40/month)":0,

"Energy Cost":481.84,

"Demand Charge(30/kW)":0,

"Purchase Amount":501,

"Rebate(1%)":-4.72,

"PFC":0,

"Last Error":0.02,

"Paid Debt":0,

"VAT(5%)":23.86

},

"meterNo":"22189991742",

"orderDate":"05/01/2021 15:50:25",

"customerName":"22189991742",

"customerNo":"22189991742",

"transactionId":"40fd1b0f76d164860176d1859bfe0008",

"token":"4003-5727-2451-7398-9173"
},

"resultcode":"10010",

"resultdesc":"Token send failed"

Exception

HTTP/1.1 400 Bad Request

Content-Type: application/json;charset=UTF-8

Failure case 1

"resultcode":"14003",

"resultdesc":"The Balance is not Enough ",

"data":{

"transactionId":"40fd1b0f76b6cab70176b6cd07600001"

Failure case 2

"resultcode":"10009",

"resultdesc":" Failed to generate token ",

"data":{

"transactionId":"40fd1b0f76b6cab70176b6cd07600001"

Result code

Result code Description Solution


0 Success
10011 Transaction id invalid

10004 Could not find cached


login information

10009 Token create failed

Token send failed


10010
2.2.4 History
The super-vendor is able to query the Customer transaction information by Customer Number from the
PPMS.

Method of POST
Request

URL http://ip:port/starpay/nesco/getPurchaseRecord

Request access_token:
Header eyJhbGciOiJIUzI1NiJ9.eyJzdGFyIjoiNzkwIiwiY3JlYXRlZCI6MTYwOTM4NDUwNjU5Miwib
WF4RGF5IjoiMTYwOTM4NTAwNjU5MiIsImlwIjoiMTkyLjEyNS4xNTUuMTQzIiwiZXhwIjox
NjA5Mzg1MTA2fQ.tPjyKwYq2tVDiBZWhF9Pc1Qx9IQqalx56cb3Ua075l8

Request
parameter
Name Type Description
transactionId String Transaction Identification
Request {
example
"transactionId":"40fd1b0f76d164860176d1859bfe0008"

Response
parameter Name Type Description
resultcode String Result code
resultdesc String Result description
data Object Data details
Data
fee Object Details of Electricity token : 3P Meter
rent(250/month), Error Amount, TAX, Rebate(1%),
Demand charge(25/kW), Last Error, PFC, Paid
Debt, VAT(5%)
orderNo String
newCurrencyError Number
meterNo String
orderDate String
transactionId String
customerNo String
customerName String
token String
Example of // Succeed
Response
HTTP/1.1 200 OK

Content-Type: application/json;charset=UTF-8

"data":{

"orderNo":"506342316116217856",

"newCurrencyError":0.08,

"fee":{

"Monthly Rent(pp)(40/month)":0,

"Energy Cost":481.84,

"Demand Charge(30/kW)":0,

"Purchase Amount":501,

"Rebate(1%)":-4.72,

"PFC":0,

"Last Error":0.02,

"Paid Debt":0,

"VAT(5%)":23.86

},

"meterNo":"22189991742",

"orderDate":"05/01/2021 15:50:25",

"transactionId":"40fd1b0f76d164860176d1859bfe0008",

"customerNo":"22189991742",

"customerName":"22189991742",

"token":"4003-5727-2451-7398-9173"

},

"resultcode":"0",

"resultdesc":"Succeed"

}
Result code

Result code Description Solution


0 Success
10004 Could not find
cached login
information
10001 User
information
does not exist
10011 Transaction id
invalid

2.2.5 Change Password


Function description
The super-vendor is able to change the user account password.
Usage
Conditions
 The super-vendor requires to receive an access address from the Administrator of the system.
 The super-vendor requires to register and will get the new password.
 The password length is restricted to 100 characters at most. It might be a combination of
alphabetic, numeric and special symbols.
Method of POST
Request

URL http://ip:port/starpay/nesco/changePassword

Request access_token:
Header eyJhbGciOiJIUzUxMiJ9.eyJzdGFyIjoiMTY4IiwiY3JlYXRlZCI6MTU5MTA2MDk3NDMyNSwiZ
XhwIjoxNTkxMTQ3Mzc0fQ.y7PIcCox37ahlcxKeVHXKFPu3f4BRZbvCJgOZAeKkWiAdQ_6
mx-pf6mAxkjvawKnOJwNpOZPR0p-PKui4HXoUA

Request
parameter
Name Type Description
access_token String Authentication token
app_name String Registration name
app_old_passwor String Old password
d

app_new_passwr String New password


od

Request {
example "app_name": "pos",

"app_new_password": "000000",

"app_old_password": "123456"

Response
parameter Name Type Description
resultcode String Result code
resultdesc String Result description
Example of // Succeed
Response
HTTP/1.1 200 OK

Content-Type: application/json;charset=UTF-8

"resultcode":"0",

"resultdesc":"Succeed"

Exception

HTTP/1.1 400 Bad Request

Content-Type: application/json;charset=UTF-8

"resultcode":"10015",

"resultdesc":"Old password error"

Result code

Result code Description Solution


0 Success
10001 User
information
does not exist

10012 The query user


does not
match the
logged-in user

10013 Old password


is empty
10014 New password
is empty

10004 Could not find


cached login
information

10015 Old password


error

10016 Password
change failed,
Abnormal
database
changes

2.2.6 Transaction Report Interface


Method of POST
Request

URL http://ip:port/starpay/nesco/transactionReport

Request access_token:
Header eyJhbGciOiJIUzUxMiJ9.eyJzdGFyIjoiMTY4IiwiY3JlYXRlZCI6MTU5MTA2MDk3NDMyNSwiZ
XhwIjoxNTkxMTQ3Mzc0fQ.y7PIcCox37ahlcxKeVHXKFPu3f4BRZbvCJgOZAeKkWiAdQ_6
mx-pf6mAxkjvawKnOJwNpOZPR0p-PKui4HXoUA

Request
parameter
Name Type Description
salesName String Name of selling point
startTime String Min time the past year
endTime String Max time the current time
Request {
example
"endTime":"05/01/2021 16:13:00",

"startTime":"04/01/2021 16:53:32"

}
Response
parameter Name Type Description
resultcode String Result code
resultdesc String Result description
data String The last Five Transactions
total Int Total number of data records
Data
orderNo String Work order number

custNo String Customer No

custName String Customer Name

meterNo String Meter No

saleName String Sale Name

purchaseEnergy Numb Electricity purchase


er

debtMoney Numb Debt amount


er

tax Numb Tax


er

mcostMoney Numb Total amount of management fee


er

subsidyMoney Numb Subsidy or Rebate


er

purchaseMoney Numb Power purchase amount


er

penaltyMoney Numb Penalty amount


er

totalMoney Numb Total payment amount = purchase amount + tax + management


er fee, etc. + fine + debt

purchaseDate String Purchase Date

newCurrencyError Numb New Currency Error


er

principleAmount Numb Pay amount-VAT


er
Example of // Succeed
Response
HTTP/1.1 200 OK

Content-Type: application/json;charset=UTF-8

"data":[

"custName":"22189991742",

"custNo":"22189991742",

"debtMoney":0,

"mcostMoney":0,

"meterNo":"22189991742",

"newCurrencyError":0.08,

"orderNo":"506342316116217856",

"penaltyMoney":0,

"principleAmount":477.14,

"purchaseDate":1609833025000,

"purchaseEnergy":108.15,

"purchaseMoney":481.84,

"saleName":"POS",

"subsidyMoney":-4.72,

"tax":23.86,

"totalMoney":501

},

"custName":"22189991742",

"custNo":"22189991742",

"debtMoney":0,

"mcostMoney":0,

"meterNo":"22189991742",

"newCurrencyError":0,
"orderNo":"506329886335148032",

"penaltyMoney":0,

"principleAmount":477.14,

"purchaseDate":1609830062000,

"purchaseEnergy":108.14,

"purchaseMoney":481.82,

"saleName":"POS",

"subsidyMoney":-4.72,

"tax":23.86,

"totalMoney":501

},

"custName":"22189991742",

"custNo":"22189991742",

"debtMoney":0,

"mcostMoney":10,

"meterNo":"22189991742",

"newCurrencyError":0.02,

"orderNo":"506318336203399168",

"penaltyMoney":0,

"principleAmount":477.14,

"purchaseDate":1609827308000,

"purchaseEnergy":106.39,

"purchaseMoney":471.8,

"saleName":"POS",

"subsidyMoney":-4.72,

"tax":23.86,

"totalMoney":501

},

{
"custName":"22189991742",

"custNo":"22189991742",

"debtMoney":0,

"mcostMoney":4.95,

"meterNo":"22189991742",

"newCurrencyError":0.05,

"orderNo":"506300313119727616",

"penaltyMoney":0,

"principleAmount":500,

"purchaseDate":1609823011000,

"purchaseEnergy":346.65,

"purchaseMoney":494.97,

"saleName":"POS",

"subsidyMoney":0,

"tax":0,

"totalMoney":500

},

"custName":"22189991742",

"custNo":"22189991742",

"debtMoney":0,

"mcostMoney":4.96,

"meterNo":"22189991742",

"newCurrencyError":0.08,

"orderNo":"506253085817638912",

"penaltyMoney":0,

"principleAmount":501,

"purchaseDate":1609811751000,

"purchaseEnergy":347.36,

"purchaseMoney":496.04,
"saleName":"POS",

"subsidyMoney":0,

"tax":0,

"totalMoney":501

},

"custName":"22189991742",

"custNo":"22189991742",

"debtMoney":0,

"mcostMoney":0.5,

"meterNo":"22189991742",

"newCurrencyError":0,

"orderNo":"506037805761892352",

"penaltyMoney":0,

"principleAmount":50,

"purchaseDate":1609760424000,

"purchaseEnergy":49.5,

"purchaseMoney":49.5,

"saleName":"POS",

"subsidyMoney":0,

"tax":0,

"totalMoney":50

},

"custName":"22189991742",

"custNo":"22189991742",

"debtMoney":0,

"mcostMoney":0.5,

"meterNo":"22189991742",

"newCurrencyError":0,
"orderNo":"506035529282424832",

"penaltyMoney":0,

"principleAmount":50,

"purchaseDate":1609759882000,

"purchaseEnergy":49.5,

"purchaseMoney":49.5,

"saleName":"POS",

"subsidyMoney":0,

"tax":0,

"totalMoney":50

},

"custName":"22189991742",

"custNo":"22189991742",

"debtMoney":0,

"mcostMoney":0.5,

"meterNo":"22189991742",

"newCurrencyError":0,

"orderNo":"506035117120753664",

"penaltyMoney":0,

"principleAmount":50,

"purchaseDate":1609759783000,

"purchaseEnergy":49.5,

"purchaseMoney":49.5,

"saleName":"POS",

"subsidyMoney":0,

"tax":0,

"totalMoney":50

},

{
"custName":"22189991742",

"custNo":"22189991742",

"debtMoney":0,

"mcostMoney":0.5,

"meterNo":"22189991742",

"newCurrencyError":0,

"orderNo":"506029292427874304",

"penaltyMoney":0,

"principleAmount":50,

"purchaseDate":1609758395000,

"purchaseEnergy":49.5,

"purchaseMoney":49.5,

"saleName":"POS",

"subsidyMoney":0,

"tax":0,

"totalMoney":50

},

"custName":"22189991742",

"custNo":"22189991742",

"debtMoney":0,

"mcostMoney":0.5,

"meterNo":"22189991742",

"newCurrencyError":0,

"orderNo":"506007113640382464",

"penaltyMoney":0,

"principleAmount":50,

"purchaseDate":1609753107000,

"purchaseEnergy":49.5,

"purchaseMoney":49.5,
"saleName":"POS",

"subsidyMoney":0,

"tax":0,

"totalMoney":50

},

"custName":"22189991742",

"custNo":"22189991742",

"debtMoney":0,

"mcostMoney":0.5,

"meterNo":"22189991742",

"newCurrencyError":0,

"orderNo":"506002476947447808",

"penaltyMoney":0,

"principleAmount":50,

"purchaseDate":1609752001000,

"purchaseEnergy":49.5,

"purchaseMoney":49.5,

"saleName":"POS",

"subsidyMoney":0,

"tax":0,

"totalMoney":50

},

"custName":"22189991742",

"custNo":"22189991742",

"debtMoney":0,

"mcostMoney":0.5,

"meterNo":"22189991742",

"newCurrencyError":0,
"orderNo":"505998021816459264",

"penaltyMoney":0,

"principleAmount":50,

"purchaseDate":1609750939000,

"purchaseEnergy":49.5,

"purchaseMoney":49.5,

"saleName":"POS",

"subsidyMoney":0,

"tax":0,

"totalMoney":50

],

"resultcode":"0",

"resultdesc":"Succeed"

}
Result code

Result code Description Solution


0 Success
10018 Date format
conversion
error

10019 The start time


cannot be
greater than
the end time

10020 The start time


can only be in
the past year
10021 The start time
cannot be
greater than
the current
time

10022 The end time


cannot be
greater than
the current
time

10023 Sales Name is


empty

2.2.7 Global
Error code Error message Error description
0000003 The token is incorrect

0000004 The login IP is inconsistent with


the current access IP

0000007 Not obtained access_token The request has no


access_token
0000012 Continuous login time range Token expired and Maximum
exceeded login days exceeded,Need to log
in again to get access_token
0000013 Token expired, please replace The token has expired, but the
the old token maximum number of login days
has not been exceeded

0000013 Error return format:

{
"data":"eyJhbGciOiJIUzI1NiJ9.eyJzdGFyIjoiNzkwIiwiY3JlYXRlZCI6MTYwOT
EzODAzMTYzNiwibWF4RGF5IjoiMTYwOTEzODMzMTYzNiIsImlwIjoiMTkyLjEyN
S4xNTUuMTQzIiwiZXhwIjoxNjA5MTM4MjExfQ.AAWb-
vo4Oh9yyfPdBGVyutvHwBiE9roJHDLlD3zuO4A",
"resultcode":"0000013",
"resultdesc":"Token expired, please replace the old token"
}

If the error code is 0000013 , Please replace the original token with data in the response data

Unknown service exception:

{
"code":"-1",
"msg":"Server error"
}

You might also like