Guides & product help, fjellride.se

Back to Integrations & API

Using the Fjellride API

Base URL, authentication, organization context, error handling, and everything you need to make your first API call.

Getting started with the API

The Fjellride API lets your own systems read and change products, bookings, locations and more. It's a REST API that returns JSON, with versioned paths.

Which endpoints to use

Pick by who your code works for.

  • Your own systems. Syncing bookings into your accounting, updating stock from a warehouse, adding customers from your CRM. Use the regular endpoints, like /api/v1/bookings, with an API key. They see everything in your organization, including hidden products and internal fields, so call them only from a server.
  • Your customers. A custom shop, or a booking page on your own site. Use the storefront endpoints under /api/v1/storefront. They need no key, return only what your storefront shows, and are safe to call from a browser.

If a page your customers load needs data, get it from a storefront endpoint. Never put an API key in browser or app code.

Base URL

All requests use this base URL:

text
https://api.fjellride.se/api/v1

Every endpoint is prefixed with /api/v1. For example, the products endpoint is at /api/v1/products.

Interactive API reference

Every endpoint, with its schemas and parameters and a way to try it, is documented at:

text
https://api.fjellride.se/api/docs

The reference is generated from the live API, so it always matches the current version.

Authentication

The API accepts two kinds of authentication.

API keys (recommended for integrations)

Use an API key for server-to-server requests. Create keys under Settings → API Keys in the dashboard.

Send the key in the x-api-key header:

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

A few things to know about keys:

  • A key is shown once, when you create it. Store it somewhere safe.
  • Set an expiry date if you want keys to stop working on a schedule.
  • You can disable or delete a key from the dashboard at any time, and it stops working right away.
  • A key belongs to the organization it was created in.

Session authentication (dashboard)

Dashboard users sign in with a session cookie. The Fjellride web app handles this, and it isn't meant for external integrations.

Organization context

Every request works inside one organization. With an API key, Fjellride takes the organization from the key.

If your key has access to several organizations, name the one you mean in the x-organization-id header:

bash
curl -X GET https://api.fjellride.se/api/v1/products \
  -H "x-api-key: fjr_your_api_key_here" \
  -H "x-organization-id: org_abc123"

If you omit the header, the key's default organization is used.

Making requests

Request format

  • Content-Type: application/json for request bodies
  • Method: GET for reads, POST for creates, PUT for full updates, PATCH for partial updates, DELETE for removals
  • All request bodies use camelCase field names

Response format

A successful request returns JSON with status 200, 201 or 204, depending on the operation.

json
{
  "id": 42,
  "name": "Mountain Bike, Adult",
  "type": "RENTAL",
  "basePrice": 35000,
  "isVisible": true,
  "createdAt": "2026-03-15T10:30:00.000Z"
}

Pagination

List endpoints page their results. Some use a cursor, others page numbers:

bash
# Cursor-based (bookings)
GET /api/v1/bookings?limit=25&cursor=eyJpZCI6MTAwfQ

# Page-based (products)
GET /api/v1/products?page=1&pageSize=25

Error handling

An error comes back with a matching HTTP status code and a JSON body with a message field:

json
{
  "statusCode": 400,
  "message": "Validation failed: startDate must be a valid date",
  "error": "Bad Request"
}

Common status codes

CodeMeaning
400Bad request. Validation failed or a required field is missing.
401Unauthorized. Authentication is missing or invalid.
403Forbidden. You're authenticated but not allowed to do this.
404Not found. The resource doesn't exist or you can't reach it.
409Conflict. The request clashes with the current state.
429Rate limited. Too many requests; wait and retry.
500Server error. Something went wrong on our side.

Rate limits

Storefront endpoints such as checkout and cart have tight rate limits to stop abuse. Requests with an API key get higher limits. If you get a 429, wait before you retry.

Next steps