Hoppa till innehållet

Varukorg

The cart hangs off the session, so there is no cart id to pass around. Anonymous sessions have carts too, and the cart survives signing in.

11 anrop GET DELETE PATCH POST Bas-URL https://api.erp.fluit.cloud/ecom

Autentisering, felkoder, rate limits, idempotens och paginering gäller alla anrop och står samlade under Kom igång.

GET /cart

Get shopping cart

Returns the current shopping cart contents with product details. Pass shippingCountry (ISO 3166-1 alpha-2) once the shopper has chosen where to ship: VAT is then calculated for that country, the same way the order will be. Without it, VAT follows the logged-in customer's country, or the store's own country for a guest.

Frågeparametrar

Fält Typ
shippingCountry string

Headers

Fält Typ Beskrivning
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.

Svar

200 EcomCartResponse
Fält Typ
buyerVat CartBuyerVat
currency string · nullable
expiresAt string(date-time)
id string(uuid)
isTaxEnabled boolean
items CartItem[] · nullable
lineDiscountAmount decimal
orderDiscountAmount decimal
subTotal decimal
subTotalBeforeDiscount decimal
taxAmount decimal
taxPercent decimal
taxReduction CartTaxReduction
totalIncludingTax decimal
totalItems decimal
uniqueItemCount integer
vatTreatment 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.

Standardfel: 401 Felhantering

Exempel

curl
curl "https://api.erp.fluit.cloud/ecom/cart" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web" \
  -H "X-Language: …"
Svar 200
{
  "buyerVat": {
    "checkedAt": "2026-06-11T09:24:13.418",
    "registeredName": "Acme AB",
    "status": "NoNumber",
    "vatNumber": "ABC-001"
  },
  "currency": "string",
  "expiresAt": "2026-06-11T09:24:13.418",
  "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "isTaxEnabled": true,
  "items": [
    {
      "addedAt": "2026-06-11T09:24:13.418",
      "availableQuantity": "10",
      "baseQuantity": "10",
      "baseUnit": "string",
      "cartItemId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "componentAvailability": {
        "allInStock": true,
        "expectedDate": "2026-06-11"
      },
      "conversionFactor": "299.00",
      "discountAmount": "299.00",
      "discountPercent": "12.50",
      "imageUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
      "isCustomerSpecific": true,
      "isMadeToOrder": true,
      "itemId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "itemNumber": "WIDGET-A",
      "leadTimeDays": 42,
      "lineTotal": "299.00",
      "lineTotalIncludingTax": "299.00",
      "madeToOrderText": "string",
      "mpn": "string",
      "name": "Widget A",
      "note": "string",
      "quantity": "10",
      "slug": "string",
      "stockStatus": "InStock",
      "taxAmount": "299.00",
      "unit": "st",
      "unitPrice": "299.00"
    }
  ],
  "lineDiscountAmount": "299.00",
  "orderDiscountAmount": "299.00",
  "subTotal": "299.00",
  "subTotalBeforeDiscount": "299.00",
  "taxAmount": "299.00",
  "taxPercent": "12.50",
  "taxReduction": {
    "requiresProperty": true,
    "schemes": [
      {
        "amount": "299.00",
        "basis": "299.00",
        "code": "string",
        "name": "Acme AB"
      }
    ],
    "total": "299.00"
  },
  "totalIncludingTax": "299.00",
  "totalItems": "299.00",
  "uniqueItemCount": 42,
  "vatTreatment": "string"
}

Bas-URL https://api.erp.fluit.cloud/ecom. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

DELETE /cart

Clear shopping cart

Removes all items from the shopping cart.

Svar

204 Tom 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.

Standardfel: 401 404 Felhantering

Exempel

curl
curl -X DELETE "https://api.erp.fluit.cloud/ecom/cart" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web"

Bas-URL https://api.erp.fluit.cloud/ecom.

PATCH /cart/buyer-vat

Set and check the buyer's VAT number

Sets the VAT number a guest entered in the checkout and checks it against the EU's VIES register straight away. The result is kept on the cart: once the number is confirmed (status Valid), the cart, shipping prices and payment basket are calculated without VAT when the goods go to another EU country (reverse charge).

Visa hela beskrivningen

When VIES does not answer in time the status is Unavailable and the purchase continues with VAT. An empty number removes it. A logged-in customer's number is kept on the customer and cannot be set here (409).

Body krävs

Fält Typ
vatNumber string · nullable

Svar

