Skip to content

The Bill of Materials section of the InvenTree API schema is documented below.

InvenTree API 180

API for InvenTree - the intuitive open source inventory management system


License: MIT

Servers

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

bom


DELETE /api/bom/

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

Description

API endpoint for accessing a list of BomItem objects.

  • GET: Return list of BomItem objects
  • POST: Create a new BomItem 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"
allow_variants query boolean No
available_stock query boolean No Has available stock
consumable query boolean No
has_pricing query boolean No Has Pricing
inherited query boolean 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.
on_order query boolean No On order
optional query boolean No
ordering query string No Which field to use when ordering the results.
part query integer No Part
part_active query boolean No Master part is active
part_trackable query boolean No Master part is trackable
search query string No A search term.
sub_part_assembly query boolean No Sub part is an assembly
sub_part_trackable query boolean No Sub part is trackable
uses query string No Uses
validated 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": [
        {
            "allow_variants": true,
            "available_stock": 10.12,
            "available_substitute_stock": 10.12,
            "available_variant_stock": 10.12,
            "building": 10.12,
            "consumable": true,
            "external_stock": 10.12,
            "inherited": true,
            "note": "string",
            "on_order": 10.12,
            "optional": true,
            "overage": "string",
            "part": 0,
            "pk": 0,
            "pricing_max": "string",
            "pricing_min": "string",
            "quantity": 10.12,
            "reference": "string",
            "sub_part": 0,
            "substitutes": [
                {
                    "bom_item": 0,
                    "part": 0,
                    "part_detail": null,
                    "pk": 0
                }
            ],
            "validated": 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/BomItem"
            },
            "type": "array"
        }
    },
    "type": "object"
}

POST /api/bom/

Description

API endpoint for accessing a list of BomItem objects.

  • GET: Return list of BomItem objects
  • POST: Create a new BomItem 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

{
    "allow_variants": true,
    "available_stock": 10.12,
    "available_substitute_stock": 10.12,
    "available_variant_stock": 10.12,
    "building": 10.12,
    "consumable": true,
    "external_stock": 10.12,
    "inherited": true,
    "note": "string",
    "on_order": 10.12,
    "optional": true,
    "overage": "string",
    "part": 0,
    "pk": 0,
    "pricing_max": "string",
    "pricing_min": "string",
    "quantity": 10.12,
    "reference": "string",
    "sub_part": 0,
    "substitutes": [
        {
            "bom_item": 0,
            "part": 0,
            "part_detail": null,
            "pk": 0
        }
    ],
    "validated": 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 BomItem object.",
    "properties": {
        "allow_variants": {
            "description": "Stock items for variant parts can be used for this BOM item",
            "type": "boolean"
        },
        "available_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_substitute_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_variant_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "building": {
            "format": "double",
            "readOnly": true,
            "title": "In Production",
            "type": "number"
        },
        "consumable": {
            "description": "This BOM item is consumable (it is not tracked in build orders)",
            "type": "boolean"
        },
        "external_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "inherited": {
            "description": "This BOM item is inherited by BOMs for variant parts",
            "title": "Gets inherited",
            "type": "boolean"
        },
        "note": {
            "description": "BOM item notes",
            "maxLength": 500,
            "type": "string"
        },
        "on_order": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "optional": {
            "description": "This BOM item is optional",
            "type": "boolean"
        },
        "overage": {
            "description": "Estimated build wastage quantity (absolute or percentage)",
            "maxLength": 24,
            "type": "string"
        },
        "part": {
            "type": "integer"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "pricing_max": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "pricing_min": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "reference": {
            "description": "BOM item reference",
            "maxLength": 5000,
            "type": "string"
        },
        "sub_part": {
            "type": "integer"
        },
        "substitutes": {
            "items": {
                "$ref": "#/components/schemas/BomItemSubstitute"
            },
            "readOnly": true,
            "type": "array"
        },
        "validated": {
            "description": "This BOM item has been validated",
            "type": "boolean"
        }
    },
    "required": [
        "available_stock",
        "available_substitute_stock",
        "available_variant_stock",
        "building",
        "external_stock",
        "on_order",
        "part",
        "pk",
        "pricing_max",
        "pricing_min",
        "quantity",
        "sub_part",
        "substitutes"
    ],
    "type": "object"
}

{
    "allow_variants": true,
    "available_stock": 10.12,
    "available_substitute_stock": 10.12,
    "available_variant_stock": 10.12,
    "building": 10.12,
    "consumable": true,
    "external_stock": 10.12,
    "inherited": true,
    "note": "string",
    "on_order": 10.12,
    "optional": true,
    "overage": "string",
    "part": 0,
    "pk": 0,
    "pricing_max": "string",
    "pricing_min": "string",
    "quantity": 10.12,
    "reference": "string",
    "sub_part": 0,
    "substitutes": [
        {
            "bom_item": 0,
            "part": 0,
            "part_detail": null,
            "pk": 0
        }
    ],
    "validated": 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 BomItem object.",
    "properties": {
        "allow_variants": {
            "description": "Stock items for variant parts can be used for this BOM item",
            "type": "boolean"
        },
        "available_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_substitute_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_variant_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "building": {
            "format": "double",
            "readOnly": true,
            "title": "In Production",
            "type": "number"
        },
        "consumable": {
            "description": "This BOM item is consumable (it is not tracked in build orders)",
            "type": "boolean"
        },
        "external_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "inherited": {
            "description": "This BOM item is inherited by BOMs for variant parts",
            "title": "Gets inherited",
            "type": "boolean"
        },
        "note": {
            "description": "BOM item notes",
            "maxLength": 500,
            "type": "string"
        },
        "on_order": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "optional": {
            "description": "This BOM item is optional",
            "type": "boolean"
        },
        "overage": {
            "description": "Estimated build wastage quantity (absolute or percentage)",
            "maxLength": 24,
            "type": "string"
        },
        "part": {
            "type": "integer"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "pricing_max": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "pricing_min": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "reference": {
            "description": "BOM item reference",
            "maxLength": 5000,
            "type": "string"
        },
        "sub_part": {
            "type": "integer"
        },
        "substitutes": {
            "items": {
                "$ref": "#/components/schemas/BomItemSubstitute"
            },
            "readOnly": true,
            "type": "array"
        },
        "validated": {
            "description": "This BOM item has been validated",
            "type": "boolean"
        }
    },
    "required": [
        "available_stock",
        "available_substitute_stock",
        "available_variant_stock",
        "building",
        "external_stock",
        "on_order",
        "part",
        "pk",
        "pricing_max",
        "pricing_min",
        "quantity",
        "sub_part",
        "substitutes"
    ],
    "type": "object"
}

