Hoppa till innehållet

Sales orders

Sales orders with lines, fulfilment status and shipments. Addressed by orderNumber. Draft orders are not visible.

12 calls GET POST PATCH DELETE Base URL https://api.fluit.cloud/preview

Authentication, error codes, rate limits, idempotency and pagination apply to every call and are documented once under Getting started.

GET /orders

List sales orders

Returns a paginated list of sales orders for the authenticated tenant. Draft orders are excluded. The status filter is matched case-insensitively and an unknown value returns 400.

Show the full description

Sorted by order date descending. channelCode on each order names the sales channel it came in through (null for orders entered in Fluit or created through this API), so ?channelCode= lists the webshop's orders. ?modifiedSince= (ISO 8601 UTC datetime) returns records created or changed at or after that instant, and is the intended way to run an incremental sync. A change anywhere inside the record counts: editing a line moves the parent's modifiedDate too, so no change can hide below the resource level. Deletions are not visible here: a deleted record is really gone, so it simply stops appearing, which is indistinguishable from "unchanged". Poll GET /preview/deletions?deletedSince= alongside this endpoint to learn what was removed.

Query parameters

Field Type Description
status enum Filters on where the order stands in its fulfilment lifecycle. Placed Released Closed Cancelled
customerNumber string Returns only the orders placed by this customer number.
orderDateFrom string(date) Returns only orders dated on or after this date (ISO 8601 date).
orderDateTo string(date) Returns only orders dated on or before this date (ISO 8601 date).
search string Matches order number and customer reference, case-insensitively and on partial words — ORD-2024 finds every order whose number or reference contains it.
modifiedSince string(date-time) Returns only records created or changed at or after this instant (ISO 8601 UTC datetime). A change anywhere inside the record counts, including on its lines.
channelCode string Returns only the orders that came in through this sales channel, e.g. the webshop. Matches channelCode on the order; the codes are listed by GET /preview/channels.
page integer Page to return, 1-based. Default 1.
pageSize integer Number of records per page. Default 50, max 200.

Responses

200 PagedResult_PublicOrderListItem

Paginated response: the fields below sit in items[], wrapped in totalCount, page, pageSize, totalPages, hasPreviousPage and hasNextPage. Paginated

Field Type Description
channelCode string · nullable Code of the sales channel the order came in through: set by Fluit's webshop checkout and by channel imports such as Shopify. Null for orders entered in Fluit or created through this API. Use it to tell webshop orders apart; the codes are listed by GET /preview/channels.
channelName string · nullable Display name of the sales channel. Null when PublicApi.Preview.Orders.Queries.PublicOrderListItem.ChannelCode is null.
createdDate string(date-time) UTC timestamp when the order was created.
currencyCode string · nullable ISO 4217 currency code for all monetary values on this order.
customerName string · nullable Display name of the customer. Null if not set.
customerNumber string · nullable Customer number of the buyer. Null if the order has no customer.
customerReference string · nullable Customer's own reference / purchase order number. Null if not provided.
deliveredPercentage decimal Share of the ordered quantity that has been delivered, 0-100. Serialised as a decimal string.
deliveryStatus enum How much of an order has actually been delivered. Derived from the ordered and delivered quantities on the order lines, so it stays correct for partial deliveries — the common case in B2B, where one line ships today and the rest next week. NotDelivered PartiallyDelivered FullyDelivered
externalOrderNumber string · nullable The order's number in the system it was imported from, e.g. a marketplace or an older ERP. Null for orders that originate in Fluit.
externalOrderScope string · nullable Which external system PublicApi.Preview.Orders.Queries.PublicOrderListItem.ExternalOrderNumber belongs to, as free text set by the integration, e.g. Shopify . Null when there is no external order number.
id string(uuid) Internal unique identifier (UUID v7).
lineCount integer Number of order lines.
links Links Hypermedia links for a public API resource. Exposed as a computed links property on the public response DTOs so that create and read responses carry the same self-reference — the canonical URL is derived from the business key already present on the DTO and can never drift from the route it points at.
modifiedDate string(date-time) · nullable UTC timestamp of the last modification. Null if never modified after creation.
orderDate string(date) Date the order was placed (ISO 8601 date).
orderNumber string · nullable Unique order number, e.g. ORD-2024-00042 .
plannedDeliveryDate string(date) · nullable Planned delivery date set by fulfilment. Null if not yet planned.
requestedDeliveryDate string(date) · nullable Requested delivery date from the customer. Null if not provided.
status enum Sales order status values exposed via the Public API. Draft orders are never visible through the public API. This describes where the order stands commercially, not what the warehouse is doing. Warehouse progress belongs to shipments (see GET /preview/orders/{id}/shipments) — an order can be split across several of them. How much has actually left the building is reported separately as PublicApi.Preview.Orders.Queries.PublicDeliveryStatus. Placed Released Closed Cancelled
totalAmount decimal Total order amount excluding tax, in the order currency. Serialised as a decimal string.
totalAmountIncludingTax decimal Total order amount including tax, in the order currency. Serialised as a decimal string.
400 ProblemDetails ?status= got a value outside its list.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl "https://api.fluit.cloud/preview/orders" \
  -H "X-Api-Key: fluit_live_sk_..."
Response 200
{
  "aggregates": [
    {
      "currencyCode": "SEK",
      "key": "string",
      "mixedCurrencies": true,
      "value": "299.00"
    }
  ],
  "hasNextPage": true,
  "hasPreviousPage": true,
  "items": [
    {
      "channelCode": "STD",
      "channelName": "Widget A",
      "createdDate": "2026-06-11T09:24:13.418",
      "currencyCode": "SEK",
      "customerName": "Acme AB",
      "customerNumber": "CUST-001",
      "customerReference": "PO-2026-042",
      "deliveredPercentage": "12.50",
      "deliveryStatus": "NotDelivered",
      "externalOrderNumber": "ABC-001",
      "externalOrderScope": "string",
      "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "lineCount": 42,
      "links": {
        "self": "string"
      },
      "modifiedDate": "2026-06-11T09:24:13.418",
      "orderDate": "2026-06-11",
      "orderNumber": "SO-2026-1041",
      "plannedDeliveryDate": "2026-06-11",
      "requestedDeliveryDate": "2026-06-11",
      "status": "Placed",
      "totalAmount": "299.00",
      "totalAmountIncludingTax": "299.00"
    }
  ],
  "page": 1,
  "pageSize": 50,
  "totalCount": 137,
  "totalPages": 3
}

