Operations

Stock Management API — Endpoints

Complete endpoint reference for the Stock Management API. 21 endpoints across 7 groups.

Authenticates using the API key and secret from the Infinity license file. Returns a JWT token valid for 1 hour. The Postman collection auto-saves the token to the accessToken variable.

FieldTypeReqDescription
apiKeystringAPI key from your Infinity license
apiSecretstringAPI secret from your Infinity license
200Returns accessToken (JWT), tokenType: Bearer, and expiresIn: 3600
{ "accessToken": "eyJhbGciOiJIUzI1NiIs...", "tokenType": "Bearer", "expiresIn": 3600 }
401Invalid API key or secret

No authentication required. Returns service status and database connectivity.

200Returns status, database, uptime, and version
{ "status": "Healthy", "database": "Connected", "uptime": "1.02:15:30", "version": "1.0.0" }

Returns a paginated list of products with pricing, stock levels, barcodes, and supplier data.

NameInTypeReqDescription
productTypequeryintFilter by product type (2 = Stock Product, 3 = Modifier)
saleTypequeryintFilter by sale type flag (bitwise match)
categoryIdquerystringFilter by category ID (nchar 10)
isActivequeryboolFilter by active status
pagequeryintPage number (default: 1)
pageSizequeryintItems per page (default: 50, max: 200)
200Returns paginated items array with full product details
{ "items": [ { "productId": 105001050000123, "productName": "Large Plush Bear", "productDescription": "24 inch stuffed bear", "categoryId": "PLUSH ", "classId": "LGPLUSH ", "taxGroup": "GST ", "productType": 2, "saleType": 1, "orderPrinter": 0, "secondaryProductName": "", "ticketValue": 500, "vendingPrice": 0, "sellPrice": 9.99, "isPriceExTax": false, "productCode": "PLU-BEAR-LG", "barcodes": [ "9781234567890" ], "reorderLevelMin": 5, "reorderLevelMax": 50, "suppliers": [ { "supplierId": 1, "containerPrice": 25, "containerQuantity": 10, "containerId": 1, "productSupplierCode": "SUP-BEAR", "preferredSupplier": true } ], "warehouses": [ { "warehouseId": 1, "stockQuantity": 100, "productEnabled": true, "lastPurchasePrice": 2.5, "averageUnitCost": 2.5 } ], "isActive": true } ], "page": 1, "pageSize": 50, "totalCount": 150, "totalPages": 3 }
401Missing or invalid Bearer Token

Returns a single product by its ID. Same shape as an item in the list response.

NameInTypeReqDescription
productIdpathlongProduct ID
200Returns full product object
{ "productId": 105001050000123, "productName": "Large Plush Bear", "productDescription": "24 inch stuffed bear", "categoryId": "PLUSH ", "classId": "LGPLUSH ", "taxGroup": "GST ", "productType": 2, "saleType": 1, "sellPrice": 9.99, "productCode": "PLU-BEAR-LG", "barcodes": [ "9781234567890" ], "isActive": true }
401Missing or invalid Bearer Token
404Product not found

Creates a new product across multiple database tables in a single transaction.

FieldTypeReqDescription
productNamestringMax 50 characters
productDescriptionstringMax 50 characters
categoryIdstringFrom GET /categories (nchar 10, space-padded)
classIdstringFrom GET /classes (nchar 10, space-padded)
taxGroupstringFrom GET /tax-groups (nchar 10, space-padded)
productTypeint2 = Stock Product, 3 = Modifier
saleTypeintBitmask =Redemption, 2=Sale, 4=Vending (combine by adding)
orderPrinterint0=None (default), 1=Printer 1, 2=Printer 2
secondaryProductNamestringMax 35 chars. Alternate/translated product name
ticketValueintTicket redemption cost. Required when saleType includes Redemption
vendingPricedecimalVending machine price. Required when saleType includes Vending
sellPricedecimalRetail sell price. Required when saleType includes Sale
isPriceExTaxboolWhether sellPrice excludes tax. Default: false
productCodestringMax 50 chars. SKU or internal product code
barcodesstring[]Array of barcode strings, each max 25 chars
reorderLevelMinintMinimum reorder level. Default: 0
reorderLevelMaxintMaximum reorder level. Default: 0
supplierobjectSupplier link (supplierId, containerPrice, containerQuantity, containerId, productSupplierCode, preferredSupplier)
warehouseobjectInitial warehouse stock (warehouseId, stockQuantity)
201Returns productId and productCode
{ "productId": 105001050000123, "productCode": "PLU-BEAR-LG" }
400Validation error
401Missing or invalid Bearer Token
409Duplicate product name

