Hoppa till innehållet

Work orders

Production and service work orders. Read-only. Addressed by workOrderNumber.

3 calls GET POST 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 /work-orders

List work orders

Returns a paginated list of work orders, newest first. Read-only — production is planned and reported inside the ERP. ?modifiedSince= returns both created and modified work orders, so it can be used for delta sync. Fetch a single work order via its links.self.

Query parameters

Field Type Description
search string Matches work order number and title, case-insensitively and on partial words.
status enum Filters on how far production has got. Draft Planned Waiting Active Paused Completed Closed Cancelled Estimate
type enum Filters on what kind of work the order covers. Manufacturing Project Service Maintenance
outputItemNumber string Returns only the work orders producing this item.
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_PublicWorkOrderResponse

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

Field Type Description
actualEnd string(date-time) · nullable When work actually finished (UTC). Null if not finished.
actualStart string(date-time) · nullable When work actually started (UTC). Null if not started.
createdDate string(date-time) UTC timestamp when the work order was created.
customerNumber string · nullable Customer number, when the work order belongs to a customer. Null otherwise.
description string · nullable Longer description of the work. Null if not set.
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.
outputItemNumber string · nullable Item number of the item being produced. Null for service and project orders.
plannedEnd string(date-time) · nullable Planned end (UTC). Null if not planned.
plannedOutputQuantity decimal Quantity planned to be produced. Serialised as a decimal string.
plannedStart string(date-time) · nullable Planned start (UTC). Null if not planned.
priority enum Work order priority values exposed via the Public API. Mirrors Domain.WorkOrders.WorkOrderPriority . Low Normal High Urgent
producedQuantity decimal Quantity reported as produced so far. Serialised as a decimal string.
salesOrderNumber string · nullable Sales order number this work order fulfils. Null if not linked to an order.
status enum Work order status values exposed via the Public API. Mirrors Domain.WorkOrders.WorkOrderStatus name-for-name and value-for-value so the query projections can cast directly — a cast is translatable to SQL where a switch over a helper method is not. PublicWorkOrderEnumParityTests fails the build if the two ever drift apart, which is what stops a new domain value from silently serialising as a bare number. Draft Planned Waiting Active Paused Completed Closed Cancelled Estimate
title string · nullable Short title describing the work.
type enum Work order type values exposed via the Public API. Mirrors Domain.WorkOrders.WorkOrderType . Manufacturing Project Service Maintenance
warehouseCode string · nullable Code of the warehouse the output is received into. Null if not set.
workOrderNumber string · nullable Unique work order number, e.g. WO-2026-00042 .
400 ProblemDetails ?status= or ?type= 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/work-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": [
    {
      "actualEnd": "2026-06-11T09:24:13.418",
      "actualStart": "2026-06-11T09:24:13.418",
      "createdDate": "2026-06-11T09:24:13.418",
      "customerNumber": "CUST-001",
      "description": "string",
      "links": {
        "self": "string"
      },
      "outputItemNumber": "ABC-001",
      "plannedEnd": "2026-06-11T09:24:13.418",
      "plannedOutputQuantity": "10",
      "plannedStart": "2026-06-11T09:24:13.418",
      "priority": "Low",
      "producedQuantity": "10",
      "salesOrderNumber": "ABC-001",
      "status": "Draft",
      "title": "string",
      "type": "Manufacturing",
      "warehouseCode": "MAIN",
      "workOrderNumber": "WO-2026-0620"
    }
  ],
  "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.

GET /work-orders/{workOrderNumber}

Get a work order by number

Read-only view of a work order: what is being produced, how much is done and when. Reporting output happens inside Fluit or in the mobile app. Responses carry a weak ETag; pass it back in If-None-Match to get 304 Not Modified while the record is unchanged.

work-orders:read Supports ETag

Path parameters

Field Type Description
workOrderNumber Required string Work order number of the work order to read.

Responses

200 PublicWorkOrderResponse
  • 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
