Hoppa till innehållet

Checkout

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

POST /checkout/apply-code

Apply code

Validates a gift card or discount code for checkout use.

Body required

Field Type
code string · nullable

Responses

200 ApplyCodeResponse
Field Type
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.

Standard errors: 400 404 Errors

Examples

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
Response 200
{
  "balance": "299.00",
  "code": "string",
  "currencyId": "string",
  "discountCalculation": "string",
  "discountName": "Acme AB",
  "discountValue": "299.00",
  "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 /checkout/data

Get checkout data

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

Responses

200 CheckoutDataResponse
Field Type
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.

Standard errors: 401 Errors

Examples

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"
Response 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
    }
  ]
}

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

Requires Idempotency-Key

Body required

Field Type Description
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

Responses

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

Standard errors: 400 401 Errors

Examples

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
Response 201
{
  "orderId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "orderNumber": "SO-2026-1041",
  "status": "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.

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.

Requires Idempotency-Key

Body required

Field Type
locale string · nullable

Responses

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

Standard errors: 400 401 Errors

Examples

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
Response 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"
}

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.

PATCH /checkout/sessions/{sessionId}

Update checkout session

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

Path parameters

Field Type
sessionId Required string(uuid)

Responses

200 UpdateCheckoutSessionResponse
Field Type
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.

Standard errors: 400 401 404 Errors

Examples

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"
Response 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"
}

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 /checkout/sessions/{sessionId}/confirmation

Get checkout confirmation

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

Path parameters

Field Type
sessionId Required string

Responses

200 GetCheckoutSessionConfirmationResponse
Field Type
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.

Standard errors: 401 404 Errors

Examples

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"
Response 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"
}

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 /checkout/shipping-prices

Calculate shipping prices

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

Body required

Field Type
countryCode string · nullable

Responses

200 EcomShippingPrice[]
Field Type
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.

Standard errors: 401 Errors

Examples

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
Response 200
[
  {
    "price": "299.00",
    "shippingMethodId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44"
  }
]

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 /checkout/webhooks/{provider}

Payment provider webhook

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

Path parameters

Field Type
provider Required string

Responses

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

Examples

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

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

Query parameters

Field Type
country Required string
code Required string
city string

Responses

200 LookupPostalCodePostalCodeLookupDto
Field Type
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.

Examples

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

Prefix search on postal code or city

Terms shorter than two characters return an empty list.

Query parameters

Field Type
country Required string
q Required string
take integer

Responses

200 LookupPostalCodePostalCodeMatchDto[]
Field Type
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.

Examples

curl
curl "https://api.erp.fluit.cloud/ecom/postal-codes/suggest" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web"
Response 200
[
  {
    "city": "Stockholm",
    "code": "string",
    "county": "string",
    "formattedCode": "STD",
    "latitude": "299.00",
    "longitude": "299.00",
    "municipality": "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.

CheckoutCountry

CheckoutCountry
Field Type
code string · nullable
name string · nullable

CheckoutCustomerAddress

CheckoutCustomerAddress
Field Type
city string · nullable
country string · nullable
postalCode string · nullable
street1 string · nullable
street2 string · nullable

CheckoutCustomerData

CheckoutCustomerData
Field Type
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
Field Type
description string · nullable
id string(uuid)
name string · nullable

CheckoutSavedAddress

CheckoutSavedAddress
Field Type
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
Field Type
allowBackorderChoice boolean
allowBackorders boolean
allowRequestedDeliveryDate boolean
checkoutCustomerMode string · nullable
checkoutProvider string · nullable
termsPageSlug string · nullable

CheckoutShippingMethod

CheckoutShippingMethod
Field Type
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
Field Type
city string · nullable
code string · nullable
county string · nullable
formattedCode string · nullable
latitude decimal · nullable
longitude decimal · nullable
municipality string · nullable

PlaceOrderBillingAddress

PlaceOrderBillingAddressRequest
Field Type
city string · nullable
companyName string · nullable
country string · nullable
postalCode string · nullable
street1 string · nullable
street2 string · nullable