Blvd Book SDK
Boulevard is an intelligent scheduling solution and comprehensive point of sale system that increases revenue and lowers costs for salons, spas, and other appointment-based businesses.
Use this SDK to create your own custom booking experiences for Boulevard.
Getting Started
Setup
Head over to the Boulevard Developer Portal to get set up with a sandbox account and API application. You'll need your business ID and and API key to use this package:
const businessId = "312bf55a-b6c5-48f2-ab40-eef5d78277ac";
const apiKey = "00000000-0000-0000-0000-000000000000";
Install the SDK
yarn -D add @boulevard/blvd-book-sdk
Client-Side
The simplest flow is the unauthenticated client API, which you can use to create an appointment for a new client:
import { Blvd } from "@boulevard/blvd-book-sdk";
const client = new Blvd(apiKey, businessId);
const business = await client.businesses.get();
const locations = await business.getLocations();
let cart = await client.carts.create(locations[0]);
const item = cart.availableCategories[0].availableItems[0];
cart = await cart.addBookableItem(item);
const dates = await cart.getBookableDates();
const times = await cart.getBookableTimes(dates[0]);
await cart.reserve(times[0]);
await cart.update({
email: "john.doe@gmail.com",
firstName: "John",
lastName: "Doe",
phoneNumber: "+13105555555"
});
await cart.addCardPaymentMethod({
card: {
name: "John Doe",
number: "4242424242424242",
cvv: "111",
exp_month: 1,
exp_year: 2025
}
});
await cart.checkout();