Skip to content

The Stock and Stock Locations section of the InvenTree API schema is documented below.

InvenTree API 435

API for InvenTree - the intuitive open source inventory management system


License: MIT

Servers

Description URL
http://localhost:8000 http://localhost:8000

stock


DELETE /api/stock/

Description

Perform a DELETE operation against this list endpoint.

Note that the typical DRF list endpoint does not support DELETE, so this method is provided as a custom implementation.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"

Request body

{
    "filters": {},
    "items": [
        0
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Parameters for selecting items for bulk operations.",
    "properties": {
        "filters": {
            "additionalProperties": {},
            "title": "A dictionary of filter values",
            "type": "object"
        },
        "items": {
            "items": {
                "type": "integer"
            },
            "title": "A list of primary key values",
            "type": "array"
        }
    },
    "type": "object"
}

{
    "filters": {},
    "items": [
        0
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Parameters for selecting items for bulk operations.",
    "properties": {
        "filters": {
            "additionalProperties": {},
            "title": "A dictionary of filter values",
            "type": "object"
        },
        "items": {
            "items": {
                "type": "integer"
            },
            "title": "A list of primary key values",
            "type": "array"
        }
    },
    "type": "object"
}

{
    "filters": {},
    "items": [
        0
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Parameters for selecting items for bulk operations.",
    "properties": {
        "filters": {
            "additionalProperties": {},
            "title": "A dictionary of filter values",
            "type": "object"
        },
        "items": {
            "items": {
                "type": "integer"
            },
            "title": "A list of primary key values",
            "type": "array"
        }
    },
    "type": "object"
}

Response 204 No Content


GET /api/stock/

Description

Override the GET method to determine export options.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
active query boolean No Active
allocated query boolean No Is Allocated
ancestor query integer No
assembly query boolean No Assembly
available query boolean No Available
batch query string No Batch code filter (case insensitive)
batch_regex query string No Batch code filter (regex)
belongs_to query integer No
bom_item query integer No
build query integer No
cascade query boolean No If true, include items in child locations of the given location
category query integer No
company query integer No
consumed query boolean No Consumed by Build Order
consumed_by query integer No
customer query integer No
depleted query boolean No Depleted
exclude_tree query number No Provide a StockItem PK to exclude that item and all its descendants
expired query boolean No Expired
expiry_after query string No Expiry date after
expiry_before query string No Expiry date before
external query boolean No External Location
has_batch query boolean No Has batch code
has_child_items query boolean No Has child items
has_installed_items query boolean No Has installed items
has_purchase_price query boolean No Has purchase price
in_stock query boolean No In Stock
include_variants query boolean No Include Variants
installed query boolean No Installed in other stock item
IPN query string No Part IPN (case insensitive)
IPN_contains query string No Part IPN contains (case insensitive)
IPN_regex query string No Part IPN (regex)
is_building query boolean No In production
limit query integer No Number of results to return per page.
location query integer No Filter by numeric Location ID or the literal 'null'
location_detail query boolean False No Include detailed information about the stock location in the response
manufacturer query integer No
manufacturer_part query integer No Manufacturer Part
max_stock query number No Maximum stock
min_stock query number No Minimum stock
name query string No Part name (case insensitive)
name_contains query string No Part name contains (case insensitive)
name_regex query string No Part name (regex)
offset query integer No The initial index from which to return the results.
ordering query string No Which field to use when ordering the results.
part query integer No Part
part_detail query boolean True No Include detailed information about the related part in the response
part_tree query integer No
path_detail query boolean False No
purchase_order query integer No
salable query boolean No Salable
sales_order query integer No
search query string No A search term. Searched fields: batch, location__name, part__IPN, part__description, part__name, serial, supplier_part__SKU, supplier_part__manufacturer_part__MPN, supplier_part__manufacturer_part__manufacturer__name, supplier_part__supplier__name, tags__name, tags__slug.
sent_to_customer query boolean No Sent to customer
serial query string No Serial number
serial_gte query integer No Serial number GTE
serial_lte query integer No Serial number LTE
serialized query boolean No Has serial number
stale query boolean No Stale
status query integer No Status Code
stocktake_after query string No Stocktake After
stocktake_before query string No Stocktake Before
supplier query integer No Supplier
supplier_part query integer No
supplier_part_detail query boolean False No
tags__name query string No
tags__slug query string No
tests query boolean False No
tracked query boolean No Tracked
updated_after query string No Updated after
updated_before query string No Updated before

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,
            "location_path": [
                {}
            ],
            "notes": "string",
            "owner": 0,
            "packaging": "string",
            "parent": 0,
            "part": 0,
            "part_detail": null,
            "pk": 0,
            "purchase_order": 0,
            "purchase_order_reference": "string",
            "purchase_price": "string",
            "purchase_price_currency": "string",
            "quantity": 10.12,
            "sales_order": 0,
            "sales_order_reference": "string",
            "serial": "string",
            "serial_numbers": "string",
            "stale": true,
            "status": null,
            "status_custom_key": 0,
            "status_text": "string",
            "stocktake_date": "2022-04-13",
            "supplier_part": 0,
            "supplier_part_detail": null,
            "tags": [
                "string"
            ],
            "tests": [
                {
                    "attachment": "string",
                    "date": "2022-04-13T15:42:05.901Z",
                    "finished_datetime": "2022-04-13T15:42:05.901Z",
                    "notes": "string",
                    "pk": 0,
                    "result": true,
                    "started_datetime": "2022-04-13T15:42:05.901Z",
                    "stock_item": 0,
                    "template": 0,
                    "template_detail": null,
                    "test_station": "string",
                    "user": 0,
                    "user_detail": null,
                    "value": "string"
                }
            ],
            "tracking_items": 0,
            "updated": "2022-04-13T15:42:05.901Z",
            "use_pack_size": true
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "count": {
            "example": 123,
            "type": "integer"
        },
        "next": {
            "example": "http://api.example.org/accounts/?offset=400&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "previous": {
            "example": "http://api.example.org/accounts/?offset=200&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "results": {
            "items": {
                "$ref": "#/components/schemas/StockItem"
            },
            "type": "array"
        }
    },
    "required": [
        "count",
        "results"
    ],
    "type": "object"
}

POST /api/stock/

Description

API endpoint for list view of Stock objects.

  • GET: Return a list of all StockItem objects (with optional query filters)
  • POST: Create a new StockItem
  • DELETE: Delete multiple StockItem objects

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"

Request body

{
    "MPN": "string",
    "SKU": "string",
    "allocated": 10.12,
    "barcode_hash": "string",
    "batch": "string",
    "belongs_to": 0,
    "build": 0,
    "child_items": 0,
    "consumed_by": 0,
    "customer": 0,
    "delete_on_deplete": true,
    "expired": true,
    "expiry_date": "2022-04-13",
    "in_stock": true,
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "location_detail": null,
    "location_path": [
        {}
    ],
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "parent": 0,
    "part": 0,
    "part_detail": null,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": "string",
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "serial_numbers": "string",
    "stale": true,
    "status": null,
    "status_custom_key": 0,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "supplier_part_detail": null,
    "tags": [
        "string"
    ],
    "tests": [
        {
            "attachment": "string",
            "date": "2022-04-13T15:42:05.901Z",
            "finished_datetime": "2022-04-13T15:42:05.901Z",
            "notes": "string",
            "pk": 0,
            "result": true,
            "started_datetime": "2022-04-13T15:42:05.901Z",
            "stock_item": 0,
            "template": 0,
            "template_detail": null,
            "test_station": "string",
            "user": 0,
            "user_detail": null,
            "value": "string"
        }
    ],
    "tracking_items": 0,
    "updated": "2022-04-13T15:42:05.901Z",
    "use_pack_size": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
    "properties": {
        "MPN": {
            "nullable": true,
            "readOnly": true,
            "title": "Manufacturer Part Number",
            "type": "string"
        },
        "SKU": {
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part Number",
            "type": "string"
        },
        "allocated": {
            "format": "double",
            "nullable": true,
            "readOnly": true,
            "title": "Allocated Quantity",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "in_stock": {
            "readOnly": true,
            "type": "boolean"
        },
        "installed_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 2000,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "location_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/LocationBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Location"
        },
        "location_path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "notes": {
            "description": "Markdown notes (optional)",
            "maxLength": 50000,
            "nullable": true,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "packaging": {
            "description": "Packaging this stock item is stored in",
            "maxLength": 50,
            "nullable": true,
            "type": "string"
        },
        "parent": {
            "description": "Parent stock item",
            "readOnly": true,
            "title": "Parent Item",
            "type": "integer"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Part"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
            "title": "Currency",
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "serial_numbers": {
            "description": "Enter serial numbers for new items",
            "nullable": true,
            "type": "string",
            "writeOnly": true
        },
        "stale": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockItemStatusEnum"
                }
            ],
            "maximum": 9223372036854775807,
            "minimum": 0
        },
        "status_custom_key": {
            "description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
            "nullable": true,
            "title": "Custom status key",
            "type": "integer"
        },
        "status_text": {
            "readOnly": true,
            "title": "Status",
            "type": "string"
        },
        "stocktake_date": {
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "supplier_part": {
            "description": "Select a matching supplier part for this stock item",
            "nullable": true,
            "type": "integer"
        },
        "supplier_part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SupplierPart"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tests": {
            "items": {
                "$ref": "#/components/schemas/StockItemTestResult"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "tracking_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "required": [
        "barcode_hash",
        "in_stock",
        "parent",
        "part",
        "pk",
        "quantity",
        "status_text"
    ],
    "type": "object"
}

{
    "MPN": "string",
    "SKU": "string",
    "allocated": 10.12,
    "barcode_hash": "string",
    "batch": "string",
    "belongs_to": 0,
    "build": 0,
    "child_items": 0,
    "consumed_by": 0,
    "customer": 0,
    "delete_on_deplete": true,
    "expired": true,
    "expiry_date": "2022-04-13",
    "in_stock": true,
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "location_detail": null,
    "location_path": [
        {}
    ],
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "parent": 0,
    "part": 0,
    "part_detail": null,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": "string",
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "serial_numbers": "string",
    "stale": true,
    "status": null,
    "status_custom_key": 0,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "supplier_part_detail": null,
    "tags": [
        "string"
    ],
    "tests": [
        {
            "attachment": "string",
            "date": "2022-04-13T15:42:05.901Z",
            "finished_datetime": "2022-04-13T15:42:05.901Z",
            "notes": "string",
            "pk": 0,
            "result": true,
            "started_datetime": "2022-04-13T15:42:05.901Z",
            "stock_item": 0,
            "template": 0,
            "template_detail": null,
            "test_station": "string",
            "user": 0,
            "user_detail": null,
            "value": "string"
        }
    ],
    "tracking_items": 0,
    "updated": "2022-04-13T15:42:05.901Z",
    "use_pack_size": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
    "properties": {
        "MPN": {
            "nullable": true,
            "readOnly": true,
            "title": "Manufacturer Part Number",
            "type": "string"
        },
        "SKU": {
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part Number",
            "type": "string"
        },
        "allocated": {
            "format": "double",
            "nullable": true,
            "readOnly": true,
            "title": "Allocated Quantity",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "in_stock": {
            "readOnly": true,
            "type": "boolean"
        },
        "installed_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 2000,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "location_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/LocationBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Location"
        },
        "location_path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "notes": {
            "description": "Markdown notes (optional)",
            "maxLength": 50000,
            "nullable": true,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "packaging": {
            "description": "Packaging this stock item is stored in",
            "maxLength": 50,
            "nullable": true,
            "type": "string"
        },
        "parent": {
            "description": "Parent stock item",
            "readOnly": true,
            "title": "Parent Item",
            "type": "integer"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Part"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
            "title": "Currency",
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "serial_numbers": {
            "description": "Enter serial numbers for new items",
            "nullable": true,
            "type": "string",
            "writeOnly": true
        },
        "stale": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockItemStatusEnum"
                }
            ],
            "maximum": 9223372036854775807,
            "minimum": 0
        },
        "status_custom_key": {
            "description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
            "nullable": true,
            "title": "Custom status key",
            "type": "integer"
        },
        "status_text": {
            "readOnly": true,
            "title": "Status",
            "type": "string"
        },
        "stocktake_date": {
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "supplier_part": {
            "description": "Select a matching supplier part for this stock item",
            "nullable": true,
            "type": "integer"
        },
        "supplier_part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SupplierPart"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tests": {
            "items": {
                "$ref": "#/components/schemas/StockItemTestResult"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "tracking_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "required": [
        "barcode_hash",
        "in_stock",
        "parent",
        "part",
        "pk",
        "quantity",
        "status_text"
    ],
    "type": "object"
}

{
    "MPN": "string",
    "SKU": "string",
    "allocated": 10.12,
    "barcode_hash": "string",
    "batch": "string",
    "belongs_to": 0,
    "build": 0,
    "child_items": 0,
    "consumed_by": 0,
    "customer": 0,
    "delete_on_deplete": true,
    "expired": true,
    "expiry_date": "2022-04-13",
    "in_stock": true,
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "location_detail": null,
    "location_path": [
        {}
    ],
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "parent": 0,
    "part": 0,
    "part_detail": null,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": "string",
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "serial_numbers": "string",
    "stale": true,
    "status": null,
    "status_custom_key": 0,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "supplier_part_detail": null,
    "tags": [
        "string"
    ],
    "tests": [
        {
            "attachment": "string",
            "date": "2022-04-13T15:42:05.901Z",
            "finished_datetime": "2022-04-13T15:42:05.901Z",
            "notes": "string",
            "pk": 0,
            "result": true,
            "started_datetime": "2022-04-13T15:42:05.901Z",
            "stock_item": 0,
            "template": 0,
            "template_detail": null,
            "test_station": "string",
            "user": 0,
            "user_detail": null,
            "value": "string"
        }
    ],
    "tracking_items": 0,
    "updated": "2022-04-13T15:42:05.901Z",
    "use_pack_size": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
    "properties": {
        "MPN": {
            "nullable": true,
            "readOnly": true,
            "title": "Manufacturer Part Number",
            "type": "string"
        },
        "SKU": {
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part Number",
            "type": "string"
        },
        "allocated": {
            "format": "double",
            "nullable": true,
            "readOnly": true,
            "title": "Allocated Quantity",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "in_stock": {
            "readOnly": true,
            "type": "boolean"
        },
        "installed_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 2000,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "location_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/LocationBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Location"
        },
        "location_path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "notes": {
            "description": "Markdown notes (optional)",
            "maxLength": 50000,
            "nullable": true,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "packaging": {
            "description": "Packaging this stock item is stored in",
            "maxLength": 50,
            "nullable": true,
            "type": "string"
        },
        "parent": {
            "description": "Parent stock item",
            "readOnly": true,
            "title": "Parent Item",
            "type": "integer"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Part"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
            "title": "Currency",
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "serial_numbers": {
            "description": "Enter serial numbers for new items",
            "nullable": true,
            "type": "string",
            "writeOnly": true
        },
        "stale": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockItemStatusEnum"
                }
            ],
            "maximum": 9223372036854775807,
            "minimum": 0
        },
        "status_custom_key": {
            "description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
            "nullable": true,
            "title": "Custom status key",
            "type": "integer"
        },
        "status_text": {
            "readOnly": true,
            "title": "Status",
            "type": "string"
        },
        "stocktake_date": {
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "supplier_part": {
            "description": "Select a matching supplier part for this stock item",
            "nullable": true,
            "type": "integer"
        },
        "supplier_part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SupplierPart"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tests": {
            "items": {
                "$ref": "#/components/schemas/StockItemTestResult"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "tracking_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "required": [
        "barcode_hash",
        "in_stock",
        "parent",
        "part",
        "pk",
        "quantity",
        "status_text"
    ],
    "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,
        "location_path": [
            {}
        ],
        "notes": "string",
        "owner": 0,
        "packaging": "string",
        "parent": 0,
        "part": 0,
        "part_detail": null,
        "pk": 0,
        "purchase_order": 0,
        "purchase_order_reference": "string",
        "purchase_price": "string",
        "purchase_price_currency": "string",
        "quantity": 10.12,
        "sales_order": 0,
        "sales_order_reference": "string",
        "serial": "string",
        "serial_numbers": "string",
        "stale": true,
        "status": null,
        "status_custom_key": 0,
        "status_text": "string",
        "stocktake_date": "2022-04-13",
        "supplier_part": 0,
        "supplier_part_detail": null,
        "tags": [
            "string"
        ],
        "tests": [
            {
                "attachment": "string",
                "date": "2022-04-13T15:42:05.901Z",
                "finished_datetime": "2022-04-13T15:42:05.901Z",
                "notes": "string",
                "pk": 0,
                "result": true,
                "started_datetime": "2022-04-13T15:42:05.901Z",
                "stock_item": 0,
                "template": 0,
                "template_detail": null,
                "test_station": "string",
                "user": 0,
                "user_detail": null,
                "value": "string"
            }
        ],
        "tracking_items": 0,
        "updated": "2022-04-13T15:42:05.901Z",
        "use_pack_size": true
    }
]
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "items": {
        "$ref": "#/components/schemas/StockItem"
    },
    "type": "array"
}

