GoSmarter Logo
GoSmarter API Gateway

Consume inventory stock

POST
https://api.gosmarter.ai
/api/company/{companyId}/inventory/{inventoryId}/consume

Reduces Quantity and/or Weight to record material used up. The other field is computed from the item's current ratio when only one is supplied.

Consume inventory stock › path Parameters

companyId
​string · uuid · required

The unique identifier of the company.

inventoryId
​string · uuid · required

The inventory item to consume from.

Consume inventory stock › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Consume inventory stock › Request Body

quantityUsed
​integer · int32
weightUsed
​number · double

Consume inventory stock › Responses

Consumption successful

inventoryId
​string · uuid
newQuantity
​integer · int32
newWeight
​number · double
newStatus
​integer · int32

List inventory items for a company

GET
https://api.gosmarter.ai
/api/company/{companyId}/inventory-slim

Retrieves all inventory items belonging to the specified company. Supports optimisation scenarios by returning key product and section metadata.

List inventory items for a company › path Parameters

companyId
​string · uuid · required

The unique identifier of the company. Example: 11111111-2222-3333-4444-555555555555

List inventory items for a company › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

List inventory items for a company › Responses

List of inventory items retrieved successfully

createdAt
​string · date-time

Timestamp when the record was created (UTC)

updatedAt
​string · date-time

Timestamp when the record was last updated (UTC)

millCertificationId
​string · uuid

Mill certification ID if inventory is linked to a mill cert via heat code

linkedOrders
​string

JSON array string of linked orders in format '[{"orderId":"...","orderReference":"..."},...]'. '[]' when no orders are linked.

typeLabel
​string

Resolved label for Type

materialLabel
​string

Resolved label for Material

supplierName
​string

Resolved name for Supplier (from Organisations)

stockLocationLabel
​string

Resolved label for Stock Location (from CompanyStockLocations)

quantity
​integer · int32

Number of pieces available

weight
​number · double

Total weight in kilograms

heatCode
​string

Heat code for traceability

diameter
​integer · int32

Diameter in millimetres

length
​integer · int32

Length dimension (mm)

width
​integer · int32

Width dimension (mm)

depth
​integer · int32

Depth dimension (mm)

type
​integer · int32

Type reference (FK to InventoryTypes)

material
​integer · int32

Material reference (FK to InventoryMaterials)

supplierId
​string · uuid

Supplier reference (FK to Organisations)

stockLocationId
​integer · int32

Stock location reference (FK to CompanyStockLocations)

inventoryId
​string · uuid

Unique identifier for the inventory record

companyId
​string · uuid

Identifier of the owning company

productName
​string

Human readable product name

unitPrice
​number · double

Unit price in company currency


Update existing inventory items

PUT
https://api.gosmarter.ai
/api/company/{companyId}/inventory-slim

Updates one or more existing inventory items. Each item must belong to the specified company and will be validated before persistence.

Update existing inventory items › path Parameters

companyId
​string · uuid · required

The unique identifier of the company for which items are updated. Example: 11111111-2222-3333-4444-555555555555

Update existing inventory items › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Update existing inventory items › Request Body

quantity
​integer · int32

Number of pieces available

weight
​number · double

Total weight in kilograms

heatCode
​string

Heat code for traceability

diameter
​integer · int32

Diameter in millimetres

length
​integer · int32

Length dimension (mm)

width
​integer · int32

Width dimension (mm)

depth
​integer · int32

Depth dimension (mm)

type
​integer · int32

Type reference (FK to InventoryTypes)

material
​integer · int32

Material reference (FK to InventoryMaterials)

supplierId
​string · uuid

Supplier reference (FK to Organisations)

stockLocationId
​integer · int32

Stock location reference (FK to CompanyStockLocations)

inventoryId
​string · uuid

Unique identifier for the inventory record

companyId
​string · uuid

Identifier of the owning company

productName
​string

Human readable product name

unitPrice
​number · double

Unit price in company currency

Update existing inventory items › Responses

Inventory items updated successfully with enriched type and material labels

typeLabel
​string

Resolved label for Type

materialLabel
​string

Resolved label for Material

supplierName
​string

Resolved name for Supplier (from Organisations)

stockLocationLabel
​string

Resolved label for Stock Location (from CompanyStockLocations)

quantity
​integer · int32

Number of pieces available

weight
​number · double

Total weight in kilograms

heatCode
​string

Heat code for traceability

diameter
​integer · int32

Diameter in millimetres

length
​integer · int32

Length dimension (mm)

width
​integer · int32

Width dimension (mm)

depth
​integer · int32

Depth dimension (mm)

type
​integer · int32

Type reference (FK to InventoryTypes)

material
​integer · int32

Material reference (FK to InventoryMaterials)

supplierId
​string · uuid

Supplier reference (FK to Organisations)

stockLocationId
​integer · int32

Stock location reference (FK to CompanyStockLocations)

inventoryId
​string · uuid

Unique identifier for the inventory record

companyId
​string · uuid

Identifier of the owning company

productName
​string

Human readable product name

unitPrice
​number · double

Unit price in company currency


Create new inventory items

POST
https://api.gosmarter.ai
/api/company/{companyId}/inventory-slim

Creates one or more new inventory items for the specified company. Each item will be associated with the companyId provided in the route.

Create new inventory items › path Parameters

companyId
​string · uuid · required

The unique identifier of the company under which items are created. Example: 11111111-2222-3333-4444-555555555555

Create new inventory items › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Create new inventory items › Request Body

quantity
​integer · int32

Number of pieces available

weight
​number · double

Total weight in kilograms

heatCode
​string

Heat code for traceability

diameter
​integer · int32

Diameter in millimetres

length
​integer · int32

Length dimension (mm)

width
​integer · int32

Width dimension (mm)

depth
​integer · int32

Depth dimension (mm)

type
​integer · int32

Type reference (FK to InventoryTypes)

material
​integer · int32

Material reference (FK to InventoryMaterials)

supplierId
​string · uuid

Supplier reference (FK to Organisations)

stockLocationId
​integer · int32

Stock location reference (FK to CompanyStockLocations)

inventoryId
​string · uuid

Unique identifier for the inventory record

companyId
​string · uuid

Identifier of the owning company

productName
​string

Human readable product name

unitPrice
​number · double

Unit price in company currency

Create new inventory items › Responses

Inventory items created successfully with enriched type, material, and supplier labels

typeLabel
​string

Resolved label for Type

materialLabel
​string

Resolved label for Material

supplierName
​string

Resolved name for Supplier (from Organisations)

stockLocationLabel
​string

Resolved label for Stock Location (from CompanyStockLocations)

quantity
​integer · int32

Number of pieces available

weight
​number · double

Total weight in kilograms

heatCode
​string

Heat code for traceability

diameter
​integer · int32

Diameter in millimetres

length
​integer · int32

Length dimension (mm)

width
​integer · int32

Width dimension (mm)

depth
​integer · int32

Depth dimension (mm)

type
​integer · int32

Type reference (FK to InventoryTypes)

material
​integer · int32

Material reference (FK to InventoryMaterials)

supplierId
​string · uuid

Supplier reference (FK to Organisations)

stockLocationId
​integer · int32

Stock location reference (FK to CompanyStockLocations)

inventoryId
​string · uuid

Unique identifier for the inventory record

companyId
​string · uuid

Identifier of the owning company

productName
​string

Human readable product name

unitPrice
​number · double

Unit price in company currency


Delete inventory items

DELETE
https://api.gosmarter.ai
/api/company/{companyId}/inventory-slim

Soft deletes one or more inventory items by setting Active = 0. Temporal tables preserve the previous row state automatically.

Delete inventory items › path Parameters

companyId
​string · uuid · required

The unique identifier of the company owning the items. Example: 11111111-2222-3333-4444-555555555555

Delete inventory items › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Delete inventory items › Request Body

​string[]

Delete inventory items › Responses

Inventory items deleted successfully

deletedCount
​integer · int32

Number of items deleted

deletedIds
​string[]

List of IDs that were deleted


Cut a piece off an inventory item

POST
https://api.gosmarter.ai
/api/company/{companyId}/inventory/{inventoryId}/cut

Splits a Linear/Flat inventory item by removing a dimension-specified piece. If the source row's Quantity is > 1, one unit is auto-split off first and the response returns autoSplitPerformed=true. An interior (non-rectangular) Flat cut is not supported yet: the request is understood but nothing is mutated, and the endpoint returns 422 Unprocessable Entity with a human-readable explanation instead of 200 — a 200 response always means a cut actually happened.

Cut a piece off an inventory item › path Parameters

