Skip to content

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

InvenTree API 196

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.

We expect a list of primary-key (ID) values to be supplied as a JSON object, e.g. { items: [4, 8, 15, 16, 23, 42] }

Input parameters

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

Response 204 No Content


GET /api/stock/

Description

Generic handler for a download request.

Input parameters

Parameter In Type Default Nullable Description
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
active query boolean No Active
allocated query boolean No Is Allocated
ancestor query integer No
assembly query boolean No Assembly
available query boolean No Available
batch query string No Batch code filter (case insensitive)
batch_regex query string No Batch code filter (regex)
belongs_to query integer No
bom_item query integer No
build query integer No
category query integer No
company query integer No
consumed_by query integer No
customer query integer No
depleted query boolean No Depleted
expired query boolean No Expired
expiry_date_gte query string No Expiry date after
expiry_date_lte 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
installed query boolean No Installed in other stock item
IPN query string No Part IPN (case insensitive)
IPN_contains query string No Part IPN contains (case insensitive)
IPN_regex query string No Part IPN (regex)
is_building query boolean No In production
limit query integer No Number of results to return per page.
manufacturer query integer No
max_stock query number No Maximum stock
min_stock query number No Minimum stock
name query string No Part name (case insensitive)
name_contains query string No Part name contains (case insensitive)
name_regex query string No Part name (regex)
offset query integer No The initial index from which to return the results.
ordering query string No Which field to use when ordering the results.
part_tree query integer No
purchase_order query integer No
salable query boolean No Salable
sales_order query integer No
search query string No A search term.
sent_to_customer query boolean No Sent to customer
serial query string No Serial number
serial_gte query integer No Serial number GTE
serial_lte query integer No Serial number LTE
serialized query boolean No Has serial number
stale query boolean No Stale
status query integer No Status Code
supplier query integer No Supplier
supplier_part query integer No
tags__name query string No
tags__slug query string No
tracked query boolean No Tracked
updated_after query string No Updated after
updated_before query string No Updated before

Response 200 OK

{
    "count": 123,
    "next": "http://api.example.org/accounts/?offset=400&limit=100",
    "previous": "http://api.example.org/accounts/?offset=200&limit=100",
    "results": [
        {
            "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",
            "installed_items": 0,
            "is_building": true,
            "link": "string",
            "location": 0,
            "notes": "string",
            "owner": 0,
            "packaging": "string",
            "part": 0,
            "pk": 0,
            "purchase_order": 0,
            "purchase_order_reference": "string",
            "purchase_price": "string",
            "purchase_price_currency": null,
            "quantity": 10.12,
            "sales_order": 0,
            "sales_order_reference": "string",
            "serial": "string",
            "stale": true,
            "status": null,
            "status_text": "string",
            "stocktake_date": "2022-04-13",
            "supplier_part": 0,
            "tags": [
                "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"
        }
    },
    "type": "object"
}

POST /api/stock/

Description

API endpoint for list view of Stock objects.

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

Input parameters

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

Request body

{
    "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",
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "part": 0,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": null,
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "stale": true,
    "status": null,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "tags": [
        "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": {
        "allocated": {
            "format": "double",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "installed_items": {
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "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"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SalePriceCurrencyEnum"
                }
            ],
            "description": "Purchase currency of this stock item\n\n* `AUD` - Australian Dollar\n* `CAD` - Canadian Dollar\n* `CNY` - Chinese Yuan\n* `EUR` - Euro\n* `GBP` - British Pound\n* `JPY` - Japanese Yen\n* `NZD` - New Zealand Dollar\n* `USD` - US Dollar",
            "title": "Currency"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "stale": {
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/Status2a7Enum"
                }
            ],
            "minimum": 0
        },
        "status_text": {
            "readOnly": true,
            "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"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tracking_items": {
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "required": [
        "barcode_hash",
        "child_items",
        "expired",
        "installed_items",
        "part",
        "pk",
        "purchase_order_reference",
        "quantity",
        "sales_order_reference",
        "stale",
        "status_text",
        "stocktake_date",
        "tracking_items",
        "updated"
    ],
    "type": "object"
}

{
    "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",
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "part": 0,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": null,
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "stale": true,
    "status": null,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "tags": [
        "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": {
        "allocated": {
            "format": "double",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "installed_items": {
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "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"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SalePriceCurrencyEnum"
                }
            ],
            "description": "Purchase currency of this stock item\n\n* `AUD` - Australian Dollar\n* `CAD` - Canadian Dollar\n* `CNY` - Chinese Yuan\n* `EUR` - Euro\n* `GBP` - British Pound\n* `JPY` - Japanese Yen\n* `NZD` - New Zealand Dollar\n* `USD` - US Dollar",
            "title": "Currency"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "stale": {
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/Status2a7Enum"
                }
            ],
            "minimum": 0
        },
        "status_text": {
            "readOnly": true,
            "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"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tracking_items": {
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "required": [
        "barcode_hash",
        "child_items",
        "expired",
        "installed_items",
        "part",
        "pk",
        "purchase_order_reference",
        "quantity",
        "sales_order_reference",
        "stale",
        "status_text",
        "stocktake_date",
        "tracking_items",
        "updated"
    ],
    "type": "object"
}

{
    "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",
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "part": 0,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": null,
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "stale": true,
    "status": null,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "tags": [
        "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": {
        "allocated": {
            "format": "double",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "installed_items": {
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "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"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SalePriceCurrencyEnum"
                }
            ],
            "description": "Purchase currency of this stock item\n\n* `AUD` - Australian Dollar\n* `CAD` - Canadian Dollar\n* `CNY` - Chinese Yuan\n* `EUR` - Euro\n* `GBP` - British Pound\n* `JPY` - Japanese Yen\n* `NZD` - New Zealand Dollar\n* `USD` - US Dollar",
            "title": "Currency"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "stale": {
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/Status2a7Enum"
                }
            ],
            "minimum": 0
        },
        "status_text": {
            "readOnly": true,
            "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"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tracking_items": {
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "required": [
        "barcode_hash",
        "child_items",
        "expired",
        "installed_items",
        "part",
        "pk",
        "purchase_order_reference",
        "quantity",
        "sales_order_reference",
        "stale",
        "status_text",
        "stocktake_date",
        "tracking_items",
        "updated"
    ],
    "type": "object"
}

Response 201 Created

{
    "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",
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "part": 0,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": null,
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "stale": true,
    "status": null,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "tags": [
        "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": {
        "allocated": {
            "format": "double",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "installed_items": {
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "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"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SalePriceCurrencyEnum"
                }
            ],
            "description": "Purchase currency of this stock item\n\n* `AUD` - Australian Dollar\n* `CAD` - Canadian Dollar\n* `CNY` - Chinese Yuan\n* `EUR` - Euro\n* `GBP` - British Pound\n* `JPY` - Japanese Yen\n* `NZD` - New Zealand Dollar\n* `USD` - US Dollar",
            "title": "Currency"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "stale": {
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/Status2a7Enum"
                }
            ],
            "minimum": 0
        },
        "status_text": {
            "readOnly": true,
            "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"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tracking_items": {
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "required": [
        "barcode_hash",
        "child_items",
        "expired",
        "installed_items",
        "part",
        "pk",
        "purchase_order_reference",
        "quantity",
        "sales_order_reference",
        "stale",
        "status_text",
        "stocktake_date",
        "tracking_items",
        "updated"
    ],
    "type": "object"
}

POST /api/stock/add/

Description

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

Input parameters

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

Request body

{
    "items": [
        {
            "batch": "string",
            "packaging": "string",
            "pk": 0,
            "quantity": "string",
            "status": null
        }
    ],
    "notes": "string"
}
⚠️ 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": null
        }
    ],
    "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": null
        }
    ],
    "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": null
        }
    ],
    "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
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"
}

DELETE /api/stock/attachment/

Description

Perform a DELETE operation against this list endpoint.

We expect a list of primary-key (ID) values to be supplied as a JSON object, e.g. { items: [4, 8, 15, 16, 23, 42] }

Input parameters

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

Response 204 No Content


GET /api/stock/attachment/

Description

API endpoint for listing, creating and bulk deleting a StockItemAttachment (file upload).

Input parameters

