The Stock and Stock Locations section of the InvenTree API schema is documented below.
InvenTree API 309¶
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.
We expect a list of primary-key (ID) values to be supplied as a JSON object, e.g. { items: [4, 8, 15, 16, 23, 42] }
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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" |
Response 204 No Content
GET /api/stock/¶
Description
Override the 'get' method to check for the export query parameter.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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 | ||
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 | |
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. | |
manufacturer |
query | integer | No | ||
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_tree |
query | integer | No | ||
purchase_order |
query | integer | No | ||
salable |
query | boolean | No | Salable | |
sales_order |
query | integer | No | ||
search |
query | string | No | A search term. | |
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 | ||
tags__name |
query | string | No | ||
tags__slug |
query | string | No | ||
tracked |
query | boolean | No | Tracked | |
updated_after |
query | string | No | Updated after | |
updated_before |
query | string | No | Updated before |
Response 200 OK
{
"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,
"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": null,
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"stale": true,
"status": null,
"status_custom_key": null,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"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"
}
},
"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 |
---|---|---|---|---|---|
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,
"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": null,
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"stale": true,
"status": null,
"status_custom_key": null,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"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": {
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"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": {
"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": {
"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": {
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 200,
"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"
}
],
"readOnly": true,
"title": "Location"
},
"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",
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"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": {
"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": {
"allOf": [
{
"$ref": "#/components/schemas/SalePriceCurrencyEnum"
}
],
"description": "Purchase currency of this stock item\n\n* `AUD` - Australian Dollar\n* `CNY` - Chinese Yuan\n* `EUR` - Euro\n* `USD` - US Dollar",
"title": "Currency"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"stale": {
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/Status2a7Enum"
}
],
"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",
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/StatusCustomKey2a7Enum"
},
{
"$ref": "#/components/schemas/NullEnum"
}
],
"title": "Custom status key"
},
"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"
}
],
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tracking_items": {
"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": [
"MPN",
"SKU",
"allocated",
"barcode_hash",
"child_items",
"expired",
"in_stock",
"installed_items",
"location_detail",
"parent",
"part",
"part_detail",
"pk",
"purchase_order_reference",
"quantity",
"sales_order_reference",
"stale",
"status_text",
"stocktake_date",
"supplier_part_detail",
"tracking_items",
"updated"
],
"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,
"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": null,
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"stale": true,
"status": null,
"status_custom_key": null,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"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": {
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"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": {
"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": {
"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": {
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 200,
"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"
}
],
"readOnly": true,
"title": "Location"
},
"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",
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"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": {
"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": {
"allOf": [
{
"$ref": "#/components/schemas/SalePriceCurrencyEnum"
}
],
"description": "Purchase currency of this stock item\n\n* `AUD` - Australian Dollar\n* `CNY` - Chinese Yuan\n* `EUR` - Euro\n* `USD` - US Dollar",
"title": "Currency"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"stale": {
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/Status2a7Enum"
}
],
"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",
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/StatusCustomKey2a7Enum"
},
{
"$ref": "#/components/schemas/NullEnum"
}
],
"title": "Custom status key"
},
"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"
}
],
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tracking_items": {
"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": [
"MPN",
"SKU",
"allocated",
"barcode_hash",
"child_items",
"expired",
"in_stock",
"installed_items",
"location_detail",
"parent",
"part",
"part_detail",
"pk",
"purchase_order_reference",
"quantity",
"sales_order_reference",
"stale",
"status_text",
"stocktake_date",
"supplier_part_detail",
"tracking_items",
"updated"
],
"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,
"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": null,
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"stale": true,
"status": null,
"status_custom_key": null,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"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": {
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"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": {
"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": {
"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": {
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 200,
"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"
}
],
"readOnly": true,
"title": "Location"
},
"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",
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"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": {
"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": {
"allOf": [
{
"$ref": "#/components/schemas/SalePriceCurrencyEnum"
}
],
"description": "Purchase currency of this stock item\n\n* `AUD` - Australian Dollar\n* `CNY` - Chinese Yuan\n* `EUR` - Euro\n* `USD` - US Dollar",
"title": "Currency"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"stale": {
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/Status2a7Enum"
}
],
"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",
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/StatusCustomKey2a7Enum"
},
{
"$ref": "#/components/schemas/NullEnum"
}
],
"title": "Custom status key"
},
"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"
}
],
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tracking_items": {
"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": [
"MPN",
"SKU",
"allocated",
"barcode_hash",
"child_items",
"expired",
"in_stock",
"installed_items",
"location_detail",
"parent",
"part",
"part_detail",
"pk",
"purchase_order_reference",
"quantity",
"sales_order_reference",
"stale",
"status_text",
"stocktake_date",
"supplier_part_detail",
"tracking_items",
"updated"
],
"type": "object"
}
Response 201 Created
{
"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,
"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": null,
"quantity": 10.12,
"sales_order": 0,
"sales_order_reference": "string",
"serial": "string",
"stale": true,
"status": null,
"status_custom_key": null,
"status_text": "string",
"stocktake_date": "2022-04-13",
"supplier_part": 0,
"supplier_part_detail": null,
"tags": [
"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": {
"readOnly": true,
"title": "Manufacturer Part Number",
"type": "string"
},
"SKU": {
"readOnly": true,
"title": "Supplier Part Number",
"type": "string"
},
"allocated": {
"format": "double",
"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": {
"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": {
"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": {
"readOnly": true,
"type": "integer"
},
"is_building": {
"type": "boolean"
},
"link": {
"description": "Link to external URL",
"format": "uri",
"maxLength": 200,
"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"
}
],
"readOnly": true,
"title": "Location"
},
"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",
"readOnly": true,
"title": "Parent Item",
"type": "integer"
},
"part": {
"description": "Base Part",
"type": "integer"
},
"part_detail": {
"allOf": [
{
"$ref": "#/components/schemas/PartBrief"
}
],
"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": {
"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": {
"allOf": [
{
"$ref": "#/components/schemas/SalePriceCurrencyEnum"
}
],
"description": "Purchase currency of this stock item\n\n* `AUD` - Australian Dollar\n* `CNY` - Chinese Yuan\n* `EUR` - Euro\n* `USD` - US Dollar",
"title": "Currency"
},
"quantity": {
"format": "double",
"type": "number"
},
"sales_order": {
"nullable": true,
"title": "Destination Sales Order",
"type": "integer"
},
"sales_order_reference": {
"readOnly": true,
"type": "string"
},
"serial": {
"description": "Serial number for this item",
"maxLength": 100,
"nullable": true,
"title": "Serial Number",
"type": "string"
},
"stale": {
"readOnly": true,
"type": "boolean"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/Status2a7Enum"
}
],
"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",
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/StatusCustomKey2a7Enum"
},
{
"$ref": "#/components/schemas/NullEnum"
}
],
"title": "Custom status key"
},
"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"
}
],
"readOnly": true,
"title": "Supplier Part"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"tracking_items": {
"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": [
"MPN",
"SKU",
"allocated",
"barcode_hash",
"child_items",
"expired",
"in_stock",
"installed_items",
"location_detail",
"parent",
"part",
"part_detail",
"pk",
"purchase_order_reference",
"quantity",
"sales_order_reference",
"stale",
"status_text",
"stocktake_date",
"supplier_part_detail",
"tracking_items",
"updated"
],
"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 |
---|---|---|---|---|---|
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": null
}
],
"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": null
}
],
"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": null
}
],
"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"
}
Response 201 Created
{
"items": [
{
"batch": "string",
"packaging": "string",
"pk": 0,
"quantity": "string",
"status": null
}
],
"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 |
---|---|---|---|---|---|
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"
}
Response 201 Created
{
"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 |
---|---|---|---|---|---|
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": null
}
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": {
"allOf": [
{
"$ref": "#/components/schemas/Status2a7Enum"
}
],
"default": 10
}
},
"required": [
"items"
],
"type": "object"
}
{
"items": [
0
],
"note": "string",
"status": null
}
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": {
"allOf": [
{
"$ref": "#/components/schemas/Status2a7Enum"
}
],
"default": 10
}
},
"required": [
"items"
],
"type": "object"
}
{
"items": [
0
],
"note": "string",
"status": null
}
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": {
"allOf": [
{
"$ref": "#/components/schemas/Status2a7Enum"
}
],
"default": 10
}
},
"required": [
"items"
],
"type": "object"
}
Response 201 Created
{
"items": [
0
],
"note": "string",
"status": null
}
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": {
"allOf": [
{
"$ref": "#/components/schemas/Status2a7Enum"
}
],
"default": 10
}
},
"required": [
"items"
],
"type": "object"
}
POST /api/stock/count/¶
Description
Endpoint for counting stock (performing a stocktake).
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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": null
}
],
"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": null
}
],
"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": null
}
],
"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"
}
Response 201 Created
{
"items": [
{
"batch": "string",
"packaging": "string",
"pk": 0,
"quantity": "string",
"status": null
}
],
"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 |
---|---|---|---|---|---|
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. |
Response 200 OK
{
"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"
}
},
"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 |
---|---|---|---|---|---|
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": {
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"required": [
"location_count",
"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": {
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"required": [
"location_count",
"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": {
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"required": [
"location_count",
"name",
"pk"
],
"type": "object"
}
Response 201 Created
{
"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": {
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"required": [
"location_count",
"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 |
---|---|---|---|---|---|
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 |
Response 204 No Content
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 |
---|---|---|---|---|---|
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 |
Response 200 OK
{
"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": {
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"required": [
"location_count",
"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 |
---|---|---|---|---|---|
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": {
"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": {
"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": {
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"type": "object"
}
Response 200 OK
{
"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": {
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"required": [
"location_count",
"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 |
---|---|---|---|---|---|
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": {
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"required": [
"location_count",
"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": {
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"required": [
"location_count",
"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": {
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"required": [
"location_count",
"name",
"pk"
],
"type": "object"
}
Response 200 OK
{
"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": {
"readOnly": true,
"type": "integer"
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"pk": {
"readOnly": true,
"title": "ID",
"type": "integer"
}
},
"required": [
"location_count",
"name",
"pk"
],
"type": "object"
}
GET /api/stock/location-type/{id}/metadata/¶
Description
Generic API endpoint for reading and editing metadata for a model.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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 |
Response 200 OK
{
"metadata": null
}
Schema of the response body
{
"description": "Serializer class for model metadata API access.",
"properties": {
"metadata": {}
},
"required": [
"metadata"
],
"type": "object"
}
PATCH /api/stock/location-type/{id}/metadata/¶
Description
Generic API endpoint for reading and editing metadata for a model.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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
{
"metadata": null
}
Schema of the request body
{
"description": "Serializer class for model metadata API access.",
"properties": {
"metadata": {}
},
"type": "object"
}
{
"metadata": null
}
Schema of the request body
{
"description": "Serializer class for model metadata API access.",
"properties": {
"metadata": {}
},
"type": "object"
}
{
"metadata": null
}
Schema of the request body
{
"description": "Serializer class for model metadata API access.",
"properties": {
"metadata": {}
},
"type": "object"
}
Response 200 OK
{
"metadata": null
}
Schema of the response body
{
"description": "Serializer class for model metadata API access.",
"properties": {
"metadata": {}
},
"required": [
"metadata"
],
"type": "object"
}
PUT /api/stock/location-type/{id}/metadata/¶
Description
Generic API endpoint for reading and editing metadata for a model.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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
{
"metadata": null
}
Schema of the request body
{
"description": "Serializer class for model metadata API access.",
"properties": {
"metadata": {}
},
"required": [
"metadata"
],
"type": "object"
}
{
"metadata": null
}
Schema of the request body
{
"description": "Serializer class for model metadata API access.",
"properties": {
"metadata": {}
},
"required": [
"metadata"
],
"type": "object"
}
{
"metadata": null
}
Schema of the request body
{
"description": "Serializer class for model metadata API access.",
"properties": {
"metadata": {}
},
"required": [
"metadata"
],
"type": "object"
}
Response 200 OK
{
"metadata": null
}
Schema of the response body
{
"description": "Serializer class for model metadata API access.",
"properties": {
"metadata": {}
},
"required": [
"metadata"
],
"type": "object"
}
GET /api/stock/location/¶
Description
Override the 'get' method to check for the export query parameter.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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 | |
search |
query | string | No | A search term. | |
structural |
query | boolean | No | ||
top_level |
query | boolean | No | Filter by top-level locations |
Response 200 OK
{
"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,
"parent": 0,
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
],
"url": "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"
}
},
"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 |
---|---|---|---|---|---|
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,
"parent": 0,
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
],
"url": "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,
"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"
}
],
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"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"
},
"url": {
"readOnly": true,
"type": "string"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"location_type_detail",
"name",
"pathstring",
"pk",
"sublocations",
"url"
],
"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,
"parent": 0,
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
],
"url": "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,
"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"
}
],
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"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"
},
"url": {
"readOnly": true,
"type": "string"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"location_type_detail",
"name",
"pathstring",
"pk",
"sublocations",
"url"
],
"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,
"parent": 0,
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
],
"url": "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,
"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"
}
],
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"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"
},
"url": {
"readOnly": true,
"type": "string"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"location_type_detail",
"name",
"pathstring",
"pk",
"sublocations",
"url"
],
"type": "object"
}
Response 201 Created
{
"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,
"parent": 0,
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
],
"url": "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,
"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"
}
],
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"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"
},
"url": {
"readOnly": true,
"type": "string"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"location_type_detail",
"name",
"pathstring",
"pk",
"sublocations",
"url"
],
"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 |
---|---|---|---|---|---|
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. |
Response 200 OK
{
"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"
}
},
"type": "object"
}
DELETE /api/stock/location/{id}/¶
Description
Custom delete method to pass kwargs.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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 |
Response 204 No Content
GET /api/stock/location/{id}/¶
Description
Custom get method to pass kwargs.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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 |
Response 200 OK
{
"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,
"parent": 0,
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
],
"url": "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,
"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"
}
],
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"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"
},
"url": {
"readOnly": true,
"type": "string"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"location_type_detail",
"name",
"pathstring",
"pk",
"sublocations",
"url"
],
"type": "object"
}
PATCH /api/stock/location/{id}/¶
Description
Custom patch method to pass kwargs.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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,
"parent": 0,
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
],
"url": "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,
"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"
}
],
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"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"
},
"url": {
"readOnly": true,
"type": "string"
}
},
"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,
"parent": 0,
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
],
"url": "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,
"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"
}
],
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"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"
},
"url": {
"readOnly": true,
"type": "string"
}
},
"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,
"parent": 0,
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
],
"url": "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,
"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"
}
],
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"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"
},
"url": {
"readOnly": true,
"type": "string"
}
},
"type": "object"
}
Response 200 OK
{
"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,
"parent": 0,
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
],
"url": "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,
"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"
}
],
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"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"
},
"url": {
"readOnly": true,
"type": "string"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"location_type_detail",
"name",
"pathstring",
"pk",
"sublocations",
"url"
],
"type": "object"
}
PUT /api/stock/location/{id}/¶
Description
Custom put method to pass kwargs.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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,
"parent": 0,
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
],
"url": "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,
"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"
}
],
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"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"
},
"url": {
"readOnly": true,
"type": "string"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"location_type_detail",
"name",
"pathstring",
"pk",
"sublocations",
"url"
],
"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,
"parent": 0,
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
],
"url": "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,
"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"
}
],
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"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"
},
"url": {
"readOnly": true,
"type": "string"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"location_type_detail",
"name",
"pathstring",
"pk",
"sublocations",
"url"
],
"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,
"parent": 0,
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
],
"url": "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,
"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"
}
],
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"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"
},
"url": {
"readOnly": true,
"type": "string"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"location_type_detail",
"name",
"pathstring",
"pk",
"sublocations",
"url"
],
"type": "object"
}
Response 200 OK
{
"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,
"parent": 0,
"pathstring": "string",
"pk": 0,
"structural": true,
"sublocations": 0,
"tags": [
"string"
],
"url": "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,
"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"
}
],
"readOnly": true
},
"name": {
"description": "Name",
"maxLength": 100,
"type": "string"
},
"owner": {
"description": "Select Owner",
"nullable": true,
"type": "integer"
},
"parent": {
"description": "Parent stock location",
"nullable": true,
"title": "Parent Location",
"type": "integer"
},
"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"
},
"url": {
"readOnly": true,
"type": "string"
}
},
"required": [
"barcode_hash",
"icon",
"items",
"level",
"location_type_detail",
"name",
"pathstring",
"pk",
"sublocations",
"url"
],
"type": "object"
}
GET /api/stock/location/{id}/metadata/¶
Description
Generic API endpoint for reading and editing metadata for a model.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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 |
Response 200 OK
{
"metadata": null
}
Schema of the response body
{
"description": "Serializer class for model metadata API access.",
"properties": {
"metadata": {}
},
"required": [
"metadata"
],
"type": "object"
}
PATCH /api/stock/location/{id}/metadata/¶
Description
Generic API endpoint for reading and editing metadata for a model.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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
{
"metadata": null
}
Schema of the request body
{
"description": "Serializer class for model metadata API access.",
"properties": {
"metadata": {}
},
"type": "object"
}
{
"metadata": null
}
Schema of the request body
{
"description": "Serializer class for model metadata API access.",
"properties": {
"metadata": {}
},
"type": "object"
}
{
"metadata": null
}
Schema of the request body
{
"description": "Serializer class for model metadata API access.",
"properties": {
"metadata": {}
},
"type": "object"
}
Response 200 OK
{
"metadata": null
}
Schema of the response body
{
"description": "Serializer class for model metadata API access.",
"properties": {
"metadata": {}
},
"required": [
"metadata"
],
"type": "object"
}
PUT /api/stock/location/{id}/metadata/¶
Description
Generic API endpoint for reading and editing metadata for a model.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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
{
"metadata": null
}
Schema of the request body
{
"description": "Serializer class for model metadata API access.",
"properties": {
"metadata": {}
},
"required": [
"metadata"
],
"type": "object"
}
{
"metadata": null
}
Schema of the request body
{
"description": "Serializer class for model metadata API access.",
"properties": {
"metadata": {}
},
"required": [
"metadata"
],
"type": "object"
}
{
"metadata": null
}
Schema of the request body
{
"description": "Serializer class for model metadata API access.",
"properties": {
"metadata": {}
},
"required": [
"metadata"
],
"type": "object"
}
Response 200 OK
{
"metadata": null
}
Schema of the response body
{
"description": "Serializer class for model metadata API access.",
"properties": {
"metadata": {}
},
"required": [
"metadata"
],
"type": "object"
}
POST /api/stock/merge/¶
Description
API endpoint for merging multiple stock items.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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"
}
Response 201 Created
{
"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 |
---|---|---|---|---|---|
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": null
}
],
"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": null
}
],
"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": null
}
],
"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"
}
Response 201 Created
{
"items": [
{
"batch": "string",
"packaging": "string",
"pk": 0,
"quantity": "string",
"status": null
}
],
"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"
}
GET /api/stock/status/¶
Description
Retrieve information about a specific status code
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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" |
Response 200 OK
{
"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"
}
Response 400 Bad Request
DELETE /api/stock/test/¶
Description
Perform a DELETE operation against this list endpoint.
We expect a list of primary-key (ID) values to be supplied as a JSON object, e.g. { items: [4, 8, 15, 16, 23, 42] }
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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" |
Response 204 No Content
GET /api/stock/test/¶
Description
API endpoint for listing (and creating) a StockItemTestResult object.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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 | |
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. | |
template |
query | integer | No | ||
test |
query | string | No | Test name (case insensitive) | |
user |
query | integer | No | ||
value |
query | string | No |
Response 200 OK
{
"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,
"test_station": "string",
"user": 0,
"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"
}
},
"type": "object"
}
POST /api/stock/test/¶
Description
API endpoint for listing (and creating) a StockItemTestResult object.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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,
"test_station": "string",
"user": 0,
"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"
},
"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"
},
"value": {
"description": "Test output value",
"maxLength": 500,
"type": "string"
}
},
"required": [
"date",
"pk",
"stock_item",
"user"
],
"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,
"test_station": "string",
"user": 0,
"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"
},
"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"
},
"value": {
"description": "Test output value",
"maxLength": 500,
"type": "string"
}
},
"required": [
"date",
"pk",
"stock_item",
"user"
],
"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,
"test_station": "string",
"user": 0,
"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"
},
"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"
},
"value": {
"description": "Test output value",
"maxLength": 500,
"type": "string"
}
},
"required": [
"date",
"pk",
"stock_item",
"user"
],
"type": "object"
}
Response 201 Created
{
"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,
"test_station": "string",
"user": 0,
"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"
},
"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"
},
"value": {
"description": "Test output value",
"maxLength": 500,
"type": "string"
}
},
"required": [
"date",
"pk",
"stock_item",
"user"
],
"type": "object"
}
DELETE /api/stock/test/{id}/¶
Description
Detail endpoint for StockItemTestResult.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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 |
Response 204 No Content
GET /api/stock/test/{id}/¶
Description
Detail endpoint for StockItemTestResult.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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 |
Response 200 OK
{
"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,
"test_station": "string",
"user": 0,
"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"
},
"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"
},
"value": {
"description": "Test output value",
"maxLength": 500,
"type": "string"
}
},
"required": [
"date",
"pk",
"stock_item",
"user"
],
"type": "object"
}
PATCH /api/stock/test/{id}/¶
Description
Detail endpoint for StockItemTestResult.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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,
"test_station": "string",
"user": 0,
"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"
},
"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"
},
"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,
"test_station": "string",
"user": 0,
"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"
},
"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"
},
"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,
"test_station": "string",
"user": 0,
"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"
},
"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"
},
"value": {
"description": "Test output value",
"maxLength": 500,
"type": "string"
}
},
"type": "object"
}
Response 200 OK
{
"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,
"test_station": "string",
"user": 0,
"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"
},
"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"
},
"value": {
"description": "Test output value",
"maxLength": 500,
"type": "string"
}
},
"required": [
"date",
"pk",
"stock_item",
"user"
],
"type": "object"
}
PUT /api/stock/test/{id}/¶
Description
Detail endpoint for StockItemTestResult.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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,
"test_station": "string",
"user": 0,
"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"
},
"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"
},
"value": {
"description": "Test output value",
"maxLength": 500,
"type": "string"
}
},
"required": [
"date",
"pk",
"stock_item",
"user"
],
"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,
"test_station": "string",
"user": 0,
"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",