Base URL https://api.fluit.cloud/preview. The response example is generated from the schema: the shape is right, the values are made up.

POST /orders

Create a sales order

Creates a new sales order for the authenticated tenant. customerNumber and at least one line are required (or set createAsDraft=true to create an empty draft); all other fields default from the customer or tenant settings. backorderBehavior: omit or null to inherit the tenant/customer configured default.

Show the full description

Allowed values: CreateBackorder, CancelRemaining, HoldOrder. orderNumber: if omitted a number is auto-generated from the tenant number sequence. Use deliveryAddress to override the delivery address inline; if omitted the customer's default address is used. Optionally include lines to create order lines atomically with the order. Set createAsDraft=true to keep the order in Draft status (e.g. to add more lines via POST /orders/{orderNumber}/lines before placing). The response body is the same representation as GET /preview/orders/{orderNumber}; the canonical URL is returned in the Location header and in links.self.

sales-orders:write Requires Idempotency-Key

Body required

Field Type Description
backorderBehavior enum CreateBackorder CancelRemaining HoldOrder
createAsDraft boolean Set to true to keep the order in Draft status — useful when adding more lines via POST /orders/{orderNumber}/lines before placing.
currencyCode string · nullable ISO 4217 currency code, e.g. SEK , EUR . Defaults to the customer's currency.
customerContactId string(uuid) · nullable ID of the customer contact person.
customerNumber Required string Number of an existing customer (exact match).
customerReference string · nullable Customer's own reference / purchase order number.
deliveryAddress CreateOrderDeliveryAddress
deliveryTermCode string · nullable Delivery term / Incoterm code — overrides the customer default.
externalNotes string · nullable Free-text notes printed on order documents.
lines CreateOrderLine[] · nullable Optional order lines to create atomically with the order.
orderDate string(date) · nullable Order date. Defaults to today if omitted.
orderNumber string · nullable Custom order number. Auto-generated if omitted. Returns 409 if already in use.
orderTypeCode string · nullable Order type code. Defaults to the tenant default.
paymentTermCode string · nullable Payment term code — overrides the customer default.
requestedDeliveryDate string(date) · nullable Requested delivery date from the customer.
shippingMethodCode string · nullable Shipping method / carrier code — overrides the customer default.
warehouseCode string · nullable Code of the warehouse to fulfil from. Defaults to the tenant's default warehouse.

Responses

201 PublicOrderDetailResponse
  • Location — URL of the newly created resource.
Field Type Description
channelCode string · nullable Code of the sales channel the order came in through: set by Fluit's webshop checkout and by channel imports such as Shopify. Null for orders entered in Fluit or created through this API. Use it to tell webshop orders apart; the codes are listed by GET /preview/channels.
channelName string · nullable Display name of the sales channel. Null when PublicApi.Preview.Orders.Queries.PublicOrderDetailResponse.ChannelCode is null.
createdDate string(date-time) UTC timestamp when the order was created.
currencyCode string · nullable ISO 4217 currency code for all monetary values on this order.
customerName string · nullable Display name of the customer at the time of ordering. Null if not set.
customerNumber string · nullable Customer number of the buyer. Null if the order has no customer.
customerReference string · nullable Customer's own reference / purchase order number. Null if not provided.
deliveredPercentage decimal Share of the ordered quantity that has been delivered, 0-100. Serialised as a decimal string.
deliveryAddress DeliveryAddress Delivery address attached to a sales order.
deliveryStatus enum How much of an order has actually been delivered. Derived from the ordered and delivered quantities on the order lines, so it stays correct for partial deliveries — the common case in B2B, where one line ships today and the rest next week. NotDelivered PartiallyDelivered FullyDelivered
deliveryTermCode string · nullable Delivery / Incoterm code, e.g. DAP . Null if not set.
deliveryTermName string · nullable Display name of the delivery term. Null if not set.
externalNotes string · nullable Free-text notes printed on order documents. Null if not set.
externalOrderNumber string · nullable The order's number in the system it was imported from, e.g. a marketplace or an older ERP. Null for orders that originate in Fluit.
externalOrderScope string · nullable Which external system PublicApi.Preview.Orders.Queries.PublicOrderDetailResponse.ExternalOrderNumber belongs to, as free text set by the integration, e.g. Shopify . Null when there is no external order number.
id string(uuid) Internal unique identifier (UUID v7).
lines OrderLine[] · nullable Order lines. Empty list if the order has no lines.
links Links Hypermedia links for a public API resource. Exposed as a computed links property on the public response DTOs so that create and read responses carry the same self-reference — the canonical URL is derived from the business key already present on the DTO and can never drift from the route it points at.
modifiedDate string(date-time) · nullable UTC timestamp of the last modification. Null if never modified after creation.
orderDate string(date) Date the order was placed (ISO 8601 date).
orderNumber string · nullable Unique order number, e.g. ORD-2024-00042 .
paymentTermCode string · nullable Payment term code, e.g. NET30 . Null if not set.
paymentTermName string · nullable Display name of the payment term. Null if not set.
plannedDeliveryDate string(date) · nullable Planned delivery date set by fulfilment. Null if not yet planned.
requestedDeliveryDate string(date) · nullable Requested delivery date from the customer. Null if not provided.
shippingMethodName string · nullable Name of the shipping method / carrier. Null if not set.
status enum Sales order status values exposed via the Public API. Draft orders are never visible through the public API. This describes where the order stands commercially, not what the warehouse is doing. Warehouse progress belongs to shipments (see GET /preview/orders/{id}/shipments) — an order can be split across several of them. How much has actually left the building is reported separately as PublicApi.Preview.Orders.Queries.PublicDeliveryStatus. Placed Released Closed Cancelled
totalAmount decimal Total order amount excluding tax, in the order currency. Serialised as a decimal string.
totalAmountIncludingTax decimal Total order amount including tax, in the order currency. Serialised as a decimal string.
totalVat decimal Total VAT / tax amount, in the order currency. Serialised as a decimal string.
400 ProblemDetails No lines were provided and createAsDraft is false, a field failed validation, or one of the referenced codes (customer, item, warehouse, order type, terms, shipping method) does not exist.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
409 ProblemDetails The order number passed in orderNumber is already in use.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl -X POST "https://api.fluit.cloud/preview/orders" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d @body.json
Minimal — customer number and one line
{
  "customerNumber": "CUST-001",
  "lines": [
    {
      "itemNumber": "WIDGET-A",
      "quantity": "10"
    }
  ]
}
Order with lines and delivery address
{
  "currencyCode": "SEK",
  "customerNumber": "CUST-001",
  "customerReference": "PO-2026-042",
  "deliveryAddress": {
    "city": "Stockholm",
    "countryCode": "SE",
    "name": "Acme AB",
    "postalCode": "11122",
    "street1": "Storgatan 1"
  },
  "lines": [
    {
      "itemNumber": "WIDGET-A",
      "quantity": "10",
      "unit": "st"
    },
    {
      "itemNumber": "WIDGET-B",
      "quantity": "5",
      "unitPrice": "299.00"
    }
  ],
  "orderDate": "2026-05-25"
}
Response 201
{
  "channelCode": "STD",
  "channelName": "Acme AB",
  "createdDate": "2026-06-11T09:24:13.418",
  "currencyCode": "SEK",
  "customerName": "Acme AB",
  "customerNumber": "CUST-001",
  "customerReference": "PO-2026-042",
  "deliveredPercentage": "12.50",
  "deliveryAddress": {
    "city": "Stockholm",
    "contactPerson": "string",
    "countryCode": "SE",
    "email": "order@acme.se",
    "name": "Acme AB",
    "phone": "+46 8 123 45 67",
    "postalCode": "11122",
    "street1": "Storgatan 1",
    "street2": "string"
  },
  "deliveryStatus": "NotDelivered",
  "deliveryTermCode": "STD",
  "deliveryTermName": "DAP Stockholm",
  "externalNotes": "string",
  "externalOrderNumber": "ABC-001",
  "externalOrderScope": "string",
  "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "lines": [
    {
      "deliveredQuantity": "10",
      "description": "string",
      "discountPercent": "12.50",
      "itemName": "Widget A",
      "itemNumber": "WIDGET-A",
      "lineNumber": 1,
      "lineTotal": "299.00",
      "lineTotalIncludingTax": "299.00",
      "notes": "string",
      "outstandingQuantity": "10",
      "plannedDeliveryDate": "2026-06-11",
      "quantity": "10",
      "status": "Open",
      "taxPercent": "12.50",
      "unit": "st",
      "unitPrice": "299.00"
    }
  ],
  "links": {
    "self": "string"
  },
  "modifiedDate": "2026-06-11T09:24:13.418",
  "orderDate": "2026-06-11",
  "orderNumber": "SO-2026-1041",
  "paymentTermCode": "STD",
  "paymentTermName": "30 days net",
  "plannedDeliveryDate": "2026-06-11",
  "requestedDeliveryDate": "2026-06-11",
  "shippingMethodName": "Parcel, next day",
  "status": "Placed",
  "totalAmount": "299.00",
  "totalAmountIncludingTax": "299.00",
  "totalVat": "299.00"
}

Base URL https://api.fluit.cloud/preview. The response example is generated from the schema: the shape is right, the values are made up.

GET /orders/{orderNumber}

Get a sales order by order number

Returns the details of a sales order by its unique order number. Responses carry a weak ETag; pass it back in If-None-Match to get 304 Not Modified while the record is unchanged. The validator follows the whole record, so a change to a nested part invalidates it too.

sales-orders:read Supports ETag

Path parameters

Field Type Description
orderNumber Required string Order number of the sales order to read.

Responses

200 PublicOrderDetailResponse
  • ETag — Weak validator for this representation. Pass it back in If-None-Match to get 304 Not Modified while the record is unchanged.
Field Type Description
channelCode string · nullable Code of the sales channel the order came in through: set by Fluit's webshop checkout and by channel imports such as Shopify. Null for orders entered in Fluit or created through this API. Use it to tell webshop orders apart; the codes are listed by GET /preview/channels.
channelName string · nullable Display name of the sales channel. Null when PublicApi.Preview.Orders.Queries.PublicOrderDetailResponse.ChannelCode is null.
createdDate string(date-time) UTC timestamp when the order was created.
currencyCode string · nullable ISO 4217 currency code for all monetary values on this order.
customerName string · nullable Display name of the customer at the time of ordering. Null if not set.
customerNumber string · nullable Customer number of the buyer. Null if the order has no customer.
customerReference string · nullable Customer's own reference / purchase order number. Null if not provided.
deliveredPercentage decimal Share of the ordered quantity that has been delivered, 0-100. Serialised as a decimal string.
deliveryAddress DeliveryAddress Delivery address attached to a sales order.
deliveryStatus enum How much of an order has actually been delivered. Derived from the ordered and delivered quantities on the order lines, so it stays correct for partial deliveries — the common case in B2B, where one line ships today and the rest next week. NotDelivered PartiallyDelivered FullyDelivered
deliveryTermCode string · nullable Delivery / Incoterm code, e.g. DAP . Null if not set.
deliveryTermName string · nullable Display name of the delivery term. Null if not set.
externalNotes string · nullable Free-text notes printed on order documents. Null if not set.
externalOrderNumber string · nullable The order's number in the system it was imported from, e.g. a marketplace or an older ERP. Null for orders that originate in Fluit.
externalOrderScope string · nullable Which external system PublicApi.Preview.Orders.Queries.PublicOrderDetailResponse.ExternalOrderNumber belongs to, as free text set by the integration, e.g. Shopify . Null when there is no external order number.
id string(uuid) Internal unique identifier (UUID v7).
lines OrderLine[] · nullable Order lines. Empty list if the order has no lines.
links Links Hypermedia links for a public API resource. Exposed as a computed links property on the public response DTOs so that create and read responses carry the same self-reference — the canonical URL is derived from the business key already present on the DTO and can never drift from the route it points at.
modifiedDate string(date-time) · nullable UTC timestamp of the last modification. Null if never modified after creation.
orderDate string(date) Date the order was placed (ISO 8601 date).
orderNumber string · nullable Unique order number, e.g. ORD-2024-00042 .
paymentTermCode string · nullable Payment term code, e.g. NET30 . Null if not set.
paymentTermName string · nullable Display name of the payment term. Null if not set.
plannedDeliveryDate string(date) · nullable Planned delivery date set by fulfilment. Null if not yet planned.
requestedDeliveryDate string(date) · nullable Requested delivery date from the customer. Null if not provided.
shippingMethodName string · nullable Name of the shipping method / carrier. Null if not set.
status enum Sales order status values exposed via the Public API. Draft orders are never visible through the public API. This describes where the order stands commercially, not what the warehouse is doing. Warehouse progress belongs to shipments (see GET /preview/orders/{id}/shipments) — an order can be split across several of them. How much has actually left the building is reported separately as PublicApi.Preview.Orders.Queries.PublicDeliveryStatus. Placed Released Closed Cancelled
totalAmount decimal Total order amount excluding tax, in the order currency. Serialised as a decimal string.
totalAmountIncludingTax decimal Total order amount including tax, in the order currency. Serialised as a decimal string.
totalVat decimal Total VAT / tax amount, in the order currency. Serialised as a decimal string.
304 Empty body.
  • ETag — Weak validator for this representation. Pass it back in If-None-Match to get 304 Not Modified while the record is unchanged.
