Hoppa till innehållet

Kassa

Checkout from available methods to placed order, including discount coupons, gift cards, shipping price calculation and postal code lookup. Payment runs through a provider-agnostic session: the response says how to render it, not which provider produced it.

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

POST /checkout/apply-code

Apply code

Validates a gift card or discount code for checkout use.

Body krävs

Fält Typ
code string · nullable

Svar

200 ApplyCodeResponse
Fält Typ
balance decimal · nullable
code string · nullable
currencyId string · nullable
discountCalculation string · nullable
discountName string · nullable
discountValue decimal · 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.

Standardfel: 400 404 Felhantering

Exempel

curl
curl -X POST "https://api.erp.fluit.cloud/ecom/checkout/apply-code" \
  -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
{
  "balance": "299.00",
  "code": "string",
  "currencyId": "string",
  "discountCalculation": "string",
  "discountName": "Acme AB",
  "discountValue": "299.00",
  "type": "string"
}

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

GET /checkout/data

Get checkout data

Returns available shipping methods, payment methods and pre-filled customer data for the checkout page.

Svar

200 CheckoutDataResponse
Fält Typ
countries CheckoutCountry[] · nullable
customer CheckoutCustomerData
paymentMethods CheckoutPaymentMethod[] · nullable
settings CheckoutSettings
shippingMethods CheckoutShippingMethod[] · 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/checkout/data" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web"
Svar 200
{
  "countries": [
    {
      "code": "string",
      "name": "Acme AB"
    }
  ],
  "customer": {
    "contactId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
    "customerId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
    "defaultAddress": {
      "city": "Stockholm",
      "country": "string",
      "postalCode": "11122",
      "street1": "Storgatan 1",
      "street2": "string"
    },
    "defaultBackorderBehavior": "string",
    "email": "order@acme.se",
    "firstName": "Acme AB",
    "lastName": "Acme AB",
    "name": "Acme AB",
    "phone": "+46 8 123 45 67",
    "savedAddresses": [
      {
        "city": "Stockholm",
        "contactPerson": "string",
        "country": "string",
        "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
        "isDefault": true,
        "name": "Acme AB",
        "phone": "+46 8 123 45 67",
        "postalCode": "11122",
        "street1": "Storgatan 1",
        "street2": "string"
      }
    ]
  },
  "paymentMethods": [
    {
      "description": "string",
      "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "name": "Acme AB"
    }
  ],
  "settings": {
    "allowBackorderChoice": true,
    "allowBackorders": true,
    "allowRequestedDeliveryDate": true,
    "checkoutCustomerMode": "string",
    "checkoutProvider": "string",
    "termsPageSlug": "string"
  },
  "shippingMethods": [
    {
      "description": "string",
      "estimatedDelivery": "string",
      "freeShippingThreshold": "299.00",
      "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "name": "Parcel, next day",
      "price": "299.00",
      "taxPercent": "12.50",
      "usesDynamicPricing": true
    }
  ]
}

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

POST /checkout/place

Place order

Completes checkout and creates a sales order from the shopping cart. Send an Idempotency-Key header and a retry after a timeout replays the original response instead of placing a second order, or answering that the cart is already converted. The header is optional; without it the call behaves as it always has.

Kräver Idempotency-Key

Body krävs

Fält Typ Beskrivning
backorderBehavior enum CreateBackorder CancelRemaining HoldOrder
billingAddress PlaceOrderBillingAddress
companyName string · nullable
createAccount boolean
customerReference string · nullable
discountCode string · nullable
email string · nullable
firstName string · nullable
giftCardCode string · nullable
lastName string · nullable
marketingConsent boolean
marketingConsentText string · nullable
orderNote string · nullable
orgNumber string · nullable
password string · nullable
paymentMethodId string(uuid)
phone string · nullable
requestedDeliveryDate string(date) · nullable
saveAddress boolean
shippingAddressId string(uuid) · nullable
shippingCity string · nullable
shippingCountry string · nullable
shippingMethodId string(uuid)
shippingPostalCode string · nullable
shippingStreet1 string · nullable
shippingStreet2 string · nullable