POST /api/stock/add/

Description

Endpoint for adding a quantity of stock to an existing StockItem.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"

Request body

{
    "items": [
        {
            "batch": "string",
            "packaging": "string",
            "pk": 0,
            "quantity": "string",
            "status": 0
        }
    ],
    "notes": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for adding stock to stock item(s).",
    "properties": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/StockAdjustmentItem"
            },
            "type": "array"
        },
        "notes": {
            "description": "Stock transaction notes",
            "type": "string"
        }
    },
    "required": [
        "items"
    ],
    "type": "object"
}

{
    "items": [
        {
            "batch": "string",
            "packaging": "string",
            "pk": 0,
            "quantity": "string",
            "status": 0
        }
    ],
    "notes": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for adding stock to stock item(s).",
    "properties": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/StockAdjustmentItem"
            },
            "type": "array"
        },
        "notes": {
            "description": "Stock transaction notes",
            "type": "string"
        }
    },
    "required": [
        "items"
    ],
    "type": "object"
}

{
    "items": [
        {
            "batch": "string",
            "packaging": "string",
            "pk": 0,
            "quantity": "string",
            "status": 0
        }
    ],
    "notes": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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": 0
        }
    ],
    "notes": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer for adding stock to stock item(s).",
    "properties": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/StockAdjustmentItem"
            },
            "type": "array"
        },
        "notes": {
            "description": "Stock transaction notes",
            "type": "string"
        }
    },
    "required": [
        "items"
    ],
    "type": "object"
}

POST /api/stock/assign/

Description

API endpoint for assigning stock to a particular customer.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"

Request body

{
    "customer": 0,
    "items": [
        {
            "item": 0
        }
    ],
    "notes": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer for assigning one (or more) stock items to a customer.\n\nThis is a manual assignment process, separate for (for example) a Sales Order",
    "properties": {
        "customer": {
            "description": "Customer to assign stock items",
            "type": "integer"
        },
        "items": {
            "items": {
                "$ref": "#/components/schemas/StockAssignmentItem"
            },
            "type": "array"
        },
        "notes": {
            "description": "Stock assignment notes",
            "type": "string"
        }
    },
    "required": [
        "customer",
        "items"
    ],
    "type": "object"
}

POST /api/stock/change_status/

Description

API endpoint to change the status code of multiple StockItem objects.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"

Request body

{
    "items": [
        0
    ],
    "note": "string",
    "status": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for changing status of multiple StockItem objects.",
    "properties": {
        "items": {
            "description": "Select stock items to change status",
            "items": {
                "title": "Stock Items",
                "type": "integer"
            },
            "title": "Stock Items",
            "type": "array"
        },
        "note": {
            "description": "Add transaction note (optional)",
            "title": "Notes",
            "type": "string"
        },
        "status": {
            "default": 10,
            "description": "Stock item status code\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the 'stock_status_retrieve' call.",
            "type": "integer"
        }
    },
    "required": [
        "items"
    ],
    "type": "object"
}

{
    "items": [
        0
    ],
    "note": "string",
    "status": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for changing status of multiple StockItem objects.",
    "properties": {
        "items": {
            "description": "Select stock items to change status",
            "items": {
                "title": "Stock Items",
                "type": "integer"
            },
            "title": "Stock Items",
            "type": "array"
        },
        "note": {
            "description": "Add transaction note (optional)",
            "title": "Notes",
            "type": "string"
        },
        "status": {
            "default": 10,
            "description": "Stock item status code\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the 'stock_status_retrieve' call.",
            "type": "integer"
        }
    },
    "required": [
        "items"
    ],
    "type": "object"
}

{
    "items": [
        0
    ],
    "note": "string",
    "status": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for changing status of multiple StockItem objects.",
    "properties": {
        "items": {
            "description": "Select stock items to change status",
            "items": {
                "title": "Stock Items",
                "type": "integer"
            },
            "title": "Stock Items",
            "type": "array"
        },
        "note": {
            "description": "Add transaction note (optional)",
            "title": "Notes",
            "type": "string"
        },
        "status": {
            "default": 10,
            "description": "Stock item status code\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the 'stock_status_retrieve' call.",
            "type": "integer"
        }
    },
    "required": [
        "items"
    ],
    "type": "object"
}

Response 201 Created

{
    "items": [
        0
    ],
    "note": "string",
    "status": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer for changing status of multiple StockItem objects.",
    "properties": {
        "items": {
            "description": "Select stock items to change status",
            "items": {
                "title": "Stock Items",
                "type": "integer"
            },
            "title": "Stock Items",
            "type": "array"
        },
        "note": {
            "description": "Add transaction note (optional)",
            "title": "Notes",
            "type": "string"
        },
        "status": {
            "default": 10,
            "description": "Stock item status code\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the 'stock_status_retrieve' call.",
            "type": "integer"
        }
    },
    "required": [
        "items"
    ],
    "type": "object"
}

POST /api/stock/count/

Description

Endpoint for counting stock (performing a stocktake).

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"

Request body

{
    "items": [
        {
            "batch": "string",
            "packaging": "string",
            "pk": 0,
            "quantity": "string",
            "status": 0
        }
    ],
    "notes": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for counting stock items.",
    "properties": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/StockAdjustmentItem"
            },
            "type": "array"
        },
        "notes": {
            "description": "Stock transaction notes",
            "type": "string"
        }
    },
    "required": [
        "items"
    ],
    "type": "object"
}

{
    "items": [
        {
            "batch": "string",
            "packaging": "string",
            "pk": 0,
            "quantity": "string",
            "status": 0
        }
    ],
    "notes": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for counting stock items.",
    "properties": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/StockAdjustmentItem"
            },
            "type": "array"
        },
        "notes": {
            "description": "Stock transaction notes",
            "type": "string"
        }
    },
    "required": [
        "items"
    ],
    "type": "object"
}

{
    "items": [
        {
            "batch": "string",
            "packaging": "string",
            "pk": 0,
            "quantity": "string",
            "status": 0
        }
    ],
    "notes": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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": 0
        }
    ],
    "notes": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer for counting stock items.",
    "properties": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/StockAdjustmentItem"
            },
            "type": "array"
        },
        "notes": {
            "description": "Stock transaction notes",
            "type": "string"
        }
    },
    "required": [
        "items"
    ],
    "type": "object"
}

GET /api/stock/location-type/

Description

API endpoint for a list of StockLocationType objects.

  • GET: Return a list of all StockLocationType objects
  • POST: Create a StockLocationType

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
limit query integer No Number of results to return per page.
offset query integer No The initial index from which to return the results.
ordering query string No Which field to use when ordering the results.
search query string No A search term. Searched fields: name.

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
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "count": {
            "example": 123,
            "type": "integer"
        },
        "next": {
            "example": "http://api.example.org/accounts/?offset=400&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "previous": {
            "example": "http://api.example.org/accounts/?offset=200&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "results": {
            "items": {
                "$ref": "#/components/schemas/StockLocationType"
            },
            "type": "array"
        }
    },
    "required": [
        "count",
        "results"
    ],
    "type": "object"
}

POST /api/stock/location-type/

Description

API endpoint for a list of StockLocationType objects.

  • GET: Return a list of all StockLocationType objects
  • POST: Create a StockLocationType

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"

Request body

{
    "description": "string",
    "icon": "string",
    "location_count": 0,
    "name": "string",
    "pk": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for StockLocationType model.",
    "properties": {
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "icon": {
            "description": "Default icon for all locations that have no icon set (optional)",
            "maxLength": 100,
            "type": "string"
        },
        "location_count": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "name",
        "pk"
    ],
    "type": "object"
}

{
    "description": "string",
    "icon": "string",
    "location_count": 0,
    "name": "string",
    "pk": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for StockLocationType model.",
    "properties": {
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "icon": {
            "description": "Default icon for all locations that have no icon set (optional)",
            "maxLength": 100,
            "type": "string"
        },
        "location_count": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "name",
        "pk"
    ],
    "type": "object"
}

{
    "description": "string",
    "icon": "string",
    "location_count": 0,
    "name": "string",
    "pk": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for StockLocationType model.",
    "properties": {
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "icon": {
            "description": "Default icon for all locations that have no icon set (optional)",
            "maxLength": 100,
            "type": "string"
        },
        "location_count": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "name",
        "pk"
    ],
    "type": "object"
}

Response 201 Created

{
    "description": "string",
    "icon": "string",
    "location_count": 0,
    "name": "string",
    "pk": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer for StockLocationType model.",
    "properties": {
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "icon": {
            "description": "Default icon for all locations that have no icon set (optional)",
            "maxLength": 100,
            "type": "string"
        },
        "location_count": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "name",
        "pk"
    ],
    "type": "object"
}

DELETE /api/stock/location-type/{id}/

Description

API detail endpoint for a StockLocationType object.

  • GET: return a single StockLocationType
  • PUT: update a StockLocationType
  • PATCH: partial update a StockLocationType
  • DELETE: delete a StockLocationType

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

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
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Response 200 OK

{
    "description": "string",
    "icon": "string",
    "location_count": 0,
    "name": "string",
    "pk": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer for StockLocationType model.",
    "properties": {
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "icon": {
            "description": "Default icon for all locations that have no icon set (optional)",
            "maxLength": 100,
            "type": "string"
        },
        "location_count": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "name",
        "pk"
    ],
    "type": "object"
}

PATCH /api/stock/location-type/{id}/

Description

API detail endpoint for a StockLocationType object.

  • GET: return a single StockLocationType
  • PUT: update a StockLocationType
  • PATCH: partial update a StockLocationType
  • DELETE: delete a StockLocationType

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Request body

{
    "description": "string",
    "icon": "string",
    "location_count": 0,
    "name": "string",
    "pk": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for StockLocationType model.",
    "properties": {
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "icon": {
            "description": "Default icon for all locations that have no icon set (optional)",
            "maxLength": 100,
            "type": "string"
        },
        "location_count": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "type": "object"
}

{
    "description": "string",
    "icon": "string",
    "location_count": 0,
    "name": "string",
    "pk": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for StockLocationType model.",
    "properties": {
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "icon": {
            "description": "Default icon for all locations that have no icon set (optional)",
            "maxLength": 100,
            "type": "string"
        },
        "location_count": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "type": "object"
}

{
    "description": "string",
    "icon": "string",
    "location_count": 0,
    "name": "string",
    "pk": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for StockLocationType model.",
    "properties": {
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "icon": {
            "description": "Default icon for all locations that have no icon set (optional)",
            "maxLength": 100,
            "type": "string"
        },
        "location_count": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "type": "object"
}

Response 200 OK

{
    "description": "string",
    "icon": "string",
    "location_count": 0,
    "name": "string",
    "pk": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer for StockLocationType model.",
    "properties": {
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "icon": {
            "description": "Default icon for all locations that have no icon set (optional)",
            "maxLength": 100,
            "type": "string"
        },
        "location_count": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "name",
        "pk"
    ],
    "type": "object"
}

PUT /api/stock/location-type/{id}/

Description

API detail endpoint for a StockLocationType object.

  • GET: return a single StockLocationType
  • PUT: update a StockLocationType
  • PATCH: partial update a StockLocationType
  • DELETE: delete a StockLocationType

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Request body

{
    "description": "string",
    "icon": "string",
    "location_count": 0,
    "name": "string",
    "pk": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for StockLocationType model.",
    "properties": {
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "icon": {
            "description": "Default icon for all locations that have no icon set (optional)",
            "maxLength": 100,
            "type": "string"
        },
        "location_count": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "name",
        "pk"
    ],
    "type": "object"
}

{
    "description": "string",
    "icon": "string",
    "location_count": 0,
    "name": "string",
    "pk": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for StockLocationType model.",
    "properties": {
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "icon": {
            "description": "Default icon for all locations that have no icon set (optional)",
            "maxLength": 100,
            "type": "string"
        },
        "location_count": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "name",
        "pk"
    ],
    "type": "object"
}

{
    "description": "string",
    "icon": "string",
    "location_count": 0,
    "name": "string",
    "pk": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for StockLocationType model.",
    "properties": {
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "icon": {
            "description": "Default icon for all locations that have no icon set (optional)",
            "maxLength": 100,
            "type": "string"
        },
        "location_count": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "name",
        "pk"
    ],
    "type": "object"
}

Response 200 OK

{
    "description": "string",
    "icon": "string",
    "location_count": 0,
    "name": "string",
    "pk": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer for StockLocationType model.",
    "properties": {
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "icon": {
            "description": "Default icon for all locations that have no icon set (optional)",
            "maxLength": 100,
            "type": "string"
        },
        "location_count": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "name",
        "pk"
    ],
    "type": "object"
}

GET /api/stock/location-type/{id}/metadata/

Description

Generic API endpoint for reading and editing metadata for a model.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Response 200 OK

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Request body

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "type": "object"
}

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "type": "object"
}

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "type": "object"
}

Response 200 OK

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Request body

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "required": [
        "metadata"
    ],
    "type": "object"
}

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "required": [
        "metadata"
    ],
    "type": "object"
}

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "required": [
        "metadata"
    ],
    "type": "object"
}

Response 200 OK

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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 determine export options.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
cascade query boolean No Include sub-locations in filtered results
depth query number No Filter by location depth
external query boolean No
has_location_type query boolean No has_location_type
limit query integer No Number of results to return per page.
location_type query integer No
name query string No
offset query integer No The initial index from which to return the results.
ordering query string No Which field to use when ordering the results.
parent query integer No Filter by parent location
path_detail query boolean False No Include detailed information about the BOM item linked to this build line.
search query string No A search term. Searched fields: description, name, pathstring, tags__name, tags__slug.
structural query boolean No
top_level query boolean No Filter by top-level locations

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,
            "path": [
                {}
            ],
            "pathstring": "string",
            "pk": 0,
            "structural": true,
            "sublocations": 0,
            "tags": [
                "string"
            ]
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "count": {
            "example": 123,
            "type": "integer"
        },
        "next": {
            "example": "http://api.example.org/accounts/?offset=400&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "previous": {
            "example": "http://api.example.org/accounts/?offset=200&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "results": {
            "items": {
                "$ref": "#/components/schemas/Location"
            },
            "type": "array"
        }
    },
    "required": [
        "count",
        "results"
    ],
    "type": "object"
}

PATCH /api/stock/location/

Description

Perform a PATCH operation against this list endpoint.

Note that the typical DRF list endpoint does not support PATCH, so this method is provided as a custom implementation.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"

Request body

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "path": [
        {}
    ],
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Detailed information about a stock location.",
    "properties": {
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "custom_icon": {
            "description": "Icon (optional)",
            "maxLength": 100,
            "nullable": true,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "description": "Parent stock location",
            "nullable": true,
            "title": "Parent Location",
            "type": "integer"
        },
        "path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "pathstring": {
            "description": "Path",
            "readOnly": true,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        }
    },
    "type": "object"
}

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "path": [
        {}
    ],
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Detailed information about a stock location.",
    "properties": {
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "custom_icon": {
            "description": "Icon (optional)",
            "maxLength": 100,
            "nullable": true,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "description": "Parent stock location",
            "nullable": true,
            "title": "Parent Location",
            "type": "integer"
        },
        "path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "pathstring": {
            "description": "Path",
            "readOnly": true,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        }
    },
    "type": "object"
}

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "path": [
        {}
    ],
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Detailed information about a stock location.",
    "properties": {
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "custom_icon": {
            "description": "Icon (optional)",
            "maxLength": 100,
            "nullable": true,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "description": "Parent stock location",
            "nullable": true,
            "title": "Parent Location",
            "type": "integer"
        },
        "path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "pathstring": {
            "description": "Path",
            "readOnly": true,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        }
    },
    "type": "object"
}

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,
    "path": [
        {}
    ],
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Detailed information about a stock location.",
    "properties": {
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "custom_icon": {
            "description": "Icon (optional)",
            "maxLength": 100,
            "nullable": true,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "description": "Parent stock location",
            "nullable": true,
            "title": "Parent Location",
            "type": "integer"
        },
        "path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "pathstring": {
            "description": "Path",
            "readOnly": true,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "name",
        "pathstring",
        "pk",
        "sublocations"
    ],
    "type": "object"
}

