Bookings and the customer journey
Create, retrieve, and manage bookings through the API, including the public checkout flow for storefronts.
Working with bookings
The bookings API covers two workflows: operator-side management (creating, updating, and listing bookings) and the public checkout flow for customer-facing storefronts.
Operator bookings
These endpoints require API key authentication.
List bookings
curl -X GET "https://api.fjellride.se/api/v1/bookings?limit=25" \
-H "x-api-key: fjr_your_api_key_here"Query parameters:
| Parameter | Type | Description |
|---|---|---|
limit | number | Max results (default: 25) |
cursor | string | Cursor for next page |
status | string | Filter by booking status |
fromDate | string | Start date filter (ISO 8601) |
toDate | string | End date filter (ISO 8601) |
searchTerm | string | Search by customer name or booking details |
Get a single booking
curl -X GET "https://api.fjellride.se/api/v1/bookings/150" \
-H "x-api-key: fjr_your_api_key_here"Response:
{
"id": 150,
"status": "RESERVED",
"isPaid": true,
"amountPaidMinor": 70000,
"totalAmountMinor": 70000,
"startDate": "2026-07-01T08:00:00.000Z",
"endDate": "2026-07-03T18:00:00.000Z",
"fromLocationId": 1,
"toLocationId": 1,
"source": "storefront",
"phoneNumber": "+46701234567",
"products": [
{
"productId": 42,
"quantity": 2,
"name": "Mountain Bike β Adult",
"unitPrice": 35000
}
],
"notes": [],
"tags": ["summer-2026"],
"createdAt": "2026-06-28T14:20:00.000Z",
"updatedAt": "2026-06-28T14:22:00.000Z"
}Booking statuses
| Status | Description |
|---|---|
CONCEPT | Draft β not yet confirmed |
PENDING_PAYMENT | Confirmed but unpaid |
RESERVED | Paid and confirmed |
PARTIALLY_PICKED_UP | Some items collected |
PICKED_UP | All items collected |
PARTIALLY_RETURNED | Some items returned |
RETURNED | All items returned β complete |
CANCELLED | Booking cancelled |
ARCHIVED | Moved to archive |
Create a manual booking
Staff-initiated bookings (walk-ins, phone orders):
curl -X POST "https://api.fjellride.se/api/v1/bookings/manual" \
-H "x-api-key: fjr_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"startDate": "2026-07-10",
"endDate": "2026-07-12",
"fromLocationId": 1,
"toLocationId": 1,
"status": "RESERVED",
"phoneNumber": "+46709876543",
"products": [
{ "productId": 42, "quantity": 1 }
],
"notes": [
{ "text": "Customer prefers the blue bike" }
]
}'Update booking status
curl -X PUT "https://api.fjellride.se/api/v1/bookings/150/status" \
-H "x-api-key: fjr_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{ "status": "PICKED_UP" }'Update payment status
curl -X PUT "https://api.fjellride.se/api/v1/bookings/150/payment-status" \
-H "x-api-key: fjr_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{ "isPaid": true }'Public checkout flow
For custom storefronts, the public endpoints handle the customer-facing booking journey without requiring API key authentication. The organization is resolved from the request hostname or x-organization-slug header.
Step 1: Validate cart
Before checkout, validate the customer's cart:
curl -X POST "https://api.fjellride.se/api/v1/public/cart" \
-H "Content-Type: application/json" \
-H "x-organization-slug: your-org-slug" \
-d '{
"products": [
{ "productId": 42, "quantity": 2 }
],
"startDate": "2026-07-01",
"endDate": "2026-07-03",
"fromLocationId": 1,
"toLocationId": 1
}'Step 2: Create checkout
Initiate a Stripe checkout session:
curl -X POST "https://api.fjellride.se/api/v1/public/checkout" \
-H "Content-Type: application/json" \
-H "x-organization-slug: your-org-slug" \
-d '{
"products": [
{ "productId": 42, "quantity": 2 }
],
"startDate": "2026-07-01",
"endDate": "2026-07-03",
"fromLocationId": 1,
"toLocationId": 1,
"email": "customer@example.com",
"successUrl": "https://your-storefront.com/booking/success",
"cancelUrl": "https://your-storefront.com/booking/cancel"
}'Response:
{
"checkoutUrl": "https://checkout.stripe.com/c/pay/cs_live_...",
"bookingId": 151,
"sessionId": "cs_live_abc123",
"accessToken": "eyJhbGci..."
}Redirect the customer to checkoutUrl to complete payment.
Step 3: Retrieve booking (guest)
After payment, retrieve the booking using the guest token:
curl -X GET "https://api.fjellride.se/api/v1/public/bookings/151?token=eyJhbGci..."Booking sources
Each booking records its source:
| Source | Origin |
|---|---|
storefront | Created through the Fjellride-hosted storefront |
api_key | Created via the API |
manual | Created by staff in the dashboard |
Next steps
- Webhooks, payments, and automation β respond to booking events in real time
- Full API reference β interactive documentation with all endpoints