Build with ShelfSpace
A REST API for shelves, bookings, escrow, QR attribution, and messaging. Authenticated with bearer tokens issued via OAuth 2.0.
Authorization: Bearer shs_live_xxxxxxxxxxxxxxxxxxxx
Authentication
/v1/auth/sessionExchange an OAuth code for a session token.
{
"code": "string",
"redirect_uri": "string"
}{
"access_token": "shs_live_…",
"refresh_token": "shs_rt_…",
"expires_in": 3600,
"user": {
"id": "u_x9k",
"role": "brand"
}
}/v1/meGet the current authenticated user.
{
"id": "u_x9k",
"name": "Maya Okafor",
"role": "brand",
"company": "Aurela Botanics"
}Shelves
/v1/shelves?city=Austin&vibe=minimalSearch shelves with filters.
{
"data": [
{
"id": "s_001",
"title": "Front counter shelf · Morning Bean Café",
"city": "Austin",
"price_per_week": 180,
"foot_traffic": 320
}
],
"page": 1,
"total": 42
}/v1/shelves/:idGet a single shelf with host details.
{
"id": "s_001",
"host": {
"id": "u_host",
"name": "Lena Cortez"
},
"dimensions": "60 × 30 × 25 cm",
"availability": [
"2025-10-12/2025-12-31"
]
}/v1/shelvesCreate a new shelf listing (host only).
{
"title": "string",
"city": "string",
"price_per_week": 150,
"dimensions": "string"
}{
"id": "s_new",
"status": "pending_review"
}/v1/shelves/:idUpdate price, availability, status.
{
"price_per_week": 200
}{
"id": "s_001",
"price_per_week": 200
}/v1/shelves/:idArchive a shelf listing.
{
"deleted": true
}Bookings & Escrow
/v1/bookingsCreate a booking and lock funds in escrow.
{
"shelf_id": "s_001",
"start_date": "2025-11-01",
"weeks": 4,
"product_name": "Aurela Glow Serum"
}{
"id": "b_x12",
"status": "in_escrow",
"total_amount": 720,
"qr_code_id": "QR-AURELA-002"
}/v1/bookings?status=activeList the caller's bookings.
{
"data": [
{
"id": "b_001",
"status": "active",
"qr_scans": 184,
"qr_sales": 27
}
]
}/v1/bookings/:id/confirm-setupHost marks shelf as set up; releases escrow trigger.
{
"id": "b_x12",
"status": "active"
}/v1/bookings/:id/cancelCancel a booking; refund per policy.
{
"reason": "string"
}{
"id": "b_x12",
"status": "cancelled",
"refunded": 720
}QR codes
/v1/qr/:codeResolve a QR code to a product checkout.
{
"booking_id": "b_001",
"product": "Aurela Glow Serum · 30ml",
"checkout_url": "https://shop.shelfspace.io/c/QR-…"
}/v1/qr/:code/analyticsScans and conversion for a QR code.
{
"scans": 184,
"sales": 27,
"conversion_rate": 0.147
}Messages
/v1/threads/:booking_id/messagesList messages on a booking thread.
{
"data": [
{
"id": "m_1",
"from": "u_host",
"text": "Got your shipment!"
}
]
}/v1/threads/:booking_id/messagesSend a message.
{
"text": "string"
}{
"id": "m_new",
"created_at": "2025-10-15T10:22:00Z"
}Payouts (Host)
/v1/payoutsList payouts to the connected bank account.
{
"data": [
{
"id": "po_a1",
"amount": 720,
"status": "paid",
"arrived_at": "2025-10-07"
}
]
}Subscribe to events like booking.confirmed, qr.scanned, payout.paid.