Parameter In Type Default Nullable Description
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
limit query integer No Number of results to return per page.
offset query integer No The initial index from which to return the results.
ordering query string No Which field to use when ordering the results.
search query string No A search term.
stock_item query integer 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",
            "comment": "string",
            "filename": "string",
            "link": "string",
            "pk": 0,
            "stock_item": 0,
            "upload_date": "2022-04-13",
            "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/StockItemAttachment"
            },
            "type": "array"
        }
    },
    "type": "object"
}

POST /api/stock/attachment/

Description

API endpoint for listing, creating and bulk deleting a StockItemAttachment (file upload).

Input parameters

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

Request body

{
    "attachment": "string",
    "comment": "string",
    "filename": "string",
    "link": "string",
    "pk": 0,
    "stock_item": 0,
    "upload_date": "2022-04-13",
    "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 request body
{
    "description": "Serializer for StockItemAttachment model.",
    "properties": {
        "attachment": {
            "format": "uri",
            "type": "string"
        },
        "comment": {
            "description": "File comment",
            "maxLength": 100,
            "type": "string"
        },
        "filename": {
            "type": "string"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "nullable": true,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "stock_item": {
            "type": "integer"
        },
        "upload_date": {
            "format": "date",
            "readOnly": true,
            "type": "string"
        },
        "user": {
            "description": "User",
            "nullable": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "readOnly": true
        }
    },
    "required": [
        "pk",
        "stock_item",
        "upload_date",
        "user_detail"
    ],
    "type": "object"
}

{
    "attachment": "string",
    "comment": "string",
    "filename": "string",
    "link": "string",
    "pk": 0,
    "stock_item": 0,
    "upload_date": "2022-04-13",
    "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 request body
{
    "description": "Serializer for StockItemAttachment model.",
    "properties": {
        "attachment": {
            "format": "uri",
            "type": "string"
        },
        "comment": {
            "description": "File comment",
            "maxLength": 100,
            "type": "string"
        },
        "filename": {
            "type": "string"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "nullable": true,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "stock_item": {
            "type": "integer"
        },
        "upload_date": {
            "format": "date",
            "readOnly": true,
            "type": "string"
        },
        "user": {
            "description": "User",
            "nullable": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "readOnly": true
        }
    },
    "required": [
        "pk",
        "stock_item",
        "upload_date",
        "user_detail"
    ],
    "type": "object"
}

{
    "attachment": "string",
    "comment": "string",
    "filename": "string",
    "link": "string",
    "pk": 0,
    "stock_item": 0,
    "upload_date": "2022-04-13",
    "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 request body
{
    "description": "Serializer for StockItemAttachment model.",
    "properties": {
        "attachment": {
            "format": "uri",
            "type": "string"
        },
        "comment": {
            "description": "File comment",
            "maxLength": 100,
            "type": "string"
        },
        "filename": {
            "type": "string"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "nullable": true,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "stock_item": {
            "type": "integer"
        },
        "upload_date": {
            "format": "date",
            "readOnly": true,
            "type": "string"
        },
        "user": {
            "description": "User",
            "nullable": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "readOnly": true
        }
    },
    "required": [
        "pk",
        "stock_item",
        "upload_date",
        "user_detail"
    ],
    "type": "object"
}

Response 201 Created

{
    "attachment": "string",
    "comment": "string",
    "filename": "string",
    "link": "string",
    "pk": 0,
    "stock_item": 0,
    "upload_date": "2022-04-13",
    "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 StockItemAttachment model.",
    "properties": {
        "attachment": {
            "format": "uri",
            "type": "string"
        },
        "comment": {
            "description": "File comment",
            "maxLength": 100,
            "type": "string"
        },
        "filename": {
            "type": "string"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "nullable": true,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "stock_item": {
            "type": "integer"
        },
        "upload_date": {
            "format": "date",
            "readOnly": true,
            "type": "string"
        },
        "user": {
            "description": "User",
            "nullable": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "readOnly": true
        }
    },
    "required": [
        "pk",
        "stock_item",
        "upload_date",
        "user_detail"
    ],
    "type": "object"
}

DELETE /api/stock/attachment/{id}/

Description

Detail endpoint for StockItemAttachment.

Input parameters

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

Response 204 No Content


GET /api/stock/attachment/{id}/

Description

Detail endpoint for StockItemAttachment.

Input parameters

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

Response 200 OK

{
    "attachment": "string",
    "comment": "string",
    "filename": "string",
    "link": "string",
    "pk": 0,
    "stock_item": 0,
    "upload_date": "2022-04-13",
    "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 StockItemAttachment model.",
    "properties": {
        "attachment": {
            "format": "uri",
            "type": "string"
        },
        "comment": {
            "description": "File comment",
            "maxLength": 100,
            "type": "string"
        },
        "filename": {
            "type": "string"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "nullable": true,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "stock_item": {
            "type": "integer"
        },
        "upload_date": {
            "format": "date",
            "readOnly": true,
            "type": "string"
        },
        "user": {
            "description": "User",
            "nullable": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "readOnly": true
        }
    },
    "required": [
        "pk",
        "stock_item",
        "upload_date",
        "user_detail"
    ],
    "type": "object"
}

PATCH /api/stock/attachment/{id}/

Description

Detail endpoint for StockItemAttachment.

Input parameters

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

Request body

{
    "attachment": "string",
    "comment": "string",
    "filename": "string",
    "link": "string",
    "pk": 0,
    "stock_item": 0,
    "upload_date": "2022-04-13",
    "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 request body
{
    "description": "Serializer for StockItemAttachment model.",
    "properties": {
        "attachment": {
            "format": "uri",
            "type": "string"
        },
        "comment": {
            "description": "File comment",
            "maxLength": 100,
            "type": "string"
        },
        "filename": {
            "type": "string"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "nullable": true,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "stock_item": {
            "type": "integer"
        },
        "upload_date": {
            "format": "date",
            "readOnly": true,
            "type": "string"
        },
        "user": {
            "description": "User",
            "nullable": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "readOnly": true
        }
    },
    "type": "object"
}

{
    "attachment": "string",
    "comment": "string",
    "filename": "string",
    "link": "string",
    "pk": 0,
    "stock_item": 0,
    "upload_date": "2022-04-13",
    "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 request body
{
    "description": "Serializer for StockItemAttachment model.",
    "properties": {
        "attachment": {
            "format": "uri",
            "type": "string"
        },
        "comment": {
            "description": "File comment",
            "maxLength": 100,
            "type": "string"
        },
        "filename": {
            "type": "string"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "nullable": true,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "stock_item": {
            "type": "integer"
        },
        "upload_date": {
            "format": "date",
            "readOnly": true,
            "type": "string"
        },
        "user": {
            "description": "User",
            "nullable": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "readOnly": true
        }
    },
    "type": "object"
}

{
    "attachment": "string",
    "comment": "string",
    "filename": "string",
    "link": "string",
    "pk": 0,
    "stock_item": 0,
    "upload_date": "2022-04-13",
    "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 request body
{
    "description": "Serializer for StockItemAttachment model.",
    "properties": {
        "attachment": {
            "format": "uri",
            "type": "string"
        },
        "comment": {
            "description": "File comment",
            "maxLength": 100,
            "type": "string"
        },
        "filename": {
            "type": "string"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "nullable": true,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "stock_item": {
            "type": "integer"
        },
        "upload_date": {
            "format": "date",
            "readOnly": true,
            "type": "string"
        },
        "user": {
            "description": "User",
            "nullable": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "readOnly": true
        }
    },
    "type": "object"
}

Response 200 OK

{
    "attachment": "string",
    "comment": "string",
    "filename": "string",
    "link": "string",
    "pk": 0,
    "stock_item": 0,
    "upload_date": "2022-04-13",
    "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 StockItemAttachment model.",
    "properties": {
        "attachment": {
            "format": "uri",
            "type": "string"
        },
        "comment": {
            "description": "File comment",
            "maxLength": 100,
            "type": "string"
        },
        "filename": {
            "type": "string"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "nullable": true,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "stock_item": {
            "type": "integer"
        },
        "upload_date": {
            "format": "date",
            "readOnly": true,
            "type": "string"
        },
        "user": {
            "description": "User",
            "nullable": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "readOnly": true
        }
    },
    "required": [
        "pk",
        "stock_item",
        "upload_date",
        "user_detail"
    ],
    "type": "object"
}

PUT /api/stock/attachment/{id}/

Description

Detail endpoint for StockItemAttachment.

Input parameters

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

Request body

{
    "attachment": "string",
    "comment": "string",
    "filename": "string",
    "link": "string",
    "pk": 0,
    "stock_item": 0,
    "upload_date": "2022-04-13",
    "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 request body
{
    "description": "Serializer for StockItemAttachment model.",
    "properties": {
        "attachment": {
            "format": "uri",
            "type": "string"
        },
        "comment": {
            "description": "File comment",
            "maxLength": 100,
            "type": "string"
        },
        "filename": {
            "type": "string"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "nullable": true,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "stock_item": {
            "type": "integer"
        },
        "upload_date": {
            "format": "date",
            "readOnly": true,
            "type": "string"
        },
        "user": {
            "description": "User",
            "nullable": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "readOnly": true
        }
    },
    "required": [
        "pk",
        "stock_item",
        "upload_date",
        "user_detail"
    ],
    "type": "object"
}

{
    "attachment": "string",
    "comment": "string",
    "filename": "string",
    "link": "string",
    "pk": 0,
    "stock_item": 0,
    "upload_date": "2022-04-13",
    "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 request body
{
    "description": "Serializer for StockItemAttachment model.",
    "properties": {
        "attachment": {
            "format": "uri",
            "type": "string"
        },
        "comment": {
            "description": "File comment",
            "maxLength": 100,
            "type": "string"
        },
        "filename": {
            "type": "string"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "nullable": true,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "stock_item": {
            "type": "integer"
        },
        "upload_date": {
            "format": "date",
            "readOnly": true,
            "type": "string"
        },
        "user": {
            "description": "User",
            "nullable": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "readOnly": true
        }
    },
    "required": [
        "pk",
        "stock_item",
        "upload_date",
        "user_detail"
    ],
    "type": "object"
}

{
    "attachment": "string",
    "comment": "string",
    "filename": "string",
    "link": "string",
    "pk": 0,
    "stock_item": 0,
    "upload_date": "2022-04-13",
    "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 request body
{
    "description": "Serializer for StockItemAttachment model.",
    "properties": {
        "attachment": {
            "format": "uri",
            "type": "string"
        },
        "comment": {
            "description": "File comment",
            "maxLength": 100,
            "type": "string"
        },
        "filename": {
            "type": "string"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "nullable": true,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "stock_item": {
            "type": "integer"
        },
        "upload_date": {
            "format": "date",
            "readOnly": true,
            "type": "string"
        },
        "user": {
            "description": "User",
            "nullable": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "readOnly": true
        }
    },
    "required": [
        "pk",
        "stock_item",
        "upload_date",
        "user_detail"
    ],
    "type": "object"
}

Response 200 OK

{
    "attachment": "string",
    "comment": "string",
    "filename": "string",
    "link": "string",
    "pk": 0,
    "stock_item": 0,
    "upload_date": "2022-04-13",
    "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 StockItemAttachment model.",
    "properties": {
        "attachment": {
            "format": "uri",
            "type": "string"
        },
        "comment": {
            "description": "File comment",
            "maxLength": 100,
            "type": "string"
        },
        "filename": {
            "type": "string"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "nullable": true,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "stock_item": {
            "type": "integer"
        },
        "upload_date": {
            "format": "date",
            "readOnly": true,
            "type": "string"
        },
        "user": {
            "description": "User",
            "nullable": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "readOnly": true
        }
    },
    "required": [
        "pk",
        "stock_item",
        "upload_date",
        "user_detail"
    ],
    "type": "object"
}

POST /api/stock/change_status/

Description

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

Input parameters

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

Request body

{
    "items": [
        0
    ],
    "note": "string",
    "status": null
}
⚠️ 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": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/Status2a7Enum"
                }
            ],
            "default": 10
        }
    },
    "required": [
        "items"
    ],
    "type": "object"
}

{
    "items": [
        0
    ],
    "note": "string",
    "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 request body
{
    "description": "Serializer for changing status of multiple StockItem objects.",
    "properties": {
        "items": {
            "description": "Select stock items to change status",
            "items": {
                "title": "Stock Items",
                "type": "integer"
            },
            "title": "Stock Items",
            "type": "array"
        },
        "note": {
            "description": "Add transaction note (optional)",
            "title": "Notes",
            "type": "string"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/Status2a7Enum"
                }
            ],
            "default": 10
        }
    },
    "required": [
        "items"
    ],
    "type": "object"
}

{
    "items": [
        0
    ],
    "note": "string",
    "status": null
}
⚠️ 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": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/Status2a7Enum"
                }
            ],
            "default": 10
        }
    },
    "required": [
        "items"
    ],
    "type": "object"
}

Response 201 Created

{
    "items": [
        0
    ],
    "note": "string",
    "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
{
    "description": "Serializer for changing status of multiple StockItem objects.",
    "properties": {
        "items": {
            "description": "Select stock items to change status",
            "items": {
                "title": "Stock Items",
                "type": "integer"
            },
            "title": "Stock Items",
            "type": "array"
        },
        "note": {
            "description": "Add transaction note (optional)",
            "title": "Notes",
            "type": "string"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/Status2a7Enum"
                }
            ],
            "default": 10
        }
    },
    "required": [
        "items"
    ],
    "type": "object"
}

POST /api/stock/count/

Description

Endpoint for counting stock (performing a stocktake).

Input parameters

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

Request body

{
    "items": [
        {
            "batch": "string",
            "packaging": "string",
            "pk": 0,
            "quantity": "string",
            "status": null
        }
    ],
    "notes": "string"
}
⚠️ 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": null
        }
    ],
    "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": null
        }
    ],
    "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": null
        }
    ],
    "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
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
limit query integer No Number of results to return per page.
offset query integer No The initial index from which to return the results.
ordering query string No Which field to use when ordering the results.
search query string No A search term.

Response 200 OK

{
    "count": 123,
    "next": "http://api.example.org/accounts/?offset=400&limit=100",
    "previous": "http://api.example.org/accounts/?offset=200&limit=100",
    "results": [
        {
            "description": "string",
            "icon": "string",
            "location_count": 0,
            "name": "string",
            "pk": 0
        }
    ]
}
⚠️ 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"
        }
    },
    "type": "object"
}

POST /api/stock/location-type/

Description

API endpoint for a list of StockLocationType objects.

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

Input parameters

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

Request body

{
    "description": "string",
    "icon": "string",
    "location_count": 0,
    "name": "string",
    "pk": 0
}
⚠️ 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": {
            "readOnly": true,
            "type": "integer"
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "location_count",
        "name",
        "pk"
    ],
    "type": "object"
}

