post https://www.keycafe.com/v0/release
Create a bin release with a POST request to the endpoint.
To initiate a bin release, send a POST request with the bin ID specified in the request body as a JSON object.
{
"bin": {
"id": 123456
}
}
If the request is successful, the API will return a Release object.
Example Workflow: Releasing a Bin
- Create a bin release (POST), specifying the bin ID that needs to be opened. Note the release ID from the response.
- Prompt the user to press the flashing button on the SmartBox to open their key bin.
- Periodically retrieve (GET) the bin release using the release ID. Note the state of the bin release from the "retrieved", "completed" and "expired" properties.
- Use the "retrieved" flag to determine if the release was retrieved by the box. A release that was retrieved but never completed may indicate a connection issue.
- If "completed" becomes true, stop retrieving the bin release data, the bin was successfully opened.
- If "expired" becomes true, stop retrieving the bin release data, display an error and prompt the user to try again.