Stock Group

Stock groups drive the default sales, purchase and stock accounts posted when items move.

Path Parameter::CODE (string) — the group code in the URL path

Endpoints

GET
/stockgroup

List stock groups with pagination and filters

GET
/stockgroup/:CODE

Get a single stock group by code

POST
/stockgroup

Create a new stock group

PUT
/stockgroup/:CODE

Update a stock group by code

DELETE
/stockgroup/:CODE

Delete a stock group by code

Fields

FieldTypeRequiredNotes
codestring
Yes
Group code. Proven: "SG-01".
descriptionstring
Yes
Group name. Proven: "Inventory Group A".
salesstringNoSales account code. Read from GET /account → data[].code.
Default: null
salesreturnedstringNoSales return account code.
Default: null
cashsalesstringNoCash sales account code.
Default: null
purchasestringNoPurchase account code.
Default: null
cashpurchasestringNoCash purchase account code.
Default: null
purchasereturnedstringNoPurchase return account code.
Default: null
balancestockstringNoBalance stock account code.
Default: null
costingmethodintegerNoCosting method. Integer only — not a string. Proven: 1.
Default: 1
attachmentsstringNoFile attachment reference.
Default: null
isactivebooleanNoActive flag. Proven: false.
Default: true
lastmodifiedintegerNoUnix timestamp, read-only.

Examples

POST — Create Stock Group

POST /stockgroup
{
  "code": "SG-01",
  "description": "Inventory Group A"
}

GET — List Stock Groups

GET /stockgroup?offset=0

DELETE

DELETE /stockgroup/SG-01

Response: "OK" (plain text)

Notes