Svar

201 PlaceEcomOrderResult
Fält Typ
orderId string(uuid)
orderNumber string · nullable
status string · nullable
422 ProblemDetails Unprocessable Content
Fält Typ
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.
503 ProblemDetails Service Unavailable
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standardfel: 400 401 Felhantering

Exempel

curl
curl -X POST "https://api.erp.fluit.cloud/ecom/checkout/place" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d @body.json
Svar 201
{
  "orderId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "orderNumber": "SO-2026-1041",
  "status": "string"
}

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

POST /checkout/sessions

Create checkout session

Creates a checkout session at the channel's configured payment provider. Send an Idempotency-Key header and a retry after a timeout returns the original session instead of opening a second one at the provider. The header is optional.

Kräver Idempotency-Key

Body krävs

Fält Typ
locale string · nullable

Svar

200 CreateCheckoutSessionResponse
Fält Typ
clientSecret string · nullable
htmlSnippet string · nullable
provider string · nullable
redirectUrl string · nullable
renderMode string · nullable
sessionId string(uuid)
422 ProblemDetails Unprocessable Content
Fält Typ
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.
503 ProblemDetails Service Unavailable
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standardfel: 400 401 Felhantering

Exempel

curl
curl -X POST "https://api.erp.fluit.cloud/ecom/checkout/sessions" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d @body.json
Svar 200
{
  "clientSecret": "string",
  "htmlSnippet": "string",
  "provider": "string",
  "redirectUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
  "renderMode": "string",
  "sessionId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44"
}

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

PATCH /checkout/sessions/{sessionId}

Update checkout session

Refreshes an existing checkout session at its payment provider when the cart has changed.

Sökvägsparametrar

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

Svar

200 UpdateCheckoutSessionResponse
Fält Typ
clientSecret string · nullable
htmlSnippet string · nullable
provider string · nullable
redirectUrl string · nullable
renderMode string · nullable
sessionId string(uuid)
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/checkout/sessions/{sessionId}" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web"
Svar 200
{
  "clientSecret": "string",
  "htmlSnippet": "string",
  "provider": "string",
  "redirectUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
  "renderMode": "string",
  "sessionId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44"
}

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

GET /checkout/sessions/{sessionId}/confirmation

Get checkout confirmation

Returns the payment provider's confirmation view and the resulting order number.

Sökvägsparametrar

Fält Typ
sessionId Krävs string

Svar

200 GetCheckoutSessionConfirmationResponse
Fält Typ
htmlSnippet string · nullable
orderNumber string · nullable
provider string · nullable
redirectUrl string · nullable
sessionId string(uuid)
status 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 404 Felhantering

Exempel

curl
curl "https://api.erp.fluit.cloud/ecom/checkout/sessions/{sessionId}/confirmation" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web"
Svar 200
{
  "htmlSnippet": "string",
  "orderNumber": "SO-2026-1041",
  "provider": "string",
  "redirectUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
  "sessionId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "status": "string"
}

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

POST /checkout/shipping-prices

Calculate shipping prices

Calculates shipping prices for all enabled shipping methods based on destination country and cart weight using FreightPriceList.

Body krävs

Fält Typ
countryCode string · nullable

Svar

200 EcomShippingPrice[]
Fält Typ
price decimal · nullable
shippingMethodId string(uuid)
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 -X POST "https://api.erp.fluit.cloud/ecom/checkout/shipping-prices" \
  -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
[
  {
    "price": "299.00",
    "shippingMethodId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44"
  }
]

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

POST /checkout/webhooks/{provider}

Payment provider webhook

Callback from a payment provider when a checkout completes. Creates the sales order. Idempotent.

Sökvägsparametrar

Fält Typ
provider Krävs string

Svar

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

Exempel

curl
curl -X POST "https://api.erp.fluit.cloud/ecom/checkout/webhooks/{provider}" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web"

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

