Last Updated on : 2025-06-20 02:19:02download
This article introduces APIs related to doorlock operation capabilities.
Request method | API | Description |
---|---|---|
POST | /v1.0/osaas/projects/{project_id}/card-issue-devices/lock-devices/{device_id}/cards | Doorlock card operation: issue card (use the unique id of the card generated by the card issuer to issue the door card to the door lock, so as to achieve the operation of unlocking with the specified card) |
DELETE | /v1.0/osaas/projects/{project_id}/card-issue-devices/lock-devices/{device_id}/cards/{lock_card_id} | Doorlock card operation: delete card (use the unique id of the card to send a delete card command to the doorlock, so that the card will be invalid for unlocking the doorlock) |
PUT | /v1.0/osaas/projects/{project_id}/card-issue-devices/lock-devices/{device_id}/cards/{lock_card_id}/freeze-status | Doorlock card operation: card status modification (use the unique id of the card to modify the status of the card corresponding to the specified doorlock, supporting two operations of freezing and unfreezing) |
PUT | /v1.0/osaas/projects/{project_id}/card-issue-devices/lock-devices/{device_id}/cards/{lock_card_id} | Doorlock card operation: card modification (modify the card effective time and expiration time of the corresponding doorlock without using the card issuer to re-make the card) |
GET | /v1.0/cloud/osaas/projects/{project_id}/card-issue-devices/lock-devices/{device_id}/cards/{lock_card_id} | Doorlock card operation: query card (use the door lock card unique id to query the card information corresponding to the specified door lock) |
This article introduces the API for issuing cards.
Use the unique id of the card generated by the card issuer to issue the card to the doorlock, so as to achieve the operation of unlocking with the specified card.
POST: /v1.0/osaas/projects/{project_id}/card-issue-devices/lock-devices/{device_id}/cards
Parameter | Type | Position | Mandatory | Description |
---|---|---|---|---|
project_id | String | uri | true | Unique ID of the project |
device_id | String | uri | true | Unique ID of the device |
request | LockCardIssueRequest | false | Request |
request
description
Parameter | Type | Position | Mandatory | Description |
---|---|---|---|---|
card_id | String | true | Unique ID of the card |
Parameter | Type | Description |
---|---|---|
result | LockCardOperateResponse | Doorlock card return message body |
result
description
Parameter | Type | Description |
---|---|---|
operate_id | String | Operation unique ID |
operate_result | Boolean | Operation result |
lock_card_id | String | The unique identification of the doorlock card |
POST: /v1.0/osaas/projects/150188910571223***/card-issue-devices/lock-devices/6c470253258246b99*****/cards
{
"tid": "aae3ead40e3a11ed818882d0e****",
"result": {
"lock_card_id": "3245***",
"operate_id": "1552534592777359***",
"operate_result": true
},
"t": 1658988066464,
"success": true
}
This article describes the API for modifying cards.
Modify the card effective time and expiration time of the corresponding doorlock without using the card issuer to re-make the card.
PUT: /v1.0/osaas/projects/{project_id}/card-issue-devices/lock-devices/{device_id}/cards/{lock_card_id}
Parameter | Type | Position | Mandatory | Description |
---|---|---|---|---|
project_id | String | uri | true | Unique ID of the project |
device_id | String | uri | true | Unique ID of the device |
lock_card_id | String | uri | true | Unique ID of the doorlock card |
request | LockCardUpdateRequest | false | Request |
request
description
Parameter | Type | Position | Mandatory | Description |
---|---|---|---|---|
begin_time | Long | false | Effective time | |
end_time | Long | false | Expiration time |
Parameter | Type | Description |
---|---|---|
result | LockCardOperateResponse | Doorlock card return message body |
result
description
Parameter | Type | Description |
---|---|---|
operate_id | String | Unique ID of the operation |
operate_result | Boolean | Operation result |
lock_card_id | String | Unique ID of the doorlock card |
PUT: /v1.0/osaas/projects/15018891057122****/card-issue-devices/lock-devices/6c470253258246b99****/cards/3245***
{
"tid": "aae3ead40e3a11ed818882d0e****",
"result": {
"lock_card_id": "3245***",
"operate_id": "3245***",
"operate_result": true
},
"t": 1658988066464,
"success": true
}
This article describes the API for deleting cards.
Use the unique id of the card to send a delete card command to the doorlock, so that the card will be invalid for unlocking the doorlock.
DELETE: /v1.0/osaas/projects/{project_id}/card-issue-devices/lock-devices/{device_id}/cards/{lock_card_id}
Parameter | Type | Position | Mandatory | Description |
---|---|---|---|---|
project_id | String | uri | true | Unique ID of the project |
device_id | String | uri | true | Unique ID of the device |
lock_card_id | String | uri | true | Unique ID of the doorlock card |
Parameter | Type | Description |
---|---|---|
result | LockCardOperateResponse | Doorlock card return message body |
result
description
Parameter | Type | Description |
---|---|---|
operate_id | String | Unique ID of the operation |
operate_result | Boolean | Operation result |
lock_card_id | String | Unique ID of the doorlock card |
DELETE: /v1.0/osaas/projects/150188910571223***/card-issue-devices/lock-devices/6c470253258246b99*****/cards/3245***
{
"tid": "aae3ead40e3a11ed818882d0e****",
"result": {
"lock_card_id": "3245***",
"operate_id": "1552534592777359***",
"operate_result": true
},
"t": 1658988066464,
"success": true
}
This article introduces the API for modifying the state of a card.
Use the unique id of the card to modify the status of the card corresponding to the specified doorlock, supporting two operations of freezing and unfreezing)
PUT: /v1.0/osaas/projects/{project_id}/card-issue-devices/lock-devices/{device_id}/cards/{lock_card_id}/freeze-status
Parameter | Type | Position | Mandatory | Description |
---|---|---|---|---|
project_id | String | uri | true | Unique ID of the project |
device_id | String | uri | true | Unique ID of the device |
lock_card_id | String | uri | true | Unique ID of the doorlock card |
request | LockCardFreezeRequest | false | Request to modify card status |
request
description
Parameter | Type | Position | Mandatory | Description |
---|---|---|---|---|
freeze_status | LockFreezeStatusEnum | true | Card Operation Status
|
Parameter | Type | Description |
---|---|---|
result | LockCardOperateResponse | Doorlock card operation result |
result
description
Parameter | Type | Description |
---|---|---|
operate_id | String | Unique ID of the operation |
operate_result | Boolean | Operation result |
lock_card_id | String | Unique ID of the doorlock card |
PUT: /v1.0/osaas/projects/150188910571223***/card-issue-devices/lock-devices/6c470253258246b99***/cards/3245***/freeze-status
{
"freeze_status": 1
}
{
"tid": "aae3ead40e3a11ed818882d0e***",
"result": {
"lock_card_id": "3245***",
"operate_id": "1552534592777359***",
"operate_result": true
},
"t": 1658988066464,
"success": true
}
This article introduces the API for querying cards.
According to the unique identification of the door lock card, query the card information corresponding to the specified door lock and return information such as the card validity period.
GET:/v1.0/cloud/osaas/projects/{project_id}/card-issue-devices/lock-devices/{device_id}/cards/{lock_card_id}
Parameter | Type | Position | Mandatory | Description |
---|---|---|---|---|
project_id | String | uri | true | Unique ID of the project |
device_id | String | uri | true | Unique ID of the device |
lock_card_id | String | uri | true | Unique ID of the doorlock card |
Parameter | Type | Description |
---|---|---|
result | LockCardInfoResponse | Doorlock card operation result |
result
description
Parameter | Type | Description |
---|---|---|
lock_card_id | String | Unique ID of the doorlock card |
begin_time | Long | Card effective time, 13-digit timestamp |
end_time | Long | Card expiration time, 13-digit timestamp |
GET:/v1.0/cloud/osaas/projects/150188910571223***/card-issue-devices/lock-devices/6c470253258246b99***/cards/3245***
{
"tid": "aae3ead40e3a11ed818882d0e***",
"result": {
"lock_card_id": "3245***",
"begin_time": 1750226997548,
"end_time": 1750227997548
},
"t": 1658988066464,
"success": true
}
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback