Hoppa till innehållet

Sales orders

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

9 calls GET POST PATCH DELETE Base URL https://api.erp.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. ?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.
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
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
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.erp.fluit.cloud/preview/orders" \
  -H "X-Api-Key: fluit_live_sk_..."
Response 200
{
  "hasNextPage": true,
  "hasPreviousPage": true,
  "items": [
    {
      "createdDate": "2026-06-11T09:24:13.418",
      "currencyCode": "SEK",
      "customerName": "Acme AB",
      "customerNumber": "CUST-001",
      "customerReference": "PO-2026-042",
      "deliveredPercentage": "12.50",
      "deliveryStatus": "NotDelivered",
      "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.erp.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
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.
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.erp.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
{
  "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",
  "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "lines": [
    {
      "deliveredQuantity": "10",
      "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.erp.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
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.
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.erp.fluit.cloud/preview/orders/{orderNumber}" \
  -H "X-Api-Key: fluit_live_sk_..."
Response 200
{
  "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",
  "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "lines": [
    {
      "deliveredQuantity": "10",
      "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.erp.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.erp.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.erp.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
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.
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.
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.erp.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",
  "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.erp.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 or notes to clear them.

Show the full description

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
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.erp.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.erp.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.erp.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.erp.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.erp.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.erp.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.
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 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.
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.erp.fluit.cloud/preview/orders/{orderNumber}/shipments" \
  -H "X-Api-Key: fluit_live_sk_..."
Response 200
{
  "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",
      "shippingMethodName": "Parcel, next day",
      "status": "Hold",
      "totalWeightKg": "1.250",
      "trackingNumber": "ABC-001"
    }
  ],
  "page": 1,
  "pageSize": 50,
  "totalCount": 137,
  "totalPages": 3
}

Base URL https://api.erp.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
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).
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.

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