Path: api/v1/stock
This API is JSON:API compliant.
This endpoint supports the following methods:
GET
This endpoint requires an OAuth bearer token, and returns errors in a standard shape. See API Conventions for authentication, error responses and paging, which apply to every endpoint.
The resource type for this endpoint is Stock
The identifier is stockno
Relationships
A relationship links this Stock to another resource. By default only the related resource's type and id are returned. Relationships marked Includable can be embedded in the response via the include query parameter (see Includes below). To set or change a relationship, send a resource identifier (type and id) for it. Postable means the relationship can be set when creating the resource (POST); Patchable means it can be changed when updating an existing resource (PATCH). Some relationships are Postable but not Patchable — they can be set at creation but not changed afterwards. A value sent for a relationship that is not Postable/Patchable in that context is not applied.
| Relationship | Type | Returns | Includable | Postable | Patchable |
|---|---|---|---|---|---|
| alternateStock | Stock | object | ✗ | ✗ | ✗ |
| locations | StockLocations | object | ✗ | ✗ | ✗ |
| manufacturingItem | Item | object | ✗ | ✗ | ✗ |
| parentStock | Stock | object | ✗ | ✗ | ✗ |
| priceLevels | PriceLevels | object | ✗ | ✗ | ✗ |
| serviceItem | Item | object | ✗ | ✗ | ✗ |
| supersededBy | Stock | object | ✗ | ✗ | ✗ |
Attributes
The Stock resource type attributes are as follows:
| Attribute | Type | Description |
|---|---|---|
| active | boolean | Whether the stock item is active. |
| allowPriceOverride | boolean | Whether the price may be overridden on a transaction. |
| avgCOGS | number | The average cost of goods sold (COGS). |
| avgCost | number | The average cost. |
| avgPOCOGS | number | The average purchase-order cost of goods sold (COGS). |
| buy | object | The buy tax code and decimal places for the stock item. See the buy section below. |
| code | string | The stock code. |
| comissions | object | The commission settings for the stock item (exclude, floor, percent, extra). See the comissions section below. |
| dangerousGoods | boolean | Whether the item is classified as dangerous goods. |
| description | string | The stock description. |
| detailedDesc | string | The detailed (long) description. |
| dimensions | object | The stock item's weight and dimensions (weight, width, height, depth). See the dimensions section below. |
| discountIsPercentageOfPrice | boolean | Whether the discount is treated as a percentage of price. |
| excludeAttributesInProcurement | boolean | Whether stock attributes are excluded when procuring the item. |
| floorCostMarkup | number | The floor cost markup. |
| gLGroupCode | string | The stock GL group name. |
| groups | array of object | The groups the stock item belongs to. See the groups section below. |
| gTINumber | string | The GTIN (Global Trade Item Number). |
| hideOnInvoice | boolean | Whether the item is hidden on the invoice. |
| labourContent | number | The labour content of the stock item. |
| lastCOGS | number | The last cost of goods sold (COGS). |
| lastCost | number | The last cost recorded for the stock item. |
| lastPOCOGS | number | The last purchase-order cost of goods sold (COGS). |
| listPriceExcl | number | The recommended retail price, excluding tax. |
| listPriceIncl | number | The recommended retail price, including tax. |
| macroDesc | string | The macro description. |
| manufacturePartNumber | string | The manufacturer part number. |
| manufacturingCost | number | The manufacturing cost. |
| manufacturingType | string | The manufacturing type: SingleLevel / MultiLevel, or null if the item is not manufactured. |
| maxCOGS | number | The maximum cost of goods sold (COGS). |
| measure | array of object | The units of measure defined for the stock item (unit, qty, description, barcode). See the measure section below. |
| procurement | object | The procurement / reorder settings for the stock item. See the procurement section below. |
| publishPriceTo | string | Where the price is published: Price List & Web / Price List / Web / Don't Publish. |
| qtyDecimalPlaces | integer | The number of decimal places used for quantities of this item. |
| rateMultiplier | number | The rate multiplier applied to the stock item. |
| roundPriceUpToNearestCents | integer | Round the calculated price up to the nearest number of cents. |
| sell | object | The sell tax code and decimal places for the stock item. See the sell section below. |
| serialNo | string | When serial numbers are captured for the item: On Purchase / On Sell, or null if not serialised. |
| serviceStock | boolean | Whether the item is a service item. |
| shortDesc | string | The short description. |
| summaryKit | boolean | Whether the kit is summarised (a summary kit). |
| type | string | The stock type: Depleting / Non Depleting / Labour / Applies / Journal / Special / Virtual, or a kit type (Dynamic Kitting / Static Kitting / Packaging). |
| warrantyDesc | string | The warranty description. |
| warrantyMonths | Nullable`1 | The warranty period in months. |
Attributes of the buy object.
| Attribute | Type | Description |
|---|---|---|
| decimalPlaces | integer | The number of decimal places. |
| taxCode | string | The tax code. |
Attributes of the comissions object.
| Attribute | Type | Description |
|---|---|---|
| exclude | boolean | Whether the item is excluded from commission. |
| extra | number | The extra commission amount. |
| floor | number | The commission floor amount. |
| percent | number | The commission percentage. |
Attributes of the dimensions object.
| Attribute | Type | Description |
|---|---|---|
| depth | number | The depth of the item. |
| height | number | The height of the item. |
| weight | number | The weight of the item. |
| width | number | The width of the item. |
Attributes of each element in the groups array.
| Attribute | Type | Description |
|---|---|---|
| id | integer | The group's unique identifier. |
| name | string | The group's name. |
| type | string | The group's type. |
Attributes of each element in the measure array.
| Attribute | Type | Description |
|---|---|---|
| barcode | string | The barcode for this unit of measure. |
| qty | number | The quantity of the base unit this unit of measure represents. |
| unit | string | The unit of measure code. |
| unitDesc | string | The unit of measure description. |
Attributes of the procurement object.
| Attribute | Type | Description |
|---|---|---|
| addExtraPercent | Nullable`1 | The extra percentage to add when reordering. |
| dailyAvgSoldPerDayBasedOn | string | How the daily average sold per day is calculated: Last / Current month last year. |
| dailyAvgSoldPerDayBasedOnDays | Nullable`1 | The number of days the daily average sold per day is based on. |
| minQtyPerLocationMethod | string | How the minimum quantity per location is determined: None / Calculated. |
| reorderQty | number | The reorder quantity. |
Attributes of the sell object.
| Attribute | Type | Description |
|---|---|---|
| decimalPlaces | integer | The number of decimal places. |
| taxCode | string | The tax code. |
Path: api/v1/stock?filter[isSerialOnSell]=True&filter[stockGLGroup]=STOCK&filter[lastModified][-gt]2025-01-12T00%3A00%3A00%2B00%3A00 For more information see Resource Filtering. Stock Filter uses list technology to retreive data. Names should match those on the list screen in Jim List Help. Response: This example shows the maximum set of fields the endpoint can return, all populated. A real response only contains the data that applies to that record, so fields that are empty or not relevant are omitted — do not assume every field shown here will be present in every response. This is a list. To keep the example readable, only the first item below is written out; the later items have been trimmed down in this documentation. In a real response each item comes back with the data applicable to that record (as described above). Side-loading related resources with the include query parameter is not supported on list endpoints: an include parameter is ignored here and no included section is returned. To retrieve a related resource, request it directly using the id shown in each item's relationships, or use the single-resource (get by id) endpoint, which does support include.
Example GET (Return using filter)
Filtering
Field Type Comment
barCode Text Search by barcode on Unit 1
dateIn DateTime
dateSearchType Text What Date to search for. Values can be 'Date Sold', 'Date Purchased', 'Date Moved', 'Date not Sold'
groups Text Comma separated list of Stock Group Ids
includeDetailedDesc Bool Search 'StockDesc' in all detailed descriptions
isActive Bool Is the stock Active
isAttributesNotRequired Bool The stock does not use Attributes
isAttributesOnPurchase Bool The stock uses Attributes on Purchase
isAttributesOnSell Bool The stock uses Attributes on Sell
isBuyStock Bool I buy this stock
isDangerousGoods Bool Is the stock flagged as dangerous
isManufacturingStock Bool I manufacture this stock
isSellStock Bool I sell this stock
isSerialNotRequired Bool The stock does not use Serial#
isSerialOnPurchase Bool The stock uses Serial# on purchase
isSerialOnSell Bool The stock uses Serial# on sell
isServiceStock Bool This is a Service stock
labourContent Text Search by Labour content amount
lastModified DateTime
parentStock.id Int All stock that have this stockId as parent
promoId Int Returns stock on the specified promoId
publishPrice Text Matches the Publish Price to
stockCode Text Search by Stock Code
stockDesc Text Search by Stock Description
stockGLGroup Text Matches the stock GL Group Name
StockLocationCode Text It is in stock in the specified location
stockType Text The Type of the Stock
weight Text Search by weight
{
"data": [
{
"id": "53",
"type": "Stock",
"attributes": {
"code": "PSU.X200",
"description": "Replacement power supply for X200 controller",
"type": "Depleting",
"serialNo": "On Sell",
"active": true,
"gLGroupCode": "STOCK",
"labourContent": 0.0000,
"manufacturingCost": 42.5000,
"buy": {
"taxCode": "GST",
"decimalPlaces": 4
},
"sell": {
"taxCode": "GST",
"decimalPlaces": 2
},
"listPriceExcl": 99.0000,
"listPriceIncl": 108.9000,
"dimensions": {
"weight": 1.2500,
"width": 15.0000,
"height": 5.0000,
"depth": 20.0000
},
"procurement": {
"minQtyPerLocationMethod": "Calculated",
"dailyAvgSoldPerDayBasedOn": "Last",
"dailyAvgSoldPerDayBasedOnDays": 90,
"addExtraPercent": 10,
"reorderQty": 25.0000
},
"measure": [
{
"unit": "EACH",
"qty": 1.0000,
"unitDesc": "Each",
"barcode": "9312345678900"
},
{
"unit": "BOX",
"qty": 10.0000,
"unitDesc": "Box of 10",
"barcode": "9312345678917"
}
],
"qtyDecimalPlaces": 4,
"warrantyMonths": 12,
"manufacturingType": "SingleLevel",
"serviceStock": false,
"macroDesc": "X200 PSU",
"hideOnInvoice": false,
"excludeAttributesInProcurement": false,
"publishPriceTo": "Price List & Web",
"roundPriceUpToNearestCents": 5,
"rateMultiplier": 1.0000,
"summaryKit": false,
"floorCostMarkup": 15.0000,
"manufacturePartNumber": "X200-PSU-A",
"gTINumber": "09312345678900",
"shortDesc": "X200 Power Supply",
"detailedDesc": "Regulated 24V power supply unit for the X200 controller range.",
"warrantyDesc": "12 month return-to-base warranty.",
"allowPriceOverride": true,
"discountIsPercentageOfPrice": true,
"dangerousGoods": false,
"comissions": {
"exclude": false,
"floor": 5.0000,
"percent": 7.5000,
"extra": 2.0000
},
"lastCost": 42.5000,
"lastCOGS": 43.1000,
"maxCOGS": 45.0000,
"avgCost": 42.8000,
"avgCOGS": 43.0500,
"lastPOCOGS": 42.5000,
"avgPOCOGS": 42.7500,
"groups": [
{
"type": "Category",
"id": 3,
"name": "Power Supplies"
}
]
},
"relationships": {
"supersededBy": { "data": { "type": "Stock", "id": "54" } },
"alternateStock": { "data": { "type": "Stock", "id": "55" } },
"parentStock": { "data": { "type": "Stock", "id": "50" } },
"serviceItem": { "data": { "type": "Stock", "id": "61" } },
"manufacturingItem": { "data": { "type": "Stock", "id": "62" } },
"locations": {
"data": [
{ "type": "StockLocations", "id": "53-1" },
{ "type": "StockLocations", "id": "53-2" }
]
},
"priceLevels": {
"data": [
{ "type": "PriceLevels", "id": "53-129" },
{ "type": "PriceLevels", "id": "53-130" }
]
}
},
"links": {
"self": "/api/v1/stock/53"
}
},
{
"id": "70",
"type": "Stock",
"attributes": {
"code": "CALKIT.C50",
"description": "Calibration kit for C50 bench"
}
}
]
}