POST /api/stock/location/

Description

API endpoint for list view of StockLocation objects.

  • GET: Return list of StockLocation objects
  • POST: Create a new StockLocation

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"

Request body

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "path": [
        {}
    ],
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Detailed information about a stock location.",
    "properties": {
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "custom_icon": {
            "description": "Icon (optional)",
            "maxLength": 100,
            "nullable": true,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "description": "Parent stock location",
            "nullable": true,
            "title": "Parent Location",
            "type": "integer"
        },
        "path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "pathstring": {
            "description": "Path",
            "readOnly": true,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "name",
        "pathstring",
        "pk",
        "sublocations"
    ],
    "type": "object"
}

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "path": [
        {}
    ],
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Detailed information about a stock location.",
    "properties": {
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "custom_icon": {
            "description": "Icon (optional)",
            "maxLength": 100,
            "nullable": true,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "description": "Parent stock location",
            "nullable": true,
            "title": "Parent Location",
            "type": "integer"
        },
        "path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "pathstring": {
            "description": "Path",
            "readOnly": true,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "name",
        "pathstring",
        "pk",
        "sublocations"
    ],
    "type": "object"
}

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "path": [
        {}
    ],
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Detailed information about a stock location.",
    "properties": {
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "custom_icon": {
            "description": "Icon (optional)",
            "maxLength": 100,
            "nullable": true,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "description": "Parent stock location",
            "nullable": true,
            "title": "Parent Location",
            "type": "integer"
        },
        "path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "pathstring": {
            "description": "Path",
            "readOnly": true,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "name",
        "pathstring",
        "pk",
        "sublocations"
    ],
    "type": "object"
}

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,
    "path": [
        {}
    ],
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Detailed information about a stock location.",
    "properties": {
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "custom_icon": {
            "description": "Icon (optional)",
            "maxLength": 100,
            "nullable": true,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "description": "Parent stock location",
            "nullable": true,
            "title": "Parent Location",
            "type": "integer"
        },
        "path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "pathstring": {
            "description": "Path",
            "readOnly": true,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "name",
        "pathstring",
        "pk",
        "sublocations"
    ],
    "type": "object"
}

PUT /api/stock/location/

Description

Perform a PUT operation against this list endpoint.

Simply redirects to the PATCH method.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"

Request body

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "path": [
        {}
    ],
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Detailed information about a stock location.",
    "properties": {
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "custom_icon": {
            "description": "Icon (optional)",
            "maxLength": 100,
            "nullable": true,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "description": "Parent stock location",
            "nullable": true,
            "title": "Parent Location",
            "type": "integer"
        },
        "path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "pathstring": {
            "description": "Path",
            "readOnly": true,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "name",
        "pathstring",
        "pk",
        "sublocations"
    ],
    "type": "object"
}

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "path": [
        {}
    ],
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Detailed information about a stock location.",
    "properties": {
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "custom_icon": {
            "description": "Icon (optional)",
            "maxLength": 100,
            "nullable": true,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "description": "Parent stock location",
            "nullable": true,
            "title": "Parent Location",
            "type": "integer"
        },
        "path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "pathstring": {
            "description": "Path",
            "readOnly": true,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "name",
        "pathstring",
        "pk",
        "sublocations"
    ],
    "type": "object"
}

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "path": [
        {}
    ],
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Detailed information about a stock location.",
    "properties": {
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "custom_icon": {
            "description": "Icon (optional)",
            "maxLength": 100,
            "nullable": true,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "description": "Parent stock location",
            "nullable": true,
            "title": "Parent Location",
            "type": "integer"
        },
        "path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "pathstring": {
            "description": "Path",
            "readOnly": true,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "name",
        "pathstring",
        "pk",
        "sublocations"
    ],
    "type": "object"
}

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,
    "path": [
        {}
    ],
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Detailed information about a stock location.",
    "properties": {
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "custom_icon": {
            "description": "Icon (optional)",
            "maxLength": 100,
            "nullable": true,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "description": "Parent stock location",
            "nullable": true,
            "title": "Parent Location",
            "type": "integer"
        },
        "path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "pathstring": {
            "description": "Path",
            "readOnly": true,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "name",
        "pathstring",
        "pk",
        "sublocations"
    ],
    "type": "object"
}

GET /api/stock/location/tree/

Description

API endpoint for accessing a list of StockLocation objects, ready for rendering as a tree.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
limit query integer No Number of results to return per page.
offset query integer No The initial index from which to return the results.
ordering query string No Which field to use when ordering the results.

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
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "count": {
            "example": 123,
            "type": "integer"
        },
        "next": {
            "example": "http://api.example.org/accounts/?offset=400&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "previous": {
            "example": "http://api.example.org/accounts/?offset=200&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "results": {
            "items": {
                "$ref": "#/components/schemas/LocationTree"
            },
            "type": "array"
        }
    },
    "required": [
        "count",
        "results"
    ],
    "type": "object"
}

DELETE /api/stock/location/{id}/

Description

Custom delete method to pass kwargs.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Response 204 No Content


GET /api/stock/location/{id}/

Description

Custom get method to pass kwargs.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No
path_detail query boolean False No Include detailed information about the BOM item linked to this build line.

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,
    "path": [
        {}
    ],
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Detailed information about a stock location.",
    "properties": {
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "custom_icon": {
            "description": "Icon (optional)",
            "maxLength": 100,
            "nullable": true,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "description": "Parent stock location",
            "nullable": true,
            "title": "Parent Location",
            "type": "integer"
        },
        "path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "pathstring": {
            "description": "Path",
            "readOnly": true,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "name",
        "pathstring",
        "pk",
        "sublocations"
    ],
    "type": "object"
}

PATCH /api/stock/location/{id}/

Description

Custom patch method to pass kwargs.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Request body

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "path": [
        {}
    ],
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Detailed information about a stock location.",
    "properties": {
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "custom_icon": {
            "description": "Icon (optional)",
            "maxLength": 100,
            "nullable": true,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "description": "Parent stock location",
            "nullable": true,
            "title": "Parent Location",
            "type": "integer"
        },
        "path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "pathstring": {
            "description": "Path",
            "readOnly": true,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        }
    },
    "type": "object"
}

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "path": [
        {}
    ],
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Detailed information about a stock location.",
    "properties": {
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "custom_icon": {
            "description": "Icon (optional)",
            "maxLength": 100,
            "nullable": true,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "description": "Parent stock location",
            "nullable": true,
            "title": "Parent Location",
            "type": "integer"
        },
        "path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "pathstring": {
            "description": "Path",
            "readOnly": true,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        }
    },
    "type": "object"
}

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "path": [
        {}
    ],
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Detailed information about a stock location.",
    "properties": {
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "custom_icon": {
            "description": "Icon (optional)",
            "maxLength": 100,
            "nullable": true,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "description": "Parent stock location",
            "nullable": true,
            "title": "Parent Location",
            "type": "integer"
        },
        "path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "pathstring": {
            "description": "Path",
            "readOnly": true,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        }
    },
    "type": "object"
}

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,
    "path": [
        {}
    ],
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Detailed information about a stock location.",
    "properties": {
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "custom_icon": {
            "description": "Icon (optional)",
            "maxLength": 100,
            "nullable": true,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "description": "Parent stock location",
            "nullable": true,
            "title": "Parent Location",
            "type": "integer"
        },
        "path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "pathstring": {
            "description": "Path",
            "readOnly": true,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "name",
        "pathstring",
        "pk",
        "sublocations"
    ],
    "type": "object"
}

PUT /api/stock/location/{id}/

Description

Custom put method to pass kwargs.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Request body

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "path": [
        {}
    ],
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Detailed information about a stock location.",
    "properties": {
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "custom_icon": {
            "description": "Icon (optional)",
            "maxLength": 100,
            "nullable": true,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "description": "Parent stock location",
            "nullable": true,
            "title": "Parent Location",
            "type": "integer"
        },
        "path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "pathstring": {
            "description": "Path",
            "readOnly": true,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "name",
        "pathstring",
        "pk",
        "sublocations"
    ],
    "type": "object"
}

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "path": [
        {}
    ],
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Detailed information about a stock location.",
    "properties": {
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "custom_icon": {
            "description": "Icon (optional)",
            "maxLength": 100,
            "nullable": true,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "description": "Parent stock location",
            "nullable": true,
            "title": "Parent Location",
            "type": "integer"
        },
        "path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "pathstring": {
            "description": "Path",
            "readOnly": true,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "name",
        "pathstring",
        "pk",
        "sublocations"
    ],
    "type": "object"
}

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "path": [
        {}
    ],
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Detailed information about a stock location.",
    "properties": {
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "custom_icon": {
            "description": "Icon (optional)",
            "maxLength": 100,
            "nullable": true,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "description": "Parent stock location",
            "nullable": true,
            "title": "Parent Location",
            "type": "integer"
        },
        "path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "pathstring": {
            "description": "Path",
            "readOnly": true,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "name",
        "pathstring",
        "pk",
        "sublocations"
    ],
    "type": "object"
}

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,
    "path": [
        {}
    ],
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Detailed information about a stock location.",
    "properties": {
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "custom_icon": {
            "description": "Icon (optional)",
            "maxLength": 100,
            "nullable": true,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "description": "Parent stock location",
            "nullable": true,
            "title": "Parent Location",
            "type": "integer"
        },
        "path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "pathstring": {
            "description": "Path",
            "readOnly": true,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "name",
        "pathstring",
        "pk",
        "sublocations"
    ],
    "type": "object"
}

GET /api/stock/location/{id}/metadata/

Description

Generic API endpoint for reading and editing metadata for a model.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Response 200 OK

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Request body

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "type": "object"
}

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "type": "object"
}

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "type": "object"
}

Response 200 OK

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Request body

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "required": [
        "metadata"
    ],
    "type": "object"
}

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "required": [
        "metadata"
    ],
    "type": "object"
}

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "required": [
        "metadata"
    ],
    "type": "object"
}

Response 200 OK

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"

Request body

{
    "allow_mismatched_status": true,
    "allow_mismatched_suppliers": true,
    "items": [
        {
            "item": 0
        }
    ],
    "location": 0,
    "notes": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer for merging two (or more) stock items together.",
    "properties": {
        "allow_mismatched_status": {
            "description": "Allow stock items with different status codes to be merged",
            "type": "boolean"
        },
        "allow_mismatched_suppliers": {
            "description": "Allow stock items with different supplier parts to be merged",
            "type": "boolean"
        },
        "items": {
            "items": {
                "$ref": "#/components/schemas/StockMergeItem"
            },
            "type": "array"
        },
        "location": {
            "description": "Destination stock location",
            "type": "integer"
        },
        "notes": {
            "description": "Stock merging notes",
            "type": "string"
        }
    },
    "required": [
        "items",
        "location"
    ],
    "type": "object"
}

POST /api/stock/remove/

Description

Endpoint for removing a quantity of stock from an existing StockItem.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"

Request body

{
    "items": [
        {
            "batch": "string",
            "packaging": "string",
            "pk": 0,
            "quantity": "string",
            "status": 0
        }
    ],
    "notes": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for removing stock from stock item(s).",
    "properties": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/StockAdjustmentItem"
            },
            "type": "array"
        },
        "notes": {
            "description": "Stock transaction notes",
            "type": "string"
        }
    },
    "required": [
        "items"
    ],
    "type": "object"
}

{
    "items": [
        {
            "batch": "string",
            "packaging": "string",
            "pk": 0,
            "quantity": "string",
            "status": 0
        }
    ],
    "notes": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for removing stock from stock item(s).",
    "properties": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/StockAdjustmentItem"
            },
            "type": "array"
        },
        "notes": {
            "description": "Stock transaction notes",
            "type": "string"
        }
    },
    "required": [
        "items"
    ],
    "type": "object"
}

{
    "items": [
        {
            "batch": "string",
            "packaging": "string",
            "pk": 0,
            "quantity": "string",
            "status": 0
        }
    ],
    "notes": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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": 0
        }
    ],
    "notes": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer for removing stock from stock item(s).",
    "properties": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/StockAdjustmentItem"
            },
            "type": "array"
        },
        "notes": {
            "description": "Stock transaction notes",
            "type": "string"
        }
    },
    "required": [
        "items"
    ],
    "type": "object"
}

POST /api/stock/return/

Description

API endpoint for returning items into stock.

This API endpoint is for items that are initially considered "not in stock", and the user wants to return them to stock, marking them as "available" for further consumption or sale.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"

Request body

{
    "items": [
        {
            "batch": "string",
            "packaging": "string",
            "pk": 0,
            "quantity": "string",
            "status": 0
        }
    ],
    "location": 0,
    "merge": true,
    "notes": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for returning stock item(s) into stock.",
    "properties": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/StockAdjustmentItem"
            },
            "type": "array"
        },
        "location": {
            "description": "Destination stock location",
            "type": "integer"
        },
        "merge": {
            "default": false,
            "description": "Merge returned items into existing stock items if possible",
            "title": "Merge into existing stock",
            "type": "boolean"
        },
        "notes": {
            "description": "Stock transaction notes",
            "type": "string"
        }
    },
    "required": [
        "items",
        "location"
    ],
    "type": "object"
}

{
    "items": [
        {
            "batch": "string",
            "packaging": "string",
            "pk": 0,
            "quantity": "string",
            "status": 0
        }
    ],
    "location": 0,
    "merge": true,
    "notes": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for returning stock item(s) into stock.",
    "properties": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/StockAdjustmentItem"
            },
            "type": "array"
        },
        "location": {
            "description": "Destination stock location",
            "type": "integer"
        },
        "merge": {
            "default": false,
            "description": "Merge returned items into existing stock items if possible",
            "title": "Merge into existing stock",
            "type": "boolean"
        },
        "notes": {
            "description": "Stock transaction notes",
            "type": "string"
        }
    },
    "required": [
        "items",
        "location"
    ],
    "type": "object"
}

{
    "items": [
        {
            "batch": "string",
            "packaging": "string",
            "pk": 0,
            "quantity": "string",
            "status": 0
        }
    ],
    "location": 0,
    "merge": true,
    "notes": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for returning stock item(s) into stock.",
    "properties": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/StockAdjustmentItem"
            },
            "type": "array"
        },
        "location": {
            "description": "Destination stock location",
            "type": "integer"
        },
        "merge": {
            "default": false,
            "description": "Merge returned items into existing stock items if possible",
            "title": "Merge into existing stock",
            "type": "boolean"
        },
        "notes": {
            "description": "Stock transaction notes",
            "type": "string"
        }
    },
    "required": [
        "items",
        "location"
    ],
    "type": "object"
}

Response 201 Created

{
    "items": [
        {
            "batch": "string",
            "packaging": "string",
            "pk": 0,
            "quantity": "string",
            "status": 0
        }
    ],
    "location": 0,
    "merge": true,
    "notes": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer class for returning stock item(s) into stock.",
    "properties": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/StockAdjustmentItem"
            },
            "type": "array"
        },
        "location": {
            "description": "Destination stock location",
            "type": "integer"
        },
        "merge": {
            "default": false,
            "description": "Merge returned items into existing stock items if possible",
            "title": "Merge into existing stock",
            "type": "boolean"
        },
        "notes": {
            "description": "Stock transaction notes",
            "type": "string"
        }
    },
    "required": [
        "items",
        "location"
    ],
    "type": "object"
}

GET /api/stock/status/

Description

Retrieve information about a specific status code

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"

Response 200 OK

