Hoppa till innehållet

Lager

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.

11 anrop POST GET Bas-URL https://api.erp.fluit.cloud/preview

Autentisering, felkoder, rate limits, idempotens och paginering gäller alla anrop och står samlade under Kom igång.

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.

Visa hela beskrivningen

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 krävs

Fält Typ Beskrivning
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 Krävs string Item to adjust.
locationCode Krävs string Location within the warehouse.
notes string · nullable Reason for the adjustment. Recommended — this is the audit trail.
quantity Krävs 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 Krävs string Warehouse the stock sits in.

Svar

201 PublicInventoryTransactionResponse
  • Location — URL of the newly created resource.
Fält Typ Beskrivning
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.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standardfel: 401 403 409 Felhantering

Exempel

curl
curl -X POST "https://api.erp.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"
}
Svar 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"
}

Bas-URL https://api.erp.fluit.cloud/preview. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

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.

Visa hela beskrivningen

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

Frågeparametrar

Fält Typ
itemNumber string
batchNumber string
expiringWithinDays integer
inStockOnly boolean
page integer
pageSize integer

Svar

200 PagedResult_BatchesPublicBatchResponse

Paginerat svar: raderna nedan ligger i items[], omgivna av totalCount, page, pageSize, totalPages, hasPreviousPage och hasNextPage. Paginerad

Fält Typ
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

Standardfel: 401 403 404 Felhantering

Exempel

curl
curl "https://api.erp.fluit.cloud/preview/inventory/batches" \
  -H "X-Api-Key: fluit_live_sk_..."
Svar 200
{
  "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
}

Bas-URL https://api.erp.fluit.cloud/preview. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

GET /inventory/counts

List inventory counts

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

Frågeparametrar

Fält Typ Beskrivning
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.

Svar

200 PagedResult_PublicInventoryCountResponse

Paginerat svar: raderna nedan ligger i items[], omgivna av totalCount, page, pageSize, totalPages, hasPreviousPage och hasNextPage. Paginerad

Fält Typ Beskrivning
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.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standardfel: 401 403 Felhantering

Exempel

curl
curl "https://api.erp.fluit.cloud/preview/inventory/counts" \
  -H "X-Api-Key: fluit_live_sk_..."
Svar 200
{
  "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
}

Bas-URL https://api.erp.fluit.cloud/preview. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

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.

Visa hela beskrivningen

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 krävs

Fält Typ Beskrivning
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 Krävs enum Full Location Category ABC Random Impulse
warehouseCode Krävs string Warehouse to count.
zoneFilter string · nullable Zone to limit the count to. Used with type Location.

Svar

201 PublicInventoryCountResponse
  • Location — URL of the newly created resource.
Fält Typ Beskrivning
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.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standardfel: 401 403 409 Felhantering

Exempel

curl
curl -X POST "https://api.erp.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"
}
Svar 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"
}

Bas-URL https://api.erp.fluit.cloud/preview. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

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 Stödjer ETag

Sökvägsparametrar

Fält Typ Beskrivning
countNumber Krävs string Count number of the inventory count to read.

Svar

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.
Fält Typ Beskrivning
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 Tom 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.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standardfel: 401 403 Felhantering

Exempel

curl
curl "https://api.erp.fluit.cloud/preview/inventory/counts/{countNumber}" \
  -H "X-Api-Key: fluit_live_sk_..."
Svar 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"
}

Bas-URL https://api.erp.fluit.cloud/preview. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

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.

Visa hela beskrivningen

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.

Sökvägsparametrar

Fält Typ Beskrivning
countNumber Krävs string Count number of the inventory count to post to stock.

Svar

200 PublicInventoryCountResponse
Fält Typ Beskrivning
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.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
404 ProblemDetails No inventory count with that count number.
Fält Typ
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.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standardfel: 401 403 Felhantering

Exempel

curl
curl -X POST "https://api.erp.fluit.cloud/preview/inventory/counts/{countNumber}/apply" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)"
Svar 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"
}