GET /postal-codes/lookup

Verify a postal code and get its city

Status is NoRegister, Verified, CityMismatch, UnknownCode or InvalidFormat. Advisory only — never blocks an order from being placed.

Frågeparametrar

Fält Typ
country Krävs string
code Krävs string
city string

Svar

200 LookupPostalCodePostalCodeLookupDto
Fält Typ
formattedCode string · nullable
matches LookupPostalCodePostalCodeMatchDto[] · nullable
normalizedCode string · nullable
status 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.

Exempel

curl
curl "https://api.erp.fluit.cloud/ecom/postal-codes/lookup" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web"
Svar 200
{
  "formattedCode": "STD",
  "matches": [
    {
      "city": "Stockholm",
      "code": "string",
      "county": "string",
      "formattedCode": "STD",
      "latitude": "299.00",
      "longitude": "299.00",
      "municipality": "string"
    }
  ],
  "normalizedCode": "STD",
  "status": "string"
}

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

GET /postal-codes/suggest

Prefix search on postal code or city

Terms shorter than two characters return an empty list.

Frågeparametrar

Fält Typ
country Krävs string
q Krävs string
take integer

Svar

200 LookupPostalCodePostalCodeMatchDto[]
Fält Typ
city string · nullable
code string · nullable
county string · nullable
formattedCode string · nullable
latitude decimal · nullable
longitude decimal · nullable
municipality 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.

Exempel

curl
curl "https://api.erp.fluit.cloud/ecom/postal-codes/suggest" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web"
Svar 200
[
  {
    "city": "Stockholm",
    "code": "string",
    "county": "string",
    "formattedCode": "STD",
    "latitude": "299.00",
    "longitude": "299.00",
    "municipality": "string"
  }
]

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.

CheckoutCountry

CheckoutCountry
Fält Typ
code string · nullable
name string · nullable

CheckoutCustomerAddress

CheckoutCustomerAddress
Fält Typ
city string · nullable
country string · nullable
postalCode string · nullable
street1 string · nullable
street2 string · nullable

CheckoutCustomerData

CheckoutCustomerData
Fält Typ
contactId string(uuid)
customerId string(uuid)
defaultAddress CheckoutCustomerAddress
defaultBackorderBehavior string · nullable
email string · nullable
firstName string · nullable
lastName string · nullable
name string · nullable
phone string · nullable
savedAddresses CheckoutSavedAddress[] · nullable

CheckoutPaymentMethod

CheckoutPaymentMethod
Fält Typ
description string · nullable
id string(uuid)
name string · nullable

CheckoutSavedAddress

CheckoutSavedAddress
Fält Typ
city string · nullable
contactPerson string · nullable
country string · nullable
id string(uuid)
isDefault boolean
name string · nullable
phone string · nullable
postalCode string · nullable
street1 string · nullable
street2 string · nullable

CheckoutSettings

CheckoutSettings
Fält Typ
allowBackorderChoice boolean
allowBackorders boolean
allowRequestedDeliveryDate boolean
checkoutCustomerMode string · nullable
checkoutProvider string · nullable
termsPageSlug string · nullable

CheckoutShippingMethod

CheckoutShippingMethod
Fält Typ
description string · nullable
estimatedDelivery string · nullable
freeShippingThreshold decimal · nullable
id string(uuid)
name string · nullable
price decimal · nullable
taxPercent decimal · nullable
usesDynamicPricing boolean

LookupPostalCodePostalCodeMatchDto

LookupPostalCodePostalCodeMatchDto
Fält Typ
city string · nullable
code string · nullable
county string · nullable
formattedCode string · nullable
latitude decimal · nullable
longitude decimal · nullable
municipality string · nullable

PlaceOrderBillingAddress

PlaceOrderBillingAddressRequest
Fält Typ
city string · nullable
companyName string · nullable
country string · nullable
postalCode string · nullable
street1 string · nullable
street2 string · nullable