Hoppa till innehållet

Inventory

Stock on hand, the stock ledger and the operations that move it: adjustments, relocations and physical counts. Availability per item lives under Items; this tag covers what has happened and how to change it.

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

POST /inventory/adjustments

Adjust stock at a location

Books a manual stock movement and returns the resulting ledger entry in the same shape as GET /preview/inventory/transactions/{transactionId}, so the balance after the movement is readable without a second request. quantity is a signed delta, not a target balance: -3 writes off three units, +3 adds three.

Show the full description

Zero is rejected. transactionType defaults to Adjustment; Scrap is the other allowed value and always reduces stock, so it requires a negative quantity. Receipt, Issue and Transfer belong to the purchase, picking and transfer flows and are rejected here — booking them without their counterpart would leave the ledger inconsistent with the documents behind it. Returning goods to stock is done through the return flow, POST /preview/returns/{returnNumber}/receive. The movement is booked at the location's current average cost; there is no way to set a cost here, because neither an adjustment nor a scrap revalues stock. Use a revaluation for that. Reducing below the quantity on hand at that location returns 409. Known error codes: Item.NotFound, Warehouse.NotFound, WarehouseLocation.NotFound, Inventory.InsufficientStock, Inventory.NoStockAtLocation.

Body required

Field Type Description
batchNumber string · nullable Batch (lot) the movement applies to. Required when the item is batch tracked in this warehouse; the batch must already exist. Omitting it on a tracked item returns 400.
itemNumber Required string Item to adjust.
locationCode Required string Location within the warehouse.
notes string · nullable Reason for the adjustment. Recommended — this is the audit trail.
quantity Required decimal Signed change. Positive increases stock, negative decreases it. This is a delta, not the new balance — pass -3 to write off three units.
serialNumber string · nullable Serial number the movement applies to. Required when the item is serial tracked.
transactionType enum How to classify the movement: Adjustment (default) or Scrap. Receipt, Issue and Transfer are produced by their own flows and are rejected here; Return belongs to the return flow. Receipt Issue Adjustment Transfer Return Scrap ConsignmentConsumption Revaluation
warehouseCode Required string Warehouse the stock sits in.

Responses

201 PublicInventoryTransactionResponse
  • Location — URL of the newly created resource.
Field Type Description
averageCostAfter decimal Average cost after the movement, in the tenant's base currency.
balanceAfter decimal On-hand quantity after the movement. Serialised as a decimal string.
batchNumber string · nullable Batch / lot number, for batch-tracked items.
itemNumber string · nullable Item number the movement applies to.
locationCode string · nullable Location code within the warehouse.
notes string · nullable Free-text notes stored on the movement.
quantity decimal Signed quantity: positive increases stock, negative decreases it. Serialised as a decimal string.
referenceId string · nullable Identifier of the originating record, as text. Null if manual.
referenceType string · nullable What the movement originated from, e.g. SalesOrder , PurchaseOrder . Null if manual.
serialNumber string · nullable Serial number, for serial-tracked items.
targetLocationCode string · nullable Destination location code. Only set on Transfer movements.
transactionDate string(date-time) UTC timestamp of the movement.
transactionId string(uuid) Internal unique identifier of the transaction (UUID v7). Stable, use it to deduplicate.
transactionType enum What caused a stock movement. Mirrors the internal transaction types. Receipt Issue Adjustment Transfer Return Scrap ConsignmentConsumption Revaluation
unitCost decimal · nullable Unit cost booked on the movement, in the tenant's base currency.
warehouseCode string · nullable Warehouse code the movement happened in.
400 ProblemDetails The quantity is zero, a Scrap was sent with a positive quantity, the transaction type may not be booked manually, the item, warehouse or location does not exist, or the adjustment would take the location below zero.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 409 Errors

Examples

curl
curl -X POST "https://api.fluit.cloud/preview/inventory/adjustments" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d @body.json
Scrap one unit
{
  "itemNumber": "ART-1001",
  "locationCode": "A-01-01",
  "notes": "Quality inspection reject, NCR-2026-0042",
  "quantity": "-1",
  "transactionType": "Scrap",
  "warehouseCode": "HUVUD"
}
Write off three units
{
  "itemNumber": "ART-1001",
  "locationCode": "A-01-01",
  "notes": "Damaged in handling",
  "quantity": "-3",
  "warehouseCode": "HUVUD"
}
Response 201
{
  "averageCostAfter": "299.00",
  "balanceAfter": "299.00",
  "batchNumber": "ABC-001",
  "itemNumber": "WIDGET-A",
  "locationCode": "STD",
  "notes": "string",
  "quantity": "10",
  "referenceId": "string",
  "referenceType": "string",
  "serialNumber": "ABC-001",
  "targetLocationCode": "STD",
  "transactionDate": "2026-06-11T09:24:13.418",
  "transactionId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "transactionType": "Receipt",
  "unitCost": "299.00",
  "warehouseCode": "MAIN"
}

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 /inventory/batches

List batches

Lists batches (lots) with expiry, status and current stock, sorted by expiry date so the batch that expires first comes first.

Show the full description

