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.

10 anrop GET DELETE POST PATCH 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.

Svar

200 EcomCartResponse
Fält Typ
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 integer
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 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"
Svar 200
{
  "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": 42,
      "cartItemId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "discountAmount": "299.00",
      "discountPercent": "12.50",
      "imageUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
      "isCustomerSpecific": true,
      "itemId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "itemNumber": "WIDGET-A",
      "lineTotal": "299.00",
      "lineTotalIncludingTax": "299.00",
      "mpn": "string",
      "name": "Widget A",
      "note": "string",
      "quantity": 42,
      "slug": "string",
      "stockStatus": "InStock",
      "taxAmount": "299.00",
      "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": 42,
  "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

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.

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.

Body krävs

Fält Typ Beskrivning
itemId string(uuid)
note string · nullable
quantity integer
selections ConfigurationSelection[] · nullable Konfigurationsvalen, för en produkt vars `isConfigurable` är sann. Hämta fälten från `GET /ecom/catalog/products/{idOrSlug}/configuration`.

Svar

200 AddToCartResponse
Fält Typ
cartId string(uuid)
totalItems integer
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": 42,
  "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
quantity integer

Svar

200 UpdateCartItemQuantityResponse
Fält Typ
cartId string(uuid)
totalItems integer
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": 42,
  "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 integer
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": 42,
  "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 integer
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": 42
    }
  ],
  "totalItems": 42,
  "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
quantity integer

Svar

200 UpdateCartItemQuantityResponse
Fält Typ
cartId string(uuid)
totalItems integer
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": 42,
  "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 integer
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": 42,
  "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 integer

AddCartLineFailure

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

CartItem

EcomCartItemResponse
Fält Typ Beskrivning
addedAt string(date-time)
availableQuantity integer · nullable
cartItemId string(uuid)
discountAmount decimal
discountPercent decimal
imageUrl string · nullable
isCustomerSpecific boolean
itemId string(uuid)
itemNumber string · nullable
lineTotal decimal
lineTotalIncludingTax decimal
mpn string · nullable
name string · nullable
note string · nullable
quantity integer
slug string · nullable
stockStatus enum InStock LowStock OutOfStock BackOrder
taxAmount decimal
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