Data Synchronization

Last Updated on : 2023-06-15 05:28:21

Count the number of received event data of a specific type within a specified time period, and send it to the parking lot. The parking lot verifies the number within the same time period. If the two numbers are inconsistent, the corresponding data in the time period will be re-reported. If the two numbers are the same, it will not be reported.

Note:

  • Currently, the vehicle pass data and temporary parking bill data can be synchronized.
  • Jieshun parking lots does not support this command.

API address

POST: /v1.0/parking-control/{device_id}/records/sync

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe ID of a specified device in the parking lot.

Description of body

Parameter nameTypeINRequiredDescription
data_typeInteger trueThe data type. Valid values:
  • 0: the data of vehicle pass records.
  • 1: the data of temporary parking bills.
record_sync_infosList trueThe information about synchronization tasks.

Description of record_sync_infos

Parameter nameTypeINRequiredDescription
total_countLong trueThe total number of records within a specified time period.
start_timeLong trueThe start time of counting.
end_timeLong trueThe end time of counting. The recommended time span is 1 hour, and no more than 24 hours.
pass_directionInteger falseThe pass direction. It is required in the vehicle pass data. Valid values:
  • 0: enter the parking lot.
  • 1: leave the parking lot.

Return parameter

Parameter nameTypeDescription
resultCmdIssueResultResponseThe returned result.

Description of result

Parameter nameTypeDescription
snStringThe command record ID.

Request example

POST: /v1.0/parking-control/6ce****/records/sync
{
  "dataType": 0,
  "recordSyncInfos": [
    {
      "totalCount": 10,
      "startTime": 1652777782808,
      "endTime": 1652779976771,
      "passDirection": 0
    }
  ]
}

Return example

{
    "result": {
        "sn": "135****"
    },
    "t": 1652779976771,
    "success": true
}

Error code

For more information, see error code.