{
    "description": "string",
    "icon": "string",
    "location_count": 0,
    "name": "string",
    "pk": 0
}
⚠️ 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": {
            "readOnly": true,
            "type": "integer"
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "location_count",
        "name",
        "pk"
    ],
    "type": "object"
}

{
    "description": "string",
    "icon": "string",
    "location_count": 0,
    "name": "string",
    "pk": 0
}
⚠️ 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": {
            "readOnly": true,
            "type": "integer"
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "location_count",
        "name",
        "pk"
    ],
    "type": "object"
}

Response 201 Created

{
    "description": "string",
    "icon": "string",
    "location_count": 0,
    "name": "string",
    "pk": 0
}
⚠️ 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": {
            "readOnly": true,
            "type": "integer"
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "location_count",
        "name",
        "pk"
    ],
    "type": "object"
}

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

Description

API detail endpoint for a StockLocationType object.

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

Input parameters

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

Response 204 No Content


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

Description

API detail endpoint for a StockLocationType object.

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

Input parameters

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

Response 200 OK

{
    "description": "string",
    "icon": "string",
    "location_count": 0,
    "name": "string",
    "pk": 0
}
⚠️ 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": {
            "readOnly": true,
            "type": "integer"
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "location_count",
        "name",
        "pk"
    ],
    "type": "object"
}

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

Description

API detail endpoint for a StockLocationType object.

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

Input parameters

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

