Hoppa till innehållet

Channels

The storefronts a tenant runs, and the home page each one presents. A channel owns its assortment, price list, currency and branding, so the same item can be published in two channels at different prices.

4 calls PATCH POST 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.

PATCH /branding

Update channel branding

Updates the custom CSS and theme fields (colors, fonts, border radius) for the current channel's branding. Only fields present in the body are changed; null clears a field.

Show the full description

Requires the X-Channel header and a valid X-Admin-Preview token for the same tenant and channel. The CSS is sanitised before it is stored, so the value in the response is what was actually saved and may differ from what was sent.

Body required

Field Type
accentColor string · nullable
accentHoverColor string · nullable
backgroundColor string · nullable
borderRadius string · nullable
customCss string · nullable
fontBody string · nullable
fontHeading string · nullable
footerBackgroundColor string · nullable
footerTextColor string · nullable
headerBackgroundColor string · nullable
headerTextColor string · nullable
imageBackground string · nullable
primaryColor string · nullable
primaryHoverColor string · nullable
textColor string · nullable

Responses

200 PatchChannelBrandingCssPatchBrandingCssResponse
Field Type Description
customCss string · nullable CSS:en som faktiskt lagrades, efter sanering.
success boolean Sant när CSS:en sparades.
415 ProblemDetails Unsupported Media Type
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type 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: 400 401 404 Errors

Examples

curl
curl -X PATCH "https://api.erp.fluit.cloud/ecom/branding" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web" \
  -H "Content-Type: application/json" \
  -d @body.json
Response 200
{
  "customCss": "string",
  "success": true
}

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.

POST /branding/ai-suggest

Suggest branding CSS for an element

Proposes custom CSS for one element of the storefront, given the channel's current branding and a description of what to change, and streams the suggestion as server-sent events.

Show the full description

It only proposes — PATCH /ecom/branding is what stores anything. Part of the in-store admin overlay and gated by the same admin preview token, so it is not an endpoint a storefront calls on a visitor's behalf.

Body required

Field Type
brandingContext BrandingAiSuggestBrandingContextDto
currentCss string · nullable
prompt string · nullable
selectedElements BrandingAiSuggestElementInfoDto[] · nullable

Responses

200 Empty body.

Standard errors: 400 429 Errors

Examples

curl
curl -X POST "https://api.erp.fluit.cloud/ecom/branding/ai-suggest" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web" \
  -H "Content-Type: application/json" \
  -d @body.json

Base URL https://api.erp.fluit.cloud/ecom.

GET /channels

List available channels

Returns a list of available channels from DomainMappings. No authentication or tenant context required.

Responses

200 ChannelInfoResponse[]
Field Type
code Required string · nullable
currency Required string · nullable
logoUrl string · nullable
name Required string · nullable
type Required 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.

Examples

