Hoppa till innehållet

Session and channel

Establishing context: map a domain to a tenant and channel, then open a session. The session response also carries the channel's whole configuration — currency, language, feature flags, branding, navigation and SEO — so a storefront can render its shell from one call.

2 calls GET Base URL https://api.erp.fluit.cloud/ecom

Authentication, error codes, rate limits, idempotency and pagination apply to every call and are documented once under Getting started.

GET /session

Get or create session

Returns a session token and full channel context including branding, features, and analytics. Creates an EcomSession entity on first visit and reuses it on subsequent visits.

Responses

200 EcomSessionResponse
Field Type
cartItemCount integer
channel SessionChannel
customer SessionCustomer
environmentLabel string · nullable
expiresAt string(date-time)
isAuthenticated boolean
isTestEnvironment boolean
token string · nullable
429 Rate limit exceeded. Wait the number of seconds given in Retry-After. The body is problem-shaped application/json, not application/problem+json. This API sends no X-RateLimit-* headers — the quota is discovered here.
  • Retry-After — Seconds to wait before retrying.

Standard errors: 404 Errors

Examples

curl
curl "https://api.erp.fluit.cloud/ecom/session" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web"
Response 200
{
  "cartItemCount": 42,
  "channel": {
    "analytics": {
      "analyticsEnabled": true,
      "customHeadScript": "string",
      "facebookPixelId": "string",
      "googleAnalyticsId": "string",
      "googleTagManagerId": "string"
    },
    "branding": {
      "accentColor": "string",
      "accentHoverColor": "string",
      "backgroundColor": "string",
      "borderRadius": "string",
      "customCss": "string",
      "faviconUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
      "fontBody": "string",
      "fontHeading": "string",
      "footerBackgroundColor": "string",
      "footerTextColor": "string",
      "headerBackgroundColor": "string",
      "headerTextColor": "string",
      "logoUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
      "primaryColor": "string",
      "primaryHoverColor": "string",
      "secondaryColor": "string",
      "storeName": "Fluit",
      "textColor": "string"
    },
    "code": "string",
    "currency": "string",
    "features": {
      "allowBackorderChoice": true,
      "allowBackorders": true,
      "allowCustomerVatToggle": true,
      "allowRequestedDeliveryDate": true,
      "enableAddToCartModal": true,
      "enableChatAssistant": true,
      "guestCheckout": true,
      "minimumOrderValue": "299.00",
      "requireLogin": true,
      "showCrossReferences": true,
      "showLowestPrice30Days": true,
      "showOutOfStockProducts": true,
      "showPricesIncludingVat": true,
      "showPricesWithoutLogin": true,
      "showSku": true,
      "showStock": true,
      "stockAggregation": "string"
    },
    "language": "string",
    "name": "Acme AB",
    "navigation": {
      "catalogMenuDepth": 42,
      "catalogMenuMode": "string",
      "catalogRootCategoryId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "footerColumns": [
        {
          "html": "string",
          "links": [
            {}
          ],
          "sortOrder": 42,
          "title": "string"
        }
      ],
      "showCategorySidebar": true,
      "socialLinks": [
        {
          "platform": "string",
          "sortOrder": 42,
          "url": "https://cdn.fluit.cloud/assets/widget-a-front.jpg"
        }
      ],
      "topMenuLinks": [
        {
          "label": "string",
          "openInNewTab": true,
          "sortOrder": 42,
          "url": "https://cdn.fluit.cloud/assets/widget-a-front.jpg"
        }
      ]
    },
    "policies": {
      "applicableCountry": "string",
      "productFeedEnabled": true,
      "returns": {
        "enabled": true,
        "generateReturnLabel": true,
        "requireReason": true,
        "returnInstructions": "string",
        "returnWindowDays": 42,
        "shippingCost": "string"
      },
      "shipping": {
        "cheapestName": "Parcel, next day",
        "cheapestPrice": "299.00",
        "freeShippingThreshold": "299.00",
        "maxHandlingDays": 42,
        "maxTransitDays": 42,
        "minTransitDays": 42
      }
    },
    "seo": {
      "baseUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
      "metaDescription": "string",
      "metaTitle": "string",
      "redirectToPrimaryDomain": true,
      "robotsTxtExtra": "string",
      "searchEngineIndexingEnabled": true
    },
    "type": "string"
  },
  "customer": {
    "email": "order@acme.se",
    "id": "string",
    "name": "Acme AB"
  },
  "environmentLabel": "string",
  "expiresAt": "2026-06-11T09:24:13.418",
  "isAuthenticated": true,
  "isTestEnvironment": true,
  "token": "string"
}

Base URL https://api.erp.fluit.cloud/ecom. The response example is generated from the schema: the shape is right, the values are made up.

GET /session/resolve

Resolve domain to tenant

Maps a domain (e.g., shop.acme.com) to tenant and channel IDs. Returns routing info only — full channel data comes from GET /ecom/session.

Query parameters

Field Type
domain string
channel string

Responses

200 ResolveDomainResponse
Field Type
channelCode string · nullable
channelName string · nullable
tenantId string · nullable
429 Rate limit exceeded. Wait the number of seconds given in Retry-After. The body is problem-shaped application/json, not application/problem+json. This API sends no X-RateLimit-* headers — the quota is discovered here.
  • Retry-After — Seconds to wait before retrying.

Standard errors: 404 Errors

Examples