actualEnd string(date-time) · nullable When work actually finished (UTC). Null if not finished.
actualStart string(date-time) · nullable When work actually started (UTC). Null if not started.
createdDate string(date-time) UTC timestamp when the work order was created.
customerNumber string · nullable Customer number, when the work order belongs to a customer. Null otherwise.
description string · nullable Longer description of the work. Null if not set.
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.
outputItemNumber string · nullable Item number of the item being produced. Null for service and project orders.
plannedEnd string(date-time) · nullable Planned end (UTC). Null if not planned.
plannedOutputQuantity decimal Quantity planned to be produced. Serialised as a decimal string.
plannedStart string(date-time) · nullable Planned start (UTC). Null if not planned.
priority enum Work order priority values exposed via the Public API. Mirrors Domain.WorkOrders.WorkOrderPriority . Low Normal High Urgent
producedQuantity decimal Quantity reported as produced so far. Serialised as a decimal string.
salesOrderNumber string · nullable Sales order number this work order fulfils. Null if not linked to an order.
status enum Work order status values exposed via the Public API. Mirrors Domain.WorkOrders.WorkOrderStatus name-for-name and value-for-value so the query projections can cast directly — a cast is translatable to SQL where a switch over a helper method is not. PublicWorkOrderEnumParityTests fails the build if the two ever drift apart, which is what stops a new domain value from silently serialising as a bare number. Draft Planned Waiting Active Paused Completed Closed Cancelled Estimate
title string · nullable Short title describing the work.
type enum Work order type values exposed via the Public API. Mirrors Domain.WorkOrders.WorkOrderType . Manufacturing Project Service Maintenance
warehouseCode string · nullable Code of the warehouse the output is received into. Null if not set.
workOrderNumber string · nullable Unique work order number, e.g. WO-2026-00042 .
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 work order with that 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/work-orders/{workOrderNumber}" \
  -H "X-Api-Key: fluit_live_sk_..."
Response 200
{
  "actualEnd": "2026-06-11T09:24:13.418",
  "actualStart": "2026-06-11T09:24:13.418",
  "createdDate": "2026-06-11T09:24:13.418",
  "customerNumber": "CUST-001",
  "description": "string",
  "links": {
    "self": "string"
  },
  "outputItemNumber": "ABC-001",
  "plannedEnd": "2026-06-11T09:24:13.418",
  "plannedOutputQuantity": "10",
  "plannedStart": "2026-06-11T09:24:13.418",
  "priority": "Low",
  "producedQuantity": "10",
  "salesOrderNumber": "ABC-001",
  "status": "Draft",
  "title": "string",
  "type": "Manufacturing",
  "warehouseCode": "MAIN",
  "workOrderNumber": "WO-2026-0620"
}

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 /work-orders/batch

Create many manufacturing orders with routing and materials

Creates up to 200 manufacturing orders per call, each with its operations and materials — the path for carrying open production orders over from another system. Scope work-orders:write . **The number is the key.** Each row names its own number .

Show the full description