{
    "allow_variants": true,
    "available_stock": 10.12,
    "available_substitute_stock": 10.12,
    "available_variant_stock": 10.12,
    "building": 10.12,
    "consumable": true,
    "external_stock": 10.12,
    "inherited": true,
    "note": "string",
    "on_order": 10.12,
    "optional": true,
    "overage": "string",
    "part": 0,
    "pk": 0,
    "pricing_max": "string",
    "pricing_min": "string",
    "quantity": 10.12,
    "reference": "string",
    "sub_part": 0,
    "substitutes": [
        {
            "bom_item": 0,
            "part": 0,
            "part_detail": null,
            "pk": 0
        }
    ],
    "validated": 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 BomItem object.",
    "properties": {
        "allow_variants": {
            "description": "Stock items for variant parts can be used for this BOM item",
            "type": "boolean"
        },
        "available_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_substitute_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_variant_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "building": {
            "format": "double",
            "readOnly": true,
            "title": "In Production",
            "type": "number"
        },
        "consumable": {
            "description": "This BOM item is consumable (it is not tracked in build orders)",
            "type": "boolean"
        },
        "external_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "inherited": {
            "description": "This BOM item is inherited by BOMs for variant parts",
            "title": "Gets inherited",
            "type": "boolean"
        },
        "note": {
            "description": "BOM item notes",
            "maxLength": 500,
            "type": "string"
        },
        "on_order": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "optional": {
            "description": "This BOM item is optional",
            "type": "boolean"
        },
        "overage": {
            "description": "Estimated build wastage quantity (absolute or percentage)",
            "maxLength": 24,
            "type": "string"
        },
        "part": {
            "type": "integer"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "pricing_max": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "pricing_min": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "reference": {
            "description": "BOM item reference",
            "maxLength": 5000,
            "type": "string"
        },
        "sub_part": {
            "type": "integer"
        },
        "substitutes": {
            "items": {
                "$ref": "#/components/schemas/BomItemSubstitute"
            },
            "readOnly": true,
            "type": "array"
        },
        "validated": {
            "description": "This BOM item has been validated",
            "type": "boolean"
        }
    },
    "required": [
        "available_stock",
        "available_substitute_stock",
        "available_variant_stock",
        "building",
        "external_stock",
        "on_order",
        "part",
        "pk",
        "pricing_max",
        "pricing_min",
        "quantity",
        "sub_part",
        "substitutes"
    ],
    "type": "object"
}

Response 201 Created

{
    "allow_variants": true,
    "available_stock": 10.12,
    "available_substitute_stock": 10.12,
    "available_variant_stock": 10.12,
    "building": 10.12,
    "consumable": true,
    "external_stock": 10.12,
    "inherited": true,
    "note": "string",
    "on_order": 10.12,
    "optional": true,
    "overage": "string",
    "part": 0,
    "pk": 0,
    "pricing_max": "string",
    "pricing_min": "string",
    "quantity": 10.12,
    "reference": "string",
    "sub_part": 0,
    "substitutes": [
        {
            "bom_item": 0,
            "part": 0,
            "part_detail": null,
            "pk": 0
        }
    ],
    "validated": 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 BomItem object.",
    "properties": {
        "allow_variants": {
            "description": "Stock items for variant parts can be used for this BOM item",
            "type": "boolean"
        },
        "available_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_substitute_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_variant_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "building": {
            "format": "double",
            "readOnly": true,
            "title": "In Production",
            "type": "number"
        },
        "consumable": {
            "description": "This BOM item is consumable (it is not tracked in build orders)",
            "type": "boolean"
        },
        "external_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "inherited": {
            "description": "This BOM item is inherited by BOMs for variant parts",
            "title": "Gets inherited",
            "type": "boolean"
        },
        "note": {
            "description": "BOM item notes",
            "maxLength": 500,
            "type": "string"
        },
        "on_order": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "optional": {
            "description": "This BOM item is optional",
            "type": "boolean"
        },
        "overage": {
            "description": "Estimated build wastage quantity (absolute or percentage)",
            "maxLength": 24,
            "type": "string"
        },
        "part": {
            "type": "integer"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "pricing_max": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "pricing_min": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "reference": {
            "description": "BOM item reference",
            "maxLength": 5000,
            "type": "string"
        },
        "sub_part": {
            "type": "integer"
        },
        "substitutes": {
            "items": {
                "$ref": "#/components/schemas/BomItemSubstitute"
            },
            "readOnly": true,
            "type": "array"
        },
        "validated": {
            "description": "This BOM item has been validated",
            "type": "boolean"
        }
    },
    "required": [
        "available_stock",
        "available_substitute_stock",
        "available_variant_stock",
        "building",
        "external_stock",
        "on_order",
        "part",
        "pk",
        "pricing_max",
        "pricing_min",
        "quantity",
        "sub_part",
        "substitutes"
    ],
    "type": "object"
}

POST /api/bom/import/extract/

Description

API endpoint for extracting BOM data from a BOM file.

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

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

Schema of the request body
{
    "description": "Serializer class for exatracting BOM data from an uploaded file.\n\nThe parent class DataFileExtractSerializer does most of the heavy lifting here.",
    "properties": {
        "columns": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "rows": {
            "items": {
                "items": {
                    "nullable": true,
                    "type": "string"
                },
                "type": "array"
            },
            "type": "array"
        }
    },
    "required": [
        "columns",
        "rows"
    ],
    "type": "object"
}

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

Schema of the request body
{
    "description": "Serializer class for exatracting BOM data from an uploaded file.\n\nThe parent class DataFileExtractSerializer does most of the heavy lifting here.",
    "properties": {
        "columns": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "rows": {
            "items": {
                "items": {
                    "nullable": true,
                    "type": "string"
                },
                "type": "array"
            },
            "type": "array"
        }
    },
    "required": [
        "columns",
        "rows"
    ],
    "type": "object"
}

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

Schema of the request body
{
    "description": "Serializer class for exatracting BOM data from an uploaded file.\n\nThe parent class DataFileExtractSerializer does most of the heavy lifting here.",
    "properties": {
        "columns": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "rows": {
            "items": {
                "items": {
                    "nullable": true,
                    "type": "string"
                },
                "type": "array"
            },
            "type": "array"
        }
    },
    "required": [
        "columns",
        "rows"
    ],
    "type": "object"
}

