You can also assign each AccessKey with an alias tag. This will make sure to keep the integration stateless and there is no need to store our Access Key Id in the integration system.
This is different from the Alias Id and can be used to tag a group of users, for example, by a booking id. This makes it possible to delete all AccessKeys all users with the same booking by using the booking Id.
Use Alias Tag on the individual AccessKey
If you grant access to multiple users with the same alias tag.
{
"insert": [{
"access": { "id": "RZglGYR2Je" },
"user": { "email": "[email protected]" },
"aliasTag": "booking-123"
},{
"access": { "id": "RZglGYR2Je" },
"user": { "email": "[email protected]" },
"aliasTag": "booking-123"
}]
}
Remove access/Cancel the event
To cancel the booking or event, simply pass the same alias tag and we will remove access from every user with that tag.
{
"delete": [{
"aliasTag": "booking-1234"
}]
}
Change access/Changes to the event
Change the start and expiration date for a booking first remove existing access then add the new one with the same aliasTag.
{
"delete": [{
"aliasTag": "booking-1234"
}],
"insert": [{
"access": { "id": "RZglGYR2Je" },
"user": { "email": "[email protected]" },
"startDate": "2022-01-01T10:00:00.000Z",
"expirationDate": "2022-01-01T12:00:00.000Z",
"aliasTag": "booking-123"
},{
"access": { "id": "RZglGYR2Je" },
"user": { "email": "[email protected]" },
"startDate": "2022-01-01T10:00:00.000Z",
"expirationDate": "2022-01-01T12:00:00.000Z",
"aliasTag": "booking-123"
}]
}