404 ProblemDetails No sales order with that order number.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl "https://api.fluit.cloud/preview/orders/{orderNumber}" \
  -H "X-Api-Key: fluit_live_sk_..."
Response 200
{
  "channelCode": "STD",
  "channelName": "Acme AB",
  "createdDate": "2026-06-11T09:24:13.418",
  "currencyCode": "SEK",
  "customerName": "Acme AB",
  "customerNumber": "CUST-001",
  "customerReference": "PO-2026-042",
  "deliveredPercentage": "12.50",
  "deliveryAddress": {
    "city": "Stockholm",
    "contactPerson": "string",
    "countryCode": "SE",
    "email": "order@acme.se",
    "name": "Acme AB",
    "phone": "+46 8 123 45 67",
    "postalCode": "11122",
    "street1": "Storgatan 1",
    "street2": "string"
  },
  "deliveryStatus": "NotDelivered",
  "deliveryTermCode": "STD",
  "deliveryTermName": "DAP Stockholm",
  "externalNotes": "string",
  "externalOrderNumber": "ABC-001",
  "externalOrderScope": "string",
  "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "lines": [
    {
      "deliveredQuantity": "10",
      "description": "string",
      "discountPercent": "12.50",
      "itemName": "Widget A",
      "itemNumber": "WIDGET-A",
      "lineNumber": 1,
      "lineTotal": "299.00",
      "lineTotalIncludingTax": "299.00",
      "notes": "string",
      "outstandingQuantity": "10",
      "plannedDeliveryDate": "2026-06-11",
      "quantity": "10",
      "status": "Open",
      "taxPercent": "12.50",
      "unit": "st",
      "unitPrice": "299.00"
    }
  ],
  "links": {
    "self": "string"
  },
  "modifiedDate": "2026-06-11T09:24:13.418",
  "orderDate": "2026-06-11",
  "orderNumber": "SO-2026-1041",
  "paymentTermCode": "STD",
  "paymentTermName": "30 days net",
  "plannedDeliveryDate": "2026-06-11",
  "requestedDeliveryDate": "2026-06-11",
  "shippingMethodName": "Parcel, next day",
  "status": "Placed",
  "totalAmount": "299.00",
  "totalAmountIncludingTax": "299.00",
  "totalVat": "299.00"
}

Base URL https://api.fluit.cloud/preview. The response example is generated from the schema: the shape is right, the values are made up.

POST /orders/{orderNumber}/cancel

Cancel a sales order

Cancels a sales order. Only orders that have not been shipped can be cancelled.

sales-orders:write Requires Idempotency-Key

Path parameters

Field Type Description
orderNumber Required string Order number of the sales order to cancel.

Responses

204 Empty body.
404 ProblemDetails No sales order with that order number.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
409 ProblemDetails The order has started shipping, or is already completed or cancelled.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl -X POST "https://api.fluit.cloud/preview/orders/{orderNumber}/cancel" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)"
Response 404
{
  "detail": "string",
  "instance": "string",
  "status": 42,
  "title": "string",
  "type": "string"
}

Base URL https://api.fluit.cloud/preview. The response example is generated from the schema: the shape is right, the values are made up.

POST /orders/{orderNumber}/lines

Add a line to a sales order

Adds an order line to an existing sales order. If unitPrice is omitted the price is calculated automatically via the price engine. discountPercent must be between 0 and 100; it overrides the auto-calculated discount, omit it to apply the discount engine rules.

Show the full description

The Location header points at the new line's address, orders/{orderNumber}/lines/{lineNumber}.

sales-orders:write Requires Idempotency-Key

Path parameters

Field Type Description
orderNumber Required string Order number of the sales order to add the line to.

Body required

Field Type Description
description string · nullable Customer-facing line text. Defaults to the item name when omitted.
discountPercent decimal · nullable Line discount in percent (0–100).
itemNumber Required string Item number of an existing item.
notes string · nullable Free-text line notes.
quantity decimal Ordered quantity. Must be greater than zero.
requestedDeliveryDate string(date) · nullable Requested delivery date for this line.
serialNumber string · nullable The individual to sell, for an item sold as individuals (see GET /preview/items/{itemNumber}/individuals). Quantity must be 1. The line gets the individual's own price unless unitPrice is given, and the individual is bound to the line so it can no longer be sold elsewhere.
unit string · nullable Unit of measure code, e.g. st , kg . Defaults to the item's base unit.
unitPrice decimal · nullable Overrides the item's default sales price. Omit to use the item's default.

Responses

201 PublicOrderLineResponse
  • Location — URL of the newly created resource.
Field Type Description
deliveredQuantity decimal Quantity already delivered / shipped. Serialised as a decimal string.
description string · nullable Customer-facing line text. Falls back to the item name when the line has no text of its own.
discountPercent decimal Line discount in percent (0–100). Serialised as a decimal string.
itemName string · nullable Display name of the ordered item at the time of ordering.
itemNumber string · nullable Item number of the ordered item.
lineNumber integer 1-based sequential line number within the order.
lineTotal decimal Line total excluding tax (UnitPrice × Quantity × (1 − DiscountPercent / 100)). Serialised as a decimal string.
lineTotalIncludingTax decimal Line total including tax. Serialised as a decimal string.
notes string · nullable Free-text line notes. Null if not set.
outstandingQuantity decimal Remaining quantity not yet delivered (Quantity − DeliveredQuantity). Serialised as a decimal string.
plannedDeliveryDate string(date) · nullable Planned delivery date for this specific line. Null if not yet set.
quantity decimal Ordered quantity. Serialised as a decimal string.
status enum Sales order line status values exposed via the Public API. Draft is intentionally omitted. Open Delivered Cancelled
taxPercent decimal Applicable tax / VAT rate in percent. Serialised as a decimal string.
unit string · nullable Unit of measure code, e.g. st , kg .
unitPrice decimal Net unit price in the order currency. Serialised as a decimal string.
400 ProblemDetails A field failed validation, or no item has that item number.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
404 ProblemDetails No sales order with that order number.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
409 ProblemDetails The order is in a state that no longer accepts new lines, such as completed or cancelled.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl -X POST "https://api.fluit.cloud/preview/orders/{orderNumber}/lines" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d @body.json
Add order line
{
  "itemNumber": "WIDGET-B",
  "quantity": "5",
  "unit": "st",
  "unitPrice": "299.00"
}
Response 201
{
  "deliveredQuantity": "10",
  "description": "string",
  "discountPercent": "12.50",
  "itemName": "Widget A",
  "itemNumber": "WIDGET-A",
  "lineNumber": 1,
  "lineTotal": "299.00",
  "lineTotalIncludingTax": "299.00",
  "notes": "string",
  "outstandingQuantity": "10",
  "plannedDeliveryDate": "2026-06-11",
  "quantity": "10",
  "status": "Open",
  "taxPercent": "12.50",
  "unit": "st",
  "unitPrice": "299.00"
}

