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 you manage products, bookings, locations, and more programmatically. It's a REST API that returns JSON and uses versioned paths.

Base URL

All API requests use the following 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

Full endpoint documentation with schemas, parameters, and try-it-out functionality is available at:

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

The reference is generated from the live API and always reflects the current version.

Authentication

The API supports two authentication methods:

API keys (recommended for integrations)

API keys are the primary way to authenticate server-to-server requests. Create them from Settings β†’ API Keys in your 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"

Key management:

  • Keys are shown only once at creation β€” save them securely
  • Set an expiration date if you want keys to rotate automatically
  • Disable or delete keys instantly from the dashboard
  • Each key is scoped to the organization it was created in

Session authentication (dashboard)

Dashboard users authenticate via session cookies. This is handled automatically by the Fjellride web app and is not intended for external integrations.

Organization context

Every API request operates within a specific organization. When using an API key, the organization is determined automatically from the key's metadata.

If your API key has access to multiple organizations, specify which one to use with 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

Successful responses return JSON with 200, 201, or 204 status codes 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 support cursor-based or page-based pagination depending on the endpoint:

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

Errors return a JSON body with a message field and an appropriate HTTP status code:

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

Common status codes

CodeMeaning
400Bad request β€” validation failed or missing required fields
401Unauthorized β€” missing or invalid authentication
403Forbidden β€” valid auth but insufficient permissions
404Not found β€” resource doesn't exist or isn't accessible
429Rate limited β€” too many requests, wait and retry
500Server error β€” something went wrong on our end

Rate limits

Public endpoints (checkout, cart) are rate-limited to prevent abuse. Authenticated API key requests have higher limits. If you receive a 429 response, wait before retrying.

Next steps