curl
curl "https://api.erp.fluit.cloud/ecom/channels" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web"
Response 200
[
  {
    "code": "string",
    "currency": "string",
    "logoUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
    "name": "Acme AB",
    "type": "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 /homepage

Get home page configuration

Returns the channel's home page: its visible sections (banners filtered by date, section collections expanded, forms with their fields) and its SEO fields. The home page is also available as the page at path / through GET /ecom/pages/resolve.

Responses

200 HomePageResponse
Field Type Description
fullWidth boolean
isPreview boolean Svaret är en adminförhandsvisning av ett utkast.
layout string · nullable
metaDescription string · nullable Metabeskrivning; tom betyder kanalens.
noIndex boolean Be sökmotorerna att inte indexera startsidan.
ogImageUrl string · nullable Bild vid delning; tom betyder sidans första herobild eller logotypen.
sections ContentPageSection[] · nullable
seoTitle string · nullable Titel i sökresultat; tom betyder kanalens metatitel.
title string · nullable Startsidans titel (för administrationen; butiken visar den inte som rubrik).
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/homepage" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web"
Response 200
{
  "fullWidth": true,
  "isPreview": true,
  "layout": "string",
  "metaDescription": "string",
  "noIndex": true,
  "ogImageUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
  "sections": [
    {
      "alignment": "string",
      "anchor": "string",
      "articleLinkText": "string",
      "articleType": "string",
      "bannerImageUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
      "bannerLinkUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
      "buttons": [
        {
          "label": "string",
          "openInNewTab": true,
          "url": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
          "variant": "string"
        }
      ],
      "cardColumns": 42,
      "cardVariant": "string",
      "categoryColumns": 42,
      "categoryId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "categoryIds": [
        "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44"
      ],
      "categoryImageAspect": "string",
      "categoryLayout": "string",
      "contact": {
        "directionsUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
        "mapImageUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
        "showAddress": true,
        "showEmail": true,
        "showOpeningHours": true,
        "showPhone": true
      },
      "cssClass": "string",
      "custom": {
        "blockKey": "string",
        "blockVersion": 42,
        "css": "string",
        "fields": null,
        "html": "string",
        "useShell": true
      },
      "embed": {
        "height": 42,
        "title": "string",
        "url": "https://cdn.fluit.cloud/assets/widget-a-front.jpg"
      },
      "eyebrow": "string",
      "faq": {
        "items": [
          {
            "answerHtml": "string",
            "question": "string"
          }
        ]
      },
      "featureCards": [
        {
          "iconName": "Width",
          "imageAlt": "string",
          "imageUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
          "linkText": "string",
          "linkUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
          "text": "string",
          "title": "string"
        }
      ],
      "form": {
        "aside": "string",
        "asideHtml": "string",
        "consentText": "string",
        "description": "string",
        "fields": [
          {
            "fieldType": "string",
            "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
            "isRequired": true,
            "label": "string",
            "mapTo": "string",
            "options": [],
            "placeholder": "string"
          }
        ],
        "formToken": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
        "name": "Acme AB",
        "redirectUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
        "successMessage": "string"
      },
      "galleryImages": [
        {
          "altText": "string",
          "caption": "string",
          "imageUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
          "linkUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg"
        }
      ],
      "heroCtaText": "string",
      "heroCtaUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
      "heroHeight": "string",
      "heroImageCaption": "string",
      "heroImageUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
      "heroLayout": "string",
      "heroPortraitText": "string",
      "heroPortraitUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
      "heroTextColor": "string",
      "heroVideoPosterUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
      "heroVideoUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
      "htmlContent": "string",
      "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "itemGroupId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "lead": "string",
      "logos": {
        "grayscale": true,
        "items": [
          {
            "altText": "string",
            "imageUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
            "linkUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg"
          }
        ],
        "size": "string"
      },
      "maxBrands": 42,
      "maxProducts": 42,
      "mediaText": {
        "altText": "string",
        "bodyHtml": "string",
        "mediaAspect": "string",
        "mediaPosition": "string",
        "mediaUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
        "videoUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg"
      },
      "narrowText": true,
      "parentCategoryId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "productColumns": 42,
      "productIds": [
        "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44"
      ],
      "productSort": "string",
      "productSpotlight": {
        "altText": "string",
        "badge": "string",
        "bodyHtml": "string",
        "documentCategory": "string",
        "documentIds": [
          "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44"
        ],
        "documents": "string",
        "layout": "string",
        "mediaPosition": "string",
        "mediaUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
        "productId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
        "showAddToCart": true,
        "showKeySpecs": true,
        "showPrice": true,
        "showStock": true
      },
      "showProductCount": true,
      "sortOrder": 42,
      "spacing": "string",
      "subtitle": "string",
      "supplierIds": [
        "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44"
      ],
      "testimonials": [
        {
          "author": "string",
          "avatarUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
          "quote": "string",
          "rating": 42,
          "role": "string"
        }
      ],
      "timeline": {
        "layout": "string",
        "marker": "string",
        "steps": [
          {
            "alternatives": [],
            "bodyHtml": "string",
            "buttons": [],
            "iconName": "Acme AB",
            "title": "string"
          }
        ]
      },
      "title": "string",
      "tone": "string",
      "twoColumns": true,
      "type": "string",
      "videoUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg"
    }
  ],
  "seoTitle": "string",
  "title": "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.

BrandingAiSuggestBrandingContextDto

EcomBrandingAiSuggestBrandingContextDto
Field Type
accentColor string · nullable
borderRadius string · nullable
fontBody string · nullable
fontHeading string · nullable
primaryColor string · nullable

BrandingAiSuggestElementInfoDto

EcomBrandingAiSuggestElementInfoDto
Field Type
classNames string[] · nullable
computedStyles object · nullable
selector string · nullable
tagName string · nullable

ContentPageSection

ContentPageSectionResponse

En sektion i ett sidsvar. Samma form för startsidan och innehållssidorna.

Field Type Description
alignment string · nullable Rubrikdelens justering: `Left` eller `Center`.
anchor string · nullable HTML-id för länkar direkt till sektionen (`#ankare`).
articleLinkText string · nullable
articleType string · nullable
bannerImageUrl string · nullable
bannerLinkUrl string · nullable
buttons SectionButton[] · nullable Knappar under rubrikdelen. Länkar till sidor har redan fått sidans aktuella adress.
cardColumns integer Antal kolumner för korten; noll betyder att storefronten väljer.
cardVariant string · nullable Hur korten ritas: `Icon`, `ImageTop`, `ImageLeft` eller `Figure`.
categoryColumns integer Antal kolumner för kategorierna på bred skärm (2–6); noll betyder att storefronten väljer.
categoryId string(uuid) · nullable
categoryIds string(uuid)[] · nullable
categoryImageAspect string · nullable Bildformatet för `Tile` och `Card`: `Portrait` (3:4), `Square` eller `Landscape` (4:3).
categoryLayout string · nullable Hur kategorierna ritas: `Badge`, `Tile` eller `Card`.
contact SectionContact
cssClass string · nullable
custom SectionCustom Ett eget block, ritat på servern.
embed SectionEmbed En `Embed`-sektion: en extern sida i en ram. `url` är alltid en absolut https-adress, `title` ramens tillgängliga namn och `height` höjden i pixlar.
eyebrow string · nullable Liten versal rad ovanför rubriken.
faq SectionFaq
featureCards ContentPageSectionFeatureCard[] · nullable
form SectionForm Ett formulär som ska ritas i sidan. Skicka in det med `POST /ecom/forms/{formToken}/submissions`.
galleryImages ContentPageSectionImage[] · nullable
heroCtaText string · nullable
heroCtaUrl string · nullable
heroHeight string · nullable Höjden på en hero med bakgrundsbild: Compact, Normal, Tall eller Full.
heroImageCaption string · nullable
heroImageUrl string · nullable
heroLayout string · nullable
heroPortraitText string · nullable
heroPortraitUrl string · nullable
heroTextColor string · nullable
heroVideoPosterUrl string · nullable
heroVideoUrl string · nullable
htmlContent string · nullable
id string(uuid)
itemGroupId string(uuid) · nullable
lead string · nullable Ingress i ett textblock.
logos SectionLogos
maxBrands integer
maxProducts integer
mediaText SectionMediaText
narrowText boolean Smal textspalt.
parentCategoryId string(uuid) · nullable
productColumns integer
productIds string(uuid)[] · nullable
productSort string · nullable
productSpotlight SectionProductSpotlight En `ProductSpotlight`-sektion: en artikel presenterad stort. `layout` är `SideBySide`, `Banner` eller `Row`, `mediaPosition``Left` eller `Right`, och `documents``None`, `Selected` eller `Category`. Vid `Selected` listas `documentIds`, vid `Category` artikelns alla dokument i `documentCategory`; båda finns i produktsvarets `documents`.
showProductCount boolean Visa antalet produkter under kategorins namn.
sortOrder integer
spacing string · nullable Luft ovanför och under: `Normal`, `Compact` eller `Spacious`.
subtitle string · nullable
supplierIds string(uuid)[] · nullable
testimonials ContentPageSectionTestimonial[] · nullable
timeline SectionTimeline
title string · nullable
tone string · nullable Bakgrund ur kanalens branding: `Default`, `Muted`, `Ink`, `Brand` eller `Accent`.
twoColumns boolean Bryt brödtexten i två spalter på bred skärm.
type string · nullable
videoUrl string · nullable

ContentPageSectionFeatureCard

ContentPageSectionFeatureCardResponse
Field Type Description
iconName string · nullable
imageAlt string · nullable Alt-text för kortets bild.
imageUrl string · nullable Kortets bild, när sektionen ritar kort med bild.
linkText string · nullable
linkUrl string · nullable
text string · nullable
title string · nullable

ContentPageSectionImage

ContentPageSectionImageResponse
Field Type
altText string · nullable
caption string · nullable
imageUrl string · nullable
linkUrl string · nullable

ContentPageSectionTestimonial

ContentPageSectionTestimonialResponse
Field Type
author string · nullable
avatarUrl string · nullable
quote string · nullable
rating integer · nullable
role string · nullable

FormField

EcomFormFieldResponse

Ett fält i ett formulär. `fieldType` är `Text`, `Email`, `Phone`, `Number`, `TextArea`, `Select`, `Checkbox` eller `File`. Svaret skickas med fältets `id` som nyckel.

Field Type
fieldType string · nullable
id string(uuid)
isRequired boolean
label string · nullable
mapTo string · nullable
options string[] · nullable
placeholder string · nullable

SectionButton

EcomSectionButtonResponse
Field Type
label string · nullable
openInNewTab boolean
url string · nullable
variant string · nullable

SectionContact

EcomSectionContactResponse
Field Type
directionsUrl string · nullable
mapImageUrl string · nullable
showAddress boolean
showEmail boolean
showOpeningHours boolean
showPhone boolean

SectionCustom

EcomSectionCustomResponse

Ett eget block, ritat på servern.

Field Type Description
blockKey string · nullable Blockets nyckel. HTML:en ska ligga i ett element med `data-block="{blockKey}"`, som CSS:en är scopad till.
blockVersion integer Blocktypens publicerade version. Noll när en förhandsvisning ritar ett block som aldrig publicerats; i en förhandsvisning är innehållet blockets utkast, som är nyare än versionen.
css string · nullable Blockets CSS, där varje regel börjar med `[data-block="{blockKey}"]`. Samma för alla sektioner med samma block och version — lägg den en gång per sida.
fields object · nullable Fälten som data, nycklat på fältens nycklar, för den som vill rita blocket själv.
html string · nullable Blockets HTML, redan tvättad på servern. Tvätta den ändå innan den ritas.
useShell boolean Om blocket ritas i standardomslaget, med sektionens `eyebrow`, `title`, `subtitle`, `buttons`, `tone` och `spacing`. Utan omslaget ritar HTML:en allt själv.

SectionEmbed

EcomSectionEmbedResponse

En `Embed`-sektion: en extern sida i en ram. `url` är alltid en absolut https-adress, `title` ramens tillgängliga namn och `height` höjden i pixlar.

Field Type
height integer
title string · nullable
url string · nullable

SectionFaqItem

EcomSectionFaqItemResponse
Field Type
answerHtml string · nullable
question string · nullable

SectionForm

EcomSectionFormResponse

Ett formulär som ska ritas i sidan. Skicka in det med `POST /ecom/forms/{formToken}/submissions`.

Field Type
aside string · nullable
asideHtml string · nullable
consentText string · nullable
description string · nullable
fields FormField[] · nullable
formToken string(uuid)
name string · nullable
redirectUrl string · nullable
successMessage string · nullable

SectionLogo

EcomSectionLogoResponse
Field Type
altText string · nullable
imageUrl string · nullable
linkUrl string · nullable

SectionLogos

EcomSectionLogosResponse
Field Type
grayscale boolean
items SectionLogo[] · nullable
size string · nullable

SectionMediaText

EcomSectionMediaTextResponse
Field Type
altText string · nullable
bodyHtml string · nullable
mediaAspect string · nullable
mediaPosition string · nullable
mediaUrl string · nullable
videoUrl string · nullable

SectionProductSpotlight

EcomSectionProductSpotlightResponse

En `ProductSpotlight`-sektion: en artikel presenterad stort. `layout` är `SideBySide`, `Banner` eller `Row`, `mediaPosition``Left` eller `Right`, och `documents``None`, `Selected` eller `Category`. Vid `Selected` listas `documentIds`, vid `Category` artikelns alla dokument i `documentCategory`; båda finns i produktsvarets `documents`.

Field Type
altText string · nullable
badge string · nullable
bodyHtml string · nullable
documentCategory string · nullable
documentIds string(uuid)[] · nullable
documents string · nullable
layout string · nullable
mediaPosition string · nullable
mediaUrl string · nullable
productId string(uuid)
showAddToCart boolean
showKeySpecs boolean
showPrice boolean
showStock boolean

SectionTimeline

EcomSectionTimelineResponse
Field Type
layout string · nullable
marker string · nullable
steps SectionTimelineStep[] · nullable

SectionTimelineOption

EcomSectionTimelineOptionResponse
Field Type
bodyHtml string · nullable
buttons SectionButton[] · nullable
title string · nullable

SectionTimelineStep

EcomSectionTimelineStepResponse
Field Type
alternatives SectionTimelineOption[] · nullable
bodyHtml string · nullable
buttons SectionButton[] · nullable
iconName string · nullable
title string · nullable