Response 201 Created

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

Schema of the response body
{
    "description": "Serializer class for exatracting BOM data from an uploaded file.\n\nThe parent class DataFileExtractSerializer does most of the heavy lifting here.",
    "properties": {
        "columns": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "rows": {
            "items": {
                "items": {
                    "nullable": true,
                    "type": "string"
                },
                "type": "array"
            },
            "type": "array"
        }
    },
    "required": [
        "columns",
        "rows"
    ],
    "type": "object"
}

POST /api/bom/import/submit/

Description

API endpoint for submitting BOM data from a BOM file.

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": [
        {
            "allow_variants": true,
            "available_stock": 10.12,
            "available_substitute_stock": 10.12,
            "available_variant_stock": 10.12,
            "building": 10.12,
            "consumable": true,
            "external_stock": 10.12,
            "inherited": true,
            "note": "string",
            "on_order": 10.12,
            "optional": true,
            "overage": "string",
            "part": 0,
            "pk": 0,
            "pricing_max": "string",
            "pricing_min": "string",
            "quantity": 10.12,
            "reference": "string",
            "sub_part": 0,
            "substitutes": [
                {
                    "bom_item": 0,
                    "part": 0,
                    "part_detail": null,
                    "pk": 0
                }
            ],
            "validated": 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 uploading a BOM against a specified part.\n\nA \"BOM\" is a set of BomItem objects which are to be validated together as a set",
    "properties": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/BomItem"
            },
            "type": "array"
        }
    },
    "required": [
        "items"
    ],
    "type": "object"
}

{
    "items": [
        {
            "allow_variants": true,
            "available_stock": 10.12,
            "available_substitute_stock": 10.12,
            "available_variant_stock": 10.12,
            "building": 10.12,
            "consumable": true,
            "external_stock": 10.12,
            "inherited": true,
            "note": "string",
            "on_order": 10.12,
            "optional": true,
            "overage": "string",
            "part": 0,
            "pk": 0,
            "pricing_max": "string",
            "pricing_min": "string",
            "quantity": 10.12,
            "reference": "string",
            "sub_part": 0,
            "substitutes": [
                {
                    "bom_item": 0,
                    "part": 0,
                    "part_detail": null,
                    "pk": 0
                }
            ],
            "validated": 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 uploading a BOM against a specified part.\n\nA \"BOM\" is a set of BomItem objects which are to be validated together as a set",
    "properties": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/BomItem"
            },
            "type": "array"
        }
    },
    "required": [
        "items"
    ],
    "type": "object"
}

{
    "items": [
        {
            "allow_variants": true,
            "available_stock": 10.12,
            "available_substitute_stock": 10.12,
            "available_variant_stock": 10.12,
            "building": 10.12,
            "consumable": true,
            "external_stock": 10.12,
            "inherited": true,
            "note": "string",
            "on_order": 10.12,
            "optional": true,
            "overage": "string",
            "part": 0,
            "pk": 0,
            "pricing_max": "string",
            "pricing_min": "string",
            "quantity": 10.12,
            "reference": "string",
            "sub_part": 0,
            "substitutes": [
                {
                    "bom_item": 0,
                    "part": 0,
                    "part_detail": null,
                    "pk": 0
                }
            ],
            "validated": 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 uploading a BOM against a specified part.\n\nA \"BOM\" is a set of BomItem objects which are to be validated together as a set",
    "properties": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/BomItem"
            },
            "type": "array"
        }
    },
    "required": [
        "items"
    ],
    "type": "object"
}

Response 201 Created

{
    "items": [
        {
            "allow_variants": true,
            "available_stock": 10.12,
            "available_substitute_stock": 10.12,
            "available_variant_stock": 10.12,
            "building": 10.12,
            "consumable": true,
            "external_stock": 10.12,
            "inherited": true,
            "note": "string",
            "on_order": 10.12,
            "optional": true,
            "overage": "string",
            "part": 0,
            "pk": 0,
            "pricing_max": "string",
            "pricing_min": "string",
            "quantity": 10.12,
            "reference": "string",
            "sub_part": 0,
            "substitutes": [
                {
                    "bom_item": 0,
                    "part": 0,
                    "part_detail": null,
                    "pk": 0
                }
            ],
            "validated": 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 uploading a BOM against a specified part.\n\nA \"BOM\" is a set of BomItem objects which are to be validated together as a set",
    "properties": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/BomItem"
            },
            "type": "array"
        }
    },
    "required": [
        "items"
    ],
    "type": "object"
}

POST /api/bom/import/upload/

Description

API endpoint for uploading a complete Bill of Materials.

It is assumed that the BOM has been extracted from a file using the BomExtract endpoint.

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

{
    "clear_existing_bom": true,
    "data_file": "string",
    "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": "Serializer for uploading a file and extracting data from it.",
    "properties": {
        "clear_existing_bom": {
            "description": "Delete existing BOM items before uploading",
            "type": "boolean"
        },
        "data_file": {
            "description": "Select data file for upload",
            "format": "uri",
            "type": "string"
        },
        "part": {
            "type": "integer"
        }
    },
    "required": [
        "clear_existing_bom",
        "data_file",
        "part"
    ],
    "type": "object"
}

{
    "clear_existing_bom": true,
    "data_file": "string",
    "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": "Serializer for uploading a file and extracting data from it.",
    "properties": {
        "clear_existing_bom": {
            "description": "Delete existing BOM items before uploading",
            "type": "boolean"
        },
        "data_file": {
            "description": "Select data file for upload",
            "format": "uri",
            "type": "string"
        },
        "part": {
            "type": "integer"
        }
    },
    "required": [
        "clear_existing_bom",
        "data_file",
        "part"
    ],
    "type": "object"
}

{
    "clear_existing_bom": true,
    "data_file": "string",
    "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": "Serializer for uploading a file and extracting data from it.",
    "properties": {
        "clear_existing_bom": {
            "description": "Delete existing BOM items before uploading",
            "type": "boolean"
        },
        "data_file": {
            "description": "Select data file for upload",
            "format": "uri",
            "type": "string"
        },
        "part": {
            "type": "integer"
        }
    },
    "required": [
        "clear_existing_bom",
        "data_file",
        "part"
    ],
    "type": "object"
}

