await seam.accessCodes.generateCode({
device_id: "02cd5099-d9f8-45a1-a9c0-f2ecbd334792",
});
/*
{
"device_id": "02cd5099-d9f8-45a1-a9c0-f2ecbd334792",
"code": "1234"
}
*/{
"generated_code": {
"access_code_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"common_code_key": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"device_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errors": [
{
"error_code": "<string>",
"message": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"is_backup_access_code_available": true,
"is_external_modification_allowed": true,
"is_offline_access_code": true,
"is_one_time_use": true,
"name": "<string>",
"pending_mutations": [
{
"created_at": "2023-11-07T05:31:56Z",
"message": "<string>"
}
],
"warnings": [
{
"error_code": "<string>",
"message": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dormakaba_oracode_metadata": {
"stay_id": 123,
"user_level_name": "<string>",
"is_cancellable": true,
"is_early_checkin_able": true,
"is_extendable": true,
"is_overridable": true,
"site_name": "<string>",
"user_level_id": "<string>"
},
"ends_at": "2023-11-07T05:31:56Z",
"is_backup": true,
"is_scheduled_on_device": true,
"is_waiting_for_code_assignment": true,
"pulled_backup_access_code_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"starts_at": "2023-11-07T05:31:56Z"
},
"ok": true
}Access Codes
Generate a Code
Generates a code for an access code, given a device ID.
POST
/
access_codes
/
generate_code
await seam.accessCodes.generateCode({
device_id: "02cd5099-d9f8-45a1-a9c0-f2ecbd334792",
});
/*
{
"device_id": "02cd5099-d9f8-45a1-a9c0-f2ecbd334792",
"code": "1234"
}
*/{
"generated_code": {
"access_code_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"common_code_key": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"device_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errors": [
{
"error_code": "<string>",
"message": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"is_backup_access_code_available": true,
"is_external_modification_allowed": true,
"is_offline_access_code": true,
"is_one_time_use": true,
"name": "<string>",
"pending_mutations": [
{
"created_at": "2023-11-07T05:31:56Z",
"message": "<string>"
}
],
"warnings": [
{
"error_code": "<string>",
"message": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dormakaba_oracode_metadata": {
"stay_id": 123,
"user_level_name": "<string>",
"is_cancellable": true,
"is_early_checkin_able": true,
"is_extendable": true,
"is_overridable": true,
"site_name": "<string>",
"user_level_id": "<string>"
},
"ends_at": "2023-11-07T05:31:56Z",
"is_backup": true,
"is_scheduled_on_device": true,
"is_waiting_for_code_assignment": true,
"pulled_backup_access_code_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"starts_at": "2023-11-07T05:31:56Z"
},
"ok": true
}Authorizations
client_sessionpat_with_workspaceconsole_session_with_workspaceapi_key
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
ID of the device for which you want to generate a code.
Response
OK
Represents a smart lock access code.
Show child attributes
Show child attributes
⌘I