Request body

{
    "description": "string",
    "icon": "string",
    "location_count": 0,
    "name": "string",
    "pk": 0
}
⚠️ 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": {
            "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": {
            "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": {
            "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": {
            "readOnly": true,
            "type": "integer"
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "location_count",
        "name",
        "pk"
    ],
    "type": "object"
}

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

Description

API detail endpoint for a StockLocationType object.

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

Input parameters

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

Request body

{
    "description": "string",
    "icon": "string",
    "location_count": 0,
    "name": "string",
    "pk": 0
}
⚠️ 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": {
            "readOnly": true,
            "type": "integer"
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "location_count",
        "name",
        "pk"
    ],
    "type": "object"
}

{
    "description": "string",
    "icon": "string",
    "location_count": 0,
    "name": "string",
    "pk": 0
}
⚠️ 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": {
            "readOnly": true,
            "type": "integer"
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "location_count",
        "name",
        "pk"
    ],
    "type": "object"
}

{
    "description": "string",
    "icon": "string",
    "location_count": 0,
    "name": "string",
    "pk": 0
}
⚠️ 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": {
            "readOnly": true,
            "type": "integer"
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "location_count",
        "name",
        "pk"
    ],
    "type": "object"
}

Response 200 OK

{
    "description": "string",
    "icon": "string",
    "location_count": 0,
    "name": "string",
    "pk": 0
}
⚠️ 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": {
            "readOnly": true,
            "type": "integer"
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "location_count",
        "name",
        "pk"
    ],
    "type": "object"
}

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

Description

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

Input parameters

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

Response 200 OK

{
    "metadata": null
}
⚠️ 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
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
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

Generic handler for a download request.

Input parameters

Parameter In Type Default Nullable Description
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
cascade query boolean No Include sub-locations in filtered results
depth query number No Filter by location depth
external query boolean No
has_location_type query boolean No has_location_type
limit query integer No Number of results to return per page.
location_type query integer No
name query string No
offset query integer No The initial index from which to return the results.
ordering query string No Which field to use when ordering the results.
parent query integer No Filter by parent location
search query string No A search term.
structural query boolean No

Response 200 OK

{
    "count": 123,
    "next": "http://api.example.org/accounts/?offset=400&limit=100",
    "previous": "http://api.example.org/accounts/?offset=200&limit=100",
    "results": [
        {
            "barcode_hash": "string",
            "custom_icon": "string",
            "description": "string",
            "external": true,
            "icon": "string",
            "items": 0,
            "level": 0,
            "location_type": 0,
            "location_type_detail": null,
            "name": "string",
            "owner": 0,
            "parent": 0,
            "pathstring": "string",
            "pk": 0,
            "structural": true,
            "sublocations": 0,
            "tags": [
                "string"
            ],
            "url": "string"
        }
    ]
}
⚠️ 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"
        }
    },
    "type": "object"
}

POST /api/stock/location/

Description

API endpoint for list view of StockLocation objects.

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

Input parameters

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

Request body

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ],
    "url": "string"
}
⚠️ 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,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "nullable": true,
            "type": "integer"
        },
        "pathstring": {
            "description": "Path",
            "maxLength": 250,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "url": {
            "readOnly": true,
            "type": "string"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "location_type_detail",
        "name",
        "pk",
        "sublocations",
        "url"
    ],
    "type": "object"
}

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ],
    "url": "string"
}
⚠️ 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,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "nullable": true,
            "type": "integer"
        },
        "pathstring": {
            "description": "Path",
            "maxLength": 250,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "url": {
            "readOnly": true,
            "type": "string"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "location_type_detail",
        "name",
        "pk",
        "sublocations",
        "url"
    ],
    "type": "object"
}

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ],
    "url": "string"
}
⚠️ 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,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "nullable": true,
            "type": "integer"
        },
        "pathstring": {
            "description": "Path",
            "maxLength": 250,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "url": {
            "readOnly": true,
            "type": "string"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "location_type_detail",
        "name",
        "pk",
        "sublocations",
        "url"
    ],
    "type": "object"
}

Response 201 Created

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ],
    "url": "string"
}
⚠️ 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,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "nullable": true,
            "type": "integer"
        },
        "pathstring": {
            "description": "Path",
            "maxLength": 250,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "url": {
            "readOnly": true,
            "type": "string"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "location_type_detail",
        "name",
        "pk",
        "sublocations",
        "url"
    ],
    "type": "object"
}

GET /api/stock/location/tree/

Description

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

Input parameters

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

Response 200 OK

{
    "count": 123,
    "next": "http://api.example.org/accounts/?offset=400&limit=100",
    "previous": "http://api.example.org/accounts/?offset=200&limit=100",
    "results": [
        {
            "icon": "string",
            "name": "string",
            "parent": 0,
            "pk": 0,
            "structural": true,
            "sublocations": 0
        }
    ]
}
⚠️ 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"
        }
    },
    "type": "object"
}

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

Description

Custom delete method to pass kwargs.

Input parameters

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

Response 204 No Content


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

Description

Custom get method to pass kwargs.

Input parameters

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

Response 200 OK

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ],
    "url": "string"
}
⚠️ 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,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "nullable": true,
            "type": "integer"
        },
        "pathstring": {
            "description": "Path",
            "maxLength": 250,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "url": {
            "readOnly": true,
            "type": "string"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "location_type_detail",
        "name",
        "pk",
        "sublocations",
        "url"
    ],
    "type": "object"
}

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

Description

Custom patch method to pass kwargs.

Input parameters

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

Request body

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ],
    "url": "string"
}
⚠️ 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,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "nullable": true,
            "type": "integer"
        },
        "pathstring": {
            "description": "Path",
            "maxLength": 250,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "url": {
            "readOnly": true,
            "type": "string"
        }
    },
    "type": "object"
}

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ],
    "url": "string"
}
⚠️ 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,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "nullable": true,
            "type": "integer"
        },
        "pathstring": {
            "description": "Path",
            "maxLength": 250,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "url": {
            "readOnly": true,
            "type": "string"
        }
    },
    "type": "object"
}

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ],
    "url": "string"
}
⚠️ 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,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "nullable": true,
            "type": "integer"
        },
        "pathstring": {
            "description": "Path",
            "maxLength": 250,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "url": {
            "readOnly": true,
            "type": "string"
        }
    },
    "type": "object"
}

Response 200 OK

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ],
    "url": "string"
}
⚠️ 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,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "nullable": true,
            "type": "integer"
        },
        "pathstring": {
            "description": "Path",
            "maxLength": 250,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "url": {
            "readOnly": true,
            "type": "string"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "location_type_detail",
        "name",
        "pk",
        "sublocations",
        "url"
    ],
    "type": "object"
}

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

Description

Custom put method to pass kwargs.

Input parameters

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

Request body

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ],
    "url": "string"
}
⚠️ 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,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "nullable": true,
            "type": "integer"
        },
        "pathstring": {
            "description": "Path",
            "maxLength": 250,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "url": {
            "readOnly": true,
            "type": "string"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "location_type_detail",
        "name",
        "pk",
        "sublocations",
        "url"
    ],
    "type": "object"
}

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ],
    "url": "string"
}
⚠️ 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,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "nullable": true,
            "type": "integer"
        },
        "pathstring": {
            "description": "Path",
            "maxLength": 250,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "url": {
            "readOnly": true,
            "type": "string"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "location_type_detail",
        "name",
        "pk",
        "sublocations",
        "url"
    ],
    "type": "object"
}

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ],
    "url": "string"
}
⚠️ 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,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "nullable": true,
            "type": "integer"
        },
        "pathstring": {
            "description": "Path",
            "maxLength": 250,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "url": {
            "readOnly": true,
            "type": "string"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "location_type_detail",
        "name",
        "pk",
        "sublocations",
        "url"
    ],
    "type": "object"
}

Response 200 OK

