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.

5 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
expiresAt string(date-time)
id string(uuid)
isTaxEnabled boolean
items CartItem[] · nullable
subTotal decimal
taxAmount decimal
taxPercent decimal
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
{
  "expiresAt": "2026-06-11T09:24:13.418",
  "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "isTaxEnabled": true,
  "items": [
    {
      "addedAt": "2026-06-11T09:24:13.418",
      "imageUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
      "itemId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "itemNumber": "WIDGET-A",
      "lineTotal": "299.00",
      "lineTotalIncludingTax": "299.00",
      "name": "Widget A",
      "note": "string",
      "quantity": 42,
      "slug": "string",
      "stockStatus": "InStock",
      "taxAmount": "299.00",
      "unitPrice": "299.00"
    }
  ],
  "subTotal": "299.00",
  "taxAmount": "299.00",
  "taxPercent": "12.50",
  "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 quantity if already present.

Body krävs

Fält Typ
itemId string(uuid)
note string · nullable
quantity integer

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.

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

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

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.

CartItem

EcomCartItemResponse
Fält Typ Beskrivning
addedAt string(date-time)
imageUrl string · nullable
itemId string(uuid)
itemNumber string · nullable
lineTotal decimal
lineTotalIncludingTax decimal
name string · nullable
note string · nullable
quantity integer
slug string · nullable
stockStatus enum InStock LowStock OutOfStock BackOrder
taxAmount decimal
unitPrice decimal