{
    "status_class": "string",
    "values": {}
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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.

Note that the typical DRF list endpoint does not support DELETE, so this method is provided as a custom implementation.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"

Request body

{
    "filters": {},
    "items": [
        0
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Parameters for selecting items for bulk operations.",
    "properties": {
        "filters": {
            "additionalProperties": {},
            "title": "A dictionary of filter values",
            "type": "object"
        },
        "items": {
            "items": {
                "type": "integer"
            },
            "title": "A list of primary key values",
            "type": "array"
        }
    },
    "type": "object"
}

{
    "filters": {},
    "items": [
        0
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Parameters for selecting items for bulk operations.",
    "properties": {
        "filters": {
            "additionalProperties": {},
            "title": "A dictionary of filter values",
            "type": "object"
        },
        "items": {
            "items": {
                "type": "integer"
            },
            "title": "A list of primary key values",
            "type": "array"
        }
    },
    "type": "object"
}

{
    "filters": {},
    "items": [
        0
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Parameters for selecting items for bulk operations.",
    "properties": {
        "filters": {
            "additionalProperties": {},
            "title": "A dictionary of filter values",
            "type": "object"
        },
        "items": {
            "items": {
                "type": "integer"
            },
            "title": "A list of primary key values",
            "type": "array"
        }
    },
    "type": "object"
}

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
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
build query integer No Build
enabled query boolean No Enabled
include_installed query boolean No If true, include test results for items installed underneath the given stock item
limit query integer No Number of results to return per page.
offset query integer No The initial index from which to return the results.
ordering query string No Which field to use when ordering the results.
part query integer No Part
required query boolean No Required
result query boolean No
search query string No A search term.
stock_item query integer No Filter by numeric Stock Item ID
template query integer No
template_detail query boolean False No
test query string No Test name (case insensitive)
user query integer No
user_detail query boolean False No
value query string No

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,
            "template_detail": null,
            "test_station": "string",
            "user": 0,
            "user_detail": null,
            "value": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "count": {
            "example": 123,
            "type": "integer"
        },
        "next": {
            "example": "http://api.example.org/accounts/?offset=400&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "previous": {
            "example": "http://api.example.org/accounts/?offset=200&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "results": {
            "items": {
                "$ref": "#/components/schemas/StockItemTestResult"
            },
            "type": "array"
        }
    },
    "required": [
        "count",
        "results"
    ],
    "type": "object"
}

POST /api/stock/test/

Description

API endpoint for listing (and creating) a StockItemTestResult object.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"

Request body

{
    "attachment": "string",
    "date": "2022-04-13T15:42:05.901Z",
    "finished_datetime": "2022-04-13T15:42:05.901Z",
    "notes": "string",
    "pk": 0,
    "result": true,
    "started_datetime": "2022-04-13T15:42:05.901Z",
    "stock_item": 0,
    "template": 0,
    "template_detail": null,
    "test_station": "string",
    "user": 0,
    "user_detail": null,
    "value": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for the StockItemTestResult model.",
    "properties": {
        "attachment": {
            "description": "Test result attachment",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "template_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartTestTemplate"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "required": [
        "date",
        "pk",
        "stock_item"
    ],
    "type": "object"
}

{
    "attachment": "string",
    "date": "2022-04-13T15:42:05.901Z",
    "finished_datetime": "2022-04-13T15:42:05.901Z",
    "notes": "string",
    "pk": 0,
    "result": true,
    "started_datetime": "2022-04-13T15:42:05.901Z",
    "stock_item": 0,
    "template": 0,
    "template_detail": null,
    "test_station": "string",
    "user": 0,
    "user_detail": null,
    "value": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for the StockItemTestResult model.",
    "properties": {
        "attachment": {
            "description": "Test result attachment",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "template_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartTestTemplate"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "required": [
        "date",
        "pk",
        "stock_item"
    ],
    "type": "object"
}

{
    "attachment": "string",
    "date": "2022-04-13T15:42:05.901Z",
    "finished_datetime": "2022-04-13T15:42:05.901Z",
    "notes": "string",
    "pk": 0,
    "result": true,
    "started_datetime": "2022-04-13T15:42:05.901Z",
    "stock_item": 0,
    "template": 0,
    "template_detail": null,
    "test_station": "string",
    "user": 0,
    "user_detail": null,
    "value": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for the StockItemTestResult model.",
    "properties": {
        "attachment": {
            "description": "Test result attachment",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "template_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartTestTemplate"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "required": [
        "date",
        "pk",
        "stock_item"
    ],
    "type": "object"
}

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,
    "template_detail": null,
    "test_station": "string",
    "user": 0,
    "user_detail": null,
    "value": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer for the StockItemTestResult model.",
    "properties": {
        "attachment": {
            "description": "Test result attachment",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "template_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartTestTemplate"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "required": [
        "date",
        "pk",
        "stock_item"
    ],
    "type": "object"
}

DELETE /api/stock/test/{id}/

Description

Detail endpoint for StockItemTestResult.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Response 204 No Content


GET /api/stock/test/{id}/

Description

Detail endpoint for StockItemTestResult.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No
template_detail query boolean False No
user_detail query boolean False No

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,
    "template_detail": null,
    "test_station": "string",
    "user": 0,
    "user_detail": null,
    "value": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer for the StockItemTestResult model.",
    "properties": {
        "attachment": {
            "description": "Test result attachment",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "template_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartTestTemplate"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "required": [
        "date",
        "pk",
        "stock_item"
    ],
    "type": "object"
}

PATCH /api/stock/test/{id}/

Description

Detail endpoint for StockItemTestResult.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Request body

{
    "attachment": "string",
    "date": "2022-04-13T15:42:05.901Z",
    "finished_datetime": "2022-04-13T15:42:05.901Z",
    "notes": "string",
    "pk": 0,
    "result": true,
    "started_datetime": "2022-04-13T15:42:05.901Z",
    "stock_item": 0,
    "template": 0,
    "template_detail": null,
    "test_station": "string",
    "user": 0,
    "user_detail": null,
    "value": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for the StockItemTestResult model.",
    "properties": {
        "attachment": {
            "description": "Test result attachment",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "template_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartTestTemplate"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "type": "object"
}

{
    "attachment": "string",
    "date": "2022-04-13T15:42:05.901Z",
    "finished_datetime": "2022-04-13T15:42:05.901Z",
    "notes": "string",
    "pk": 0,
    "result": true,
    "started_datetime": "2022-04-13T15:42:05.901Z",
    "stock_item": 0,
    "template": 0,
    "template_detail": null,
    "test_station": "string",
    "user": 0,
    "user_detail": null,
    "value": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for the StockItemTestResult model.",
    "properties": {
        "attachment": {
            "description": "Test result attachment",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "template_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartTestTemplate"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "type": "object"
}

{
    "attachment": "string",
    "date": "2022-04-13T15:42:05.901Z",
    "finished_datetime": "2022-04-13T15:42:05.901Z",
    "notes": "string",
    "pk": 0,
    "result": true,
    "started_datetime": "2022-04-13T15:42:05.901Z",
    "stock_item": 0,
    "template": 0,
    "template_detail": null,
    "test_station": "string",
    "user": 0,
    "user_detail": null,
    "value": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for the StockItemTestResult model.",
    "properties": {
        "attachment": {
            "description": "Test result attachment",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "template_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartTestTemplate"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "type": "object"
}

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,
    "template_detail": null,
    "test_station": "string",
    "user": 0,
    "user_detail": null,
    "value": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer for the StockItemTestResult model.",
    "properties": {
        "attachment": {
            "description": "Test result attachment",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "template_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartTestTemplate"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "required": [
        "date",
        "pk",
        "stock_item"
    ],
    "type": "object"
}

PUT /api/stock/test/{id}/

Description

Detail endpoint for StockItemTestResult.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Request body

{
    "attachment": "string",
    "date": "2022-04-13T15:42:05.901Z",
    "finished_datetime": "2022-04-13T15:42:05.901Z",
    "notes": "string",
    "pk": 0,
    "result": true,
    "started_datetime": "2022-04-13T15:42:05.901Z",
    "stock_item": 0,
    "template": 0,
    "template_detail": null,
    "test_station": "string",
    "user": 0,
    "user_detail": null,
    "value": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for the StockItemTestResult model.",
    "properties": {
        "attachment": {
            "description": "Test result attachment",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "template_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartTestTemplate"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "required": [
        "date",
        "pk",
        "stock_item"
    ],
    "type": "object"
}

{
    "attachment": "string",
    "date": "2022-04-13T15:42:05.901Z",
    "finished_datetime": "2022-04-13T15:42:05.901Z",
    "notes": "string",
    "pk": 0,
    "result": true,
    "started_datetime": "2022-04-13T15:42:05.901Z",
    "stock_item": 0,
    "template": 0,
    "template_detail": null,
    "test_station": "string",
    "user": 0,
    "user_detail": null,
    "value": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for the StockItemTestResult model.",
    "properties": {
        "attachment": {
            "description": "Test result attachment",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "template_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartTestTemplate"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "required": [
        "date",
        "pk",
        "stock_item"
    ],
    "type": "object"
}

{
    "attachment": "string",
    "date": "2022-04-13T15:42:05.901Z",
    "finished_datetime": "2022-04-13T15:42:05.901Z",
    "notes": "string",
    "pk": 0,
    "result": true,
    "started_datetime": "2022-04-13T15:42:05.901Z",
    "stock_item": 0,
    "template": 0,
    "template_detail": null,
    "test_station": "string",
    "user": 0,
    "user_detail": null,
    "value": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for the StockItemTestResult model.",
    "properties": {
        "attachment": {
            "description": "Test result attachment",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "template_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartTestTemplate"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "required": [
        "date",
        "pk",
        "stock_item"
    ],
    "type": "object"
}

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,
    "template_detail": null,
    "test_station": "string",
    "user": 0,
    "user_detail": null,
    "value": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer for the StockItemTestResult model.",
    "properties": {
        "attachment": {
            "description": "Test result attachment",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "template_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartTestTemplate"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "required": [
        "date",
        "pk",
        "stock_item"
    ],
    "type": "object"
}

GET /api/stock/test/{id}/metadata/

Description

Generic API endpoint for reading and editing metadata for a model.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Response 200 OK

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "required": [
        "metadata"
    ],
    "type": "object"
}

PATCH /api/stock/test/{id}/metadata/

Description

Generic API endpoint for reading and editing metadata for a model.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Request body

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "type": "object"
}

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "type": "object"
}

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "type": "object"
}

Response 200 OK

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "required": [
        "metadata"
    ],
    "type": "object"
}

PUT /api/stock/test/{id}/metadata/

Description

Generic API endpoint for reading and editing metadata for a model.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Request body

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "required": [
        "metadata"
    ],
    "type": "object"
}

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "required": [
        "metadata"
    ],
    "type": "object"
}

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "required": [
        "metadata"
    ],
    "type": "object"
}

Response 200 OK

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "required": [
        "metadata"
    ],
    "type": "object"
}

GET /api/stock/track/

Description

Override the GET method to determine export options.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
item query integer No
item_detail query boolean False No Include detailed information about the item in the response
limit query integer No Number of results to return per page.
offset query integer No The initial index from which to return the results.
ordering query string No Which field to use when ordering the results.
search query string No A search term. Searched fields: notes.
user query integer No
user_detail query boolean False 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": [
        {
            "date": "2022-04-13T15:42:05.901Z",
            "deltas": null,
            "item": 0,
            "item_detail": null,
            "label": "string",
            "notes": "string",
            "pk": 0,
            "tracking_type": 0,
            "user": 0,
            "user_detail": null
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "count": {
            "example": 123,
            "type": "integer"
        },
        "next": {
            "example": "http://api.example.org/accounts/?offset=400&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "previous": {
            "example": "http://api.example.org/accounts/?offset=200&limit=100",
            "format": "uri",
            "nullable": true,
            "type": "string"
        },
        "results": {
            "items": {
                "$ref": "#/components/schemas/StockTracking"
            },
            "type": "array"
        }
    },
    "required": [
        "count",
        "results"
    ],
    "type": "object"
}

GET /api/stock/track/status/

Description

Retrieve information about a specific status code

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"

Response 200 OK

{
    "status_class": "string",
    "values": {}
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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


GET /api/stock/track/{id}/

Description

Detail API endpoint for StockItemTracking model.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Response 200 OK

{
    "date": "2022-04-13T15:42:05.901Z",
    "deltas": null,
    "item": 0,
    "item_detail": null,
    "label": "string",
    "notes": "string",
    "pk": 0,
    "tracking_type": 0,
    "user": 0,
    "user_detail": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer for StockItemTracking model.",
    "properties": {
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "deltas": {
            "readOnly": true
        },
        "item": {
            "type": "integer"
        },
        "item_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockItem"
                }
            ],
            "nullable": true,
            "readOnly": true
        },
        "label": {
            "readOnly": true,
            "type": "string"
        },
        "notes": {
            "description": "Entry notes",
            "maxLength": 512,
            "nullable": true,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "tracking_type": {
            "readOnly": true,
            "type": "integer"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "nullable": true,
            "readOnly": true
        }
    },
    "required": [
        "date",
        "deltas",
        "item",
        "label",
        "pk",
        "tracking_type"
    ],
    "type": "object"
}

POST /api/stock/transfer/

Description

API endpoint for performing stock movements.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"

Request body

{
    "items": [
        {
            "batch": "string",
            "packaging": "string",
            "pk": 0,
            "quantity": "string",
            "status": 0
        }
    ],
    "location": 0,
    "notes": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for transferring (moving) stock item(s).",
    "properties": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/StockAdjustmentItem"
            },
            "type": "array"
        },
        "location": {
            "description": "Destination stock location",
            "type": "integer"
        },
        "notes": {
            "description": "Stock transaction notes",
            "type": "string"
        }
    },
    "required": [
        "items",
        "location"
    ],
    "type": "object"
}

{
    "items": [
        {
            "batch": "string",
            "packaging": "string",
            "pk": 0,
            "quantity": "string",
            "status": 0
        }
    ],
    "location": 0,
    "notes": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for transferring (moving) stock item(s).",
    "properties": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/StockAdjustmentItem"
            },
            "type": "array"
        },
        "location": {
            "description": "Destination stock location",
            "type": "integer"
        },
        "notes": {
            "description": "Stock transaction notes",
            "type": "string"
        }
    },
    "required": [
        "items",
        "location"
    ],
    "type": "object"
}

{
    "items": [
        {
            "batch": "string",
            "packaging": "string",
            "pk": 0,
            "quantity": "string",
            "status": 0
        }
    ],
    "location": 0,
    "notes": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for transferring (moving) stock item(s).",
    "properties": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/StockAdjustmentItem"
            },
            "type": "array"
        },
        "location": {
            "description": "Destination stock location",
            "type": "integer"
        },
        "notes": {
            "description": "Stock transaction notes",
            "type": "string"
        }
    },
    "required": [
        "items",
        "location"
    ],
    "type": "object"
}

Response 201 Created

{
    "items": [
        {
            "batch": "string",
            "packaging": "string",
            "pk": 0,
            "quantity": "string",
            "status": 0
        }
    ],
    "location": 0,
    "notes": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer for transferring (moving) stock item(s).",
    "properties": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/StockAdjustmentItem"
            },
            "type": "array"
        },
        "location": {
            "description": "Destination stock location",
            "type": "integer"
        },
        "notes": {
            "description": "Stock transaction notes",
            "type": "string"
        }
    },
    "required": [
        "items",
        "location"
    ],
    "type": "object"
}

DELETE /api/stock/{id}/

Description

API detail endpoint for a single StockItem instance.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Response 204 No Content


GET /api/stock/{id}/

Description

API detail endpoint for a single StockItem instance.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No
location_detail query boolean False No Include detailed information about the stock location in the response
part_detail query boolean True No Include detailed information about the related part in the response
path_detail query boolean False No
supplier_part_detail query boolean False No
tests query boolean False No

Response 200 OK

{
    "MPN": "string",
    "SKU": "string",
    "allocated": 10.12,
    "barcode_hash": "string",
    "batch": "string",
    "belongs_to": 0,
    "build": 0,
    "child_items": 0,
    "consumed_by": 0,
    "customer": 0,
    "delete_on_deplete": true,
    "expired": true,
    "expiry_date": "2022-04-13",
    "in_stock": true,
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "location_detail": null,
    "location_path": [
        {}
    ],
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "parent": 0,
    "part": 0,
    "part_detail": null,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": "string",
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "serial_numbers": "string",
    "stale": true,
    "status": null,
    "status_custom_key": 0,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "supplier_part_detail": null,
    "tags": [
        "string"
    ],
    "tests": [
        {
            "attachment": "string",
            "date": "2022-04-13T15:42:05.901Z",
            "finished_datetime": "2022-04-13T15:42:05.901Z",
            "notes": "string",
            "pk": 0,
            "result": true,
            "started_datetime": "2022-04-13T15:42:05.901Z",
            "stock_item": 0,
            "template": 0,
            "template_detail": null,
            "test_station": "string",
            "user": 0,
            "user_detail": null,
            "value": "string"
        }
    ],
    "tracking_items": 0,
    "updated": "2022-04-13T15:42:05.901Z",
    "use_pack_size": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
    "properties": {
        "MPN": {
            "nullable": true,
            "readOnly": true,
            "title": "Manufacturer Part Number",
            "type": "string"
        },
        "SKU": {
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part Number",
            "type": "string"
        },
        "allocated": {
            "format": "double",
            "nullable": true,
            "readOnly": true,
            "title": "Allocated Quantity",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "in_stock": {
            "readOnly": true,
            "type": "boolean"
        },
        "installed_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 2000,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "location_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/LocationBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Location"
        },
        "location_path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "notes": {
            "description": "Markdown notes (optional)",
            "maxLength": 50000,
            "nullable": true,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "packaging": {
            "description": "Packaging this stock item is stored in",
            "maxLength": 50,
            "nullable": true,
            "type": "string"
        },
        "parent": {
            "description": "Parent stock item",
            "readOnly": true,
            "title": "Parent Item",
            "type": "integer"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Part"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
            "title": "Currency",
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "serial_numbers": {
            "description": "Enter serial numbers for new items",
            "nullable": true,
            "type": "string",
            "writeOnly": true
        },
        "stale": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockItemStatusEnum"
                }
            ],
            "maximum": 9223372036854775807,
            "minimum": 0
        },
        "status_custom_key": {
            "description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
            "nullable": true,
            "title": "Custom status key",
            "type": "integer"
        },
        "status_text": {
            "readOnly": true,
            "title": "Status",
            "type": "string"
        },
        "stocktake_date": {
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "supplier_part": {
            "description": "Select a matching supplier part for this stock item",
            "nullable": true,
            "type": "integer"
        },
        "supplier_part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SupplierPart"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tests": {
            "items": {
                "$ref": "#/components/schemas/StockItemTestResult"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "tracking_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "required": [
        "barcode_hash",
        "in_stock",
        "parent",
        "part",
        "pk",
        "quantity",
        "status_text"
    ],
    "type": "object"
}

PATCH /api/stock/{id}/

Description

API detail endpoint for a single StockItem instance.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Request body

{
    "MPN": "string",
    "SKU": "string",
    "allocated": 10.12,
    "barcode_hash": "string",
    "batch": "string",
    "belongs_to": 0,
    "build": 0,
    "child_items": 0,
    "consumed_by": 0,
    "customer": 0,
    "delete_on_deplete": true,
    "expired": true,
    "expiry_date": "2022-04-13",
    "in_stock": true,
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "location_detail": null,
    "location_path": [
        {}
    ],
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "parent": 0,
    "part": 0,
    "part_detail": null,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": "string",
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "serial_numbers": "string",
    "stale": true,
    "status": null,
    "status_custom_key": 0,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "supplier_part_detail": null,
    "tags": [
        "string"
    ],
    "tests": [
        {
            "attachment": "string",
            "date": "2022-04-13T15:42:05.901Z",
            "finished_datetime": "2022-04-13T15:42:05.901Z",
            "notes": "string",
            "pk": 0,
            "result": true,
            "started_datetime": "2022-04-13T15:42:05.901Z",
            "stock_item": 0,
            "template": 0,
            "template_detail": null,
            "test_station": "string",
            "user": 0,
            "user_detail": null,
            "value": "string"
        }
    ],
    "tracking_items": 0,
    "updated": "2022-04-13T15:42:05.901Z",
    "use_pack_size": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
    "properties": {
        "MPN": {
            "nullable": true,
            "readOnly": true,
            "title": "Manufacturer Part Number",
            "type": "string"
        },
        "SKU": {
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part Number",
            "type": "string"
        },
        "allocated": {
            "format": "double",
            "nullable": true,
            "readOnly": true,
            "title": "Allocated Quantity",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "in_stock": {
            "readOnly": true,
            "type": "boolean"
        },
        "installed_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 2000,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "location_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/LocationBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Location"
        },
        "location_path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "notes": {
            "description": "Markdown notes (optional)",
            "maxLength": 50000,
            "nullable": true,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "packaging": {
            "description": "Packaging this stock item is stored in",
            "maxLength": 50,
            "nullable": true,
            "type": "string"
        },
        "parent": {
            "description": "Parent stock item",
            "readOnly": true,
            "title": "Parent Item",
            "type": "integer"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Part"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
            "title": "Currency",
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "serial_numbers": {
            "description": "Enter serial numbers for new items",
            "nullable": true,
            "type": "string",
            "writeOnly": true
        },
        "stale": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockItemStatusEnum"
                }
            ],
            "maximum": 9223372036854775807,
            "minimum": 0
        },
        "status_custom_key": {
            "description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
            "nullable": true,
            "title": "Custom status key",
            "type": "integer"
        },
        "status_text": {
            "readOnly": true,
            "title": "Status",
            "type": "string"
        },
        "stocktake_date": {
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "supplier_part": {
            "description": "Select a matching supplier part for this stock item",
            "nullable": true,
            "type": "integer"
        },
        "supplier_part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SupplierPart"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tests": {
            "items": {
                "$ref": "#/components/schemas/StockItemTestResult"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "tracking_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "type": "object"
}

{
    "MPN": "string",
    "SKU": "string",
    "allocated": 10.12,
    "barcode_hash": "string",
    "batch": "string",
    "belongs_to": 0,
    "build": 0,
    "child_items": 0,
    "consumed_by": 0,
    "customer": 0,
    "delete_on_deplete": true,
    "expired": true,
    "expiry_date": "2022-04-13",
    "in_stock": true,
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "location_detail": null,
    "location_path": [
        {}
    ],
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "parent": 0,
    "part": 0,
    "part_detail": null,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": "string",
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "serial_numbers": "string",
    "stale": true,
    "status": null,
    "status_custom_key": 0,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "supplier_part_detail": null,
    "tags": [
        "string"
    ],
    "tests": [
        {
            "attachment": "string",
            "date": "2022-04-13T15:42:05.901Z",
            "finished_datetime": "2022-04-13T15:42:05.901Z",
            "notes": "string",
            "pk": 0,
            "result": true,
            "started_datetime": "2022-04-13T15:42:05.901Z",
            "stock_item": 0,
            "template": 0,
            "template_detail": null,
            "test_station": "string",
            "user": 0,
            "user_detail": null,
            "value": "string"
        }
    ],
    "tracking_items": 0,
    "updated": "2022-04-13T15:42:05.901Z",
    "use_pack_size": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
    "properties": {
        "MPN": {
            "nullable": true,
            "readOnly": true,
            "title": "Manufacturer Part Number",
            "type": "string"
        },
        "SKU": {
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part Number",
            "type": "string"
        },
        "allocated": {
            "format": "double",
            "nullable": true,
            "readOnly": true,
            "title": "Allocated Quantity",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "in_stock": {
            "readOnly": true,
            "type": "boolean"
        },
        "installed_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 2000,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "location_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/LocationBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Location"
        },
        "location_path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "notes": {
            "description": "Markdown notes (optional)",
            "maxLength": 50000,
            "nullable": true,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "packaging": {
            "description": "Packaging this stock item is stored in",
            "maxLength": 50,
            "nullable": true,
            "type": "string"
        },
        "parent": {
            "description": "Parent stock item",
            "readOnly": true,
            "title": "Parent Item",
            "type": "integer"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Part"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
            "title": "Currency",
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "serial_numbers": {
            "description": "Enter serial numbers for new items",
            "nullable": true,
            "type": "string",
            "writeOnly": true
        },
        "stale": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockItemStatusEnum"
                }
            ],
            "maximum": 9223372036854775807,
            "minimum": 0
        },
        "status_custom_key": {
            "description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
            "nullable": true,
            "title": "Custom status key",
            "type": "integer"
        },
        "status_text": {
            "readOnly": true,
            "title": "Status",
            "type": "string"
        },
        "stocktake_date": {
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "supplier_part": {
            "description": "Select a matching supplier part for this stock item",
            "nullable": true,
            "type": "integer"
        },
        "supplier_part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SupplierPart"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tests": {
            "items": {
                "$ref": "#/components/schemas/StockItemTestResult"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "tracking_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "type": "object"
}

{
    "MPN": "string",
    "SKU": "string",
    "allocated": 10.12,
    "barcode_hash": "string",
    "batch": "string",
    "belongs_to": 0,
    "build": 0,
    "child_items": 0,
    "consumed_by": 0,
    "customer": 0,
    "delete_on_deplete": true,
    "expired": true,
    "expiry_date": "2022-04-13",
    "in_stock": true,
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "location_detail": null,
    "location_path": [
        {}
    ],
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "parent": 0,
    "part": 0,
    "part_detail": null,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": "string",
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "serial_numbers": "string",
    "stale": true,
    "status": null,
    "status_custom_key": 0,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "supplier_part_detail": null,
    "tags": [
        "string"
    ],
    "tests": [
        {
            "attachment": "string",
            "date": "2022-04-13T15:42:05.901Z",
            "finished_datetime": "2022-04-13T15:42:05.901Z",
            "notes": "string",
            "pk": 0,
            "result": true,
            "started_datetime": "2022-04-13T15:42:05.901Z",
            "stock_item": 0,
            "template": 0,
            "template_detail": null,
            "test_station": "string",
            "user": 0,
            "user_detail": null,
            "value": "string"
        }
    ],
    "tracking_items": 0,
    "updated": "2022-04-13T15:42:05.901Z",
    "use_pack_size": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
    "properties": {
        "MPN": {
            "nullable": true,
            "readOnly": true,
            "title": "Manufacturer Part Number",
            "type": "string"
        },
        "SKU": {
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part Number",
            "type": "string"
        },
        "allocated": {
            "format": "double",
            "nullable": true,
            "readOnly": true,
            "title": "Allocated Quantity",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "in_stock": {
            "readOnly": true,
            "type": "boolean"
        },
        "installed_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 2000,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "location_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/LocationBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Location"
        },
        "location_path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "notes": {
            "description": "Markdown notes (optional)",
            "maxLength": 50000,
            "nullable": true,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "packaging": {
            "description": "Packaging this stock item is stored in",
            "maxLength": 50,
            "nullable": true,
            "type": "string"
        },
        "parent": {
            "description": "Parent stock item",
            "readOnly": true,
            "title": "Parent Item",
            "type": "integer"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Part"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
            "title": "Currency",
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "serial_numbers": {
            "description": "Enter serial numbers for new items",
            "nullable": true,
            "type": "string",
            "writeOnly": true
        },
        "stale": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockItemStatusEnum"
                }
            ],
            "maximum": 9223372036854775807,
            "minimum": 0
        },
        "status_custom_key": {
            "description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
            "nullable": true,
            "title": "Custom status key",
            "type": "integer"
        },
        "status_text": {
            "readOnly": true,
            "title": "Status",
            "type": "string"
        },
        "stocktake_date": {
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "supplier_part": {
            "description": "Select a matching supplier part for this stock item",
            "nullable": true,
            "type": "integer"
        },
        "supplier_part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SupplierPart"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tests": {
            "items": {
                "$ref": "#/components/schemas/StockItemTestResult"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "tracking_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "type": "object"
}

Response 200 OK

{
    "MPN": "string",
    "SKU": "string",
    "allocated": 10.12,
    "barcode_hash": "string",
    "batch": "string",
    "belongs_to": 0,
    "build": 0,
    "child_items": 0,
    "consumed_by": 0,
    "customer": 0,
    "delete_on_deplete": true,
    "expired": true,
    "expiry_date": "2022-04-13",
    "in_stock": true,
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "location_detail": null,
    "location_path": [
        {}
    ],
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "parent": 0,
    "part": 0,
    "part_detail": null,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": "string",
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "serial_numbers": "string",
    "stale": true,
    "status": null,
    "status_custom_key": 0,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "supplier_part_detail": null,
    "tags": [
        "string"
    ],
    "tests": [
        {
            "attachment": "string",
            "date": "2022-04-13T15:42:05.901Z",
            "finished_datetime": "2022-04-13T15:42:05.901Z",
            "notes": "string",
            "pk": 0,
            "result": true,
            "started_datetime": "2022-04-13T15:42:05.901Z",
            "stock_item": 0,
            "template": 0,
            "template_detail": null,
            "test_station": "string",
            "user": 0,
            "user_detail": null,
            "value": "string"
        }
    ],
    "tracking_items": 0,
    "updated": "2022-04-13T15:42:05.901Z",
    "use_pack_size": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
    "properties": {
        "MPN": {
            "nullable": true,
            "readOnly": true,
            "title": "Manufacturer Part Number",
            "type": "string"
        },
        "SKU": {
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part Number",
            "type": "string"
        },
        "allocated": {
            "format": "double",
            "nullable": true,
            "readOnly": true,
            "title": "Allocated Quantity",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "in_stock": {
            "readOnly": true,
            "type": "boolean"
        },
        "installed_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 2000,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "location_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/LocationBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Location"
        },
        "location_path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "notes": {
            "description": "Markdown notes (optional)",
            "maxLength": 50000,
            "nullable": true,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "packaging": {
            "description": "Packaging this stock item is stored in",
            "maxLength": 50,
            "nullable": true,
            "type": "string"
        },
        "parent": {
            "description": "Parent stock item",
            "readOnly": true,
            "title": "Parent Item",
            "type": "integer"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Part"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
            "title": "Currency",
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "serial_numbers": {
            "description": "Enter serial numbers for new items",
            "nullable": true,
            "type": "string",
            "writeOnly": true
        },
        "stale": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockItemStatusEnum"
                }
            ],
            "maximum": 9223372036854775807,
            "minimum": 0
        },
        "status_custom_key": {
            "description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
            "nullable": true,
            "title": "Custom status key",
            "type": "integer"
        },
        "status_text": {
            "readOnly": true,
            "title": "Status",
            "type": "string"
        },
        "stocktake_date": {
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "supplier_part": {
            "description": "Select a matching supplier part for this stock item",
            "nullable": true,
            "type": "integer"
        },
        "supplier_part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SupplierPart"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tests": {
            "items": {
                "$ref": "#/components/schemas/StockItemTestResult"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "tracking_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "required": [
        "barcode_hash",
        "in_stock",
        "parent",
        "part",
        "pk",
        "quantity",
        "status_text"
    ],
    "type": "object"
}

PUT /api/stock/{id}/

Description

API detail endpoint for a single StockItem instance.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Request body

{
    "MPN": "string",
    "SKU": "string",
    "allocated": 10.12,
    "barcode_hash": "string",
    "batch": "string",
    "belongs_to": 0,
    "build": 0,
    "child_items": 0,
    "consumed_by": 0,
    "customer": 0,
    "delete_on_deplete": true,
    "expired": true,
    "expiry_date": "2022-04-13",
    "in_stock": true,
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "location_detail": null,
    "location_path": [
        {}
    ],
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "parent": 0,
    "part": 0,
    "part_detail": null,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": "string",
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "serial_numbers": "string",
    "stale": true,
    "status": null,
    "status_custom_key": 0,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "supplier_part_detail": null,
    "tags": [
        "string"
    ],
    "tests": [
        {
            "attachment": "string",
            "date": "2022-04-13T15:42:05.901Z",
            "finished_datetime": "2022-04-13T15:42:05.901Z",
            "notes": "string",
            "pk": 0,
            "result": true,
            "started_datetime": "2022-04-13T15:42:05.901Z",
            "stock_item": 0,
            "template": 0,
            "template_detail": null,
            "test_station": "string",
            "user": 0,
            "user_detail": null,
            "value": "string"
        }
    ],
    "tracking_items": 0,
    "updated": "2022-04-13T15:42:05.901Z",
    "use_pack_size": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
    "properties": {
        "MPN": {
            "nullable": true,
            "readOnly": true,
            "title": "Manufacturer Part Number",
            "type": "string"
        },
        "SKU": {
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part Number",
            "type": "string"
        },
        "allocated": {
            "format": "double",
            "nullable": true,
            "readOnly": true,
            "title": "Allocated Quantity",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "in_stock": {
            "readOnly": true,
            "type": "boolean"
        },
        "installed_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 2000,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "location_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/LocationBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Location"
        },
        "location_path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "notes": {
            "description": "Markdown notes (optional)",
            "maxLength": 50000,
            "nullable": true,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "packaging": {
            "description": "Packaging this stock item is stored in",
            "maxLength": 50,
            "nullable": true,
            "type": "string"
        },
        "parent": {
            "description": "Parent stock item",
            "readOnly": true,
            "title": "Parent Item",
            "type": "integer"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Part"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
            "title": "Currency",
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "serial_numbers": {
            "description": "Enter serial numbers for new items",
            "nullable": true,
            "type": "string",
            "writeOnly": true
        },
        "stale": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockItemStatusEnum"
                }
            ],
            "maximum": 9223372036854775807,
            "minimum": 0
        },
        "status_custom_key": {
            "description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
            "nullable": true,
            "title": "Custom status key",
            "type": "integer"
        },
        "status_text": {
            "readOnly": true,
            "title": "Status",
            "type": "string"
        },
        "stocktake_date": {
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "supplier_part": {
            "description": "Select a matching supplier part for this stock item",
            "nullable": true,
            "type": "integer"
        },
        "supplier_part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SupplierPart"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tests": {
            "items": {
                "$ref": "#/components/schemas/StockItemTestResult"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "tracking_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "required": [
        "barcode_hash",
        "in_stock",
        "parent",
        "part",
        "pk",
        "quantity",
        "status_text"
    ],
    "type": "object"
}

{
    "MPN": "string",
    "SKU": "string",
    "allocated": 10.12,
    "barcode_hash": "string",
    "batch": "string",
    "belongs_to": 0,
    "build": 0,
    "child_items": 0,
    "consumed_by": 0,
    "customer": 0,
    "delete_on_deplete": true,
    "expired": true,
    "expiry_date": "2022-04-13",
    "in_stock": true,
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "location_detail": null,
    "location_path": [
        {}
    ],
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "parent": 0,
    "part": 0,
    "part_detail": null,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": "string",
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "serial_numbers": "string",
    "stale": true,
    "status": null,
    "status_custom_key": 0,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "supplier_part_detail": null,
    "tags": [
        "string"
    ],
    "tests": [
        {
            "attachment": "string",
            "date": "2022-04-13T15:42:05.901Z",
            "finished_datetime": "2022-04-13T15:42:05.901Z",
            "notes": "string",
            "pk": 0,
            "result": true,
            "started_datetime": "2022-04-13T15:42:05.901Z",
            "stock_item": 0,
            "template": 0,
            "template_detail": null,
            "test_station": "string",
            "user": 0,
            "user_detail": null,
            "value": "string"
        }
    ],
    "tracking_items": 0,
    "updated": "2022-04-13T15:42:05.901Z",
    "use_pack_size": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
    "properties": {
        "MPN": {
            "nullable": true,
            "readOnly": true,
            "title": "Manufacturer Part Number",
            "type": "string"
        },
        "SKU": {
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part Number",
            "type": "string"
        },
        "allocated": {
            "format": "double",
            "nullable": true,
            "readOnly": true,
            "title": "Allocated Quantity",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "in_stock": {
            "readOnly": true,
            "type": "boolean"
        },
        "installed_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 2000,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "location_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/LocationBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Location"
        },
        "location_path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "notes": {
            "description": "Markdown notes (optional)",
            "maxLength": 50000,
            "nullable": true,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "packaging": {
            "description": "Packaging this stock item is stored in",
            "maxLength": 50,
            "nullable": true,
            "type": "string"
        },
        "parent": {
            "description": "Parent stock item",
            "readOnly": true,
            "title": "Parent Item",
            "type": "integer"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Part"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
            "title": "Currency",
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "serial_numbers": {
            "description": "Enter serial numbers for new items",
            "nullable": true,
            "type": "string",
            "writeOnly": true
        },
        "stale": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockItemStatusEnum"
                }
            ],
            "maximum": 9223372036854775807,
            "minimum": 0
        },
        "status_custom_key": {
            "description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
            "nullable": true,
            "title": "Custom status key",
            "type": "integer"
        },
        "status_text": {
            "readOnly": true,
            "title": "Status",
            "type": "string"
        },
        "stocktake_date": {
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "supplier_part": {
            "description": "Select a matching supplier part for this stock item",
            "nullable": true,
            "type": "integer"
        },
        "supplier_part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SupplierPart"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tests": {
            "items": {
                "$ref": "#/components/schemas/StockItemTestResult"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "tracking_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "required": [
        "barcode_hash",
        "in_stock",
        "parent",
        "part",
        "pk",
        "quantity",
        "status_text"
    ],
    "type": "object"
}

{
    "MPN": "string",
    "SKU": "string",
    "allocated": 10.12,
    "barcode_hash": "string",
    "batch": "string",
    "belongs_to": 0,
    "build": 0,
    "child_items": 0,
    "consumed_by": 0,
    "customer": 0,
    "delete_on_deplete": true,
    "expired": true,
    "expiry_date": "2022-04-13",
    "in_stock": true,
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "location_detail": null,
    "location_path": [
        {}
    ],
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "parent": 0,
    "part": 0,
    "part_detail": null,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": "string",
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "serial_numbers": "string",
    "stale": true,
    "status": null,
    "status_custom_key": 0,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "supplier_part_detail": null,
    "tags": [
        "string"
    ],
    "tests": [
        {
            "attachment": "string",
            "date": "2022-04-13T15:42:05.901Z",
            "finished_datetime": "2022-04-13T15:42:05.901Z",
            "notes": "string",
            "pk": 0,
            "result": true,
            "started_datetime": "2022-04-13T15:42:05.901Z",
            "stock_item": 0,
            "template": 0,
            "template_detail": null,
            "test_station": "string",
            "user": 0,
            "user_detail": null,
            "value": "string"
        }
    ],
    "tracking_items": 0,
    "updated": "2022-04-13T15:42:05.901Z",
    "use_pack_size": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
    "properties": {
        "MPN": {
            "nullable": true,
            "readOnly": true,
            "title": "Manufacturer Part Number",
            "type": "string"
        },
        "SKU": {
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part Number",
            "type": "string"
        },
        "allocated": {
            "format": "double",
            "nullable": true,
            "readOnly": true,
            "title": "Allocated Quantity",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "in_stock": {
            "readOnly": true,
            "type": "boolean"
        },
        "installed_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 2000,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "location_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/LocationBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Location"
        },
        "location_path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "notes": {
            "description": "Markdown notes (optional)",
            "maxLength": 50000,
            "nullable": true,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "packaging": {
            "description": "Packaging this stock item is stored in",
            "maxLength": 50,
            "nullable": true,
            "type": "string"
        },
        "parent": {
            "description": "Parent stock item",
            "readOnly": true,
            "title": "Parent Item",
            "type": "integer"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Part"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
            "title": "Currency",
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "serial_numbers": {
            "description": "Enter serial numbers for new items",
            "nullable": true,
            "type": "string",
            "writeOnly": true
        },
        "stale": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockItemStatusEnum"
                }
            ],
            "maximum": 9223372036854775807,
            "minimum": 0
        },
        "status_custom_key": {
            "description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
            "nullable": true,
            "title": "Custom status key",
            "type": "integer"
        },
        "status_text": {
            "readOnly": true,
            "title": "Status",
            "type": "string"
        },
        "stocktake_date": {
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "supplier_part": {
            "description": "Select a matching supplier part for this stock item",
            "nullable": true,
            "type": "integer"
        },
        "supplier_part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SupplierPart"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tests": {
            "items": {
                "$ref": "#/components/schemas/StockItemTestResult"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "tracking_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "required": [
        "barcode_hash",
        "in_stock",
        "parent",
        "part",
        "pk",
        "quantity",
        "status_text"
    ],
    "type": "object"
}

Response 200 OK

{
    "MPN": "string",
    "SKU": "string",
    "allocated": 10.12,
    "barcode_hash": "string",
    "batch": "string",
    "belongs_to": 0,
    "build": 0,
    "child_items": 0,
    "consumed_by": 0,
    "customer": 0,
    "delete_on_deplete": true,
    "expired": true,
    "expiry_date": "2022-04-13",
    "in_stock": true,
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "location_detail": null,
    "location_path": [
        {}
    ],
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "parent": 0,
    "part": 0,
    "part_detail": null,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": "string",
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "serial_numbers": "string",
    "stale": true,
    "status": null,
    "status_custom_key": 0,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "supplier_part_detail": null,
    "tags": [
        "string"
    ],
    "tests": [
        {
            "attachment": "string",
            "date": "2022-04-13T15:42:05.901Z",
            "finished_datetime": "2022-04-13T15:42:05.901Z",
            "notes": "string",
            "pk": 0,
            "result": true,
            "started_datetime": "2022-04-13T15:42:05.901Z",
            "stock_item": 0,
            "template": 0,
            "template_detail": null,
            "test_station": "string",
            "user": 0,
            "user_detail": null,
            "value": "string"
        }
    ],
    "tracking_items": 0,
    "updated": "2022-04-13T15:42:05.901Z",
    "use_pack_size": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer for a StockItem.\n\n- Includes serialization for the linked part\n- Includes serialization for the item location",
    "properties": {
        "MPN": {
            "nullable": true,
            "readOnly": true,
            "title": "Manufacturer Part Number",
            "type": "string"
        },
        "SKU": {
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part Number",
            "type": "string"
        },
        "allocated": {
            "format": "double",
            "nullable": true,
            "readOnly": true,
            "title": "Allocated Quantity",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "in_stock": {
            "readOnly": true,
            "type": "boolean"
        },
        "installed_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 2000,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "location_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/LocationBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Location"
        },
        "location_path": {
            "items": {
                "additionalProperties": {},
                "type": "object"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "notes": {
            "description": "Markdown notes (optional)",
            "maxLength": 50000,
            "nullable": true,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "packaging": {
            "description": "Packaging this stock item is stored in",
            "maxLength": 50,
            "nullable": true,
            "type": "string"
        },
        "parent": {
            "description": "Parent stock item",
            "readOnly": true,
            "title": "Parent Item",
            "type": "integer"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Part"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "description": "Purchase currency of this stock item\n\n* `AUD` - AUD - Australian Dollar\n* `CAD` - CAD - Canadian Dollar\n* `CNY` - CNY - Chinese Yuan\n* `EUR` - EUR - Euro\n* `GBP` - GBP - British Pound\n* `JPY` - JPY - Japanese Yen\n* `NZD` - NZD - New Zealand Dollar\n* `USD` - USD - US Dollar\n\nOther valid currencies may be found in the 'CURRENCY_CODES' global setting.",
            "title": "Currency",
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "serial_numbers": {
            "description": "Enter serial numbers for new items",
            "nullable": true,
            "type": "string",
            "writeOnly": true
        },
        "stale": {
            "nullable": true,
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockItemStatusEnum"
                }
            ],
            "maximum": 9223372036854775807,
            "minimum": 0
        },
        "status_custom_key": {
            "description": "Additional status information for this item\n\n* `10` - OK\n* `50` - Attention needed\n* `55` - Damaged\n* `60` - Destroyed\n* `65` - Rejected\n* `70` - Lost\n* `75` - Quarantined\n* `85` - Returned\n\nAdditional custom status keys may be retrieved from the corresponding 'status_retrieve' call.",
            "nullable": true,
            "title": "Custom status key",
            "type": "integer"
        },
        "status_text": {
            "readOnly": true,
            "title": "Status",
            "type": "string"
        },
        "stocktake_date": {
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "supplier_part": {
            "description": "Select a matching supplier part for this stock item",
            "nullable": true,
            "type": "integer"
        },
        "supplier_part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SupplierPart"
                }
            ],
            "nullable": true,
            "readOnly": true,
            "title": "Supplier Part"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tests": {
            "items": {
                "$ref": "#/components/schemas/StockItemTestResult"
            },
            "nullable": true,
            "readOnly": true,
            "type": "array"
        },
        "tracking_items": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "required": [
        "barcode_hash",
        "in_stock",
        "parent",
        "part",
        "pk",
        "quantity",
        "status_text"
    ],
    "type": "object"
}

POST /api/stock/{id}/convert/

Description

API endpoint for converting a stock item to a variant part.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Request body

{
    "part": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "DRF serializer class for converting a StockItem to a valid variant part.",
    "properties": {
        "part": {
            "description": "Select part to convert stock item into",
            "type": "integer"
        }
    },
    "required": [
        "part"
    ],
    "type": "object"
}

{
    "part": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "DRF serializer class for converting a StockItem to a valid variant part.",
    "properties": {
        "part": {
            "description": "Select part to convert stock item into",
            "type": "integer"
        }
    },
    "required": [
        "part"
    ],
    "type": "object"
}

{
    "part": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "DRF serializer class for converting a StockItem to a valid variant part.",
    "properties": {
        "part": {
            "description": "Select part to convert stock item into",
            "type": "integer"
        }
    },
    "required": [
        "part"
    ],
    "type": "object"
}

Response 201 Created

{
    "part": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "DRF serializer class for converting a StockItem to a valid variant part.",
    "properties": {
        "part": {
            "description": "Select part to convert stock item into",
            "type": "integer"
        }
    },
    "required": [
        "part"
    ],
    "type": "object"
}

POST /api/stock/{id}/install/

Description

API endpoint for installing a particular stock item into this stock item.

  • stock_item.part must be in the BOM for this part
  • stock_item must currently be "in stock"
  • stock_item must be serialized (and not belong to another item)

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Request body

{
    "note": "string",
    "quantity": 0,
    "stock_item": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for installing a stock item into a given part.",
    "properties": {
        "note": {
            "description": "Add transaction note (optional)",
            "type": "string"
        },
        "quantity": {
            "default": 1,
            "description": "Enter the quantity of items to install",
            "minimum": 1,
            "title": "Quantity to Install",
            "type": "integer"
        },
        "stock_item": {
            "description": "Select stock item to install",
            "type": "integer"
        }
    },
    "required": [
        "stock_item"
    ],
    "type": "object"
}

{
    "note": "string",
    "quantity": 0,
    "stock_item": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for installing a stock item into a given part.",
    "properties": {
        "note": {
            "description": "Add transaction note (optional)",
            "type": "string"
        },
        "quantity": {
            "default": 1,
            "description": "Enter the quantity of items to install",
            "minimum": 1,
            "title": "Quantity to Install",
            "type": "integer"
        },
        "stock_item": {
            "description": "Select stock item to install",
            "type": "integer"
        }
    },
    "required": [
        "stock_item"
    ],
    "type": "object"
}

{
    "note": "string",
    "quantity": 0,
    "stock_item": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer for installing a stock item into a given part.",
    "properties": {
        "note": {
            "description": "Add transaction note (optional)",
            "type": "string"
        },
        "quantity": {
            "default": 1,
            "description": "Enter the quantity of items to install",
            "minimum": 1,
            "title": "Quantity to Install",
            "type": "integer"
        },
        "stock_item": {
            "description": "Select stock item to install",
            "type": "integer"
        }
    },
    "required": [
        "stock_item"
    ],
    "type": "object"
}

Response 201 Created

{
    "note": "string",
    "quantity": 0,
    "stock_item": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer for installing a stock item into a given part.",
    "properties": {
        "note": {
            "description": "Add transaction note (optional)",
            "type": "string"
        },
        "quantity": {
            "default": 1,
            "description": "Enter the quantity of items to install",
            "minimum": 1,
            "title": "Quantity to Install",
            "type": "integer"
        },
        "stock_item": {
            "description": "Select stock item to install",
            "type": "integer"
        }
    },
    "required": [
        "stock_item"
    ],
    "type": "object"
}

GET /api/stock/{id}/metadata/

Description

Generic API endpoint for reading and editing metadata for a model.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Response 200 OK

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "required": [
        "metadata"
    ],
    "type": "object"
}

PATCH /api/stock/{id}/metadata/

Description

Generic API endpoint for reading and editing metadata for a model.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Request body

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "type": "object"
}

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "type": "object"
}

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "type": "object"
}

Response 200 OK

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "required": [
        "metadata"
    ],
    "type": "object"
}