Partial update — only include fields you want to change. Barcodes can only be added (not removed). Suppliers can be added, updated, or soft-deleted using the action field.

NameInTypeReqDescription
productIdpathlongProduct ID
FieldTypeReqDescription
productNamestringMax 50 characters
productDescriptionstringMax 50 characters
sellPricedecimalUpdated retail sell price
isPriceExTaxboolWhether sellPrice excludes tax
productCodestringMax 50 chars
reorderLevelMinintMinimum reorder level
reorderLevelMaxintMaximum reorder level
isActiveboolActive status
barcodesstring[]Barcodes to add (cannot remove existing)
suppliersarraySupplier changes with action field: add | update | remove
200Returns productId and productCode
{ "productId": 105001050000123, "productCode": "PLU-BEAR-LG-V2" }
400Validation error
401Missing or invalid Bearer Token
404Product not found

Returns all product categories for the local location.

200Returns array of categories with categoryId, description, taxGroup, glAccount
[ { "categoryId": "PLUSH ", "description": "Plush Toys", "taxGroup": "GST ", "glAccount": "4100" } ]
401Missing or invalid Bearer Token

Returns all product classes. Optionally filter by category.

NameInTypeReqDescription
categoryIdquerystringFilter by parent category ID
200Returns array of classes with classId, categoryId, description, taxGroup
[ { "classId": "LGPLUSH ", "categoryId": "PLUSH ", "description": "Large Plush", "taxGroup": "GST " } ]
401Missing or invalid Bearer Token

Returns all warehouses for the local location.

NameInTypeReqDescription
locationIdqueryintDefaults to local location
200Returns array of warehouses with warehouseId, description, type, department
[ { "locationId": 10500, "warehouseId": 1, "warehouseDescription": "Main Warehouse", "warehouseType": 1, "department": "Redemption", "isDeleted": false } ]
401Missing or invalid Bearer Token

Returns tax groups for the local location's tax zone.

200Returns array of tax groups with taxGroup, taxZone, effectiveDate, tax rates
[ { "taxGroup": "GST ", "taxZone": 1, "effectiveDate": "2020-01-01T00:00:00", "tax1Rate": 0.1, "tax1RateDescription": "GST", "tax2Rate": 0, "tax2RateDescription": "None" } ]
401Missing or invalid Bearer Token

Returns container types for use in supplier product links (Product_Suppliers.Container_Id).

200Returns array of containers with containerId, description, isDeleted
[ { "containerId": 1, "description": "Each", "isDeleted": false } ]
401Missing or invalid Bearer Token

Returns all active suppliers.

200Returns array of supplier objects with contact, address, and payment details
[ { "supplierId": 1, "supplierCode": "SUP001", "supplierName": "Acme Toys", "supplierAddress": "123 Main St", "supplierTown": "Sydney", "supplierState": "NSW", "supplierPostcode": "2000", "supplierPhone": "0299991234", "supplierEmail": "orders@acmetoys.com", "supplierContact": "John Smith", "supplierType": 1, "supplierDescription": "Plush toy supplier", "supplierApproved": false, "supplierAccountNo": "ACC-001", "paymentTerms": 5, "isDeleted": false } ]
401Missing or invalid Bearer Token

Creates a new supplier.

FieldTypeReqDescription
supplierCodestringMax 50 chars. Unique supplier code
supplierNamestringMax 50 chars
supplierAddressstringMax 50 chars
supplierTownstringMax 50 chars
supplierStatestringMax 50 chars
supplierPostcodestringMax 50 chars
supplierPhonestringMax 50 chars
supplierEmailstringMax 50 chars
supplierContactstringMax 50 chars
supplierTypeintDefault: 0
supplierDescriptionstringMax 50 chars
supplierAccountNostringMax 50 chars
paymentTermsint0=None, 1=Advance, 2–8=days from delivery (7/14/21/30/45/60/90). Default: 0
201Returns supplierId, supplierCode, supplierName, createdAt
{ "supplierId": 2, "supplierCode": "SUP002", "supplierName": "Best Prizes", "createdAt": "2026-03-25T12:00:00Z" }
400Validation error
401Missing or invalid Bearer Token

Returns current stock levels, paginated.

