Skip to content

Integration guide ​

This guide takes you from a test API key to a member who opens a locker from your app. The work has two parts: a few calls from your server, and the SDK in your app.

The words of this guide ​

WordMeaning
ClubOne of your locations. It has a time zone, and a time for the daily auto-release.
LockerA cabinet in a club. It has a name, such as "Locker room A".
CompartmentOne door of a locker, with its own lock. It has a label, such as the number on the door.
MemberA person who uses your app. You name each member with your own ID.
RentalOne member holds one compartment. A rental starts with a claim, and it ends with a release.
GrantA short text that opens the compartment of one rental, once, within 2 minutes.

What you get from Clevibox ​

  • A test API key. It starts with cbx_test_.
  • A test club with a locker, and a real lock for your tests.
  • The SDK for your platform, and the samples.

A test key works only on test clubs, and a test club holds real locks. So your tests open a real door, and they never touch a live club.

The steps ​

  1. Call the integration API from your server. Your server claims a compartment for a member, gets a grant for each opening, and releases the compartment at the end. See Your server.
  2. Add the SDK to your app. Your app hands the grant to the SDK, and it shows the progress on its own screen. See Android, iOS or React Native.
  3. Handle the results. Each failure has a stable code. See Error codes.
  4. Check each club. A phone needs a network connection at the lockers. See Site requirements.
  5. Go live. Clevibox gives you a live API key for your live clubs. Your code stays the same.

Start with the samples ​

The samples run the whole flow with your test key, before you write any code.

SampleWhat it is
Sample partner serverA small server that holds your test key and hands grants to the sample apps. One command starts it: docker compose up.
Sample appsOne app for Android and one for React Native. Each one has a button that opens the locker of a test member. The iOS sample follows.

The file README.md of the samples has the steps. The sample partner server is a test tool. It takes the member ID from the request, and your own server must never do that. See the rules for your server.

Before the first release

The SDK is not in the public package registries yet. Until then, Clevibox sends you the SDK files and the samples. Their README.md says how to install the SDK from those files.