Guides & product help β€” fjellride.se

Back to Integrations & API

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

bash
curl -X GET "https://api.fjellride.se/api/v1/bookings?limit=25" \
  -H "x-api-key: fjr_your_api_key_here"

Query parameters:

ParameterTypeDescription
limitnumberMax results (default: 25)
cursorstringCursor for next page
statusstringFilter by booking status
fromDatestringStart date filter (ISO 8601)
toDatestringEnd date filter (ISO 8601)
searchTermstringSearch by customer name or booking details

Get a single booking

bash
curl -X GET "https://api.fjellride.se/api/v1/bookings/150" \
  -H "x-api-key: fjr_your_api_key_here"

Response:

json
{
  "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

StatusDescription
CONCEPTDraft β€” not yet confirmed
PENDING_PAYMENTConfirmed but unpaid
RESERVEDPaid and confirmed
PARTIALLY_PICKED_UPSome items collected
PICKED_UPAll items collected
PARTIALLY_RETURNEDSome items returned
RETURNEDAll items returned β€” complete
CANCELLEDBooking cancelled
ARCHIVEDMoved to archive

Create a manual booking

Staff-initiated bookings (walk-ins, phone orders):

bash
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

bash
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

bash
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:

bash
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:

bash
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:

json
{
  "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:

bash
curl -X GET "https://api.fjellride.se/api/v1/public/bookings/151?token=eyJhbGci..."

Booking sources

Each booking records its source:

SourceOrigin
storefrontCreated through the Fjellride-hosted storefront
api_keyCreated via the API
manualCreated by staff in the dashboard

Next steps