200 CartBuyerVatResponse
Fält Typ Beskrivning
checkedAt string(date-time) · nullable
registeredName string · nullable
status enum NoNumber Pending Valid Invalid Unavailable ManuallyApproved OutsideEu WrongCountry
vatNumber string · nullable

Standardfel: 400 401 404 409 429 Felhantering

Exempel

curl
curl -X PATCH "https://api.erp.fluit.cloud/ecom/cart/buyer-vat" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web" \
  -H "Content-Type: application/json" \
  -d @body.json
Svar 200
{
  "checkedAt": "2026-06-11T09:24:13.418",
  "registeredName": "Acme AB",
  "status": "NoNumber",
  "vatNumber": "ABC-001"
}

Bas-URL https://api.erp.fluit.cloud/ecom. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

POST /cart/items

Add item to cart

Adds an item to the shopping cart, or increases the quantity when the same item is already there. A configurable product must be sent with selections: its price comes from the choices, and a made-to-order product without them cannot be manufactured.

Visa hela beskrivningen

Two lines of the same product merge only when their configuration is identical — two differently configured curtains are two different goods and stay two lines, each addressable by its own cart item id. A product whose units list has more than one entry can be bought in any of them: send the unit code as unit and the quantity in that unit (3 with unit 2P is three 2-packs). Without unit the quantity is in the product's base unit, as before. The quantity may have as many decimals as the unit's decimalPlaces . The same product in two units stays two lines. Stock, price tiers and discounts count in the base unit. A product sold as individuals (soldAsIndividuals) is bought one individual at a time: send serialNumberId from the product's individuals, quantity 1. The individual is held for the cart for 30 minutes and disappears from the catalog meanwhile; adding it again renews the hold.

Body krävs

Fält Typ Beskrivning
itemId string(uuid) Produktens id.
note string · nullable Kundens notering för raden. Läggs produkten redan i varukorgen ersätter en angiven notering den gamla; utelämnad behåller den.
quantity decimal Antal i Unit, eller i basenheten när ingen enhet anges.
selections ConfigurationSelection[] · nullable Konfigurationsvalen, för en produkt vars isConfigurable är sann. Hämta fälten från GET /ecom/catalog/products/{idOrSlug}/configuration .
serialNumberId string(uuid) · nullable Individen som köps, för en produkt som säljs per individ. Hämtas från produktens individuals .
unit string · nullable Enhetskoden ur produktens units , t.ex. en förpackning. Utelämnad = basenheten.

Svar

200 AddToCartResponse
Fält Typ
cartId string(uuid)
totalItems decimal
uniqueItemCount integer
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.

Standardfel: 400 401 Felhantering

Exempel

curl
curl -X POST "https://api.erp.fluit.cloud/ecom/cart/items" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web" \
  -H "Content-Type: application/json" \
  -d @body.json
Svar 200
{
  "cartId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "totalItems": "299.00",
  "uniqueItemCount": 42
}

Bas-URL https://api.erp.fluit.cloud/ecom. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

PATCH /cart/items/{itemId}

Update cart item quantity

Updates the quantity of an item in the shopping cart. Answers 409 Cart.AmbiguousItem when the item lies on several lines (a configurable item with different configurations); address the line through /ecom/cart/lines/{cartItemId} instead.

Sökvägsparametrar

Fält Typ
itemId Krävs string(uuid)

Body krävs

Fält Typ Beskrivning
quantity decimal Nytt antal, i radens enhet ( unit på korgraden).

Svar

200 UpdateCartItemQuantityResponse
Fält Typ
cartId string(uuid)
totalItems decimal
uniqueItemCount integer
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.

Standardfel: 400 401 404 409 Felhantering

Exempel

curl
curl -X PATCH "https://api.erp.fluit.cloud/ecom/cart/items/{itemId}" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web" \
  -H "Content-Type: application/json" \
  -d @body.json
Svar 200
{
  "cartId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "totalItems": "299.00",
  "uniqueItemCount": 42
}

Bas-URL https://api.erp.fluit.cloud/ecom. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

DELETE /cart/items/{itemId}

Remove item from cart

Removes an item from the shopping cart. Answers 409 Cart.AmbiguousItem when the item lies on several lines (a configurable item with different configurations); address the line through /ecom/cart/lines/{cartItemId} instead.

Sökvägsparametrar

Fält Typ
itemId Krävs string(uuid)

Svar

200 RemoveFromCartResponse
Fält Typ
cartId string(uuid)
totalItems decimal
uniqueItemCount integer
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.

Standardfel: 401 404 409 Felhantering

Exempel

curl
curl -X DELETE "https://api.erp.fluit.cloud/ecom/cart/items/{itemId}" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web"
Svar 200
{
  "cartId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "totalItems": "299.00",
  "uniqueItemCount": 42
}