If a work order with that number already exists the row answers exists and the order is left untouched, so a re-sent batch is harmless. The work order number series must allow manual numbers. **What a created order looks like.** Type Manufacturing, status Planned — planned orders are the ones material planning and allocation work with, so the order drives demand from day one, exactly as when someone presses *Plan* in the app. Planning soft-allocates the remaining material against stock. No e-mail is sent. plannedEnd may be the same as plannedStart . With salesOrderNumber (and optionally salesOrderLineNumber , the line number GET /preview/orders/{orderNumber} shows) the order is linked to the sales order line and takes the order's customer. Operations are planned on a resource group by resourceGroupCode ; materials are taken from the row's warehouse at the item's cost price. explodeFromItem: true instead takes both from the output item's bill of materials and routing. **Material already picked in the old system.** alreadyIssuedQuantity on a material is recorded as consumed on the line without an inventory movement and without a reservation — the opening balance is assumed to be reduced by it already (load opening stock with POST /preview/inventory/opening-balance/batch). Only the rest is demand. The HTTP status describes the request, not the rows: a well-formed batch answers 200 and every row carries its outcome ( created , exists or failed ) and an error when it failed. Each row is saved on its own; a failed row leaves nothing behind and does not block the rest. Row error codes: WorkOrderBatch.ItemNotFound, WorkOrderBatch.WarehouseNotFound, WorkOrderBatch.ResourceGroupNotFound, WorkOrderBatch.SalesOrderNotFound, WorkOrderBatch.SalesOrderLineNotFound, WorkOrderBatch.SalesOrderLineSplit, WorkOrderBatch.SalesOrderNumberRequired, WorkOrderBatch.QuantityMustBePositive, WorkOrderBatch.PlannedEndBeforeStart, WorkOrderBatch.NegativeOperationTime, WorkOrderBatch.UnknownOperationSequence, WorkOrderBatch.ExplodeWithStructure, WorkOrderBatch.ItemHasNoStructure, WorkOrder.DuplicateOperationSequence, BulkUpsert.DuplicateInBatch (the same number twice in the call) and the number series' errors (NumberSequence.ManualNumberNotAllowed, NumberSequence.InvalidManualFormat). Read an order back with GET /preview/work-orders/{workOrderNumber}. Decimals are JSON strings ("12.5"); numbers are accepted too. An Idempotency-Key is required like on every POST under /preview; derive it from the run and the batch index.

work-orders:write Requires Idempotency-Key

Body required

Field Type Description
workOrders Required BatchCreateWorkOrdersRow[] The work orders to create. At most 200 per call.

Responses

200 BatchCreateWorkOrdersResponse
Field Type
createdCount integer
existsCount integer
failedCount integer
results BatchCreateWorkOrdersRowResult[] · nullable
400 ProblemDetails The batch is empty (BulkUpsert.Empty) or has more than 200 rows (BulkUpsert.TooManyRows), or a row lacks a required field (number, title, outputItemNumber, plannedOutputQuantity, warehouseCode).
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/work-orders/batch" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d @body.json
Take the structure from the item
{
  "workOrders": [
    {
      "explodeFromItem": true,
      "number": "TO4712-1",
      "outputItemNumber": "VB-2",
      "plannedEnd": "2026-12-05",
      "plannedOutputQuantity": "10",
      "plannedStart": "2026-12-03",
      "title": "Ventilblock VB-2",
      "warehouseCode": "HUVUD"
    }
  ]
}
An order for a sales order line, with material already picked
{
  "workOrders": [
    {
      "materials": [
        {
          "alreadyIssuedQuantity": "2",
          "itemNumber": "ROR-80",
          "operationSequence": 10,
          "quantity": "2"
        },
        {
          "itemNumber": "TATN-80",
          "operationSequence": 20,
          "quantity": "4"
        }
      ],
      "number": "TO4711-1",
      "operations": [
        {
          "name": "Kapning",
          "resourceGroupCode": "PG10",
          "runMinutesPerUnit": "6",
          "sequence": 10,
          "setupMinutes": 15
        },
        {
          "name": "Montering",
          "plannedMinutes": 120,
          "resourceGroupCode": "PG30",
          "sequence": 20
        }
      ],
      "outputItemNumber": "CYL-80-40-500",
      "plannedEnd": "2026-12-01",
      "plannedOutputQuantity": "4",
      "plannedStart": "2026-12-01",
      "salesOrderLineNumber": 2,
      "salesOrderNumber": "SO-2026-00142",
      "title": "Cylinder 80/40-500",
      "warehouseCode": "HUVUD"
    }
  ]
}
Response 200
{
  "createdCount": 42,
  "existsCount": 42,
  "failedCount": 42,
  "results": [
    {
      "error": {
        "code": "string",
        "detail": "string"
      },
      "index": 42,
      "materialCount": 42,
      "operationCount": 42,
      "outcome": "string",
      "status": "Draft",
      "workOrderNumber": "WO-2026-0620"
    }
  ]
}

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.

