The Stock and Stock Locations section of the InvenTree API schema is documented below.
InvenTree API 477¶
API for InvenTree - the intuitive open source inventory management system
Servers¶
| Description | URL |
|---|---|
| http://localhost:8000 | http://localhost:8000 |
stock¶
DELETE /api/stock/¶
Description
Perform a DELETE operation against this list endpoint.
Note that the typical DRF list endpoint does not support DELETE, so this method is provided as a custom implementation.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
Request body
{
"filters": {},
"items": [
0
]
}
Schema of the request body
{
"description": "Parameters for selecting items for bulk operations.",
"properties": {
"filters": {
"additionalProperties": {},
"title": "A dictionary of filter values",
"type": "object"
},
"items": {
"items": {
"type": "integer"
},
"title": "A list of primary key values",
"type": "array"
}
},
"type": "object"
}
{
"filters": {},
"items": [
0
]
}
Schema of the request body
{
"description": "Parameters for selecting items for bulk operations.",
"properties": {
"filters": {
"additionalProperties": {},
"title": "A dictionary of filter values",
"type": "object"
},
"items": {
"items": {
"type": "integer"
},
"title": "A list of primary key values",
"type": "array"
}
},
"type": "object"
}
{
"filters": {},
"items": [
0
]
}
Schema of the request body
{
"description": "Parameters for selecting items for bulk operations.",
"properties": {
"filters": {
"additionalProperties": {},
"title": "A dictionary of filter values",
"type": "object"
},
"items": {
"items": {
"type": "integer"
},
"title": "A list of primary key values",
"type": "array"
}
},
"type": "object"
}
Responses
GET /api/stock/¶
Description
Override the GET method to determine export options.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
active |
query | boolean | No | Active | |
allocated |
query | boolean | No | Is Allocated | |
ancestor |
query | integer | No | ||
assembly |
query | boolean | No | Assembly | |
available |
query | boolean | No | Available | |
batch |
query | string | No | Batch code filter (case insensitive) | |
batch_regex |
query | string | No | Batch code filter (regex) | |
belongs_to |
query | integer | No | ||
bom_item |
query | integer | No | ||
build |
query | integer | No | ||
cascade |
query | boolean | No | If true, include items in child locations of the given location | |
category |
query | integer | No | ||
company |
query | integer | No | ||
consumed |
query | boolean | No | Consumed by Build Order | |
consumed_by |
query | integer | No | ||
customer |
query | integer | No | ||
depleted |
query | boolean | No | Depleted | |
exclude_tree |
query | number | No | Provide a StockItem PK to exclude that item and all its descendants | |
expired |
query | boolean | No | Expired | |
expiry_after |
query | string | No | Expiry date after | |
expiry_before |
query | string | No | Expiry date before | |
external |
query | boolean | No | External Location | |
has_batch |
query | boolean | No | Has batch code | |
has_child_items |
query | boolean | No | Has child items | |
has_installed_items |
query | boolean | No | Has installed items | |
has_purchase_price |
query | boolean | No | Has purchase price | |
in_stock |
query | boolean | No | In Stock | |
include_variants |
query | boolean | No | Include Variants | |
installed |
query | boolean | No | Installed in other stock item | |
IPN |
query | string | No | Part IPN (case insensitive) | |
IPN_contains |
query | string | No | Part IPN contains (case insensitive) | |
IPN_regex |
query | string | No | Part IPN (regex) | |
is_building |
query | boolean | No | In production | |
limit |
query | integer | No | Number of results to return per page. | |
location |
query | integer | No | Filter by numeric Location ID or the literal 'null' | |
location_detail |
query | boolean | False | No | Include detailed information about the stock location in the response |
manufacturer |
query | integer | No | ||
manufacturer_part |
query | integer | No | Manufacturer Part | |
max_stock |
query | number | No | Maximum stock | |
min_stock |
query | number | No | Minimum stock | |
name |
query | string | No | Part name (case insensitive) | |
name_contains |
query | string | No | Part name contains (case insensitive) | |
name_regex |
query | string | No | Part name (regex) | |
offset |
query | integer | No | The initial index from which to return the results. | |
ordering |
query | string | No | Which field to use when ordering the results. | |
part |
query | integer | No | Part | |
part_detail |
query | boolean | True | No | Include detailed information about the related part in the response |
part_tree |
query | integer | No | ||
path_detail |
query | boolean | False | No | |
purchase_order |
query | integer | No | ||
salable |
query | boolean | No | Salable | |
sales_order |
query | integer | No | ||
search |
query | string | No | A search term. Searched fields: batch, location__name, part__IPN, part__description, part__name, serial, supplier_part__SKU, supplier_part__manufacturer_part__MPN, supplier_part__manufacturer_part__manufacturer__name, supplier_part__supplier__name, tags__name, tags__slug. | |
sent_to_customer |
query | boolean | No | Sent to customer | |
serial |
query | string | No | Serial number | |
serial_gte |
query | integer | No | Serial number GTE | |
serial_lte |
query | integer | No | Serial number LTE | |
serialized |
query | boolean | No | Has serial number | |
stale |
query | boolean | No | Stale | |
status |
query | integer | No | Status Code | |
stocktake_after |
query | string | No | Stocktake After | |
stocktake_before |
query | string | No | Stocktake Before | |
supplier |
query | integer | No | Supplier | |
supplier_part |
query | integer | No | ||
supplier_part_detail |
query | boolean | False | No | |
tags__name |
query | string | No | ||
tags__slug |
query | string | No | ||
tests |
query | boolean | False | No | |
tracked |
query | boolean | No | Tracked | |
updated_after |
query | string | No | Updated after | |
updated_before |
query | string | No | Updated before |
Responses
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"MPN": "string",
"SKU": "string",
"allocated": 10.12,
"barcode_hash": "string",
"batch": "string",
"belongs_to": 0,
"build": 0,
"child_items": 0,
"consumed_by": 0,
"customer": 0,
"delete_on_deplete": true,
"expired": true,
"expiry_date": "2022-04-13",
"in_stock": true,
"installed_items": 0,
"is_building": true,
"link": "string",
"location": 0,
"location_detail": null,
"location_path": [
{}
],
"notes": "string",
"owner": 0,
"packaging": "string",
"parent": 0,
"part": 0,
"part_detail": null,
"pk": 0,
"purchase_order": 0,
"purchase_order_reference": "string",
"purchase_price": "string",
"purchase_price_currency": "string",
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"serial_numbers": "string",
"stale": true,
"status": null,
"status_custom_key": 0,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"string"
],
"tests": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
],
"tracking_items": 0,
"updated": "2022-04-13T15:42:05.901Z",
"use_pack_size": true
}
]
}
Schema of the response body
{
"properties": {
"count": {
"example": 123,
"type": "integer"
},
"next": {
"example": "http://api.example.org/accounts/?offset=400&limit=100",
"format": "uri",
"nullable": true,
"type": "string"
},
"previous": {
"example": "http://api.example.org/accounts/?offset=200&limit=100",
"format": "uri",
"nullable": true,
"type": "string"
},
"results": {
"items": {
"$ref": "#/components/schemas/StockItem"
},
"type": "array"
}
},
"required": [
"count",
"results"
],
"type": "object"
}
PATCH /api/stock/¶
Description
Perform a PATCH operation against this list endpoint.
Note that the typical DRF list endpoint does not support PATCH, so this method is provided as a custom implementation.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
Request body
{
"MPN": "string",
"SKU": "string",
"allocated": 10.12,
"barcode_hash": "string",
"batch": "string",
"belongs_to": 0,
"build": 0,
"child_items": 0,
"consumed_by": 0,
"customer": 0,
"delete_on_deplete": true,
"expired": true,
"expiry_date": "2022-04-13",
"in_stock": true,
"installed_items": 0,
"is_building": true,
"link": "string",
"location": 0,
"location_detail": null,
"location_path": [
{}
],
"notes": "string",
"owner": 0,
"packaging": "string",
"parent": 0,
"part": 0,
"part_detail": null,
"pk": 0,
"purchase_order": 0,
"purchase_order_reference": "string",
"purchase_price": "string",
"purchase_price_currency": "string",
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"serial_numbers": "string",
"stale": true,
"status": null,
"status_custom_key": 0,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"string"
],
"tests": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
],
"tracking_items": 0,
"updated": "2022-04-13T15:42:05.901Z",
"use_pack_size": true
}
Schema of the request body
{
"description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
"properties": {
"MPN": {
"nullable": true,
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"nullable": true,
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"nullable": true,
"readOnly": true,
"title": "Allocated Quantity",
"type": "number"
},
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"batch": {
"description": "Batch code for this stock item",
"maxLength": 100,
"nullable": true,
"title": "Batch Code",
"type": "string"
},
"belongs_to": {
"description": "Is this item installed in another item?",
"nullable": true,
"title": "Installed In",
"type": "integer"
},
"build": {
"description": "Build for this stock item",
"nullable": true,
"title": "Source Build",
"type": "integer"
},
"child_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"consumed_by": {
"description": "Build order which consumed this stock item",
"nullable": true,
"type": "integer"
},
"customer": {
"description": "Customer",
"nullable": true,
"type": "integer"
},
"delete_on_deplete": {
"description": "Delete this Stock Item when stock is depleted",
"type": "boolean"
},
"expired": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"expiry_date": {
"description": "Expiry date for stock item. Stock will be considered expired after this date",
"format": "date",
"nullable": true,
"type": "string"
},
"in_stock": {
"readOnly": true,
"type": "boolean"
},
"installed_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 2000,
"title": "External Link",
"type": "string"
},
"location": {
"description": "Where is this stock item located?",
"nullable": true,
"title": "Stock Location",
"type": "integer"
},
"location_detail": {
"allOf": [
{
"$ref": "#/components/schemas/LocationBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Location"
},
"location_path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"notes": {
"description": "Markdown notes (optional)",
"maxLength": 50000,
"nullable": true,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"packaging": {
"description": "Packaging this stock item is stored in",
"maxLength": 50,
"nullable": true,
"type": "string"
},
"parent": {
"description": "Parent stock item",
"nullable": true,
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Part"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"purchase_order": {
"description": "Purchase order for this stock item",
"nullable": true,
"title": "Source Purchase Order",
"type": "integer"
},
"purchase_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"purchase_price": {
"description": "Purchase price of this stock item, per unit or pack",
"format": "decimal",
"nullable": true,
"pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
"type": "string"
},
"purchase_price_currency": {
"description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
"title": "Currency",
"type": "string"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"serial_numbers": {
"description": "Enter serial numbers for new items",
"nullable": true,
"type": "string",
"writeOnly": true
},
"stale": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/StockItemStatusEnum"
}
],
"maximum": 9223372036854775807,
"minimum": 0
},
"status_custom_key": {
"description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
"nullable": true,
"title": "Custom status key",
"type": "integer"
},
"status_text": {
"readOnly": true,
"title": "Status",
"type": "string"
},
"stocktake_date": {
"format": "date",
"nullable": true,
"readOnly": true,
"type": "string"
},
"supplier_part": {
"description": "Select a matching supplier part for this stock item",
"nullable": true,
"type": "integer"
},
"supplier_part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/SupplierPart"
}
],
"nullable": true,
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tests": {
"items": {
"$ref": "#/components/schemas/StockItemTestResult"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"tracking_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"updated": {
"description": "Timestamp of last update",
"format": "date-time",
"nullable": true,
"readOnly": true,
"type": "string"
},
"use_pack_size": {
"description": "Use pack size when adding: the quantity defined is the number of packs",
"nullable": true,
"type": "boolean",
"writeOnly": true
}
},
"type": "object"
}
{
"MPN": "string",
"SKU": "string",
"allocated": 10.12,
"barcode_hash": "string",
"batch": "string",
"belongs_to": 0,
"build": 0,
"child_items": 0,
"consumed_by": 0,
"customer": 0,
"delete_on_deplete": true,
"expired": true,
"expiry_date": "2022-04-13",
"in_stock": true,
"installed_items": 0,
"is_building": true,
"link": "string",
"location": 0,
"location_detail": null,
"location_path": [
{}
],
"notes": "string",
"owner": 0,
"packaging": "string",
"parent": 0,
"part": 0,
"part_detail": null,
"pk": 0,
"purchase_order": 0,
"purchase_order_reference": "string",
"purchase_price": "string",
"purchase_price_currency": "string",
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"serial_numbers": "string",
"stale": true,
"status": null,
"status_custom_key": 0,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"string"
],
"tests": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
],
"tracking_items": 0,
"updated": "2022-04-13T15:42:05.901Z",
"use_pack_size": true
}
Schema of the request body
{
"description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
"properties": {
"MPN": {
"nullable": true,
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"nullable": true,
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"nullable": true,
"readOnly": true,
"title": "Allocated Quantity",
"type": "number"
},
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"batch": {
"description": "Batch code for this stock item",
"maxLength": 100,
"nullable": true,
"title": "Batch Code",
"type": "string"
},
"belongs_to": {
"description": "Is this item installed in another item?",
"nullable": true,
"title": "Installed In",
"type": "integer"
},
"build": {
"description": "Build for this stock item",
"nullable": true,
"title": "Source Build",
"type": "integer"
},
"child_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"consumed_by": {
"description": "Build order which consumed this stock item",
"nullable": true,
"type": "integer"
},
"customer": {
"description": "Customer",
"nullable": true,
"type": "integer"
},
"delete_on_deplete": {
"description": "Delete this Stock Item when stock is depleted",
"type": "boolean"
},
"expired": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"expiry_date": {
"description": "Expiry date for stock item. Stock will be considered expired after this date",
"format": "date",
"nullable": true,
"type": "string"
},
"in_stock": {
"readOnly": true,
"type": "boolean"
},
"installed_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 2000,
"title": "External Link",
"type": "string"
},
"location": {
"description": "Where is this stock item located?",
"nullable": true,
"title": "Stock Location",
"type": "integer"
},
"location_detail": {
"allOf": [
{
"$ref": "#/components/schemas/LocationBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Location"
},
"location_path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"notes": {
"description": "Markdown notes (optional)",
"maxLength": 50000,
"nullable": true,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"packaging": {
"description": "Packaging this stock item is stored in",
"maxLength": 50,
"nullable": true,
"type": "string"
},
"parent": {
"description": "Parent stock item",
"nullable": true,
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Part"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"purchase_order": {
"description": "Purchase order for this stock item",
"nullable": true,
"title": "Source Purchase Order",
"type": "integer"
},
"purchase_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"purchase_price": {
"description": "Purchase price of this stock item, per unit or pack",
"format": "decimal",
"nullable": true,
"pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
"type": "string"
},
"purchase_price_currency": {
"description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
"title": "Currency",
"type": "string"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"serial_numbers": {
"description": "Enter serial numbers for new items",
"nullable": true,
"type": "string",
"writeOnly": true
},
"stale": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/StockItemStatusEnum"
}
],
"maximum": 9223372036854775807,
"minimum": 0
},
"status_custom_key": {
"description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
"nullable": true,
"title": "Custom status key",
"type": "integer"
},
"status_text": {
"readOnly": true,
"title": "Status",
"type": "string"
},
"stocktake_date": {
"format": "date",
"nullable": true,
"readOnly": true,
"type": "string"
},
"supplier_part": {
"description": "Select a matching supplier part for this stock item",
"nullable": true,
"type": "integer"
},
"supplier_part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/SupplierPart"
}
],
"nullable": true,
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tests": {
"items": {
"$ref": "#/components/schemas/StockItemTestResult"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"tracking_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"updated": {
"description": "Timestamp of last update",
"format": "date-time",
"nullable": true,
"readOnly": true,
"type": "string"
},
"use_pack_size": {
"description": "Use pack size when adding: the quantity defined is the number of packs",
"nullable": true,
"type": "boolean",
"writeOnly": true
}
},
"type": "object"
}
{
"MPN": "string",
"SKU": "string",
"allocated": 10.12,
"barcode_hash": "string",
"batch": "string",
"belongs_to": 0,
"build": 0,
"child_items": 0,
"consumed_by": 0,
"customer": 0,
"delete_on_deplete": true,
"expired": true,
"expiry_date": "2022-04-13",
"in_stock": true,
"installed_items": 0,
"is_building": true,
"link": "string",
"location": 0,
"location_detail": null,
"location_path": [
{}
],
"notes": "string",
"owner": 0,
"packaging": "string",
"parent": 0,
"part": 0,
"part_detail": null,
"pk": 0,
"purchase_order": 0,
"purchase_order_reference": "string",
"purchase_price": "string",
"purchase_price_currency": "string",
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"serial_numbers": "string",
"stale": true,
"status": null,
"status_custom_key": 0,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"string"
],
"tests": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
],
"tracking_items": 0,
"updated": "2022-04-13T15:42:05.901Z",
"use_pack_size": true
}
Schema of the request body
{
"description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
"properties": {
"MPN": {
"nullable": true,
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"nullable": true,
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"nullable": true,
"readOnly": true,
"title": "Allocated Quantity",
"type": "number"
},
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"batch": {
"description": "Batch code for this stock item",
"maxLength": 100,
"nullable": true,
"title": "Batch Code",
"type": "string"
},
"belongs_to": {
"description": "Is this item installed in another item?",
"nullable": true,
"title": "Installed In",
"type": "integer"
},
"build": {
"description": "Build for this stock item",
"nullable": true,
"title": "Source Build",
"type": "integer"
},
"child_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"consumed_by": {
"description": "Build order which consumed this stock item",
"nullable": true,
"type": "integer"
},
"customer": {
"description": "Customer",
"nullable": true,
"type": "integer"
},
"delete_on_deplete": {
"description": "Delete this Stock Item when stock is depleted",
"type": "boolean"
},
"expired": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"expiry_date": {
"description": "Expiry date for stock item. Stock will be considered expired after this date",
"format": "date",
"nullable": true,
"type": "string"
},
"in_stock": {
"readOnly": true,
"type": "boolean"
},
"installed_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 2000,
"title": "External Link",
"type": "string"
},
"location": {
"description": "Where is this stock item located?",
"nullable": true,
"title": "Stock Location",
"type": "integer"
},
"location_detail": {
"allOf": [
{
"$ref": "#/components/schemas/LocationBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Location"
},
"location_path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"notes": {
"description": "Markdown notes (optional)",
"maxLength": 50000,
"nullable": true,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"packaging": {
"description": "Packaging this stock item is stored in",
"maxLength": 50,
"nullable": true,
"type": "string"
},
"parent": {
"description": "Parent stock item",
"nullable": true,
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Part"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"purchase_order": {
"description": "Purchase order for this stock item",
"nullable": true,
"title": "Source Purchase Order",
"type": "integer"
},
"purchase_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"purchase_price": {
"description": "Purchase price of this stock item, per unit or pack",
"format": "decimal",
"nullable": true,
"pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
"type": "string"
},
"purchase_price_currency": {
"description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
"title": "Currency",
"type": "string"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"serial_numbers": {
"description": "Enter serial numbers for new items",
"nullable": true,
"type": "string",
"writeOnly": true
},
"stale": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/StockItemStatusEnum"
}
],
"maximum": 9223372036854775807,
"minimum": 0
},
"status_custom_key": {
"description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
"nullable": true,
"title": "Custom status key",
"type": "integer"
},
"status_text": {
"readOnly": true,
"title": "Status",
"type": "string"
},
"stocktake_date": {
"format": "date",
"nullable": true,
"readOnly": true,
"type": "string"
},
"supplier_part": {
"description": "Select a matching supplier part for this stock item",
"nullable": true,
"type": "integer"
},
"supplier_part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/SupplierPart"
}
],
"nullable": true,
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tests": {
"items": {
"$ref": "#/components/schemas/StockItemTestResult"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"tracking_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"updated": {
"description": "Timestamp of last update",
"format": "date-time",
"nullable": true,
"readOnly": true,
"type": "string"
},
"use_pack_size": {
"description": "Use pack size when adding: the quantity defined is the number of packs",
"nullable": true,
"type": "boolean",
"writeOnly": true
}
},
"type": "object"
}
Responses
{
"MPN": "string",
"SKU": "string",
"allocated": 10.12,
"barcode_hash": "string",
"batch": "string",
"belongs_to": 0,
"build": 0,
"child_items": 0,
"consumed_by": 0,
"customer": 0,
"delete_on_deplete": true,
"expired": true,
"expiry_date": "2022-04-13",
"in_stock": true,
"installed_items": 0,
"is_building": true,
"link": "string",
"location": 0,
"location_detail": null,
"location_path": [
{}
],
"notes": "string",
"owner": 0,
"packaging": "string",
"parent": 0,
"part": 0,
"part_detail": null,
"pk": 0,
"purchase_order": 0,
"purchase_order_reference": "string",
"purchase_price": "string",
"purchase_price_currency": "string",
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"serial_numbers": "string",
"stale": true,
"status": null,
"status_custom_key": 0,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"string"
],
"tests": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
],
"tracking_items": 0,
"updated": "2022-04-13T15:42:05.901Z",
"use_pack_size": true
}
Schema of the response body
{
"description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
"properties": {
"MPN": {
"nullable": true,
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"nullable": true,
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"nullable": true,
"readOnly": true,
"title": "Allocated Quantity",
"type": "number"
},
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"batch": {
"description": "Batch code for this stock item",
"maxLength": 100,
"nullable": true,
"title": "Batch Code",
"type": "string"
},
"belongs_to": {
"description": "Is this item installed in another item?",
"nullable": true,
"title": "Installed In",
"type": "integer"
},
"build": {
"description": "Build for this stock item",
"nullable": true,
"title": "Source Build",
"type": "integer"
},
"child_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"consumed_by": {
"description": "Build order which consumed this stock item",
"nullable": true,
"type": "integer"
},
"customer": {
"description": "Customer",
"nullable": true,
"type": "integer"
},
"delete_on_deplete": {
"description": "Delete this Stock Item when stock is depleted",
"type": "boolean"
},
"expired": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"expiry_date": {
"description": "Expiry date for stock item. Stock will be considered expired after this date",
"format": "date",
"nullable": true,
"type": "string"
},
"in_stock": {
"readOnly": true,
"type": "boolean"
},
"installed_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 2000,
"title": "External Link",
"type": "string"
},
"location": {
"description": "Where is this stock item located?",
"nullable": true,
"title": "Stock Location",
"type": "integer"
},
"location_detail": {
"allOf": [
{
"$ref": "#/components/schemas/LocationBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Location"
},
"location_path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"notes": {
"description": "Markdown notes (optional)",
"maxLength": 50000,
"nullable": true,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"packaging": {
"description": "Packaging this stock item is stored in",
"maxLength": 50,
"nullable": true,
"type": "string"
},
"parent": {
"description": "Parent stock item",
"nullable": true,
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Part"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"purchase_order": {
"description": "Purchase order for this stock item",
"nullable": true,
"title": "Source Purchase Order",
"type": "integer"
},
"purchase_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"purchase_price": {
"description": "Purchase price of this stock item, per unit or pack",
"format": "decimal",
"nullable": true,
"pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
"type": "string"
},
"purchase_price_currency": {
"description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
"title": "Currency",
"type": "string"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"serial_numbers": {
"description": "Enter serial numbers for new items",
"nullable": true,
"type": "string",
"writeOnly": true
},
"stale": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/StockItemStatusEnum"
}
],
"maximum": 9223372036854775807,
"minimum": 0
},
"status_custom_key": {
"description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
"nullable": true,
"title": "Custom status key",
"type": "integer"
},
"status_text": {
"readOnly": true,
"title": "Status",
"type": "string"
},
"stocktake_date": {
"format": "date",
"nullable": true,
"readOnly": true,
"type": "string"
},
"supplier_part": {
"description": "Select a matching supplier part for this stock item",
"nullable": true,
"type": "integer"
},
"supplier_part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/SupplierPart"
}
],
"nullable": true,
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tests": {
"items": {
"$ref": "#/components/schemas/StockItemTestResult"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"tracking_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"updated": {
"description": "Timestamp of last update",
"format": "date-time",
"nullable": true,
"readOnly": true,
"type": "string"
},
"use_pack_size": {
"description": "Use pack size when adding: the quantity defined is the number of packs",
"nullable": true,
"type": "boolean",
"writeOnly": true
}
},
"required": [
"barcode_hash",
"in_stock",
"part",
"pk",
"quantity",
"status_text"
],
"type": "object"
}
POST /api/stock/¶
Description
API endpoint for list view of Stock objects.
- GET: Return a list of all StockItem objects (with optional query filters)
- POST: Create a new StockItem
- DELETE: Delete multiple StockItem objects
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
Request body
{
"MPN": "string",
"SKU": "string",
"allocated": 10.12,
"barcode_hash": "string",
"batch": "string",
"belongs_to": 0,
"build": 0,
"child_items": 0,
"consumed_by": 0,
"customer": 0,
"delete_on_deplete": true,
"expired": true,
"expiry_date": "2022-04-13",
"in_stock": true,
"installed_items": 0,
"is_building": true,
"link": "string",
"location": 0,
"location_detail": null,
"location_path": [
{}
],
"notes": "string",
"owner": 0,
"packaging": "string",
"parent": 0,
"part": 0,
"part_detail": null,
"pk": 0,
"purchase_order": 0,
"purchase_order_reference": "string",
"purchase_price": "string",
"purchase_price_currency": "string",
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"serial_numbers": "string",
"stale": true,
"status": null,
"status_custom_key": 0,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"string"
],
"tests": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
],
"tracking_items": 0,
"updated": "2022-04-13T15:42:05.901Z",
"use_pack_size": true
}
Schema of the request body
{
"description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
"properties": {
"MPN": {
"nullable": true,
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"nullable": true,
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"nullable": true,
"readOnly": true,
"title": "Allocated Quantity",
"type": "number"
},
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"batch": {
"description": "Batch code for this stock item",
"maxLength": 100,
"nullable": true,
"title": "Batch Code",
"type": "string"
},
"belongs_to": {
"description": "Is this item installed in another item?",
"nullable": true,
"title": "Installed In",
"type": "integer"
},
"build": {
"description": "Build for this stock item",
"nullable": true,
"title": "Source Build",
"type": "integer"
},
"child_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"consumed_by": {
"description": "Build order which consumed this stock item",
"nullable": true,
"type": "integer"
},
"customer": {
"description": "Customer",
"nullable": true,
"type": "integer"
},
"delete_on_deplete": {
"description": "Delete this Stock Item when stock is depleted",
"type": "boolean"
},
"expired": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"expiry_date": {
"description": "Expiry date for stock item. Stock will be considered expired after this date",
"format": "date",
"nullable": true,
"type": "string"
},
"in_stock": {
"readOnly": true,
"type": "boolean"
},
"installed_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 2000,
"title": "External Link",
"type": "string"
},
"location": {
"description": "Where is this stock item located?",
"nullable": true,
"title": "Stock Location",
"type": "integer"
},
"location_detail": {
"allOf": [
{
"$ref": "#/components/schemas/LocationBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Location"
},
"location_path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"notes": {
"description": "Markdown notes (optional)",
"maxLength": 50000,
"nullable": true,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"packaging": {
"description": "Packaging this stock item is stored in",
"maxLength": 50,
"nullable": true,
"type": "string"
},
"parent": {
"description": "Parent stock item",
"nullable": true,
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Part"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"purchase_order": {
"description": "Purchase order for this stock item",
"nullable": true,
"title": "Source Purchase Order",
"type": "integer"
},
"purchase_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"purchase_price": {
"description": "Purchase price of this stock item, per unit or pack",
"format": "decimal",
"nullable": true,
"pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
"type": "string"
},
"purchase_price_currency": {
"description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
"title": "Currency",
"type": "string"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"serial_numbers": {
"description": "Enter serial numbers for new items",
"nullable": true,
"type": "string",
"writeOnly": true
},
"stale": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/StockItemStatusEnum"
}
],
"maximum": 9223372036854775807,
"minimum": 0
},
"status_custom_key": {
"description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
"nullable": true,
"title": "Custom status key",
"type": "integer"
},
"status_text": {
"readOnly": true,
"title": "Status",
"type": "string"
},
"stocktake_date": {
"format": "date",
"nullable": true,
"readOnly": true,
"type": "string"
},
"supplier_part": {
"description": "Select a matching supplier part for this stock item",
"nullable": true,
"type": "integer"
},
"supplier_part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/SupplierPart"
}
],
"nullable": true,
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tests": {
"items": {
"$ref": "#/components/schemas/StockItemTestResult"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"tracking_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"updated": {
"description": "Timestamp of last update",
"format": "date-time",
"nullable": true,
"readOnly": true,
"type": "string"
},
"use_pack_size": {
"description": "Use pack size when adding: the quantity defined is the number of packs",
"nullable": true,
"type": "boolean",
"writeOnly": true
}
},
"required": [
"barcode_hash",
"in_stock",
"part",
"pk",
"quantity",
"status_text"
],
"type": "object"
}
{
"MPN": "string",
"SKU": "string",
"allocated": 10.12,
"barcode_hash": "string",
"batch": "string",
"belongs_to": 0,
"build": 0,
"child_items": 0,
"consumed_by": 0,
"customer": 0,
"delete_on_deplete": true,
"expired": true,
"expiry_date": "2022-04-13",
"in_stock": true,
"installed_items": 0,
"is_building": true,
"link": "string",
"location": 0,
"location_detail": null,
"location_path": [
{}
],
"notes": "string",
"owner": 0,
"packaging": "string",
"parent": 0,
"part": 0,
"part_detail": null,
"pk": 0,
"purchase_order": 0,
"purchase_order_reference": "string",
"purchase_price": "string",
"purchase_price_currency": "string",
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"serial_numbers": "string",
"stale": true,
"status": null,
"status_custom_key": 0,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"string"
],
"tests": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
],
"tracking_items": 0,
"updated": "2022-04-13T15:42:05.901Z",
"use_pack_size": true
}
Schema of the request body
{
"description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
"properties": {
"MPN": {
"nullable": true,
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"nullable": true,
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"nullable": true,
"readOnly": true,
"title": "Allocated Quantity",
"type": "number"
},
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"batch": {
"description": "Batch code for this stock item",
"maxLength": 100,
"nullable": true,
"title": "Batch Code",
"type": "string"
},
"belongs_to": {
"description": "Is this item installed in another item?",
"nullable": true,
"title": "Installed In",
"type": "integer"
},
"build": {
"description": "Build for this stock item",
"nullable": true,
"title": "Source Build",
"type": "integer"
},
"child_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"consumed_by": {
"description": "Build order which consumed this stock item",
"nullable": true,
"type": "integer"
},
"customer": {
"description": "Customer",
"nullable": true,
"type": "integer"
},
"delete_on_deplete": {
"description": "Delete this Stock Item when stock is depleted",
"type": "boolean"
},
"expired": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"expiry_date": {
"description": "Expiry date for stock item. Stock will be considered expired after this date",
"format": "date",
"nullable": true,
"type": "string"
},
"in_stock": {
"readOnly": true,
"type": "boolean"
},
"installed_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 2000,
"title": "External Link",
"type": "string"
},
"location": {
"description": "Where is this stock item located?",
"nullable": true,
"title": "Stock Location",
"type": "integer"
},
"location_detail": {
"allOf": [
{
"$ref": "#/components/schemas/LocationBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Location"
},
"location_path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"notes": {
"description": "Markdown notes (optional)",
"maxLength": 50000,
"nullable": true,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"packaging": {
"description": "Packaging this stock item is stored in",
"maxLength": 50,
"nullable": true,
"type": "string"
},
"parent": {
"description": "Parent stock item",
"nullable": true,
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Part"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"purchase_order": {
"description": "Purchase order for this stock item",
"nullable": true,
"title": "Source Purchase Order",
"type": "integer"
},
"purchase_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"purchase_price": {
"description": "Purchase price of this stock item, per unit or pack",
"format": "decimal",
"nullable": true,
"pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
"type": "string"
},
"purchase_price_currency": {
"description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
"title": "Currency",
"type": "string"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"serial_numbers": {
"description": "Enter serial numbers for new items",
"nullable": true,
"type": "string",
"writeOnly": true
},
"stale": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/StockItemStatusEnum"
}
],
"maximum": 9223372036854775807,
"minimum": 0
},
"status_custom_key": {
"description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
"nullable": true,
"title": "Custom status key",
"type": "integer"
},
"status_text": {
"readOnly": true,
"title": "Status",
"type": "string"
},
"stocktake_date": {
"format": "date",
"nullable": true,
"readOnly": true,
"type": "string"
},
"supplier_part": {
"description": "Select a matching supplier part for this stock item",
"nullable": true,
"type": "integer"
},
"supplier_part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/SupplierPart"
}
],
"nullable": true,
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tests": {
"items": {
"$ref": "#/components/schemas/StockItemTestResult"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"tracking_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"updated": {
"description": "Timestamp of last update",
"format": "date-time",
"nullable": true,
"readOnly": true,
"type": "string"
},
"use_pack_size": {
"description": "Use pack size when adding: the quantity defined is the number of packs",
"nullable": true,
"type": "boolean",
"writeOnly": true
}
},
"required": [
"barcode_hash",
"in_stock",
"part",
"pk",
"quantity",
"status_text"
],
"type": "object"
}
{
"MPN": "string",
"SKU": "string",
"allocated": 10.12,
"barcode_hash": "string",
"batch": "string",
"belongs_to": 0,
"build": 0,
"child_items": 0,
"consumed_by": 0,
"customer": 0,
"delete_on_deplete": true,
"expired": true,
"expiry_date": "2022-04-13",
"in_stock": true,
"installed_items": 0,
"is_building": true,
"link": "string",
"location": 0,
"location_detail": null,
"location_path": [
{}
],
"notes": "string",
"owner": 0,
"packaging": "string",
"parent": 0,
"part": 0,
"part_detail": null,
"pk": 0,
"purchase_order": 0,
"purchase_order_reference": "string",
"purchase_price": "string",
"purchase_price_currency": "string",
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"serial_numbers": "string",
"stale": true,
"status": null,
"status_custom_key": 0,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"string"
],
"tests": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
],
"tracking_items": 0,
"updated": "2022-04-13T15:42:05.901Z",
"use_pack_size": true
}
Schema of the request body
{
"description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
"properties": {
"MPN": {
"nullable": true,
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"nullable": true,
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"nullable": true,
"readOnly": true,
"title": "Allocated Quantity",
"type": "number"
},
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"batch": {
"description": "Batch code for this stock item",
"maxLength": 100,
"nullable": true,
"title": "Batch Code",
"type": "string"
},
"belongs_to": {
"description": "Is this item installed in another item?",
"nullable": true,
"title": "Installed In",
"type": "integer"
},
"build": {
"description": "Build for this stock item",
"nullable": true,
"title": "Source Build",
"type": "integer"
},
"child_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"consumed_by": {
"description": "Build order which consumed this stock item",
"nullable": true,
"type": "integer"
},
"customer": {
"description": "Customer",
"nullable": true,
"type": "integer"
},
"delete_on_deplete": {
"description": "Delete this Stock Item when stock is depleted",
"type": "boolean"
},
"expired": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"expiry_date": {
"description": "Expiry date for stock item. Stock will be considered expired after this date",
"format": "date",
"nullable": true,
"type": "string"
},
"in_stock": {
"readOnly": true,
"type": "boolean"
},
"installed_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 2000,
"title": "External Link",
"type": "string"
},
"location": {
"description": "Where is this stock item located?",
"nullable": true,
"title": "Stock Location",
"type": "integer"
},
"location_detail": {
"allOf": [
{
"$ref": "#/components/schemas/LocationBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Location"
},
"location_path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"notes": {
"description": "Markdown notes (optional)",
"maxLength": 50000,
"nullable": true,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"packaging": {
"description": "Packaging this stock item is stored in",
"maxLength": 50,
"nullable": true,
"type": "string"
},
"parent": {
"description": "Parent stock item",
"nullable": true,
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Part"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"purchase_order": {
"description": "Purchase order for this stock item",
"nullable": true,
"title": "Source Purchase Order",
"type": "integer"
},
"purchase_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"purchase_price": {
"description": "Purchase price of this stock item, per unit or pack",
"format": "decimal",
"nullable": true,
"pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
"type": "string"
},
"purchase_price_currency": {
"description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
"title": "Currency",
"type": "string"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"serial_numbers": {
"description": "Enter serial numbers for new items",
"nullable": true,
"type": "string",
"writeOnly": true
},
"stale": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/StockItemStatusEnum"
}
],
"maximum": 9223372036854775807,
"minimum": 0
},
"status_custom_key": {
"description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
"nullable": true,
"title": "Custom status key",
"type": "integer"
},
"status_text": {
"readOnly": true,
"title": "Status",
"type": "string"
},
"stocktake_date": {
"format": "date",
"nullable": true,
"readOnly": true,
"type": "string"
},
"supplier_part": {
"description": "Select a matching supplier part for this stock item",
"nullable": true,
"type": "integer"
},
"supplier_part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/SupplierPart"
}
],
"nullable": true,
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tests": {
"items": {
"$ref": "#/components/schemas/StockItemTestResult"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"tracking_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"updated": {
"description": "Timestamp of last update",
"format": "date-time",
"nullable": true,
"readOnly": true,
"type": "string"
},
"use_pack_size": {
"description": "Use pack size when adding: the quantity defined is the number of packs",
"nullable": true,
"type": "boolean",
"writeOnly": true
}
},
"required": [
"barcode_hash",
"in_stock",
"part",
"pk",
"quantity",
"status_text"
],
"type": "object"
}
Responses
[
{
"MPN": "string",
"SKU": "string",
"allocated": 10.12,
"barcode_hash": "string",
"batch": "string",
"belongs_to": 0,
"build": 0,
"child_items": 0,
"consumed_by": 0,
"customer": 0,
"delete_on_deplete": true,
"expired": true,
"expiry_date": "2022-04-13",
"in_stock": true,
"installed_items": 0,
"is_building": true,
"link": "string",
"location": 0,
"location_detail": null,
"location_path": [
{}
],
"notes": "string",
"owner": 0,
"packaging": "string",
"parent": 0,
"part": 0,
"part_detail": null,
"pk": 0,
"purchase_order": 0,
"purchase_order_reference": "string",
"purchase_price": "string",
"purchase_price_currency": "string",
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"serial_numbers": "string",
"stale": true,
"status": null,
"status_custom_key": 0,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"string"
],
"tests": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
],
"tracking_items": 0,
"updated": "2022-04-13T15:42:05.901Z",
"use_pack_size": true
}
]
Schema of the response body
{
"items": {
"$ref": "#/components/schemas/StockItem"
},
"type": "array"
}
PUT /api/stock/¶
Description
Perform a PUT operation against this list endpoint.
Simply redirects to the PATCH method.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
Request body
{
"MPN": "string",
"SKU": "string",
"allocated": 10.12,
"barcode_hash": "string",
"batch": "string",
"belongs_to": 0,
"build": 0,
"child_items": 0,
"consumed_by": 0,
"customer": 0,
"delete_on_deplete": true,
"expired": true,
"expiry_date": "2022-04-13",
"in_stock": true,
"installed_items": 0,
"is_building": true,
"link": "string",
"location": 0,
"location_detail": null,
"location_path": [
{}
],
"notes": "string",
"owner": 0,
"packaging": "string",
"parent": 0,
"part": 0,
"part_detail": null,
"pk": 0,
"purchase_order": 0,
"purchase_order_reference": "string",
"purchase_price": "string",
"purchase_price_currency": "string",
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"serial_numbers": "string",
"stale": true,
"status": null,
"status_custom_key": 0,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"string"
],
"tests": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
],
"tracking_items": 0,
"updated": "2022-04-13T15:42:05.901Z",
"use_pack_size": true
}
Schema of the request body
{
"description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
"properties": {
"MPN": {
"nullable": true,
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"nullable": true,
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"nullable": true,
"readOnly": true,
"title": "Allocated Quantity",
"type": "number"
},
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"batch": {
"description": "Batch code for this stock item",
"maxLength": 100,
"nullable": true,
"title": "Batch Code",
"type": "string"
},
"belongs_to": {
"description": "Is this item installed in another item?",
"nullable": true,
"title": "Installed In",
"type": "integer"
},
"build": {
"description": "Build for this stock item",
"nullable": true,
"title": "Source Build",
"type": "integer"
},
"child_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"consumed_by": {
"description": "Build order which consumed this stock item",
"nullable": true,
"type": "integer"
},
"customer": {
"description": "Customer",
"nullable": true,
"type": "integer"
},
"delete_on_deplete": {
"description": "Delete this Stock Item when stock is depleted",
"type": "boolean"
},
"expired": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"expiry_date": {
"description": "Expiry date for stock item. Stock will be considered expired after this date",
"format": "date",
"nullable": true,
"type": "string"
},
"in_stock": {
"readOnly": true,
"type": "boolean"
},
"installed_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 2000,
"title": "External Link",
"type": "string"
},
"location": {
"description": "Where is this stock item located?",
"nullable": true,
"title": "Stock Location",
"type": "integer"
},
"location_detail": {
"allOf": [
{
"$ref": "#/components/schemas/LocationBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Location"
},
"location_path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"notes": {
"description": "Markdown notes (optional)",
"maxLength": 50000,
"nullable": true,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"packaging": {
"description": "Packaging this stock item is stored in",
"maxLength": 50,
"nullable": true,
"type": "string"
},
"parent": {
"description": "Parent stock item",
"nullable": true,
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Part"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"purchase_order": {
"description": "Purchase order for this stock item",
"nullable": true,
"title": "Source Purchase Order",
"type": "integer"
},
"purchase_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"purchase_price": {
"description": "Purchase price of this stock item, per unit or pack",
"format": "decimal",
"nullable": true,
"pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
"type": "string"
},
"purchase_price_currency": {
"description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
"title": "Currency",
"type": "string"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"serial_numbers": {
"description": "Enter serial numbers for new items",
"nullable": true,
"type": "string",
"writeOnly": true
},
"stale": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/StockItemStatusEnum"
}
],
"maximum": 9223372036854775807,
"minimum": 0
},
"status_custom_key": {
"description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
"nullable": true,
"title": "Custom status key",
"type": "integer"
},
"status_text": {
"readOnly": true,
"title": "Status",
"type": "string"
},
"stocktake_date": {
"format": "date",
"nullable": true,
"readOnly": true,
"type": "string"
},
"supplier_part": {
"description": "Select a matching supplier part for this stock item",
"nullable": true,
"type": "integer"
},
"supplier_part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/SupplierPart"
}
],
"nullable": true,
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tests": {
"items": {
"$ref": "#/components/schemas/StockItemTestResult"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"tracking_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"updated": {
"description": "Timestamp of last update",
"format": "date-time",
"nullable": true,
"readOnly": true,
"type": "string"
},
"use_pack_size": {
"description": "Use pack size when adding: the quantity defined is the number of packs",
"nullable": true,
"type": "boolean",
"writeOnly": true
}
},
"required": [
"barcode_hash",
"in_stock",
"part",
"pk",
"quantity",
"status_text"
],
"type": "object"
}
{
"MPN": "string",
"SKU": "string",
"allocated": 10.12,
"barcode_hash": "string",
"batch": "string",
"belongs_to": 0,
"build": 0,
"child_items": 0,
"consumed_by": 0,
"customer": 0,
"delete_on_deplete": true,
"expired": true,
"expiry_date": "2022-04-13",
"in_stock": true,
"installed_items": 0,
"is_building": true,
"link": "string",
"location": 0,
"location_detail": null,
"location_path": [
{}
],
"notes": "string",
"owner": 0,
"packaging": "string",
"parent": 0,
"part": 0,
"part_detail": null,
"pk": 0,
"purchase_order": 0,
"purchase_order_reference": "string",
"purchase_price": "string",
"purchase_price_currency": "string",
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"serial_numbers": "string",
"stale": true,
"status": null,
"status_custom_key": 0,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"string"
],
"tests": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
],
"tracking_items": 0,
"updated": "2022-04-13T15:42:05.901Z",
"use_pack_size": true
}
Schema of the request body
{
"description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
"properties": {
"MPN": {
"nullable": true,
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"nullable": true,
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"nullable": true,
"readOnly": true,
"title": "Allocated Quantity",
"type": "number"
},
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"batch": {
"description": "Batch code for this stock item",
"maxLength": 100,
"nullable": true,
"title": "Batch Code",
"type": "string"
},
"belongs_to": {
"description": "Is this item installed in another item?",
"nullable": true,
"title": "Installed In",
"type": "integer"
},
"build": {
"description": "Build for this stock item",
"nullable": true,
"title": "Source Build",
"type": "integer"
},
"child_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"consumed_by": {
"description": "Build order which consumed this stock item",
"nullable": true,
"type": "integer"
},
"customer": {
"description": "Customer",
"nullable": true,
"type": "integer"
},
"delete_on_deplete": {
"description": "Delete this Stock Item when stock is depleted",
"type": "boolean"
},
"expired": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"expiry_date": {
"description": "Expiry date for stock item. Stock will be considered expired after this date",
"format": "date",
"nullable": true,
"type": "string"
},
"in_stock": {
"readOnly": true,
"type": "boolean"
},
"installed_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 2000,
"title": "External Link",
"type": "string"
},
"location": {
"description": "Where is this stock item located?",
"nullable": true,
"title": "Stock Location",
"type": "integer"
},
"location_detail": {
"allOf": [
{
"$ref": "#/components/schemas/LocationBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Location"
},
"location_path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"notes": {
"description": "Markdown notes (optional)",
"maxLength": 50000,
"nullable": true,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"packaging": {
"description": "Packaging this stock item is stored in",
"maxLength": 50,
"nullable": true,
"type": "string"
},
"parent": {
"description": "Parent stock item",
"nullable": true,
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Part"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"purchase_order": {
"description": "Purchase order for this stock item",
"nullable": true,
"title": "Source Purchase Order",
"type": "integer"
},
"purchase_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"purchase_price": {
"description": "Purchase price of this stock item, per unit or pack",
"format": "decimal",
"nullable": true,
"pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
"type": "string"
},
"purchase_price_currency": {
"description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
"title": "Currency",
"type": "string"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"serial_numbers": {
"description": "Enter serial numbers for new items",
"nullable": true,
"type": "string",
"writeOnly": true
},
"stale": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/StockItemStatusEnum"
}
],
"maximum": 9223372036854775807,
"minimum": 0
},
"status_custom_key": {
"description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
"nullable": true,
"title": "Custom status key",
"type": "integer"
},
"status_text": {
"readOnly": true,
"title": "Status",
"type": "string"
},
"stocktake_date": {
"format": "date",
"nullable": true,
"readOnly": true,
"type": "string"
},
"supplier_part": {
"description": "Select a matching supplier part for this stock item",
"nullable": true,
"type": "integer"
},
"supplier_part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/SupplierPart"
}
],
"nullable": true,
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tests": {
"items": {
"$ref": "#/components/schemas/StockItemTestResult"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"tracking_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"updated": {
"description": "Timestamp of last update",
"format": "date-time",
"nullable": true,
"readOnly": true,
"type": "string"
},
"use_pack_size": {
"description": "Use pack size when adding: the quantity defined is the number of packs",
"nullable": true,
"type": "boolean",
"writeOnly": true
}
},
"required": [
"barcode_hash",
"in_stock",
"part",
"pk",
"quantity",
"status_text"
],
"type": "object"
}
{
"MPN": "string",
"SKU": "string",
"allocated": 10.12,
"barcode_hash": "string",
"batch": "string",
"belongs_to": 0,
"build": 0,
"child_items": 0,
"consumed_by": 0,
"customer": 0,
"delete_on_deplete": true,
"expired": true,
"expiry_date": "2022-04-13",
"in_stock": true,
"installed_items": 0,
"is_building": true,
"link": "string",
"location": 0,
"location_detail": null,
"location_path": [
{}
],
"notes": "string",
"owner": 0,
"packaging": "string",
"parent": 0,
"part": 0,
"part_detail": null,
"pk": 0,
"purchase_order": 0,
"purchase_order_reference": "string",
"purchase_price": "string",
"purchase_price_currency": "string",
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"serial_numbers": "string",
"stale": true,
"status": null,
"status_custom_key": 0,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"string"
],
"tests": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
],
"tracking_items": 0,
"updated": "2022-04-13T15:42:05.901Z",
"use_pack_size": true
}
Schema of the request body
{
"description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
"properties": {
"MPN": {
"nullable": true,
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"nullable": true,
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"nullable": true,
"readOnly": true,
"title": "Allocated Quantity",
"type": "number"
},
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"batch": {
"description": "Batch code for this stock item",
"maxLength": 100,
"nullable": true,
"title": "Batch Code",
"type": "string"
},
"belongs_to": {
"description": "Is this item installed in another item?",
"nullable": true,
"title": "Installed In",
"type": "integer"
},
"build": {
"description": "Build for this stock item",
"nullable": true,
"title": "Source Build",
"type": "integer"
},
"child_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"consumed_by": {
"description": "Build order which consumed this stock item",
"nullable": true,
"type": "integer"
},
"customer": {
"description": "Customer",
"nullable": true,
"type": "integer"
},
"delete_on_deplete": {
"description": "Delete this Stock Item when stock is depleted",
"type": "boolean"
},
"expired": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"expiry_date": {
"description": "Expiry date for stock item. Stock will be considered expired after this date",
"format": "date",
"nullable": true,
"type": "string"
},
"in_stock": {
"readOnly": true,
"type": "boolean"
},
"installed_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 2000,
"title": "External Link",
"type": "string"
},
"location": {
"description": "Where is this stock item located?",
"nullable": true,
"title": "Stock Location",
"type": "integer"
},
"location_detail": {
"allOf": [
{
"$ref": "#/components/schemas/LocationBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Location"
},
"location_path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"notes": {
"description": "Markdown notes (optional)",
"maxLength": 50000,
"nullable": true,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"packaging": {
"description": "Packaging this stock item is stored in",
"maxLength": 50,
"nullable": true,
"type": "string"
},
"parent": {
"description": "Parent stock item",
"nullable": true,
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Part"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"purchase_order": {
"description": "Purchase order for this stock item",
"nullable": true,
"title": "Source Purchase Order",
"type": "integer"
},
"purchase_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"purchase_price": {
"description": "Purchase price of this stock item, per unit or pack",
"format": "decimal",
"nullable": true,
"pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
"type": "string"
},
"purchase_price_currency": {
"description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
"title": "Currency",
"type": "string"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"serial_numbers": {
"description": "Enter serial numbers for new items",
"nullable": true,
"type": "string",
"writeOnly": true
},
"stale": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/StockItemStatusEnum"
}
],
"maximum": 9223372036854775807,
"minimum": 0
},
"status_custom_key": {
"description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
"nullable": true,
"title": "Custom status key",
"type": "integer"
},
"status_text": {
"readOnly": true,
"title": "Status",
"type": "string"
},
"stocktake_date": {
"format": "date",
"nullable": true,
"readOnly": true,
"type": "string"
},
"supplier_part": {
"description": "Select a matching supplier part for this stock item",
"nullable": true,
"type": "integer"
},
"supplier_part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/SupplierPart"
}
],
"nullable": true,
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tests": {
"items": {
"$ref": "#/components/schemas/StockItemTestResult"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"tracking_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"updated": {
"description": "Timestamp of last update",
"format": "date-time",
"nullable": true,
"readOnly": true,
"type": "string"
},
"use_pack_size": {
"description": "Use pack size when adding: the quantity defined is the number of packs",
"nullable": true,
"type": "boolean",
"writeOnly": true
}
},
"required": [
"barcode_hash",
"in_stock",
"part",
"pk",
"quantity",
"status_text"
],
"type": "object"
}
Responses
{
"MPN": "string",
"SKU": "string",
"allocated": 10.12,
"barcode_hash": "string",
"batch": "string",
"belongs_to": 0,
"build": 0,
"child_items": 0,
"consumed_by": 0,
"customer": 0,
"delete_on_deplete": true,
"expired": true,
"expiry_date": "2022-04-13",
"in_stock": true,
"installed_items": 0,
"is_building": true,
"link": "string",
"location": 0,
"location_detail": null,
"location_path": [
{}
],
"notes": "string",
"owner": 0,
"packaging": "string",
"parent": 0,
"part": 0,
"part_detail": null,
"pk": 0,
"purchase_order": 0,
"purchase_order_reference": "string",
"purchase_price": "string",
"purchase_price_currency": "string",
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"serial_numbers": "string",
"stale": true,
"status": null,
"status_custom_key": 0,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"string"
],
"tests": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
],
"tracking_items": 0,
"updated": "2022-04-13T15:42:05.901Z",
"use_pack_size": true
}
Schema of the response body
{
"description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
"properties": {
"MPN": {
"nullable": true,
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"nullable": true,
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"nullable": true,
"readOnly": true,
"title": "Allocated Quantity",
"type": "number"
},
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"batch": {
"description": "Batch code for this stock item",
"maxLength": 100,
"nullable": true,
"title": "Batch Code",
"type": "string"
},
"belongs_to": {
"description": "Is this item installed in another item?",
"nullable": true,
"title": "Installed In",
"type": "integer"
},
"build": {
"description": "Build for this stock item",
"nullable": true,
"title": "Source Build",
"type": "integer"
},
"child_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"consumed_by": {
"description": "Build order which consumed this stock item",
"nullable": true,
"type": "integer"
},
"customer": {
"description": "Customer",
"nullable": true,
"type": "integer"
},
"delete_on_deplete": {
"description": "Delete this Stock Item when stock is depleted",
"type": "boolean"
},
"expired": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"expiry_date": {
"description": "Expiry date for stock item. Stock will be considered expired after this date",
"format": "date",
"nullable": true,
"type": "string"
},
"in_stock": {
"readOnly": true,
"type": "boolean"
},
"installed_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 2000,
"title": "External Link",
"type": "string"
},
"location": {
"description": "Where is this stock item located?",
"nullable": true,
"title": "Stock Location",
"type": "integer"
},
"location_detail": {
"allOf": [
{
"$ref": "#/components/schemas/LocationBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Location"
},
"location_path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"notes": {
"description": "Markdown notes (optional)",
"maxLength": 50000,
"nullable": true,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"packaging": {
"description": "Packaging this stock item is stored in",
"maxLength": 50,
"nullable": true,
"type": "string"
},
"parent": {
"description": "Parent stock item",
"nullable": true,
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Part"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"purchase_order": {
"description": "Purchase order for this stock item",
"nullable": true,
"title": "Source Purchase Order",
"type": "integer"
},
"purchase_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"purchase_price": {
"description": "Purchase price of this stock item, per unit or pack",
"format": "decimal",
"nullable": true,
"pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
"type": "string"
},
"purchase_price_currency": {
"description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
"title": "Currency",
"type": "string"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"serial_numbers": {
"description": "Enter serial numbers for new items",
"nullable": true,
"type": "string",
"writeOnly": true
},
"stale": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/StockItemStatusEnum"
}
],
"maximum": 9223372036854775807,
"minimum": 0
},
"status_custom_key": {
"description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
"nullable": true,
"title": "Custom status key",
"type": "integer"
},
"status_text": {
"readOnly": true,
"title": "Status",
"type": "string"
},
"stocktake_date": {
"format": "date",
"nullable": true,
"readOnly": true,
"type": "string"
},
"supplier_part": {
"description": "Select a matching supplier part for this stock item",
"nullable": true,
"type": "integer"
},
"supplier_part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/SupplierPart"
}
],
"nullable": true,
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tests": {
"items": {
"$ref": "#/components/schemas/StockItemTestResult"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"tracking_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"updated": {
"description": "Timestamp of last update",
"format": "date-time",
"nullable": true,
"readOnly": true,
"type": "string"
},
"use_pack_size": {
"description": "Use pack size when adding: the quantity defined is the number of packs",
"nullable": true,
"type": "boolean",
"writeOnly": true
}
},
"required": [
"barcode_hash",
"in_stock",
"part",
"pk",
"quantity",
"status_text"
],
"type": "object"
}
POST /api/stock/add/¶
Description
Endpoint for adding a quantity of stock to an existing StockItem.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
Request body
{
"items": [
{
"batch": "string",
"packaging": "string",
"pk": 0,
"quantity": "string",
"status": 0
}
],
"notes": "string"
}
Schema of the request body
{
"description": "Serializer for adding stock to stock item(s).",
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/StockAdjustmentItem"
},
"type": "array"
},
"notes": {
"description": "Stock transaction notes",
"type": "string"
}
},
"required": [
"items"
],
"type": "object"
}
{
"items": [
{
"batch": "string",
"packaging": "string",
"pk": 0,
"quantity": "string",
"status": 0
}
],
"notes": "string"
}
Schema of the request body
{
"description": "Serializer for adding stock to stock item(s).",
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/StockAdjustmentItem"
},
"type": "array"
},
"notes": {
"description": "Stock transaction notes",
"type": "string"
}
},
"required": [
"items"
],
"type": "object"
}
{
"items": [
{
"batch": "string",
"packaging": "string",
"pk": 0,
"quantity": "string",
"status": 0
}
],
"notes": "string"
}
Schema of the request body
{
"description": "Serializer for adding stock to stock item(s).",
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/StockAdjustmentItem"
},
"type": "array"
},
"notes": {
"description": "Stock transaction notes",
"type": "string"
}
},
"required": [
"items"
],
"type": "object"
}
Responses
{
"items": [
{
"batch": "string",
"packaging": "string",
"pk": 0,
"quantity": "string",
"status": 0
}
],
"notes": "string"
}
Schema of the response body
{
"description": "Serializer for adding stock to stock item(s).",
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/StockAdjustmentItem"
},
"type": "array"
},
"notes": {
"description": "Stock transaction notes",
"type": "string"
}
},
"required": [
"items"
],
"type": "object"
}
POST /api/stock/assign/¶
Description
API endpoint for assigning stock to a particular customer.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
Request body
{
"customer": 0,
"items": [
{
"item": 0
}
],
"notes": "string"
}
Schema of the request body
{
"description": "Serializer for assigning one (or more) stock items to a customer.\n\nThis is a manual assignment process, separate for (for example) a Sales Order",
"properties": {
"customer": {
"description": "Customer to assign stock items",
"type": "integer"
},
"items": {
"items": {
"$ref": "#/components/schemas/StockAssignmentItem"
},
"type": "array"
},
"notes": {
"description": "Stock assignment notes",
"type": "string"
}
},
"required": [
"customer",
"items"
],
"type": "object"
}
{
"customer": 0,
"items": [
{
"item": 0
}
],
"notes": "string"
}
Schema of the request body
{
"description": "Serializer for assigning one (or more) stock items to a customer.\n\nThis is a manual assignment process, separate for (for example) a Sales Order",
"properties": {
"customer": {
"description": "Customer to assign stock items",
"type": "integer"
},
"items": {
"items": {
"$ref": "#/components/schemas/StockAssignmentItem"
},
"type": "array"
},
"notes": {
"description": "Stock assignment notes",
"type": "string"
}
},
"required": [
"customer",
"items"
],
"type": "object"
}
{
"customer": 0,
"items": [
{
"item": 0
}
],
"notes": "string"
}
Schema of the request body
{
"description": "Serializer for assigning one (or more) stock items to a customer.\n\nThis is a manual assignment process, separate for (for example) a Sales Order",
"properties": {
"customer": {
"description": "Customer to assign stock items",
"type": "integer"
},
"items": {
"items": {
"$ref": "#/components/schemas/StockAssignmentItem"
},
"type": "array"
},
"notes": {
"description": "Stock assignment notes",
"type": "string"
}
},
"required": [
"customer",
"items"
],
"type": "object"
}
Responses
{
"customer": 0,
"items": [
{
"item": 0
}
],
"notes": "string"
}
Schema of the response body
{
"description": "Serializer for assigning one (or more) stock items to a customer.\n\nThis is a manual assignment process, separate for (for example) a Sales Order",
"properties": {
"customer": {
"description": "Customer to assign stock items",
"type": "integer"
},
"items": {
"items": {
"$ref": "#/components/schemas/StockAssignmentItem"
},
"type": "array"
},
"notes": {
"description": "Stock assignment notes",
"type": "string"
}
},
"required": [
"customer",
"items"
],
"type": "object"
}
POST /api/stock/change_status/¶
Description
API endpoint to change the status code of multiple StockItem objects.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
Request body
{
"items": [
0
],
"note": "string",
"status": 0
}
Schema of the request body
{
"description": "Serializer for changing status of multiple StockItem objects.",
"properties": {
"items": {
"description": "Select stock items to change status",
"items": {
"title": "Stock Items",
"type": "integer"
},
"title": "Stock Items",
"type": "array"
},
"note": {
"description": "Add transaction note (optional)",
"title": "Notes",
"type": "string"
},
"status": {
"default": 10,
"description": "Stock item status code\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the 'stock_status_retrieve' call.",
"type": "integer"
}
},
"required": [
"items"
],
"type": "object"
}
{
"items": [
0
],
"note": "string",
"status": 0
}
Schema of the request body
{
"description": "Serializer for changing status of multiple StockItem objects.",
"properties": {
"items": {
"description": "Select stock items to change status",
"items": {
"title": "Stock Items",
"type": "integer"
},
"title": "Stock Items",
"type": "array"
},
"note": {
"description": "Add transaction note (optional)",
"title": "Notes",
"type": "string"
},
"status": {
"default": 10,
"description": "Stock item status code\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the 'stock_status_retrieve' call.",
"type": "integer"
}
},
"required": [
"items"
],
"type": "object"
}
{
"items": [
0
],
"note": "string",
"status": 0
}
Schema of the request body
{
"description": "Serializer for changing status of multiple StockItem objects.",
"properties": {
"items": {
"description": "Select stock items to change status",
"items": {
"title": "Stock Items",
"type": "integer"
},
"title": "Stock Items",
"type": "array"
},
"note": {
"description": "Add transaction note (optional)",
"title": "Notes",
"type": "string"
},
"status": {
"default": 10,
"description": "Stock item status code\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the 'stock_status_retrieve' call.",
"type": "integer"
}
},
"required": [
"items"
],
"type": "object"
}
Responses
{
"items": [
0
],
"note": "string",
"status": 0
}
Schema of the response body
{
"description": "Serializer for changing status of multiple StockItem objects.",
"properties": {
"items": {
"description": "Select stock items to change status",
"items": {
"title": "Stock Items",
"type": "integer"
},
"title": "Stock Items",
"type": "array"
},
"note": {
"description": "Add transaction note (optional)",
"title": "Notes",
"type": "string"
},
"status": {
"default": 10,
"description": "Stock item status code\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the 'stock_status_retrieve' call.",
"type": "integer"
}
},
"required": [
"items"
],
"type": "object"
}
POST /api/stock/count/¶
Description
Endpoint for counting stock (performing a stocktake).
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
Request body
{
"items": [
{
"batch": "string",
"packaging": "string",
"pk": 0,
"quantity": "string",
"status": 0
}
],
"notes": "string"
}
Schema of the request body
{
"description": "Serializer for counting stock items.",
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/StockAdjustmentItem"
},
"type": "array"
},
"notes": {
"description": "Stock transaction notes",
"type": "string"
}
},
"required": [
"items"
],
"type": "object"
}
{
"items": [
{
"batch": "string",
"packaging": "string",
"pk": 0,
"quantity": "string",
"status": 0
}
],
"notes": "string"
}
Schema of the request body
{
"description": "Serializer for counting stock items.",
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/StockAdjustmentItem"
},
"type": "array"
},
"notes": {
"description": "Stock transaction notes",
"type": "string"
}
},
"required": [
"items"
],
"type": "object"
}
{
"items": [
{
"batch": "string",
"packaging": "string",
"pk": 0,
"quantity": "string",
"status": 0
}
],
"notes": "string"
}
Schema of the request body
{
"description": "Serializer for counting stock items.",
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/StockAdjustmentItem"
},
"type": "array"
},
"notes": {
"description": "Stock transaction notes",
"type": "string"
}
},
"required": [
"items"
],
"type": "object"
}
Responses
{
"items": [
{
"batch": "string",
"packaging": "string",
"pk": 0,
"quantity": "string",
"status": 0
}
],
"notes": "string"
}
Schema of the response body
{
"description": "Serializer for counting stock items.",
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/StockAdjustmentItem"
},
"type": "array"
},
"notes": {
"description": "Stock transaction notes",
"type": "string"
}
},
"required": [
"items"
],
"type": "object"
}
GET /api/stock/location-type/¶
Description
API endpoint for a list of StockLocationType objects.
- GET: Return a list of all StockLocationType objects
- POST: Create a StockLocationType
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
limit |
query | integer | No | Number of results to return per page. | |
offset |
query | integer | No | The initial index from which to return the results. | |
ordering |
query | string | No | Which field to use when ordering the results. | |
search |
query | string | No | A search term. Searched fields: name. |
Responses
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"description": "string",
"icon": "string",
"location_count": 0,
"name": "string",
"pk": 0
}
]
}
Schema of the response body
{
"properties": {
"count": {
"example": 123,
"type": "integer"
},
"next": {
"example": "http://api.example.org/accounts/?offset=400&limit=100",
"format": "uri",
"nullable": true,
"type": "string"
},
"previous": {
"example": "http://api.example.org/accounts/?offset=200&limit=100",
"format": "uri",
"nullable": true,
"type": "string"
},
"results": {
"items": {
"$ref": "#/components/schemas/StockLocationType"
},
"type": "array"
}
},
"required": [
"count",
"results"
],
"type": "object"
}
POST /api/stock/location-type/¶
Description
API endpoint for a list of StockLocationType objects.
- GET: Return a list of all StockLocationType objects
- POST: Create a StockLocationType
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
Request body
{
"description": "string",
"icon": "string",
"location_count": 0,
"name": "string",
"pk": 0
}
Schema of the request body
{
"description": "Serializer for StockLocationType model.",
"properties": {
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"icon": {
"description": "Default icon for all locations that have no icon set (optional)",
"maxLength": 100,
"type": "string"
},
"location_count": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"required": [
"name",
"pk"
],
"type": "object"
}
{
"description": "string",
"icon": "string",
"location_count": 0,
"name": "string",
"pk": 0
}
Schema of the request body
{
"description": "Serializer for StockLocationType model.",
"properties": {
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"icon": {
"description": "Default icon for all locations that have no icon set (optional)",
"maxLength": 100,
"type": "string"
},
"location_count": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"required": [
"name",
"pk"
],
"type": "object"
}
{
"description": "string",
"icon": "string",
"location_count": 0,
"name": "string",
"pk": 0
}
Schema of the request body
{
"description": "Serializer for StockLocationType model.",
"properties": {
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"icon": {
"description": "Default icon for all locations that have no icon set (optional)",
"maxLength": 100,
"type": "string"
},
"location_count": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"required": [
"name",
"pk"
],
"type": "object"
}
Responses
{
"description": "string",
"icon": "string",
"location_count": 0,
"name": "string",
"pk": 0
}
Schema of the response body
{
"description": "Serializer for StockLocationType model.",
"properties": {
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"icon": {
"description": "Default icon for all locations that have no icon set (optional)",
"maxLength": 100,
"type": "string"
},
"location_count": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"required": [
"name",
"pk"
],
"type": "object"
}
DELETE /api/stock/location-type/{id}/¶
Description
API detail endpoint for a StockLocationType object.
- GET: return a single StockLocationType
- PUT: update a StockLocationType
- PATCH: partial update a StockLocationType
- DELETE: delete a StockLocationType
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
id |
path | integer | No |
Responses
GET /api/stock/location-type/{id}/¶
Description
API detail endpoint for a StockLocationType object.
- GET: return a single StockLocationType
- PUT: update a StockLocationType
- PATCH: partial update a StockLocationType
- DELETE: delete a StockLocationType
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
id |
path | integer | No |
Responses
{
"description": "string",
"icon": "string",
"location_count": 0,
"name": "string",
"pk": 0
}
Schema of the response body
{
"description": "Serializer for StockLocationType model.",
"properties": {
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"icon": {
"description": "Default icon for all locations that have no icon set (optional)",
"maxLength": 100,
"type": "string"
},
"location_count": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"required": [
"name",
"pk"
],
"type": "object"
}
PATCH /api/stock/location-type/{id}/¶
Description
API detail endpoint for a StockLocationType object.
- GET: return a single StockLocationType
- PUT: update a StockLocationType
- PATCH: partial update a StockLocationType
- DELETE: delete a StockLocationType
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
id |
path | integer | No |
Request body
{
"description": "string",
"icon": "string",
"location_count": 0,
"name": "string",
"pk": 0
}
Schema of the request body
{
"description": "Serializer for StockLocationType model.",
"properties": {
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"icon": {
"description": "Default icon for all locations that have no icon set (optional)",
"maxLength": 100,
"type": "string"
},
"location_count": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"type": "object"
}
{
"description": "string",
"icon": "string",
"location_count": 0,
"name": "string",
"pk": 0
}
Schema of the request body
{
"description": "Serializer for StockLocationType model.",
"properties": {
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"icon": {
"description": "Default icon for all locations that have no icon set (optional)",
"maxLength": 100,
"type": "string"
},
"location_count": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"type": "object"
}
{
"description": "string",
"icon": "string",
"location_count": 0,
"name": "string",
"pk": 0
}
Schema of the request body
{
"description": "Serializer for StockLocationType model.",
"properties": {
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"icon": {
"description": "Default icon for all locations that have no icon set (optional)",
"maxLength": 100,
"type": "string"
},
"location_count": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"type": "object"
}
Responses
{
"description": "string",
"icon": "string",
"location_count": 0,
"name": "string",
"pk": 0
}
Schema of the response body
{
"description": "Serializer for StockLocationType model.",
"properties": {
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"icon": {
"description": "Default icon for all locations that have no icon set (optional)",
"maxLength": 100,
"type": "string"
},
"location_count": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"required": [
"name",
"pk"
],
"type": "object"
}
PUT /api/stock/location-type/{id}/¶
Description
API detail endpoint for a StockLocationType object.
- GET: return a single StockLocationType
- PUT: update a StockLocationType
- PATCH: partial update a StockLocationType
- DELETE: delete a StockLocationType
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
id |
path | integer | No |
Request body
{
"description": "string",
"icon": "string",
"location_count": 0,
"name": "string",
"pk": 0
}
Schema of the request body
{
"description": "Serializer for StockLocationType model.",
"properties": {
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"icon": {
"description": "Default icon for all locations that have no icon set (optional)",
"maxLength": 100,
"type": "string"
},
"location_count": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"required": [
"name",
"pk"
],
"type": "object"
}
{
"description": "string",
"icon": "string",
"location_count": 0,
"name": "string",
"pk": 0
}
Schema of the request body
{
"description": "Serializer for StockLocationType model.",
"properties": {
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"icon": {
"description": "Default icon for all locations that have no icon set (optional)",
"maxLength": 100,
"type": "string"
},
"location_count": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"required": [
"name",
"pk"
],
"type": "object"
}
{
"description": "string",
"icon": "string",
"location_count": 0,
"name": "string",
"pk": 0
}
Schema of the request body
{
"description": "Serializer for StockLocationType model.",
"properties": {
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"icon": {
"description": "Default icon for all locations that have no icon set (optional)",
"maxLength": 100,
"type": "string"
},
"location_count": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"required": [
"name",
"pk"
],
"type": "object"
}
Responses
{
"description": "string",
"icon": "string",
"location_count": 0,
"name": "string",
"pk": 0
}
Schema of the response body
{
"description": "Serializer for StockLocationType model.",
"properties": {
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"icon": {
"description": "Default icon for all locations that have no icon set (optional)",
"maxLength": 100,
"type": "string"
},
"location_count": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"required": [
"name",
"pk"
],
"type": "object"
}
GET /api/stock/location/¶
Description
Override the GET method to determine export options.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
cascade |
query | boolean | No | Include sub-locations in filtered results | |
depth |
query | number | No | Filter by location depth | |
external |
query | boolean | No | ||
has_location_type |
query | boolean | No | has_location_type | |
limit |
query | integer | No | Number of results to return per page. | |
location_type |
query | integer | No | ||
name |
query | string | No | ||
offset |
query | integer | No | The initial index from which to return the results. | |
ordering |
query | string | No | Which field to use when ordering the results. | |
parent |
query | integer | No | Filter by parent location | |
path_detail |
query | boolean | False | No | Include detailed information about the BOM item linked to this build line. |
search |
query | string | No | A search term. Searched fields: description, name, pathstring, tags__name, tags__slug. | |
structural |
query | boolean | No | ||
top_level |
query | boolean | No | Filter by top-level locations |
Responses
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"barcode_hash": "string",
"custom_icon": "string",
"description": "string",
"external": true,
"icon": "string",
"items": 0,
"level": 0,
"location_type": 0,
"location_type_detail": null,
"name": "string",
"owner": 0,
"parameters": [
{
"data": "string",
"data_numeric": 10.12,
"model_id": 214,
"model_type": null,
"note": "string",
"pk": 0,
"template": 0,
"template_detail": null,
"updated": "2022-04-13T15:42:05.901Z",
"updated_by": 0,
"updated_by_detail": null
}
],
"parent": 0,
"path": [
{}
],
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
]
}
]
}
Schema of the response body
{
"properties": {
"count": {
"example": 123,
"type": "integer"
},
"next": {
"example": "http://api.example.org/accounts/?offset=400&limit=100",
"format": "uri",
"nullable": true,
"type": "string"
},
"previous": {
"example": "http://api.example.org/accounts/?offset=200&limit=100",
"format": "uri",
"nullable": true,
"type": "string"
},
"results": {
"items": {
"$ref": "#/components/schemas/Location"
},
"type": "array"
}
},
"required": [
"count",
"results"
],
"type": "object"
}
PATCH /api/stock/location/¶
Description
Perform a PATCH operation against this list endpoint.
Note that the typical DRF list endpoint does not support PATCH, so this method is provided as a custom implementation.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
Request body
{
"barcode_hash": "string",
"custom_icon": "string",
"description": "string",
"external": true,
"icon": "string",
"items": 0,
"level": 0,
"location_type": 0,
"location_type_detail": null,
"name": "string",
"owner": 0,
"parameters": [
{
"data": "string",
"data_numeric": 10.12,
"model_id": 78,
"model_type": null,
"note": "string",
"pk": 0,
"template": 0,
"template_detail": null,
"updated": "2022-04-13T15:42:05.901Z",
"updated_by": 0,
"updated_by_detail": null
}
],
"parent": 0,
"path": [
{}
],
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
]
}
Schema of the request body
{
"description": "Detailed information about a stock location.",
"properties": {
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"custom_icon": {
"description": "Icon (optional)",
"maxLength": 100,
"nullable": true,
"title": "Icon",
"type": "string"
},
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"external": {
"description": "This is an external stock location",
"type": "boolean"
},
"icon": {
"readOnly": true,
"type": "string"
},
"items": {
"readOnly": true,
"title": "Stock Items",
"type": "integer"
},
"level": {
"readOnly": true,
"type": "integer"
},
"location_type": {
"description": "Stock location type of this location",
"nullable": true,
"type": "integer"
},
"location_type_detail": {
"allOf": [
{
"$ref": "#/components/schemas/StockLocationType"
}
],
"nullable": true,
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parameters": {
"items": {
"$ref": "#/components/schemas/Parameter"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"pathstring": {
"description": "Path",
"readOnly": true,
"title": "Path",
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"structural": {
"description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
"type": "boolean"
},
"sublocations": {
"readOnly": true,
"type": "integer"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
}
{
"barcode_hash": "string",
"custom_icon": "string",
"description": "string",
"external": true,
"icon": "string",
"items": 0,
"level": 0,
"location_type": 0,
"location_type_detail": null,
"name": "string",
"owner": 0,
"parameters": [
{
"data": "string",
"data_numeric": 10.12,
"model_id": 144,
"model_type": null,
"note": "string",
"pk": 0,
"template": 0,
"template_detail": null,
"updated": "2022-04-13T15:42:05.901Z",
"updated_by": 0,
"updated_by_detail": null
}
],
"parent": 0,
"path": [
{}
],
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
]
}
Schema of the request body
{
"description": "Detailed information about a stock location.",
"properties": {
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"custom_icon": {
"description": "Icon (optional)",
"maxLength": 100,
"nullable": true,
"title": "Icon",
"type": "string"
},
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"external": {
"description": "This is an external stock location",
"type": "boolean"
},
"icon": {
"readOnly": true,
"type": "string"
},
"items": {
"readOnly": true,
"title": "Stock Items",
"type": "integer"
},
"level": {
"readOnly": true,
"type": "integer"
},
"location_type": {
"description": "Stock location type of this location",
"nullable": true,
"type": "integer"
},
"location_type_detail": {
"allOf": [
{
"$ref": "#/components/schemas/StockLocationType"
}
],
"nullable": true,
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parameters": {
"items": {
"$ref": "#/components/schemas/Parameter"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"pathstring": {
"description": "Path",
"readOnly": true,
"title": "Path",
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"structural": {
"description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
"type": "boolean"
},
"sublocations": {
"readOnly": true,
"type": "integer"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
}
{
"barcode_hash": "string",
"custom_icon": "string",
"description": "string",
"external": true,
"icon": "string",
"items": 0,
"level": 0,
"location_type": 0,
"location_type_detail": null,
"name": "string",
"owner": 0,
"parameters": [
{
"data": "string",
"data_numeric": 10.12,
"model_id": 209,
"model_type": null,
"note": "string",
"pk": 0,
"template": 0,
"template_detail": null,
"updated": "2022-04-13T15:42:05.901Z",
"updated_by": 0,
"updated_by_detail": null
}
],
"parent": 0,
"path": [
{}
],
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
]
}
Schema of the request body
{
"description": "Detailed information about a stock location.",
"properties": {
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"custom_icon": {
"description": "Icon (optional)",
"maxLength": 100,
"nullable": true,
"title": "Icon",
"type": "string"
},
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"external": {
"description": "This is an external stock location",
"type": "boolean"
},
"icon": {
"readOnly": true,
"type": "string"
},
"items": {
"readOnly": true,
"title": "Stock Items",
"type": "integer"
},
"level": {
"readOnly": true,
"type": "integer"
},
"location_type": {
"description": "Stock location type of this location",
"nullable": true,
"type": "integer"
},
"location_type_detail": {
"allOf": [
{
"$ref": "#/components/schemas/StockLocationType"
}
],
"nullable": true,
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parameters": {
"items": {
"$ref": "#/components/schemas/Parameter"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"pathstring": {
"description": "Path",
"readOnly": true,
"title": "Path",
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"structural": {
"description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
"type": "boolean"
},
"sublocations": {
"readOnly": true,
"type": "integer"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
}
Responses
{
"barcode_hash": "string",
"custom_icon": "string",
"description": "string",
"external": true,
"icon": "string",
"items": 0,
"level": 0,
"location_type": 0,
"location_type_detail": null,
"name": "string",
"owner": 0,
"parameters": [
{
"data": "string",
"data_numeric": 10.12,
"model_id": 157,
"model_type": null,
"note": "string",
"pk": 0,
"template": 0,
"template_detail": null,
"updated": "2022-04-13T15:42:05.901Z",
"updated_by": 0,
"updated_by_detail": null
}
],
"parent": 0,
"path": [
{}
],
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
]
}
Schema of the response body
{
"description": "Detailed information about a stock location.",
"properties": {
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"custom_icon": {
"description": "Icon (optional)",
"maxLength": 100,
"nullable": true,
"title": "Icon",
"type": "string"
},
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"external": {
"description": "This is an external stock location",
"type": "boolean"
},
"icon": {
"readOnly": true,
"type": "string"
},
"items": {
"readOnly": true,
"title": "Stock Items",
"type": "integer"
},
"level": {
"readOnly": true,
"type": "integer"
},
"location_type": {
"description": "Stock location type of this location",
"nullable": true,
"type": "integer"
},
"location_type_detail": {
"allOf": [
{
"$ref": "#/components/schemas/StockLocationType"
}
],
"nullable": true,
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parameters": {
"items": {
"$ref": "#/components/schemas/Parameter"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"pathstring": {
"description": "Path",
"readOnly": true,
"title": "Path",
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"structural": {
"description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
"type": "boolean"
},
"sublocations": {
"readOnly": true,
"type": "integer"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"name",
"pathstring",
"pk",
"sublocations"
],
"type": "object"
}
POST /api/stock/location/¶
Description
API endpoint for list view of StockLocation objects.
- GET: Return list of StockLocation objects
- POST: Create a new StockLocation
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
Request body
{
"barcode_hash": "string",
"custom_icon": "string",
"description": "string",
"external": true,
"icon": "string",
"items": 0,
"level": 0,
"location_type": 0,
"location_type_detail": null,
"name": "string",
"owner": 0,
"parameters": [
{
"data": "string",
"data_numeric": 10.12,
"model_id": 66,
"model_type": null,
"note": "string",
"pk": 0,
"template": 0,
"template_detail": null,
"updated": "2022-04-13T15:42:05.901Z",
"updated_by": 0,
"updated_by_detail": null
}
],
"parent": 0,
"path": [
{}
],
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
]
}
Schema of the request body
{
"description": "Detailed information about a stock location.",
"properties": {
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"custom_icon": {
"description": "Icon (optional)",
"maxLength": 100,
"nullable": true,
"title": "Icon",
"type": "string"
},
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"external": {
"description": "This is an external stock location",
"type": "boolean"
},
"icon": {
"readOnly": true,
"type": "string"
},
"items": {
"readOnly": true,
"title": "Stock Items",
"type": "integer"
},
"level": {
"readOnly": true,
"type": "integer"
},
"location_type": {
"description": "Stock location type of this location",
"nullable": true,
"type": "integer"
},
"location_type_detail": {
"allOf": [
{
"$ref": "#/components/schemas/StockLocationType"
}
],
"nullable": true,
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parameters": {
"items": {
"$ref": "#/components/schemas/Parameter"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"pathstring": {
"description": "Path",
"readOnly": true,
"title": "Path",
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"structural": {
"description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
"type": "boolean"
},
"sublocations": {
"readOnly": true,
"type": "integer"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"name",
"pathstring",
"pk",
"sublocations"
],
"type": "object"
}
{
"barcode_hash": "string",
"custom_icon": "string",
"description": "string",
"external": true,
"icon": "string",
"items": 0,
"level": 0,
"location_type": 0,
"location_type_detail": null,
"name": "string",
"owner": 0,
"parameters": [
{
"data": "string",
"data_numeric": 10.12,
"model_id": 50,
"model_type": null,
"note": "string",
"pk": 0,
"template": 0,
"template_detail": null,
"updated": "2022-04-13T15:42:05.901Z",
"updated_by": 0,
"updated_by_detail": null
}
],
"parent": 0,
"path": [
{}
],
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
]
}
Schema of the request body
{
"description": "Detailed information about a stock location.",
"properties": {
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"custom_icon": {
"description": "Icon (optional)",
"maxLength": 100,
"nullable": true,
"title": "Icon",
"type": "string"
},
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"external": {
"description": "This is an external stock location",
"type": "boolean"
},
"icon": {
"readOnly": true,
"type": "string"
},
"items": {
"readOnly": true,
"title": "Stock Items",
"type": "integer"
},
"level": {
"readOnly": true,
"type": "integer"
},
"location_type": {
"description": "Stock location type of this location",
"nullable": true,
"type": "integer"
},
"location_type_detail": {
"allOf": [
{
"$ref": "#/components/schemas/StockLocationType"
}
],
"nullable": true,
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parameters": {
"items": {
"$ref": "#/components/schemas/Parameter"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"pathstring": {
"description": "Path",
"readOnly": true,
"title": "Path",
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"structural": {
"description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
"type": "boolean"
},
"sublocations": {
"readOnly": true,
"type": "integer"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"name",
"pathstring",
"pk",
"sublocations"
],
"type": "object"
}
{
"barcode_hash": "string",
"custom_icon": "string",
"description": "string",
"external": true,
"icon": "string",
"items": 0,
"level": 0,
"location_type": 0,
"location_type_detail": null,
"name": "string",
"owner": 0,
"parameters": [
{
"data": "string",
"data_numeric": 10.12,
"model_id": 31,
"model_type": null,
"note": "string",
"pk": 0,
"template": 0,
"template_detail": null,
"updated": "2022-04-13T15:42:05.901Z",
"updated_by": 0,
"updated_by_detail": null
}
],
"parent": 0,
"path": [
{}
],
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
]
}
Schema of the request body
{
"description": "Detailed information about a stock location.",
"properties": {
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"custom_icon": {
"description": "Icon (optional)",
"maxLength": 100,
"nullable": true,
"title": "Icon",
"type": "string"
},
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"external": {
"description": "This is an external stock location",
"type": "boolean"
},
"icon": {
"readOnly": true,
"type": "string"
},
"items": {
"readOnly": true,
"title": "Stock Items",
"type": "integer"
},
"level": {
"readOnly": true,
"type": "integer"
},
"location_type": {
"description": "Stock location type of this location",
"nullable": true,
"type": "integer"
},
"location_type_detail": {
"allOf": [
{
"$ref": "#/components/schemas/StockLocationType"
}
],
"nullable": true,
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parameters": {
"items": {
"$ref": "#/components/schemas/Parameter"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"pathstring": {
"description": "Path",
"readOnly": true,
"title": "Path",
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"structural": {
"description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
"type": "boolean"
},
"sublocations": {
"readOnly": true,
"type": "integer"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"name",
"pathstring",
"pk",
"sublocations"
],
"type": "object"
}
Responses
{
"barcode_hash": "string",
"custom_icon": "string",
"description": "string",
"external": true,
"icon": "string",
"items": 0,
"level": 0,
"location_type": 0,
"location_type_detail": null,
"name": "string",
"owner": 0,
"parameters": [
{
"data": "string",
"data_numeric": 10.12,
"model_id": 203,
"model_type": null,
"note": "string",
"pk": 0,
"template": 0,
"template_detail": null,
"updated": "2022-04-13T15:42:05.901Z",
"updated_by": 0,
"updated_by_detail": null
}
],
"parent": 0,
"path": [
{}
],
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
]
}
Schema of the response body
{
"description": "Detailed information about a stock location.",
"properties": {
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"custom_icon": {
"description": "Icon (optional)",
"maxLength": 100,
"nullable": true,
"title": "Icon",
"type": "string"
},
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"external": {
"description": "This is an external stock location",
"type": "boolean"
},
"icon": {
"readOnly": true,
"type": "string"
},
"items": {
"readOnly": true,
"title": "Stock Items",
"type": "integer"
},
"level": {
"readOnly": true,
"type": "integer"
},
"location_type": {
"description": "Stock location type of this location",
"nullable": true,
"type": "integer"
},
"location_type_detail": {
"allOf": [
{
"$ref": "#/components/schemas/StockLocationType"
}
],
"nullable": true,
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parameters": {
"items": {
"$ref": "#/components/schemas/Parameter"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"pathstring": {
"description": "Path",
"readOnly": true,
"title": "Path",
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"structural": {
"description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
"type": "boolean"
},
"sublocations": {
"readOnly": true,
"type": "integer"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"name",
"pathstring",
"pk",
"sublocations"
],
"type": "object"
}
PUT /api/stock/location/¶
Description
Perform a PUT operation against this list endpoint.
Simply redirects to the PATCH method.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
Request body
{
"barcode_hash": "string",
"custom_icon": "string",
"description": "string",
"external": true,
"icon": "string",
"items": 0,
"level": 0,
"location_type": 0,
"location_type_detail": null,
"name": "string",
"owner": 0,
"parameters": [
{
"data": "string",
"data_numeric": 10.12,
"model_id": 274,
"model_type": null,
"note": "string",
"pk": 0,
"template": 0,
"template_detail": null,
"updated": "2022-04-13T15:42:05.901Z",
"updated_by": 0,
"updated_by_detail": null
}
],
"parent": 0,
"path": [
{}
],
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
]
}
Schema of the request body
{
"description": "Detailed information about a stock location.",
"properties": {
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"custom_icon": {
"description": "Icon (optional)",
"maxLength": 100,
"nullable": true,
"title": "Icon",
"type": "string"
},
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"external": {
"description": "This is an external stock location",
"type": "boolean"
},
"icon": {
"readOnly": true,
"type": "string"
},
"items": {
"readOnly": true,
"title": "Stock Items",
"type": "integer"
},
"level": {
"readOnly": true,
"type": "integer"
},
"location_type": {
"description": "Stock location type of this location",
"nullable": true,
"type": "integer"
},
"location_type_detail": {
"allOf": [
{
"$ref": "#/components/schemas/StockLocationType"
}
],
"nullable": true,
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parameters": {
"items": {
"$ref": "#/components/schemas/Parameter"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"pathstring": {
"description": "Path",
"readOnly": true,
"title": "Path",
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"structural": {
"description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
"type": "boolean"
},
"sublocations": {
"readOnly": true,
"type": "integer"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"name",
"pathstring",
"pk",
"sublocations"
],
"type": "object"
}
{
"barcode_hash": "string",
"custom_icon": "string",
"description": "string",
"external": true,
"icon": "string",
"items": 0,
"level": 0,
"location_type": 0,
"location_type_detail": null,
"name": "string",
"owner": 0,
"parameters": [
{
"data": "string",
"data_numeric": 10.12,
"model_id": 149,
"model_type": null,
"note": "string",
"pk": 0,
"template": 0,
"template_detail": null,
"updated": "2022-04-13T15:42:05.901Z",
"updated_by": 0,
"updated_by_detail": null
}
],
"parent": 0,
"path": [
{}
],
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
]
}
Schema of the request body
{
"description": "Detailed information about a stock location.",
"properties": {
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"custom_icon": {
"description": "Icon (optional)",
"maxLength": 100,
"nullable": true,
"title": "Icon",
"type": "string"
},
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"external": {
"description": "This is an external stock location",
"type": "boolean"
},
"icon": {
"readOnly": true,
"type": "string"
},
"items": {
"readOnly": true,
"title": "Stock Items",
"type": "integer"
},
"level": {
"readOnly": true,
"type": "integer"
},
"location_type": {
"description": "Stock location type of this location",
"nullable": true,
"type": "integer"
},
"location_type_detail": {
"allOf": [
{
"$ref": "#/components/schemas/StockLocationType"
}
],
"nullable": true,
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parameters": {
"items": {
"$ref": "#/components/schemas/Parameter"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"pathstring": {
"description": "Path",
"readOnly": true,
"title": "Path",
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"structural": {
"description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
"type": "boolean"
},
"sublocations": {
"readOnly": true,
"type": "integer"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"name",
"pathstring",
"pk",
"sublocations"
],
"type": "object"
}
{
"barcode_hash": "string",
"custom_icon": "string",
"description": "string",
"external": true,
"icon": "string",
"items": 0,
"level": 0,
"location_type": 0,
"location_type_detail": null,
"name": "string",
"owner": 0,
"parameters": [
{
"data": "string",
"data_numeric": 10.12,
"model_id": 275,
"model_type": null,
"note": "string",
"pk": 0,
"template": 0,
"template_detail": null,
"updated": "2022-04-13T15:42:05.901Z",
"updated_by": 0,
"updated_by_detail": null
}
],
"parent": 0,
"path": [
{}
],
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
]
}
Schema of the request body
{
"description": "Detailed information about a stock location.",
"properties": {
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"custom_icon": {
"description": "Icon (optional)",
"maxLength": 100,
"nullable": true,
"title": "Icon",
"type": "string"
},
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"external": {
"description": "This is an external stock location",
"type": "boolean"
},
"icon": {
"readOnly": true,
"type": "string"
},
"items": {
"readOnly": true,
"title": "Stock Items",
"type": "integer"
},
"level": {
"readOnly": true,
"type": "integer"
},
"location_type": {
"description": "Stock location type of this location",
"nullable": true,
"type": "integer"
},
"location_type_detail": {
"allOf": [
{
"$ref": "#/components/schemas/StockLocationType"
}
],
"nullable": true,
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parameters": {
"items": {
"$ref": "#/components/schemas/Parameter"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"pathstring": {
"description": "Path",
"readOnly": true,
"title": "Path",
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"structural": {
"description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
"type": "boolean"
},
"sublocations": {
"readOnly": true,
"type": "integer"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"name",
"pathstring",
"pk",
"sublocations"
],
"type": "object"
}
Responses
{
"barcode_hash": "string",
"custom_icon": "string",
"description": "string",
"external": true,
"icon": "string",
"items": 0,
"level": 0,
"location_type": 0,
"location_type_detail": null,
"name": "string",
"owner": 0,
"parameters": [
{
"data": "string",
"data_numeric": 10.12,
"model_id": 3,
"model_type": null,
"note": "string",
"pk": 0,
"template": 0,
"template_detail": null,
"updated": "2022-04-13T15:42:05.901Z",
"updated_by": 0,
"updated_by_detail": null
}
],
"parent": 0,
"path": [
{}
],
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
]
}
Schema of the response body
{
"description": "Detailed information about a stock location.",
"properties": {
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"custom_icon": {
"description": "Icon (optional)",
"maxLength": 100,
"nullable": true,
"title": "Icon",
"type": "string"
},
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"external": {
"description": "This is an external stock location",
"type": "boolean"
},
"icon": {
"readOnly": true,
"type": "string"
},
"items": {
"readOnly": true,
"title": "Stock Items",
"type": "integer"
},
"level": {
"readOnly": true,
"type": "integer"
},
"location_type": {
"description": "Stock location type of this location",
"nullable": true,
"type": "integer"
},
"location_type_detail": {
"allOf": [
{
"$ref": "#/components/schemas/StockLocationType"
}
],
"nullable": true,
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parameters": {
"items": {
"$ref": "#/components/schemas/Parameter"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"pathstring": {
"description": "Path",
"readOnly": true,
"title": "Path",
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"structural": {
"description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
"type": "boolean"
},
"sublocations": {
"readOnly": true,
"type": "integer"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"name",
"pathstring",
"pk",
"sublocations"
],
"type": "object"
}
GET /api/stock/location/tree/¶
Description
API endpoint for accessing a list of StockLocation objects, ready for rendering as a tree.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
limit |
query | integer | No | Number of results to return per page. | |
offset |
query | integer | No | The initial index from which to return the results. | |
ordering |
query | string | No | Which field to use when ordering the results. |
Responses
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"icon": "string",
"name": "string",
"parent": 0,
"pk": 0,
"structural": true,
"sublocations": 0
}
]
}
Schema of the response body
{
"properties": {
"count": {
"example": 123,
"type": "integer"
},
"next": {
"example": "http://api.example.org/accounts/?offset=400&limit=100",
"format": "uri",
"nullable": true,
"type": "string"
},
"previous": {
"example": "http://api.example.org/accounts/?offset=200&limit=100",
"format": "uri",
"nullable": true,
"type": "string"
},
"results": {
"items": {
"$ref": "#/components/schemas/LocationTree"
},
"type": "array"
}
},
"required": [
"count",
"results"
],
"type": "object"
}
DELETE /api/stock/location/{id}/¶
Description
Custom delete method to pass kwargs.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
id |
path | integer | No |
Responses
GET /api/stock/location/{id}/¶
Description
Custom get method to pass kwargs.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
id |
path | integer | No | ||
path_detail |
query | boolean | False | No | Include detailed information about the BOM item linked to this build line. |
Responses
{
"barcode_hash": "string",
"custom_icon": "string",
"description": "string",
"external": true,
"icon": "string",
"items": 0,
"level": 0,
"location_type": 0,
"location_type_detail": null,
"name": "string",
"owner": 0,
"parameters": [
{
"data": "string",
"data_numeric": 10.12,
"model_id": 146,
"model_type": null,
"note": "string",
"pk": 0,
"template": 0,
"template_detail": null,
"updated": "2022-04-13T15:42:05.901Z",
"updated_by": 0,
"updated_by_detail": null
}
],
"parent": 0,
"path": [
{}
],
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
]
}
Schema of the response body
{
"description": "Detailed information about a stock location.",
"properties": {
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"custom_icon": {
"description": "Icon (optional)",
"maxLength": 100,
"nullable": true,
"title": "Icon",
"type": "string"
},
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"external": {
"description": "This is an external stock location",
"type": "boolean"
},
"icon": {
"readOnly": true,
"type": "string"
},
"items": {
"readOnly": true,
"title": "Stock Items",
"type": "integer"
},
"level": {
"readOnly": true,
"type": "integer"
},
"location_type": {
"description": "Stock location type of this location",
"nullable": true,
"type": "integer"
},
"location_type_detail": {
"allOf": [
{
"$ref": "#/components/schemas/StockLocationType"
}
],
"nullable": true,
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parameters": {
"items": {
"$ref": "#/components/schemas/Parameter"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"pathstring": {
"description": "Path",
"readOnly": true,
"title": "Path",
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"structural": {
"description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
"type": "boolean"
},
"sublocations": {
"readOnly": true,
"type": "integer"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"name",
"pathstring",
"pk",
"sublocations"
],
"type": "object"
}
PATCH /api/stock/location/{id}/¶
Description
Custom patch method to pass kwargs.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
id |
path | integer | No |
Request body
{
"barcode_hash": "string",
"custom_icon": "string",
"description": "string",
"external": true,
"icon": "string",
"items": 0,
"level": 0,
"location_type": 0,
"location_type_detail": null,
"name": "string",
"owner": 0,
"parameters": [
{
"data": "string",
"data_numeric": 10.12,
"model_id": 144,
"model_type": null,
"note": "string",
"pk": 0,
"template": 0,
"template_detail": null,
"updated": "2022-04-13T15:42:05.901Z",
"updated_by": 0,
"updated_by_detail": null
}
],
"parent": 0,
"path": [
{}
],
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
]
}
Schema of the request body
{
"description": "Detailed information about a stock location.",
"properties": {
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"custom_icon": {
"description": "Icon (optional)",
"maxLength": 100,
"nullable": true,
"title": "Icon",
"type": "string"
},
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"external": {
"description": "This is an external stock location",
"type": "boolean"
},
"icon": {
"readOnly": true,
"type": "string"
},
"items": {
"readOnly": true,
"title": "Stock Items",
"type": "integer"
},
"level": {
"readOnly": true,
"type": "integer"
},
"location_type": {
"description": "Stock location type of this location",
"nullable": true,
"type": "integer"
},
"location_type_detail": {
"allOf": [
{
"$ref": "#/components/schemas/StockLocationType"
}
],
"nullable": true,
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parameters": {
"items": {
"$ref": "#/components/schemas/Parameter"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"pathstring": {
"description": "Path",
"readOnly": true,
"title": "Path",
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"structural": {
"description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
"type": "boolean"
},
"sublocations": {
"readOnly": true,
"type": "integer"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
}
{
"barcode_hash": "string",
"custom_icon": "string",
"description": "string",
"external": true,
"icon": "string",
"items": 0,
"level": 0,
"location_type": 0,
"location_type_detail": null,
"name": "string",
"owner": 0,
"parameters": [
{
"data": "string",
"data_numeric": 10.12,
"model_id": 249,
"model_type": null,
"note": "string",
"pk": 0,
"template": 0,
"template_detail": null,
"updated": "2022-04-13T15:42:05.901Z",
"updated_by": 0,
"updated_by_detail": null
}
],
"parent": 0,
"path": [
{}
],
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
]
}
Schema of the request body
{
"description": "Detailed information about a stock location.",
"properties": {
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"custom_icon": {
"description": "Icon (optional)",
"maxLength": 100,
"nullable": true,
"title": "Icon",
"type": "string"
},
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"external": {
"description": "This is an external stock location",
"type": "boolean"
},
"icon": {
"readOnly": true,
"type": "string"
},
"items": {
"readOnly": true,
"title": "Stock Items",
"type": "integer"
},
"level": {
"readOnly": true,
"type": "integer"
},
"location_type": {
"description": "Stock location type of this location",
"nullable": true,
"type": "integer"
},
"location_type_detail": {
"allOf": [
{
"$ref": "#/components/schemas/StockLocationType"
}
],
"nullable": true,
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parameters": {
"items": {
"$ref": "#/components/schemas/Parameter"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"pathstring": {
"description": "Path",
"readOnly": true,
"title": "Path",
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"structural": {
"description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
"type": "boolean"
},
"sublocations": {
"readOnly": true,
"type": "integer"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
}
{
"barcode_hash": "string",
"custom_icon": "string",
"description": "string",
"external": true,
"icon": "string",
"items": 0,
"level": 0,
"location_type": 0,
"location_type_detail": null,
"name": "string",
"owner": 0,
"parameters": [
{
"data": "string",
"data_numeric": 10.12,
"model_id": 281,
"model_type": null,
"note": "string",
"pk": 0,
"template": 0,
"template_detail": null,
"updated": "2022-04-13T15:42:05.901Z",
"updated_by": 0,
"updated_by_detail": null
}
],
"parent": 0,
"path": [
{}
],
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
]
}
Schema of the request body
{
"description": "Detailed information about a stock location.",
"properties": {
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"custom_icon": {
"description": "Icon (optional)",
"maxLength": 100,
"nullable": true,
"title": "Icon",
"type": "string"
},
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"external": {
"description": "This is an external stock location",
"type": "boolean"
},
"icon": {
"readOnly": true,
"type": "string"
},
"items": {
"readOnly": true,
"title": "Stock Items",
"type": "integer"
},
"level": {
"readOnly": true,
"type": "integer"
},
"location_type": {
"description": "Stock location type of this location",
"nullable": true,
"type": "integer"
},
"location_type_detail": {
"allOf": [
{
"$ref": "#/components/schemas/StockLocationType"
}
],
"nullable": true,
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parameters": {
"items": {
"$ref": "#/components/schemas/Parameter"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"pathstring": {
"description": "Path",
"readOnly": true,
"title": "Path",
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"structural": {
"description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
"type": "boolean"
},
"sublocations": {
"readOnly": true,
"type": "integer"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
}
Responses
{
"barcode_hash": "string",
"custom_icon": "string",
"description": "string",
"external": true,
"icon": "string",
"items": 0,
"level": 0,
"location_type": 0,
"location_type_detail": null,
"name": "string",
"owner": 0,
"parameters": [
{
"data": "string",
"data_numeric": 10.12,
"model_id": 25,
"model_type": null,
"note": "string",
"pk": 0,
"template": 0,
"template_detail": null,
"updated": "2022-04-13T15:42:05.901Z",
"updated_by": 0,
"updated_by_detail": null
}
],
"parent": 0,
"path": [
{}
],
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
]
}
Schema of the response body
{
"description": "Detailed information about a stock location.",
"properties": {
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"custom_icon": {
"description": "Icon (optional)",
"maxLength": 100,
"nullable": true,
"title": "Icon",
"type": "string"
},
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"external": {
"description": "This is an external stock location",
"type": "boolean"
},
"icon": {
"readOnly": true,
"type": "string"
},
"items": {
"readOnly": true,
"title": "Stock Items",
"type": "integer"
},
"level": {
"readOnly": true,
"type": "integer"
},
"location_type": {
"description": "Stock location type of this location",
"nullable": true,
"type": "integer"
},
"location_type_detail": {
"allOf": [
{
"$ref": "#/components/schemas/StockLocationType"
}
],
"nullable": true,
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parameters": {
"items": {
"$ref": "#/components/schemas/Parameter"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"pathstring": {
"description": "Path",
"readOnly": true,
"title": "Path",
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"structural": {
"description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
"type": "boolean"
},
"sublocations": {
"readOnly": true,
"type": "integer"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"name",
"pathstring",
"pk",
"sublocations"
],
"type": "object"
}
PUT /api/stock/location/{id}/¶
Description
Custom put method to pass kwargs.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
id |
path | integer | No |
Request body
{
"barcode_hash": "string",
"custom_icon": "string",
"description": "string",
"external": true,
"icon": "string",
"items": 0,
"level": 0,
"location_type": 0,
"location_type_detail": null,
"name": "string",
"owner": 0,
"parameters": [
{
"data": "string",
"data_numeric": 10.12,
"model_id": 247,
"model_type": null,
"note": "string",
"pk": 0,
"template": 0,
"template_detail": null,
"updated": "2022-04-13T15:42:05.901Z",
"updated_by": 0,
"updated_by_detail": null
}
],
"parent": 0,
"path": [
{}
],
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
]
}
Schema of the request body
{
"description": "Detailed information about a stock location.",
"properties": {
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"custom_icon": {
"description": "Icon (optional)",
"maxLength": 100,
"nullable": true,
"title": "Icon",
"type": "string"
},
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"external": {
"description": "This is an external stock location",
"type": "boolean"
},
"icon": {
"readOnly": true,
"type": "string"
},
"items": {
"readOnly": true,
"title": "Stock Items",
"type": "integer"
},
"level": {
"readOnly": true,
"type": "integer"
},
"location_type": {
"description": "Stock location type of this location",
"nullable": true,
"type": "integer"
},
"location_type_detail": {
"allOf": [
{
"$ref": "#/components/schemas/StockLocationType"
}
],
"nullable": true,
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parameters": {
"items": {
"$ref": "#/components/schemas/Parameter"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"pathstring": {
"description": "Path",
"readOnly": true,
"title": "Path",
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"structural": {
"description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
"type": "boolean"
},
"sublocations": {
"readOnly": true,
"type": "integer"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"name",
"pathstring",
"pk",
"sublocations"
],
"type": "object"
}
{
"barcode_hash": "string",
"custom_icon": "string",
"description": "string",
"external": true,
"icon": "string",
"items": 0,
"level": 0,
"location_type": 0,
"location_type_detail": null,
"name": "string",
"owner": 0,
"parameters": [
{
"data": "string",
"data_numeric": 10.12,
"model_id": 163,
"model_type": null,
"note": "string",
"pk": 0,
"template": 0,
"template_detail": null,
"updated": "2022-04-13T15:42:05.901Z",
"updated_by": 0,
"updated_by_detail": null
}
],
"parent": 0,
"path": [
{}
],
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
]
}
Schema of the request body
{
"description": "Detailed information about a stock location.",
"properties": {
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"custom_icon": {
"description": "Icon (optional)",
"maxLength": 100,
"nullable": true,
"title": "Icon",
"type": "string"
},
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"external": {
"description": "This is an external stock location",
"type": "boolean"
},
"icon": {
"readOnly": true,
"type": "string"
},
"items": {
"readOnly": true,
"title": "Stock Items",
"type": "integer"
},
"level": {
"readOnly": true,
"type": "integer"
},
"location_type": {
"description": "Stock location type of this location",
"nullable": true,
"type": "integer"
},
"location_type_detail": {
"allOf": [
{
"$ref": "#/components/schemas/StockLocationType"
}
],
"nullable": true,
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parameters": {
"items": {
"$ref": "#/components/schemas/Parameter"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"pathstring": {
"description": "Path",
"readOnly": true,
"title": "Path",
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"structural": {
"description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
"type": "boolean"
},
"sublocations": {
"readOnly": true,
"type": "integer"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"name",
"pathstring",
"pk",
"sublocations"
],
"type": "object"
}
{
"barcode_hash": "string",
"custom_icon": "string",
"description": "string",
"external": true,
"icon": "string",
"items": 0,
"level": 0,
"location_type": 0,
"location_type_detail": null,
"name": "string",
"owner": 0,
"parameters": [
{
"data": "string",
"data_numeric": 10.12,
"model_id": 102,
"model_type": null,
"note": "string",
"pk": 0,
"template": 0,
"template_detail": null,
"updated": "2022-04-13T15:42:05.901Z",
"updated_by": 0,
"updated_by_detail": null
}
],
"parent": 0,
"path": [
{}
],
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
]
}
Schema of the request body
{
"description": "Detailed information about a stock location.",
"properties": {
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"custom_icon": {
"description": "Icon (optional)",
"maxLength": 100,
"nullable": true,
"title": "Icon",
"type": "string"
},
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"external": {
"description": "This is an external stock location",
"type": "boolean"
},
"icon": {
"readOnly": true,
"type": "string"
},
"items": {
"readOnly": true,
"title": "Stock Items",
"type": "integer"
},
"level": {
"readOnly": true,
"type": "integer"
},
"location_type": {
"description": "Stock location type of this location",
"nullable": true,
"type": "integer"
},
"location_type_detail": {
"allOf": [
{
"$ref": "#/components/schemas/StockLocationType"
}
],
"nullable": true,
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parameters": {
"items": {
"$ref": "#/components/schemas/Parameter"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"pathstring": {
"description": "Path",
"readOnly": true,
"title": "Path",
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"structural": {
"description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
"type": "boolean"
},
"sublocations": {
"readOnly": true,
"type": "integer"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"name",
"pathstring",
"pk",
"sublocations"
],
"type": "object"
}
Responses
{
"barcode_hash": "string",
"custom_icon": "string",
"description": "string",
"external": true,
"icon": "string",
"items": 0,
"level": 0,
"location_type": 0,
"location_type_detail": null,
"name": "string",
"owner": 0,
"parameters": [
{
"data": "string",
"data_numeric": 10.12,
"model_id": 20,
"model_type": null,
"note": "string",
"pk": 0,
"template": 0,
"template_detail": null,
"updated": "2022-04-13T15:42:05.901Z",
"updated_by": 0,
"updated_by_detail": null
}
],
"parent": 0,
"path": [
{}
],
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
]
}
Schema of the response body
{
"description": "Detailed information about a stock location.",
"properties": {
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"custom_icon": {
"description": "Icon (optional)",
"maxLength": 100,
"nullable": true,
"title": "Icon",
"type": "string"
},
"description": {
"description": "Description (optional)",
"maxLength": 250,
"type": "string"
},
"external": {
"description": "This is an external stock location",
"type": "boolean"
},
"icon": {
"readOnly": true,
"type": "string"
},
"items": {
"readOnly": true,
"title": "Stock Items",
"type": "integer"
},
"level": {
"readOnly": true,
"type": "integer"
},
"location_type": {
"description": "Stock location type of this location",
"nullable": true,
"type": "integer"
},
"location_type_detail": {
"allOf": [
{
"$ref": "#/components/schemas/StockLocationType"
}
],
"nullable": true,
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parameters": {
"items": {
"$ref": "#/components/schemas/Parameter"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"pathstring": {
"description": "Path",
"readOnly": true,
"title": "Path",
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"structural": {
"description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
"type": "boolean"
},
"sublocations": {
"readOnly": true,
"type": "integer"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"name",
"pathstring",
"pk",
"sublocations"
],
"type": "object"
}
POST /api/stock/merge/¶
Description
API endpoint for merging multiple stock items.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
Request body
{
"allow_mismatched_status": true,
"allow_mismatched_suppliers": true,
"items": [
{
"item": 0
}
],
"location": 0,
"notes": "string"
}
Schema of the request body
{
"description": "Serializer for merging two (or more) stock items together.",
"properties": {
"allow_mismatched_status": {
"description": "Allow stock items with different status codes to be merged",
"type": "boolean"
},
"allow_mismatched_suppliers": {
"description": "Allow stock items with different supplier parts to be merged",
"type": "boolean"
},
"items": {
"items": {
"$ref": "#/components/schemas/StockMergeItem"
},
"type": "array"
},
"location": {
"description": "Destination stock location",
"type": "integer"
},
"notes": {
"description": "Stock merging notes",
"type": "string"
}
},
"required": [
"items",
"location"
],
"type": "object"
}
{
"allow_mismatched_status": true,
"allow_mismatched_suppliers": true,
"items": [
{
"item": 0
}
],
"location": 0,
"notes": "string"
}
Schema of the request body
{
"description": "Serializer for merging two (or more) stock items together.",
"properties": {
"allow_mismatched_status": {
"description": "Allow stock items with different status codes to be merged",
"type": "boolean"
},
"allow_mismatched_suppliers": {
"description": "Allow stock items with different supplier parts to be merged",
"type": "boolean"
},
"items": {
"items": {
"$ref": "#/components/schemas/StockMergeItem"
},
"type": "array"
},
"location": {
"description": "Destination stock location",
"type": "integer"
},
"notes": {
"description": "Stock merging notes",
"type": "string"
}
},
"required": [
"items",
"location"
],
"type": "object"
}
{
"allow_mismatched_status": true,
"allow_mismatched_suppliers": true,
"items": [
{
"item": 0
}
],
"location": 0,
"notes": "string"
}
Schema of the request body
{
"description": "Serializer for merging two (or more) stock items together.",
"properties": {
"allow_mismatched_status": {
"description": "Allow stock items with different status codes to be merged",
"type": "boolean"
},
"allow_mismatched_suppliers": {
"description": "Allow stock items with different supplier parts to be merged",
"type": "boolean"
},
"items": {
"items": {
"$ref": "#/components/schemas/StockMergeItem"
},
"type": "array"
},
"location": {
"description": "Destination stock location",
"type": "integer"
},
"notes": {
"description": "Stock merging notes",
"type": "string"
}
},
"required": [
"items",
"location"
],
"type": "object"
}
Responses
{
"allow_mismatched_status": true,
"allow_mismatched_suppliers": true,
"items": [
{
"item": 0
}
],
"location": 0,
"notes": "string"
}
Schema of the response body
{
"description": "Serializer for merging two (or more) stock items together.",
"properties": {
"allow_mismatched_status": {
"description": "Allow stock items with different status codes to be merged",
"type": "boolean"
},
"allow_mismatched_suppliers": {
"description": "Allow stock items with different supplier parts to be merged",
"type": "boolean"
},
"items": {
"items": {
"$ref": "#/components/schemas/StockMergeItem"
},
"type": "array"
},
"location": {
"description": "Destination stock location",
"type": "integer"
},
"notes": {
"description": "Stock merging notes",
"type": "string"
}
},
"required": [
"items",
"location"
],
"type": "object"
}
POST /api/stock/remove/¶
Description
Endpoint for removing a quantity of stock from an existing StockItem.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
Request body
{
"items": [
{
"batch": "string",
"packaging": "string",
"pk": 0,
"quantity": "string",
"status": 0
}
],
"notes": "string"
}
Schema of the request body
{
"description": "Serializer for removing stock from stock item(s).",
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/StockAdjustmentItem"
},
"type": "array"
},
"notes": {
"description": "Stock transaction notes",
"type": "string"
}
},
"required": [
"items"
],
"type": "object"
}
{
"items": [
{
"batch": "string",
"packaging": "string",
"pk": 0,
"quantity": "string",
"status": 0
}
],
"notes": "string"
}
Schema of the request body
{
"description": "Serializer for removing stock from stock item(s).",
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/StockAdjustmentItem"
},
"type": "array"
},
"notes": {
"description": "Stock transaction notes",
"type": "string"
}
},
"required": [
"items"
],
"type": "object"
}
{
"items": [
{
"batch": "string",
"packaging": "string",
"pk": 0,
"quantity": "string",
"status": 0
}
],
"notes": "string"
}
Schema of the request body
{
"description": "Serializer for removing stock from stock item(s).",
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/StockAdjustmentItem"
},
"type": "array"
},
"notes": {
"description": "Stock transaction notes",
"type": "string"
}
},
"required": [
"items"
],
"type": "object"
}
Responses
{
"items": [
{
"batch": "string",
"packaging": "string",
"pk": 0,
"quantity": "string",
"status": 0
}
],
"notes": "string"
}
Schema of the response body
{
"description": "Serializer for removing stock from stock item(s).",
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/StockAdjustmentItem"
},
"type": "array"
},
"notes": {
"description": "Stock transaction notes",
"type": "string"
}
},
"required": [
"items"
],
"type": "object"
}
POST /api/stock/return/¶
Description
API endpoint for returning items into stock.
This API endpoint is for items that are initially considered "not in stock", and the user wants to return them to stock, marking them as "available" for further consumption or sale.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
Request body
{
"items": [
{
"batch": "string",
"packaging": "string",
"pk": 0,
"quantity": "string",
"status": 0
}
],
"location": 0,
"merge": true,
"notes": "string"
}
Schema of the request body
{
"description": "Serializer class for returning stock item(s) into stock.",
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/StockAdjustmentItem"
},
"type": "array"
},
"location": {
"description": "Destination stock location",
"type": "integer"
},
"merge": {
"default": false,
"description": "Merge returned items into existing stock items if possible",
"title": "Merge into existing stock",
"type": "boolean"
},
"notes": {
"description": "Stock transaction notes",
"type": "string"
}
},
"required": [
"items",
"location"
],
"type": "object"
}
{
"items": [
{
"batch": "string",
"packaging": "string",
"pk": 0,
"quantity": "string",
"status": 0
}
],
"location": 0,
"merge": true,
"notes": "string"
}
Schema of the request body
{
"description": "Serializer class for returning stock item(s) into stock.",
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/StockAdjustmentItem"
},
"type": "array"
},
"location": {
"description": "Destination stock location",
"type": "integer"
},
"merge": {
"default": false,
"description": "Merge returned items into existing stock items if possible",
"title": "Merge into existing stock",
"type": "boolean"
},
"notes": {
"description": "Stock transaction notes",
"type": "string"
}
},
"required": [
"items",
"location"
],
"type": "object"
}
{
"items": [
{
"batch": "string",
"packaging": "string",
"pk": 0,
"quantity": "string",
"status": 0
}
],
"location": 0,
"merge": true,
"notes": "string"
}
Schema of the request body
{
"description": "Serializer class for returning stock item(s) into stock.",
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/StockAdjustmentItem"
},
"type": "array"
},
"location": {
"description": "Destination stock location",
"type": "integer"
},
"merge": {
"default": false,
"description": "Merge returned items into existing stock items if possible",
"title": "Merge into existing stock",
"type": "boolean"
},
"notes": {
"description": "Stock transaction notes",
"type": "string"
}
},
"required": [
"items",
"location"
],
"type": "object"
}
Responses
{
"items": [
{
"batch": "string",
"packaging": "string",
"pk": 0,
"quantity": "string",
"status": 0
}
],
"location": 0,
"merge": true,
"notes": "string"
}
Schema of the response body
{
"description": "Serializer class for returning stock item(s) into stock.",
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/StockAdjustmentItem"
},
"type": "array"
},
"location": {
"description": "Destination stock location",
"type": "integer"
},
"merge": {
"default": false,
"description": "Merge returned items into existing stock items if possible",
"title": "Merge into existing stock",
"type": "boolean"
},
"notes": {
"description": "Stock transaction notes",
"type": "string"
}
},
"required": [
"items",
"location"
],
"type": "object"
}
GET /api/stock/status/¶
Description
Retrieve information about a specific status code
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
Responses
{
"status_class": "string",
"values": {}
}
Schema of the response body
{
"description": "API serializer for generic state class information.",
"properties": {
"status_class": {
"readOnly": true,
"title": "Class",
"type": "string"
},
"values": {
"additionalProperties": {
"$ref": "#/components/schemas/GenericStateValue"
},
"type": "object"
}
},
"required": [
"status_class",
"values"
],
"type": "object"
}
DELETE /api/stock/test/¶
Description
Perform a DELETE operation against this list endpoint.
Note that the typical DRF list endpoint does not support DELETE, so this method is provided as a custom implementation.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
Request body
{
"filters": {},
"items": [
0
]
}
Schema of the request body
{
"description": "Parameters for selecting items for bulk operations.",
"properties": {
"filters": {
"additionalProperties": {},
"title": "A dictionary of filter values",
"type": "object"
},
"items": {
"items": {
"type": "integer"
},
"title": "A list of primary key values",
"type": "array"
}
},
"type": "object"
}
{
"filters": {},
"items": [
0
]
}
Schema of the request body
{
"description": "Parameters for selecting items for bulk operations.",
"properties": {
"filters": {
"additionalProperties": {},
"title": "A dictionary of filter values",
"type": "object"
},
"items": {
"items": {
"type": "integer"
},
"title": "A list of primary key values",
"type": "array"
}
},
"type": "object"
}
{
"filters": {},
"items": [
0
]
}
Schema of the request body
{
"description": "Parameters for selecting items for bulk operations.",
"properties": {
"filters": {
"additionalProperties": {},
"title": "A dictionary of filter values",
"type": "object"
},
"items": {
"items": {
"type": "integer"
},
"title": "A list of primary key values",
"type": "array"
}
},
"type": "object"
}
Responses
GET /api/stock/test/¶
Description
API endpoint for listing (and creating) a StockItemTestResult object.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
build |
query | integer | No | Build | |
enabled |
query | boolean | No | Enabled | |
include_installed |
query | boolean | No | If true, include test results for items installed underneath the given stock item | |
limit |
query | integer | No | Number of results to return per page. | |
offset |
query | integer | No | The initial index from which to return the results. | |
ordering |
query | string | No | Which field to use when ordering the results. | |
part |
query | integer | No | Part | |
required |
query | boolean | No | Required | |
result |
query | boolean | No | ||
search |
query | string | No | A search term. | |
stock_item |
query | integer | No | Filter by numeric Stock Item ID | |
template |
query | integer | No | ||
template_detail |
query | boolean | False | No | |
test |
query | string | No | Test name (case insensitive) | |
user |
query | integer | No | ||
user_detail |
query | boolean | False | No | |
value |
query | string | No |
Responses
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
]
}
Schema of the response body
{
"properties": {
"count": {
"example": 123,
"type": "integer"
},
"next": {
"example": "http://api.example.org/accounts/?offset=400&limit=100",
"format": "uri",
"nullable": true,
"type": "string"
},
"previous": {
"example": "http://api.example.org/accounts/?offset=200&limit=100",
"format": "uri",
"nullable": true,
"type": "string"
},
"results": {
"items": {
"$ref": "#/components/schemas/StockItemTestResult"
},
"type": "array"
}
},
"required": [
"count",
"results"
],
"type": "object"
}
POST /api/stock/test/¶
Description
API endpoint for listing (and creating) a StockItemTestResult object.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
Request body
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
Schema of the request body
{
"description": "Serializer for the StockItemTestResult model.",
"properties": {
"attachment": {
"description": "Test result attachment",
"format": "uri",
"nullable": true,
"type": "string"
},
"date": {
"format": "date-time",
"readOnly": true,
"type": "string"
},
"finished_datetime": {
"description": "The timestamp of the test finish",
"format": "date-time",
"nullable": true,
"title": "Finished",
"type": "string"
},
"notes": {
"description": "Test notes",
"maxLength": 500,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"result": {
"description": "Test result",
"type": "boolean"
},
"started_datetime": {
"description": "The timestamp of the test start",
"format": "date-time",
"nullable": true,
"title": "Started",
"type": "string"
},
"stock_item": {
"type": "integer"
},
"template": {
"description": "Template",
"nullable": true,
"title": "Test template for this result",
"type": "integer"
},
"template_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartTestTemplate"
}
],
"nullable": true,
"readOnly": true
},
"test_station": {
"description": "The identifier of the test station where the test was performed",
"maxLength": 500,
"type": "string"
},
"user": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"user_detail": {
"allOf": [
{
"$ref": "#/components/schemas/User"
}
],
"nullable": true,
"readOnly": true
},
"value": {
"description": "Test output value",
"maxLength": 500,
"type": "string"
}
},
"required": [
"date",
"pk",
"stock_item"
],
"type": "object"
}
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
Schema of the request body
{
"description": "Serializer for the StockItemTestResult model.",
"properties": {
"attachment": {
"description": "Test result attachment",
"format": "uri",
"nullable": true,
"type": "string"
},
"date": {
"format": "date-time",
"readOnly": true,
"type": "string"
},
"finished_datetime": {
"description": "The timestamp of the test finish",
"format": "date-time",
"nullable": true,
"title": "Finished",
"type": "string"
},
"notes": {
"description": "Test notes",
"maxLength": 500,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"result": {
"description": "Test result",
"type": "boolean"
},
"started_datetime": {
"description": "The timestamp of the test start",
"format": "date-time",
"nullable": true,
"title": "Started",
"type": "string"
},
"stock_item": {
"type": "integer"
},
"template": {
"description": "Template",
"nullable": true,
"title": "Test template for this result",
"type": "integer"
},
"template_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartTestTemplate"
}
],
"nullable": true,
"readOnly": true
},
"test_station": {
"description": "The identifier of the test station where the test was performed",
"maxLength": 500,
"type": "string"
},
"user": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"user_detail": {
"allOf": [
{
"$ref": "#/components/schemas/User"
}
],
"nullable": true,
"readOnly": true
},
"value": {
"description": "Test output value",
"maxLength": 500,
"type": "string"
}
},
"required": [
"date",
"pk",
"stock_item"
],
"type": "object"
}
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
Schema of the request body
{
"description": "Serializer for the StockItemTestResult model.",
"properties": {
"attachment": {
"description": "Test result attachment",
"format": "uri",
"nullable": true,
"type": "string"
},
"date": {
"format": "date-time",
"readOnly": true,
"type": "string"
},
"finished_datetime": {
"description": "The timestamp of the test finish",
"format": "date-time",
"nullable": true,
"title": "Finished",
"type": "string"
},
"notes": {
"description": "Test notes",
"maxLength": 500,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"result": {
"description": "Test result",
"type": "boolean"
},
"started_datetime": {
"description": "The timestamp of the test start",
"format": "date-time",
"nullable": true,
"title": "Started",
"type": "string"
},
"stock_item": {
"type": "integer"
},
"template": {
"description": "Template",
"nullable": true,
"title": "Test template for this result",
"type": "integer"
},
"template_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartTestTemplate"
}
],
"nullable": true,
"readOnly": true
},
"test_station": {
"description": "The identifier of the test station where the test was performed",
"maxLength": 500,
"type": "string"
},
"user": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"user_detail": {
"allOf": [
{
"$ref": "#/components/schemas/User"
}
],
"nullable": true,
"readOnly": true
},
"value": {
"description": "Test output value",
"maxLength": 500,
"type": "string"
}
},
"required": [
"date",
"pk",
"stock_item"
],
"type": "object"
}
Responses
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
Schema of the response body
{
"description": "Serializer for the StockItemTestResult model.",
"properties": {
"attachment": {
"description": "Test result attachment",
"format": "uri",
"nullable": true,
"type": "string"
},
"date": {
"format": "date-time",
"readOnly": true,
"type": "string"
},
"finished_datetime": {
"description": "The timestamp of the test finish",
"format": "date-time",
"nullable": true,
"title": "Finished",
"type": "string"
},
"notes": {
"description": "Test notes",
"maxLength": 500,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"result": {
"description": "Test result",
"type": "boolean"
},
"started_datetime": {
"description": "The timestamp of the test start",
"format": "date-time",
"nullable": true,
"title": "Started",
"type": "string"
},
"stock_item": {
"type": "integer"
},
"template": {
"description": "Template",
"nullable": true,
"title": "Test template for this result",
"type": "integer"
},
"template_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartTestTemplate"
}
],
"nullable": true,
"readOnly": true
},
"test_station": {
"description": "The identifier of the test station where the test was performed",
"maxLength": 500,
"type": "string"
},
"user": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"user_detail": {
"allOf": [
{
"$ref": "#/components/schemas/User"
}
],
"nullable": true,
"readOnly": true
},
"value": {
"description": "Test output value",
"maxLength": 500,
"type": "string"
}
},
"required": [
"date",
"pk",
"stock_item"
],
"type": "object"
}
DELETE /api/stock/test/{id}/¶
Description
Detail endpoint for StockItemTestResult.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
id |
path | integer | No |
Responses
GET /api/stock/test/{id}/¶
Description
Detail endpoint for StockItemTestResult.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
id |
path | integer | No | ||
template_detail |
query | boolean | False | No | |
user_detail |
query | boolean | False | No |
Responses
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
Schema of the response body
{
"description": "Serializer for the StockItemTestResult model.",
"properties": {
"attachment": {
"description": "Test result attachment",
"format": "uri",
"nullable": true,
"type": "string"
},
"date": {
"format": "date-time",
"readOnly": true,
"type": "string"
},
"finished_datetime": {
"description": "The timestamp of the test finish",
"format": "date-time",
"nullable": true,
"title": "Finished",
"type": "string"
},
"notes": {
"description": "Test notes",
"maxLength": 500,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"result": {
"description": "Test result",
"type": "boolean"
},
"started_datetime": {
"description": "The timestamp of the test start",
"format": "date-time",
"nullable": true,
"title": "Started",
"type": "string"
},
"stock_item": {
"type": "integer"
},
"template": {
"description": "Template",
"nullable": true,
"title": "Test template for this result",
"type": "integer"
},
"template_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartTestTemplate"
}
],
"nullable": true,
"readOnly": true
},
"test_station": {
"description": "The identifier of the test station where the test was performed",
"maxLength": 500,
"type": "string"
},
"user": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"user_detail": {
"allOf": [
{
"$ref": "#/components/schemas/User"
}
],
"nullable": true,
"readOnly": true
},
"value": {
"description": "Test output value",
"maxLength": 500,
"type": "string"
}
},
"required": [
"date",
"pk",
"stock_item"
],
"type": "object"
}
PATCH /api/stock/test/{id}/¶
Description
Detail endpoint for StockItemTestResult.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
id |
path | integer | No |
Request body
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
Schema of the request body
{
"description": "Serializer for the StockItemTestResult model.",
"properties": {
"attachment": {
"description": "Test result attachment",
"format": "uri",
"nullable": true,
"type": "string"
},
"date": {
"format": "date-time",
"readOnly": true,
"type": "string"
},
"finished_datetime": {
"description": "The timestamp of the test finish",
"format": "date-time",
"nullable": true,
"title": "Finished",
"type": "string"
},
"notes": {
"description": "Test notes",
"maxLength": 500,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"result": {
"description": "Test result",
"type": "boolean"
},
"started_datetime": {
"description": "The timestamp of the test start",
"format": "date-time",
"nullable": true,
"title": "Started",
"type": "string"
},
"stock_item": {
"type": "integer"
},
"template": {
"description": "Template",
"nullable": true,
"title": "Test template for this result",
"type": "integer"
},
"template_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartTestTemplate"
}
],
"nullable": true,
"readOnly": true
},
"test_station": {
"description": "The identifier of the test station where the test was performed",
"maxLength": 500,
"type": "string"
},
"user": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"user_detail": {
"allOf": [
{
"$ref": "#/components/schemas/User"
}
],
"nullable": true,
"readOnly": true
},
"value": {
"description": "Test output value",
"maxLength": 500,
"type": "string"
}
},
"type": "object"
}
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
Schema of the request body
{
"description": "Serializer for the StockItemTestResult model.",
"properties": {
"attachment": {
"description": "Test result attachment",
"format": "uri",
"nullable": true,
"type": "string"
},
"date": {
"format": "date-time",
"readOnly": true,
"type": "string"
},
"finished_datetime": {
"description": "The timestamp of the test finish",
"format": "date-time",
"nullable": true,
"title": "Finished",
"type": "string"
},
"notes": {
"description": "Test notes",
"maxLength": 500,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"result": {
"description": "Test result",
"type": "boolean"
},
"started_datetime": {
"description": "The timestamp of the test start",
"format": "date-time",
"nullable": true,
"title": "Started",
"type": "string"
},
"stock_item": {
"type": "integer"
},
"template": {
"description": "Template",
"nullable": true,
"title": "Test template for this result",
"type": "integer"
},
"template_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartTestTemplate"
}
],
"nullable": true,
"readOnly": true
},
"test_station": {
"description": "The identifier of the test station where the test was performed",
"maxLength": 500,
"type": "string"
},
"user": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"user_detail": {
"allOf": [
{
"$ref": "#/components/schemas/User"
}
],
"nullable": true,
"readOnly": true
},
"value": {
"description": "Test output value",
"maxLength": 500,
"type": "string"
}
},
"type": "object"
}
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
Schema of the request body
{
"description": "Serializer for the StockItemTestResult model.",
"properties": {
"attachment": {
"description": "Test result attachment",
"format": "uri",
"nullable": true,
"type": "string"
},
"date": {
"format": "date-time",
"readOnly": true,
"type": "string"
},
"finished_datetime": {
"description": "The timestamp of the test finish",
"format": "date-time",
"nullable": true,
"title": "Finished",
"type": "string"
},
"notes": {
"description": "Test notes",
"maxLength": 500,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"result": {
"description": "Test result",
"type": "boolean"
},
"started_datetime": {
"description": "The timestamp of the test start",
"format": "date-time",
"nullable": true,
"title": "Started",
"type": "string"
},
"stock_item": {
"type": "integer"
},
"template": {
"description": "Template",
"nullable": true,
"title": "Test template for this result",
"type": "integer"
},
"template_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartTestTemplate"
}
],
"nullable": true,
"readOnly": true
},
"test_station": {
"description": "The identifier of the test station where the test was performed",
"maxLength": 500,
"type": "string"
},
"user": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"user_detail": {
"allOf": [
{
"$ref": "#/components/schemas/User"
}
],
"nullable": true,
"readOnly": true
},
"value": {
"description": "Test output value",
"maxLength": 500,
"type": "string"
}
},
"type": "object"
}
Responses
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
Schema of the response body
{
"description": "Serializer for the StockItemTestResult model.",
"properties": {
"attachment": {
"description": "Test result attachment",
"format": "uri",
"nullable": true,
"type": "string"
},
"date": {
"format": "date-time",
"readOnly": true,
"type": "string"
},
"finished_datetime": {
"description": "The timestamp of the test finish",
"format": "date-time",
"nullable": true,
"title": "Finished",
"type": "string"
},
"notes": {
"description": "Test notes",
"maxLength": 500,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"result": {
"description": "Test result",
"type": "boolean"
},
"started_datetime": {
"description": "The timestamp of the test start",
"format": "date-time",
"nullable": true,
"title": "Started",
"type": "string"
},
"stock_item": {
"type": "integer"
},
"template": {
"description": "Template",
"nullable": true,
"title": "Test template for this result",
"type": "integer"
},
"template_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartTestTemplate"
}
],
"nullable": true,
"readOnly": true
},
"test_station": {
"description": "The identifier of the test station where the test was performed",
"maxLength": 500,
"type": "string"
},
"user": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"user_detail": {
"allOf": [
{
"$ref": "#/components/schemas/User"
}
],
"nullable": true,
"readOnly": true
},
"value": {
"description": "Test output value",
"maxLength": 500,
"type": "string"
}
},
"required": [
"date",
"pk",
"stock_item"
],
"type": "object"
}
PUT /api/stock/test/{id}/¶
Description
Detail endpoint for StockItemTestResult.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
id |
path | integer | No |
Request body
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
Schema of the request body
{
"description": "Serializer for the StockItemTestResult model.",
"properties": {
"attachment": {
"description": "Test result attachment",
"format": "uri",
"nullable": true,
"type": "string"
},
"date": {
"format": "date-time",
"readOnly": true,
"type": "string"
},
"finished_datetime": {
"description": "The timestamp of the test finish",
"format": "date-time",
"nullable": true,
"title": "Finished",
"type": "string"
},
"notes": {
"description": "Test notes",
"maxLength": 500,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"result": {
"description": "Test result",
"type": "boolean"
},
"started_datetime": {
"description": "The timestamp of the test start",
"format": "date-time",
"nullable": true,
"title": "Started",
"type": "string"
},
"stock_item": {
"type": "integer"
},
"template": {
"description": "Template",
"nullable": true,
"title": "Test template for this result",
"type": "integer"
},
"template_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartTestTemplate"
}
],
"nullable": true,
"readOnly": true
},
"test_station": {
"description": "The identifier of the test station where the test was performed",
"maxLength": 500,
"type": "string"
},
"user": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"user_detail": {
"allOf": [
{
"$ref": "#/components/schemas/User"
}
],
"nullable": true,
"readOnly": true
},
"value": {
"description": "Test output value",
"maxLength": 500,
"type": "string"
}
},
"required": [
"date",
"pk",
"stock_item"
],
"type": "object"
}
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
Schema of the request body
{
"description": "Serializer for the StockItemTestResult model.",
"properties": {
"attachment": {
"description": "Test result attachment",
"format": "uri",
"nullable": true,
"type": "string"
},
"date": {
"format": "date-time",
"readOnly": true,
"type": "string"
},
"finished_datetime": {
"description": "The timestamp of the test finish",
"format": "date-time",
"nullable": true,
"title": "Finished",
"type": "string"
},
"notes": {
"description": "Test notes",
"maxLength": 500,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"result": {
"description": "Test result",
"type": "boolean"
},
"started_datetime": {
"description": "The timestamp of the test start",
"format": "date-time",
"nullable": true,
"title": "Started",
"type": "string"
},
"stock_item": {
"type": "integer"
},
"template": {
"description": "Template",
"nullable": true,
"title": "Test template for this result",
"type": "integer"
},
"template_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartTestTemplate"
}
],
"nullable": true,
"readOnly": true
},
"test_station": {
"description": "The identifier of the test station where the test was performed",
"maxLength": 500,
"type": "string"
},
"user": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"user_detail": {
"allOf": [
{
"$ref": "#/components/schemas/User"
}
],
"nullable": true,
"readOnly": true
},
"value": {
"description": "Test output value",
"maxLength": 500,
"type": "string"
}
},
"required": [
"date",
"pk",
"stock_item"
],
"type": "object"
}
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
Schema of the request body
{
"description": "Serializer for the StockItemTestResult model.",
"properties": {
"attachment": {
"description": "Test result attachment",
"format": "uri",
"nullable": true,
"type": "string"
},
"date": {
"format": "date-time",
"readOnly": true,
"type": "string"
},
"finished_datetime": {
"description": "The timestamp of the test finish",
"format": "date-time",
"nullable": true,
"title": "Finished",
"type": "string"
},
"notes": {
"description": "Test notes",
"maxLength": 500,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"result": {
"description": "Test result",
"type": "boolean"
},
"started_datetime": {
"description": "The timestamp of the test start",
"format": "date-time",
"nullable": true,
"title": "Started",
"type": "string"
},
"stock_item": {
"type": "integer"
},
"template": {
"description": "Template",
"nullable": true,
"title": "Test template for this result",
"type": "integer"
},
"template_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartTestTemplate"
}
],
"nullable": true,
"readOnly": true
},
"test_station": {
"description": "The identifier of the test station where the test was performed",
"maxLength": 500,
"type": "string"
},
"user": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"user_detail": {
"allOf": [
{
"$ref": "#/components/schemas/User"
}
],
"nullable": true,
"readOnly": true
},
"value": {
"description": "Test output value",
"maxLength": 500,
"type": "string"
}
},
"required": [
"date",
"pk",
"stock_item"
],
"type": "object"
}
Responses
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
Schema of the response body
{
"description": "Serializer for the StockItemTestResult model.",
"properties": {
"attachment": {
"description": "Test result attachment",
"format": "uri",
"nullable": true,
"type": "string"
},
"date": {
"format": "date-time",
"readOnly": true,
"type": "string"
},
"finished_datetime": {
"description": "The timestamp of the test finish",
"format": "date-time",
"nullable": true,
"title": "Finished",
"type": "string"
},
"notes": {
"description": "Test notes",
"maxLength": 500,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"result": {
"description": "Test result",
"type": "boolean"
},
"started_datetime": {
"description": "The timestamp of the test start",
"format": "date-time",
"nullable": true,
"title": "Started",
"type": "string"
},
"stock_item": {
"type": "integer"
},
"template": {
"description": "Template",
"nullable": true,
"title": "Test template for this result",
"type": "integer"
},
"template_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartTestTemplate"
}
],
"nullable": true,
"readOnly": true
},
"test_station": {
"description": "The identifier of the test station where the test was performed",
"maxLength": 500,
"type": "string"
},
"user": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"user_detail": {
"allOf": [
{
"$ref": "#/components/schemas/User"
}
],
"nullable": true,
"readOnly": true
},
"value": {
"description": "Test output value",
"maxLength": 500,
"type": "string"
}
},
"required": [
"date",
"pk",
"stock_item"
],
"type": "object"
}
GET /api/stock/track/¶
Description
Override the GET method to determine export options.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
include_variants |
query | boolean | No | Include Part Variants | |
item |
query | integer | No | ||
item_detail |
query | boolean | False | No | Include detailed information about the item in the response |
limit |
query | integer | No | Number of results to return per page. | |
max_date |
query | string | No | Date before | |
min_date |
query | string | No | Date after | |
offset |
query | integer | No | The initial index from which to return the results. | |
ordering |
query | string | No | Which field to use when ordering the results. | |
part |
query | integer | No | Part | |
search |
query | string | No | A search term. Searched fields: notes. | |
user |
query | integer | No | ||
user_detail |
query | boolean | False | No |
Responses
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"date": "2022-04-13T15:42:05.901Z",
"deltas": null,
"item": 0,
"item_detail": null,
"label": "string",
"notes": "string",
"part": 0,
"part_detail": null,
"pk": 0,
"tracking_type": 0,
"user": 0,
"user_detail": null
}
]
}
Schema of the response body
{
"properties": {
"count": {
"example": 123,
"type": "integer"
},
"next": {
"example": "http://api.example.org/accounts/?offset=400&limit=100",
"format": "uri",
"nullable": true,
"type": "string"
},
"previous": {
"example": "http://api.example.org/accounts/?offset=200&limit=100",
"format": "uri",
"nullable": true,
"type": "string"
},
"results": {
"items": {
"$ref": "#/components/schemas/StockTracking"
},
"type": "array"
}
},
"required": [
"count",
"results"
],
"type": "object"
}
GET /api/stock/track/status/¶
Description
Retrieve information about a specific status code
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
Responses
{
"status_class": "string",
"values": {}
}
Schema of the response body
{
"description": "API serializer for generic state class information.",
"properties": {
"status_class": {
"readOnly": true,
"title": "Class",
"type": "string"
},
"values": {
"additionalProperties": {
"$ref": "#/components/schemas/GenericStateValue"
},
"type": "object"
}
},
"required": [
"status_class",
"values"
],
"type": "object"
}
GET /api/stock/track/{id}/¶
Description
Detail API endpoint for StockItemTracking model.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
id |
path | integer | No |
Responses
{
"date": "2022-04-13T15:42:05.901Z",
"deltas": null,
"item": 0,
"item_detail": null,
"label": "string",
"notes": "string",
"part": 0,
"part_detail": null,
"pk": 0,
"tracking_type": 0,
"user": 0,
"user_detail": null
}
Schema of the response body
{
"description": "Serializer for StockItemTracking model.",
"properties": {
"date": {
"format": "date-time",
"readOnly": true,
"type": "string"
},
"deltas": {
"readOnly": true
},
"item": {
"nullable": true,
"type": "integer"
},
"item_detail": {
"allOf": [
{
"$ref": "#/components/schemas/StockItem"
}
],
"nullable": true,
"readOnly": true
},
"label": {
"readOnly": true,
"type": "string"
},
"notes": {
"description": "Entry notes",
"maxLength": 512,
"nullable": true,
"type": "string"
},
"part": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"nullable": true,
"readOnly": true
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"tracking_type": {
"readOnly": true,
"type": "integer"
},
"user": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"user_detail": {
"allOf": [
{
"$ref": "#/components/schemas/User"
}
],
"nullable": true,
"readOnly": true
}
},
"required": [
"date",
"deltas",
"label",
"pk",
"tracking_type"
],
"type": "object"
}
POST /api/stock/transfer/¶
Description
API endpoint for performing stock movements.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
Request body
{
"items": [
{
"batch": "string",
"packaging": "string",
"pk": 0,
"quantity": "string",
"status": 0
}
],
"location": 0,
"notes": "string"
}
Schema of the request body
{
"description": "Serializer for transferring (moving) stock item(s).",
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/StockAdjustmentItem"
},
"type": "array"
},
"location": {
"description": "Destination stock location",
"type": "integer"
},
"notes": {
"description": "Stock transaction notes",
"type": "string"
}
},
"required": [
"items",
"location"
],
"type": "object"
}
{
"items": [
{
"batch": "string",
"packaging": "string",
"pk": 0,
"quantity": "string",
"status": 0
}
],
"location": 0,
"notes": "string"
}
Schema of the request body
{
"description": "Serializer for transferring (moving) stock item(s).",
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/StockAdjustmentItem"
},
"type": "array"
},
"location": {
"description": "Destination stock location",
"type": "integer"
},
"notes": {
"description": "Stock transaction notes",
"type": "string"
}
},
"required": [
"items",
"location"
],
"type": "object"
}
{
"items": [
{
"batch": "string",
"packaging": "string",
"pk": 0,
"quantity": "string",
"status": 0
}
],
"location": 0,
"notes": "string"
}
Schema of the request body
{
"description": "Serializer for transferring (moving) stock item(s).",
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/StockAdjustmentItem"
},
"type": "array"
},
"location": {
"description": "Destination stock location",
"type": "integer"
},
"notes": {
"description": "Stock transaction notes",
"type": "string"
}
},
"required": [
"items",
"location"
],
"type": "object"
}
Responses
{
"items": [
{
"batch": "string",
"packaging": "string",
"pk": 0,
"quantity": "string",
"status": 0
}
],
"location": 0,
"notes": "string"
}
Schema of the response body
{
"description": "Serializer for transferring (moving) stock item(s).",
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/StockAdjustmentItem"
},
"type": "array"
},
"location": {
"description": "Destination stock location",
"type": "integer"
},
"notes": {
"description": "Stock transaction notes",
"type": "string"
}
},
"required": [
"items",
"location"
],
"type": "object"
}
DELETE /api/stock/{id}/¶
Description
API detail endpoint for a single StockItem instance.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
id |
path | integer | No |
Responses
GET /api/stock/{id}/¶
Description
API detail endpoint for a single StockItem instance.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
id |
path | integer | No | ||
location_detail |
query | boolean | False | No | Include detailed information about the stock location in the response |
part_detail |
query | boolean | True | No | Include detailed information about the related part in the response |
path_detail |
query | boolean | False | No | |
supplier_part_detail |
query | boolean | False | No | |
tests |
query | boolean | False | No |
Responses
{
"MPN": "string",
"SKU": "string",
"allocated": 10.12,
"barcode_hash": "string",
"batch": "string",
"belongs_to": 0,
"build": 0,
"child_items": 0,
"consumed_by": 0,
"customer": 0,
"delete_on_deplete": true,
"expired": true,
"expiry_date": "2022-04-13",
"in_stock": true,
"installed_items": 0,
"is_building": true,
"link": "string",
"location": 0,
"location_detail": null,
"location_path": [
{}
],
"notes": "string",
"owner": 0,
"packaging": "string",
"parent": 0,
"part": 0,
"part_detail": null,
"pk": 0,
"purchase_order": 0,
"purchase_order_reference": "string",
"purchase_price": "string",
"purchase_price_currency": "string",
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"serial_numbers": "string",
"stale": true,
"status": null,
"status_custom_key": 0,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"string"
],
"tests": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
],
"tracking_items": 0,
"updated": "2022-04-13T15:42:05.901Z",
"use_pack_size": true
}
Schema of the response body
{
"description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
"properties": {
"MPN": {
"nullable": true,
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"nullable": true,
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"nullable": true,
"readOnly": true,
"title": "Allocated Quantity",
"type": "number"
},
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"batch": {
"description": "Batch code for this stock item",
"maxLength": 100,
"nullable": true,
"title": "Batch Code",
"type": "string"
},
"belongs_to": {
"description": "Is this item installed in another item?",
"nullable": true,
"title": "Installed In",
"type": "integer"
},
"build": {
"description": "Build for this stock item",
"nullable": true,
"title": "Source Build",
"type": "integer"
},
"child_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"consumed_by": {
"description": "Build order which consumed this stock item",
"nullable": true,
"type": "integer"
},
"customer": {
"description": "Customer",
"nullable": true,
"type": "integer"
},
"delete_on_deplete": {
"description": "Delete this Stock Item when stock is depleted",
"type": "boolean"
},
"expired": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"expiry_date": {
"description": "Expiry date for stock item. Stock will be considered expired after this date",
"format": "date",
"nullable": true,
"type": "string"
},
"in_stock": {
"readOnly": true,
"type": "boolean"
},
"installed_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 2000,
"title": "External Link",
"type": "string"
},
"location": {
"description": "Where is this stock item located?",
"nullable": true,
"title": "Stock Location",
"type": "integer"
},
"location_detail": {
"allOf": [
{
"$ref": "#/components/schemas/LocationBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Location"
},
"location_path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"notes": {
"description": "Markdown notes (optional)",
"maxLength": 50000,
"nullable": true,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"packaging": {
"description": "Packaging this stock item is stored in",
"maxLength": 50,
"nullable": true,
"type": "string"
},
"parent": {
"description": "Parent stock item",
"nullable": true,
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Part"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"purchase_order": {
"description": "Purchase order for this stock item",
"nullable": true,
"title": "Source Purchase Order",
"type": "integer"
},
"purchase_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"purchase_price": {
"description": "Purchase price of this stock item, per unit or pack",
"format": "decimal",
"nullable": true,
"pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
"type": "string"
},
"purchase_price_currency": {
"description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
"title": "Currency",
"type": "string"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"serial_numbers": {
"description": "Enter serial numbers for new items",
"nullable": true,
"type": "string",
"writeOnly": true
},
"stale": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/StockItemStatusEnum"
}
],
"maximum": 9223372036854775807,
"minimum": 0
},
"status_custom_key": {
"description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
"nullable": true,
"title": "Custom status key",
"type": "integer"
},
"status_text": {
"readOnly": true,
"title": "Status",
"type": "string"
},
"stocktake_date": {
"format": "date",
"nullable": true,
"readOnly": true,
"type": "string"
},
"supplier_part": {
"description": "Select a matching supplier part for this stock item",
"nullable": true,
"type": "integer"
},
"supplier_part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/SupplierPart"
}
],
"nullable": true,
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tests": {
"items": {
"$ref": "#/components/schemas/StockItemTestResult"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"tracking_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"updated": {
"description": "Timestamp of last update",
"format": "date-time",
"nullable": true,
"readOnly": true,
"type": "string"
},
"use_pack_size": {
"description": "Use pack size when adding: the quantity defined is the number of packs",
"nullable": true,
"type": "boolean",
"writeOnly": true
}
},
"required": [
"barcode_hash",
"in_stock",
"part",
"pk",
"quantity",
"status_text"
],
"type": "object"
}
PATCH /api/stock/{id}/¶
Description
API detail endpoint for a single StockItem instance.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
id |
path | integer | No |
Request body
{
"MPN": "string",
"SKU": "string",
"allocated": 10.12,
"barcode_hash": "string",
"batch": "string",
"belongs_to": 0,
"build": 0,
"child_items": 0,
"consumed_by": 0,
"customer": 0,
"delete_on_deplete": true,
"expired": true,
"expiry_date": "2022-04-13",
"in_stock": true,
"installed_items": 0,
"is_building": true,
"link": "string",
"location": 0,
"location_detail": null,
"location_path": [
{}
],
"notes": "string",
"owner": 0,
"packaging": "string",
"parent": 0,
"part": 0,
"part_detail": null,
"pk": 0,
"purchase_order": 0,
"purchase_order_reference": "string",
"purchase_price": "string",
"purchase_price_currency": "string",
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"serial_numbers": "string",
"stale": true,
"status": null,
"status_custom_key": 0,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"string"
],
"tests": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
],
"tracking_items": 0,
"updated": "2022-04-13T15:42:05.901Z",
"use_pack_size": true
}
Schema of the request body
{
"description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
"properties": {
"MPN": {
"nullable": true,
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"nullable": true,
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"nullable": true,
"readOnly": true,
"title": "Allocated Quantity",
"type": "number"
},
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"batch": {
"description": "Batch code for this stock item",
"maxLength": 100,
"nullable": true,
"title": "Batch Code",
"type": "string"
},
"belongs_to": {
"description": "Is this item installed in another item?",
"nullable": true,
"title": "Installed In",
"type": "integer"
},
"build": {
"description": "Build for this stock item",
"nullable": true,
"title": "Source Build",
"type": "integer"
},
"child_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"consumed_by": {
"description": "Build order which consumed this stock item",
"nullable": true,
"type": "integer"
},
"customer": {
"description": "Customer",
"nullable": true,
"type": "integer"
},
"delete_on_deplete": {
"description": "Delete this Stock Item when stock is depleted",
"type": "boolean"
},
"expired": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"expiry_date": {
"description": "Expiry date for stock item. Stock will be considered expired after this date",
"format": "date",
"nullable": true,
"type": "string"
},
"in_stock": {
"readOnly": true,
"type": "boolean"
},
"installed_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 2000,
"title": "External Link",
"type": "string"
},
"location": {
"description": "Where is this stock item located?",
"nullable": true,
"title": "Stock Location",
"type": "integer"
},
"location_detail": {
"allOf": [
{
"$ref": "#/components/schemas/LocationBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Location"
},
"location_path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"notes": {
"description": "Markdown notes (optional)",
"maxLength": 50000,
"nullable": true,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"packaging": {
"description": "Packaging this stock item is stored in",
"maxLength": 50,
"nullable": true,
"type": "string"
},
"parent": {
"description": "Parent stock item",
"nullable": true,
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Part"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"purchase_order": {
"description": "Purchase order for this stock item",
"nullable": true,
"title": "Source Purchase Order",
"type": "integer"
},
"purchase_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"purchase_price": {
"description": "Purchase price of this stock item, per unit or pack",
"format": "decimal",
"nullable": true,
"pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
"type": "string"
},
"purchase_price_currency": {
"description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
"title": "Currency",
"type": "string"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"serial_numbers": {
"description": "Enter serial numbers for new items",
"nullable": true,
"type": "string",
"writeOnly": true
},
"stale": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/StockItemStatusEnum"
}
],
"maximum": 9223372036854775807,
"minimum": 0
},
"status_custom_key": {
"description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
"nullable": true,
"title": "Custom status key",
"type": "integer"
},
"status_text": {
"readOnly": true,
"title": "Status",
"type": "string"
},
"stocktake_date": {
"format": "date",
"nullable": true,
"readOnly": true,
"type": "string"
},
"supplier_part": {
"description": "Select a matching supplier part for this stock item",
"nullable": true,
"type": "integer"
},
"supplier_part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/SupplierPart"
}
],
"nullable": true,
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tests": {
"items": {
"$ref": "#/components/schemas/StockItemTestResult"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"tracking_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"updated": {
"description": "Timestamp of last update",
"format": "date-time",
"nullable": true,
"readOnly": true,
"type": "string"
},
"use_pack_size": {
"description": "Use pack size when adding: the quantity defined is the number of packs",
"nullable": true,
"type": "boolean",
"writeOnly": true
}
},
"type": "object"
}
{
"MPN": "string",
"SKU": "string",
"allocated": 10.12,
"barcode_hash": "string",
"batch": "string",
"belongs_to": 0,
"build": 0,
"child_items": 0,
"consumed_by": 0,
"customer": 0,
"delete_on_deplete": true,
"expired": true,
"expiry_date": "2022-04-13",
"in_stock": true,
"installed_items": 0,
"is_building": true,
"link": "string",
"location": 0,
"location_detail": null,
"location_path": [
{}
],
"notes": "string",
"owner": 0,
"packaging": "string",
"parent": 0,
"part": 0,
"part_detail": null,
"pk": 0,
"purchase_order": 0,
"purchase_order_reference": "string",
"purchase_price": "string",
"purchase_price_currency": "string",
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"serial_numbers": "string",
"stale": true,
"status": null,
"status_custom_key": 0,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"string"
],
"tests": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
],
"tracking_items": 0,
"updated": "2022-04-13T15:42:05.901Z",
"use_pack_size": true
}
Schema of the request body
{
"description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
"properties": {
"MPN": {
"nullable": true,
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"nullable": true,
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"nullable": true,
"readOnly": true,
"title": "Allocated Quantity",
"type": "number"
},
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"batch": {
"description": "Batch code for this stock item",
"maxLength": 100,
"nullable": true,
"title": "Batch Code",
"type": "string"
},
"belongs_to": {
"description": "Is this item installed in another item?",
"nullable": true,
"title": "Installed In",
"type": "integer"
},
"build": {
"description": "Build for this stock item",
"nullable": true,
"title": "Source Build",
"type": "integer"
},
"child_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"consumed_by": {
"description": "Build order which consumed this stock item",
"nullable": true,
"type": "integer"
},
"customer": {
"description": "Customer",
"nullable": true,
"type": "integer"
},
"delete_on_deplete": {
"description": "Delete this Stock Item when stock is depleted",
"type": "boolean"
},
"expired": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"expiry_date": {
"description": "Expiry date for stock item. Stock will be considered expired after this date",
"format": "date",
"nullable": true,
"type": "string"
},
"in_stock": {
"readOnly": true,
"type": "boolean"
},
"installed_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 2000,
"title": "External Link",
"type": "string"
},
"location": {
"description": "Where is this stock item located?",
"nullable": true,
"title": "Stock Location",
"type": "integer"
},
"location_detail": {
"allOf": [
{
"$ref": "#/components/schemas/LocationBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Location"
},
"location_path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"notes": {
"description": "Markdown notes (optional)",
"maxLength": 50000,
"nullable": true,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"packaging": {
"description": "Packaging this stock item is stored in",
"maxLength": 50,
"nullable": true,
"type": "string"
},
"parent": {
"description": "Parent stock item",
"nullable": true,
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Part"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"purchase_order": {
"description": "Purchase order for this stock item",
"nullable": true,
"title": "Source Purchase Order",
"type": "integer"
},
"purchase_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"purchase_price": {
"description": "Purchase price of this stock item, per unit or pack",
"format": "decimal",
"nullable": true,
"pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
"type": "string"
},
"purchase_price_currency": {
"description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
"title": "Currency",
"type": "string"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"serial_numbers": {
"description": "Enter serial numbers for new items",
"nullable": true,
"type": "string",
"writeOnly": true
},
"stale": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/StockItemStatusEnum"
}
],
"maximum": 9223372036854775807,
"minimum": 0
},
"status_custom_key": {
"description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
"nullable": true,
"title": "Custom status key",
"type": "integer"
},
"status_text": {
"readOnly": true,
"title": "Status",
"type": "string"
},
"stocktake_date": {
"format": "date",
"nullable": true,
"readOnly": true,
"type": "string"
},
"supplier_part": {
"description": "Select a matching supplier part for this stock item",
"nullable": true,
"type": "integer"
},
"supplier_part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/SupplierPart"
}
],
"nullable": true,
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tests": {
"items": {
"$ref": "#/components/schemas/StockItemTestResult"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"tracking_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"updated": {
"description": "Timestamp of last update",
"format": "date-time",
"nullable": true,
"readOnly": true,
"type": "string"
},
"use_pack_size": {
"description": "Use pack size when adding: the quantity defined is the number of packs",
"nullable": true,
"type": "boolean",
"writeOnly": true
}
},
"type": "object"
}
{
"MPN": "string",
"SKU": "string",
"allocated": 10.12,
"barcode_hash": "string",
"batch": "string",
"belongs_to": 0,
"build": 0,
"child_items": 0,
"consumed_by": 0,
"customer": 0,
"delete_on_deplete": true,
"expired": true,
"expiry_date": "2022-04-13",
"in_stock": true,
"installed_items": 0,
"is_building": true,
"link": "string",
"location": 0,
"location_detail": null,
"location_path": [
{}
],
"notes": "string",
"owner": 0,
"packaging": "string",
"parent": 0,
"part": 0,
"part_detail": null,
"pk": 0,
"purchase_order": 0,
"purchase_order_reference": "string",
"purchase_price": "string",
"purchase_price_currency": "string",
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"serial_numbers": "string",
"stale": true,
"status": null,
"status_custom_key": 0,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"string"
],
"tests": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
],
"tracking_items": 0,
"updated": "2022-04-13T15:42:05.901Z",
"use_pack_size": true
}
Schema of the request body
{
"description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
"properties": {
"MPN": {
"nullable": true,
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"nullable": true,
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"nullable": true,
"readOnly": true,
"title": "Allocated Quantity",
"type": "number"
},
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"batch": {
"description": "Batch code for this stock item",
"maxLength": 100,
"nullable": true,
"title": "Batch Code",
"type": "string"
},
"belongs_to": {
"description": "Is this item installed in another item?",
"nullable": true,
"title": "Installed In",
"type": "integer"
},
"build": {
"description": "Build for this stock item",
"nullable": true,
"title": "Source Build",
"type": "integer"
},
"child_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"consumed_by": {
"description": "Build order which consumed this stock item",
"nullable": true,
"type": "integer"
},
"customer": {
"description": "Customer",
"nullable": true,
"type": "integer"
},
"delete_on_deplete": {
"description": "Delete this Stock Item when stock is depleted",
"type": "boolean"
},
"expired": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"expiry_date": {
"description": "Expiry date for stock item. Stock will be considered expired after this date",
"format": "date",
"nullable": true,
"type": "string"
},
"in_stock": {
"readOnly": true,
"type": "boolean"
},
"installed_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 2000,
"title": "External Link",
"type": "string"
},
"location": {
"description": "Where is this stock item located?",
"nullable": true,
"title": "Stock Location",
"type": "integer"
},
"location_detail": {
"allOf": [
{
"$ref": "#/components/schemas/LocationBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Location"
},
"location_path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"notes": {
"description": "Markdown notes (optional)",
"maxLength": 50000,
"nullable": true,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"packaging": {
"description": "Packaging this stock item is stored in",
"maxLength": 50,
"nullable": true,
"type": "string"
},
"parent": {
"description": "Parent stock item",
"nullable": true,
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Part"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"purchase_order": {
"description": "Purchase order for this stock item",
"nullable": true,
"title": "Source Purchase Order",
"type": "integer"
},
"purchase_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"purchase_price": {
"description": "Purchase price of this stock item, per unit or pack",
"format": "decimal",
"nullable": true,
"pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
"type": "string"
},
"purchase_price_currency": {
"description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
"title": "Currency",
"type": "string"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"serial_numbers": {
"description": "Enter serial numbers for new items",
"nullable": true,
"type": "string",
"writeOnly": true
},
"stale": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/StockItemStatusEnum"
}
],
"maximum": 9223372036854775807,
"minimum": 0
},
"status_custom_key": {
"description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
"nullable": true,
"title": "Custom status key",
"type": "integer"
},
"status_text": {
"readOnly": true,
"title": "Status",
"type": "string"
},
"stocktake_date": {
"format": "date",
"nullable": true,
"readOnly": true,
"type": "string"
},
"supplier_part": {
"description": "Select a matching supplier part for this stock item",
"nullable": true,
"type": "integer"
},
"supplier_part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/SupplierPart"
}
],
"nullable": true,
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tests": {
"items": {
"$ref": "#/components/schemas/StockItemTestResult"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"tracking_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"updated": {
"description": "Timestamp of last update",
"format": "date-time",
"nullable": true,
"readOnly": true,
"type": "string"
},
"use_pack_size": {
"description": "Use pack size when adding: the quantity defined is the number of packs",
"nullable": true,
"type": "boolean",
"writeOnly": true
}
},
"type": "object"
}
Responses
{
"MPN": "string",
"SKU": "string",
"allocated": 10.12,
"barcode_hash": "string",
"batch": "string",
"belongs_to": 0,
"build": 0,
"child_items": 0,
"consumed_by": 0,
"customer": 0,
"delete_on_deplete": true,
"expired": true,
"expiry_date": "2022-04-13",
"in_stock": true,
"installed_items": 0,
"is_building": true,
"link": "string",
"location": 0,
"location_detail": null,
"location_path": [
{}
],
"notes": "string",
"owner": 0,
"packaging": "string",
"parent": 0,
"part": 0,
"part_detail": null,
"pk": 0,
"purchase_order": 0,
"purchase_order_reference": "string",
"purchase_price": "string",
"purchase_price_currency": "string",
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"serial_numbers": "string",
"stale": true,
"status": null,
"status_custom_key": 0,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"string"
],
"tests": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
],
"tracking_items": 0,
"updated": "2022-04-13T15:42:05.901Z",
"use_pack_size": true
}
Schema of the response body
{
"description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
"properties": {
"MPN": {
"nullable": true,
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"nullable": true,
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"nullable": true,
"readOnly": true,
"title": "Allocated Quantity",
"type": "number"
},
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"batch": {
"description": "Batch code for this stock item",
"maxLength": 100,
"nullable": true,
"title": "Batch Code",
"type": "string"
},
"belongs_to": {
"description": "Is this item installed in another item?",
"nullable": true,
"title": "Installed In",
"type": "integer"
},
"build": {
"description": "Build for this stock item",
"nullable": true,
"title": "Source Build",
"type": "integer"
},
"child_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"consumed_by": {
"description": "Build order which consumed this stock item",
"nullable": true,
"type": "integer"
},
"customer": {
"description": "Customer",
"nullable": true,
"type": "integer"
},
"delete_on_deplete": {
"description": "Delete this Stock Item when stock is depleted",
"type": "boolean"
},
"expired": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"expiry_date": {
"description": "Expiry date for stock item. Stock will be considered expired after this date",
"format": "date",
"nullable": true,
"type": "string"
},
"in_stock": {
"readOnly": true,
"type": "boolean"
},
"installed_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 2000,
"title": "External Link",
"type": "string"
},
"location": {
"description": "Where is this stock item located?",
"nullable": true,
"title": "Stock Location",
"type": "integer"
},
"location_detail": {
"allOf": [
{
"$ref": "#/components/schemas/LocationBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Location"
},
"location_path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"notes": {
"description": "Markdown notes (optional)",
"maxLength": 50000,
"nullable": true,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"packaging": {
"description": "Packaging this stock item is stored in",
"maxLength": 50,
"nullable": true,
"type": "string"
},
"parent": {
"description": "Parent stock item",
"nullable": true,
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Part"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"purchase_order": {
"description": "Purchase order for this stock item",
"nullable": true,
"title": "Source Purchase Order",
"type": "integer"
},
"purchase_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"purchase_price": {
"description": "Purchase price of this stock item, per unit or pack",
"format": "decimal",
"nullable": true,
"pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
"type": "string"
},
"purchase_price_currency": {
"description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
"title": "Currency",
"type": "string"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"serial_numbers": {
"description": "Enter serial numbers for new items",
"nullable": true,
"type": "string",
"writeOnly": true
},
"stale": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/StockItemStatusEnum"
}
],
"maximum": 9223372036854775807,
"minimum": 0
},
"status_custom_key": {
"description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
"nullable": true,
"title": "Custom status key",
"type": "integer"
},
"status_text": {
"readOnly": true,
"title": "Status",
"type": "string"
},
"stocktake_date": {
"format": "date",
"nullable": true,
"readOnly": true,
"type": "string"
},
"supplier_part": {
"description": "Select a matching supplier part for this stock item",
"nullable": true,
"type": "integer"
},
"supplier_part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/SupplierPart"
}
],
"nullable": true,
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tests": {
"items": {
"$ref": "#/components/schemas/StockItemTestResult"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"tracking_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"updated": {
"description": "Timestamp of last update",
"format": "date-time",
"nullable": true,
"readOnly": true,
"type": "string"
},
"use_pack_size": {
"description": "Use pack size when adding: the quantity defined is the number of packs",
"nullable": true,
"type": "boolean",
"writeOnly": true
}
},
"required": [
"barcode_hash",
"in_stock",
"part",
"pk",
"quantity",
"status_text"
],
"type": "object"
}
PUT /api/stock/{id}/¶
Description
API detail endpoint for a single StockItem instance.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
id |
path | integer | No |
Request body
{
"MPN": "string",
"SKU": "string",
"allocated": 10.12,
"barcode_hash": "string",
"batch": "string",
"belongs_to": 0,
"build": 0,
"child_items": 0,
"consumed_by": 0,
"customer": 0,
"delete_on_deplete": true,
"expired": true,
"expiry_date": "2022-04-13",
"in_stock": true,
"installed_items": 0,
"is_building": true,
"link": "string",
"location": 0,
"location_detail": null,
"location_path": [
{}
],
"notes": "string",
"owner": 0,
"packaging": "string",
"parent": 0,
"part": 0,
"part_detail": null,
"pk": 0,
"purchase_order": 0,
"purchase_order_reference": "string",
"purchase_price": "string",
"purchase_price_currency": "string",
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"serial_numbers": "string",
"stale": true,
"status": null,
"status_custom_key": 0,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"string"
],
"tests": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
],
"tracking_items": 0,
"updated": "2022-04-13T15:42:05.901Z",
"use_pack_size": true
}
Schema of the request body
{
"description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
"properties": {
"MPN": {
"nullable": true,
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"nullable": true,
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"nullable": true,
"readOnly": true,
"title": "Allocated Quantity",
"type": "number"
},
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"batch": {
"description": "Batch code for this stock item",
"maxLength": 100,
"nullable": true,
"title": "Batch Code",
"type": "string"
},
"belongs_to": {
"description": "Is this item installed in another item?",
"nullable": true,
"title": "Installed In",
"type": "integer"
},
"build": {
"description": "Build for this stock item",
"nullable": true,
"title": "Source Build",
"type": "integer"
},
"child_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"consumed_by": {
"description": "Build order which consumed this stock item",
"nullable": true,
"type": "integer"
},
"customer": {
"description": "Customer",
"nullable": true,
"type": "integer"
},
"delete_on_deplete": {
"description": "Delete this Stock Item when stock is depleted",
"type": "boolean"
},
"expired": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"expiry_date": {
"description": "Expiry date for stock item. Stock will be considered expired after this date",
"format": "date",
"nullable": true,
"type": "string"
},
"in_stock": {
"readOnly": true,
"type": "boolean"
},
"installed_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 2000,
"title": "External Link",
"type": "string"
},
"location": {
"description": "Where is this stock item located?",
"nullable": true,
"title": "Stock Location",
"type": "integer"
},
"location_detail": {
"allOf": [
{
"$ref": "#/components/schemas/LocationBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Location"
},
"location_path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"notes": {
"description": "Markdown notes (optional)",
"maxLength": 50000,
"nullable": true,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"packaging": {
"description": "Packaging this stock item is stored in",
"maxLength": 50,
"nullable": true,
"type": "string"
},
"parent": {
"description": "Parent stock item",
"nullable": true,
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Part"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"purchase_order": {
"description": "Purchase order for this stock item",
"nullable": true,
"title": "Source Purchase Order",
"type": "integer"
},
"purchase_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"purchase_price": {
"description": "Purchase price of this stock item, per unit or pack",
"format": "decimal",
"nullable": true,
"pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
"type": "string"
},
"purchase_price_currency": {
"description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
"title": "Currency",
"type": "string"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"serial_numbers": {
"description": "Enter serial numbers for new items",
"nullable": true,
"type": "string",
"writeOnly": true
},
"stale": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/StockItemStatusEnum"
}
],
"maximum": 9223372036854775807,
"minimum": 0
},
"status_custom_key": {
"description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
"nullable": true,
"title": "Custom status key",
"type": "integer"
},
"status_text": {
"readOnly": true,
"title": "Status",
"type": "string"
},
"stocktake_date": {
"format": "date",
"nullable": true,
"readOnly": true,
"type": "string"
},
"supplier_part": {
"description": "Select a matching supplier part for this stock item",
"nullable": true,
"type": "integer"
},
"supplier_part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/SupplierPart"
}
],
"nullable": true,
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tests": {
"items": {
"$ref": "#/components/schemas/StockItemTestResult"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"tracking_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"updated": {
"description": "Timestamp of last update",
"format": "date-time",
"nullable": true,
"readOnly": true,
"type": "string"
},
"use_pack_size": {
"description": "Use pack size when adding: the quantity defined is the number of packs",
"nullable": true,
"type": "boolean",
"writeOnly": true
}
},
"required": [
"barcode_hash",
"in_stock",
"part",
"pk",
"quantity",
"status_text"
],
"type": "object"
}
{
"MPN": "string",
"SKU": "string",
"allocated": 10.12,
"barcode_hash": "string",
"batch": "string",
"belongs_to": 0,
"build": 0,
"child_items": 0,
"consumed_by": 0,
"customer": 0,
"delete_on_deplete": true,
"expired": true,
"expiry_date": "2022-04-13",
"in_stock": true,
"installed_items": 0,
"is_building": true,
"link": "string",
"location": 0,
"location_detail": null,
"location_path": [
{}
],
"notes": "string",
"owner": 0,
"packaging": "string",
"parent": 0,
"part": 0,
"part_detail": null,
"pk": 0,
"purchase_order": 0,
"purchase_order_reference": "string",
"purchase_price": "string",
"purchase_price_currency": "string",
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"serial_numbers": "string",
"stale": true,
"status": null,
"status_custom_key": 0,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"string"
],
"tests": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
],
"tracking_items": 0,
"updated": "2022-04-13T15:42:05.901Z",
"use_pack_size": true
}
Schema of the request body
{
"description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
"properties": {
"MPN": {
"nullable": true,
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"nullable": true,
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"nullable": true,
"readOnly": true,
"title": "Allocated Quantity",
"type": "number"
},
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"batch": {
"description": "Batch code for this stock item",
"maxLength": 100,
"nullable": true,
"title": "Batch Code",
"type": "string"
},
"belongs_to": {
"description": "Is this item installed in another item?",
"nullable": true,
"title": "Installed In",
"type": "integer"
},
"build": {
"description": "Build for this stock item",
"nullable": true,
"title": "Source Build",
"type": "integer"
},
"child_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"consumed_by": {
"description": "Build order which consumed this stock item",
"nullable": true,
"type": "integer"
},
"customer": {
"description": "Customer",
"nullable": true,
"type": "integer"
},
"delete_on_deplete": {
"description": "Delete this Stock Item when stock is depleted",
"type": "boolean"
},
"expired": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"expiry_date": {
"description": "Expiry date for stock item. Stock will be considered expired after this date",
"format": "date",
"nullable": true,
"type": "string"
},
"in_stock": {
"readOnly": true,
"type": "boolean"
},
"installed_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 2000,
"title": "External Link",
"type": "string"
},
"location": {
"description": "Where is this stock item located?",
"nullable": true,
"title": "Stock Location",
"type": "integer"
},
"location_detail": {
"allOf": [
{
"$ref": "#/components/schemas/LocationBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Location"
},
"location_path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"notes": {
"description": "Markdown notes (optional)",
"maxLength": 50000,
"nullable": true,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"packaging": {
"description": "Packaging this stock item is stored in",
"maxLength": 50,
"nullable": true,
"type": "string"
},
"parent": {
"description": "Parent stock item",
"nullable": true,
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Part"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"purchase_order": {
"description": "Purchase order for this stock item",
"nullable": true,
"title": "Source Purchase Order",
"type": "integer"
},
"purchase_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"purchase_price": {
"description": "Purchase price of this stock item, per unit or pack",
"format": "decimal",
"nullable": true,
"pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
"type": "string"
},
"purchase_price_currency": {
"description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
"title": "Currency",
"type": "string"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"serial_numbers": {
"description": "Enter serial numbers for new items",
"nullable": true,
"type": "string",
"writeOnly": true
},
"stale": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/StockItemStatusEnum"
}
],
"maximum": 9223372036854775807,
"minimum": 0
},
"status_custom_key": {
"description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
"nullable": true,
"title": "Custom status key",
"type": "integer"
},
"status_text": {
"readOnly": true,
"title": "Status",
"type": "string"
},
"stocktake_date": {
"format": "date",
"nullable": true,
"readOnly": true,
"type": "string"
},
"supplier_part": {
"description": "Select a matching supplier part for this stock item",
"nullable": true,
"type": "integer"
},
"supplier_part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/SupplierPart"
}
],
"nullable": true,
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tests": {
"items": {
"$ref": "#/components/schemas/StockItemTestResult"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"tracking_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"updated": {
"description": "Timestamp of last update",
"format": "date-time",
"nullable": true,
"readOnly": true,
"type": "string"
},
"use_pack_size": {
"description": "Use pack size when adding: the quantity defined is the number of packs",
"nullable": true,
"type": "boolean",
"writeOnly": true
}
},
"required": [
"barcode_hash",
"in_stock",
"part",
"pk",
"quantity",
"status_text"
],
"type": "object"
}
{
"MPN": "string",
"SKU": "string",
"allocated": 10.12,
"barcode_hash": "string",
"batch": "string",
"belongs_to": 0,
"build": 0,
"child_items": 0,
"consumed_by": 0,
"customer": 0,
"delete_on_deplete": true,
"expired": true,
"expiry_date": "2022-04-13",
"in_stock": true,
"installed_items": 0,
"is_building": true,
"link": "string",
"location": 0,
"location_detail": null,
"location_path": [
{}
],
"notes": "string",
"owner": 0,
"packaging": "string",
"parent": 0,
"part": 0,
"part_detail": null,
"pk": 0,
"purchase_order": 0,
"purchase_order_reference": "string",
"purchase_price": "string",
"purchase_price_currency": "string",
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"serial_numbers": "string",
"stale": true,
"status": null,
"status_custom_key": 0,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"string"
],
"tests": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
],
"tracking_items": 0,
"updated": "2022-04-13T15:42:05.901Z",
"use_pack_size": true
}
Schema of the request body
{
"description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
"properties": {
"MPN": {
"nullable": true,
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"nullable": true,
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"nullable": true,
"readOnly": true,
"title": "Allocated Quantity",
"type": "number"
},
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"batch": {
"description": "Batch code for this stock item",
"maxLength": 100,
"nullable": true,
"title": "Batch Code",
"type": "string"
},
"belongs_to": {
"description": "Is this item installed in another item?",
"nullable": true,
"title": "Installed In",
"type": "integer"
},
"build": {
"description": "Build for this stock item",
"nullable": true,
"title": "Source Build",
"type": "integer"
},
"child_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"consumed_by": {
"description": "Build order which consumed this stock item",
"nullable": true,
"type": "integer"
},
"customer": {
"description": "Customer",
"nullable": true,
"type": "integer"
},
"delete_on_deplete": {
"description": "Delete this Stock Item when stock is depleted",
"type": "boolean"
},
"expired": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"expiry_date": {
"description": "Expiry date for stock item. Stock will be considered expired after this date",
"format": "date",
"nullable": true,
"type": "string"
},
"in_stock": {
"readOnly": true,
"type": "boolean"
},
"installed_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 2000,
"title": "External Link",
"type": "string"
},
"location": {
"description": "Where is this stock item located?",
"nullable": true,
"title": "Stock Location",
"type": "integer"
},
"location_detail": {
"allOf": [
{
"$ref": "#/components/schemas/LocationBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Location"
},
"location_path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"notes": {
"description": "Markdown notes (optional)",
"maxLength": 50000,
"nullable": true,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"packaging": {
"description": "Packaging this stock item is stored in",
"maxLength": 50,
"nullable": true,
"type": "string"
},
"parent": {
"description": "Parent stock item",
"nullable": true,
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Part"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"purchase_order": {
"description": "Purchase order for this stock item",
"nullable": true,
"title": "Source Purchase Order",
"type": "integer"
},
"purchase_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"purchase_price": {
"description": "Purchase price of this stock item, per unit or pack",
"format": "decimal",
"nullable": true,
"pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
"type": "string"
},
"purchase_price_currency": {
"description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
"title": "Currency",
"type": "string"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"serial_numbers": {
"description": "Enter serial numbers for new items",
"nullable": true,
"type": "string",
"writeOnly": true
},
"stale": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/StockItemStatusEnum"
}
],
"maximum": 9223372036854775807,
"minimum": 0
},
"status_custom_key": {
"description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
"nullable": true,
"title": "Custom status key",
"type": "integer"
},
"status_text": {
"readOnly": true,
"title": "Status",
"type": "string"
},
"stocktake_date": {
"format": "date",
"nullable": true,
"readOnly": true,
"type": "string"
},
"supplier_part": {
"description": "Select a matching supplier part for this stock item",
"nullable": true,
"type": "integer"
},
"supplier_part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/SupplierPart"
}
],
"nullable": true,
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tests": {
"items": {
"$ref": "#/components/schemas/StockItemTestResult"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"tracking_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"updated": {
"description": "Timestamp of last update",
"format": "date-time",
"nullable": true,
"readOnly": true,
"type": "string"
},
"use_pack_size": {
"description": "Use pack size when adding: the quantity defined is the number of packs",
"nullable": true,
"type": "boolean",
"writeOnly": true
}
},
"required": [
"barcode_hash",
"in_stock",
"part",
"pk",
"quantity",
"status_text"
],
"type": "object"
}
Responses
{
"MPN": "string",
"SKU": "string",
"allocated": 10.12,
"barcode_hash": "string",
"batch": "string",
"belongs_to": 0,
"build": 0,
"child_items": 0,
"consumed_by": 0,
"customer": 0,
"delete_on_deplete": true,
"expired": true,
"expiry_date": "2022-04-13",
"in_stock": true,
"installed_items": 0,
"is_building": true,
"link": "string",
"location": 0,
"location_detail": null,
"location_path": [
{}
],
"notes": "string",
"owner": 0,
"packaging": "string",
"parent": 0,
"part": 0,
"part_detail": null,
"pk": 0,
"purchase_order": 0,
"purchase_order_reference": "string",
"purchase_price": "string",
"purchase_price_currency": "string",
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"serial_numbers": "string",
"stale": true,
"status": null,
"status_custom_key": 0,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"string"
],
"tests": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
],
"tracking_items": 0,
"updated": "2022-04-13T15:42:05.901Z",
"use_pack_size": true
}
Schema of the response body
{
"description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
"properties": {
"MPN": {
"nullable": true,
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"nullable": true,
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"nullable": true,
"readOnly": true,
"title": "Allocated Quantity",
"type": "number"
},
"barcode_hash": {
"description": "Unique hash of barcode data",
"readOnly": true,
"type": "string"
},
"batch": {
"description": "Batch code for this stock item",
"maxLength": 100,
"nullable": true,
"title": "Batch Code",
"type": "string"
},
"belongs_to": {
"description": "Is this item installed in another item?",
"nullable": true,
"title": "Installed In",
"type": "integer"
},
"build": {
"description": "Build for this stock item",
"nullable": true,
"title": "Source Build",
"type": "integer"
},
"child_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"consumed_by": {
"description": "Build order which consumed this stock item",
"nullable": true,
"type": "integer"
},
"customer": {
"description": "Customer",
"nullable": true,
"type": "integer"
},
"delete_on_deplete": {
"description": "Delete this Stock Item when stock is depleted",
"type": "boolean"
},
"expired": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"expiry_date": {
"description": "Expiry date for stock item. Stock will be considered expired after this date",
"format": "date",
"nullable": true,
"type": "string"
},
"in_stock": {
"readOnly": true,
"type": "boolean"
},
"installed_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 2000,
"title": "External Link",
"type": "string"
},
"location": {
"description": "Where is this stock item located?",
"nullable": true,
"title": "Stock Location",
"type": "integer"
},
"location_detail": {
"allOf": [
{
"$ref": "#/components/schemas/LocationBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Location"
},
"location_path": {
"items": {
"additionalProperties": {},
"type": "object"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"notes": {
"description": "Markdown notes (optional)",
"maxLength": 50000,
"nullable": true,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"packaging": {
"description": "Packaging this stock item is stored in",
"maxLength": 50,
"nullable": true,
"type": "string"
},
"parent": {
"description": "Parent stock item",
"nullable": true,
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"nullable": true,
"readOnly": true,
"title": "Part"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
},
"purchase_order": {
"description": "Purchase order for this stock item",
"nullable": true,
"title": "Source Purchase Order",
"type": "integer"
},
"purchase_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"purchase_price": {
"description": "Purchase price of this stock item, per unit or pack",
"format": "decimal",
"nullable": true,
"pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
"type": "string"
},
"purchase_price_currency": {
"description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
"title": "Currency",
"type": "string"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"nullable": true,
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"serial_numbers": {
"description": "Enter serial numbers for new items",
"nullable": true,
"type": "string",
"writeOnly": true
},
"stale": {
"nullable": true,
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/StockItemStatusEnum"
}
],
"maximum": 9223372036854775807,
"minimum": 0
},
"status_custom_key": {
"description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
"nullable": true,
"title": "Custom status key",
"type": "integer"
},
"status_text": {
"readOnly": true,
"title": "Status",
"type": "string"
},
"stocktake_date": {
"format": "date",
"nullable": true,
"readOnly": true,
"type": "string"
},
"supplier_part": {
"description": "Select a matching supplier part for this stock item",
"nullable": true,
"type": "integer"
},
"supplier_part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/SupplierPart"
}
],
"nullable": true,
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tests": {
"items": {
"$ref": "#/components/schemas/StockItemTestResult"
},
"nullable": true,
"readOnly": true,
"type": "array"
},
"tracking_items": {
"nullable": true,
"readOnly": true,
"type": "integer"
},
"updated": {
"description": "Timestamp of last update",
"format": "date-time",
"nullable": true,
"readOnly": true,
"type": "string"
},
"use_pack_size": {
"description": "Use pack size when adding: the quantity defined is the number of packs",
"nullable": true,
"type": "boolean",
"writeOnly": true
}
},
"required": [
"barcode_hash",
"in_stock",
"part",
"pk",
"quantity",
"status_text"
],
"type": "object"
}
POST /api/stock/{id}/convert/¶
Description
API endpoint for converting a stock item to a variant part.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
id |
path | integer | No |
Request body
{
"part": 0
}
Schema of the request body
{
"description": "DRF serializer class for converting a StockItem to a valid variant part.",
"properties": {
"part": {
"description": "Select part to convert stock item into",
"type": "integer"
}
},
"required": [
"part"
],
"type": "object"
}
{
"part": 0
}
Schema of the request body
{
"description": "DRF serializer class for converting a StockItem to a valid variant part.",
"properties": {
"part": {
"description": "Select part to convert stock item into",
"type": "integer"
}
},
"required": [
"part"
],
"type": "object"
}
{
"part": 0
}
Schema of the request body
{
"description": "DRF serializer class for converting a StockItem to a valid variant part.",
"properties": {
"part": {
"description": "Select part to convert stock item into",
"type": "integer"
}
},
"required": [
"part"
],
"type": "object"
}
Responses
{
"part": 0
}
Schema of the response body
{
"description": "DRF serializer class for converting a StockItem to a valid variant part.",
"properties": {
"part": {
"description": "Select part to convert stock item into",
"type": "integer"
}
},
"required": [
"part"
],
"type": "object"
}
POST /api/stock/{id}/install/¶
Description
API endpoint for installing a particular stock item into this stock item.
- stock_item.part must be in the BOM for this part
- stock_item must currently be "in stock"
- stock_item must be serialized (and not belong to another item)
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
id |
path | integer | No |
Request body
{
"note": "string",
"quantity": 0,
"stock_item": 0
}
Schema of the request body
{
"description": "Serializer for installing a stock item into a given part.",
"properties": {
"note": {
"description": "Add transaction note (optional)",
"type": "string"
},
"quantity": {
"default": 1,
"description": "Enter the quantity of items to install",
"minimum": 1,
"title": "Quantity to Install",
"type": "integer"
},
"stock_item": {
"description": "Select stock item to install",
"type": "integer"
}
},
"required": [
"stock_item"
],
"type": "object"
}
{
"note": "string",
"quantity": 0,
"stock_item": 0
}
Schema of the request body
{
"description": "Serializer for installing a stock item into a given part.",
"properties": {
"note": {
"description": "Add transaction note (optional)",
"type": "string"
},
"quantity": {
"default": 1,
"description": "Enter the quantity of items to install",
"minimum": 1,
"title": "Quantity to Install",
"type": "integer"
},
"stock_item": {
"description": "Select stock item to install",
"type": "integer"
}
},
"required": [
"stock_item"
],
"type": "object"
}
{
"note": "string",
"quantity": 0,
"stock_item": 0
}
Schema of the request body
{
"description": "Serializer for installing a stock item into a given part.",
"properties": {
"note": {
"description": "Add transaction note (optional)",
"type": "string"
},
"quantity": {
"default": 1,
"description": "Enter the quantity of items to install",
"minimum": 1,
"title": "Quantity to Install",
"type": "integer"
},
"stock_item": {
"description": "Select stock item to install",
"type": "integer"
}
},
"required": [
"stock_item"
],
"type": "object"
}
Responses
{
"note": "string",
"quantity": 0,
"stock_item": 0
}
Schema of the response body
{
"description": "Serializer for installing a stock item into a given part.",
"properties": {
"note": {
"description": "Add transaction note (optional)",
"type": "string"
},
"quantity": {
"default": 1,
"description": "Enter the quantity of items to install",
"minimum": 1,
"title": "Quantity to Install",
"type": "integer"
},
"stock_item": {
"description": "Select stock item to install",
"type": "integer"
}
},
"required": [
"stock_item"
],
"type": "object"
}
GET /api/stock/{id}/serial-numbers/¶
Description
View extra serial number information for a given stock item.
Provides information on the "previous" and "next" stock items, based on the serial number of the given stock item.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
id |
path | integer | No |
Responses
{
"next": null,
"previous": null
}
Schema of the response body
{
"description": "Serializer for extra serial number information about a stock item.",
"properties": {
"next": {
"allOf": [
{
"$ref": "#/components/schemas/StockItem"
}
],
"readOnly": true,
"title": "Next Serial Number"
},
"previous": {
"allOf": [
{
"$ref": "#/components/schemas/StockItem"
}
],
"readOnly": true,
"title": "Previous Serial Number"
}
},
"required": [
"next",
"previous"
],
"type": "object"
}
POST /api/stock/{id}/serialize/¶
Description
API endpoint for serializing a stock item.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
id |
path | integer | No |
Request body
{
"destination": 0,
"notes": "string",
"quantity": 0,
"serial_numbers": "string"
}
Schema of the request body
{
"description": "A DRF serializer for \"serializing\" a StockItem.\n\n(Sorry for the confusing naming...)\n\nHere, \"serializing\" means splitting out a single StockItem,\ninto multiple single-quantity items with an assigned serial number\n\nNote: The base StockItem object is provided to the serializer context",
"properties": {
"destination": {
"description": "Destination stock location",
"title": "Location",
"type": "integer"
},
"notes": {
"description": "Optional note field",
"type": "string"
},
"quantity": {
"description": "Enter number of stock items to serialize",
"minimum": 0,
"type": "integer"
},
"serial_numbers": {
"description": "Enter serial numbers for new items",
"type": "string"
}
},
"required": [
"destination",
"quantity",
"serial_numbers"
],
"type": "object"
}
{
"destination": 0,
"notes": "string",
"quantity": 0,
"serial_numbers": "string"
}
Schema of the request body
{
"description": "A DRF serializer for \"serializing\" a StockItem.\n\n(Sorry for the confusing naming...)\n\nHere, \"serializing\" means splitting out a single StockItem,\ninto multiple single-quantity items with an assigned serial number\n\nNote: The base StockItem object is provided to the serializer context",
"properties": {
"destination": {
"description": "Destination stock location",
"title": "Location",
"type": "integer"
},
"notes": {
"description": "Optional note field",
"type": "string"
},
"quantity": {
"description": "Enter number of stock items to serialize",
"minimum": 0,
"type": "integer"
},
"serial_numbers": {
"description": "Enter serial numbers for new items",
"type": "string"
}
},
"required": [
"destination",
"quantity",
"serial_numbers"
],
"type": "object"
}
{
"destination": 0,
"notes": "string",
"quantity": 0,
"serial_numbers": "string"
}
Schema of the request body
{
"description": "A DRF serializer for \"serializing\" a StockItem.\n\n(Sorry for the confusing naming...)\n\nHere, \"serializing\" means splitting out a single StockItem,\ninto multiple single-quantity items with an assigned serial number\n\nNote: The base StockItem object is provided to the serializer context",
"properties": {
"destination": {
"description": "Destination stock location",
"title": "Location",
"type": "integer"
},
"notes": {
"description": "Optional note field",
"type": "string"
},
"quantity": {
"description": "Enter number of stock items to serialize",
"minimum": 0,
"type": "integer"
},
"serial_numbers": {
"description": "Enter serial numbers for new items",
"type": "string"
}
},
"required": [
"destination",
"quantity",
"serial_numbers"
],
"type": "object"
}
Responses
[
{
"MPN": "string",
"SKU": "string",
"allocated": 10.12,
"barcode_hash": "string",
"batch": "string",
"belongs_to": 0,
"build": 0,
"child_items": 0,
"consumed_by": 0,
"customer": 0,
"delete_on_deplete": true,
"expired": true,
"expiry_date": "2022-04-13",
"in_stock": true,
"installed_items": 0,
"is_building": true,
"link": "string",
"location": 0,
"location_detail": null,
"location_path": [
{}
],
"notes": "string",
"owner": 0,
"packaging": "string",
"parent": 0,
"part": 0,
"part_detail": null,
"pk": 0,
"purchase_order": 0,
"purchase_order_reference": "string",
"purchase_price": "string",
"purchase_price_currency": "string",
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"serial_numbers": "string",
"stale": true,
"status": null,
"status_custom_key": 0,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"string"
],
"tests": [
{
"attachment": "string",
"date": "2022-04-13T15:42:05.901Z",
"finished_datetime": "2022-04-13T15:42:05.901Z",
"notes": "string",
"pk": 0,
"result": true,
"started_datetime": "2022-04-13T15:42:05.901Z",
"stock_item": 0,
"template": 0,
"template_detail": null,
"test_station": "string",
"user": 0,
"user_detail": null,
"value": "string"
}
],
"tracking_items": 0,
"updated": "2022-04-13T15:42:05.901Z",
"use_pack_size": true
}
]
Schema of the response body
{
"items": {
"$ref": "#/components/schemas/StockItem"
},
"type": "array"
}
POST /api/stock/{id}/uninstall/¶
Description
API endpoint for removing (uninstalling) items from this item.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
oauth2 |
header | string | N/A | No | |
cookieAuth |
cookie | string | N/A | No | API key |
basicAuth |
header | string | N/A | No | Basic authentication |
tokenAuth |
header | string | N/A | No | Token-based authentication with required prefix "Token" |
id |
path | integer | No |
Request body
{
"location": 0,
"note": "string"
}
Schema of the request body
{
"description": "API serializers for uninstalling an installed item from a stock item.",
"properties": {
"location": {
"description": "Destination location for uninstalled item",
"type": "integer"
},
"note": {
"description": "Add transaction note (optional)",
"title": "Notes",
"type": "string"
}
},
"required": [
"location"
],
"type": "object"
}
{
"location": 0,
"note": "string"
}
Schema of the request body
{
"description": "API serializers for uninstalling an installed item from a stock item.",
"properties": {
"location": {
"description": "Destination location for uninstalled item",
"type": "integer"
},
"note": {
"description": "Add transaction note (optional)",
"title": "Notes",
"type": "string"
}
},
"required": [
"location"
],
"type": "object"
}
{
"location": 0,
"note": "string"
}
Schema of the request body
{
"description": "API serializers for uninstalling an installed item from a stock item.",
"properties": {
"location": {
"description": "Destination location for uninstalled item",
"type": "integer"
},
"note": {
"description": "Add transaction note (optional)",
"title": "Notes",
"type": "string"
}
},
"required": [
"location"
],
"type": "object"
}
Responses
{
"location": 0,
"note": "string"
}
Schema of the response body
{
"description": "API serializers for uninstalling an installed item from a stock item.",
"properties": {
"location": {
"description": "Destination location for uninstalled item",
"type": "integer"
},
"note": {
"description": "Add transaction note (optional)",
"title": "Notes",
"type": "string"
}
},
"required": [
"location"
],
"type": "object"
}
Schemas¶
BlankEnum¶
Type:
BulkRequest¶
| Name | Type | Description |
|---|---|---|
filters |
||
items |
Array<integer> |
CompanyBrief¶
| Name | Type | Description |
|---|---|---|
active |
boolean | Is this company active? |
currency |
string | Default currency used for this company |
description |
string | Description of the company |
image |
string(uri) | |
name |
string | Company name |
pk |
integer | |
tax_id |
string | Company Tax ID |
thumbnail |
string |
ConvertStockItem¶
| Name | Type | Description |
|---|---|---|
part |
integer | Select part to convert stock item into |
GenericStateClass¶
| Name | Type | Description |
|---|---|---|
status_class |
string | |
values |
GenericStateValue¶
| Name | Type | Description |
|---|---|---|
color |
string | |
custom |
boolean | |
key |
integer | |
label |
string | |
logical_key |
string | |
name |
string |
InstallStockItem¶
| Name | Type | Description |
|---|---|---|
note |
string | Add transaction note (optional) |
quantity |
integer | Enter the quantity of items to install |
stock_item |
integer | Select stock item to install |
Location¶
| Name | Type | Description |
|---|---|---|
barcode_hash |
string | Unique hash of barcode data |
custom_icon |
string | null | Icon (optional) |
description |
string | Description (optional) |
external |
boolean | This is an external stock location |
icon |
string | |
items |
integer | |
level |
integer | |
location_type |
integer | null | Stock location type of this location |
location_type_detail |
||
name |
string | Name |
owner |
integer | null | Select Owner |
parameters |
Array<Parameter> | |
parent |
integer | null | Parent stock location |
path |
Array<> | |
pathstring |
string | Path |
pk |
integer | |
structural |
boolean | Stock items may not be directly located into a structural stock locations, but may be located to child locations. |
sublocations |
integer | |
tags |
Array<string> |
LocationBrief¶
| Name | Type | Description |
|---|---|---|
name |
string | Name |
pathstring |
string | Path |
pk |
integer |
LocationTree¶
| Name | Type | Description |
|---|---|---|
icon |
string | Get the current icon used for this location. The icon field on this model takes precedences over the possibly assigned stock location type |
name |
string | Name |
parent |
integer | null | |
pk |
integer | |
structural |
boolean | Stock items may not be directly located into a structural stock locations, but may be located to child locations. |
sublocations |
integer |
ManufacturerPart¶
| Name | Type | Description |
|---|---|---|
barcode_hash |
string | Unique hash of barcode data |
description |
string | null | Manufacturer part description |
link |
string(uri) | null | URL for external manufacturer part link |
manufacturer |
integer | |
manufacturer_detail |
||
MPN |
string | null | Manufacturer Part Number |
notes |
string | null | Markdown notes (optional) |
parameters |
Array<Parameter> | |
part |
integer | Select part |
part_detail |
||
pk |
integer | |
pretty_name |
string | null | |
tags |
Array<string> |
ModelType054Enum¶
Type: string
NullEnum¶
Type:
PaginatedLocationList¶
| Name | Type | Description |
|---|---|---|
count |
integer | |
next |
string(uri) | null | |
previous |
string(uri) | null | |
results |
Array<Location> |
PaginatedLocationTreeList¶
| Name | Type | Description |
|---|---|---|
count |
integer | |
next |
string(uri) | null | |
previous |
string(uri) | null | |
results |
Array<LocationTree> |
PaginatedStockItemList¶
| Name | Type | Description |
|---|---|---|
count |
integer | |
next |
string(uri) | null | |
previous |
string(uri) | null | |
results |
Array<StockItem> |
PaginatedStockItemTestResultList¶
| Name | Type | Description |
|---|---|---|
count |
integer | |
next |
string(uri) | null | |
previous |
string(uri) | null | |
results |
Array<StockItemTestResult> |
PaginatedStockLocationTypeList¶
| Name | Type | Description |
|---|---|---|
count |
integer | |
next |
string(uri) | null | |
previous |
string(uri) | null | |
results |
Array<StockLocationType> |
PaginatedStockTrackingList¶
| Name | Type | Description |
|---|---|---|
count |
integer | |
next |
string(uri) | null | |
previous |
string(uri) | null | |
results |
Array<StockTracking> |
Parameter¶
| Name | Type | Description |
|---|---|---|
data |
string | Parameter Value |
data_numeric |
number(double) | null | |
model_id |
integer(int64) | ID of the target model for this parameter |
model_type |
||
note |
string | Optional note field |
pk |
integer | |
template |
integer | Parameter template |
template_detail |
||
updated |
string(date-time) | null | Timestamp of last update |
updated_by |
integer | null | User who last updated this object |
updated_by_detail |
ParameterTemplate¶
| Name | Type | Description |
|---|---|---|
checkbox |
boolean | Is this parameter a checkbox? |
choices |
string | Valid choices for this parameter (comma-separated) |
description |
string | Parameter description |
enabled |
boolean | Is this parameter template enabled? |
model_type |
||
name |
string | Parameter Name |
pk |
integer | |
selectionlist |
integer | null | Selection list for this parameter |
units |
string | Physical units for this parameter |
PartBrief¶
| Name | Type | Description |
|---|---|---|
active |
boolean | Is this part active? |
assembly |
boolean | Can this part be built from other parts? |
barcode_hash |
string | Unique hash of barcode data |
category_default_location |
integer | null | |
component |
boolean | Can this part be used to build other parts? |
default_expiry |
integer(int64) | Expiry time (in days) for stock items of this part |
default_location |
integer | null | Where is this item normally stored? |
description |
string | Part description (optional) |
full_name |
string | Format a 'full name' for this Part based on the format PART_NAME_FORMAT defined in InvenTree settings. |
image |
string(uri) | null | |
IPN |
string | null | Internal Part Number |
is_template |
boolean | Is this part a template part? |
locked |
boolean | Locked parts cannot be edited |
minimum_stock |
string(decimal) | Minimum allowed stock level |
name |
string | Part name |
pk |
integer | |
pricing_max |
string(decimal) | null | |
pricing_min |
string(decimal) | null | |
purchaseable |
boolean | Can this part be purchased from external suppliers? |
revision |
string | null | |
salable |
boolean | Can this part be sold to customers? |
testable |
boolean | Can this part have test results recorded against it? |
thumbnail |
string | |
trackable |
boolean | Does this part have tracking for unique items? |
units |
string | null | Units of measure for this part |
virtual |
boolean | Is this a virtual part, such as a software product or license? |
PartTestTemplate¶
| Name | Type | Description |
|---|---|---|
choices |
string | Valid choices for this test (comma-separated) |
description |
string | null | Enter description for this test |
enabled |
boolean | Is this test enabled? |
key |
string | |
part |
integer | |
pk |
integer | |
required |
boolean | Is this test required to pass? |
requires_attachment |
boolean | Does this test require a file attachment when adding a test result? |
requires_value |
boolean | Does this test require a value when adding a test result? |
results |
integer | Number of results recorded against this template |
test_name |
string | Enter a name for the test |
PatchedLocation¶
| Name | Type | Description |
|---|---|---|
barcode_hash |
string | Unique hash of barcode data |
custom_icon |
string | null | Icon (optional) |
description |
string | Description (optional) |
external |
boolean | This is an external stock location |
icon |
string | |
items |
integer | |
level |
integer | |
location_type |
integer | null | Stock location type of this location |
location_type_detail |
||
name |
string | Name |
owner |
integer | null | Select Owner |
parameters |
Array<Parameter> | |
parent |
integer | null | Parent stock location |
path |
Array<> | |
pathstring |
string | Path |
pk |
integer | |
structural |
boolean | Stock items may not be directly located into a structural stock locations, but may be located to child locations. |
sublocations |
integer | |
tags |
Array<string> |
PatchedStockItem¶
| Name | Type | Description |
|---|---|---|
allocated |
number(double) | null | |
barcode_hash |
string | Unique hash of barcode data |
batch |
string | null | Batch code for this stock item |
belongs_to |
integer | null | Is this item installed in another item? |
build |
integer | null | Build for this stock item |
child_items |
integer | null | |
consumed_by |
integer | null | Build order which consumed this stock item |
customer |
integer | null | Customer |
delete_on_deplete |
boolean | Delete this Stock Item when stock is depleted |
expired |
boolean | null | |
expiry_date |
string(date) | null | Expiry date for stock item. Stock will be considered expired after this date |
in_stock |
boolean | |
installed_items |
integer | null | |
is_building |
boolean | |
link |
string(uri) | Link to external URL |
location |
integer | null | Where is this stock item located? |
location_detail |
||
location_path |
Array<> | |
MPN |
string | null | |
notes |
string | null | Markdown notes (optional) |
owner |
integer | null | Select Owner |
packaging |
string | null | Packaging this stock item is stored in |
parent |
integer | null | Parent stock item |
part |
integer | Base Part |
part_detail |
||
pk |
integer | |
purchase_order |
integer | null | Purchase order for this stock item |
purchase_order_reference |
string | null | |
purchase_price |
string(decimal) | null | Purchase price of this stock item, per unit or pack |
purchase_price_currency |
string | Purchase currency of this stock item * `AUD` - AUD - Australian Dollar * `CAD` - CAD - Canadian Dollar * `CNY` - CNY - Chinese Yuan * `EUR` - EUR - Euro * `GBP` - GBP - British Pound * `JPY` - JPY - Japanese Yen * `NZD` - NZD - New Zealand Dollar * `USD` - USD - US Dollar Other valid currencies may be found in the 'CURRENCY_CODES' global setting. |
quantity |
number(double) | |
sales_order |
integer | null | |
sales_order_reference |
string | null | |
serial |
string | null | Serial number for this item |
serial_numbers |
string | null | Enter serial numbers for new items |
SKU |
string | null | |
stale |
boolean | null | |
status |
||
status_custom_key |
integer | null | Additional status information for this item * `10` - OK * `50` - Attention needed * `55` - Damaged * `60` - Destroyed * `65` - Rejected * `70` - Lost * `75` - Quarantined * `85` - Returned Additional custom status keys may be retrieved from the corresponding 'status_retrieve' call. |
status_text |
string | |
stocktake_date |
string(date) | null | |
supplier_part |
integer | null | Select a matching supplier part for this stock item |
supplier_part_detail |
||
tags |
Array<string> | |
tests |
Array<StockItemTestResult> | |
tracking_items |
integer | null | |
updated |
string(date-time) | null | Timestamp of last update |
use_pack_size |
boolean | null | Use pack size when adding: the quantity defined is the number of packs |
PatchedStockItemTestResult¶
| Name | Type | Description |
|---|---|---|
attachment |
string(uri) | null | Test result attachment |
date |
string(date-time) | |
finished_datetime |
string(date-time) | null | The timestamp of the test finish |
notes |
string | Test notes |
pk |
integer | |
result |
boolean | Test result |
started_datetime |
string(date-time) | null | The timestamp of the test start |
stock_item |
integer | |
template |
integer | null | Template |
template_detail |
||
test_station |
string | The identifier of the test station where the test was performed |
user |
integer | null | |
user_detail |
||
value |
string | Test output value |
PatchedStockLocationType¶
| Name | Type | Description |
|---|---|---|
description |
string | Description (optional) |
icon |
string | Default icon for all locations that have no icon set (optional) |
location_count |
integer | null | |
name |
string | Name |
pk |
integer |
SerializeStockItem¶
| Name | Type | Description |
|---|---|---|
destination |
integer | Destination stock location |
notes |
string | Optional note field |
quantity |
integer | Enter number of stock items to serialize |
serial_numbers |
string | Enter serial numbers for new items |
StockAdd¶
| Name | Type | Description |
|---|---|---|
items |
Array<StockAdjustmentItem> | |
notes |
string | Stock transaction notes |
StockAdjustmentItem¶
| Name | Type | Description |
|---|---|---|
batch |
string | Batch code for this stock item |
packaging |
string | Packaging this stock item is stored in |
pk |
integer | StockItem primary key value |
quantity |
string(decimal) | |
status |
integer | Stock item status code * `None` - No Change * `10` - OK * `50` - Attention needed * `55` - Damaged * `60` - Destroyed * `65` - Rejected * `70` - Lost * `75` - Quarantined * `85` - Returned Additional custom status keys may be retrieved from the 'stock_status_retrieve' call. |
StockAssignment¶
| Name | Type | Description |
|---|---|---|
customer |
integer | Customer to assign stock items |
items |
Array<StockAssignmentItem> | |
notes |
string | Stock assignment notes |
StockAssignmentItem¶
| Name | Type | Description |
|---|---|---|
item |
integer |
StockChangeStatus¶
| Name | Type | Description |
|---|---|---|
items |
Array<integer> | Select stock items to change status |
note |
string | Add transaction note (optional) |
status |
integer | Stock item status code * `10` - OK * `50` - Attention needed * `55` - Damaged * `60` - Destroyed * `65` - Rejected * `70` - Lost * `75` - Quarantined * `85` - Returned Additional custom status keys may be retrieved from the 'stock_status_retrieve' call. |
StockCount¶
| Name | Type | Description |
|---|---|---|
items |
Array<StockAdjustmentItem> | |
notes |
string | Stock transaction notes |
StockItem¶
| Name | Type | Description |
|---|---|---|
allocated |
number(double) | null | |
barcode_hash |
string | Unique hash of barcode data |
batch |
string | null | Batch code for this stock item |
belongs_to |
integer | null | Is this item installed in another item? |
build |
integer | null | Build for this stock item |
child_items |
integer | null | |
consumed_by |
integer | null | Build order which consumed this stock item |
customer |
integer | null | Customer |
delete_on_deplete |
boolean | Delete this Stock Item when stock is depleted |
expired |
boolean | null | |
expiry_date |
string(date) | null | Expiry date for stock item. Stock will be considered expired after this date |
in_stock |
boolean | |
installed_items |
integer | null | |
is_building |
boolean | |
link |
string(uri) | Link to external URL |
location |
integer | null | Where is this stock item located? |
location_detail |
||
location_path |
Array<> | |
MPN |
string | null | |
notes |
string | null | Markdown notes (optional) |
owner |
integer | null | Select Owner |
packaging |
string | null | Packaging this stock item is stored in |
parent |
integer | null | Parent stock item |
part |
integer | Base Part |
part_detail |
||
pk |
integer | |
purchase_order |
integer | null | Purchase order for this stock item |
purchase_order_reference |
string | null | |
purchase_price |
string(decimal) | null | Purchase price of this stock item, per unit or pack |
purchase_price_currency |
string | Purchase currency of this stock item * `AUD` - AUD - Australian Dollar * `CAD` - CAD - Canadian Dollar * `CNY` - CNY - Chinese Yuan * `EUR` - EUR - Euro * `GBP` - GBP - British Pound * `JPY` - JPY - Japanese Yen * `NZD` - NZD - New Zealand Dollar * `USD` - USD - US Dollar Other valid currencies may be found in the 'CURRENCY_CODES' global setting. |
quantity |
number(double) | |
sales_order |
integer | null | |
sales_order_reference |
string | null | |
serial |
string | null | Serial number for this item |
serial_numbers |
string | null | Enter serial numbers for new items |
SKU |
string | null | |
stale |
boolean | null | |
status |
||
status_custom_key |
integer | null | Additional status information for this item * `10` - OK * `50` - Attention needed * `55` - Damaged * `60` - Destroyed * `65` - Rejected * `70` - Lost * `75` - Quarantined * `85` - Returned Additional custom status keys may be retrieved from the corresponding 'status_retrieve' call. |
status_text |
string | |
stocktake_date |
string(date) | null | |
supplier_part |
integer | null | Select a matching supplier part for this stock item |
supplier_part_detail |
||
tags |
Array<string> | |
tests |
Array<StockItemTestResult> | |
tracking_items |
integer | null | |
updated |
string(date-time) | null | Timestamp of last update |
use_pack_size |
boolean | null | Use pack size when adding: the quantity defined is the number of packs |
StockItemSerialNumbers¶
| Name | Type | Description |
|---|---|---|
next |
||
previous |
StockItemStatusEnum¶
Type: integer
StockItemTestResult¶
| Name | Type | Description |
|---|---|---|
attachment |
string(uri) | null | Test result attachment |
date |
string(date-time) | |
finished_datetime |
string(date-time) | null | The timestamp of the test finish |
notes |
string | Test notes |
pk |
integer | |
result |
boolean | Test result |
started_datetime |
string(date-time) | null | The timestamp of the test start |
stock_item |
integer | |
template |
integer | null | Template |
template_detail |
||
test_station |
string | The identifier of the test station where the test was performed |
user |
integer | null | |
user_detail |
||
value |
string | Test output value |
StockLocationType¶
| Name | Type | Description |
|---|---|---|
description |
string | Description (optional) |
icon |
string | Default icon for all locations that have no icon set (optional) |
location_count |
integer | null | |
name |
string | Name |
pk |
integer |
StockMerge¶
| Name | Type | Description |
|---|---|---|
allow_mismatched_status |
boolean | Allow stock items with different status codes to be merged |
allow_mismatched_suppliers |
boolean | Allow stock items with different supplier parts to be merged |
items |
Array<StockMergeItem> | |
location |
integer | Destination stock location |
notes |
string | Stock merging notes |
StockMergeItem¶
| Name | Type | Description |
|---|---|---|
item |
integer |
StockRemove¶
| Name | Type | Description |
|---|---|---|
items |
Array<StockAdjustmentItem> | |
notes |
string | Stock transaction notes |
StockReturn¶
| Name | Type | Description |
|---|---|---|
items |
Array<StockAdjustmentItem> | |
location |
integer | Destination stock location |
merge |
boolean | Merge returned items into existing stock items if possible |
notes |
string | Stock transaction notes |
StockTracking¶
| Name | Type | Description |
|---|---|---|
date |
string(date-time) | |
deltas |
||
item |
integer | null | |
item_detail |
||
label |
string | |
notes |
string | null | Entry notes |
part |
integer | null | |
part_detail |
||
pk |
integer | |
tracking_type |
integer | |
user |
integer | null | |
user_detail |
StockTransfer¶
| Name | Type | Description |
|---|---|---|
items |
Array<StockAdjustmentItem> | |
location |
integer | Destination stock location |
notes |
string | Stock transaction notes |
SupplierPart¶
| Name | Type | Description |
|---|---|---|
active |
boolean | Is this supplier part active? |
availability_updated |
string(date-time) | null | Date of last update of availability data |
available |
number(double) | |
barcode_hash |
string | Unique hash of barcode data |
description |
string | null | Supplier part description |
in_stock |
number(double) | null | |
link |
string(uri) | null | URL for external supplier part link |
manufacturer_detail |
||
manufacturer_part |
integer | null | Select manufacturer part |
manufacturer_part_detail |
||
MPN |
string | null | |
note |
string | null | Notes |
notes |
string | null | Markdown notes (optional) |
on_order |
number(double) | null | |
pack_quantity |
string | Total quantity supplied in a single pack. Leave empty for single items. |
pack_quantity_native |
number(double) | |
packaging |
string | null | Part packaging |
parameters |
Array<Parameter> | |
part |
integer | Select part |
part_detail |
||
pk |
integer | |
pretty_name |
string | null | |
price_breaks |
Array<SupplierPriceBreakBrief> | |
primary |
boolean | Is this the primary supplier part for the linked Part? |
SKU |
string | Supplier stock keeping unit |
supplier |
integer | |
supplier_detail |
||
tags |
Array<string> | |
updated |
string(date-time) | null |
SupplierPriceBreakBrief¶
| Name | Type | Description |
|---|---|---|
part |
integer | |
pk |
integer | |
price |
string(decimal) | null | |
price_currency |
string | Select currency from available options * `AUD` - AUD - Australian Dollar * `CAD` - CAD - Canadian Dollar * `CNY` - CNY - Chinese Yuan * `EUR` - EUR - Euro * `GBP` - GBP - British Pound * `JPY` - JPY - Japanese Yen * `NZD` - NZD - New Zealand Dollar * `USD` - USD - US Dollar Other valid currencies may be found in the 'CURRENCY_CODES' global setting. |
quantity |
number(double) | |
supplier |
integer | |
updated |
string(date-time) | null | Timestamp of last update |
UninstallStockItem¶
| Name | Type | Description |
|---|---|---|
location |
integer | Destination location for uninstalled item |
note |
string | Add transaction note (optional) |
User¶
| Name | Type | Description |
|---|---|---|
email |
string(email) | Email address of the user |
first_name |
string | First name of the user |
last_name |
string | Last name of the user |
pk |
integer | |
username |
string | Username |
Common responses¶
This section describes common responses that are reused across operations.
allauth.AddAuthenticatorConflict¶
The account prohibits adding an authenticator, e.g. because of an unverified email address.
Schema of the response body
null
allauth.AddWebAuthnAuthenticator¶
A WebAuthn authenticator.
{
"data": null,
"meta": {
"recovery_codes_generated": true
},
"status": null
}
Schema of the response body
{
"properties": {
"data": {
"$ref": "#/components/schemas/allauth.WebAuthnAuthenticator"
},
"meta": {
"properties": {
"recovery_codes_generated": {
"description": "Whether or not recovery codes where generated automatically.\n",
"type": "boolean"
}
},
"type": "object"
},
"status": {
"$ref": "#/components/schemas/allauth.StatusOK"
}
},
"required": [
"status",
"data",
"meta"
],
"type": "object"
}
allauth.Authenticated¶
The user is authenticated.
Schema of the response body
null
allauth.AuthenticatedByCode¶
Authenticated by code.
{
"summary": "Authenticated by code.\n",
"value": {
"data": {
"methods": [
{
"at": 1711555057.065702,
"email": "email@domain.org",
"method": "code"
}
],
"user": {
"display": "Magic Wizard",
"email": "email@domain.org",
"has_usable_password": true,
"id": 123,
"username": "wizard"
}
},
"meta": {
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdW",
"is_authenticated": true,
"session_token": "ufwcig0zen9skyd545jc0fkq813ghar2"
},
"status": 200
}
}
Schema of the response body
null
allauth.AuthenticatedByPassword¶
Authenticated by password.
{
"summary": "Authenticated by password.\n",
"value": {
"data": {
"methods": [
{
"at": 1711555057.065702,
"email": "email@domain.org",
"method": "password"
}
],
"user": {
"display": "Magic Wizard",
"email": "email@domain.org",
"has_usable_password": true,
"id": 123,
"username": "wizard"
}
},
"meta": {
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdW",
"is_authenticated": true,
"session_token": "ufwcig0zen9skyd545jc0fkq813ghar2"
},
"status": 200
}
}
Schema of the response body
null
allauth.AuthenticatedByPasswordAnd2FA¶
Authenticated by password and 2FA.
{
"summary": "Fully authenticated using by password and 2FA.\n",
"value": {
"data": {
"methods": [
{
"at": 1711555057.065702,
"email": "email@domain.org",
"method": "password"
},
{
"at": 1711555060.9375854,
"id": 66,
"method": "mfa",
"type": "totp"
}
],
"user": {
"display": "Magic Wizard",
"email": "email@domain.org",
"has_usable_password": true,
"id": 123,
"username": "wizard"
}
},
"meta": {
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdW",
"is_authenticated": true,
"session_token": "ufwcig0zen9skyd545jc0fkq813ghar2"
},
"status": 200
}
}
Schema of the response body
null
allauth.Authentication¶
Not authenticated.
{
"summary": "Reauthentication required\n",
"value": {
"data": {
"flows": [
{
"id": "reauthenticate"
},
{
"id": "mfa_reauthenticate"
}
],
"methods": [
{
"at": 1711555057.065702,
"email": "email@domain.org",
"method": "password"
},
{
"at": 1711555060.9375854,
"id": 66,
"method": "mfa",
"type": "totp"
}
],
"user": {
"display": "Magic Wizard",
"email": "email@domain.org",
"has_usable_password": true,
"id": 123,
"username": "wizard"
}
},
"meta": {
"is_authenticated": true
},
"status": 401
}
}
{
"summary": "Unauthenticated: Initial\n",
"value": {
"data": {
"flows": [
{
"id": "login"
},
{
"id": "signup"
},
{
"id": "provider_redirect",
"providers": [
"facebook",
"google",
"telegram"
]
},
{
"id": "provider_token",
"providers": [
"google"
]
}
]
},
"meta": {
"is_authenticated": false
},
"status": 401
}
}
{
"summary": "Unauthenticated: pending 2FA\n",
"value": {
"data": {
"flows": [
{
"id": "login"
},
{
"id": "signup"
},
{
"id": "provider_redirect",
"providers": [
"facebook",
"google",
"telegram"
]
},
{
"id": "provider_token",
"providers": [
"google"
]
},
{
"id": "mfa_authenticate",
"is_pending": true
}
]
},
"meta": {
"is_authenticated": false
},
"status": 401
}
}
{
"summary": "Unauthenticated: pending email verification\n",
"value": {
"data": {
"flows": [
{
"id": "login"
},
{
"id": "signup"
},
{
"id": "provider_redirect",
"providers": [
"facebook",
"google",
"telegram"
]
},
{
"id": "provider_token",
"providers": [
"google"
]
},
{
"id": "verify_email",
"is_pending": true
}
]
},
"meta": {
"is_authenticated": false
},
"status": 401
}
}
{
"summary": "Unauthenticated: pending provider signup\n",
"value": {
"data": {
"flows": [
{
"id": "login"
},
{
"id": "signup"
},
{
"id": "provider_redirect",
"providers": [
"facebook",
"google",
"telegram"
]
},
{
"id": "provider_token",
"providers": [
"google"
]
},
{
"id": "provider_signup",
"is_pending": true,
"provider": {
"client_id": "123.apps.googleusercontent.com",
"flows": [
"provider_redirect",
"provider_token"
],
"id": "google",
"name": "Google"
}
}
]
},
"meta": {
"is_authenticated": false
},
"status": 401
}
}
Schema of the response body
null
allauth.AuthenticationOrReauthentication¶
The response indicates authentication or re-authentication is required.
Schema of the response body
{
"oneOf": [
{
"$ref": "#/components/schemas/allauth.AuthenticationResponse"
},
{
"$ref": "#/components/schemas/allauth.ReauthenticationResponse"
}
]
}
allauth.Authenticators¶
List of authenticators.
{
"data": null,
"status": null
}
Schema of the response body
{
"properties": {
"data": {
"$ref": "#/components/schemas/allauth.AuthenticatorList"
},
"status": {
"$ref": "#/components/schemas/allauth.StatusOK"
}
},
"required": [
"status",
"data"
],
"type": "object"
}
allauth.Configuration¶
The django-allauth configuration.
Schema of the response body
null
allauth.EmailAddresses¶
List of email addresses.
{
"data": [
null
],
"status": null
}
Schema of the response body
{
"properties": {
"data": {
"items": {
"$ref": "#/components/schemas/allauth.EmailAddress"
},
"type": "array"
},
"status": {
"$ref": "#/components/schemas/allauth.StatusOK"
}
},
"required": [
"status",
"data"
],
"type": "object"
}
allauth.EmailVerificationInfo¶
Email verification information.
Schema of the response body
null
allauth.Error¶
An input error occurred.
Schema of the response body
null
allauth.Forbidden¶
A forbidden response.
Schema of the response body
null
allauth.NotFound¶
Not found.
{
"status": 404
}
Schema of the response body
{
"properties": {
"status": {
"enum": [
404
],
"type": "integer"
}
},
"required": [
"status"
],
"type": "object"
}
allauth.PasswordResetInfo¶
Information about the password reset key.
{
"data": {
"user": null
},
"status": null
}
Schema of the response body
{
"properties": {
"data": {
"properties": {
"user": {
"$ref": "#/components/schemas/allauth.User"
}
},
"type": "object"
},
"status": {
"$ref": "#/components/schemas/allauth.StatusOK"
}
},
"required": [
"status",
"data"
],
"type": "object"
}
allauth.PhoneNumbers¶
List of phone numbers.
Schema of the response body
null
allauth.ProviderAccounts¶
List of third-party provider accounts.
{
"data": [
null
],
"status": null
}
Schema of the response body
{
"properties": {
"data": {
"items": {
"$ref": "#/components/schemas/allauth.ProviderAccount"
},
"type": "array"
},
"status": {
"$ref": "#/components/schemas/allauth.StatusOK"
}
},
"required": [
"status",
"data"
],
"type": "object"
}
allauth.ProviderSignup¶
Information relating to the pending provider signup.
{
"data": {
"account": null,
"email": [
null
],
"user": null
},
"status": null
}
Schema of the response body
{
"properties": {
"data": {
"properties": {
"account": {
"$ref": "#/components/schemas/allauth.ProviderAccount"
},
"email": {
"items": {
"$ref": "#/components/schemas/allauth.EmailAddress"
},
"type": "array"
},
"user": {
"$ref": "#/components/schemas/allauth.User"
}
},
"required": [
"email",
"account",
"user"
],
"type": "object"
},
"status": {
"$ref": "#/components/schemas/allauth.StatusOK"
}
},
"required": [
"status",
"data"
],
"type": "object"
}
allauth.ReauthenticationRequired¶
The response indicates reauthentication is required.
{
"data": {
"flows": [
{
"id": "reauthenticate"
},
{
"id": "mfa_reauthenticate"
}
],
"methods": [
{
"at": 1711555057.065702,
"email": "email@domain.org",
"method": "password"
},
{
"at": 1711555060.9375854,
"id": 66,
"method": "mfa",
"type": "totp"
}
],
"user": {
"display": "Magic Wizard",
"email": "email@domain.org",
"has_usable_password": true,
"id": 123,
"username": "wizard"
}
},
"meta": {
"is_authenticated": true
},
"status": 401
}
Schema of the response body
null
allauth.RecoveryCodes¶
Information on the recovery codes.
{
"data": null,
"status": null
}
Schema of the response body
{
"properties": {
"data": {
"$ref": "#/components/schemas/allauth.SensitiveRecoveryCodesAuthenticator"
},
"status": {
"$ref": "#/components/schemas/allauth.StatusOK"
}
},
"required": [
"status",
"data"
],
"type": "object"
}
allauth.RefreshToken¶
A new access token (and optionally new refresh token).
{
"data": {
"access_token": null,
"refresh_token": null
},
"status": null
}
Schema of the response body
{
"properties": {
"data": {
"properties": {
"access_token": {
"$ref": "#/components/schemas/allauth.AccessToken"
},
"refresh_token": {
"$ref": "#/components/schemas/allauth.RefreshToken"
}
},
"required": [
"access_token"
],
"type": "object"
},
"status": {
"$ref": "#/components/schemas/allauth.StatusOK"
}
},
"required": [
"data",
"status"
],
"type": "object"
}
allauth.SessionGone¶
The response indicates session is invalid or no longer exists.
{
"summary": "Unauthenticated: Initial\n",
"value": {
"data": {
"flows": [
{
"id": "login"
},
{
"id": "signup"
},
{
"id": "provider_redirect",
"providers": [
"facebook",
"google",
"telegram"
]
},
{
"id": "provider_token",
"providers": [
"google"
]
}
]
},
"meta": {
"is_authenticated": false
},
"status": 401
}
}
Schema of the response body
null
allauth.Sessions¶
List of sessions.
{
"data": [
null
],
"status": null
}
Schema of the response body
{
"properties": {
"data": {
"items": {
"$ref": "#/components/schemas/allauth.Session"
},
"type": "array"
},
"status": {
"$ref": "#/components/schemas/allauth.StatusOK"
}
},
"required": [
"status",
"data"
],
"type": "object"
}
allauth.StatusOK¶
A success response.
{
"status": null
}
Schema of the response body
{
"properties": {
"status": {
"$ref": "#/components/schemas/allauth.StatusOK"
}
},
"required": [
"status"
],
"type": "object"
}
allauth.TOTPAuthenticator¶
Information on the TOTP authenticator.
{
"data": null,
"meta": {
"recovery_codes_generated": true
},
"status": null
}
Schema of the response body
{
"properties": {
"data": {
"$ref": "#/components/schemas/allauth.TOTPAuthenticator"
},
"meta": {
"properties": {
"recovery_codes_generated": {
"description": "Whether or not recovery codes where generated automatically.",
"type": "boolean"
}
},
"type": "object"
},
"status": {
"$ref": "#/components/schemas/allauth.StatusOK"
}
},
"required": [
"status",
"data"
],
"type": "object"
}
allauth.TOTPAuthenticatorNotFound¶
No TOTP authenticator has been set up.
{
"meta": {
"secret": "J4ZKKXTK7NOVU7EPUVY23LCDV4T2QZYM",
"totp_url": "otpauth://totp/Example:alice@fsf.org?secret=JBSWY3DPEHPK3PXP&issuer=Example"
},
"status": 404
}
Schema of the response body
{
"properties": {
"meta": {
"properties": {
"secret": {
"description": "A TOTP secret that can be used to setup a new authenticator.\n",
"example": "J4ZKKXTK7NOVU7EPUVY23LCDV4T2QZYM",
"type": "string"
},
"totp_url": {
"description": "otpauth URI from which a QR code can be generated and scanned by OTP clients.\n",
"example": "otpauth://totp/Example:alice@fsf.org?secret=JBSWY3DPEHPK3PXP&issuer=Example",
"type": "string"
}
},
"required": [
"secret",
"totp_url"
],
"type": "object"
},
"status": {
"enum": [
404
],
"type": "integer"
}
},
"required": [
"status",
"meta"
],
"type": "object"
}
allauth.TooManyRequests¶
Too many requests.
{
"status": 429
}
Schema of the response body
{
"properties": {
"status": {
"enum": [
429
],
"type": "integer"
}
},
"required": [
"status"
],
"type": "object"
}
allauth.Unauthenticated¶
There is no authenticated session.
{
"summary": "Unauthenticated: Initial\n",
"value": {
"data": {
"flows": [
{
"id": "login"
},
{
"id": "signup"
},
{
"id": "provider_redirect",
"providers": [
"facebook",
"google",
"telegram"
]
},
{
"id": "provider_token",
"providers": [
"google"
]
}
]
},
"meta": {
"is_authenticated": false
},
"status": 401
}
}
Schema of the response body
null
allauth.WebAuthnAuthenticator¶
A WebAuthn authenticator.
{
"data": null,
"status": null
}
Schema of the response body
{
"properties": {
"data": {
"$ref": "#/components/schemas/allauth.WebAuthnAuthenticator"
},
"status": {
"$ref": "#/components/schemas/allauth.StatusOK"
}
},
"required": [
"status",
"data"
],
"type": "object"
}
allauth.WebAuthnCreationOptionsResponse¶
WebAuthn credential creation options.
{
"data": null,
"status": null
}
Schema of the response body
{
"properties": {
"data": {
"$ref": "#/components/schemas/allauth.WebAuthnCredentialCreationOptions"
},
"status": {
"$ref": "#/components/schemas/allauth.StatusOK"
}
},
"required": [
"status",
"data"
],
"type": "object"
}
allauth.WebAuthnRequestOptionsResponse¶
WebAuthn credential request options.
{
"data": null,
"status": null
}
Schema of the response body
{
"properties": {
"data": {
"$ref": "#/components/schemas/allauth.WebAuthnCredentialRequestOptions"
},
"status": {
"$ref": "#/components/schemas/allauth.StatusOK"
}
},
"required": [
"status",
"data"
],
"type": "object"
}
Common parameters¶
This section describes common parameters that are reused across operations.
allauth.EmailVerificationKey¶
| Name | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
X-Email-Verification-Key |
header | string | No |
allauth.PasswordLess¶
| Name | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
passwordless |
query | boolean | No |
allauth.PasswordResetKey¶
| Name | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
X-Password-Reset-Key |
header | string | No |
Security schemes¶
| Name | Type | Scheme | Description |
|---|---|---|---|
| basicAuth | http | basic | |
| cookieAuth | apiKey | ||
| oauth2 | oauth2 | ||
| tokenAuth | apiKey | Token-based authentication with required prefix "Token" |
More documentation¶
More information about InvenTree in the official docs