Overview /
Stock & supply /
Get one purchase unit
Get one purchase unit
get
https://api.flactrum.com/v1/purchase-units/{unit}
| Required scope | stock_items.read |
| Success status | 200 |
| Returns | One PurchaseUnit object |
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| unit * | path | string | ULID of the record. |
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/01m43mzja1k4w55y65vv27ns9v' \
-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
}
}