BatchCreateWorkOrdersMaterial

BatchCreateWorkOrdersMaterial
Field Type Description
alreadyIssuedQuantity decimal · nullable Quantity already taken out of stock in the system you migrate from. It is recorded as consumed on the work order **without an inventory movement**, and is never reserved against stock — the opening balance you loaded is already reduced by it. Only the rest of quantity becomes demand. May exceed quantity when more was issued than planned.
itemNumber Required string The component item. Must exist.
operationSequence integer · nullable The operation the material is used in — a sequence among the row's operations.
quantity Required decimal Planned quantity for the whole order (not per unit), in the item's base unit. Greater than 0.

BatchCreateWorkOrdersOperation

BatchCreateWorkOrdersOperation
Field Type Description
description string · nullable Instructions or notes for the operation.
name Required string What is done in the operation.
plannedMinutes integer · nullable Planned duration of the whole operation in minutes. Omit to have it computed as setupMinutes + runMinutesPerUnit × plannedOutputQuantity , the formula Fluit uses when it plans from the item's routing.
resourceGroupCode string · nullable Code of the resource group (work centre) the operation is planned on. Must exist.
runMinutesPerUnit decimal · nullable Run time per produced unit, in minutes. 0 or more.
sequence integer Order of the operation within the work order, e.g. 10, 20, 30. Unique within the row.
setupMinutes integer Setup time in minutes. 0 or more.

BatchCreateWorkOrdersRow

BatchCreateWorkOrdersRow
Field Type Description
description string · nullable Longer description.
explodeFromItem boolean true takes the materials and operations from the output item's bill of materials and routing, scaled to the quantity — like *Plan* in the app. Only with neither operations nor materials on the row.
materials BatchCreateWorkOrdersMaterial[] · nullable The materials. Omit for an order without materials.
number Required string The work order number — your key. Keep the old system's number (e.g. TO4711-2 ). A number that already exists answers exists and leaves that order as it is.
operations BatchCreateWorkOrdersOperation[] · nullable The routing. Omit for an order without operations.
outputItemNumber Required string The item produced. Must exist.
plannedEnd string(date-time) · nullable Planned end. May be the same as plannedStart , not before it.
plannedOutputQuantity Required decimal Quantity to produce. Greater than 0.
plannedStart string(date-time) · nullable Planned start. A date ( yyyy-MM-dd ) or a UTC timestamp.
salesOrderLineNumber integer · nullable The line on that sales order, by the lineNumber GET /preview/orders/{orderNumber} shows. Needs salesOrderNumber .
salesOrderNumber string · nullable The sales order the work order produces for. Its customer becomes the order's customer.
title Required string Short title of the order.
warehouseCode Required string The warehouse the output is received into and the materials are taken from. Must exist.

BatchCreateWorkOrdersRowError

BatchCreateWorkOrdersRowError
Field Type
code string · nullable
detail string · nullable

BatchCreateWorkOrdersRowResult

BatchCreateWorkOrdersRowResult
Field Type Description
error BatchCreateWorkOrdersRowError
index integer Zero-based position of the row in the request.
materialCount integer Material lines on the created order.
operationCount integer Operations on the created order.
outcome string · nullable created , exists (an order with that number was already there and was left as it is) or failed .
status enum Work order status values exposed via the Public API. Mirrors Domain.WorkOrders.WorkOrderStatus name-for-name and value-for-value so the query projections can cast directly — a cast is translatable to SQL where a switch over a helper method is not. PublicWorkOrderEnumParityTests fails the build if the two ever drift apart, which is what stops a new domain value from silently serialising as a bare number. Draft Planned Waiting Active Paused Completed Closed Cancelled Estimate
workOrderNumber string · nullable The row's number, as sent (trimmed).