{
    "barcode_hash": "string",
    "custom_icon": "string",
    "description": "string",
    "external": true,
    "icon": "string",
    "items": 0,
    "level": 0,
    "location_type": 0,
    "location_type_detail": null,
    "name": "string",
    "owner": 0,
    "parent": 0,
    "pathstring": "string",
    "pk": 0,
    "structural": true,
    "sublocations": 0,
    "tags": [
        "string"
    ],
    "url": "string"
}
⚠️ 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,
            "title": "Icon",
            "type": "string"
        },
        "description": {
            "description": "Description (optional)",
            "maxLength": 250,
            "type": "string"
        },
        "external": {
            "description": "This is an external stock location",
            "type": "boolean"
        },
        "icon": {
            "readOnly": true,
            "type": "string"
        },
        "items": {
            "readOnly": true,
            "title": "Stock Items",
            "type": "integer"
        },
        "level": {
            "readOnly": true,
            "type": "integer"
        },
        "location_type": {
            "description": "Stock location type of this location",
            "nullable": true,
            "type": "integer"
        },
        "location_type_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/StockLocationType"
                }
            ],
            "readOnly": true
        },
        "name": {
            "description": "Name",
            "maxLength": 100,
            "type": "string"
        },
        "owner": {
            "description": "Select Owner",
            "nullable": true,
            "type": "integer"
        },
        "parent": {
            "nullable": true,
            "type": "integer"
        },
        "pathstring": {
            "description": "Path",
            "maxLength": 250,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "structural": {
            "description": "Stock items may not be directly located into a structural stock locations, but may be located to child locations.",
            "type": "boolean"
        },
        "sublocations": {
            "readOnly": true,
            "type": "integer"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "url": {
            "readOnly": true,
            "type": "string"
        }
    },
    "required": [
        "barcode_hash",
        "icon",
        "items",
        "level",
        "location_type_detail",
        "name",
        "pk",
        "sublocations",
        "url"
    ],
    "type": "object"
}

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

Description

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

Input parameters

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

Response 200 OK

{
    "metadata": null
}
⚠️ 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
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
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
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
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"

Request body

{
    "items": [
        {
            "batch": "string",
            "packaging": "string",
            "pk": 0,
            "quantity": "string",
            "status": null
        }
    ],
    "notes": "string"
}
⚠️ 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": null
        }
    ],
    "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": null
        }
    ],
    "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": null
        }
    ],
    "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"
}

GET /api/stock/status/

Description

Retrieve information about a specific status code

Input parameters

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

Response 200 OK

Response 400 Bad Request


DELETE /api/stock/test/

Description

Perform a DELETE operation against this list endpoint.

We expect a list of primary-key (ID) values to be supplied as a JSON object, e.g. { items: [4, 8, 15, 16, 23, 42] }

Input parameters

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

Response 204 No Content


GET /api/stock/test/

Description

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

Input parameters

Parameter In Type Default Nullable Description
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
build query integer No Build
enabled query boolean No Enabled
limit query integer No Number of results to return per page.
offset query integer No The initial index from which to return the results.
ordering query string No Which field to use when ordering the results.
part query integer No Part
required query boolean No Required
result query boolean No
search query string No A search term.
template query integer No
test query string No Test name (case insensitive)
user query integer No
value query string No

Response 200 OK

{
    "count": 123,
    "next": "http://api.example.org/accounts/?offset=400&limit=100",
    "previous": "http://api.example.org/accounts/?offset=200&limit=100",
    "results": [
        {
            "attachment": "string",
            "date": "2022-04-13T15:42:05.901Z",
            "finished_datetime": "2022-04-13T15:42:05.901Z",
            "notes": "string",
            "pk": 0,
            "result": true,
            "started_datetime": "2022-04-13T15:42:05.901Z",
            "stock_item": 0,
            "template": 0,
            "test_station": "string",
            "user": 0,
            "value": "string"
        }
    ]
}
⚠️ 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"
        }
    },
    "type": "object"
}

POST /api/stock/test/

Description

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

Input parameters

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

Request body

{
    "attachment": "string",
    "date": "2022-04-13T15:42:05.901Z",
    "finished_datetime": "2022-04-13T15:42:05.901Z",
    "notes": "string",
    "pk": 0,
    "result": true,
    "started_datetime": "2022-04-13T15:42:05.901Z",
    "stock_item": 0,
    "template": 0,
    "test_station": "string",
    "user": 0,
    "value": "string"
}
⚠️ 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": {
            "format": "uri",
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "required": [
        "date",
        "pk",
        "stock_item",
        "user"
    ],
    "type": "object"
}

{
    "attachment": "string",
    "date": "2022-04-13T15:42:05.901Z",
    "finished_datetime": "2022-04-13T15:42:05.901Z",
    "notes": "string",
    "pk": 0,
    "result": true,
    "started_datetime": "2022-04-13T15:42:05.901Z",
    "stock_item": 0,
    "template": 0,
    "test_station": "string",
    "user": 0,
    "value": "string"
}
⚠️ 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": {
            "format": "uri",
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "required": [
        "date",
        "pk",
        "stock_item",
        "user"
    ],
    "type": "object"
}

{
    "attachment": "string",
    "date": "2022-04-13T15:42:05.901Z",
    "finished_datetime": "2022-04-13T15:42:05.901Z",
    "notes": "string",
    "pk": 0,
    "result": true,
    "started_datetime": "2022-04-13T15:42:05.901Z",
    "stock_item": 0,
    "template": 0,
    "test_station": "string",
    "user": 0,
    "value": "string"
}
⚠️ 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": {
            "format": "uri",
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "required": [
        "date",
        "pk",
        "stock_item",
        "user"
    ],
    "type": "object"
}

Response 201 Created

{
    "attachment": "string",
    "date": "2022-04-13T15:42:05.901Z",
    "finished_datetime": "2022-04-13T15:42:05.901Z",
    "notes": "string",
    "pk": 0,
    "result": true,
    "started_datetime": "2022-04-13T15:42:05.901Z",
    "stock_item": 0,
    "template": 0,
    "test_station": "string",
    "user": 0,
    "value": "string"
}
⚠️ 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": {
            "format": "uri",
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "required": [
        "date",
        "pk",
        "stock_item",
        "user"
    ],
    "type": "object"
}

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

Description

Detail endpoint for StockItemTestResult.

Input parameters

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

Response 204 No Content


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

Description

Detail endpoint for StockItemTestResult.

Input parameters

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

Response 200 OK

{
    "attachment": "string",
    "date": "2022-04-13T15:42:05.901Z",
    "finished_datetime": "2022-04-13T15:42:05.901Z",
    "notes": "string",
    "pk": 0,
    "result": true,
    "started_datetime": "2022-04-13T15:42:05.901Z",
    "stock_item": 0,
    "template": 0,
    "test_station": "string",
    "user": 0,
    "value": "string"
}
⚠️ 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": {
            "format": "uri",
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "required": [
        "date",
        "pk",
        "stock_item",
        "user"
    ],
    "type": "object"
}

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

Description

Detail endpoint for StockItemTestResult.

Input parameters

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

Request body

{
    "attachment": "string",
    "date": "2022-04-13T15:42:05.901Z",
    "finished_datetime": "2022-04-13T15:42:05.901Z",
    "notes": "string",
    "pk": 0,
    "result": true,
    "started_datetime": "2022-04-13T15:42:05.901Z",
    "stock_item": 0,
    "template": 0,
    "test_station": "string",
    "user": 0,
    "value": "string"
}
⚠️ 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": {
            "format": "uri",
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "type": "object"
}

{
    "attachment": "string",
    "date": "2022-04-13T15:42:05.901Z",
    "finished_datetime": "2022-04-13T15:42:05.901Z",
    "notes": "string",
    "pk": 0,
    "result": true,
    "started_datetime": "2022-04-13T15:42:05.901Z",
    "stock_item": 0,
    "template": 0,
    "test_station": "string",
    "user": 0,
    "value": "string"
}
⚠️ 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": {
            "format": "uri",
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "type": "object"
}

{
    "attachment": "string",
    "date": "2022-04-13T15:42:05.901Z",
    "finished_datetime": "2022-04-13T15:42:05.901Z",
    "notes": "string",
    "pk": 0,
    "result": true,
    "started_datetime": "2022-04-13T15:42:05.901Z",
    "stock_item": 0,
    "template": 0,
    "test_station": "string",
    "user": 0,
    "value": "string"
}
⚠️ 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": {
            "format": "uri",
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "type": "object"
}

Response 200 OK