companyId
​string · uuid · required

The unique identifier of the company.

inventoryId
​string · uuid · required

The inventory item to cut from.

Cut a piece off an inventory item › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Cut a piece off an inventory item › Request Body

shapeFamily
​string
lengthRemoved
​number · double
widthRemoved
​number · double

Cut a piece off an inventory item › Responses

Cut successful — the source row and/or new rows were mutated

originalInventoryId
​string · uuid
remainderInventoryId
​string · uuid
newInventoryId
​string · uuid
autoSplitPerformed
​boolean

Download inventory as CSV

GET
https://api.gosmarter.ai
/api/company/{companyId}/inventory-slim/download

Downloads all inventory items for a company as a CSV file

Download inventory as CSV › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

Download inventory as CSV › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Download inventory as CSV › Responses

CSV file with inventory data

string · binary

Evaluate inventory tags

POST
https://api.gosmarter.ai
/api/company/{companyId}/inventory-slim/{inventoryId}/tags/evaluate

Evaluates active inventory tag rules for a single inventory item and updates rule-based tag assignments.

Evaluate inventory tags › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

inventoryId
​string · uuid · required

The unique identifier of the inventory item

Evaluate inventory tags › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Evaluate inventory tags › Responses

Evaluation completed

inventoryId
​string · uuid
companyId
​string · uuid
assignedTagCount
​integer · int32

Get an inventory item by ID

GET
https://api.gosmarter.ai
/api/company/{companyId}/inventory-slim/{inventoryId}

Retrieves a single inventory item by its unique ID within the specified company. Includes core metadata required for optimisation and reporting.

Get an inventory item by ID › path Parameters

companyId
​string · uuid · required

The unique identifier of the company that owns the inventory item. Example: 11111111-2222-3333-4444-555555555555

inventoryId
​string · uuid · required

The unique identifier of the inventory item to retrieve. Example: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee

Get an inventory item by ID › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Get an inventory item by ID › Responses

Inventory item retrieved successfully

createdAt
​string · date-time

Timestamp when the record was created (UTC)

updatedAt
​string · date-time

Timestamp when the record was last updated (UTC)

millCertificationId
​string · uuid

Mill certification ID if inventory is linked to a mill cert via heat code

linkedOrders
​string

JSON array string of linked orders in format '[{"orderId":"...","orderReference":"..."},...]'. '[]' when no orders are linked.

typeLabel
​string

Resolved label for Type

materialLabel
​string

Resolved label for Material

supplierName
​string

Resolved name for Supplier (from Organisations)

stockLocationLabel
​string

Resolved label for Stock Location (from CompanyStockLocations)

quantity
​integer · int32

Number of pieces available

weight
​number · double

Total weight in kilograms

heatCode
​string

Heat code for traceability

diameter
​integer · int32

Diameter in millimetres

length
​integer · int32

Length dimension (mm)

width
​integer · int32

Width dimension (mm)

depth
​integer · int32

Depth dimension (mm)

type
​integer · int32

Type reference (FK to InventoryTypes)

material
​integer · int32

Material reference (FK to InventoryMaterials)

supplierId
​string · uuid

Supplier reference (FK to Organisations)

stockLocationId
​integer · int32

Stock location reference (FK to CompanyStockLocations)

inventoryId
​string · uuid

Unique identifier for the inventory record

companyId
​string · uuid

Identifier of the owning company

productName
​string

Human readable product name

unitPrice
​number · double

Unit price in company currency


Get inventory item change history

GET
https://api.gosmarter.ai
/api/company/{companyId}/inventory-slim/{inventoryId}/history

Returns field-level audit history for a specific inventory item, derived from SQL Server temporal tables.

Get inventory item change history › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

inventoryId
​string · uuid · required

The unique identifier of the inventory item

Get inventory item change history › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Get inventory item change history › Responses

List of audit events for the inventory item

changedAt
​string · date-time
changedById
​string · uuid
changedByName
​string
changeType
​string
entityType
​string
entityLabel
​string

Get mill certificate match counts for every inventory item in a company

GET
https://api.gosmarter.ai
/api/company/{companyId}/inventory/millcert-match-counts

