Stock Item

Manage inventory items including product codes, descriptions, pricing, and stock control settings.

Path Parameter::DOCKEY (integer) — internal ID, NOT the item code

Endpoints

GET
/stockitem

List all stock items

POST
/stockitem

Create new stock item

PUT
/stockitem/:DOCKEY

Update stock item by internal ID

DELETE
/stockitem/:DOCKEY

Delete stock item by internal ID

Fields

FieldTypeRequiredNotes
dockeyintegerNoAuto-assigned internal ID. Used in URL path for PUT/DELETE.
codestring
Yes
Stock item code / SKU.
descriptionstring
Yes
Item name / description.
stockgroupstringNoStock group for accounting. Auto-defaults to DEFAULT. Get from GET /stockgroup.
Default: "DEFAULT"
stockcontrolbooleanNoTrack inventory quantity. Set false for non-stock items.
Default: true
costingmethodintegerNoInventory costing method. 1 = FIFO.
Default: 1
sltaxstringNoSales tax code. Get from GET /tax.
Default: null
phtaxstringNoPurchase tax code. Get from GET /tax.
Default: null
barcodestringNoProduct barcode.
Default: null
refcoststringNoReference cost price.
Default: null
refpricestringNoReference selling price.
Default: null

Examples

POST — Create Stock Item (Minimal)

POST /stockitem
{
  "code": "STK-001",
  "description": "Product Name"
}

POST — Create Stock Item (Full)

POST /stockitem
{
  "code": "STK-001",
  "description": "Product Name",
  "stockgroup": "SG-01",
  "stockcontrol": true,
  "barcode": "1234567890",
  "refcost": "50.00",
  "refprice": "100.00"
}

Finding dockey for PUT/DELETE

GET /stockitem?code=STK-001

Response:
{
  "pagination": { "offset": 0, "limit": 50, "count": 1 },
  "data": [
    {
      "dockey": 1,
      "code": "STK-001",
      "description": "Product Name",
      ...
    }
  ]
}

DELETE (by dockey, not code)

DELETE /stockitem/1

Response: "OK" (plain text)