{
    "attachment": "string",
    "date": "2022-04-13T15:42:05.901Z",
    "finished_datetime": "2022-04-13T15:42:05.901Z",
    "notes": "string",
    "pk": 0,
    "result": true,
    "started_datetime": "2022-04-13T15:42:05.901Z",
    "stock_item": 0,
    "template": 0,
    "test_station": "string",
    "user": 0,
    "value": "string"
}
⚠️ 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": {
            "format": "uri",
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "required": [
        "date",
        "pk",
        "stock_item",
        "user"
    ],
    "type": "object"
}

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

Description

Detail endpoint for StockItemTestResult.

Input parameters

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

Request body

{
    "attachment": "string",
    "date": "2022-04-13T15:42:05.901Z",
    "finished_datetime": "2022-04-13T15:42:05.901Z",
    "notes": "string",
    "pk": 0,
    "result": true,
    "started_datetime": "2022-04-13T15:42:05.901Z",
    "stock_item": 0,
    "template": 0,
    "test_station": "string",
    "user": 0,
    "value": "string"
}
⚠️ 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": {
            "format": "uri",
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "required": [
        "date",
        "pk",
        "stock_item",
        "user"
    ],
    "type": "object"
}

{
    "attachment": "string",
    "date": "2022-04-13T15:42:05.901Z",
    "finished_datetime": "2022-04-13T15:42:05.901Z",
    "notes": "string",
    "pk": 0,
    "result": true,
    "started_datetime": "2022-04-13T15:42:05.901Z",
    "stock_item": 0,
    "template": 0,
    "test_station": "string",
    "user": 0,
    "value": "string"
}
⚠️ 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": {
            "format": "uri",
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "required": [
        "date",
        "pk",
        "stock_item",
        "user"
    ],
    "type": "object"
}

{
    "attachment": "string",
    "date": "2022-04-13T15:42:05.901Z",
    "finished_datetime": "2022-04-13T15:42:05.901Z",
    "notes": "string",
    "pk": 0,
    "result": true,
    "started_datetime": "2022-04-13T15:42:05.901Z",
    "stock_item": 0,
    "template": 0,
    "test_station": "string",
    "user": 0,
    "value": "string"
}
⚠️ 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": {
            "format": "uri",
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "required": [
        "date",
        "pk",
        "stock_item",
        "user"
    ],
    "type": "object"
}

Response 200 OK

{
    "attachment": "string",
    "date": "2022-04-13T15:42:05.901Z",
    "finished_datetime": "2022-04-13T15:42:05.901Z",
    "notes": "string",
    "pk": 0,
    "result": true,
    "started_datetime": "2022-04-13T15:42:05.901Z",
    "stock_item": 0,
    "template": 0,
    "test_station": "string",
    "user": 0,
    "value": "string"
}
⚠️ 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": {
            "format": "uri",
            "type": "string"
        },
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "finished_datetime": {
            "description": "The timestamp of the test finish",
            "format": "date-time",
            "nullable": true,
            "title": "Finished",
            "type": "string"
        },
        "notes": {
            "description": "Test notes",
            "maxLength": 500,
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "result": {
            "description": "Test result",
            "type": "boolean"
        },
        "started_datetime": {
            "description": "The timestamp of the test start",
            "format": "date-time",
            "nullable": true,
            "title": "Started",
            "type": "string"
        },
        "stock_item": {
            "type": "integer"
        },
        "template": {
            "description": "Template",
            "nullable": true,
            "title": "Test template for this result",
            "type": "integer"
        },
        "test_station": {
            "description": "The identifier of the test station where the test was performed",
            "maxLength": 500,
            "type": "string"
        },
        "user": {
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "value": {
            "description": "Test output value",
            "maxLength": 500,
            "type": "string"
        }
    },
    "required": [
        "date",
        "pk",
        "stock_item",
        "user"
    ],
    "type": "object"
}

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
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
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
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

API endpoint for list view of StockItemTracking objects.

StockItemTracking objects are read-only (they are created by internal model functionality)

  • GET: Return list of StockItemTracking objects

Input parameters

Parameter In Type Default Nullable Description
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
item query integer No
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.
user query integer 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,
            "label": "string",
            "notes": "string",
            "pk": 0,
            "tracking_type": 0,
            "user": 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/StockTracking"
            },
            "type": "array"
        }
    },
    "type": "object"
}

GET /api/stock/track/status/

Description

Retrieve information about a specific status code

Input parameters

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

Response 200 OK

Response 400 Bad Request


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

Description

Detail API endpoint for StockItemTracking model.

Input parameters

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

Response 200 OK

{
    "date": "2022-04-13T15:42:05.901Z",
    "deltas": null,
    "item": 0,
    "label": "string",
    "notes": "string",
    "pk": 0,
    "tracking_type": 0,
    "user": 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 StockItemTracking model.",
    "properties": {
        "date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "deltas": {
            "readOnly": true
        },
        "item": {
            "type": "integer"
        },
        "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"
        }
    },
    "required": [
        "date",
        "deltas",
        "item",
        "label",
        "pk",
        "tracking_type",
        "user"
    ],
    "type": "object"
}

POST /api/stock/transfer/

Description

API endpoint for performing stock movements.

Input parameters

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

Request body

{
    "items": [
        {
            "batch": "string",
            "packaging": "string",
            "pk": 0,
            "quantity": "string",
            "status": null
        }
    ],
    "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": null
        }
    ],
    "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": null
        }
    ],
    "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": null
        }
    ],
    "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 Stock object.

get: Return a single StockItem object

post: Update a StockItem

delete: Remove a StockItem

Input parameters

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

Response 204 No Content


GET /api/stock/{id}/

Description

API detail endpoint for Stock object.

get: Return a single StockItem object

post: Update a StockItem

delete: Remove a StockItem

Input parameters

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

Response 200 OK

{
    "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",
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "part": 0,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": null,
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "stale": true,
    "status": null,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "tags": [
        "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": {
        "allocated": {
            "format": "double",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "installed_items": {
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "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"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SalePriceCurrencyEnum"
                }
            ],
            "description": "Purchase currency of this stock item\n\n* `AUD` - Australian Dollar\n* `CAD` - Canadian Dollar\n* `CNY` - Chinese Yuan\n* `EUR` - Euro\n* `GBP` - British Pound\n* `JPY` - Japanese Yen\n* `NZD` - New Zealand Dollar\n* `USD` - US Dollar",
            "title": "Currency"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "stale": {
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/Status2a7Enum"
                }
            ],
            "minimum": 0
        },
        "status_text": {
            "readOnly": true,
            "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"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tracking_items": {
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "required": [
        "barcode_hash",
        "child_items",
        "expired",
        "installed_items",
        "part",
        "pk",
        "purchase_order_reference",
        "quantity",
        "sales_order_reference",
        "stale",
        "status_text",
        "stocktake_date",
        "tracking_items",
        "updated"
    ],
    "type": "object"
}

PATCH /api/stock/{id}/

Description

API detail endpoint for Stock object.

get: Return a single StockItem object

post: Update a StockItem

delete: Remove a StockItem

Input parameters

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

Request body

{
    "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",
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "location_detail": null,
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "part": 0,
    "part_detail": null,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": null,
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "stale": true,
    "status": null,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "supplier_part_detail": null,
    "tags": [
        "string"
    ],
    "tracking_items": 0,
    "updated": "2022-04-13T15:42:05.901Z",
    "use_pack_size": true
}
⚠️ 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": {
        "allocated": {
            "format": "double",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "installed_items": {
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "location_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/LocationBrief"
                }
            ],
            "readOnly": true
        },
        "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"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "readOnly": true
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SalePriceCurrencyEnum"
                }
            ],
            "description": "Purchase currency of this stock item\n\n* `AUD` - Australian Dollar\n* `CAD` - Canadian Dollar\n* `CNY` - Chinese Yuan\n* `EUR` - Euro\n* `GBP` - British Pound\n* `JPY` - Japanese Yen\n* `NZD` - New Zealand Dollar\n* `USD` - US Dollar",
            "title": "Currency"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "stale": {
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/Status2a7Enum"
                }
            ],
            "minimum": 0
        },
        "status_text": {
            "readOnly": true,
            "type": "string"
        },
        "stocktake_date": {
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "supplier_part": {
            "description": "Select a matching supplier part for this stock item",
            "nullable": true,
            "type": "integer"
        },
        "supplier_part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SupplierPart"
                }
            ],
            "readOnly": true
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tracking_items": {
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "type": "object"
}