Returns, per (InventoryId, MatchKeyType, MatchedValue) key, the number of distinct active MillCertificationHeats currently matching that value. Fetched separately from the inventory list itself (issue #1244 follow-up) so a slow match-count computation never delays the list.

Get mill certificate match counts for every inventory item in a company › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

Get mill certificate match counts for every inventory item in a company › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Get mill certificate match counts for every inventory item in a company › Responses

Match counts retrieved successfully

inventoryId
​string · uuid
matchKeyType
​string
matchedValue
​string
matchCount
​integer · int32

Get candidate mill certificate heat matches for an inventory item

GET
https://api.gosmarter.ai
/api/company/{companyId}/inventory/{inventoryId}/millcert-matches

Returns, grouped by matched HeatCode/ProductReference value, the candidate MillCertificationHeats matching that value, and which one (if any) is currently linked and its Source (issue #1244).

Get candidate mill certificate heat matches for an inventory item › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

inventoryId
​string · uuid · required

The unique identifier of the inventory item

Get candidate mill certificate heat matches for an inventory item › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Get candidate mill certificate heat matches for an inventory item › Responses

Candidate mill cert heat matches grouped by matched value

inventoryId
​string · uuid

Confirm/override mill certificate heat matches for an inventory item

PUT
https://api.gosmarter.ai
/api/company/{companyId}/inventory/{inventoryId}/millcert-links

For each (MatchKeyType, MatchedValue) -> MillCertificationHeatId pair, deactivates any existing active link for that key and writes a new Manual link (issue #1244). Each (MatchKeyType, MatchedValue) key may appear only once per request (compared case-insensitively); the whole request is applied in one transaction.

Confirm/override mill certificate heat matches for an inventory item › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

inventoryId
​string · uuid · required

The unique identifier of the inventory item

Confirm/override mill certificate heat matches for an inventory item › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Confirm/override mill certificate heat matches for an inventory item › Request Body

matchKeyType
​string
matchedValue
​string
millCertificationHeatId
​string · uuid

Confirm/override mill certificate heat matches for an inventory item › Responses

The newly active Manual links

inventoryMillCertificationHeatLinkId
​string · uuid
companyId
​string · uuid
inventoryId
​string · uuid
millCertificationHeatId
​string · uuid
matchKeyType
​string
matchedValue
​string
source
​string
createdAt
​string · date-time

Transfer inventory to a different stock location

POST
https://api.gosmarter.ai
/api/company/{companyId}/inventory/{inventoryId}/transfer

Moves an inventory item to a different StockLocationId in place. Never changes Quantity/Weight.

Transfer inventory to a different stock location › path Parameters

companyId
​string · uuid · required

The unique identifier of the company.

inventoryId
​string · uuid · required

The inventory item to transfer.

Transfer inventory to a different stock location › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Transfer inventory to a different stock location › Request Body

stockLocationId
​integer · int32

Transfer inventory to a different stock location › Responses

Transfer successful

inventoryId
​string · uuid
newStockLocationId
​integer · int32

Unreserve stock from the inventory page

DELETE
https://api.gosmarter.ai
/api/company/{companyId}/inventory-slim/{inventoryId}/reserve

Removes the reservation link(s) for an inventory item and renames the inventory row to 'OriginalName - Prev Reserved (OrderReference)'. Split rows are retained as standalone inventory (no quantity merge-back). Supports inventory-context mode: operates on all links for the given inventory item within the company.

Unreserve stock from the inventory page › path Parameters

companyId
​string · uuid · required

The unique identifier of the company.

inventoryId
​string · uuid · required

The inventory item to unreserve.

Unreserve stock from the inventory page › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Unreserve stock from the inventory page › Responses

Unreservation successful — returns all deleted link rows

linkId
​string · uuid
companyId
​string · uuid
orderLineItemId
​string · uuid
inventoryId
​string · uuid

Upload inventory from CSV

POST
https://api.gosmarter.ai
/api/company/{companyId}/inventory-slim/upload

Uploads and processes a CSV file to create or update inventory items in bulk

Upload inventory from CSV › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

Upload inventory from CSV › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Upload inventory from CSV › Request Body

Upload inventory from CSV › Responses

CSV uploaded and processed successfully


Get CSV upload template

GET
https://api.gosmarter.ai
/api/company/{companyId}/inventory-slim/upload-template

Downloads a CSV template file with example inventory data for bulk uploads

Get CSV upload template › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

Get CSV upload template › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Get CSV upload template › Responses

CSV template file with examples

string · binary