Response 201 Created

{
    "clear_existing_bom": true,
    "data_file": "string",
    "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": "Serializer for uploading a file and extracting data from it.",
    "properties": {
        "clear_existing_bom": {
            "description": "Delete existing BOM items before uploading",
            "type": "boolean"
        },
        "data_file": {
            "description": "Select data file for upload",
            "format": "uri",
            "type": "string"
        },
        "part": {
            "type": "integer"
        }
    },
    "required": [
        "clear_existing_bom",
        "data_file",
        "part"
    ],
    "type": "object"
}

GET /api/bom/substitute/

Description

API endpoint for accessing a list of BomItemSubstitute 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"
bom_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.
part query integer No
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": [
        {
            "bom_item": 0,
            "part": 0,
            "part_detail": null,
            "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/BomItemSubstitute"
            },
            "type": "array"
        }
    },
    "type": "object"
}

POST /api/bom/substitute/

Description

API endpoint for accessing a list of BomItemSubstitute 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

{
    "bom_item": 0,
    "part": 0,
    "part_detail": null,
    "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 the BomItemSubstitute class.",
    "properties": {
        "bom_item": {
            "description": "Parent BOM item",
            "type": "integer"
        },
        "part": {
            "description": "Substitute part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "readOnly": true
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "bom_item",
        "part",
        "part_detail",
        "pk"
    ],
    "type": "object"
}

{
    "bom_item": 0,
    "part": 0,
    "part_detail": null,
    "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 the BomItemSubstitute class.",
    "properties": {
        "bom_item": {
            "description": "Parent BOM item",
            "type": "integer"
        },
        "part": {
            "description": "Substitute part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "readOnly": true
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "bom_item",
        "part",
        "part_detail",
        "pk"
    ],
    "type": "object"
}

{
    "bom_item": 0,
    "part": 0,
    "part_detail": null,
    "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 the BomItemSubstitute class.",
    "properties": {
        "bom_item": {
            "description": "Parent BOM item",
            "type": "integer"
        },
        "part": {
            "description": "Substitute part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "readOnly": true
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "bom_item",
        "part",
        "part_detail",
        "pk"
    ],
    "type": "object"
}

Response 201 Created

{
    "bom_item": 0,
    "part": 0,
    "part_detail": null,
    "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 the BomItemSubstitute class.",
    "properties": {
        "bom_item": {
            "description": "Parent BOM item",
            "type": "integer"
        },
        "part": {
            "description": "Substitute part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "readOnly": true
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "bom_item",
        "part",
        "part_detail",
        "pk"
    ],
    "type": "object"
}

DELETE /api/bom/substitute/{id}/

Description

API endpoint for detail view of a single BomItemSubstitute 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"
id path integer No

Response 204 No Content


GET /api/bom/substitute/{id}/

Description

API endpoint for detail view of a single BomItemSubstitute 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"
id path integer No

Response 200 OK

{
    "bom_item": 0,
    "part": 0,
    "part_detail": null,
    "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 the BomItemSubstitute class.",
    "properties": {
        "bom_item": {
            "description": "Parent BOM item",
            "type": "integer"
        },
        "part": {
            "description": "Substitute part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "readOnly": true
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "bom_item",
        "part",
        "part_detail",
        "pk"
    ],
    "type": "object"
}

PATCH /api/bom/substitute/{id}/

Description

API endpoint for detail view of a single BomItemSubstitute 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"
id path integer No

Request body

{
    "bom_item": 0,
    "part": 0,
    "part_detail": null,
    "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 the BomItemSubstitute class.",
    "properties": {
        "bom_item": {
            "description": "Parent BOM item",
            "type": "integer"
        },
        "part": {
            "description": "Substitute part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "readOnly": true
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "type": "object"
}

{
    "bom_item": 0,
    "part": 0,
    "part_detail": null,
    "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 the BomItemSubstitute class.",
    "properties": {
        "bom_item": {
            "description": "Parent BOM item",
            "type": "integer"
        },
        "part": {
            "description": "Substitute part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "readOnly": true
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "type": "object"
}

{
    "bom_item": 0,
    "part": 0,
    "part_detail": null,
    "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 the BomItemSubstitute class.",
    "properties": {
        "bom_item": {
            "description": "Parent BOM item",
            "type": "integer"
        },
        "part": {
            "description": "Substitute part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "readOnly": true
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "type": "object"
}

Response 200 OK

{
    "bom_item": 0,
    "part": 0,
    "part_detail": null,
    "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 the BomItemSubstitute class.",
    "properties": {
        "bom_item": {
            "description": "Parent BOM item",
            "type": "integer"
        },
        "part": {
            "description": "Substitute part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "readOnly": true
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "bom_item",
        "part",
        "part_detail",
        "pk"
    ],
    "type": "object"
}

PUT /api/bom/substitute/{id}/

Description

API endpoint for detail view of a single BomItemSubstitute 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"
id path integer No

Request body

{
    "bom_item": 0,
    "part": 0,
    "part_detail": null,
    "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 the BomItemSubstitute class.",
    "properties": {
        "bom_item": {
            "description": "Parent BOM item",
            "type": "integer"
        },
        "part": {
            "description": "Substitute part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "readOnly": true
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "bom_item",
        "part",
        "part_detail",
        "pk"
    ],
    "type": "object"
}

{
    "bom_item": 0,
    "part": 0,
    "part_detail": null,
    "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 the BomItemSubstitute class.",
    "properties": {
        "bom_item": {
            "description": "Parent BOM item",
            "type": "integer"
        },
        "part": {
            "description": "Substitute part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "readOnly": true
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "bom_item",
        "part",
        "part_detail",
        "pk"
    ],
    "type": "object"
}

{
    "bom_item": 0,
    "part": 0,
    "part_detail": null,
    "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 the BomItemSubstitute class.",
    "properties": {
        "bom_item": {
            "description": "Parent BOM item",
            "type": "integer"
        },
        "part": {
            "description": "Substitute part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "readOnly": true
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "bom_item",
        "part",
        "part_detail",
        "pk"
    ],
    "type": "object"
}

Response 200 OK

{
    "bom_item": 0,
    "part": 0,
    "part_detail": null,
    "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 the BomItemSubstitute class.",
    "properties": {
        "bom_item": {
            "description": "Parent BOM item",
            "type": "integer"
        },
        "part": {
            "description": "Substitute part",
            "type": "integer"
        },
        "part_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/PartBrief"
                }
            ],
            "readOnly": true
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        }
    },
    "required": [
        "bom_item",
        "part",
        "part_detail",
        "pk"
    ],
    "type": "object"
}

GET /api/bom/substitute/{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/bom/substitute/{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/bom/substitute/{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"
}

DELETE /api/bom/{id}/

Description

API endpoint for detail view of a single BomItem 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"
id path integer No

Response 204 No Content


GET /api/bom/{id}/

Description

API endpoint for detail view of a single BomItem 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"
id path integer No

Response 200 OK

{
    "allow_variants": true,
    "available_stock": 10.12,
    "available_substitute_stock": 10.12,
    "available_variant_stock": 10.12,
    "building": 10.12,
    "consumable": true,
    "external_stock": 10.12,
    "inherited": true,
    "note": "string",
    "on_order": 10.12,
    "optional": true,
    "overage": "string",
    "part": 0,
    "pk": 0,
    "pricing_max": "string",
    "pricing_min": "string",
    "quantity": 10.12,
    "reference": "string",
    "sub_part": 0,
    "substitutes": [
        {
            "bom_item": 0,
            "part": 0,
            "part_detail": null,
            "pk": 0
        }
    ],
    "validated": 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 BomItem object.",
    "properties": {
        "allow_variants": {
            "description": "Stock items for variant parts can be used for this BOM item",
            "type": "boolean"
        },
        "available_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_substitute_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_variant_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "building": {
            "format": "double",
            "readOnly": true,
            "title": "In Production",
            "type": "number"
        },
        "consumable": {
            "description": "This BOM item is consumable (it is not tracked in build orders)",
            "type": "boolean"
        },
        "external_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "inherited": {
            "description": "This BOM item is inherited by BOMs for variant parts",
            "title": "Gets inherited",
            "type": "boolean"
        },
        "note": {
            "description": "BOM item notes",
            "maxLength": 500,
            "type": "string"
        },
        "on_order": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "optional": {
            "description": "This BOM item is optional",
            "type": "boolean"
        },
        "overage": {
            "description": "Estimated build wastage quantity (absolute or percentage)",
            "maxLength": 24,
            "type": "string"
        },
        "part": {
            "type": "integer"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "pricing_max": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "pricing_min": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "reference": {
            "description": "BOM item reference",
            "maxLength": 5000,
            "type": "string"
        },
        "sub_part": {
            "type": "integer"
        },
        "substitutes": {
            "items": {
                "$ref": "#/components/schemas/BomItemSubstitute"
            },
            "readOnly": true,
            "type": "array"
        },
        "validated": {
            "description": "This BOM item has been validated",
            "type": "boolean"
        }
    },
    "required": [
        "available_stock",
        "available_substitute_stock",
        "available_variant_stock",
        "building",
        "external_stock",
        "on_order",
        "part",
        "pk",
        "pricing_max",
        "pricing_min",
        "quantity",
        "sub_part",
        "substitutes"
    ],
    "type": "object"
}

PATCH /api/bom/{id}/

Description

API endpoint for detail view of a single BomItem 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"
id path integer No

Request body

{
    "allow_variants": true,
    "available_stock": 10.12,
    "available_substitute_stock": 10.12,
    "available_variant_stock": 10.12,
    "building": 10.12,
    "consumable": true,
    "external_stock": 10.12,
    "inherited": true,
    "note": "string",
    "on_order": 10.12,
    "optional": true,
    "overage": "string",
    "part": 0,
    "pk": 0,
    "pricing_max": "string",
    "pricing_min": "string",
    "quantity": 10.12,
    "reference": "string",
    "sub_part": 0,
    "substitutes": [
        {
            "bom_item": 0,
            "part": 0,
            "part_detail": null,
            "pk": 0
        }
    ],
    "validated": 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 BomItem object.",
    "properties": {
        "allow_variants": {
            "description": "Stock items for variant parts can be used for this BOM item",
            "type": "boolean"
        },
        "available_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_substitute_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_variant_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "building": {
            "format": "double",
            "readOnly": true,
            "title": "In Production",
            "type": "number"
        },
        "consumable": {
            "description": "This BOM item is consumable (it is not tracked in build orders)",
            "type": "boolean"
        },
        "external_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "inherited": {
            "description": "This BOM item is inherited by BOMs for variant parts",
            "title": "Gets inherited",
            "type": "boolean"
        },
        "note": {
            "description": "BOM item notes",
            "maxLength": 500,
            "type": "string"
        },
        "on_order": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "optional": {
            "description": "This BOM item is optional",
            "type": "boolean"
        },
        "overage": {
            "description": "Estimated build wastage quantity (absolute or percentage)",
            "maxLength": 24,
            "type": "string"
        },
        "part": {
            "type": "integer"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "pricing_max": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "pricing_min": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "reference": {
            "description": "BOM item reference",
            "maxLength": 5000,
            "type": "string"
        },
        "sub_part": {
            "type": "integer"
        },
        "substitutes": {
            "items": {
                "$ref": "#/components/schemas/BomItemSubstitute"
            },
            "readOnly": true,
            "type": "array"
        },
        "validated": {
            "description": "This BOM item has been validated",
            "type": "boolean"
        }
    },
    "type": "object"
}

{
    "allow_variants": true,
    "available_stock": 10.12,
    "available_substitute_stock": 10.12,
    "available_variant_stock": 10.12,
    "building": 10.12,
    "consumable": true,
    "external_stock": 10.12,
    "inherited": true,
    "note": "string",
    "on_order": 10.12,
    "optional": true,
    "overage": "string",
    "part": 0,
    "pk": 0,
    "pricing_max": "string",
    "pricing_min": "string",
    "quantity": 10.12,
    "reference": "string",
    "sub_part": 0,
    "substitutes": [
        {
            "bom_item": 0,
            "part": 0,
            "part_detail": null,
            "pk": 0
        }
    ],
    "validated": 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 BomItem object.",
    "properties": {
        "allow_variants": {
            "description": "Stock items for variant parts can be used for this BOM item",
            "type": "boolean"
        },
        "available_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_substitute_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_variant_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "building": {
            "format": "double",
            "readOnly": true,
            "title": "In Production",
            "type": "number"
        },
        "consumable": {
            "description": "This BOM item is consumable (it is not tracked in build orders)",
            "type": "boolean"
        },
        "external_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "inherited": {
            "description": "This BOM item is inherited by BOMs for variant parts",
            "title": "Gets inherited",
            "type": "boolean"
        },
        "note": {
            "description": "BOM item notes",
            "maxLength": 500,
            "type": "string"
        },
        "on_order": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "optional": {
            "description": "This BOM item is optional",
            "type": "boolean"
        },
        "overage": {
            "description": "Estimated build wastage quantity (absolute or percentage)",
            "maxLength": 24,
            "type": "string"
        },
        "part": {
            "type": "integer"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "pricing_max": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "pricing_min": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "reference": {
            "description": "BOM item reference",
            "maxLength": 5000,
            "type": "string"
        },
        "sub_part": {
            "type": "integer"
        },
        "substitutes": {
            "items": {
                "$ref": "#/components/schemas/BomItemSubstitute"
            },
            "readOnly": true,
            "type": "array"
        },
        "validated": {
            "description": "This BOM item has been validated",
            "type": "boolean"
        }
    },
    "type": "object"
}

{
    "allow_variants": true,
    "available_stock": 10.12,
    "available_substitute_stock": 10.12,
    "available_variant_stock": 10.12,
    "building": 10.12,
    "consumable": true,
    "external_stock": 10.12,
    "inherited": true,
    "note": "string",
    "on_order": 10.12,
    "optional": true,
    "overage": "string",
    "part": 0,
    "pk": 0,
    "pricing_max": "string",
    "pricing_min": "string",
    "quantity": 10.12,
    "reference": "string",
    "sub_part": 0,
    "substitutes": [
        {
            "bom_item": 0,
            "part": 0,
            "part_detail": null,
            "pk": 0
        }
    ],
    "validated": 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 BomItem object.",
    "properties": {
        "allow_variants": {
            "description": "Stock items for variant parts can be used for this BOM item",
            "type": "boolean"
        },
        "available_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_substitute_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_variant_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "building": {
            "format": "double",
            "readOnly": true,
            "title": "In Production",
            "type": "number"
        },
        "consumable": {
            "description": "This BOM item is consumable (it is not tracked in build orders)",
            "type": "boolean"
        },
        "external_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "inherited": {
            "description": "This BOM item is inherited by BOMs for variant parts",
            "title": "Gets inherited",
            "type": "boolean"
        },
        "note": {
            "description": "BOM item notes",
            "maxLength": 500,
            "type": "string"
        },
        "on_order": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "optional": {
            "description": "This BOM item is optional",
            "type": "boolean"
        },
        "overage": {
            "description": "Estimated build wastage quantity (absolute or percentage)",
            "maxLength": 24,
            "type": "string"
        },
        "part": {
            "type": "integer"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "pricing_max": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "pricing_min": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "reference": {
            "description": "BOM item reference",
            "maxLength": 5000,
            "type": "string"
        },
        "sub_part": {
            "type": "integer"
        },
        "substitutes": {
            "items": {
                "$ref": "#/components/schemas/BomItemSubstitute"
            },
            "readOnly": true,
            "type": "array"
        },
        "validated": {
            "description": "This BOM item has been validated",
            "type": "boolean"
        }
    },
    "type": "object"
}

Response 200 OK

{
    "allow_variants": true,
    "available_stock": 10.12,
    "available_substitute_stock": 10.12,
    "available_variant_stock": 10.12,
    "building": 10.12,
    "consumable": true,
    "external_stock": 10.12,
    "inherited": true,
    "note": "string",
    "on_order": 10.12,
    "optional": true,
    "overage": "string",
    "part": 0,
    "pk": 0,
    "pricing_max": "string",
    "pricing_min": "string",
    "quantity": 10.12,
    "reference": "string",
    "sub_part": 0,
    "substitutes": [
        {
            "bom_item": 0,
            "part": 0,
            "part_detail": null,
            "pk": 0
        }
    ],
    "validated": 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 BomItem object.",
    "properties": {
        "allow_variants": {
            "description": "Stock items for variant parts can be used for this BOM item",
            "type": "boolean"
        },
        "available_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_substitute_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_variant_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "building": {
            "format": "double",
            "readOnly": true,
            "title": "In Production",
            "type": "number"
        },
        "consumable": {
            "description": "This BOM item is consumable (it is not tracked in build orders)",
            "type": "boolean"
        },
        "external_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "inherited": {
            "description": "This BOM item is inherited by BOMs for variant parts",
            "title": "Gets inherited",
            "type": "boolean"
        },
        "note": {
            "description": "BOM item notes",
            "maxLength": 500,
            "type": "string"
        },
        "on_order": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "optional": {
            "description": "This BOM item is optional",
            "type": "boolean"
        },
        "overage": {
            "description": "Estimated build wastage quantity (absolute or percentage)",
            "maxLength": 24,
            "type": "string"
        },
        "part": {
            "type": "integer"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "pricing_max": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "pricing_min": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "reference": {
            "description": "BOM item reference",
            "maxLength": 5000,
            "type": "string"
        },
        "sub_part": {
            "type": "integer"
        },
        "substitutes": {
            "items": {
                "$ref": "#/components/schemas/BomItemSubstitute"
            },
            "readOnly": true,
            "type": "array"
        },
        "validated": {
            "description": "This BOM item has been validated",
            "type": "boolean"
        }
    },
    "required": [
        "available_stock",
        "available_substitute_stock",
        "available_variant_stock",
        "building",
        "external_stock",
        "on_order",
        "part",
        "pk",
        "pricing_max",
        "pricing_min",
        "quantity",
        "sub_part",
        "substitutes"
    ],
    "type": "object"
}

PUT /api/bom/{id}/

Description

API endpoint for detail view of a single BomItem 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"
id path integer No

Request body

{
    "allow_variants": true,
    "available_stock": 10.12,
    "available_substitute_stock": 10.12,
    "available_variant_stock": 10.12,
    "building": 10.12,
    "consumable": true,
    "external_stock": 10.12,
    "inherited": true,
    "note": "string",
    "on_order": 10.12,
    "optional": true,
    "overage": "string",
    "part": 0,
    "pk": 0,
    "pricing_max": "string",
    "pricing_min": "string",
    "quantity": 10.12,
    "reference": "string",
    "sub_part": 0,
    "substitutes": [
        {
            "bom_item": 0,
            "part": 0,
            "part_detail": null,
            "pk": 0
        }
    ],
    "validated": 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 BomItem object.",
    "properties": {
        "allow_variants": {
            "description": "Stock items for variant parts can be used for this BOM item",
            "type": "boolean"
        },
        "available_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_substitute_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_variant_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "building": {
            "format": "double",
            "readOnly": true,
            "title": "In Production",
            "type": "number"
        },
        "consumable": {
            "description": "This BOM item is consumable (it is not tracked in build orders)",
            "type": "boolean"
        },
        "external_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "inherited": {
            "description": "This BOM item is inherited by BOMs for variant parts",
            "title": "Gets inherited",
            "type": "boolean"
        },
        "note": {
            "description": "BOM item notes",
            "maxLength": 500,
            "type": "string"
        },
        "on_order": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "optional": {
            "description": "This BOM item is optional",
            "type": "boolean"
        },
        "overage": {
            "description": "Estimated build wastage quantity (absolute or percentage)",
            "maxLength": 24,
            "type": "string"
        },
        "part": {
            "type": "integer"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "pricing_max": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "pricing_min": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "reference": {
            "description": "BOM item reference",
            "maxLength": 5000,
            "type": "string"
        },
        "sub_part": {
            "type": "integer"
        },
        "substitutes": {
            "items": {
                "$ref": "#/components/schemas/BomItemSubstitute"
            },
            "readOnly": true,
            "type": "array"
        },
        "validated": {
            "description": "This BOM item has been validated",
            "type": "boolean"
        }
    },
    "required": [
        "available_stock",
        "available_substitute_stock",
        "available_variant_stock",
        "building",
        "external_stock",
        "on_order",
        "part",
        "pk",
        "pricing_max",
        "pricing_min",
        "quantity",
        "sub_part",
        "substitutes"
    ],
    "type": "object"
}

{
    "allow_variants": true,
    "available_stock": 10.12,
    "available_substitute_stock": 10.12,
    "available_variant_stock": 10.12,
    "building": 10.12,
    "consumable": true,
    "external_stock": 10.12,
    "inherited": true,
    "note": "string",
    "on_order": 10.12,
    "optional": true,
    "overage": "string",
    "part": 0,
    "pk": 0,
    "pricing_max": "string",
    "pricing_min": "string",
    "quantity": 10.12,
    "reference": "string",
    "sub_part": 0,
    "substitutes": [
        {
            "bom_item": 0,
            "part": 0,
            "part_detail": null,
            "pk": 0
        }
    ],
    "validated": 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 BomItem object.",
    "properties": {
        "allow_variants": {
            "description": "Stock items for variant parts can be used for this BOM item",
            "type": "boolean"
        },
        "available_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_substitute_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_variant_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "building": {
            "format": "double",
            "readOnly": true,
            "title": "In Production",
            "type": "number"
        },
        "consumable": {
            "description": "This BOM item is consumable (it is not tracked in build orders)",
            "type": "boolean"
        },
        "external_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "inherited": {
            "description": "This BOM item is inherited by BOMs for variant parts",
            "title": "Gets inherited",
            "type": "boolean"
        },
        "note": {
            "description": "BOM item notes",
            "maxLength": 500,
            "type": "string"
        },
        "on_order": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "optional": {
            "description": "This BOM item is optional",
            "type": "boolean"
        },
        "overage": {
            "description": "Estimated build wastage quantity (absolute or percentage)",
            "maxLength": 24,
            "type": "string"
        },
        "part": {
            "type": "integer"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "pricing_max": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "pricing_min": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "reference": {
            "description": "BOM item reference",
            "maxLength": 5000,
            "type": "string"
        },
        "sub_part": {
            "type": "integer"
        },
        "substitutes": {
            "items": {
                "$ref": "#/components/schemas/BomItemSubstitute"
            },
            "readOnly": true,
            "type": "array"
        },
        "validated": {
            "description": "This BOM item has been validated",
            "type": "boolean"
        }
    },
    "required": [
        "available_stock",
        "available_substitute_stock",
        "available_variant_stock",
        "building",
        "external_stock",
        "on_order",
        "part",
        "pk",
        "pricing_max",
        "pricing_min",
        "quantity",
        "sub_part",
        "substitutes"
    ],
    "type": "object"
}

{
    "allow_variants": true,
    "available_stock": 10.12,
    "available_substitute_stock": 10.12,
    "available_variant_stock": 10.12,
    "building": 10.12,
    "consumable": true,
    "external_stock": 10.12,
    "inherited": true,
    "note": "string",
    "on_order": 10.12,
    "optional": true,
    "overage": "string",
    "part": 0,
    "pk": 0,
    "pricing_max": "string",
    "pricing_min": "string",
    "quantity": 10.12,
    "reference": "string",
    "sub_part": 0,
    "substitutes": [
        {
            "bom_item": 0,
            "part": 0,
            "part_detail": null,
            "pk": 0
        }
    ],
    "validated": 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 BomItem object.",
    "properties": {
        "allow_variants": {
            "description": "Stock items for variant parts can be used for this BOM item",
            "type": "boolean"
        },
        "available_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_substitute_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_variant_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "building": {
            "format": "double",
            "readOnly": true,
            "title": "In Production",
            "type": "number"
        },
        "consumable": {
            "description": "This BOM item is consumable (it is not tracked in build orders)",
            "type": "boolean"
        },
        "external_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "inherited": {
            "description": "This BOM item is inherited by BOMs for variant parts",
            "title": "Gets inherited",
            "type": "boolean"
        },
        "note": {
            "description": "BOM item notes",
            "maxLength": 500,
            "type": "string"
        },
        "on_order": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "optional": {
            "description": "This BOM item is optional",
            "type": "boolean"
        },
        "overage": {
            "description": "Estimated build wastage quantity (absolute or percentage)",
            "maxLength": 24,
            "type": "string"
        },
        "part": {
            "type": "integer"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "pricing_max": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "pricing_min": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "reference": {
            "description": "BOM item reference",
            "maxLength": 5000,
            "type": "string"
        },
        "sub_part": {
            "type": "integer"
        },
        "substitutes": {
            "items": {
                "$ref": "#/components/schemas/BomItemSubstitute"
            },
            "readOnly": true,
            "type": "array"
        },
        "validated": {
            "description": "This BOM item has been validated",
            "type": "boolean"
        }
    },
    "required": [
        "available_stock",
        "available_substitute_stock",
        "available_variant_stock",
        "building",
        "external_stock",
        "on_order",
        "part",
        "pk",
        "pricing_max",
        "pricing_min",
        "quantity",
        "sub_part",
        "substitutes"
    ],
    "type": "object"
}

Response 200 OK

{
    "allow_variants": true,
    "available_stock": 10.12,
    "available_substitute_stock": 10.12,
    "available_variant_stock": 10.12,
    "building": 10.12,
    "consumable": true,
    "external_stock": 10.12,
    "inherited": true,
    "note": "string",
    "on_order": 10.12,
    "optional": true,
    "overage": "string",
    "part": 0,
    "pk": 0,
    "pricing_max": "string",
    "pricing_min": "string",
    "quantity": 10.12,
    "reference": "string",
    "sub_part": 0,
    "substitutes": [
        {
            "bom_item": 0,
            "part": 0,
            "part_detail": null,
            "pk": 0
        }
    ],
    "validated": 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 BomItem object.",
    "properties": {
        "allow_variants": {
            "description": "Stock items for variant parts can be used for this BOM item",
            "type": "boolean"
        },
        "available_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_substitute_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "available_variant_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "building": {
            "format": "double",
            "readOnly": true,
            "title": "In Production",
            "type": "number"
        },
        "consumable": {
            "description": "This BOM item is consumable (it is not tracked in build orders)",
            "type": "boolean"
        },
        "external_stock": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "inherited": {
            "description": "This BOM item is inherited by BOMs for variant parts",
            "title": "Gets inherited",
            "type": "boolean"
        },
        "note": {
            "description": "BOM item notes",
            "maxLength": 500,
            "type": "string"
        },
        "on_order": {
            "format": "double",
            "readOnly": true,
            "type": "number"
        },
        "optional": {
            "description": "This BOM item is optional",
            "type": "boolean"
        },
        "overage": {
            "description": "Estimated build wastage quantity (absolute or percentage)",
            "maxLength": 24,
            "type": "string"
        },
        "part": {
            "type": "integer"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "pricing_max": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "pricing_min": {
            "format": "decimal",
            "nullable": true,
            "pattern": "^-?\\d{0,13}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "type": "string"
        },
        "quantity": {
            "format": "double",
            "type": "number"
        },
        "reference": {
            "description": "BOM item reference",
            "maxLength": 5000,
            "type": "string"
        },
        "sub_part": {
            "type": "integer"
        },
        "substitutes": {
            "items": {
                "$ref": "#/components/schemas/BomItemSubstitute"
            },
            "readOnly": true,
            "type": "array"
        },
        "validated": {
            "description": "This BOM item has been validated",
            "type": "boolean"
        }
    },
    "required": [
        "available_stock",
        "available_substitute_stock",
        "available_variant_stock",
        "building",
        "external_stock",
        "on_order",
        "part",
        "pk",
        "pricing_max",
        "pricing_min",
        "quantity",
        "sub_part",
        "substitutes"
    ],
    "type": "object"
}

GET /api/bom/{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/bom/{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/bom/{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"
}

PATCH /api/bom/{id}/validate/

Description

API endpoint for validating a BomItem.

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

{
    "valid": 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": "Simple serializer for passing a single boolean field.",
    "properties": {
        "valid": {
            "default": false,
            "type": "boolean"
        }
    },
    "type": "object"
}

{
    "valid": 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": "Simple serializer for passing a single boolean field.",
    "properties": {
        "valid": {
            "default": false,
            "type": "boolean"
        }
    },
    "type": "object"
}

{
    "valid": 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": "Simple serializer for passing a single boolean field.",
    "properties": {
        "valid": {
            "default": false,
            "type": "boolean"
        }
    },
    "type": "object"
}

Response 200 OK

{
    "valid": 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": "Simple serializer for passing a single boolean field.",
    "properties": {
        "valid": {
            "default": false,
            "type": "boolean"
        }
    },
    "type": "object"
}

PUT /api/bom/{id}/validate/

Description

API endpoint for validating a BomItem.

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

{
    "valid": 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": "Simple serializer for passing a single boolean field.",
    "properties": {
        "valid": {
            "default": false,
            "type": "boolean"
        }
    },
    "type": "object"
}

{
    "valid": 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": "Simple serializer for passing a single boolean field.",
    "properties": {
        "valid": {
            "default": false,
            "type": "boolean"
        }
    },
    "type": "object"
}

{
    "valid": 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": "Simple serializer for passing a single boolean field.",
    "properties": {
        "valid": {
            "default": false,
            "type": "boolean"
        }
    },
    "type": "object"
}

Response 200 OK

{
    "valid": 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": "Simple serializer for passing a single boolean field.",
    "properties": {
        "valid": {
            "default": false,
            "type": "boolean"
        }
    },
    "type": "object"
}

Schemas

BomImportExtract

Name Type
columns Array<string>
rows Array<Array<string| null>>

BomImportSubmit

Name Type
items Array<BomItem>

BomImportUpload

Name Type
clear_existing_bom boolean
data_file string(uri)
part integer

BomItem

Name Type
allow_variants boolean
available_stock number(double)
available_substitute_stock number(double)
available_variant_stock number(double)
building number(double)
consumable boolean
external_stock number(double)
inherited boolean
note string
on_order number(double)
optional boolean
overage string
part integer
pk integer
pricing_max string(decimal)| null
pricing_min string(decimal)| null
quantity number(double)
reference string
sub_part integer
substitutes Array<BomItemSubstitute>
validated boolean

BomItemSubstitute

Name Type
bom_item integer
part integer
part_detail
pk integer

BomItemValidation

Name Type
valid boolean

Metadata

Name Type
metadata

PaginatedBomItemList

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

PaginatedBomItemSubstituteList

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

PartBrief

Name Type
active boolean
assembly boolean
barcode_hash string
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

PatchedBomItem

Name Type
allow_variants boolean
available_stock number(double)
available_substitute_stock number(double)
available_variant_stock number(double)
building number(double)
consumable boolean
external_stock number(double)
inherited boolean
note string
on_order number(double)
optional boolean
overage string
part integer
pk integer
pricing_max string(decimal)| null
pricing_min string(decimal)| null
quantity number(double)
reference string
sub_part integer
substitutes Array<BomItemSubstitute>
validated boolean

PatchedBomItemSubstitute

Name Type
bom_item integer
part integer
part_detail
pk integer

PatchedBomItemValidation

Name Type
valid boolean

PatchedMetadata

Name Type
metadata

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