PUT /api/stock/{id}/metadata/

Description

Generic API endpoint for reading and editing metadata for a model.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Request body

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "required": [
        "metadata"
    ],
    "type": "object"
}

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "required": [
        "metadata"
    ],
    "type": "object"
}

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "required": [
        "metadata"
    ],
    "type": "object"
}

Response 200 OK

{
    "metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer class for model metadata API access.",
    "properties": {
        "metadata": {}
    },
    "required": [
        "metadata"
    ],
    "type": "object"
}

GET /api/stock/{id}/serial-numbers/

Description

View extra serial number information for a given stock item.

Provides information on the "previous" and "next" stock items, based on the serial number of the given stock item.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Response 200 OK

{
    "next": null,
    "previous": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer for extra serial number information about a stock item.",
    "properties": {
        "next": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockItem"
                }
            ],
            "readOnly": true,
            "title": "Next Serial Number"
        },
        "previous": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockItem"
                }
            ],
            "readOnly": true,
            "title": "Previous Serial Number"
        }
    },
    "required": [
        "next",
        "previous"
    ],
    "type": "object"
}

POST /api/stock/{id}/serialize/

Description

API endpoint for serializing a stock item.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Request body

{
    "destination": 0,
    "notes": "string",
    "quantity": 0,
    "serial_numbers": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "A DRF serializer for \"serializing\" a StockItem.\n\n(Sorry for the confusing naming...)\n\nHere, \"serializing\" means splitting out a single StockItem,\ninto multiple single-quantity items with an assigned serial number\n\nNote: The base StockItem object is provided to the serializer context",
    "properties": {
        "destination": {
            "description": "Destination stock location",
            "title": "Location",
            "type": "integer"
        },
        "notes": {
            "description": "Optional note field",
            "type": "string"
        },
        "quantity": {
            "description": "Enter number of stock items to serialize",
            "minimum": 0,
            "type": "integer"
        },
        "serial_numbers": {
            "description": "Enter serial numbers for new items",
            "type": "string"
        }
    },
    "required": [
        "destination",
        "quantity",
        "serial_numbers"
    ],
    "type": "object"
}

