- Open API
- Advance API
- Cabinet
- Device Operation
- eject the battery for the specified device slot by repair
- Rent and eject the battery for the specified device slot
- Query All Device List
- Query details based on Device Id
- get device list by shop id
- get all device list by page
- Query battery list based on Device Id
- Query slot list based on Device Id
- binding device to shop
- Update cabinet advertising information
- Shop
- PriceStrategy
- Order
- Cabinet Event Push
Cabinet Event Push Config
Developing
Production
https://developer.chargenow.top/cdb-open-api/v1
Production
https://developer.chargenow.top/cdb-open-api/v1
POST
https://developer.chargenow.top/cdb-open-api/v1
Request
Authorization
Send your HTTP requests with an
Authorization
header that contains the word Basic followed by a space and a base64-encoded string username:password
Example:
Authorization: Basic *****************
Body Params application/json
pushUrl
string
URL for receiving cabinet event push notifications
eventSubscriptions
array [object {3}]
Subscription requires receiving push cabinet events
event
string
Cabinet event
pushUrl
string
Receive URL for current cabinet event push
enable
boolean
Enable event push for this cabinet
Example
{
"pushUrl": "https://receiving.push.com/event",
"eventSubscriptions": [
{
"event": "CABINET_ONLINE",
"pushUrl": "",
"enable": true
},
{
"event": "CABINET_OFFLINE",
"pushUrl": "",
"enable": true
},
{
"event": "CABINET_STATUS",
"pushUrl": "",
"enable": true
},
{
"event": "BATTERY_IN",
"pushUrl": "",
"enable": true
},
{
"event": "BATTERY_BORROW_OUT",
"pushUrl": "",
"enable": true
},
{
"event": "BATTERY_ABNORMAL_WARNING",
"pushUrl": "",
"enable": true
},
{
"event": "BATTERY_POPUP",
"pushUrl": "",
"enable": true
}
]
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://developer.chargenow.top/cdb-open-api/v1/cabinet/eventPush/config' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Og==' \
--data-raw '{
"pushUrl": "https://receiving.push.com/event",
"eventSubscriptions": [
{
"event": "CABINET_ONLINE",
"pushUrl": "",
"enable": true
},
{
"event": "CABINET_OFFLINE",
"pushUrl": "",
"enable": true
},
{
"event": "CABINET_STATUS",
"pushUrl": "",
"enable": true
},
{
"event": "BATTERY_IN",
"pushUrl": "",
"enable": true
},
{
"event": "BATTERY_BORROW_OUT",
"pushUrl": "",
"enable": true
},
{
"event": "BATTERY_ABNORMAL_WARNING",
"pushUrl": "",
"enable": true
},
{
"event": "BATTERY_POPUP",
"pushUrl": "",
"enable": true
}
]
}'
Responses
🟢200成功
application/json
Body
msg
string
required
code
integer
required
data
object (AgentCabinetEventPushConfig)
required
pushUrl
string
URL for receiving cabinet event push notifications
eventSubscriptions
array [object {3}]
Subscription requires receiving push cabinet events
Example
{
"msg": "Successful operation",
"code": 0,
"data": {
"pushUrl": "https://receiving.push.com/event",
"eventSubscriptions": [
{
"event": "CABINET_ONLINE",
"pushUrl": "",
"enable": true
},
{
"event": "CABINET_OFFLINE",
"pushUrl": "",
"enable": true
},
{
"event": "CABINET_STATUS",
"pushUrl": "",
"enable": true
},
{
"event": "BATTERY_IN",
"pushUrl": "",
"enable": true
},
{
"event": "BATTERY_BORROW_OUT",
"pushUrl": "",
"enable": true
},
{
"event": "BATTERY_ABNORMAL_WARNING",
"pushUrl": "",
"enable": true
},
{
"event": "BATTERY_POPUP",
"pushUrl": "",
"enable": true
},
{
"event": "ADMIN_RENTAL_ORDER",
"pushUrl": "",
"enable": true
}
]
}
}