{
    "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",
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "location_detail": null,
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "part": 0,
    "part_detail": null,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": null,
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "stale": true,
    "status": null,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "supplier_part_detail": null,
    "tags": [
        "string"
    ],
    "tracking_items": 0,
    "updated": "2022-04-13T15:42:05.901Z",
    "use_pack_size": true
}
⚠️ 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": {
        "allocated": {
            "format": "double",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "installed_items": {
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "location_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/LocationBrief"
                }
            ],
            "readOnly": true
        },
        "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"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "readOnly": true
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SalePriceCurrencyEnum"
                }
            ],
            "description": "Purchase currency of this stock item\n\n* `AUD` - Australian Dollar\n* `CAD` - Canadian Dollar\n* `CNY` - Chinese Yuan\n* `EUR` - Euro\n* `GBP` - British Pound\n* `JPY` - Japanese Yen\n* `NZD` - New Zealand Dollar\n* `USD` - US Dollar",
            "title": "Currency"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "stale": {
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/Status2a7Enum"
                }
            ],
            "minimum": 0
        },
        "status_text": {
            "readOnly": true,
            "type": "string"
        },
        "stocktake_date": {
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "supplier_part": {
            "description": "Select a matching supplier part for this stock item",
            "nullable": true,
            "type": "integer"
        },
        "supplier_part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SupplierPart"
                }
            ],
            "readOnly": true
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tracking_items": {
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "type": "object"
}

{
    "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",
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "location_detail": null,
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "part": 0,
    "part_detail": null,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": null,
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "stale": true,
    "status": null,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "supplier_part_detail": null,
    "tags": [
        "string"
    ],
    "tracking_items": 0,
    "updated": "2022-04-13T15:42:05.901Z",
    "use_pack_size": true
}
⚠️ 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": {
        "allocated": {
            "format": "double",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "installed_items": {
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "location_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/LocationBrief"
                }
            ],
            "readOnly": true
        },
        "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"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "readOnly": true
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SalePriceCurrencyEnum"
                }
            ],
            "description": "Purchase currency of this stock item\n\n* `AUD` - Australian Dollar\n* `CAD` - Canadian Dollar\n* `CNY` - Chinese Yuan\n* `EUR` - Euro\n* `GBP` - British Pound\n* `JPY` - Japanese Yen\n* `NZD` - New Zealand Dollar\n* `USD` - US Dollar",
            "title": "Currency"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "stale": {
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/Status2a7Enum"
                }
            ],
            "minimum": 0
        },
        "status_text": {
            "readOnly": true,
            "type": "string"
        },
        "stocktake_date": {
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "supplier_part": {
            "description": "Select a matching supplier part for this stock item",
            "nullable": true,
            "type": "integer"
        },
        "supplier_part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SupplierPart"
                }
            ],
            "readOnly": true
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tracking_items": {
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "type": "object"
}

Response 200 OK