Base URL https://api.fluit.cloud/preview. The response example is generated from the schema: the shape is right, the values are made up.

PATCH /orders/{orderNumber}/lines/{lineNumber}

Update an order line

Partially updates an order line identified by its line number. Only provided fields are updated (JSON Merge Patch semantics); omitted fields are left unchanged. quantity and unitPrice cannot be null; pass null for discountPercent, requestedDeliveryDate, notes or description to clear them.

Show the full description

Clearing description makes the line fall back to the item name. Line totals and order totals are recalculated automatically. Unlike the resource-level PATCH endpoints, fields this endpoint does not recognise are ignored rather than rejected, and field names are matched case-sensitively — send them exactly as documented.

sales-orders:write

Path parameters

Field Type Description
orderNumber Required string Order number of the sales order the line belongs to.
lineNumber Required integer Line number of the line to update, as reported in lineNumber on the order.

Body required

Field Type Description
description string · nullable Customer-facing line text. Defaults to the item name when the line was created. Pass null to fall back to the item name again.
discountPercent decimal · nullable Line discount in percent (0–100). Pass null to clear.
notes string · nullable Free-text line notes. Pass null to clear.
quantity decimal · nullable Ordered quantity. Must be greater than zero. Cannot be null.
requestedDeliveryDate string(date) · nullable Requested delivery date for this line. Pass null to clear.
unit string · nullable Unit of measure code, e.g. st , kg .
unitPrice decimal · nullable Net unit price in the order currency. Cannot be null.

Responses

204 Empty body.
400 ProblemDetails The body is not a JSON object, quantity or unitPrice was sent as null, or a value falls outside its allowed range.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
404 ProblemDetails No sales order with that order number, or no line with that line number on it.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
409 ProblemDetails The order is closed or cancelled, or the quantity cannot change because a shipment line for it has already been picked.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl -X PATCH "https://api.fluit.cloud/preview/orders/{orderNumber}/lines/{lineNumber}" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Content-Type: application/json" \
  -d @body.json
Response 400
{
  "detail": "string",
  "instance": "string",
  "status": 42,
  "title": "string",
  "type": "string"
}

Base URL https://api.fluit.cloud/preview. The response example is generated from the schema: the shape is right, the values are made up.

DELETE /orders/{orderNumber}/lines/{lineNumber}

Delete an order line

Removes a line from a sales order and releases any stock reservations for it. Order totals are recalculated automatically.

sales-orders:write

Path parameters

Field Type Description
orderNumber Required string Order number of the sales order the line belongs to.
lineNumber Required integer Line number of the line to remove, as reported in lineNumber on the order.

Responses

204 Empty body.
404 ProblemDetails No sales order with that order number, or no line with that line number on it.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
409 ProblemDetails The order is closed or cancelled and no longer accepts changes to its lines.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl -X DELETE "https://api.fluit.cloud/preview/orders/{orderNumber}/lines/{lineNumber}" \
  -H "X-Api-Key: fluit_live_sk_..."
Response 404
{
  "detail": "string",
  "instance": "string",
  "status": 42,
  "title": "string",
  "type": "string"
}

Base URL https://api.fluit.cloud/preview. The response example is generated from the schema: the shape is right, the values are made up.

POST /orders/{orderNumber}/place

Place a sales order

Transitions a sales order from Draft to Placed, confirming it for processing. Business-rule violations return 400; the Problem Details response includes an errors extension array with one entry per violation, each containing a code and description .

Show the full description

Known error codes: SalesOrder.NoLinesInOrder (order must have at least one line before it can be placed).

sales-orders:write Requires Idempotency-Key

Path parameters

Field Type Description
orderNumber Required string Order number of the draft sales order to place.

Responses

204 Empty body.
400 ProblemDetails A business rule blocks the order from being placed, such as having no lines.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
404 ProblemDetails No sales order with that order number.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
409 ProblemDetails The order is not in Draft — it has already been placed, or it is cancelled.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl -X POST "https://api.fluit.cloud/preview/orders/{orderNumber}/place" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)"
Response 400
{
  "detail": "string",
  "instance": "string",
  "status": 42,
  "title": "string",
  "type": "string"
}

Base URL https://api.fluit.cloud/preview. The response example is generated from the schema: the shape is right, the values are made up.

POST /orders/{orderNumber}/release

Release a sales order

Transitions a sales order from Placed to Released, handing it to the warehouse. Runs the same rules as the Release button in Fluit. **Allocation.** Releasing turns the order's soft allocations into hard allocations on specific warehouse locations.

Show the full description

Nothing more needs to be called for allocation. What happens to a line that is short depends on the order's backorder behaviour: *create backorder* (default) releases what is in stock and leaves the rest as a backorder that ships later; *cancel remaining* reduces the line to the allocated quantity; *hold order* blocks the release with SalesOrder.NotFullyAllocated until everything is covered. **Shipment.** If shipment automation is on for the tenant or the order type, releasing also creates the shipment in the same transaction. Check GET /preview/orders/{orderNumber}/shipments after releasing: if a shipment is listed, the warehouse can already pick and you should not call POST /preview/shipments . If none is listed, create it with POST /preview/shipments ; that call answers Shipment.NoHardAllocations when every allocated unit is already on a shipment. **Retries.** Send an Idempotency-Key . A retry with the same key replays the first response without releasing again. A new request for an order that is already released answers 409 SalesOrder.InvalidTransition , so treat 409 on an order you released yourself as done. Business-rule violations return 400; the Problem Details response includes an errors extension array with one entry per violation, each containing a code and description . Known error codes: SalesOrder.OnHold (the order is on hold, for example a credit stop), SalesOrder.LinesAwaitingMeasurement (a configured line still carries a preliminary measurement; record the measurement, or release it in Fluit with a reason), SalesOrder.NotFullyAllocated (hold-order backorder behaviour and not everything is in stock), SalesOrder.InvalidTransition (409, the order is not in Placed).