Bas-URL https://api.erp.fluit.cloud/ecom. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

POST /cart/lines

Add several lines to the cart

Adds several items to the cart for the signed-in customer, as quick order and reorder do. Each line passes the same checks as POST /ecom/cart/items: publication, stock limit, backorder rule and price.

Visa hela beskrivningen

A line that fails does not stop the others; it is returned in 'failed' with its error code. The same item on two lines is added as one line with the sum.

Body krävs

Fält Typ
lines AddCartLine[] · nullable

Svar

200 AddLinesToCartResponse
Fält Typ
addedLineCount integer
cartId string(uuid) · nullable
failed AddCartLineFailure[] · nullable
totalItems decimal
uniqueItemCount integer
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.

Standardfel: 400 401 403 Felhantering

Exempel

curl
curl -X POST "https://api.erp.fluit.cloud/ecom/cart/lines" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web" \
  -H "Content-Type: application/json" \
  -d @body.json
Svar 200
{
  "addedLineCount": 42,
  "cartId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "failed": [
    {
      "code": "string",
      "itemId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "message": "string",
      "quantity": "10",
      "unit": "st"
    }
  ],
  "totalItems": "299.00",
  "uniqueItemCount": 42
}

Bas-URL https://api.erp.fluit.cloud/ecom. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

PATCH /cart/lines/{cartItemId}

Update cart line quantity

Updates the quantity of one cart line, addressed by its cartItemId from GET /ecom/cart. Use this rather than PATCH /ecom/cart/items/{itemId}: a configurable item can lie on several lines with different configurations.

Sökvägsparametrar

Fält Typ
cartItemId Krävs string(uuid)

Body krävs

Fält Typ Beskrivning
quantity decimal Nytt antal, i radens enhet ( unit på korgraden).

Svar

200 UpdateCartItemQuantityResponse
Fält Typ
cartId string(uuid)
totalItems decimal
uniqueItemCount integer
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.

Standardfel: 400 401 404 Felhantering

Exempel

curl
curl -X PATCH "https://api.erp.fluit.cloud/ecom/cart/lines/{cartItemId}" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web" \
  -H "Content-Type: application/json" \
  -d @body.json
Svar 200
{
  "cartId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "totalItems": "299.00",
  "uniqueItemCount": 42
}

Bas-URL https://api.erp.fluit.cloud/ecom. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

DELETE /cart/lines/{cartItemId}

Remove cart line

Removes one cart line, addressed by its cartItemId from GET /ecom/cart. Use this rather than DELETE /ecom/cart/items/{itemId}: a configurable item can lie on several lines with different configurations.

Sökvägsparametrar

Fält Typ
cartItemId Krävs string(uuid)

Svar

200 RemoveFromCartResponse
Fält Typ
cartId string(uuid)
totalItems decimal
uniqueItemCount integer
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.

Standardfel: 401 404 Felhantering

Exempel

curl
curl -X DELETE "https://api.erp.fluit.cloud/ecom/cart/lines/{cartItemId}" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web"
Svar 200
{
  "cartId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "totalItems": "299.00",
  "uniqueItemCount": 42
}

Bas-URL https://api.erp.fluit.cloud/ecom. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

POST /portal/quick-order/resolve

Resolve quick order lines

Looks up quick order lines for the signed-in customer without adding anything to the cart. One line per item: a reference followed by a quantity, separated by space, tab or semicolon.

Visa hela beskrivningen

The reference can be the customer's own item number, our item number, a barcode or a cross reference; the customer's item number wins and its unit is converted. Lines that cannot be ordered are returned in 'rejected' with a reason. Add the resolved lines with POST /ecom/cart/lines.

Body krävs

Fält Typ Beskrivning
text string · nullable En artikel per rad: referens följt av antal.

Svar

200 QuickOrderResponse
Fält Typ
currencyCode string · nullable
lines QuickOrderLine[] · nullable
rejected QuickOrderRejectedLine[] · 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.

Standardfel: 400 401 403 Felhantering

Exempel

curl
curl -X POST "https://api.erp.fluit.cloud/ecom/portal/quick-order/resolve" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web" \
  -H "Content-Type: application/json" \
  -d @body.json