{
    "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",
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "part": 0,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": null,
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "stale": true,
    "status": null,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "tags": [
        "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": {
        "allocated": {
            "format": "double",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "installed_items": {
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "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"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SalePriceCurrencyEnum"
                }
            ],
            "description": "Purchase currency of this stock item\n\n* `AUD` - Australian Dollar\n* `CAD` - Canadian Dollar\n* `CNY` - Chinese Yuan\n* `EUR` - Euro\n* `GBP` - British Pound\n* `JPY` - Japanese Yen\n* `NZD` - New Zealand Dollar\n* `USD` - US Dollar",
            "title": "Currency"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "stale": {
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/Status2a7Enum"
                }
            ],
            "minimum": 0
        },
        "status_text": {
            "readOnly": true,
            "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"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tracking_items": {
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "required": [
        "barcode_hash",
        "child_items",
        "expired",
        "installed_items",
        "part",
        "pk",
        "purchase_order_reference",
        "quantity",
        "sales_order_reference",
        "stale",
        "status_text",
        "stocktake_date",
        "tracking_items",
        "updated"
    ],
    "type": "object"
}

PUT /api/stock/{id}/

Description

API detail endpoint for Stock object.

get: Return a single StockItem object

post: Update a StockItem

delete: Remove a StockItem

Input parameters

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

Request body

{
    "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",
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "part": 0,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": null,
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "stale": true,
    "status": null,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "tags": [
        "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": {
        "allocated": {
            "format": "double",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "installed_items": {
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "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"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SalePriceCurrencyEnum"
                }
            ],
            "description": "Purchase currency of this stock item\n\n* `AUD` - Australian Dollar\n* `CAD` - Canadian Dollar\n* `CNY` - Chinese Yuan\n* `EUR` - Euro\n* `GBP` - British Pound\n* `JPY` - Japanese Yen\n* `NZD` - New Zealand Dollar\n* `USD` - US Dollar",
            "title": "Currency"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "stale": {
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/Status2a7Enum"
                }
            ],
            "minimum": 0
        },
        "status_text": {
            "readOnly": true,
            "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"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tracking_items": {
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "required": [
        "barcode_hash",
        "child_items",
        "expired",
        "installed_items",
        "part",
        "pk",
        "purchase_order_reference",
        "quantity",
        "sales_order_reference",
        "stale",
        "status_text",
        "stocktake_date",
        "tracking_items",
        "updated"
    ],
    "type": "object"
}

{
    "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",
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "part": 0,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": null,
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "stale": true,
    "status": null,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "tags": [
        "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": {
        "allocated": {
            "format": "double",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "installed_items": {
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "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"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SalePriceCurrencyEnum"
                }
            ],
            "description": "Purchase currency of this stock item\n\n* `AUD` - Australian Dollar\n* `CAD` - Canadian Dollar\n* `CNY` - Chinese Yuan\n* `EUR` - Euro\n* `GBP` - British Pound\n* `JPY` - Japanese Yen\n* `NZD` - New Zealand Dollar\n* `USD` - US Dollar",
            "title": "Currency"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "stale": {
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/Status2a7Enum"
                }
            ],
            "minimum": 0
        },
        "status_text": {
            "readOnly": true,
            "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"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tracking_items": {
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "required": [
        "barcode_hash",
        "child_items",
        "expired",
        "installed_items",
        "part",
        "pk",
        "purchase_order_reference",
        "quantity",
        "sales_order_reference",
        "stale",
        "status_text",
        "stocktake_date",
        "tracking_items",
        "updated"
    ],
    "type": "object"
}

{
    "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",
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "part": 0,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": null,
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "stale": true,
    "status": null,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "tags": [
        "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": {
        "allocated": {
            "format": "double",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "installed_items": {
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "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"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SalePriceCurrencyEnum"
                }
            ],
            "description": "Purchase currency of this stock item\n\n* `AUD` - Australian Dollar\n* `CAD` - Canadian Dollar\n* `CNY` - Chinese Yuan\n* `EUR` - Euro\n* `GBP` - British Pound\n* `JPY` - Japanese Yen\n* `NZD` - New Zealand Dollar\n* `USD` - US Dollar",
            "title": "Currency"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "stale": {
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/Status2a7Enum"
                }
            ],
            "minimum": 0
        },
        "status_text": {
            "readOnly": true,
            "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"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tracking_items": {
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "required": [
        "barcode_hash",
        "child_items",
        "expired",
        "installed_items",
        "part",
        "pk",
        "purchase_order_reference",
        "quantity",
        "sales_order_reference",
        "stale",
        "status_text",
        "stocktake_date",
        "tracking_items",
        "updated"
    ],
    "type": "object"
}

Response 200 OK

{
    "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",
    "installed_items": 0,
    "is_building": true,
    "link": "string",
    "location": 0,
    "notes": "string",
    "owner": 0,
    "packaging": "string",
    "part": 0,
    "pk": 0,
    "purchase_order": 0,
    "purchase_order_reference": "string",
    "purchase_price": "string",
    "purchase_price_currency": null,
    "quantity": 10.12,
    "sales_order": 0,
    "sales_order_reference": "string",
    "serial": "string",
    "stale": true,
    "status": null,
    "status_text": "string",
    "stocktake_date": "2022-04-13",
    "supplier_part": 0,
    "tags": [
        "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": {
        "allocated": {
            "format": "double",
            "type": "number"
        },
        "barcode_hash": {
            "description": "Unique hash of barcode data",
            "readOnly": true,
            "type": "string"
        },
        "batch": {
            "description": "Batch code for this stock item",
            "maxLength": 100,
            "nullable": true,
            "title": "Batch Code",
            "type": "string"
        },
        "belongs_to": {
            "description": "Is this item installed in another item?",
            "nullable": true,
            "title": "Installed In",
            "type": "integer"
        },
        "build": {
            "description": "Build for this stock item",
            "nullable": true,
            "title": "Source Build",
            "type": "integer"
        },
        "child_items": {
            "readOnly": true,
            "type": "integer"
        },
        "consumed_by": {
            "description": "Build order which consumed this stock item",
            "nullable": true,
            "type": "integer"
        },
        "customer": {
            "description": "Customer",
            "nullable": true,
            "type": "integer"
        },
        "delete_on_deplete": {
            "description": "Delete this Stock Item when stock is depleted",
            "type": "boolean"
        },
        "expired": {
            "readOnly": true,
            "type": "boolean"
        },
        "expiry_date": {
            "description": "Expiry date for stock item. Stock will be considered expired after this date",
            "format": "date",
            "nullable": true,
            "type": "string"
        },
        "installed_items": {
            "readOnly": true,
            "type": "integer"
        },
        "is_building": {
            "type": "boolean"
        },
        "link": {
            "description": "Link to external URL",
            "format": "uri",
            "maxLength": 200,
            "title": "External Link",
            "type": "string"
        },
        "location": {
            "description": "Where is this stock item located?",
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "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"
        },
        "part": {
            "description": "Base Part",
            "type": "integer"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "purchase_order": {
            "description": "Purchase order for this stock item",
            "nullable": true,
            "title": "Source Purchase Order",
            "type": "integer"
        },
        "purchase_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "purchase_price": {
            "description": "Purchase price of this stock item, per unit or pack",
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "type": "string"
        },
        "purchase_price_currency": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/SalePriceCurrencyEnum"
                }
            ],
            "description": "Purchase currency of this stock item\n\n* `AUD` - Australian Dollar\n* `CAD` - Canadian Dollar\n* `CNY` - Chinese Yuan\n* `EUR` - Euro\n* `GBP` - British Pound\n* `JPY` - Japanese Yen\n* `NZD` - New Zealand Dollar\n* `USD` - US Dollar",
            "title": "Currency"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "sales_order": {
            "nullable": true,
            "title": "Destination Sales Order",
            "type": "integer"
        },
        "sales_order_reference": {
            "readOnly": true,
            "type": "string"
        },
        "serial": {
            "description": "Serial number for this item",
            "maxLength": 100,
            "nullable": true,
            "title": "Serial Number",
            "type": "string"
        },
        "stale": {
            "readOnly": true,
            "type": "boolean"
        },
        "status": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/Status2a7Enum"
                }
            ],
            "minimum": 0
        },
        "status_text": {
            "readOnly": true,
            "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"
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tracking_items": {
            "readOnly": true,
            "type": "integer"
        },
        "updated": {
            "description": "Timestamp of last update",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
        },
        "use_pack_size": {
            "description": "Use pack size when adding: the quantity defined is the number of packs",
            "nullable": true,
            "type": "boolean",
            "writeOnly": true
        }
    },
    "required": [
        "barcode_hash",
        "child_items",
        "expired",
        "installed_items",
        "part",
        "pk",
        "purchase_order_reference",
        "quantity",
        "sales_order_reference",
        "stale",
        "status_text",
        "stocktake_date",
        "tracking_items",
        "updated"
    ],
    "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
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
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
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
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
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/{id}/return/

Description

API endpoint for returning a stock item from a customer.

Input parameters

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

Request body

{
    "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": "DRF serializer for returning a stock item from a customer.",
    "properties": {
        "location": {
            "description": "Destination location for returned item",
            "type": "integer"
        },
        "notes": {
            "description": "Add transaction note (optional)",
            "type": "string"
        }
    },
    "required": [
        "location"
    ],
    "type": "object"
}

{
    "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": "DRF serializer for returning a stock item from a customer.",
    "properties": {
        "location": {
            "description": "Destination location for returned item",
            "type": "integer"
        },
        "notes": {
            "description": "Add transaction note (optional)",
            "type": "string"
        }
    },
    "required": [
        "location"
    ],
    "type": "object"
}

{
    "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": "DRF serializer for returning a stock item from a customer.",
    "properties": {
        "location": {
            "description": "Destination location for returned item",
            "type": "integer"
        },
        "notes": {
            "description": "Add transaction note (optional)",
            "type": "string"
        }
    },
    "required": [
        "location"
    ],
    "type": "object"
}

Response 201 Created

{
    "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": "DRF serializer for returning a stock item from a customer.",
    "properties": {
        "location": {
            "description": "Destination location for returned item",
            "type": "integer"
        },
        "notes": {
            "description": "Add transaction note (optional)",
            "type": "string"
        }
    },
    "required": [
        "location"
    ],
    "type": "object"
}

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

Description

API endpoint for serializing a stock item.

Input parameters

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

Request body

{
    "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

{
    "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 response 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"
}

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

Description

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

Input parameters

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

Request body

{
    "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:

CompanyBrief

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

ConvertStockItem

Name Type
part integer

InstallStockItem

Name Type
note string
quantity integer
stock_item integer

Location

Name Type
barcode_hash string
custom_icon string
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
pathstring string
pk integer
structural boolean
sublocations integer
tags Array<string>
url 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

Metadata

Name Type
metadata

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>

PaginatedStockItemAttachmentList

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

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>

PartBrief

Name Type
active boolean
assembly boolean
barcode_hash string
category_default_location integer
default_location integer| null
description string
full_name string
image string(uri)
IPN string| null
is_template boolean
name string
pk integer
purchaseable boolean
revision string| null
salable boolean
thumbnail string
trackable boolean
units string| null
virtual boolean

PatchedLocation

Name Type
barcode_hash string
custom_icon string
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
pathstring string
pk integer
structural boolean
sublocations integer
tags Array<string>
url string

PatchedMetadata

Name Type
metadata

PatchedStockItem

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

PatchedStockItemAttachment

Name Type
attachment string(uri)
comment string
filename string
link string(uri)| null
pk integer
stock_item integer
upload_date string(date)
user integer| null
user_detail

PatchedStockItemTestResult

Name Type
attachment string(uri)
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
test_station string
user integer| null
value string

PatchedStockLocationType

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

ReturnStockItem

Name Type
location integer
notes string

SalePriceCurrencyEnum

Type: string

SerializeStockItem

Name Type
destination integer
notes string
quantity integer
serial_numbers string

Status2a7Enum

Type: integer

StockAdd

Name Type
items Array<StockAdjustmentItem>
notes string

StockAdjustmentItem

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

StockAssignment

Name Type
customer integer
items Array<StockAssignmentItem>
notes string

StockAssignmentItem

Name Type
item integer

StockChangeStatus

Name Type
items Array<integer>
note string
status

StockCount

Name Type
items Array<StockAdjustmentItem>
notes string

StockItem

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

StockItemAttachment

Name Type
attachment string(uri)
comment string
filename string
link string(uri)| null
pk integer
stock_item integer
upload_date string(date)
user integer| null
user_detail

StockItemTestResult

Name Type
attachment string(uri)
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
test_station string
user integer| null
value string

StockLocationType

Name Type
description string
icon string
location_count integer
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

StockTracking

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

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)
link string(uri)| null
manufacturer string
manufacturer_part integer| null
MPN string
name string
note string| null
pack_quantity string
pack_quantity_native number(double)
packaging string| null
part integer
pk integer
SKU string
supplier integer
supplier_detail
tags Array<string>
updated string(date-time)| null
url string

UninstallStockItem

Name Type
location integer
note string

User

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

Security schemes

Name Type Scheme Description
basicAuth http basic
cookieAuth apiKey
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