Overview /
Stock & supply /
List purchase units
List purchase units
get
https://api.flactrum.com/v1/purchase-units
Suppliers sell cases; stock is kept in grams. A purchase unit records how many base units one case is worth.
| Required scope | stock_items.read |
| Panel screen | Stock & supply → Purchase units |
| Success status | 200 |
| Returns | A paginated list of PurchaseUnit objects |
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| stock_item_id | query | string | — |
| page | query | integer | Page number. |
| per_page | query | integer | Page size. Values above the maximum are rejected rather than silently clamped. |
| active | query | boolean | Filter by active flag. Omit to get both. |
| sort | query | string | Column to sort by. Each endpoint lists what it accepts. |
| direction | query | string | Sort direction. |
Response fields
| Field | Type | Description |
|---|---|---|
| id | string | — |
| stock_item_id | string | — |
| name | string | — |
| factor_to_base | number | How many base units one purchase unit is worth. A 12-litre case of milk on a millilitre item is 12000. |
| is_purchase_default | boolean | — |
| is_active | boolean | — |
Examples
Recorded from the test suite — these are real requests and their real responses.
curl -X GET 'https://api.flactrum.com/v1/purchase-units' \
-H 'Authorization: Bearer flk_your_key:your_secret' \
-H 'Accept: application/json'
HTTP 200 · application/json
{
"data": [
{
"id": "01m43mzja1k4w55y65vv27ns9v",
"stock_item_id": "01m43mzj9rnhq60k73sy2hgph9",
"name": "Çuval (25 kg)",
"factor_to_base": 25000,
"is_purchase_default": true,
"is_active": true
}
],
"meta": {
"total": 1,
"page": 1,
"per_page": 25,
"last_page": 1
}
}