sales-orders:write Requires Idempotency-Key

Path parameters

Field Type Description
orderNumber Required string Order number of the placed sales order to release.

Responses

204 Empty body.
400 ProblemDetails A business rule blocks the release: the order is on hold, a line is waiting for an on-site measurement, or the order must ship complete and is not fully allocated.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
404 ProblemDetails No sales order with that order number.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
409 ProblemDetails The order is not in Placed — it is still a draft, already released, closed or cancelled.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl -X POST "https://api.fluit.cloud/preview/orders/{orderNumber}/release" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)"
Response 400
{
  "detail": "string",
  "instance": "string",
  "status": 42,
  "title": "string",
  "type": "string"
}

Base URL https://api.fluit.cloud/preview. The response example is generated from the schema: the shape is right, the values are made up.

POST /orders/{orderNumber}/send-confirmation

Send an order confirmation

Confirms a placed sales order to the customer. By default this only records the order as confirmed — nothing is emailed. That is the right behaviour when your own system delivers the confirmation.

Show the full description

Set sendEmail=true to have Fluit email the order confirmation PDF, the same one as when the order is confirmed in Fluit. The address defaults to the order contact, then the customer contact, then the customer's order confirmation email; 400 is returned if none of them nor toEmail is set. Leave subject and message out to have Fluit write them from the tenant's email template, in the same language as the attached PDF. Calling it again sends a new confirmation, which is how you confirm changes made after the first one. Sending an email is not reversible, so retries with the same Idempotency-Key replay the original response instead of sending again. To have every order confirmed when it is placed instead, turn on automatic order confirmation on the order type and pass its orderTypeCode when creating the order. The request body is optional; POSTing with no body confirms without email.

sales-orders:write Requires Idempotency-Key

Path parameters

Field Type Description
orderNumber Required string Order number of the placed sales order to confirm.

Body

Field Type Description
language string · nullable Language for the attached PDF and — when subject and message are left out — for the email text. ISO 639-1, e.g. sv or en . Defaults to the customer contact's language, then the customer's, then the tenant's.
message string · nullable Custom email body. Only used when sendEmail is true.
sendEmail boolean Set to true to email the order confirmation PDF to the customer. Defaults to false , which only records the order as confirmed to the customer — use it when your own system delivers the confirmation.
subject string · nullable Custom email subject. Only used when sendEmail is true.
toEmail string(email) · nullable Recipient address. Defaults to the order contact's email, then the customer contact's, then the customer's order confirmation email. Only used when sendEmail is true.

Responses

204 Empty body.
400 ProblemDetails A field failed validation — toEmail is not a valid email address, or toEmail (200), subject (200), message (4000) or language (10) is longer than allowed — or sendEmail is true but neither toEmail nor any of the order's recipient addresses is set ( SalesOrder.SendConfirmation.NoEmail ).
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
404 ProblemDetails No sales order with that order number.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
409 ProblemDetails The order is a draft ( SalesOrder.SendConfirmation.NotPlaced ) or cancelled ( SalesOrder.SendConfirmation.Cancelled ).
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl -X POST "https://api.fluit.cloud/preview/orders/{orderNumber}/send-confirmation" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d @body.json
Email the order confirmation to the customer
{
  "sendEmail": true
}
Email to a specific address in English
{
  "language": "en",
  "sendEmail": true,
  "toEmail": "orders@customer.example"
}
Record as confirmed without emailing (default)
{}
Response 400
{
  "detail": "string",
  "instance": "string",
  "status": 42,
  "title": "string",
  "type": "string"
}

Base URL https://api.fluit.cloud/preview. The response example is generated from the schema: the shape is right, the values are made up.

GET /orders/{orderNumber}/shipments

List shipments for a sales order

Returns a paginated list of the shipments fulfilling the order, including carrier tracking numbers once booked. An order can have multiple shipments (partial deliveries) and a shipment can cover multiple orders (consolidated delivery) — only lines belonging to this order are included.

Show the full description

Returns an empty items list if fulfilment has not started.

sales-orders:read Paginated

Path parameters

Field Type Description
orderNumber Required string Order number of the sales order whose shipments to list.

Query parameters

Field Type Description
page integer Page to return, 1-based. Default 1.
pageSize integer Number of records per page. Default 50, max 200.

Responses

200 PagedResult_PublicShipmentResponse

Paginated response: the fields below sit in items[], wrapped in totalCount, page, pageSize, totalPages, hasPreviousPage and hasNextPage. Paginated

Field Type Description
createdDate string(date-time) UTC timestamp when the shipment was created.
deliveredDate string(date-time) · nullable UTC timestamp when the shipment was delivered. Null if not yet delivered.
lines ShipmentLine[] · nullable Shipment lines. Scoped to the addressed order when read through an order.
links Links Hypermedia links for a public API resource. Exposed as a computed links property on the public response DTOs so that create and read responses carry the same self-reference — the canonical URL is derived from the business key already present on the DTO and can never drift from the route it points at.
plannedShipDate string(date) · nullable Planned ship date (ISO 8601 date). Null if not yet planned.
shipmentNumber string · nullable Unique shipment number, e.g. SHIP-2026-00128 .
shippedDate string(date-time) · nullable UTC timestamp when the shipment was handed over to the carrier. Null if not yet shipped.
shippingMethodCode string · nullable Code of the shipping method, as accepted by shippingMethodCode on PATCH. Null if no shipping method is set or the method has no code.
shippingMethodName string · nullable Name of the shipping method / carrier. Null if not set.
status enum Shipment status values exposed via the Public API. Mirrors the internal shipment lifecycle from warehouse release to delivery. Hold Released Picking Picked ReadyForPickup Packing Packed Prepared Booked PickedUp InTransit Delivered Failed Cancelled
totalWeightKg decimal · nullable Total weight in kilograms. Serialised as a decimal string. Null if not weighed.
trackingNumber string · nullable Carrier tracking number. Null until the shipment is booked with a carrier.
trackingUrl string · nullable Link to the carrier's tracking page: the shipping method's tracking-link template with PublicApi.Preview.Shipments.Queries.PublicShipmentResponse.TrackingNumber filled in. Null when either is missing. Safe to show to the end customer — it never carries Fluit's or the tenant's integration credentials.
404 ProblemDetails No sales order with that order number.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl "https://api.fluit.cloud/preview/orders/{orderNumber}/shipments" \
  -H "X-Api-Key: fluit_live_sk_..."
