Khởi tạo thông tin máy EDC
POSThttps://api.zengi.biz/v1/oapi/config/device/init
API này được dùng để nạp các thông tin cần thiết cho máy EDC hoạt động như thông tin của hàng, store_id của MoMo, TID-MID của Ngân hàng...
Request
- application/json
Bodyrequired
DeviceConfig Info
device_config object
snstring
Serial Number của máy EDC
Responses
- 200
- 400
- 500
OK
- application/json
- Schema
- Example (auto)
Schema
data object
errorobject
errorCodestring
Example:
000
statusCodeinteger
Example:
200
{
"data": {
"id": "000634F17670D4AAF4450000DA1B0000"
},
"error": {},
"errorCode": "000",
"statusCode": 200
}
Bad Request
- application/json
- Schema
- Example (auto)
Schema
dataobject
Example:
null
errorobject
errorCodestring
Example:
401
statusCodeinteger
Example:
400
{
"data": null,
"error": {},
"errorCode": "401",
"statusCode": 400
}
Internal Server Error
- application/json
- Schema
- Example (auto)
Schema
dataobject
error object
errorCodestring
Example:
501
statusCodeinteger
Example:
500
{
"data": {},
"error": {
"message": "....",
"reason_code": "..."
},
"errorCode": "501",
"statusCode": 500
}
Authorization: http
name: HTTPBearertype: httpscheme: bearerdescription: Zengi sử dụng phương thức xác thực oAuth2 cho tất cả cá API cung cấp
- python
- curl
- csharp
- go
- nodejs
- ruby
- php
- java
- powershell
- dart
- javascript
- c
- objective-c
- ocaml
- r
- swift
- kotlin
- rust
- HTTP.CLIENT
- REQUESTS
import http.client
import json
conn = http.client.HTTPSConnection("developer.zengi.vn")
payload = ''
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer <token>'
}
conn.request("POST", "/config/device/init", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
ResponseClear