MPGS System API v3.6
1. Overview
1.1. Instructions
1.1.1. Intended readers
This system developer, third-party docking system developer
2. Interface Description
2.1. Protocol Description
Http protocol
2.2. Request Method
POST
Request a public address, as follows, each specific interface has a subdivided name, please see the description of the service address of each interface.
Request address prefix:
http://ip:port/mpgs/api/v3/
Example: such as the interface for obtaining parking space status:
http://ip:port/mpgs/api/v3/parkingSpace/getParkingSpaceInfo
2.2.1. Safety Instructions
1. Both requests and responses need to be verified by signatures, specifically in the chapter on signature verification
2. AES encryption for transmission content (disabled by default, enabled when high security is required)
2.2.2. Public Request Parameters Description
Parameters that must be brought with each request:
No.
Variable Name
Required or Not
Sample Value
Type
Description
1
key
Yes
String
The key provided by the MPGS system to the third-party access system to uniquely identify the third-party access system
2
timestamp
Yes
String
yyyyMMddHHmmss
3
version
Yes
String
Interface version, currently: V3.6.0
4
sign
Yes
String
Signature, used for authentication, see the next section for the specific signature method
2.2.3. Signature Method
The content in the data needs to be authenticated to ensure that the information carried is true, effective, and reasonable. Therefore, the method of generating the sign string will be defined here.
1. After the public request parameters are sorted according to the ASCII code of the field name from small to large (dictionary order), the URL key-value pair format (ie key1=value1&key2=value2...) is used to concatenate the string into string1,
2. At the end of string1, splicing secret=[signature key secret] to get stringSignTemp character string, and perform md5 operation on stringSignTemp to get the sign value;
The following defines a demo to generate the sign string:
Fixed Parameter:
key=A10001
timestamp=20170101235959
version=V3.0.0
Signing Key:
secret=uqvmk807oehIZ7wS
Obtained:
sign=CAA20989D7AD77A3CB8F3AAD5076CD4C
2.2.4. Response Data Format
JSON format, the specific parameters are as follow:
Field Name
Variable Name
Required or Not
Sample Value
Type
Description
status code
ret
Yes
0
int
Return code 0 means success, non-zero means failure.
0 Business success
1 System abnormal
2 Signature error
3 Key error
4 Unauthorized
5 Request parameters are incomplete
result description
msg
Yes
(Get the verification code successfully)
String
Describe this result
return data
data
No
{}
Result data, json format object, when the value is empty, return {}.
Eg:
2.2.5. Coding Description
UTF-8
2.2.6. Response Processing Order
Judge the protocol return error code when processing returns
3. API Description
3.1. Business Interface
3.1.1. Get Parking Spaces Status
1. Business Description
The third-party access system requests the guidance system to obtain the real-time status of all parking spaces.
2. Service Address
parkingSpace/getParkingSpaceInfo
3. Frequency of Calling
Real Time
4. Calling Method
Guidance system provides interface, third-party access system actively requests
5. Request Parameter Description
Parameter Name
Required or Not
Type
Description
pageSize
No
int
Number of pages
recordStart
No
int
Number of requested pages
carLicenseNumber
No
String
License plate number
parkingSpaceNumber
No
String
Parking space number
imageCovertFlag
No
Boolean
Do you need image base64 information. The default is true, if you don’t need it, pass the parameter=false
6. Response Parameter Description
Parameter Name
Required or Not
Type
Description
count
Yes
int
Total
list
Yes
Json
Parking space data list
List: list single data
Parameter Name
Required or Not
Type
Description
parkingSpaceType
Yes
int
Parking space type
0-temporary car
parkingSpaceNumber
Yes
String
Parking space number (actually equal to mapName_parkingSpaceNumber2, unique in the entire system)
parkingSpaceNumber2
Yes
String
Parking space number (the same name can be used between different floors)
parkingSpaceStatus
Yes
int
Parking tatus
0-Vacant
1- Occupied
carLicenseNumber
Yes
String
License plate number
mapName
Yes
String
Floor
enterTime
No
String
Admission time
yyyyMMddHHmmss
plateColor
No
String
License plate color
(not available currently)
enterPlateImage
No
String
Entry license plate picture (not available currently)
Base64 string
enterCarImage
No
String
Entry car body picture
Base64 string
enterCarImagePath
No
String
Relative path of car body picture when approaching
enterPlateImagePath
No
String
Relative path of entry license plate image
carLogo
No
String
Vehicle brand
(not available currently)
carSizeType
No
int
Vehicle size type (0 unknown, 1 small car, 2 large car, 3 oversized car, 4 medium car)
(not available currently)
belongArea
String
Statistics area
parkLotName
String
Car park name
7. Return example
8. Business Failure Status Code Description
Status Code
Description
3.1.2. Get Basic Car Park Data
9. Business Description
The third-party access system requests the guidance system to obtain the basic data of the car park.
10. Service Address
parkingLot/getParkingLotInfo
11. Frequency of Calling
Real Time
12. Calling Method
Guidance system provides interface, third-party access system actively requests
13. Request Rarameter Description
Parameter Name
Required or Not
Type
Description
14. Response Parameter Description
Parameter Name
Required or Not
Type
Description
parkingLotCode
Yes
String
Parking lot number
parkingLotCustomCode
Yes
String
Parking lot custom number
parkingLotName
Yes
String
Parking lot name
parkingLotLongitude
No
number
longitude
parkingLotLatitude
No
number
latitude
parkingLotImage
No
String
Parking lot pictures
totalParkingSpace
Yes
int
Total parking spaces
temporaryParkingSpace
Yes
int
Temporary parking space
fixedParkingSpace
Yes
int
Fixed parking space
rentedParkingSpace
Yes
int
Rented parking space
freeParkingSpace
Yes
int
Free parking space
reservedParkingSpace
Yes
int
Reserved parking space
parkingLotAddress
No
String
Parking lot address
usingCount
Yes
int
Occupied parking spaces quantity
freeCount
Yes
int
Vacant parking spaces quantity
mapList
No
jsonlist
Floor information
mapList parameters
Parameter Name
Required or Not
Type
Description
mapName
Yes
String
Floor name
usingCount
Yes
int
Occupied parking spaces quantity
freeCount
Yes
int
Vacant parking spaces quantity
15. Return Example
3.1.3. Get Guidance Display Data
16. Business Description
The third-party access system requests the guidance system to obtain the basic data of the car park.
17. Service Address
device/getDisplayInfo
18. Frequency of Calling
Real Time
19. Calling Method
Guidance system provides interface, third-party access system actively requests
20. Request Parameter Description
Parameter Name
Required or Not
Type
Description
21. Response Parameter Description
Parameter Name
Required or Not
Type
Description
deviceId
Yes
String
Device id
formatText
Yes
Display content
/R[←004]/G[←0→]/B[0↑]
/R red
/G green
/B blue
“[]”shows specific content inside
dataList
Yes
Display content
V2.0 version needs attention
No need to pay attention to the V3.0 version
22. Return Example
23. Business Failure Status Code Description
Status Code
Description
3.1.4. Get Mobile Phone Car Search Route Map
24. Business Description
The third-party system requests to guidance system roadmap, here is the H5 page, if it is deployed separately, it needs the support of the external network
25. Service Address
http://ip:port/mpgs/vrlsmanH5/index.html
26. Frequency of Calling
Real Time
27. Calling Method
Guidance system provides interface, third-party access system actively requests
3.2. Data Report
3.2.1 Parking Space Data Report
MPGS version requires 3.6.3 or higher
URL Reporting address setting: Parking lot management -> parking lot configuration -> external interface configuration -> parking lot request URL
Exit Report Data
cmd: reportCarInOutSpace
Parameter Name
Type
Description
leaveTime
String
exit time
stoppingTime
int
Parking time (minutes)
parkingSpaceNumber
String
Parking space number
enterCarLicenseNumber
String
Entrance license plate
leaveCarImage
String
Exit picture
confidence
int
Confidence
enterCarImage
String
Entry picture
leaveCarLicenseNumber
String
Exit license plate
enterTime
String
Entry time
type
int
1 means exit
Entrance Report Data
cmd: reportCarInOutSpace
Parameter Name
Type
Description
parkingSpaceNumber
String
Parking space number
enterCarLicenseNumber
String
Entry license plate
confidence
int
Confidence
enterCarImage
String
Entry picture
enterTime
String
Entry time
enterPlateImage
String
Entry liicense plate picture
type
int
0 means enter
4. Calling Example
JAVA
Last updated
Was this helpful?