Bas-URL https://api.erp.fluit.cloud/preview. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

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.

Sökvägsparametrar

Fält Typ
itemNumber Krävs string
batchNumber Krävs string

Body

Fält Typ
reason string · nullable

Svar

204 Tom body.

Standardfel: 400 401 403 404 Felhantering

Exempel

curl
curl -X POST "https://api.erp.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

Bas-URL https://api.erp.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. DeliveredTo lists one entry per sales order with the quantity that order received.

inventory:read

Sökvägsparametrar

Fält Typ
itemNumber Krävs string
batchNumber Krävs string

Svar

200 BatchesPublicBatchTraceResponse
Fält Typ
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

Standardfel: 401 403 404 Felhantering

Exempel

curl
curl "https://api.erp.fluit.cloud/preview/inventory/items/{itemNumber}/batches/{batchNumber}/trace" \
  -H "X-Api-Key: fluit_live_sk_..."
Svar 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"
}

Bas-URL https://api.erp.fluit.cloud/preview. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

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.

Visa hela beskrivningen

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 krävs

Fält Typ Beskrivning
batchNumber string · nullable Batch / lot number, for batch-tracked items.
fromLocationCode Krävs string Location to move stock out of.
itemNumber Krävs string Item to move.
moveAllocations boolean Move existing allocations along with the stock. Default false, which leaves allocated quantities pointing at the source location and can block picking.
notes string · nullable Free-text notes stored on the movement.
quantity Krävs decimal Quantity to move. Must be greater than zero.
serialNumber string · nullable Serial number, for serial-tracked items.
toLocationCode Krävs string Location to move stock into.
warehouseCode Krävs string Warehouse the move happens in. Both locations must belong to it.

Svar

200 CreateInventoryMovementResponse
Fält Typ Beskrivning
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.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standardfel: 401 403 409 Felhantering

Exempel

curl
curl -X POST "https://api.erp.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"
}
Svar 200
{
  "fromLocationBalance": "299.00",
  "quantityMoved": "10",
  "toLocationBalance": "299.00"
}

Bas-URL https://api.erp.fluit.cloud/preview. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

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.

Visa hela beskrivningen

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 Paginerad

Frågeparametrar

Fält Typ Beskrivning
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.

Svar

200 PagedResult_PublicInventoryTransactionResponse

Paginerat svar: raderna nedan ligger i items[], omgivna av totalCount, page, pageSize, totalPages, hasPreviousPage och hasNextPage. Paginerad

Fält Typ Beskrivning
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.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standardfel: 401 403 Felhantering

Exempel

curl
curl "https://api.erp.fluit.cloud/preview/inventory/transactions" \
  -H "X-Api-Key: fluit_live_sk_..."
Svar 200
{
  "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
}

Bas-URL https://api.erp.fluit.cloud/preview. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

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.

Visa hela beskrivningen

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.

inventory:read

Sökvägsparametrar

Fält Typ Beskrivning
transactionId Krävs string(uuid) Id of the ledger entry, as returned in transactionId by the adjustment and transaction list endpoints.

Svar

200 PublicInventoryTransactionResponse
Fält Typ Beskrivning
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.
404 ProblemDetails No stock movement with that id.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standardfel: 401 403 Felhantering

Exempel

curl
curl "https://api.erp.fluit.cloud/preview/inventory/transactions/{transactionId}" \
  -H "X-Api-Key: fluit_live_sk_..."
Svar 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"
}

Bas-URL https://api.erp.fluit.cloud/preview. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

Scheman

Objekten som gruppens anrop refererar till. Fälttabellerna ovan går ett steg djupt och länkar hit i stället för att upprepa samma schema på varje endpoint.

BatchesPublicBatchDelivery

BatchesPublicBatchDelivery
Fält Typ
customerName string · nullable
customerNumber string · nullable
quantity decimal
salesOrderNumber string · nullable
shippedDate string(date-time)