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.

Headers

Field Type Description
X-Language string Language for translated content, as an ISO 639-1 code ("sv", "en"). Omitting it answers in the channel's default language, and so does a language the channel does not publish — this never fails the request. The channel decides which languages exist; read them from the session response.

Responses

200 EcomSessionResponse
Field Type Description
cartItemCount decimal
channel SessionChannel
customer SessionCustomer
environmentLabel string · nullable
expiresAt string(date-time)
impersonation SessionImpersonation Vem som öppnat den här sessionen som kunden.
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" \
  -H "X-Language: …"
Response 200
{
  "cartItemCount": "299.00",
  "channel": {
    "analytics": {
      "analyticsEnabled": true,
      "customHeadScript": "string",
      "enhancedConversionsEnabled": true,
      "facebookPixelId": "string",
      "googleAdsConversionId": "string",
      "googleAdsPurchaseLabel": "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",
      "imageBackground": "string",
      "logoUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
      "primaryColor": "string",
      "primaryHoverColor": "string",
      "secondaryColor": "string",
      "storeName": "Fluit",
      "textColor": "string"
    },
    "businessProfile": {
      "city": "Stockholm",
      "companyName": "Acme AB",
      "countryCode": "SE",
      "email": "order@acme.se",
      "latitude": "299.00",
      "longitude": "299.00",
      "openingHours": [
        {
          "closes": "string",
          "days": [
            "string"
          ],
          "opens": "string"
        }
      ],
      "organizationNumber": "ABC-001",
      "phone": "+46 8 123 45 67",
      "postalCode": "11122",
      "schemaType": "string",
      "showInFooter": true,
      "streetAddress": "string"
    },
    "code": "string",
    "currency": "string",
    "features": {
      "accountRequestPageSlug": "string",
      "allowBackorderChoice": true,
      "allowBackorders": true,
      "allowCategoryTableView": true,
      "allowCustomerVatToggle": true,
      "allowRequestedDeliveryDate": true,
      "allowVisitorViewToggle": true,
      "browserAgentToolsEnabled": true,
      "commerceEnabled": true,
      "defaultCatalogView": "string",
      "enableAddToCartModal": true,
      "enableChatAssistant": true,
      "guestCheckout": true,
      "minimumOrderValue": "299.00",
      "productReviewsEnabled": true,
      "requireLogin": true,
      "showCrossReferences": true,
      "showListPriceAndDiscount": true,
      "showLowestPrice30Days": true,
      "showOutOfStockProducts": true,
      "showPricesIncludingVat": true,
      "showPricesWithoutLogin": true,
      "showSku": true,
      "showStock": true,
      "showStockWithoutLogin": true,
      "stockAggregation": "string"
    },
    "language": "string",
    "languages": [
      {
        "code": "string",
        "name": "White",
        "nativeName": "White"
      }
    ],
    "name": "Acme AB",
    "navigation": {
      "catalogMenuDepth": 42,
      "catalogMenuLabel": "string",
      "catalogMenuMode": "string",
      "catalogMenuSortOrder": 42,
      "catalogRootCategoryId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "chrome": {
        "footerLogoUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
        "footerNewsletter": {
          "isEnabled": true,
          "text": "string",
          "title": "string"
        },
        "headerLayout": "string",
        "logoSize": "string",
        "mobileActionBar": {
          "buttons": [
            {}
          ],
          "isEnabled": true
        },
        "mobileSearch": "string",
        "showLogoInFooter": true
      },
      "footerColumns": [
        {
          "html": "string",
          "links": [
            {}
          ],
          "sortOrder": 42,
          "title": "string"
        }
      ],
      "promiseBar": {
        "isEnabled": true,
        "items": [
          {
            "icon": "string",
            "text": "string"
          }
        ],
        "narrowBehavior": "string",
        "tone": "string"
      },
      "reservedSlugs": [
        "string"
      ],
      "showCategorySidebar": true,
      "socialLinks": [
        {
          "platform": "string",
          "sortOrder": 42,
          "url": "https://cdn.fluit.cloud/assets/widget-a-front.jpg"
        }
      ],
      "topMenuLinks": [
        {
          "children": [
            null
          ],
          "label": "string",
          "openInNewTab": true,
          "showAsButton": 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
      }
    },
    "productCard": {
      "hover": "string",
      "imageFit": "string",
      "imageRatio": "string",
      "keySpecRows": 42,
      "mobileColumns": 42,
      "showAddToCart": true,
      "showBrand": true,
      "showCompare": true,
      "showStock": true,
      "showVatNote": true
    },
    "productModel": {
      "placement": "string",
      "rotation": "string",
      "sceneSwitch": true
    },
    "seo": {
      "baseUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
      "metaDescription": "string",
      "metaTitle": "string",
      "redirectToPrimaryDomain": true,
      "robotsTxtExtra": "string",
      "searchEngineIndexingEnabled": true
    },
    "type": "string"
  },
  "customer": {
    "canPlaceOrders": true,
    "email": "order@acme.se",
    "id": "string",
    "name": "Acme AB",
    "taxCustomerType": "string"
  },
  "environmentLabel": "string",
  "expiresAt": "2026-06-11T09:24:13.418",
  "impersonation": {
    "by": "string",
    "startedAt": "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. When canonicalHost is set, the domain is an old address of the channel: redirect the visitor there permanently (301) instead of serving the shop on the old host.

Show the full description

The answer depends only on the query, so it is cacheable and carries an ETag; follow the Cache-Control header instead of picking your own lifetime for it.

Supports ETag

Query parameters

Field Type
domain string
channel string

Responses

200 ResolveDomainResponse
Field Type Description
canonicalHost string · nullable Host name the channel answers on now, set only when the requested domain is an old address (e.g. acme_web.shop.fluit.cloud after the channel moved to acme-web.shop.fluit.cloud ). Redirect the visitor there permanently. Null for a domain that is the channel's own.
channelCode string · nullable The channel's code. Send it on later calls to address the channel.
channelName string · nullable The channel's name.
tenantId string · nullable The id of the tenant that owns the channel.
304 Not modified — the If-None-Match you sent still matches. No body.
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
{
  "canonicalHost": "string",
  "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.

ChannelLanguageOption

ChannelLanguageOption
Field Type
code string · nullable
name string · nullable
nativeName string · nullable

SessionActionButton

EcomSessionActionButtonResponse
Field Type
label string · nullable
url string · nullable

SessionAnalytics

EcomSessionAnalyticsResponse
Field Type
analyticsEnabled boolean
customHeadScript string · nullable
enhancedConversionsEnabled boolean
facebookPixelId string · nullable
googleAdsConversionId string · nullable
googleAdsPurchaseLabel 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
imageBackground string · nullable
logoUrl string · nullable
primaryColor string · nullable
primaryHoverColor string · nullable
secondaryColor string · nullable
storeName string · nullable
textColor string · nullable

SessionBusinessProfile

EcomSessionBusinessProfileResponse

Företagsuppgifter att visa för besökare.

Field Type Description
city string · nullable Ort.
companyName string · nullable Företagsnamnet. Faller tillbaka på företagets och sist kanalens namn.
countryCode string · nullable Land.
email string · nullable E-postadress.
latitude decimal · nullable Latitud för kartposition och strukturerad data.
longitude decimal · nullable Longitud för kartposition och strukturerad data.
openingHours SessionOpeningHours[] · nullable Öppettiderna, ett block per grupp av veckodagar med samma tider.
organizationNumber string · nullable Organisationsnummer.
phone string · nullable Telefonnummer.
postalCode string · nullable Postnummer.
schemaType string · nullable schema.org-typ för strukturerad data, t.ex. AutoRepair . Tom ger LocalBusiness eller Organization .
showInFooter boolean Visa namn, adress och kontaktuppgifter i sidfoten.
streetAddress string · nullable Gatuadress.

SessionChannel

EcomSessionChannelResponse
Field Type Description
analytics SessionAnalytics
branding SessionBranding
businessProfile SessionBusinessProfile Företagsuppgifter att visa för besökare.
code string · nullable
currency string · nullable
features SessionFeatures
language string · nullable
languages ChannelLanguageOption[] · 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.
productCard SessionProductCard
productModel SessionProductModel
seo SessionSeo Kanalens SEO-standardvärden. Används av storefronten som fallback för sidor som saknar egen meta title/description.
type string · nullable

SessionChrome

EcomSessionChromeResponse
Field Type Description
footerLogoUrl string · nullable Logon i sidfoten. Null ger butikens vanliga logo.
footerNewsletter SessionFooterNewsletter
headerLayout string · nullable "Standard" eller "Inline".
logoSize string · nullable "Small", "Medium" eller "Large".
mobileActionBar SessionMobileActionBar
mobileSearch string · nullable "Row" eller "Icon".
showLogoInFooter boolean Om logon visas i sidfoten.

SessionCustomer

EcomSessionCustomerResponse
Field Type Description
canPlaceOrders boolean Falskt när kontaktens portalgrupper eller rollen Läsare inte ger rätt att lägga order.
email string · nullable Kundens fakturamejl. Tom sträng när kunden saknar ett.
id string · nullable Kundens id.
name string · nullable Kundens namn.
taxCustomerType string · nullable B2C eller B2B. Butiken använder det inte själv — sessionens showPricesIncludingVat är redan avgjort.

SessionFeatures

EcomSessionFeaturesResponse
Field Type
accountRequestPageSlug string · nullable
allowBackorderChoice boolean
allowBackorders boolean
allowCategoryTableView boolean
allowCustomerVatToggle boolean
allowRequestedDeliveryDate boolean
allowVisitorViewToggle boolean
browserAgentToolsEnabled boolean
commerceEnabled boolean
defaultCatalogView string · nullable
enableAddToCartModal boolean
enableChatAssistant boolean
guestCheckout boolean
minimumOrderValue decimal · nullable
productReviewsEnabled boolean
requireLogin boolean
showCrossReferences boolean
showListPriceAndDiscount boolean
showLowestPrice30Days boolean
showOutOfStockProducts boolean
showPricesIncludingVat boolean
showPricesWithoutLogin boolean
showSku boolean
showStock boolean
showStockWithoutLogin 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 Kolumnens länkar i visningsordning.
sortOrder integer Kolumnens plats i sidfoten, lägst först. Kolumnerna kommer redan sorterade.
title string · nullable Kolumnens rubrik.

SessionFooterNewsletter

EcomSessionFooterNewsletterResponse
Field Type
isEnabled boolean
text string · nullable
title string · nullable

SessionImpersonation

EcomSessionImpersonationResponse

Vem som öppnat den här sessionen som kunden.

Field Type
by string · nullable
startedAt string(date-time)

SessionMenuLink

EcomSessionMenuLinkResponse
Field Type Description
children SessionMenuLink[] · nullable Undermeny, en nivå. Tom för länkar i en undermeny och i sidfoten.
label string · nullable
openInNewTab boolean
showAsButton boolean Rita länken som en knapp i sidhuvudet. Bara på toppmenyns översta nivå.
sortOrder integer
url string · nullable

SessionMobileActionBar

EcomSessionMobileActionBarResponse
Field Type Description
buttons SessionActionButton[] · nullable Knapparna i visningsordning, med etikett och adress.
isEnabled boolean Sant bara när raden är påslagen och har minst en knapp.

SessionNavigation

EcomSessionNavigationResponse
Field Type Description
catalogMenuDepth integer Max antal nivåer i katalogmenyn, 1–3.
catalogMenuLabel string · nullable Katalogpostens namn i menyn. Null ger butikens egen översättning av "Produkter".
catalogMenuMode string · nullable Hur katalogmenyn visas i sidhuvudet: "None", "Dropdown" eller "MegaMenu".
catalogMenuSortOrder integer Var katalogposten hamnar bland toppmenyns länkar: 0 först, 1 efter första länken, och så vidare. Större värden än antalet länkar lägger den sist.
catalogRootCategoryId string(uuid) · nullable Kategorin katalogmenyn utgår från. Null visar samtliga toppkategorier.
chrome SessionChrome
footerColumns SessionFooterColumn[] · nullable Sidfotens kolumner i visningsordning.
promiseBar SessionPromiseBar
reservedSlugs string[] · nullable Första segment som butikens egna routes använder. En innehållssida kan aldrig heta så, så allt annat på roten är en sida (se GET /ecom/pages/resolve ).
showCategorySidebar boolean Visa kategorilistan i sidokolumnen på produktlistningssidor.
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 Toppmenyns egna länkar i visningsordning, med undermenyer en nivå ner.

SessionOpeningHours

EcomSessionOpeningHoursResponse
Field Type Description
closes string · nullable Stänger, HH:mm .
days string[] · nullable Veckodagar på engelska, som schema.org skriver dem ( Monday …).
opens string · nullable Öppnar, HH:mm .

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.

SessionProductCard

EcomSessionProductCardResponse
Field Type Description
hover string · nullable "Zoom", "SecondImage" eller "None".
imageFit string · nullable "Cover" eller "Contain".
imageRatio string · nullable "Landscape" (4:3), "Square" (1:1), "Portrait" (4:5) eller "Wide" (3:2).
keySpecRows integer Antal nyckeldata i rutnätets kort, 0–4.
mobileColumns integer Kort per rad i produktlistor på smal skärm, 1 eller 2.
showAddToCart boolean Av: kortet har ingen köpyta och länkar bara till produktsidan.
showBrand boolean Om varumärket visas ovanför produktnamnet.
showCompare boolean Om "Lägg till i jämförelse" visas.
showStock boolean Om lagerstatus och nästa inleverans visas.
showVatNote boolean Om raden "Inkl. moms"/"Exkl. moms" under priset visas.

SessionProductModel

EcomSessionProductModelResponse
Field Type Description
placement string · nullable "Off" (bara foton), "First" (3D före fotona) eller "AfterPhotos".
rotation string · nullable "Free" (modellens kameraregler) eller "Limited" (framifrån, en kvarts varv åt vardera hållet).
sceneSwitch boolean Om kunden får byta miljö bland dem modellen tillåter.

SessionPromiseBar

EcomSessionPromiseBarResponse
Field Type Description
isEnabled boolean Om butiken har slagit på raden.
items SessionPromiseBarItem[] · nullable Löftena i visningsordning. Tom lista när butiken inte fyllt i några — raden ritas då inte alls, oavsett IsEnabled.
narrowBehavior string · nullable "Scroll" eller "Rotate".
tone string · nullable "Ink", "Brand" eller "Accent".

SessionPromiseBarItem

EcomSessionPromiseBarItemResponse
Field Type Description
icon string · nullable Ikonnamn ur butikens kurerade set, eller null.
text string · nullable Löftet som besökaren läser det.

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