{
    "destination": 0,
    "notes": "string",
    "quantity": 0,
    "serial_numbers": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "A DRF serializer for \"serializing\" a StockItem.\n\n(Sorry for the confusing naming...)\n\nHere, \"serializing\" means splitting out a single StockItem,\ninto multiple single-quantity items with an assigned serial number\n\nNote: The base StockItem object is provided to the serializer context",
    "properties": {
        "destination": {
            "description": "Destination stock location",
            "title": "Location",
            "type": "integer"
        },
        "notes": {
            "description": "Optional note field",
            "type": "string"
        },
        "quantity": {
            "description": "Enter number of stock items to serialize",
            "minimum": 0,
            "type": "integer"
        },
        "serial_numbers": {
            "description": "Enter serial numbers for new items",
            "type": "string"
        }
    },
    "required": [
        "destination",
        "quantity",
        "serial_numbers"
    ],
    "type": "object"
}

{
    "destination": 0,
    "notes": "string",
    "quantity": 0,
    "serial_numbers": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "A DRF serializer for \"serializing\" a StockItem.\n\n(Sorry for the confusing naming...)\n\nHere, \"serializing\" means splitting out a single StockItem,\ninto multiple single-quantity items with an assigned serial number\n\nNote: The base StockItem object is provided to the serializer context",
    "properties": {
        "destination": {
            "description": "Destination stock location",
            "title": "Location",
            "type": "integer"
        },
        "notes": {
            "description": "Optional note field",
            "type": "string"
        },
        "quantity": {
            "description": "Enter number of stock items to serialize",
            "minimum": 0,
            "type": "integer"
        },
        "serial_numbers": {
            "description": "Enter serial numbers for new items",
            "type": "string"
        }
    },
    "required": [
        "destination",
        "quantity",
        "serial_numbers"
    ],
    "type": "object"
}

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,
        "location_path": [
            {}
        ],
        "notes": "string",
        "owner": 0,
        "packaging": "string",
        "parent": 0,
        "part": 0,
        "part_detail": null,
        "pk": 0,
        "purchase_order": 0,
        "purchase_order_reference": "string",
        "purchase_price": "string",
        "purchase_price_currency": "string",
        "quantity": 10.12,
        "sales_order": 0,
        "sales_order_reference": "string",
        "serial": "string",
        "serial_numbers": "string",
        "stale": true,
        "status": null,
        "status_custom_key": 0,
        "status_text": "string",
        "stocktake_date": "2022-04-13",
        "supplier_part": 0,
        "supplier_part_detail": null,
        "tags": [
            "string"
        ],
        "tests": [
            {
                "attachment": "string",
                "date": "2022-04-13T15:42:05.901Z",
                "finished_datetime": "2022-04-13T15:42:05.901Z",
                "notes": "string",
                "pk": 0,
                "result": true,
                "started_datetime": "2022-04-13T15:42:05.901Z",
                "stock_item": 0,
                "template": 0,
                "template_detail": null,
                "test_station": "string",
                "user": 0,
                "user_detail": null,
                "value": "string"
            }
        ],
        "tracking_items": 0,
        "updated": "2022-04-13T15:42:05.901Z",
        "use_pack_size": true
    }
]
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "items": {
        "$ref": "#/components/schemas/StockItem"
    },
    "type": "array"
}

