Skip to content

CLI

bookai is a command-line client for the Back Office API.

Install

pipx install bookai-cli

Authenticate

bookai login

Interactive

Most bookai workflows are guided rather than flag-driven — the CLI prompts you for what it needs, so there's nothing to look up ahead of time.

Set up a brand-new venue. bookai venues create walks you through creating a venue and its first (owner) account — no API key needed yet, since this is how that first account gets created:

$ bookai venues create
Setting up a new venue on https://b2b.bookai.now. Ctrl-C to cancel at any time.

Venue name: The Grand Hall
Street address: 500 5th Ave
City: New York
State: NY
Country [US]:

Now your account -- you'll be this venue's first admin:
Your first name: Jamie
Your last name: Rivera
Your email: [email protected]
Password:
Repeat for confirmation:

Create "The Grand Hall" (New York, NY) for [email protected]?
Confirm [Y/n]: y

Created "The Grand Hall" (id: v_8f2a1c).
Run `bookai login` to authorize this machine as [email protected].

Explore without retyping bookai every time. Run bookai with no command to drop into an interactive shell — every subcommand below works the same way, just without the leading bookai:

$ bookai
bookai interactive shell -- commands run without the leading `bookai` (e.g. `venues list`).
Type `help` for the command list, `whoami` for your current env/key, `exit` to quit.

bookai (prod)> venues list
...
bookai (prod)> exit

Reference

bookai

bookai: manage venues, pricing, and orders from the command line.

Run bookai login once per environment to save a key and make it your default -- or pass --api-key / set GROUPSALES_API_KEY for scripting and CI. Run bookai with no command for an interactive shell.

Usage:

bookai [OPTIONS] [COMMAND] [ARGS]...

Options:

Name Type Description Default
--api-key text API key (or set GROUPSALES_API_KEY). Overrides a saved bookai login key. None
--base-url text Back office API base URL (or set GROUPSALES_BASE_URL). Overrides --env. None
--env choice (local | prod | sandbox) Shortcut for --base-url: local, prod, sandbox. Defaults to your last bookai login, or prod if you've never logged in. None
--json boolean Print raw JSON instead of a table. False
--version boolean Show the version and exit. Sentinel.UNSET
--help boolean Show this message and exit. Sentinel.UNSET

contacts

Manage per-venue contacts.

Usage:

bookai contacts [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. Sentinel.UNSET

add

Add a new contact to a venue.

Usage:

bookai contacts add [OPTIONS] VENUE_ID

Options:

Name Type Description Default
--first-name text Contact's first name. Sentinel.UNSET
--last-name text Contact's last name. Sentinel.UNSET
--email text Contact's email address. None
--cell-number text Contact's cell number. None
--whatsapp text WhatsApp-reachable number, if different from --cell-number. None
--role text e.g. 'Owner', 'Events Manager'. None
--help boolean Show this message and exit. Sentinel.UNSET

delete

Delete a contact.

Usage:

bookai contacts delete [OPTIONS] VENUE_ID CONTACT_ID

Options:

Name Type Description Default
--help boolean Show this message and exit. Sentinel.UNSET

get

Show one contact.

Usage:

bookai contacts get [OPTIONS] VENUE_ID CONTACT_ID

Options:

Name Type Description Default
--help boolean Show this message and exit. Sentinel.UNSET

list

List contacts for a venue.

Usage:

bookai contacts list [OPTIONS] VENUE_ID

Options:

Name Type Description Default
--help boolean Show this message and exit. Sentinel.UNSET

update

Replace an existing contact's details.

Usage:

bookai contacts update [OPTIONS] VENUE_ID CONTACT_ID

Options:

Name Type Description Default
--first-name text Contact's first name. Sentinel.UNSET
--last-name text Contact's last name. Sentinel.UNSET
--email text Contact's email address. None
--cell-number text Contact's cell number. None
--whatsapp text WhatsApp-reachable number, if different from --cell-number. None
--role text e.g. 'Owner', 'Events Manager'. None
--help boolean Show this message and exit. Sentinel.UNSET

login

Authorize this machine via your browser and save the key locally.

Usage:

bookai login [OPTIONS]

Options:

Name Type Description Default
--timeout integer Seconds to wait for browser authorization. 300
--help boolean Show this message and exit. Sentinel.UNSET

logout

Remove the locally saved API key. Does not revoke it server-side -- revoke from the back office's API Keys page to invalidate it entirely.

Usage:

bookai logout [OPTIONS]

Options:

Name Type Description Default
--all boolean Log out of every known environment, not just the current one. False
--help boolean Show this message and exit. Sentinel.UNSET

orders

View confirmed orders.

Usage:

bookai orders [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. Sentinel.UNSET

list

List confirmed orders (paginated).

Usage:

bookai orders list [OPTIONS]

Options:

Name Type Description Default
--page integer N/A 1
--help boolean Show this message and exit. Sentinel.UNSET

pricing

Manage per-venue pricing rules.

Usage:

bookai pricing [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. Sentinel.UNSET

delete

Delete a pricing rule.

Usage:

bookai pricing delete [OPTIONS] VENUE_ID RULE_ID

Options:

Name Type Description Default
--help boolean Show this message and exit. Sentinel.UNSET

get

Show one pricing rule.

Usage:

bookai pricing get [OPTIONS] VENUE_ID RULE_ID

Options:

Name Type Description Default
--help boolean Show this message and exit. Sentinel.UNSET

list

List pricing rules for a venue.

Usage:

bookai pricing list [OPTIONS] VENUE_ID

Options:

Name Type Description Default
--help boolean Show this message and exit. Sentinel.UNSET

set

Create a new pricing rule.

Usage:

bookai pricing set [OPTIONS] VENUE_ID

Options:

Name Type Description Default
--min-group integer Minimum group size this rule applies to. Sentinel.UNSET
--max-group integer Maximum group size this rule applies to. Sentinel.UNSET
--min-price float Price floor per person. Sentinel.UNSET
--max-price float Price ceiling per person. Sentinel.UNSET
--event-id text Scope this rule to one event instead of the whole venue. None
--source text Origin tag, e.g. a 3P vendor name. app
--external-id text 3P upsert key -- ignored while --source is 'app'. None
--help boolean Show this message and exit. Sentinel.UNSET

update

Replace an existing pricing rule.

Usage:

bookai pricing update [OPTIONS] VENUE_ID RULE_ID

Options:

Name Type Description Default
--min-group integer Minimum group size this rule applies to. Sentinel.UNSET
--max-group integer Maximum group size this rule applies to. Sentinel.UNSET
--min-price float Price floor per person. Sentinel.UNSET
--max-price float Price ceiling per person. Sentinel.UNSET
--event-id text Scope this rule to one event instead of the whole venue. None
--source text Origin tag, e.g. a 3P vendor name. app
--external-id text 3P upsert key -- ignored while --source is 'app'. None
--help boolean Show this message and exit. Sentinel.UNSET

venues

Manage venues.

Usage:

bookai venues [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. Sentinel.UNSET

create

Create a brand-new venue and its first (owner) account, guided step-by-step -- no API key needed yet, since this is how a venue's very first account gets created (same as signing up in the browser).

Usage:

bookai venues create [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. Sentinel.UNSET

list

List venues visible to this API key's account.

Usage:

bookai venues list [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. Sentinel.UNSET

whoami

Show which environment and API key this CLI is currently using.

Usage:

bookai whoami [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. Sentinel.UNSET