You can find the process of creating codes with specific access permissions here:
A short explanation here:
To create codes for a booking from 20-Dec-2023 1PM to 25-Dec-2023 11AM: Create auths and assign the devices by providing the accoundUserId
API endpoint : PUT /smartlock/auth
{
“name”: “BOOKING123 #1”, // for guest 1
“accountUserId”: “1264915785”,
“type”: “0”,
“smartlockIds”: [
“18891899123”,
“18891899124”
],
“remoteAllowed”: false,
“allowedFromDate”: “2023-12-20T13:00:00.000Z”,
“allowedUntilDate”: “2023-12-25T11:00:00.000Z”
}