curl
curl "https://api.erp.fluit.cloud/ecom/session/resolve"
Response 200
{
  "channelCode": "STD",
  "channelName": "Acme AB",
  "tenantId": "string"
}

Base URL https://api.erp.fluit.cloud/ecom. The response example is generated from the schema: the shape is right, the values are made up.

Schemas

The objects this group's calls refer to. The field tables above go one level deep and link here rather than repeating the same schema on every endpoint.

SessionAnalytics

EcomSessionAnalyticsResponse
Field Type
analyticsEnabled boolean
customHeadScript string · nullable
facebookPixelId string · nullable
googleAnalyticsId string · nullable
googleTagManagerId string · nullable

SessionBranding

EcomSessionBrandingResponse
Field Type
accentColor string · nullable
accentHoverColor string · nullable
backgroundColor string · nullable
borderRadius string · nullable
customCss string · nullable
faviconUrl string · nullable
fontBody string · nullable
fontHeading string · nullable
footerBackgroundColor string · nullable
footerTextColor string · nullable
headerBackgroundColor string · nullable
headerTextColor string · nullable
logoUrl string · nullable
primaryColor string · nullable
primaryHoverColor string · nullable
secondaryColor string · nullable
storeName string · nullable
textColor string · nullable

SessionChannel

EcomSessionChannelResponse
Field Type Description
analytics SessionAnalytics
branding SessionBranding
code string · nullable
currency string · nullable
features SessionFeatures
language string · nullable
name string · nullable
navigation SessionNavigation
policies SessionPolicies Retur- och fraktvillkor för kanalen. Butiken använder dem för schema.org hasMerchantReturnPolicy/shippingDetails och för produktfeedens g:shipping, så att produktsidan inte behöver ett extra anrop.
seo SessionSeo Kanalens SEO-standardvärden. Används av storefronten som fallback för sidor som saknar egen meta title/description.
type string · nullable

SessionCustomer

EcomSessionCustomerResponse
Field Type
email string · nullable
id string · nullable
name string · nullable

SessionFeatures

EcomSessionFeaturesResponse
Field Type
allowBackorderChoice boolean
allowBackorders boolean
allowCustomerVatToggle boolean
allowRequestedDeliveryDate boolean
enableAddToCartModal boolean
enableChatAssistant boolean
guestCheckout boolean
minimumOrderValue decimal · nullable
requireLogin boolean
showCrossReferences boolean
showLowestPrice30Days boolean
showOutOfStockProducts boolean
showPricesIncludingVat boolean
showPricesWithoutLogin boolean
showSku boolean
showStock boolean
stockAggregation string · nullable

SessionFooterColumn

EcomSessionFooterColumnResponse
Field Type Description
html string · nullable Fritext (HTML) ovanför länkarna — adress, kontaktuppgifter, öppettider. Saneras i storefrontens API-klient innan den renderas.
links SessionMenuLink[] · nullable
sortOrder integer
title string · nullable

SessionMenuLink

EcomSessionMenuLinkResponse
Field Type
label string · nullable
openInNewTab boolean
sortOrder integer
url string · nullable

SessionNavigation

EcomSessionNavigationResponse
Field Type Description
catalogMenuDepth integer
catalogMenuMode string · nullable
catalogRootCategoryId string(uuid) · nullable
footerColumns SessionFooterColumn[] · nullable
showCategorySidebar boolean
socialLinks SessionSocialLink[] · nullable Sociala kanaler som ikoner i footern. Ligger under navigation eftersom det är där storefronten läser dem (`+layout.svelte`).
topMenuLinks SessionMenuLink[] · nullable

SessionPolicies

EcomSessionPoliciesResponse

Retur- och fraktvillkor för kanalen. Butiken använder dem för schema.org hasMerchantReturnPolicy/shippingDetails och för produktfeedens g:shipping, så att produktsidan inte behöver ett extra anrop.

Field Type Description
applicableCountry string · nullable
productFeedEnabled boolean
returns SessionReturnPolicy
shipping SessionShippingPolicy Sammanfattning av kanalens billigaste leveranssätt. Leveranssätt som prissätts via fraktprislista saknar fast pris och utesluts — ett gissat fraktpris i feeden är värre än inget alls.

SessionReturnPolicy

EcomSessionReturnPolicyResponse
Field Type
enabled boolean
generateReturnLabel boolean
requireReason boolean
returnInstructions string · nullable
returnWindowDays integer
shippingCost string · nullable

SessionSeo

EcomSessionSeoResponse

Kanalens SEO-standardvärden. Används av storefronten som fallback för sidor som saknar egen meta title/description.

Field Type
baseUrl string · nullable
metaDescription string · nullable
metaTitle string · nullable
redirectToPrimaryDomain boolean
robotsTxtExtra string · nullable
searchEngineIndexingEnabled boolean

SessionShippingPolicy

EcomSessionShippingPolicyResponse

Sammanfattning av kanalens billigaste leveranssätt. Leveranssätt som prissätts via fraktprislista saknar fast pris och utesluts — ett gissat fraktpris i feeden är värre än inget alls.

Field Type
cheapestName string · nullable
cheapestPrice decimal · nullable
freeShippingThreshold decimal · nullable
maxHandlingDays integer
maxTransitDays integer · nullable
minTransitDays integer · nullable

SessionSocialLink

EcomSessionSocialLinkResponse
Field Type
platform string · nullable
sortOrder integer
url string · nullable