Response 200
{
  "aggregates": [
    {
      "currencyCode": "SEK",
      "key": "string",
      "mixedCurrencies": true,
      "value": "299.00"
    }
  ],
  "hasNextPage": true,
  "hasPreviousPage": true,
  "items": [
    {
      "createdDate": "2026-06-11T09:24:13.418",
      "deliveredDate": "2026-06-11T09:24:13.418",
      "lines": [
        {
          "itemName": "Widget A",
          "itemNumber": "WIDGET-A",
          "orderLineNumber": 42,
          "orderNumber": "SO-2026-1041",
          "pickedQuantity": "10",
          "quantity": "10",
          "unit": "st"
        }
      ],
      "links": {
        "self": "string"
      },
      "plannedShipDate": "2026-06-11",
      "shipmentNumber": "SH-2026-0455",
      "shippedDate": "2026-06-11T09:24:13.418",
      "shippingMethodCode": "STD",
      "shippingMethodName": "Parcel, next day",
      "status": "Hold",
      "totalWeightKg": "1.250",
      "trackingNumber": "ABC-001",
      "trackingUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg"
    }
  ],
  "page": 1,
  "pageSize": 50,
  "totalCount": 137,
  "totalPages": 3
}

Base URL https://api.fluit.cloud/preview. The response example is generated from the schema: the shape is right, the values are made up.

POST /orders/history/batch

Import delivered orders from a previous system as closed orders, with their demand history

Imports up to 200 orders per call that were delivered and invoiced in a previous system.

Show the full description

Each becomes a **closed** order in Fluit — delivered, and invoiced outside Fluit — and each line writes one demand history row, so the forecast learns from the order history without a separate history load. **No side effects.** The import creates no shipment, inventory transaction, invoice basis, accounting event (Fortnox, Business Central), webhook or email, and reserves nothing. The delivery ledger gets one delivery per order, dated deliveryDate (or the latest line deliveryDate , else the order date) and already marked as invoiced outside Fluit. Use this, not POST /preview/orders , for history: that one places the order. **Demand history.** One row per line, sourced to the order and line. Demand date is the line's requestedDeliveryDate (inherited from the order's), else the order date; the actual delivery date is the line's deliveryDate (inherited from the order's). The quantity is the ordered quantity — a line delivered short carries deliveredQuantity on the order but keeps the full demand. A cancelled line ( cancelled: true ) is never delivered and its demand row is marked cancelled. An order type that excludes from the forecast marks its rows excluded. **Idempotent.** externalOrderScope + externalOrderNumber identify the order. One that already exists answers exists and is left untouched, so a re-run changes nothing. Within a batch the same external order or orderNumber twice fails both (BulkUpsert.DuplicateInBatch). The HTTP status describes the request, not the orders: a well-formed batch always answers 200, and every order carries its own outcome ( created , exists or failed ) plus an error when it failed. Each order is all-or-nothing, and a bad order never blocks the rest. Error codes include HistoricalOrder.CustomerNotFound, HistoricalOrder.ItemNotFound (the line is named), HistoricalOrder.OrderNumberTaken (the number is used by another order), HistoricalOrder.LineNotDelivered (deliveredQuantity 0 — send the line as cancelled), HistoricalOrder.DeliveredExceedsOrdered and HistoricalOrder.NothingDelivered (every line cancelled). An Idempotency-Key is required like on every POST under /preview.

sales-orders:write Requires Idempotency-Key

Body required

Field Type Description
orders Required ImportHistoricalOrdersOrder[] The orders to import. At most 200 per call.

Responses

200 ImportHistoricalOrdersResponse
Field Type
createdCount integer
demandHistoryCount integer
existsCount integer
failedCount integer
results ImportHistoricalOrdersOrderResult[] · nullable
400 ProblemDetails The batch is empty (BulkUpsert.Empty) or has more than 200 orders (BulkUpsert.TooManyRows), or an order or line lacks a required field.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl -X POST "https://api.fluit.cloud/preview/orders/history/batch" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d @body.json
One delivered order with a short delivery and a cancelled line
{
  "orders": [
    {
      "currencyCode": "SEK",
      "customerNumber": "10001",
      "customerReference": "PO 4711",
      "deliveryAddress": {
        "city": "Skellefteå",
        "countryCode": "SE",
        "name": "Acme Lager",
        "postalCode": "931 31",
        "street1": "Hamngatan 1"
      },
      "deliveryDate": "2025-03-11",
      "externalOrderNumber": "240117",
      "externalOrderScope": "jeeves",
      "lines": [
        {
          "deliveredQuantity": "8",
          "deliveryDate": "2025-03-11",
          "discountPercent": "5",
          "itemNumber": "670-00001",
          "quantity": "10",
          "unitPrice": "120.00"
        },
        {
          "cancelled": true,
          "itemNumber": "670-00002",
          "quantity": "2",
          "unitPrice": "40.00"
        }
      ],
      "orderDate": "2025-03-03",
      "orderNumber": "J-240117",
      "requestedDeliveryDate": "2025-03-10"
    }
  ]
}
Response 200
{
  "createdCount": 42,
  "demandHistoryCount": 42,
  "existsCount": 42,
  "failedCount": 42,
  "results": [
    {
      "demandHistoryCount": 42,
      "error": {
        "code": "string",
        "detail": "string"
      },
      "externalOrderNumber": "ABC-001",
      "index": 42,
      "orderId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "orderNumber": "SO-2026-1041",
      "outcome": "string"
    }
  ]
}

Base URL https://api.fluit.cloud/preview. 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.

CreateOrderDeliveryAddress

CreateOrderDeliveryAddressInput
Field Type Description
city Required string City.
contactPerson string · nullable Contact person at the delivery address.
countryCode Required string ISO 3166-1 alpha-2 country code, e.g. SE .
email string(email) · nullable Email address at the delivery address.
name Required string Recipient name or company name.
phone string · nullable Phone number at the delivery address.
postalCode Required string Postal code.
street1 Required string Street address line 1.
street2 string · nullable Street address line 2 — c/o, suite, etc.

CreateOrderLine