POST /api/stock/{id}/uninstall/

Description

API endpoint for removing (uninstalling) items from this item.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
id path integer No

Request body

{
    "location": 0,
    "note": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "API serializers for uninstalling an installed item from a stock item.",
    "properties": {
        "location": {
            "description": "Destination location for uninstalled item",
            "type": "integer"
        },
        "note": {
            "description": "Add transaction note (optional)",
            "title": "Notes",
            "type": "string"
        }
    },
    "required": [
        "location"
    ],
    "type": "object"
}

{
    "location": 0,
    "note": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "API serializers for uninstalling an installed item from a stock item.",
    "properties": {
        "location": {
            "description": "Destination location for uninstalled item",
            "type": "integer"
        },
        "note": {
            "description": "Add transaction note (optional)",
            "title": "Notes",
            "type": "string"
        }
    },
    "required": [
        "location"
    ],
    "type": "object"
}

{
    "location": 0,
    "note": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "description": "API serializers for uninstalling an installed item from a stock item.",
    "properties": {
        "location": {
            "description": "Destination location for uninstalled item",
            "type": "integer"
        },
        "note": {
            "description": "Add transaction note (optional)",
            "title": "Notes",
            "type": "string"
        }
    },
    "required": [
        "location"
    ],
    "type": "object"
}

Response 201 Created

{
    "location": 0,
    "note": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "API serializers for uninstalling an installed item from a stock item.",
    "properties": {
        "location": {
            "description": "Destination location for uninstalled item",
            "type": "integer"
        },
        "note": {
            "description": "Add transaction note (optional)",
            "title": "Notes",
            "type": "string"
        }
    },
    "required": [
        "location"
    ],
    "type": "object"
}

Schemas

BlankEnum

Type:

BulkRequest

Name Type
filters
items Array<integer>

CompanyBrief

Name Type
active boolean
currency string
description string
image string(uri)
name string
pk integer
tax_id string
thumbnail string

ConvertStockItem

Name Type
part integer

GenericStateClass

Name Type
status_class string
values

GenericStateValue

Name Type
color string
custom boolean
key integer
label string
logical_key string
name string

InstallStockItem

Name Type
note string
quantity integer
stock_item integer

Location

Name Type
barcode_hash string
custom_icon string| null
description string
external boolean
icon string
items integer
level integer
location_type integer| null
location_type_detail
name string
owner integer| null
parent integer| null
path Array<>
pathstring string
pk integer
structural boolean
sublocations integer
tags Array<string>

LocationBrief

Name Type
name string
pathstring string
pk integer

LocationTree

Name Type
icon string
name string
parent integer| null
pk integer
structural boolean
sublocations integer

ManufacturerPart

Name Type
barcode_hash string
description string| null
link string(uri)| null
manufacturer integer
manufacturer_detail
MPN string| null
notes string| null
parameters Array<Parameter>
part integer
part_detail
pk integer
pretty_name string| null
tags Array<string>

Metadata

Name Type
metadata

ModelType98eEnum

Type: string

NullEnum

Type:

PaginatedLocationList

Name Type
count integer
next string(uri)| null
previous string(uri)| null
results Array<Location>

PaginatedLocationTreeList

Name Type
count integer
next string(uri)| null
previous string(uri)| null
results Array<LocationTree>

PaginatedStockItemList

Name Type
count integer
next string(uri)| null
previous string(uri)| null
results Array<StockItem>

PaginatedStockItemTestResultList

Name Type
count integer
next string(uri)| null
previous string(uri)| null
results Array<StockItemTestResult>

PaginatedStockLocationTypeList

Name Type
count integer
next string(uri)| null
previous string(uri)| null
results Array<StockLocationType>

PaginatedStockTrackingList

Name Type
count integer
next string(uri)| null
previous string(uri)| null
results Array<StockTracking>

Parameter

Name Type
data string
data_numeric number(double)| null
model_id integer(int64)
model_type
note string
pk integer
template integer
template_detail
updated string(date-time)| null
updated_by integer| null
updated_by_detail

ParameterTemplate

Name Type
checkbox boolean
choices string
description string
enabled boolean
model_type
name string
pk integer
selectionlist integer| null
units string

PartBrief

Name Type
active boolean
assembly boolean
barcode_hash string
category_default_location integer| null
component boolean
default_expiry integer(int64)
default_location integer| null
description string
full_name string
image string(uri)| null
IPN string| null
is_template boolean
locked boolean
minimum_stock string(decimal)
name string
pk integer
pricing_max string(decimal)| null
pricing_min string(decimal)| null
purchaseable boolean
revision string| null
salable boolean
testable boolean
thumbnail string
trackable boolean
units string| null
virtual boolean

PartTestTemplate

Name Type
choices string
description string| null
enabled boolean
key string
part integer
pk integer
required boolean
requires_attachment boolean
requires_value boolean
results integer
test_name string

PatchedLocation

Name Type
barcode_hash string
custom_icon string| null
description string
external boolean
icon string
items integer
level integer
location_type integer| null
location_type_detail
name string
owner integer| null
parent integer| null
path Array<>
pathstring string
pk integer
structural boolean
sublocations integer
tags Array<string>

PatchedMetadata

Name Type
metadata

PatchedStockItem

Name Type
allocated number(double)| null
barcode_hash string
batch string| null
belongs_to integer| null
build integer| null
child_items integer| null
consumed_by integer| null
customer integer| null
delete_on_deplete boolean
expired boolean| null
expiry_date string(date)| null
in_stock boolean
installed_items integer| null
is_building boolean
link string(uri)
location integer| null
location_detail
location_path Array<>
MPN string| null
notes string| null
owner integer| null
packaging string| null
parent integer
part integer
part_detail
pk integer
purchase_order integer| null
purchase_order_reference string| null
purchase_price string(decimal)| null
purchase_price_currency string
quantity number(double)
sales_order integer| null
sales_order_reference string| null
serial string| null
serial_numbers string| null
SKU string| null
stale boolean| null
status
status_custom_key integer| null
status_text string
stocktake_date string(date)| null
supplier_part integer| null
supplier_part_detail
tags Array<string>
tests Array<StockItemTestResult>
tracking_items integer| null
updated string(date-time)| null
use_pack_size boolean| null

PatchedStockItemTestResult

Name Type
attachment string(uri)| null
date string(date-time)
finished_datetime string(date-time)| null
notes string
pk integer
result boolean
started_datetime string(date-time)| null
stock_item integer
template integer| null
template_detail
test_station string
user integer| null
user_detail
value string

PatchedStockLocationType

Name Type
description string
icon string
location_count integer| null
name string
pk integer

SerializeStockItem

Name Type
destination integer
notes string
quantity integer
serial_numbers string

StockAdd

Name Type
items Array<StockAdjustmentItem>
notes string

StockAdjustmentItem

Name Type
batch string
packaging string
pk integer
quantity string(decimal)
status integer

StockAssignment

Name Type
customer integer
items Array<StockAssignmentItem>
notes string

StockAssignmentItem

Name Type
item integer

StockChangeStatus

Name Type
items Array<integer>
note string
status integer

StockCount

Name Type
items Array<StockAdjustmentItem>
notes string

StockItem

Name Type
allocated number(double)| null
barcode_hash string
batch string| null
belongs_to integer| null
build integer| null
child_items integer| null
consumed_by integer| null
customer integer| null
delete_on_deplete boolean
expired boolean| null
expiry_date string(date)| null
in_stock boolean
installed_items integer| null
is_building boolean
link string(uri)
location integer| null
location_detail
location_path Array<>
MPN string| null
notes string| null
owner integer| null
packaging string| null
parent integer
part integer
part_detail
pk integer
purchase_order integer| null
purchase_order_reference string| null
purchase_price string(decimal)| null
purchase_price_currency string
quantity number(double)
sales_order integer| null
sales_order_reference string| null
serial string| null
serial_numbers string| null
SKU string| null
stale boolean| null
status
status_custom_key integer| null
status_text string
stocktake_date string(date)| null
supplier_part integer| null
supplier_part_detail
tags Array<string>
tests Array<StockItemTestResult>
tracking_items integer| null
updated string(date-time)| null
use_pack_size boolean| null

StockItemSerialNumbers

Name Type
next
previous

StockItemStatusEnum

Type: integer

StockItemTestResult

Name Type
attachment string(uri)| null
date string(date-time)
finished_datetime string(date-time)| null
notes string
pk integer
result boolean
started_datetime string(date-time)| null
stock_item integer
template integer| null
template_detail
test_station string
user integer| null
user_detail
value string

StockLocationType

Name Type
description string
icon string
location_count integer| null
name string
pk integer

StockMerge

Name Type
allow_mismatched_status boolean
allow_mismatched_suppliers boolean
items Array<StockMergeItem>
location integer
notes string

StockMergeItem

Name Type
item integer

StockRemove

Name Type
items Array<StockAdjustmentItem>
notes string

StockReturn

Name Type
items Array<StockAdjustmentItem>
location integer
merge boolean
notes string

StockTracking

Name Type
date string(date-time)
deltas
item integer
item_detail
label string
notes string| null
pk integer
tracking_type integer
user integer| null
user_detail

StockTransfer

Name Type
items Array<StockAdjustmentItem>
location integer
notes string

SupplierPart

Name Type
active boolean
availability_updated string(date-time)| null
available number(double)
barcode_hash string
description string| null
in_stock number(double)| null
link string(uri)| null
manufacturer_detail
manufacturer_part integer| null
manufacturer_part_detail
MPN string| null
note string| null
notes string| null
on_order number(double)| null
pack_quantity string
pack_quantity_native number(double)
packaging string| null
parameters Array<Parameter>
part integer
part_detail
pk integer
pretty_name string| null
price_breaks Array<SupplierPriceBreakBrief>
SKU string
supplier integer
supplier_detail
tags Array<string>
updated string(date-time)| null

SupplierPriceBreakBrief

Name Type
part integer
pk integer
price string(decimal)| null
price_currency string
quantity number(double)
supplier integer
updated string(date-time)| null

UninstallStockItem

Name Type
location integer
note string

User

Name Type
email string()
first_name string
last_name string
pk integer
username string

Common responses

This section describes common responses that are reused across operations.

allauth.AddAuthenticatorConflict

The account prohibits adding an authenticator, e.g. because of an unverified email address.

Schema of the response body
null

allauth.AddWebAuthnAuthenticator

A WebAuthn authenticator.