NameInTypeReqDescription
warehouseIdqueryintFilter by warehouse
productIdsquerystringComma-separated product IDs
pagequeryintPage number (default: 1)
pageSizequeryintItems per page (default: 50, max: 200)
200Returns paginated items array with productId, warehouseId, stockQuantity, reorderLevel, costs
{ "items": [ { "productId": 105001050000123, "warehouseId": 1, "productName": "Large Plush Bear", "stockQuantity": 100, "productEnabled": true, "reorderLevel": 0, "lastPurchasePrice": 2.5, "averageUnitCost": 2.5 } ], "page": 1, "pageSize": 50, "totalCount": 100, "totalPages": 2 }
401Missing or invalid Bearer Token

Submits counted quantities for a stock take. The system calculates the variance (counted minus current) and adjusts stock levels accordingly.

FieldTypeReqDescription
warehouseIdintFrom GET /warehouses
userIdintInfinity user ID for the ERP integration
itemsarrayArray of { productId, countedQuantity } — countedQuantity must be >= 0
commentstringMax 200 chars. Recorded on the stock transaction
200Returns saleInvoiceNo, itemCount, processedAt
{ "saleInvoiceNo": 12345, "itemCount": 2, "processedAt": "2026-03-25T12:00:00Z" }
400Validation error
401Missing or invalid Bearer Token

Records incoming stock from a supplier. Increases stock quantities and recalculates average unit cost.

FieldTypeReqDescription
warehouseIdintFrom GET /warehouses
supplierIdlongFrom GET /suppliers
poNumberstringPurchase order number, max 50 chars
invoicestringInvoice number, max 50 chars
userIdintInfinity user ID for the ERP integration
itemsarrayArray of { productId, quantity, value } — quantity > 0; value updates last purchase price and average unit cost
commentstringMax 200 chars
200Returns saleInvoiceNo, itemCount, processedAt
{ "saleInvoiceNo": 12346, "itemCount": 2, "processedAt": "2026-03-25T12:00:00Z" }
400Validation error
401Missing or invalid Bearer Token

Adjusts stock quantity up or down for a single product. Cannot result in negative stock.

FieldTypeReqDescription
warehouseIdintFrom GET /warehouses
productIdlongProduct ID
adjustmentQuantityintPositive to increase, negative to decrease. Cannot result in negative stock
userIdintInfinity user ID for the ERP integration
commentstringReason for adjustment, max 200 chars
200Returns saleInvoiceNo, productId, newStockQuantity, processedAt
{ "saleInvoiceNo": 12347, "productId": 105001050000123, "newStockQuantity": 95, "processedAt": "2026-03-25T12:00:00Z" }
400Validation error or would result in negative stock
401Missing or invalid Bearer Token
404Product not found

Returns all active webhook subscribers.

200Returns array of webhook subscriber objects
401Missing or invalid Bearer Token

Register a webhook subscriber to receive stock event notifications. Events are triggered by Infinity application activity — not by API calls made through this API.

FieldTypeReqDescription
urlstringHTTPS URL that will receive webhook POST requests
secretstringMin 16 characters. Used for HMAC-SHA256 payload signing. Stored encrypted at rest
eventTypesstring[]Array of event types: stock.adjusted | stock.received | stock.counted | product.created | product.updated
201Returns webhookId, url, eventTypes, createdAt
{ "webhookId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "url": "https://your-erp-system.com/webhooks/infinity", "eventTypes": [ "stock.adjusted", "stock.received", "stock.counted" ], "createdAt": "2026-03-25T12:00:00Z" }
400Validation error
401Missing or invalid Bearer Token

Update a webhook subscriber's URL, secret, or event types. All fields are optional.

NameInTypeReqDescription
webhookIdpathstring (UUID)Webhook subscriber ID
FieldTypeReqDescription
urlstringNew HTTPS URL
secretstringNew secret, min 16 characters
eventTypesstring[]Updated array of event types to subscribe to
200Returns webhookId, url, eventTypes, createdAt
{ "webhookId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "url": "https://new-url.com/webhook", "eventTypes": [ "stock.adjusted" ], "createdAt": "2026-03-25T12:00:00Z" }
400Validation error
401Missing or invalid Bearer Token
404Webhook not found

Remove a webhook subscriber.

NameInTypeReqDescription
webhookIdpathstring (UUID)Webhook subscriber ID
204No Content — webhook deleted
401Missing or invalid Bearer Token
404Webhook not found