B Bookare Helpbookare.app →

Developers · Reference

Customer API

Sign a customer in with an email code, then their bookings, packs, payments and notifications.

All paths are relative to https://{venue}.bookare.app/api/v1. Answers are { "data": … }; errors are described in Errors, dates, languages and limits. The same reference is available as OpenAPI.

Customer sign-in

POST/auth/code

Send a sign-in code to an email · Auth: None · postAuthCode

Step 1. Sends a 6-digit code to the email (valid 10 minutes) and returns a challenge to send back with the code. Works for new and existing customers. Limited per email and per IP.

FieldInTypeRequiredDescription
emailbodystringyesThe customer’s email.
{
  "data": {
    "challenge": "Xb7…",
    "expires_in": 600
  }
}

POST/auth/token

Exchange the code for a customer token · Auth: None · postAuthToken

Step 2. Returns a bearer token valid 90 days. For gyms and studios, someone without an account must sign up in the same call: pass signup (name, phone, consent; the venue approves new members). If signup is missing for a new email, the answer is 422 signup_required and the code is NOT used up. Venues with appointments or stays create the account by themselves.

FieldInTypeRequiredDescription
emailbodystringyesThe same email as step 1.
codebodystringyesThe 6-digit code from the email.
challengebodystringyesThe challenge from step 1.
signupbodyobjectGyms and studios, new members only: { name, phone, goal?, injuries?, medical?, wants_news?, consent: true } — consent to keep their details (and health answers) as the venue’s privacy notice says.
{
  "data": {
    "token": "q8…",
    "token_type": "Bearer",
    "expires_in": 7776000,
    "customer": {
      "id": "u1",
      "name": "Maria",
      "status": "active"
    }
  }
}

DELETE/auth/token

Sign out (revoke this token) · Auth: Customer token · deleteAuthToken

Customer

GET/me

The signed-in customer · Auth: Customer token · getMe

status is "pending" until the venue approves a new member (gyms and studios); bookings are refused until then.

PATCH/me

Change name, phone or news consent · Auth: Customer token · patchMe

FieldInTypeRequiredDescription
namebodystringFull name.
phonebodystringPhone.
wants_newsbodybooleanOffers and news by email and phone notifications.

GET/me/notifications

Notifications (reminders, class changes, offers, news) · Auth: Customer token · getMeNotifications

Notifications (reminders, class changes, offers, news)

Available for gyms and studios.

GET/me/offers

Offers from the venue that apply now · Auth: Customer token · getMeOffers

Offers from the venue that apply now

Available for gyms and studios.

GET/me/bookings

The customer’s class bookings · Auth: Customer token · getMeBookings

The customer’s class bookings

Available for gyms and studios.

FieldInTypeRequiredDescription
scopequeryupcoming | past | allDefault upcoming.

POST/me/bookings

Book a class · Auth: Customer token · postMeBookings

Uses the pack that expires first and covers this class, unless member_pack_id is given. Refused with a reason when there is no suitable pack, the class is full or the account is not approved yet.

Available for gyms and studios.

FieldInTypeRequiredDescription
class_idbodystringyesFrom GET /public/classes.
member_pack_idbodystringOptional: a specific pack from GET /me/packs.

DELETE/me/bookings/{booking_id}

Cancel a class booking · Auth: Customer token · deleteMeBookings/Booking_id

Before the venue’s free-cancellation time the class goes back to the pack; after it, the booking is cancelled but the class is charged (late: true).

Available for gyms and studios.

FieldInTypeRequiredDescription
booking_idpathstringyes

GET/me/packs

The customer’s packs · Auth: Customer token · getMePacks

The customer’s packs

Available for gyms and studios.

POST/me/packs

Buy a pack · Auth: Customer token · postMePacks

One unpaid pack at a time (409 otherwise). method must be one the venue accepts (see payment_methods). For card, then call POST /me/packs/{id}/checkout. The customer gets a confirmation email.

Available for gyms and studios.

FieldInTypeRequiredDescription
pack_idbodystringyesFrom GET /me/packs/available.
methodbodycash | iris | cardyesHow they will pay.
codebodystringOptional coupon code.

GET/me/packs/available

Packs this customer can buy, with coupon prices · Auth: Customer token · getMePacksAvailable

Includes special packs for this member or their groups, and applies automatic coupons; pass code to apply a coupon code.

Available for gyms and studios.

FieldInTypeRequiredDescription
codequerystringOptional coupon code.

POST/me/packs/{member_pack_id}/checkout

Start a card payment for an unpaid pack · Auth: Customer token · postMePacks/Member_pack_idCheckout

Returns where to send the customer: a URL to open (type redirect) or a form to post (type form). After paying they come back to the venue’s account page; the pack shows as paid in GET /me/packs.

Available for gyms and studios.

FieldInTypeRequiredDescription
member_pack_idpathstringyes

DELETE/me/packs/{member_pack_id}

Cancel an unpaid, unused pack · Auth: Customer token · deleteMePacks/Member_pack_id

Cancel an unpaid, unused pack

Available for gyms and studios.

FieldInTypeRequiredDescription
member_pack_idpathstringyes

GET/me/appointments

The customer’s appointments or table bookings · Auth: Customer token · getMeAppointments

The customer’s appointments or table bookings

Available for venues with appointments, restaurants and bars.

GET/me/stays

The customer’s stay bookings · Auth: Customer token · getMeStays

The customer’s stay bookings

Available for stays.