Filter with itemNumber for a single article, batchNumber to search by lot number (also matches the supplier's own lot number), expiringWithinDays to find batches close to expiry, and inStockOnly to skip batches without remaining stock. Check IsPickable before selling from a batch — a blocked, quarantined, recalled or expired batch reports false.

inventory:read

Query parameters

Field Type
itemNumber string
batchNumber string
expiringWithinDays integer
inStockOnly boolean
page integer
pageSize integer

Responses

200 PagedResult_BatchesPublicBatchResponse

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

Field Type
batchNumber string · nullable
bestBeforeDate string(date) · nullable
daysUntilExpiry integer · nullable
expiryDate string(date) · nullable
isPickable boolean
isRecalled boolean
itemName string · nullable
itemNumber string · nullable
quantityOnHand decimal
receivedDate string(date) · nullable
status string · nullable
supplierBatchNumber string · nullable
supplierName string · nullable

Standard errors: 401 403 404 Errors

Examples

curl
curl "https://api.fluit.cloud/preview/inventory/batches" \
  -H "X-Api-Key: fluit_live_sk_..."
Response 200
{
  "aggregates": [
    {
      "currencyCode": "SEK",
      "key": "string",
      "mixedCurrencies": true,
      "value": "299.00"
    }
  ],
  "hasNextPage": true,
  "hasPreviousPage": true,
  "items": [
    {
      "batchNumber": "ABC-001",
      "bestBeforeDate": "2026-06-11",
      "daysUntilExpiry": 42,
      "expiryDate": "2026-06-11",
      "isPickable": true,
      "isRecalled": true,
      "itemName": "Widget A",
      "itemNumber": "WIDGET-A",
      "quantityOnHand": "10",
      "receivedDate": "2026-06-11",
      "status": "string",
      "supplierBatchNumber": "ABC-001",
      "supplierName": "Nordic Components AB"
    }
  ],
  "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 /inventory/counts

List inventory counts

Returns a paginated list of physical inventory counts, sorted by countNumber.

Query parameters

Field Type Description
status enum Filters on how far the count has got. Draft InProgress Completed Applied Cancelled
warehouseCode string Returns only the counts made in this warehouse.
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_PublicInventoryCountResponse

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

Field Type Description
appliedAt string(date-time) · nullable UTC timestamp when the differences were posted to stock. Null until applied.
completedAt string(date-time) · nullable UTC timestamp when counting finished. Null until completed.
countNumber string · nullable Unique count number.
countedLines integer Number of lines counted so far.
createdDate string(date-time) UTC timestamp when the count was created.
description string · nullable Free-text description. Null if not set.
linesWithVariance integer Number of counted lines that differ from the recorded quantity.
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 when the count was last modified. Null if never modified.
startedAt string(date-time) · nullable UTC timestamp when counting started. Null while Draft.
status enum Status of a physical inventory count. Draft InProgress Completed Applied Cancelled
totalLines integer Total number of lines to count.
totalVarianceValue decimal Total value of the variances, in the tenant's base currency.
type string · nullable What determined the scope: Full, Location, Category, ABC, Random or Impulse.
warehouseCode string · nullable Warehouse the count covers.
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/inventory/counts" \
  -H "X-Api-Key: fluit_live_sk_..."
Response 200
{
  "aggregates": [
    {
      "currencyCode": "SEK",
      "key": "string",
      "mixedCurrencies": true,
      "value": "299.00"
    }
  ],
  "hasNextPage": true,
  "hasPreviousPage": true,
  "items": [
    {
      "appliedAt": "2026-06-11T09:24:13.418",
      "completedAt": "2026-06-11T09:24:13.418",
      "countNumber": "CNT-2026-0009",
      "countedLines": 42,
      "createdDate": "2026-06-11T09:24:13.418",
      "description": "string",
      "linesWithVariance": 42,
      "links": {
        "self": "string"
      },
      "modifiedDate": "2026-06-11T09:24:13.418",
      "startedAt": "2026-06-11T09:24:13.418",
      "status": "Draft",
      "totalLines": 42,
      "totalVarianceValue": "299.00",
      "type": "string",
      "warehouseCode": "MAIN"
    }
  ],
  "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 /inventory/counts

Create an inventory count

Creates a physical inventory count and generates its lines from the chosen type and filters. Returns it in the same shape as GET /preview/inventory/counts/{countNumber}. type must be Full, Location, Category, Random or Impulse.

Show the full description

Each type has a required companion field: Location takes zoneFilter or locationCodeFilter, Category takes categoryCode, Random takes randomSampleSize and Impulse takes itemNumber. ABC counts are not available through this API yet — the selection is not implemented server-side, and exposing it would produce a count covering the whole warehouse rather than the chosen class. The count starts in Draft; set autoStart=true to go straight to InProgress. Counting itself happens in the warehouse app — this API creates the count and, once it is Completed, posts the differences with POST /preview/inventory/counts/{countNumber}/apply. blindCount=true (the default) hides the recorded quantity from the counter, which is what makes the count independent evidence rather than a confirmation of what the system already believes. Known error codes: Warehouse.NotFound, Item.NotFound, InventoryCount.NoLinesGenerated.

Body required

Field Type Description
autoStart boolean Move straight to InProgress instead of Draft. Default false.
blindCount boolean Hide the recorded quantity from the counter. Default true.
categoryCode string · nullable Item category to count. Required for type Category.
description string · nullable Free-text description of the count.
itemNumber string · nullable Item to count. Required for type Impulse.
locationCodeFilter string · nullable Location code prefix to limit the count to. Used with type Location.
randomSampleSize integer · nullable Number of locations to sample. Required for type Random.
type Required enum Full Location Category ABC Random Impulse Opening
warehouseCode Required string Warehouse to count.
zoneFilter string · nullable Zone to limit the count to. Used with type Location.

Responses

201 PublicInventoryCountResponse
  • Location — URL of the newly created resource.
Field Type Description
appliedAt string(date-time) · nullable UTC timestamp when the differences were posted to stock. Null until applied.
completedAt string(date-time) · nullable UTC timestamp when counting finished. Null until completed.
countNumber string · nullable Unique count number.
countedLines integer Number of lines counted so far.
createdDate string(date-time) UTC timestamp when the count was created.
description string · nullable Free-text description. Null if not set.
linesWithVariance integer Number of counted lines that differ from the recorded quantity.
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 when the count was last modified. Null if never modified.
startedAt string(date-time) · nullable UTC timestamp when counting started. Null while Draft.
status enum Status of a physical inventory count. Draft InProgress Completed Applied Cancelled
totalLines integer Total number of lines to count.
totalVarianceValue decimal Total value of the variances, in the tenant's base currency.
type string · nullable What determined the scope: Full, Location, Category, ABC, Random or Impulse.
warehouseCode string · nullable Warehouse the count covers.
400 ProblemDetails The count type is not available through this API, the field that type requires is missing, or the warehouse, item or category does not exist.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 409 Errors

Examples

curl
curl -X POST "https://api.fluit.cloud/preview/inventory/counts" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d @body.json
Zone count, started immediately
{
  "autoStart": true,
  "blindCount": true,
  "description": "Quarterly count, zone A",
  "type": "Location",
  "warehouseCode": "HUVUD",
  "zoneFilter": "A"
}
Full count of a warehouse
{
  "type": "Full",
  "warehouseCode": "HUVUD"
}
Response 201
{
  "appliedAt": "2026-06-11T09:24:13.418",
  "completedAt": "2026-06-11T09:24:13.418",
  "countNumber": "CNT-2026-0009",
  "countedLines": 42,
  "createdDate": "2026-06-11T09:24:13.418",
  "description": "string",
  "linesWithVariance": 42,
  "links": {
    "self": "string"
  },
  "modifiedDate": "2026-06-11T09:24:13.418",
  "startedAt": "2026-06-11T09:24:13.418",
  "status": "Draft",
  "totalLines": 42,
  "totalVarianceValue": "299.00",
  "type": "string",
  "warehouseCode": "MAIN"
}

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 /inventory/counts/{countNumber}

Get an inventory count by count number

Returns a physical inventory count with its progress: how many lines exist, how many have been counted, how many differ from the recorded quantity and what those differences are worth. Responses carry a weak ETag; pass it back in If-None-Match to get 304 Not Modified while the record is unchanged.

inventory:read Supports ETag

Path parameters

Field Type Description
countNumber Required string Count number of the inventory count to read.

Responses

200 PublicInventoryCountResponse
  • 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
appliedAt string(date-time) · nullable UTC timestamp when the differences were posted to stock. Null until applied.
completedAt string(date-time) · nullable UTC timestamp when counting finished. Null until completed.
countNumber string · nullable Unique count number.
countedLines integer Number of lines counted so far.
createdDate string(date-time) UTC timestamp when the count was created.
description string · nullable Free-text description. Null if not set.
linesWithVariance integer Number of counted lines that differ from the recorded quantity.
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 when the count was last modified. Null if never modified.
startedAt string(date-time) · nullable UTC timestamp when counting started. Null while Draft.
status enum Status of a physical inventory count. Draft InProgress Completed Applied Cancelled
totalLines integer Total number of lines to count.
totalVarianceValue decimal Total value of the variances, in the tenant's base currency.
type string · nullable What determined the scope: Full, Location, Category, ABC, Random or Impulse.
warehouseCode string · nullable Warehouse the count covers.
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 inventory count with that count 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/inventory/counts/{countNumber}" \
  -H "X-Api-Key: fluit_live_sk_..."
Response 200
{
  "appliedAt": "2026-06-11T09:24:13.418",
  "completedAt": "2026-06-11T09:24:13.418",
  "countNumber": "CNT-2026-0009",
  "countedLines": 42,
  "createdDate": "2026-06-11T09:24:13.418",
  "description": "string",
  "linesWithVariance": 42,
  "links": {
    "self": "string"
  },
  "modifiedDate": "2026-06-11T09:24:13.418",
  "startedAt": "2026-06-11T09:24:13.418",
  "status": "Draft",
  "totalLines": 42,
  "totalVarianceValue": "299.00",
  "type": "string",
  "warehouseCode": "MAIN"
}

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 /inventory/counts/{countNumber}/apply

Apply an inventory count

Posts the counted differences to stock: every line whose counted quantity differs from the recorded one produces an Adjustment movement in the ledger, and the count moves to Applied.

Show the full description

Returns the count so the caller can see the posted variance without a second request. This is irreversible — the resulting movements can only be undone by counting again or adjusting manually. The count must be Completed; applying a Draft or InProgress count returns 409, as does applying one that is already Applied. Read the resulting movements from GET /preview/inventory/transactions with ?transactionType=Adjustment.

Path parameters

Field Type Description
countNumber Required string Count number of the inventory count to post to stock.

Responses

200 PublicInventoryCountResponse
Field Type Description
appliedAt string(date-time) · nullable UTC timestamp when the differences were posted to stock. Null until applied.
completedAt string(date-time) · nullable UTC timestamp when counting finished. Null until completed.
countNumber string · nullable Unique count number.
countedLines integer Number of lines counted so far.
createdDate string(date-time) UTC timestamp when the count was created.
description string · nullable Free-text description. Null if not set.
linesWithVariance integer Number of counted lines that differ from the recorded quantity.
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 when the count was last modified. Null if never modified.
startedAt string(date-time) · nullable UTC timestamp when counting started. Null while Draft.
status enum Status of a physical inventory count. Draft InProgress Completed Applied Cancelled
totalLines integer Total number of lines to count.
totalVarianceValue decimal Total value of the variances, in the tenant's base currency.
type string · nullable What determined the scope: Full, Location, Category, ABC, Random or Impulse.
warehouseCode string · nullable Warehouse the count covers.
400 ProblemDetails The count still has uncounted lines, or it has no lines at all.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
404 ProblemDetails No inventory count with that count number.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
409 ProblemDetails The count is not Completed — a Draft or InProgress count has nothing final to post, and an Applied count has already been posted.
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/inventory/counts/{countNumber}/apply" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)"
Response 200
{
  "appliedAt": "2026-06-11T09:24:13.418",
  "completedAt": "2026-06-11T09:24:13.418",
  "countNumber": "CNT-2026-0009",
  "countedLines": 42,
  "createdDate": "2026-06-11T09:24:13.418",
  "description": "string",
  "linesWithVariance": 42,
  "links": {
    "self": "string"
  },
  "modifiedDate": "2026-06-11T09:24:13.418",
  "startedAt": "2026-06-11T09:24:13.418",
  "status": "Draft",
  "totalLines": 42,
  "totalVarianceValue": "299.00",
  "type": "string",
  "warehouseCode": "MAIN"
}

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 /inventory/items/{itemNumber}/batches/{batchNumber}/block

Block a batch

Blocks a batch so it can no longer be allocated or picked. Use this when an external quality system rejects a lot. The block applies to every location holding the batch. Blocking an already rejected batch returns 400.

Path parameters

Field Type
itemNumber Required string
batchNumber Required string

Body

Field Type
reason string · nullable

Responses

204 Empty body.

Standard errors: 400 401 403 404 Errors

Examples

curl
curl -X POST "https://api.fluit.cloud/preview/inventory/items/{itemNumber}/batches/{batchNumber}/block" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d @body.json

Base URL https://api.fluit.cloud/preview.

GET /inventory/items/{itemNumber}/batches/{batchNumber}/trace

Trace a batch

Returns where a batch came from and which customers received it — one step back and one step forward. Use this to answer a recall question from an external system: given a lot number, which sales orders and customers are affected.

Show the full description

DeliveredTo lists one entry per sales order with the quantity that order received. Responses carry a weak ETag; pass it back in If-None-Match to get 304 Not Modified while the record is unchanged.

inventory:read Supports ETag

Path parameters

Field Type
itemNumber Required string
batchNumber Required string

Responses

200 BatchesPublicBatchTraceResponse
  • 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
batchNumber string · nullable
deliveredTo BatchesPublicBatchDelivery[] · nullable
itemNumber string · nullable
purchaseOrderNumber string · nullable
quantityDelivered decimal
quantityOnHand decimal
quantityReceived decimal
status string · nullable
supplierBatchNumber string · nullable
supplierName string · nullable
workOrderNumber string · nullable
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.

Standard errors: 401 403 404 Errors

Examples

curl
curl "https://api.fluit.cloud/preview/inventory/items/{itemNumber}/batches/{batchNumber}/trace" \
  -H "X-Api-Key: fluit_live_sk_..."
Response 200
{
  "batchNumber": "ABC-001",
  "deliveredTo": [
    {
      "customerName": "Acme AB",
      "customerNumber": "CUST-001",
      "quantity": "10",
      "salesOrderNumber": "ABC-001",
      "shippedDate": "2026-06-11T09:24:13.418"
    }
  ],
  "itemNumber": "WIDGET-A",
  "purchaseOrderNumber": "ABC-001",
  "quantityDelivered": "10",
  "quantityOnHand": "10",
  "quantityReceived": "10",
  "status": "string",
  "supplierBatchNumber": "ABC-001",
  "supplierName": "Nordic Components AB",
  "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 /inventory/movements

Move stock between locations

Relocates stock within one warehouse and returns the resulting balances at both locations. Returns 200 rather than 201 because a move produces two ledger entries rather than one addressable resource — read them back from GET /preview/inventory/transactions with ?transactionType=Transfer.

Show the full description

Both locations must belong to warehouseCode; moving between warehouses is a transfer order, not a movement. Set moveAllocations=true when relocating stock that is already allocated to orders — otherwise the allocations keep pointing at the source location and picking will fail there. Known error codes: Item.NotFound, Warehouse.NotFound, WarehouseLocation.NotFound, Inventory.InsufficientStock.

Body required

Field Type Description
batchNumber string · nullable Batch / lot number, for batch-tracked items.
fromLocationCode Required string Location to move stock out of.
itemNumber Required string Item to move.
moveAllocations boolean Allow hard-allocated stock to be moved. Free stock moves first; allocations follow only for the quantity that exceeds it, so the source keeps its allocations wherever possible. Default false, which rejects a move larger than the free quantity.
notes string · nullable Free-text notes stored on the movement.
quantity Required decimal Quantity to move. Must be greater than zero.
serialNumber string · nullable Serial number, for serial-tracked items.
toLocationCode Required string Location to move stock into.
warehouseCode Required string Warehouse the move happens in. Both locations must belong to it.

Responses

200 CreateInventoryMovementResponse
Field Type Description
fromLocationBalance decimal On-hand quantity left at the source location.
quantityMoved decimal Quantity that was moved. Serialised as a decimal string.
toLocationBalance decimal On-hand quantity at the destination location after the move.
400 ProblemDetails Source and destination location are the same, the item, warehouse or either location does not exist, or the source location does not hold that quantity.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 409 Errors

Examples

curl
curl -X POST "https://api.fluit.cloud/preview/inventory/movements" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d @body.json
Move allocated batch-tracked stock
{
  "batchNumber": "L-2026-14",
  "fromLocationCode": "A-01-01",
  "itemNumber": "ART-1001",
  "moveAllocations": true,
  "notes": "Replenish pick face",
  "quantity": "4",
  "toLocationCode": "PLOCK-03",
  "warehouseCode": "HUVUD"
}
Move ten units
{
  "fromLocationCode": "INKOMMANDE",
  "itemNumber": "ART-1001",
  "quantity": "10",
  "toLocationCode": "A-01-01",
  "warehouseCode": "HUVUD"
}
Response 200
{
  "fromLocationBalance": "299.00",
  "quantityMoved": "10",
  "toLocationBalance": "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 /inventory/opening-balance/batch

Load opening stock with its unit cost

Loads the opening stock of one or more warehouses — quantity *and* value — for a migration. Up to 500 rows per call. Use this instead of POST /preview/inventory/adjustments, which books at the location's current average cost and therefore values new stock at zero.

Show the full description

Each row is booked the way the app's *Opening balance* Excel import books it: the item-warehouse row, the stock record, the batch and the serial number are created when missing, unitCost becomes the stock's average cost, and a row without locationCode lands on the warehouse's default location. Per warehouse the accepted rows become one opening inventory count that is completed and applied in the same call; the movements are dated to cutoverDate , and the value is registered according to posting . Read the result back with GET /preview/inventory/counts/{countNumber}, the quantities with GET /preview/inventory/availability, and the value with the MCP tool query_GetInventoryReport . **Stock that already exists is rejected, never added to.** A row whose item already has stock at that location (same batch or serial number) fails with OpeningBalance.StockExists ; the quantity is not added and the average cost is not recalculated. That is what makes a re-sent batch harmless — rows that were loaded the first time fail instead of doubling. A warehouse that already has movements other than an opening balance fails every row with OpeningBalance.WarehouseInOperation , and every batch for a warehouse must use the same cutoverDate ( OpeningBalance.CutoverMismatch ). The HTTP status describes the request, not the rows: a well-formed batch answers 200, and every row carries its own outcome ( created or failed ) plus an error when it failed. Row errors include Inventory.ItemNotFound , Inventory.LocationNotFound , Inventory.WarehouseNotFound , OpeningBalance.NotStockItem , OpeningBalance.UnitCostMissing , OpeningBalance.QuantityMustBePositive , OpeningBalance.DuplicateInFile (the same item/location/batch/serial twice in the batch) and the tracking errors. Rows for one warehouse that pass validation are applied together, in one transaction. Decimals are JSON strings. An Idempotency-Key is required like on every POST under /preview; derive it from the run and the batch index.

Body required

Field Type Description
cutoverDate Required string(date) The date the stock is valued at — normally the day after the old system's last day. The movements are dated to it, and the warehouse's inventory posting starts from it. Every batch for the same warehouse must use the same date. Must not be in the future.
description string · nullable Description on the inventory counts the batch creates.
openingAccountNumber integer · nullable Credit account (1000–9999). Required with OpeningAccount .
posting enum How the value of an opening balance is recorded in the accounting system. ExistingOpeningBalance OpeningAccount
rows Required BatchLoadOpeningBalanceRow[] The rows to load. At most 500 per call.

Responses

200 BatchLoadOpeningBalanceResponse
Field Type
counts BatchLoadOpeningBalanceCountResult[] · nullable
createdCount integer
failedCount integer
results BatchLoadOpeningBalanceRowResult[] · nullable
totalValue decimal
400 ProblemDetails The batch itself is invalid: more than 500 rows, no rows, a cutoverDate in the future, or OpeningAccount without an openingAccountNumber.
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/inventory/opening-balance/batch" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d @body.json
Two warehouses, default location
{
  "cutoverDate": "2026-11-01",
  "rows": [
    {
      "itemNumber": "670-00001",
      "quantity": "12",
      "unitCost": "84.50",
      "warehouseCode": "HUVUD"
    },
    {
      "itemNumber": "670-00002",
      "locationCode": "A-01-02",
      "quantity": "3",
      "unitCost": "1240.00",
      "warehouseCode": "HUVUD"
    },
    {
      "itemNumber": "670-00001",
      "quantity": "2",
      "unitCost": "84.50",
      "warehouseCode": "SERVICE"
    }
  ]
}
Post the value to an opening account
{
  "cutoverDate": "2026-11-01",
  "openingAccountNumber": 2099,
  "posting": "OpeningAccount",
  "rows": [
    {
      "itemNumber": "670-00001",
      "quantity": "12",
      "unitCost": "84.50",
      "warehouseCode": "HUVUD"
    }
  ]
}
Batch and serial numbers
{
  "cutoverDate": "2026-11-01",
  "rows": [
    {
      "batchNumber": "L2026-41",
      "expiryDate": "2027-10-31",
      "itemNumber": "LIM-200",
      "quantity": "40",
      "unitCost": "18.00",
      "warehouseCode": "HUVUD"
    },
    {
      "itemNumber": "MOTOR-7",
      "quantity": "1",
      "serialNumber": "M7-004411",
      "unitCost": "9800.00",
      "warehouseCode": "HUVUD"
    }
  ]
}
Response 200
{
  "counts": [
    {
      "countNumber": "CNT-2026-0009",
      "lineCount": 42,
      "value": "299.00",
      "warehouseCode": "MAIN"
    }
  ],
  "createdCount": 42,
  "failedCount": 42,
  "results": [
    {
      "countNumber": "CNT-2026-0009",
      "error": {
        "code": "string",
        "detail": "string"
      },
      "index": 42,
      "itemNumber": "WIDGET-A",
      "outcome": "string",
      "warehouseCode": "MAIN"
    }
  ],
  "totalValue": "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 /inventory/transactions

Read the stock ledger

Returns stock movements oldest first, which is the order they should be applied in when mirroring the ledger into another system. Quantity is signed: positive increases stock, negative decreases it.

Show the full description

For incremental reads, page with ?since= and deduplicate on transactionId — movements are never modified or deleted after the fact, so the ledger only ever grows. Sorting is by transactionDate then id, so paging stays deterministic when several movements share a timestamp. Costs are in the tenant's base currency.

inventory:read Paginated

Query parameters

Field Type Description
itemNumber string Returns only the movements of this item.
warehouseCode string Returns only the movements booked in this warehouse.
transactionType enum Filters on what kind of movement it is. Receipt Issue Adjustment Transfer Return Scrap ConsignmentConsumption Revaluation
since string(date-time) Returns only movements booked at or after this instant (ISO 8601 UTC datetime). Set it to the transactionDate of the last row you processed to read incrementally.
until string(date-time) Returns only movements booked at or before this instant (ISO 8601 UTC datetime).
page integer Page to return, 1-based. Default 1.
pageSize integer Number of records per page. Default 50, max 200.

Responses

200 PagedResult_PublicInventoryTransactionResponse

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

Field Type Description
averageCostAfter decimal Average cost after the movement, in the tenant's base currency.
balanceAfter decimal On-hand quantity after the movement. Serialised as a decimal string.
batchNumber string · nullable Batch / lot number, for batch-tracked items.
itemNumber string · nullable Item number the movement applies to.
locationCode string · nullable Location code within the warehouse.
notes string · nullable Free-text notes stored on the movement.
quantity decimal Signed quantity: positive increases stock, negative decreases it. Serialised as a decimal string.
referenceId string · nullable Identifier of the originating record, as text. Null if manual.
referenceType string · nullable What the movement originated from, e.g. SalesOrder , PurchaseOrder . Null if manual.
serialNumber string · nullable Serial number, for serial-tracked items.
targetLocationCode string · nullable Destination location code. Only set on Transfer movements.
transactionDate string(date-time) UTC timestamp of the movement.
transactionId string(uuid) Internal unique identifier of the transaction (UUID v7). Stable, use it to deduplicate.
transactionType enum What caused a stock movement. Mirrors the internal transaction types. Receipt Issue Adjustment Transfer Return Scrap ConsignmentConsumption Revaluation
unitCost decimal · nullable Unit cost booked on the movement, in the tenant's base currency.
warehouseCode string · nullable Warehouse code the movement happened in.
400 ProblemDetails ?transactionType= 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/inventory/transactions" \
  -H "X-Api-Key: fluit_live_sk_..."
Response 200
{
  "aggregates": [
    {
      "currencyCode": "SEK",
      "key": "string",
      "mixedCurrencies": true,
      "value": "299.00"
    }
  ],
  "hasNextPage": true,
  "hasPreviousPage": true,
  "items": [
    {
      "averageCostAfter": "299.00",
      "balanceAfter": "299.00",
      "batchNumber": "ABC-001",
      "itemNumber": "WIDGET-A",
      "locationCode": "STD",
      "notes": "string",
      "quantity": "10",
      "referenceId": "string",
      "referenceType": "string",
      "serialNumber": "ABC-001",
      "targetLocationCode": "STD",
      "transactionDate": "2026-06-11T09:24:13.418",
      "transactionId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "transactionType": "Receipt",
      "unitCost": "299.00",
      "warehouseCode": "MAIN"
    }
  ],
  "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 /inventory/transactions/{transactionId}

Read a stock movement

Returns one entry from the stock ledger. This is the only resource on the public API addressed by an internal id rather than a business key: a ledger entry has no number of its own — it is identified by the movement it records.

Show the full description

The id is the transactionId returned by POST /preview/inventory/adjustments and carried by every row in GET /preview/inventory/transactions. Movements are never modified or deleted after the fact, so a 200 here is stable and safe to cache indefinitely. Responses carry a weak ETag; pass it back in If-None-Match to get 304 Not Modified while the record is unchanged.

inventory:read Supports ETag

Path parameters

Field Type Description
transactionId Required string(uuid) Id of the ledger entry, as returned in transactionId by the adjustment and transaction list endpoints.

Responses

200 PublicInventoryTransactionResponse
  • 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
averageCostAfter decimal Average cost after the movement, in the tenant's base currency.
balanceAfter decimal On-hand quantity after the movement. Serialised as a decimal string.
batchNumber string · nullable Batch / lot number, for batch-tracked items.
itemNumber string · nullable Item number the movement applies to.
locationCode string · nullable Location code within the warehouse.
notes string · nullable Free-text notes stored on the movement.
quantity decimal Signed quantity: positive increases stock, negative decreases it. Serialised as a decimal string.
referenceId string · nullable Identifier of the originating record, as text. Null if manual.
referenceType string · nullable What the movement originated from, e.g. SalesOrder , PurchaseOrder . Null if manual.
serialNumber string · nullable Serial number, for serial-tracked items.
targetLocationCode string · nullable Destination location code. Only set on Transfer movements.
transactionDate string(date-time) UTC timestamp of the movement.
transactionId string(uuid) Internal unique identifier of the transaction (UUID v7). Stable, use it to deduplicate.
transactionType enum What caused a stock movement. Mirrors the internal transaction types. Receipt Issue Adjustment Transfer Return Scrap ConsignmentConsumption Revaluation
unitCost decimal · nullable Unit cost booked on the movement, in the tenant's base currency.
warehouseCode string · nullable Warehouse code the movement happened in.
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 stock movement with that id.
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/inventory/transactions/{transactionId}" \
  -H "X-Api-Key: fluit_live_sk_..."
Response 200
{
  "averageCostAfter": "299.00",
  "balanceAfter": "299.00",
  "batchNumber": "ABC-001",
  "itemNumber": "WIDGET-A",
  "locationCode": "STD",
  "notes": "string",
  "quantity": "10",
  "referenceId": "string",
  "referenceType": "string",
  "serialNumber": "ABC-001",
  "targetLocationCode": "STD",
  "transactionDate": "2026-06-11T09:24:13.418",
  "transactionId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "transactionType": "Receipt",
  "unitCost": "299.00",
  "warehouseCode": "MAIN"
}

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 /warehouse-locations/batch

Create or update many warehouse locations in one call

Creates and updates up to 500 warehouse locations (bins) per call, across warehouses — the step before POST /preview/inventory/opening-balance/batch, which fails a row with Inventory.LocationNotFound when its locationCode does not exist.

Show the full description

The warehouses themselves must exist; list them with GET /preview/reference/warehouses. Each row is identified by warehouseCode and locationCode . A location that exists gets the fields the row carries; a field that is omitted or null is left as it is — this endpoint never clears a field. A location that does not exist is created, as type Default unless the row says otherwise. type cannot be changed afterwards, but sending the type the location already has is accepted, so a re-sent batch updates instead of failing. Rows go through the same rules as the MCP tool action_UpsertWarehouseLocations and the app. The HTTP status describes the request, not the rows: a well-formed batch always answers 200, and every row carries its own outcome ( created , updated or failed ) plus an error when it failed. A bad row never blocks the rest — re-send only the failed rows. Row error codes include BulkUpsert.ParentNotFound (no warehouse with that code), BulkUpsert.CreateOnly (a different type on an existing location), BulkUpsert.DuplicateInBatch (the same location twice in the batch), WarehouseLocation.* validation errors, and with mode set BulkUpsert.AlreadyExists or BulkUpsert.NotFound. mode is upsert (default), create or update . Decimals are JSON strings. An Idempotency-Key is required like on every POST under /preview; derive it from the run and the batch index.

Body required

Field Type Description
locations Required BatchUpsertWarehouseLocationsRow[] The locations to create or update. At most 500 per call.
mode enum upsert (default) creates missing locations and updates existing ones, create fails a row whose location already exists, update fails a row whose location does not. Upsert Create Update

Responses

200 BatchUpsertWarehouseLocationsResponse
Field Type
createdCount integer
failedCount integer
results BatchUpsertWarehouseLocationsRowResult[] · nullable
updatedCount integer
400 ProblemDetails The batch is empty (BulkUpsert.Empty) or has more than 500 rows (BulkUpsert.TooManyRows), a row lacks warehouseCode or locationCode, a field is too long, or mode or type is unknown.
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/warehouse-locations/batch" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d @body.json
Shelves in two warehouses
{
  "locations": [
    {
      "locationCode": "A-01-01",
      "type": "Pick",
      "warehouseCode": "HUVUD"
    },
    {
      "aisle": "A",
      "level": "02",
      "locationCode": "A-01-02",
      "rack": "01",
      "type": "Pick",
      "warehouseCode": "HUVUD"
    },
    {
      "locationCode": "BULK-1",
      "maxWeight": "1200",
      "type": "Bulk",
      "warehouseCode": "SERVICE"
    }
  ]
}
Set the pick sequence on locations that already exist
{
  "locations": [
    {
      "locationCode": "A-01-01",
      "pickSequence": 10,
      "warehouseCode": "HUVUD"
    },
    {
      "locationCode": "A-01-02",
      "pickSequence": 20,
      "warehouseCode": "HUVUD"
    }
  ],
  "mode": "update"
}
Response 200
{
  "createdCount": 42,
  "failedCount": 42,
  "results": [
    {
      "error": {
        "code": "string",
        "detail": "string"
      },
      "index": 42,
      "locationCode": "STD",
      "outcome": "string",
      "warehouseCode": "MAIN"
    }
  ],
  "updatedCount": 42
}

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.

BatchesPublicBatchDelivery

BatchesPublicBatchDelivery
Field Type
customerName string · nullable
customerNumber string · nullable
quantity decimal
salesOrderNumber string · nullable
shippedDate string(date-time)

BatchLoadOpeningBalanceCountResult

BatchLoadOpeningBalanceCountResult
Field Type Description
countNumber string · nullable Read it back with GET /preview/inventory/counts/{countNumber}.
lineCount integer Rows booked in this warehouse.
value decimal Sum of quantity × unit cost for the rows booked in this warehouse.
warehouseCode string · nullable The warehouse the count belongs to.

BatchLoadOpeningBalanceRow

BatchLoadOpeningBalanceRow
Field Type Description
batchNumber string · nullable Batch (lot). Created if it does not exist. Either every row of an item carries one or none does.
expiryDate string(date) · nullable Best-before date of the batch, when the batch is created here.
itemNumber Required string The item. Must be a stock item.
locationCode string · nullable The location within the warehouse. Omit to use the warehouse's default location, which is created if the warehouse has none.
notes string · nullable Kept on the count line.
quantity Required decimal On-hand quantity. Must be greater than zero.
serialNumber string · nullable Serial number. The row's quantity must then be 1.
unitCost Required decimal Cost per unit in the base currency. Becomes the average cost of the stock and, times the quantity, its value. Must be greater than zero.
warehouseCode Required string The warehouse. One batch may span several warehouses.

BatchLoadOpeningBalanceRowError

BatchLoadOpeningBalanceRowError
Field Type
code string · nullable
detail string · nullable

BatchLoadOpeningBalanceRowResult

BatchLoadOpeningBalanceRowResult
Field Type Description
countNumber string · nullable The opening inventory count the row was booked through.
error BatchLoadOpeningBalanceRowError
index integer Zero-based position of the row in the request.
itemNumber string · nullable The row's item number, as sent.
outcome string · nullable created or failed .
warehouseCode string · nullable The row's warehouse code, as sent.

BatchUpsertWarehouseLocationsRow

BatchUpsertWarehouseLocationsRow
Field Type Description
aisle string · nullable Aisle.
isActive boolean · nullable Whether stock can be put on the location. New locations are active.
level string · nullable Shelf level.
locationCode Required string Location code within the warehouse, e.g. A-01-02 . With warehouseCode it identifies the row. Stored in upper case and matched without regard to case. Cannot be changed.
maxItems integer · nullable Maximum number of units. Greater than zero.
maxVolume decimal · nullable Maximum volume in cubic metres. Greater than zero.
maxWeight decimal · nullable Maximum weight in kilograms. Greater than zero.
name string · nullable Display name.
pickPriority integer · nullable Pick priority, 0 or more. 0 when a new location omits it.
pickSequence integer · nullable Order along the pick path.
position string · nullable Position on the shelf.
rack string · nullable Rack.
type enum What a warehouse location is used for. Mirrors the internal location types by number. Default Bulk Pick Receiving Shipping Quarantine Returns Overflow DirectDelivery CrossDock AutomatedStorage
warehouseCode Required string The warehouse. Must exist. One batch may span several warehouses.
zone string · nullable Zone label shown on the location.

BatchUpsertWarehouseLocationsRowError

BatchUpsertWarehouseLocationsRowError
Field Type
code string · nullable
detail string · nullable

BatchUpsertWarehouseLocationsRowResult

BatchUpsertWarehouseLocationsRowResult
Field Type Description
error BatchUpsertWarehouseLocationsRowError
index integer Zero-based position of the row in the request.
locationCode string · nullable The row's location code, as sent.
outcome string · nullable created , updated or failed .
warehouseCode string · nullable The row's warehouse code, as sent.