Svar 200
{
  "currencyCode": "SEK",
  "lines": [
    {
      "customerUnit": "string",
      "itemId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "itemName": "Widget A",
      "itemNumber": "WIDGET-A",
      "lineNumber": 1,
      "matchedField": "string",
      "quantity": "10",
      "reference": "PO-2026-042",
      "requestedQuantity": "10",
      "unit": "st",
      "unitPrice": "299.00"
    }
  ],
  "rejected": [
    {
      "lineNumber": 1,
      "reason": "string",
      "reference": "PO-2026-042",
      "requestedQuantity": "10"
    }
  ]
}

Bas-URL https://api.erp.fluit.cloud/ecom. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

POST /portal/quick-order/resolve-file

Resolve quick order lines from a file

Same as POST /ecom/portal/quick-order/resolve, from an uploaded file in the 'file' field: CSV or text in the same line format, or Excel (.xlsx) with the columns Artikelnummer and Antal. At most 2 MB and 500 lines.

Svar

200 QuickOrderResponse
Fält Typ
currencyCode string · nullable
lines QuickOrderLine[] · nullable
rejected QuickOrderRejectedLine[] · 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.

Standardfel: 400 401 403 Felhantering

Exempel

curl
curl -X POST "https://api.erp.fluit.cloud/ecom/portal/quick-order/resolve-file" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web" \
  -H "Content-Type: application/json" \
  -d @body.json
Svar 200
{
  "currencyCode": "SEK",
  "lines": [
    {
      "customerUnit": "string",
      "itemId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "itemName": "Widget A",
      "itemNumber": "WIDGET-A",
      "lineNumber": 1,
      "matchedField": "string",
      "quantity": "10",
      "reference": "PO-2026-042",
      "requestedQuantity": "10",
      "unit": "st",
      "unitPrice": "299.00"
    }
  ],
  "rejected": [
    {
      "lineNumber": 1,
      "reason": "string",
      "reference": "PO-2026-042",
      "requestedQuantity": "10"
    }
  ]
}

Bas-URL https://api.erp.fluit.cloud/ecom. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

Scheman

Objekten som gruppens anrop refererar till. Fälttabellerna ovan går ett steg djupt och länkar hit i stället för att upprepa samma schema på varje endpoint.

AddCartLine

AddCartLineInput
Fält Typ
itemId string(uuid)
quantity decimal
unit string · nullable

AddCartLineFailure

AddCartLineFailure
Fält Typ
code string · nullable
itemId string(uuid)
message string · nullable
quantity decimal
unit string · nullable

CartBuyerVat

CartBuyerVatResponse
Fält Typ Beskrivning
checkedAt string(date-time) · nullable
registeredName string · nullable
status enum NoNumber Pending Valid Invalid Unavailable ManuallyApproved OutsideEu WrongCountry
vatNumber string · nullable

CartComponentAvailability

CartComponentAvailability
Fält Typ
allInStock boolean
expectedDate string(date) · nullable

CartItem

EcomCartItemResponse
Fält Typ Beskrivning
addedAt string(date-time)
availableQuantity decimal · nullable
baseQuantity decimal
baseUnit string · nullable
cartItemId string(uuid)
componentAvailability CartComponentAvailability
conversionFactor decimal
discountAmount decimal
discountPercent decimal
imageUrl string · nullable
isCustomerSpecific boolean
isMadeToOrder boolean
itemId string(uuid)
itemNumber string · nullable
leadTimeDays integer · nullable
lineTotal decimal
lineTotalIncludingTax decimal
madeToOrderText string · nullable
mpn string · nullable
name string · nullable
note string · nullable
quantity decimal
slug string · nullable
stockStatus enum InStock LowStock OutOfStock BackOrder
taxAmount decimal
unit string · nullable
unitPrice decimal

CartTaxReduction

CartTaxReductionResponse
Fält Typ
requiresProperty boolean
schemes CartTaxReductionScheme[] · nullable
total decimal

CartTaxReductionScheme

CartTaxReductionScheme
Fält Typ
amount decimal
basis decimal
code string · nullable
name string · nullable

ConfigurationSelection

ConfigurationSelectionInput
Fält Typ
boolean boolean · nullable
fieldId string(uuid)
number decimal · nullable
optionId string(uuid) · nullable
selectedItemId string(uuid) · nullable
text string · nullable

QuickOrderLine

QuickOrderLineResponse
Fält Typ
customerUnit string · nullable
itemId string(uuid)
itemName string · nullable
itemNumber string · nullable
lineNumber integer
matchedField string · nullable
quantity decimal
reference string · nullable
requestedQuantity decimal
unit string · nullable
unitPrice decimal · nullable

QuickOrderRejectedLine

QuickOrderRejectedLineResponse
Fält Typ
lineNumber integer
reason string · nullable
reference string · nullable
requestedQuantity decimal · nullable