CreateOrderLineInput
Field Type Description
description string · nullable Customer-facing line text. Defaults to the item name when omitted.
discountPercent decimal · nullable Line discount in percent (0–100).
itemNumber Required string Item number of an existing item.
notes string · nullable Free-text line notes.
quantity decimal Ordered quantity. Must be greater than zero.
requestedDeliveryDate string(date) · nullable Line-level requested delivery date (overrides the order-level date).
serialNumber string · nullable The individual to sell, for an item sold as individuals (see GET /preview/items/{itemNumber}/individuals). Quantity must be 1. The line gets the individual's own price unless unitPrice is given, and the individual is bound to the line so it can no longer be sold elsewhere.
unit string · nullable Unit of measure code, e.g. st , kg . Defaults to the item's base unit.
unitPrice decimal · nullable Overrides the item's default sales price.

DeliveryAddress

PublicDeliveryAddressResponse

Delivery address attached to a sales order.

Field Type Description
city string · nullable City name.
contactPerson string · nullable Contact person at the delivery address. Null if not set.
countryCode string · nullable ISO 3166-1 alpha-2 country code, e.g. SE .
email string · nullable Email address at the delivery address. Null if not set.
name string · nullable Recipient company or person name.
phone string · nullable Phone number at the delivery address. Null if not set.
postalCode string · nullable Postal / ZIP code.
street1 string · nullable Street address line 1.
street2 string · nullable Street address line 2 (c/o, suite, etc.). Null if not set.

ImportHistoricalOrdersAddress

ImportHistoricalOrdersAddress
Field Type Description
city Required string City.
contactPerson string · nullable Contact person at the delivery address.
countryCode Required string ISO 3166-1 alpha-2, e.g. SE .
email string(email) · nullable Email address at the delivery address.
name Required string The recipient's name, e.g. the company or site delivered to.
phone string · nullable Phone number at the delivery address.
postalCode Required string Postal code.
street1 Required string Street address.
street2 string · nullable Second address line.

ImportHistoricalOrdersLine

ImportHistoricalOrdersLine
Field Type Description
cancelled boolean true for a line that was cancelled and never delivered. Its demand row is marked cancelled.
deliveredQuantity decimal · nullable Delivered quantity. Defaults to quantity; may not exceed it. A short delivery keeps quantity as demand.
deliveryDate string(date) · nullable The day the line was delivered. Defaults to the order's deliveryDate.
description string · nullable Line text. Defaults to the item name.
discountPercent decimal · nullable Line discount, 0–100.
itemNumber Required string The item. Must exist.
quantity decimal Ordered quantity — the demand. Greater than 0.
requestedDeliveryDate string(date) · nullable The line's requested delivery date — the demand date. Defaults to the order's.
taxPercent decimal · nullable VAT rate in percent, for the order's totals.
unitPrice decimal Price per unit in the order currency, before discount.

ImportHistoricalOrdersOrder

ImportHistoricalOrdersOrder
Field Type Description
currencyCode string · nullable ISO 4217 code. Defaults to the customer's currency, then the base currency.
customerNumber Required string The customer. Must exist.
customerReference string · nullable The customer's reference or purchase order number.
deliveryAddress ImportHistoricalOrdersAddress
deliveryDate string(date) · nullable The day the order was delivered. Lines without their own inherit it.
exchangeRate decimal · nullable Base-currency units per order-currency unit at the time. Defaults to today's rate.
externalOrderNumber Required string The order's number in the old system. With externalOrderScope it identifies the order on a re-run.
externalOrderScope Required string The old system, e.g. jeeves . Same value for every order from the same source.
internalNotes string · nullable Internal note on the order, e.g. where it came from.
lines Required ImportHistoricalOrdersLine[] The order lines, in order. At least one must be delivered.
orderDate Required string(date) The day the order was placed.
orderNumber Required string The order number in Fluit — usually the old system's number, with a prefix if it could collide with Fluit's own series.
orderTypeCode string · nullable Order type. Defaults to the tenant default; an order type that excludes from the forecast excludes these rows too.
requestedDeliveryDate string(date) · nullable The delivery date the customer asked for. Lines without their own inherit it.
warehouseCode string · nullable The warehouse the order shipped from. Defaults to the default warehouse.

ImportHistoricalOrdersOrderResult

ImportHistoricalOrdersOrderResult
Field Type Description
demandHistoryCount integer Demand rows written for the order — one per line.
error ImportHistoricalOrdersRowError
externalOrderNumber string · nullable The external order number, as sent.
index integer Zero-based position of the order in the request.
orderId string(uuid) · nullable The order's id, for created and exists .
orderNumber string · nullable The order number in Fluit — for exists , the one the order already has.
outcome string · nullable created , exists (already imported, left untouched) or failed .

ImportHistoricalOrdersRowError

ImportHistoricalOrdersRowError
Field Type
code string · nullable
detail string · nullable

OrderLine

PublicOrderLineResponse

A single order line returned as part of a sales order detail response.

Field Type Description
deliveredQuantity decimal Quantity already delivered / shipped. Serialised as a decimal string.
description string · nullable Customer-facing line text. Falls back to the item name when the line has no text of its own.
discountPercent decimal Line discount in percent (0–100). Serialised as a decimal string.
itemName string · nullable Display name of the ordered item at the time of ordering.
itemNumber string · nullable Item number of the ordered item.
lineNumber integer 1-based sequential line number within the order.
lineTotal decimal Line total excluding tax (UnitPrice × Quantity × (1 − DiscountPercent / 100)). Serialised as a decimal string.
lineTotalIncludingTax decimal Line total including tax. Serialised as a decimal string.
notes string · nullable Free-text line notes. Null if not set.
outstandingQuantity decimal Remaining quantity not yet delivered (Quantity − DeliveredQuantity). Serialised as a decimal string.
plannedDeliveryDate string(date) · nullable Planned delivery date for this specific line. Null if not yet set.
quantity decimal Ordered quantity. Serialised as a decimal string.
status enum Sales order line status values exposed via the Public API. Draft is intentionally omitted. Open Delivered Cancelled
taxPercent decimal Applicable tax / VAT rate in percent. Serialised as a decimal string.
unit string · nullable Unit of measure code, e.g. st , kg .
unitPrice decimal Net unit price in the order currency. Serialised as a decimal string.

ShipmentLine

PublicShipmentLineResponse

A single shipment line, referencing the order line it fulfils.

Field Type Description
itemName string · nullable Display name of the shipped item.
itemNumber string · nullable Item number of the shipped item.
orderLineNumber integer Line number of the sales order line this shipment line fulfils.
orderNumber string · nullable Order number of the sales order this line belongs to. Set on consolidated shipments.
pickedQuantity decimal Quantity picked so far. Serialised as a decimal string.
quantity decimal Quantity on this shipment. Serialised as a decimal string.
unit string · nullable Unit of measure code, e.g. st . Null when the line uses the item's base unit.