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.
Request Body
| Field | Type | Req | Description |
|---|---|---|---|
| apiKey | string | ✓ | API key from your Infinity license |
| apiSecret | string | ✓ | API secret from your Infinity license |
Responses
No authentication required. Returns service status and database connectivity.
Responses
Returns a paginated list of products with pricing, stock levels, barcodes, and supplier data.
Parameters
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| productType | query | int | Filter by product type (2 = Stock Product, 3 = Modifier) | |
| saleType | query | int | Filter by sale type flag (bitwise match) | |
| categoryId | query | string | Filter by category ID (nchar 10) | |
| isActive | query | bool | Filter by active status | |
| page | query | int | Page number (default: 1) | |
| pageSize | query | int | Items per page (default: 50, max: 200) |
Responses
Returns a single product by its ID. Same shape as an item in the list response.
Parameters
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| productId | path | long | ✓ | Product ID |
Responses
Creates a new product across multiple database tables in a single transaction.
Request Body
| Field | Type | Req | Description |
|---|---|---|---|
| productName | string | ✓ | Max 50 characters |
| productDescription | string | ✓ | Max 50 characters |
| categoryId | string | ✓ | From GET /categories (nchar 10, space-padded) |
| classId | string | From GET /classes (nchar 10, space-padded) | |
| taxGroup | string | ✓ | From GET /tax-groups (nchar 10, space-padded) |
| productType | int | ✓ | 2 = Stock Product, 3 = Modifier |
| saleType | int | ✓ | Bitmask =Redemption, 2=Sale, 4=Vending (combine by adding) |
| orderPrinter | int | 0=None (default), 1=Printer 1, 2=Printer 2 | |
| secondaryProductName | string | Max 35 chars. Alternate/translated product name | |
| ticketValue | int | Ticket redemption cost. Required when saleType includes Redemption | |
| vendingPrice | decimal | Vending machine price. Required when saleType includes Vending | |
| sellPrice | decimal | Retail sell price. Required when saleType includes Sale | |
| isPriceExTax | bool | Whether sellPrice excludes tax. Default: false | |
| productCode | string | Max 50 chars. SKU or internal product code | |
| barcodes | string[] | Array of barcode strings, each max 25 chars | |
| reorderLevelMin | int | Minimum reorder level. Default: 0 | |
| reorderLevelMax | int | Maximum reorder level. Default: 0 | |
| supplier | object | Supplier link (supplierId, containerPrice, containerQuantity, containerId, productSupplierCode, preferredSupplier) | |
| warehouse | object | Initial warehouse stock (warehouseId, stockQuantity) |
Responses
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.
Parameters
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| productId | path | long | ✓ | Product ID |
Request Body
| Field | Type | Req | Description |
|---|---|---|---|
| productName | string | Max 50 characters | |
| productDescription | string | Max 50 characters | |
| sellPrice | decimal | Updated retail sell price | |
| isPriceExTax | bool | Whether sellPrice excludes tax | |
| productCode | string | Max 50 chars | |
| reorderLevelMin | int | Minimum reorder level | |
| reorderLevelMax | int | Maximum reorder level | |
| isActive | bool | Active status | |
| barcodes | string[] | Barcodes to add (cannot remove existing) | |
| suppliers | array | Supplier changes with action field: add | update | remove |
Responses
Returns all product categories for the local location.
Responses
Returns all product classes. Optionally filter by category.
Parameters
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| categoryId | query | string | Filter by parent category ID |
Responses
Returns all warehouses for the local location.
Parameters
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| locationId | query | int | Defaults to local location |
Responses
Returns tax groups for the local location's tax zone.
Responses
Returns container types for use in supplier product links (Product_Suppliers.Container_Id).
Responses
Returns all active suppliers.
Responses
Creates a new supplier.
Request Body
| Field | Type | Req | Description |
|---|---|---|---|
| supplierCode | string | ✓ | Max 50 chars. Unique supplier code |
| supplierName | string | ✓ | Max 50 chars |
| supplierAddress | string | ✓ | Max 50 chars |
| supplierTown | string | Max 50 chars | |
| supplierState | string | Max 50 chars | |
| supplierPostcode | string | Max 50 chars | |
| supplierPhone | string | Max 50 chars | |
| supplierEmail | string | Max 50 chars | |
| supplierContact | string | Max 50 chars | |
| supplierType | int | Default: 0 | |
| supplierDescription | string | Max 50 chars | |
| supplierAccountNo | string | Max 50 chars | |
| paymentTerms | int | 0=None, 1=Advance, 2–8=days from delivery (7/14/21/30/45/60/90). Default: 0 |
Responses
Returns current stock levels, paginated.
Parameters
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| warehouseId | query | int | Filter by warehouse | |
| productIds | query | string | Comma-separated product IDs | |
| page | query | int | Page number (default: 1) | |
| pageSize | query | int | Items per page (default: 50, max: 200) |
Responses
Submits counted quantities for a stock take. The system calculates the variance (counted minus current) and adjusts stock levels accordingly.
Request Body
| Field | Type | Req | Description |
|---|---|---|---|
| warehouseId | int | ✓ | From GET /warehouses |
| userId | int | ✓ | Infinity user ID for the ERP integration |
| items | array | ✓ | Array of { productId, countedQuantity } — countedQuantity must be >= 0 |
| comment | string | Max 200 chars. Recorded on the stock transaction |
Responses
Records incoming stock from a supplier. Increases stock quantities and recalculates average unit cost.
Request Body
| Field | Type | Req | Description |
|---|---|---|---|
| warehouseId | int | ✓ | From GET /warehouses |
| supplierId | long | From GET /suppliers | |
| poNumber | string | Purchase order number, max 50 chars | |
| invoice | string | Invoice number, max 50 chars | |
| userId | int | ✓ | Infinity user ID for the ERP integration |
| items | array | ✓ | Array of { productId, quantity, value } — quantity > 0; value updates last purchase price and average unit cost |
| comment | string | Max 200 chars |
Responses
Adjusts stock quantity up or down for a single product. Cannot result in negative stock.
Request Body
| Field | Type | Req | Description |
|---|---|---|---|
| warehouseId | int | ✓ | From GET /warehouses |
| productId | long | ✓ | Product ID |
| adjustmentQuantity | int | ✓ | Positive to increase, negative to decrease. Cannot result in negative stock |
| userId | int | ✓ | Infinity user ID for the ERP integration |
| comment | string | ✓ | Reason for adjustment, max 200 chars |
Responses
Returns all active webhook subscribers.
Responses
Register a webhook subscriber to receive stock event notifications. Events are triggered by Infinity application activity — not by API calls made through this API.
Request Body
| Field | Type | Req | Description |
|---|---|---|---|
| url | string | ✓ | HTTPS URL that will receive webhook POST requests |
| secret | string | ✓ | Min 16 characters. Used for HMAC-SHA256 payload signing. Stored encrypted at rest |
| eventTypes | string[] | ✓ | Array of event types: stock.adjusted | stock.received | stock.counted | product.created | product.updated |
Responses
Update a webhook subscriber's URL, secret, or event types. All fields are optional.
Parameters
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| webhookId | path | string (UUID) | ✓ | Webhook subscriber ID |
Request Body
| Field | Type | Req | Description |
|---|---|---|---|
| url | string | New HTTPS URL | |
| secret | string | New secret, min 16 characters | |
| eventTypes | string[] | Updated array of event types to subscribe to |
Responses
Remove a webhook subscriber.
Parameters
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| webhookId | path | string (UUID) | ✓ | Webhook subscriber ID |
Responses