{
    "data": null,
    "meta": {
        "recovery_codes_generated": true
    },
    "status": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "data": {
            "$ref": "#/components/schemas/allauth.WebAuthnAuthenticator"
        },
        "meta": {
            "properties": {
                "recovery_codes_generated": {
                    "description": "Whether or not recovery codes where generated automatically.\n",
                    "type": "boolean"
                }
            },
            "type": "object"
        },
        "status": {
            "$ref": "#/components/schemas/allauth.StatusOK"
        }
    },
    "required": [
        "status",
        "data",
        "meta"
    ],
    "type": "object"
}

allauth.Authenticated

The user is authenticated.

Schema of the response body
null

allauth.AuthenticatedByCode

Authenticated by code.

{
    "summary": "Authenticated by code.\n",
    "value": {
        "data": {
            "methods": [
                {
                    "at": 1711555057.065702,
                    "email": "email@domain.org",
                    "method": "code"
                }
            ],
            "user": {
                "display": "Magic Wizard",
                "email": "email@domain.org",
                "has_usable_password": true,
                "id": 123,
                "username": "wizard"
            }
        },
        "meta": {
            "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdW",
            "is_authenticated": true,
            "session_token": "ufwcig0zen9skyd545jc0fkq813ghar2"
        },
        "status": 200
    }
}
Schema of the response body
null

allauth.AuthenticatedByPassword

Authenticated by password.

{
    "summary": "Authenticated by password.\n",
    "value": {
        "data": {
            "methods": [
                {
                    "at": 1711555057.065702,
                    "email": "email@domain.org",
                    "method": "password"
                }
            ],
            "user": {
                "display": "Magic Wizard",
                "email": "email@domain.org",
                "has_usable_password": true,
                "id": 123,
                "username": "wizard"
            }
        },
        "meta": {
            "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdW",
            "is_authenticated": true,
            "session_token": "ufwcig0zen9skyd545jc0fkq813ghar2"
        },
        "status": 200
    }
}
Schema of the response body
null

allauth.AuthenticatedByPasswordAnd2FA

Authenticated by password and 2FA.

{
    "summary": "Fully authenticated using by password and 2FA.\n",
    "value": {
        "data": {
            "methods": [
                {
                    "at": 1711555057.065702,
                    "email": "email@domain.org",
                    "method": "password"
                },
                {
                    "at": 1711555060.9375854,
                    "id": 66,
                    "method": "mfa",
                    "type": "totp"
                }
            ],
            "user": {
                "display": "Magic Wizard",
                "email": "email@domain.org",
                "has_usable_password": true,
                "id": 123,
                "username": "wizard"
            }
        },
        "meta": {
            "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdW",
            "is_authenticated": true,
            "session_token": "ufwcig0zen9skyd545jc0fkq813ghar2"
        },
        "status": 200
    }
}
Schema of the response body
null

allauth.Authentication

Not authenticated.

{
    "summary": "Reauthentication required\n",
    "value": {
        "data": {
            "flows": [
                {
                    "id": "reauthenticate"
                },
                {
                    "id": "mfa_reauthenticate"
                }
            ],
            "methods": [
                {
                    "at": 1711555057.065702,
                    "email": "email@domain.org",
                    "method": "password"
                },
                {
                    "at": 1711555060.9375854,
                    "id": 66,
                    "method": "mfa",
                    "type": "totp"
                }
            ],
            "user": {
                "display": "Magic Wizard",
                "email": "email@domain.org",
                "has_usable_password": true,
                "id": 123,
                "username": "wizard"
            }
        },
        "meta": {
            "is_authenticated": true
        },
        "status": 401
    }
}
{
    "summary": "Unauthenticated: Initial\n",
    "value": {
        "data": {
            "flows": [
                {
                    "id": "login"
                },
                {
                    "id": "signup"
                },
                {
                    "id": "provider_redirect",
                    "providers": [
                        "facebook",
                        "google",
                        "telegram"
                    ]
                },
                {
                    "id": "provider_token",
                    "providers": [
                        "google"
                    ]
                }
            ]
        },
        "meta": {
            "is_authenticated": false
        },
        "status": 401
    }
}
{
    "summary": "Unauthenticated: pending 2FA\n",
    "value": {
        "data": {
            "flows": [
                {
                    "id": "login"
                },
                {
                    "id": "signup"
                },
                {
                    "id": "provider_redirect",
                    "providers": [
                        "facebook",
                        "google",
                        "telegram"
                    ]
                },
                {
                    "id": "provider_token",
                    "providers": [
                        "google"
                    ]
                },
                {
                    "id": "mfa_authenticate",
                    "is_pending": true
                }
            ]
        },
        "meta": {
            "is_authenticated": false
        },
        "status": 401
    }
}
{
    "summary": "Unauthenticated: pending email verification\n",
    "value": {
        "data": {
            "flows": [
                {
                    "id": "login"
                },
                {
                    "id": "signup"
                },
                {
                    "id": "provider_redirect",
                    "providers": [
                        "facebook",
                        "google",
                        "telegram"
                    ]
                },
                {
                    "id": "provider_token",
                    "providers": [
                        "google"
                    ]
                },
                {
                    "id": "verify_email",
                    "is_pending": true
                }
            ]
        },
        "meta": {
            "is_authenticated": false
        },
        "status": 401
    }
}
{
    "summary": "Unauthenticated: pending provider signup\n",
    "value": {
        "data": {
            "flows": [
                {
                    "id": "login"
                },
                {
                    "id": "signup"
                },
                {
                    "id": "provider_redirect",
                    "providers": [
                        "facebook",
                        "google",
                        "telegram"
                    ]
                },
                {
                    "id": "provider_token",
                    "providers": [
                        "google"
                    ]
                },
                {
                    "id": "provider_signup",
                    "is_pending": true,
                    "provider": {
                        "client_id": "123.apps.googleusercontent.com",
                        "flows": [
                            "provider_redirect",
                            "provider_token"
                        ],
                        "id": "google",
                        "name": "Google"
                    }
                }
            ]
        },
        "meta": {
            "is_authenticated": false
        },
        "status": 401
    }
}
Schema of the response body
null

allauth.AuthenticationOrReauthentication

The response indicates authentication or re-authentication is required.

Schema of the response body
{
    "oneOf": [
        {
            "$ref": "#/components/schemas/allauth.AuthenticationResponse"
        },
        {
            "$ref": "#/components/schemas/allauth.ReauthenticationResponse"
        }
    ]
}

allauth.Authenticators

List of authenticators.

{
    "data": null,
    "status": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "data": {
            "$ref": "#/components/schemas/allauth.AuthenticatorList"
        },
        "status": {
            "$ref": "#/components/schemas/allauth.StatusOK"
        }
    },
    "required": [
        "status",
        "data"
    ],
    "type": "object"
}

allauth.Configuration

The django-allauth configuration.

Schema of the response body
null

allauth.EmailAddresses

List of email addresses.

{
    "data": [
        null
    ],
    "status": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "data": {
            "items": {
                "$ref": "#/components/schemas/allauth.EmailAddress"
            },
            "type": "array"
        },
        "status": {
            "$ref": "#/components/schemas/allauth.StatusOK"
        }
    },
    "required": [
        "status",
        "data"
    ],
    "type": "object"
}

allauth.EmailVerificationInfo

Email verification information.

Schema of the response body
null

allauth.Error

An input error occurred.

Schema of the response body
null

allauth.Forbidden

A forbidden response.

Schema of the response body
null

allauth.NotFound

Not found.

{
    "status": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "status": {
            "enum": [
                404
            ],
            "type": "integer"
        }
    },
    "required": [
        "status"
    ],
    "type": "object"
}

allauth.PasswordResetInfo

Information about the password reset key.

{
    "data": {
        "user": null
    },
    "status": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "data": {
            "properties": {
                "user": {
                    "$ref": "#/components/schemas/allauth.User"
                }
            },
            "type": "object"
        },
        "status": {
            "$ref": "#/components/schemas/allauth.StatusOK"
        }
    },
    "required": [
        "status",
        "data"
    ],
    "type": "object"
}

allauth.PhoneNumbers

List of phone numbers.

Schema of the response body
null

allauth.ProviderAccounts

List of third-party provider accounts.

{
    "data": [
        null
    ],
    "status": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "data": {
            "items": {
                "$ref": "#/components/schemas/allauth.ProviderAccount"
            },
            "type": "array"
        },
        "status": {
            "$ref": "#/components/schemas/allauth.StatusOK"
        }
    },
    "required": [
        "status",
        "data"
    ],
    "type": "object"
}

allauth.ProviderSignup

Information relating to the pending provider signup.

{
    "data": {
        "account": null,
        "email": [
            null
        ],
        "user": null
    },
    "status": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "data": {
            "properties": {
                "account": {
                    "$ref": "#/components/schemas/allauth.ProviderAccount"
                },
                "email": {
                    "items": {
                        "$ref": "#/components/schemas/allauth.EmailAddress"
                    },
                    "type": "array"
                },
                "user": {
                    "$ref": "#/components/schemas/allauth.User"
                }
            },
            "required": [
                "email",
                "account",
                "user"
            ],
            "type": "object"
        },
        "status": {
            "$ref": "#/components/schemas/allauth.StatusOK"
        }
    },
    "required": [
        "status",
        "data"
    ],
    "type": "object"
}

allauth.ReauthenticationRequired

The response indicates reauthentication is required.

{
    "data": {
        "flows": [
            {
                "id": "reauthenticate"
            },
            {
                "id": "mfa_reauthenticate"
            }
        ],
        "methods": [
            {
                "at": 1711555057.065702,
                "email": "email@domain.org",
                "method": "password"
            },
            {
                "at": 1711555060.9375854,
                "id": 66,
                "method": "mfa",
                "type": "totp"
            }
        ],
        "user": {
            "display": "Magic Wizard",
            "email": "email@domain.org",
            "has_usable_password": true,
            "id": 123,
            "username": "wizard"
        }
    },
    "meta": {
        "is_authenticated": true
    },
    "status": 401
}
Schema of the response body
null

allauth.RecoveryCodes

Information on the recovery codes.

{
    "data": null,
    "status": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "data": {
            "$ref": "#/components/schemas/allauth.SensitiveRecoveryCodesAuthenticator"
        },
        "status": {
            "$ref": "#/components/schemas/allauth.StatusOK"
        }
    },
    "required": [
        "status",
        "data"
    ],
    "type": "object"
}

allauth.RefreshToken

A new access token (and optionally new refresh token).

{
    "data": {
        "access_token": null,
        "refresh_token": null
    },
    "status": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "data": {
            "properties": {
                "access_token": {
                    "$ref": "#/components/schemas/allauth.AccessToken"
                },
                "refresh_token": {
                    "$ref": "#/components/schemas/allauth.RefreshToken"
                }
            },
            "required": [
                "access_token"
            ],
            "type": "object"
        },
        "status": {
            "$ref": "#/components/schemas/allauth.StatusOK"
        }
    },
    "required": [
        "data",
        "status"
    ],
    "type": "object"
}

allauth.SessionGone

The response indicates session is invalid or no longer exists.

{
    "summary": "Unauthenticated: Initial\n",
    "value": {
        "data": {
            "flows": [
                {
                    "id": "login"
                },
                {
                    "id": "signup"
                },
                {
                    "id": "provider_redirect",
                    "providers": [
                        "facebook",
                        "google",
                        "telegram"
                    ]
                },
                {
                    "id": "provider_token",
                    "providers": [
                        "google"
                    ]
                }
            ]
        },
        "meta": {
            "is_authenticated": false
        },
        "status": 401
    }
}
Schema of the response body
null

allauth.Sessions

List of sessions.

{
    "data": [
        null
    ],
    "status": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "data": {
            "items": {
                "$ref": "#/components/schemas/allauth.Session"
            },
            "type": "array"
        },
        "status": {
            "$ref": "#/components/schemas/allauth.StatusOK"
        }
    },
    "required": [
        "status",
        "data"
    ],
    "type": "object"
}

allauth.StatusOK

A success response.

{
    "status": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "status": {
            "$ref": "#/components/schemas/allauth.StatusOK"
        }
    },
    "required": [
        "status"
    ],
    "type": "object"
}

allauth.TOTPAuthenticator

Information on the TOTP authenticator.

{
    "data": null,
    "meta": {
        "recovery_codes_generated": true
    },
    "status": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "data": {
            "$ref": "#/components/schemas/allauth.TOTPAuthenticator"
        },
        "meta": {
            "properties": {
                "recovery_codes_generated": {
                    "description": "Whether or not recovery codes where generated automatically.",
                    "type": "boolean"
                }
            },
            "type": "object"
        },
        "status": {
            "$ref": "#/components/schemas/allauth.StatusOK"
        }
    },
    "required": [
        "status",
        "data"
    ],
    "type": "object"
}

allauth.TOTPAuthenticatorNotFound

No TOTP authenticator has been set up.

{
    "meta": {
        "secret": "J4ZKKXTK7NOVU7EPUVY23LCDV4T2QZYM",
        "totp_url": "otpauth://totp/Example:alice@fsf.org?secret=JBSWY3DPEHPK3PXP&issuer=Example"
    },
    "status": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "meta": {
            "properties": {
                "secret": {
                    "description": "A TOTP secret that can be used to setup a new authenticator.\n",
                    "example": "J4ZKKXTK7NOVU7EPUVY23LCDV4T2QZYM",
                    "type": "string"
                },
                "totp_url": {
                    "description": "otpauth URI from which a QR code can be generated and scanned by OTP clients.\n",
                    "example": "otpauth://totp/Example:alice@fsf.org?secret=JBSWY3DPEHPK3PXP&issuer=Example",
                    "type": "string"
                }
            },
            "required": [
                "secret",
                "totp_url"
            ],
            "type": "object"
        },
        "status": {
            "enum": [
                404
            ],
            "type": "integer"
        }
    },
    "required": [
        "status",
        "meta"
    ],
    "type": "object"
}

allauth.TooManyRequests

Too many requests.

{
    "status": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "status": {
            "enum": [
                429
            ],
            "type": "integer"
        }
    },
    "required": [
        "status"
    ],
    "type": "object"
}

allauth.Unauthenticated

There is no authenticated session.

{
    "summary": "Unauthenticated: Initial\n",
    "value": {
        "data": {
            "flows": [
                {
                    "id": "login"
                },
                {
                    "id": "signup"
                },
                {
                    "id": "provider_redirect",
                    "providers": [
                        "facebook",
                        "google",
                        "telegram"
                    ]
                },
                {
                    "id": "provider_token",
                    "providers": [
                        "google"
                    ]
                }
            ]
        },
        "meta": {
            "is_authenticated": false
        },
        "status": 401
    }
}
Schema of the response body
null

allauth.WebAuthnAuthenticator

A WebAuthn authenticator.

{
    "data": null,
    "status": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "data": {
            "$ref": "#/components/schemas/allauth.WebAuthnAuthenticator"
        },
        "status": {
            "$ref": "#/components/schemas/allauth.StatusOK"
        }
    },
    "required": [
        "status",
        "data"
    ],
    "type": "object"
}

allauth.WebAuthnCreationOptionsResponse

WebAuthn credential creation options.

{
    "data": null,
    "status": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "data": {
            "$ref": "#/components/schemas/allauth.WebAuthnCredentialCreationOptions"
        },
        "status": {
            "$ref": "#/components/schemas/allauth.StatusOK"
        }
    },
    "required": [
        "status",
        "data"
    ],
    "type": "object"
}

allauth.WebAuthnRequestOptionsResponse

WebAuthn credential request options.

{
    "data": null,
    "status": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "data": {
            "$ref": "#/components/schemas/allauth.WebAuthnCredentialRequestOptions"
        },
        "status": {
            "$ref": "#/components/schemas/allauth.StatusOK"
        }
    },
    "required": [
        "status",
        "data"
    ],
    "type": "object"
}

Common parameters

This section describes common parameters that are reused across operations.

allauth.EmailVerificationKey

Name In Type Default Nullable Description
X-Email-Verification-Key header string No

allauth.PasswordLess

Name In Type Default Nullable Description
passwordless query boolean No

allauth.PasswordResetKey

Name In Type Default Nullable Description
X-Password-Reset-Key header string No

Security schemes

Name Type Scheme Description
basicAuth http basic
cookieAuth apiKey
oauth2 oauth2
tokenAuth apiKey Token-based authentication with required prefix "Token"

More documentation

More information about InvenTree in the official docs


For more information: https://docs.inventree.org