Skip to content

The Barcode Scanning section of the InvenTree API schema is documented below.

InvenTree API 435

API for InvenTree - the intuitive open source inventory management system


License: MIT

Servers

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

barcode


POST /api/barcode/

Description

Endpoint for handling generic barcode scan requests.

Barcode data are decoded by the client application, and sent to this endpoint (as a JSON object) for validation.

A barcode could follow the internal InvenTree barcode format, or it could match to a third-party barcode format (e.g. Digikey).

Input parameters

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

Request body

{
    "barcode": "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": "Generic serializer for receiving barcode data.",
    "properties": {
        "barcode": {
            "description": "Scanned barcode data",
            "maxLength": 4095,
            "type": "string"
        }
    },
    "required": [
        "barcode"
    ],
    "type": "object"
}

{
    "barcode": "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": "Generic serializer for receiving barcode data.",
    "properties": {
        "barcode": {
            "description": "Scanned barcode data",
            "maxLength": 4095,
            "type": "string"
        }
    },
    "required": [
        "barcode"
    ],
    "type": "object"
}

{
    "barcode": "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": "Generic serializer for receiving barcode data.",
    "properties": {
        "barcode": {
            "description": "Scanned barcode data",
            "maxLength": 4095,
            "type": "string"
        }
    },
    "required": [
        "barcode"
    ],
    "type": "object"
}

Response 201 Created

{
    "barcode": "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": "Generic serializer for receiving barcode data.",
    "properties": {
        "barcode": {
            "description": "Scanned barcode data",
            "maxLength": 4095,
            "type": "string"
        }
    },
    "required": [
        "barcode"
    ],
    "type": "object"
}

POST /api/barcode/generate/

Description

Endpoint for generating a barcode for a database object.

The barcode is generated by the selected barcode plugin.

Input parameters

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

Request body

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

Schema of the request body
{
    "description": "Serializer for generating a barcode.",
    "properties": {
        "model": {
            "description": "Model name to generate barcode for",
            "type": "string"
        },
        "pk": {
            "description": "Primary key of model object to generate barcode for",
            "type": "integer"
        }
    },
    "required": [
        "model",
        "pk"
    ],
    "type": "object"
}

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

Schema of the request body
{
    "description": "Serializer for generating a barcode.",
    "properties": {
        "model": {
            "description": "Model name to generate barcode for",
            "type": "string"
        },
        "pk": {
            "description": "Primary key of model object to generate barcode for",
            "type": "integer"
        }
    },
    "required": [
        "model",
        "pk"
    ],
    "type": "object"
}

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

Schema of the request body
{
    "description": "Serializer for generating a barcode.",
    "properties": {
        "model": {
            "description": "Model name to generate barcode for",
            "type": "string"
        },
        "pk": {
            "description": "Primary key of model object to generate barcode for",
            "type": "integer"
        }
    },
    "required": [
        "model",
        "pk"
    ],
    "type": "object"
}

Response 200 OK

{
    "barcode": "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": "Generic serializer for receiving barcode data.",
    "properties": {
        "barcode": {
            "description": "Scanned barcode data",
            "maxLength": 4095,
            "type": "string"
        }
    },
    "required": [
        "barcode"
    ],
    "type": "object"
}

DELETE /api/barcode/history/

Description

Perform a DELETE operation against this list endpoint.

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

Input parameters

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

Request body

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

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

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

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

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

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

Response 204 No Content


GET /api/barcode/history/

Description

List API endpoint for BarcodeScan objects.

Input parameters

Parameter In Type Default Nullable Description
oauth2 header string N/A No
cookieAuth cookie string N/A No API key
basicAuth header string N/A No Basic authentication
tokenAuth header string N/A No Token-based authentication with required prefix "Token"
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.
result query boolean No
search query string No A search term. Searched fields: plugin.
user query integer No

Response 200 OK

{
    "count": 123,
    "next": "http://api.example.org/accounts/?offset=400&limit=100",
    "previous": "http://api.example.org/accounts/?offset=200&limit=100",
    "results": [
        {
            "context": null,
            "data": "string",
            "endpoint": "string",
            "pk": 0,
            "response": null,
            "result": true,
            "timestamp": "2022-04-13T15:42:05.901Z",
            "user": 0,
            "user_detail": null
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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

DELETE /api/barcode/history/{id}/

Description

Detail endpoint for a BarcodeScan object.

Input parameters

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

Response 204 No Content


GET /api/barcode/history/{id}/

Description

Detail endpoint for a BarcodeScan object.

Input parameters

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

Response 200 OK

{
    "context": null,
    "data": "string",
    "endpoint": "string",
    "pk": 0,
    "response": null,
    "result": true,
    "timestamp": "2022-04-13T15:42:05.901Z",
    "user": 0,
    "user_detail": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Serializer for barcode scan results.",
    "properties": {
        "context": {
            "description": "Context data for the barcode scan",
            "nullable": true,
            "readOnly": true
        },
        "data": {
            "description": "Barcode data",
            "readOnly": true,
            "type": "string"
        },
        "endpoint": {
            "description": "URL endpoint which processed the barcode",
            "nullable": true,
            "readOnly": true,
            "title": "Path",
            "type": "string"
        },
        "pk": {
            "readOnly": true,
            "title": "ID",
            "type": "integer"
        },
        "response": {
            "description": "Response data from the barcode scan",
            "nullable": true,
            "readOnly": true
        },
        "result": {
            "description": "Was the barcode scan successful?",
            "readOnly": true,
            "type": "boolean"
        },
        "timestamp": {
            "description": "Date and time of the barcode scan",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
        },
        "user": {
            "description": "User who scanned the barcode",
            "nullable": true,
            "readOnly": true,
            "type": "integer"
        },
        "user_detail": {
            "allOf": [
                {
                    "$ref": "#/components/schemas/User"
                }
            ],
            "readOnly": true
        }
    },
    "required": [
        "data",
        "pk",
        "result",
        "timestamp",
        "user_detail"
    ],
    "type": "object"
}

POST /api/barcode/link/

Description

Endpoint for assigning a barcode to a stock item.

  • This only works if the barcode is not already associated with an object in the database
  • If the barcode does not match an object, then the barcode hash is assigned to the StockItem

Input parameters

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

Request body

{
    "barcode": "string",
    "build": 0,
    "manufacturerpart": 0,
    "part": 0,
    "purchaseorder": 0,
    "returnorder": 0,
    "salesorder": 0,
    "salesordershipment": 0,
    "stockitem": 0,
    "stocklocation": 0,
    "supplierpart": 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 class for linking a barcode to an internal model.",
    "properties": {
        "barcode": {
            "description": "Scanned barcode data",
            "maxLength": 4095,
            "type": "string"
        },
        "build": {
            "nullable": true,
            "title": "Build Order",
            "type": "integer"
        },
        "manufacturerpart": {
            "nullable": true,
            "title": "Manufacturer Part",
            "type": "integer"
        },
        "part": {
            "nullable": true,
            "type": "integer"
        },
        "purchaseorder": {
            "nullable": true,
            "title": "Purchase Order",
            "type": "integer"
        },
        "returnorder": {
            "nullable": true,
            "title": "Return Order",
            "type": "integer"
        },
        "salesorder": {
            "nullable": true,
            "title": "Sales Order",
            "type": "integer"
        },
        "salesordershipment": {
            "nullable": true,
            "title": "Sales Order Shipment",
            "type": "integer"
        },
        "stockitem": {
            "nullable": true,
            "title": "Stock Item",
            "type": "integer"
        },
        "stocklocation": {
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "supplierpart": {
            "nullable": true,
            "title": "Supplier Part",
            "type": "integer"
        }
    },
    "required": [
        "barcode"
    ],
    "type": "object"
}

{
    "barcode": "string",
    "build": 0,
    "manufacturerpart": 0,
    "part": 0,
    "purchaseorder": 0,
    "returnorder": 0,
    "salesorder": 0,
    "salesordershipment": 0,
    "stockitem": 0,
    "stocklocation": 0,
    "supplierpart": 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 class for linking a barcode to an internal model.",
    "properties": {
        "barcode": {
            "description": "Scanned barcode data",
            "maxLength": 4095,
            "type": "string"
        },
        "build": {
            "nullable": true,
            "title": "Build Order",
            "type": "integer"
        },
        "manufacturerpart": {
            "nullable": true,
            "title": "Manufacturer Part",
            "type": "integer"
        },
        "part": {
            "nullable": true,
            "type": "integer"
        },
        "purchaseorder": {
            "nullable": true,
            "title": "Purchase Order",
            "type": "integer"
        },
        "returnorder": {
            "nullable": true,
            "title": "Return Order",
            "type": "integer"
        },
        "salesorder": {
            "nullable": true,
            "title": "Sales Order",
            "type": "integer"
        },
        "salesordershipment": {
            "nullable": true,
            "title": "Sales Order Shipment",
            "type": "integer"
        },
        "stockitem": {
            "nullable": true,
            "title": "Stock Item",
            "type": "integer"
        },
        "stocklocation": {
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "supplierpart": {
            "nullable": true,
            "title": "Supplier Part",
            "type": "integer"
        }
    },
    "required": [
        "barcode"
    ],
    "type": "object"
}

{
    "barcode": "string",
    "build": 0,
    "manufacturerpart": 0,
    "part": 0,
    "purchaseorder": 0,
    "returnorder": 0,
    "salesorder": 0,
    "salesordershipment": 0,
    "stockitem": 0,
    "stocklocation": 0,
    "supplierpart": 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 class for linking a barcode to an internal model.",
    "properties": {
        "barcode": {
            "description": "Scanned barcode data",
            "maxLength": 4095,
            "type": "string"
        },
        "build": {
            "nullable": true,
            "title": "Build Order",
            "type": "integer"
        },
        "manufacturerpart": {
            "nullable": true,
            "title": "Manufacturer Part",
            "type": "integer"
        },
        "part": {
            "nullable": true,
            "type": "integer"
        },
        "purchaseorder": {
            "nullable": true,
            "title": "Purchase Order",
            "type": "integer"
        },
        "returnorder": {
            "nullable": true,
            "title": "Return Order",
            "type": "integer"
        },
        "salesorder": {
            "nullable": true,
            "title": "Sales Order",
            "type": "integer"
        },
        "salesordershipment": {
            "nullable": true,
            "title": "Sales Order Shipment",
            "type": "integer"
        },
        "stockitem": {
            "nullable": true,
            "title": "Stock Item",
            "type": "integer"
        },
        "stocklocation": {
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "supplierpart": {
            "nullable": true,
            "title": "Supplier Part",
            "type": "integer"
        }
    },
    "required": [
        "barcode"
    ],
    "type": "object"
}

Response 201 Created

{
    "barcode": "string",
    "build": 0,
    "manufacturerpart": 0,
    "part": 0,
    "purchaseorder": 0,
    "returnorder": 0,
    "salesorder": 0,
    "salesordershipment": 0,
    "stockitem": 0,
    "stocklocation": 0,
    "supplierpart": 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 class for linking a barcode to an internal model.",
    "properties": {
        "barcode": {
            "description": "Scanned barcode data",
            "maxLength": 4095,
            "type": "string"
        },
        "build": {
            "nullable": true,
            "title": "Build Order",
            "type": "integer"
        },
        "manufacturerpart": {
            "nullable": true,
            "title": "Manufacturer Part",
            "type": "integer"
        },
        "part": {
            "nullable": true,
            "type": "integer"
        },
        "purchaseorder": {
            "nullable": true,
            "title": "Purchase Order",
            "type": "integer"
        },
        "returnorder": {
            "nullable": true,
            "title": "Return Order",
            "type": "integer"
        },
        "salesorder": {
            "nullable": true,
            "title": "Sales Order",
            "type": "integer"
        },
        "salesordershipment": {
            "nullable": true,
            "title": "Sales Order Shipment",
            "type": "integer"
        },
        "stockitem": {
            "nullable": true,
            "title": "Stock Item",
            "type": "integer"
        },
        "stocklocation": {
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "supplierpart": {
            "nullable": true,
            "title": "Supplier Part",
            "type": "integer"
        }
    },
    "required": [
        "barcode"
    ],
    "type": "object"
}

POST /api/barcode/po-allocate/

Description

Endpoint for allocating parts to a purchase order by scanning their barcode.

Note that the scanned barcode may point to:

  • A Part object
  • A ManufacturerPart object
  • A SupplierPart object

Input parameters

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

Request body

{
    "barcode": "string",
    "purchase_order": 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 allocating items against a purchase order.\n\nThe scanned barcode could be a Part, ManufacturerPart or SupplierPart object",
    "properties": {
        "barcode": {
            "description": "Scanned barcode data",
            "maxLength": 4095,
            "type": "string"
        },
        "purchase_order": {
            "description": "Purchase Order to allocate items against",
            "type": "integer"
        }
    },
    "required": [
        "barcode",
        "purchase_order"
    ],
    "type": "object"
}

{
    "barcode": "string",
    "purchase_order": 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 allocating items against a purchase order.\n\nThe scanned barcode could be a Part, ManufacturerPart or SupplierPart object",
    "properties": {
        "barcode": {
            "description": "Scanned barcode data",
            "maxLength": 4095,
            "type": "string"
        },
        "purchase_order": {
            "description": "Purchase Order to allocate items against",
            "type": "integer"
        }
    },
    "required": [
        "barcode",
        "purchase_order"
    ],
    "type": "object"
}

{
    "barcode": "string",
    "purchase_order": 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 allocating items against a purchase order.\n\nThe scanned barcode could be a Part, ManufacturerPart or SupplierPart object",
    "properties": {
        "barcode": {
            "description": "Scanned barcode data",
            "maxLength": 4095,
            "type": "string"
        },
        "purchase_order": {
            "description": "Purchase Order to allocate items against",
            "type": "integer"
        }
    },
    "required": [
        "barcode",
        "purchase_order"
    ],
    "type": "object"
}

Response 201 Created

{
    "barcode": "string",
    "purchase_order": 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 allocating items against a purchase order.\n\nThe scanned barcode could be a Part, ManufacturerPart or SupplierPart object",
    "properties": {
        "barcode": {
            "description": "Scanned barcode data",
            "maxLength": 4095,
            "type": "string"
        },
        "purchase_order": {
            "description": "Purchase Order to allocate items against",
            "type": "integer"
        }
    },
    "required": [
        "barcode",
        "purchase_order"
    ],
    "type": "object"
}

POST /api/barcode/po-receive/

Description

Endpoint for handling receiving parts by scanning their barcode.

Barcode data are decoded by the client application, and sent to this endpoint (as a JSON object) for validation.

The barcode should follow a third-party barcode format (e.g. Digikey) and ideally contain order_number and quantity information.

The following parameters are available:

  • barcode: The raw barcode data (required)
  • purchase_order: The purchase order containing the item to receive (optional)
  • location: The destination location for the received item (optional)

Input parameters

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

Request body

{
    "auto_allocate": true,
    "barcode": "string",
    "line_item": 0,
    "location": 0,
    "purchase_order": 0,
    "supplier": 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 receiving items against a purchase order.\n\nThe following additional fields may be specified:\n\n- purchase_order: PurchaseOrder object to receive items against\n- location: Location to receive items into",
    "properties": {
        "auto_allocate": {
            "default": true,
            "description": "Automatically allocate stock items to the purchase order",
            "type": "boolean"
        },
        "barcode": {
            "description": "Scanned barcode data",
            "maxLength": 4095,
            "type": "string"
        },
        "line_item": {
            "description": "Purchase order line item to receive items against",
            "nullable": true,
            "type": "integer"
        },
        "location": {
            "description": "Location to receive items into",
            "nullable": true,
            "type": "integer"
        },
        "purchase_order": {
            "description": "PurchaseOrder to receive items against",
            "nullable": true,
            "type": "integer"
        },
        "supplier": {
            "description": "Supplier to receive items from",
            "nullable": true,
            "type": "integer"
        }
    },
    "required": [
        "barcode"
    ],
    "type": "object"
}

{
    "auto_allocate": true,
    "barcode": "string",
    "line_item": 0,
    "location": 0,
    "purchase_order": 0,
    "supplier": 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 receiving items against a purchase order.\n\nThe following additional fields may be specified:\n\n- purchase_order: PurchaseOrder object to receive items against\n- location: Location to receive items into",
    "properties": {
        "auto_allocate": {
            "default": true,
            "description": "Automatically allocate stock items to the purchase order",
            "type": "boolean"
        },
        "barcode": {
            "description": "Scanned barcode data",
            "maxLength": 4095,
            "type": "string"
        },
        "line_item": {
            "description": "Purchase order line item to receive items against",
            "nullable": true,
            "type": "integer"
        },
        "location": {
            "description": "Location to receive items into",
            "nullable": true,
            "type": "integer"
        },
        "purchase_order": {
            "description": "PurchaseOrder to receive items against",
            "nullable": true,
            "type": "integer"
        },
        "supplier": {
            "description": "Supplier to receive items from",
            "nullable": true,
            "type": "integer"
        }
    },
    "required": [
        "barcode"
    ],
    "type": "object"
}

{
    "auto_allocate": true,
    "barcode": "string",
    "line_item": 0,
    "location": 0,
    "purchase_order": 0,
    "supplier": 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 receiving items against a purchase order.\n\nThe following additional fields may be specified:\n\n- purchase_order: PurchaseOrder object to receive items against\n- location: Location to receive items into",
    "properties": {
        "auto_allocate": {
            "default": true,
            "description": "Automatically allocate stock items to the purchase order",
            "type": "boolean"
        },
        "barcode": {
            "description": "Scanned barcode data",
            "maxLength": 4095,
            "type": "string"
        },
        "line_item": {
            "description": "Purchase order line item to receive items against",
            "nullable": true,
            "type": "integer"
        },
        "location": {
            "description": "Location to receive items into",
            "nullable": true,
            "type": "integer"
        },
        "purchase_order": {
            "description": "PurchaseOrder to receive items against",
            "nullable": true,
            "type": "integer"
        },
        "supplier": {
            "description": "Supplier to receive items from",
            "nullable": true,
            "type": "integer"
        }
    },
    "required": [
        "barcode"
    ],
    "type": "object"
}

Response 201 Created

{
    "auto_allocate": true,
    "barcode": "string",
    "line_item": 0,
    "location": 0,
    "purchase_order": 0,
    "supplier": 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 receiving items against a purchase order.\n\nThe following additional fields may be specified:\n\n- purchase_order: PurchaseOrder object to receive items against\n- location: Location to receive items into",
    "properties": {
        "auto_allocate": {
            "default": true,
            "description": "Automatically allocate stock items to the purchase order",
            "type": "boolean"
        },
        "barcode": {
            "description": "Scanned barcode data",
            "maxLength": 4095,
            "type": "string"
        },
        "line_item": {
            "description": "Purchase order line item to receive items against",
            "nullable": true,
            "type": "integer"
        },
        "location": {
            "description": "Location to receive items into",
            "nullable": true,
            "type": "integer"
        },
        "purchase_order": {
            "description": "PurchaseOrder to receive items against",
            "nullable": true,
            "type": "integer"
        },
        "supplier": {
            "description": "Supplier to receive items from",
            "nullable": true,
            "type": "integer"
        }
    },
    "required": [
        "barcode"
    ],
    "type": "object"
}

POST /api/barcode/so-allocate/

Description

Endpoint for allocating stock to a sales order, by scanning barcode.

The scanned barcode should map to a StockItem object.

Additional fields can be passed to the endpoint:

  • SalesOrder (Required)
  • Line Item
  • Shipment
  • Quantity

Input parameters

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

Request body

{
    "barcode": "string",
    "line": 0,
    "quantity": 0,
    "sales_order": 0,
    "shipment": 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": "Serializr for allocating stock items to a sales order.\n\nThe scanned barcode must map to a StockItem object",
    "properties": {
        "barcode": {
            "description": "Scanned barcode data",
            "maxLength": 4095,
            "type": "string"
        },
        "line": {
            "description": "Sales order line item to allocate items against",
            "nullable": true,
            "type": "integer"
        },
        "quantity": {
            "description": "Quantity to allocate",
            "type": "integer"
        },
        "sales_order": {
            "description": "Sales Order to allocate items against",
            "type": "integer"
        },
        "shipment": {
            "description": "Sales order shipment to allocate items against",
            "nullable": true,
            "type": "integer"
        }
    },
    "required": [
        "barcode",
        "sales_order"
    ],
    "type": "object"
}

{
    "barcode": "string",
    "line": 0,
    "quantity": 0,
    "sales_order": 0,
    "shipment": 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": "Serializr for allocating stock items to a sales order.\n\nThe scanned barcode must map to a StockItem object",
    "properties": {
        "barcode": {
            "description": "Scanned barcode data",
            "maxLength": 4095,
            "type": "string"
        },
        "line": {
            "description": "Sales order line item to allocate items against",
            "nullable": true,
            "type": "integer"
        },
        "quantity": {
            "description": "Quantity to allocate",
            "type": "integer"
        },
        "sales_order": {
            "description": "Sales Order to allocate items against",
            "type": "integer"
        },
        "shipment": {
            "description": "Sales order shipment to allocate items against",
            "nullable": true,
            "type": "integer"
        }
    },
    "required": [
        "barcode",
        "sales_order"
    ],
    "type": "object"
}

{
    "barcode": "string",
    "line": 0,
    "quantity": 0,
    "sales_order": 0,
    "shipment": 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": "Serializr for allocating stock items to a sales order.\n\nThe scanned barcode must map to a StockItem object",
    "properties": {
        "barcode": {
            "description": "Scanned barcode data",
            "maxLength": 4095,
            "type": "string"
        },
        "line": {
            "description": "Sales order line item to allocate items against",
            "nullable": true,
            "type": "integer"
        },
        "quantity": {
            "description": "Quantity to allocate",
            "type": "integer"
        },
        "sales_order": {
            "description": "Sales Order to allocate items against",
            "type": "integer"
        },
        "shipment": {
            "description": "Sales order shipment to allocate items against",
            "nullable": true,
            "type": "integer"
        }
    },
    "required": [
        "barcode",
        "sales_order"
    ],
    "type": "object"
}

Response 201 Created

{
    "barcode": "string",
    "line": 0,
    "quantity": 0,
    "sales_order": 0,
    "shipment": 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": "Serializr for allocating stock items to a sales order.\n\nThe scanned barcode must map to a StockItem object",
    "properties": {
        "barcode": {
            "description": "Scanned barcode data",
            "maxLength": 4095,
            "type": "string"
        },
        "line": {
            "description": "Sales order line item to allocate items against",
            "nullable": true,
            "type": "integer"
        },
        "quantity": {
            "description": "Quantity to allocate",
            "type": "integer"
        },
        "sales_order": {
            "description": "Sales Order to allocate items against",
            "type": "integer"
        },
        "shipment": {
            "description": "Sales order shipment to allocate items against",
            "nullable": true,
            "type": "integer"
        }
    },
    "required": [
        "barcode",
        "sales_order"
    ],
    "type": "object"
}

POST /api/barcode/unlink/

Description

Endpoint for unlinking / unassigning a custom barcode from a database object.

Input parameters

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

Request body

{
    "build": 0,
    "manufacturerpart": 0,
    "part": 0,
    "purchaseorder": 0,
    "returnorder": 0,
    "salesorder": 0,
    "salesordershipment": 0,
    "stockitem": 0,
    "stocklocation": 0,
    "supplierpart": 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 class for unlinking a barcode from an internal model.",
    "properties": {
        "build": {
            "nullable": true,
            "title": "Build Order",
            "type": "integer"
        },
        "manufacturerpart": {
            "nullable": true,
            "title": "Manufacturer Part",
            "type": "integer"
        },
        "part": {
            "nullable": true,
            "type": "integer"
        },
        "purchaseorder": {
            "nullable": true,
            "title": "Purchase Order",
            "type": "integer"
        },
        "returnorder": {
            "nullable": true,
            "title": "Return Order",
            "type": "integer"
        },
        "salesorder": {
            "nullable": true,
            "title": "Sales Order",
            "type": "integer"
        },
        "salesordershipment": {
            "nullable": true,
            "title": "Sales Order Shipment",
            "type": "integer"
        },
        "stockitem": {
            "nullable": true,
            "title": "Stock Item",
            "type": "integer"
        },
        "stocklocation": {
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "supplierpart": {
            "nullable": true,
            "title": "Supplier Part",
            "type": "integer"
        }
    },
    "type": "object"
}

{
    "build": 0,
    "manufacturerpart": 0,
    "part": 0,
    "purchaseorder": 0,
    "returnorder": 0,
    "salesorder": 0,
    "salesordershipment": 0,
    "stockitem": 0,
    "stocklocation": 0,
    "supplierpart": 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 class for unlinking a barcode from an internal model.",
    "properties": {
        "build": {
            "nullable": true,
            "title": "Build Order",
            "type": "integer"
        },
        "manufacturerpart": {
            "nullable": true,
            "title": "Manufacturer Part",
            "type": "integer"
        },
        "part": {
            "nullable": true,
            "type": "integer"
        },
        "purchaseorder": {
            "nullable": true,
            "title": "Purchase Order",
            "type": "integer"
        },
        "returnorder": {
            "nullable": true,
            "title": "Return Order",
            "type": "integer"
        },
        "salesorder": {
            "nullable": true,
            "title": "Sales Order",
            "type": "integer"
        },
        "salesordershipment": {
            "nullable": true,
            "title": "Sales Order Shipment",
            "type": "integer"
        },
        "stockitem": {
            "nullable": true,
            "title": "Stock Item",
            "type": "integer"
        },
        "stocklocation": {
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "supplierpart": {
            "nullable": true,
            "title": "Supplier Part",
            "type": "integer"
        }
    },
    "type": "object"
}

{
    "build": 0,
    "manufacturerpart": 0,
    "part": 0,
    "purchaseorder": 0,
    "returnorder": 0,
    "salesorder": 0,
    "salesordershipment": 0,
    "stockitem": 0,
    "stocklocation": 0,
    "supplierpart": 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 class for unlinking a barcode from an internal model.",
    "properties": {
        "build": {
            "nullable": true,
            "title": "Build Order",
            "type": "integer"
        },
        "manufacturerpart": {
            "nullable": true,
            "title": "Manufacturer Part",
            "type": "integer"
        },
        "part": {
            "nullable": true,
            "type": "integer"
        },
        "purchaseorder": {
            "nullable": true,
            "title": "Purchase Order",
            "type": "integer"
        },
        "returnorder": {
            "nullable": true,
            "title": "Return Order",
            "type": "integer"
        },
        "salesorder": {
            "nullable": true,
            "title": "Sales Order",
            "type": "integer"
        },
        "salesordershipment": {
            "nullable": true,
            "title": "Sales Order Shipment",
            "type": "integer"
        },
        "stockitem": {
            "nullable": true,
            "title": "Stock Item",
            "type": "integer"
        },
        "stocklocation": {
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "supplierpart": {
            "nullable": true,
            "title": "Supplier Part",
            "type": "integer"
        }
    },
    "type": "object"
}

Response 201 Created

{
    "build": 0,
    "manufacturerpart": 0,
    "part": 0,
    "purchaseorder": 0,
    "returnorder": 0,
    "salesorder": 0,
    "salesordershipment": 0,
    "stockitem": 0,
    "stocklocation": 0,
    "supplierpart": 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 class for unlinking a barcode from an internal model.",
    "properties": {
        "build": {
            "nullable": true,
            "title": "Build Order",
            "type": "integer"
        },
        "manufacturerpart": {
            "nullable": true,
            "title": "Manufacturer Part",
            "type": "integer"
        },
        "part": {
            "nullable": true,
            "type": "integer"
        },
        "purchaseorder": {
            "nullable": true,
            "title": "Purchase Order",
            "type": "integer"
        },
        "returnorder": {
            "nullable": true,
            "title": "Return Order",
            "type": "integer"
        },
        "salesorder": {
            "nullable": true,
            "title": "Sales Order",
            "type": "integer"
        },
        "salesordershipment": {
            "nullable": true,
            "title": "Sales Order Shipment",
            "type": "integer"
        },
        "stockitem": {
            "nullable": true,
            "title": "Stock Item",
            "type": "integer"
        },
        "stocklocation": {
            "nullable": true,
            "title": "Stock Location",
            "type": "integer"
        },
        "supplierpart": {
            "nullable": true,
            "title": "Supplier Part",
            "type": "integer"
        }
    },
    "type": "object"
}

Schemas

Barcode

Name Type
barcode string

BarcodeAssign

Name Type
barcode string
build integer| null
manufacturerpart integer| null
part integer| null
purchaseorder integer| null
returnorder integer| null
salesorder integer| null
salesordershipment integer| null
stockitem integer| null
stocklocation integer| null
supplierpart integer| null

BarcodeGenerate

Name Type
model string
pk integer

BarcodePOAllocate

Name Type
barcode string
purchase_order integer

BarcodePOReceive

Name Type
auto_allocate boolean
barcode string
line_item integer| null
location integer| null
purchase_order integer| null
supplier integer| null

BarcodeScanResult

Name Type
context
data string
endpoint string| null
pk integer
response
result boolean
timestamp string(date-time)
user integer| null
user_detail

BarcodeSOAllocate

Name Type
barcode string
line integer| null
quantity integer
sales_order integer
shipment integer| null

BarcodeUnassign

Name Type
build integer| null
manufacturerpart integer| null
part integer| null
purchaseorder integer| null
returnorder integer| null
salesorder integer| null
salesordershipment integer| null
stockitem integer| null
stocklocation integer| null
supplierpart integer| null

BulkRequest

Name Type
filters
items Array<integer>

PaginatedBarcodeScanResultList

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

User

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

Common responses

This section describes common responses that are reused across operations.

allauth.AddAuthenticatorConflict

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

Schema of the response body
null

allauth.AddWebAuthnAuthenticator

A WebAuthn authenticator.

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

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

allauth.Authenticated

The user is authenticated.

Schema of the response body
null

allauth.AuthenticatedByCode

Authenticated by code.

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

allauth.AuthenticatedByPassword

Authenticated by password.

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

allauth.AuthenticatedByPasswordAnd2FA

Authenticated by password and 2FA.

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

allauth.Authentication

Not authenticated.

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

allauth.AuthenticationOrReauthentication

The response indicates authentication or re-authentication is required.

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

allauth.Authenticators

List of authenticators.

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

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

allauth.Configuration

The django-allauth configuration.

Schema of the response body
null

allauth.EmailAddresses

List of email addresses.

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

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

allauth.EmailVerificationInfo

Email verification information.

Schema of the response body
null

allauth.Error

An input error occurred.

Schema of the response body
null

allauth.Forbidden

A forbidden response.

Schema of the response body
null

allauth.NotFound

Not found.

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

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

allauth.PasswordResetInfo

Information about the password reset key.

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

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

allauth.PhoneNumbers

List of phone numbers.

Schema of the response body
null

allauth.ProviderAccounts

List of third-party provider accounts.

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

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

allauth.ProviderSignup

Information relating to the pending provider signup.

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

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

allauth.ReauthenticationRequired

The response indicates reauthentication is required.

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

allauth.RecoveryCodes

Information on the recovery codes.

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

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

allauth.RefreshToken

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

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

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

allauth.SessionGone

The response indicates session is invalid or no longer exists.

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

allauth.Sessions

List of sessions.

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

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

allauth.StatusOK

A success response.

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

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

allauth.TOTPAuthenticator

Information on the TOTP authenticator.

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

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

allauth.TOTPAuthenticatorNotFound

No TOTP authenticator has been set up.

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

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

allauth.TooManyRequests

Too many requests.

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

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

allauth.Unauthenticated

There is no authenticated session.

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

allauth.WebAuthnAuthenticator

A WebAuthn authenticator.

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

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

allauth.WebAuthnCreationOptionsResponse

WebAuthn credential creation options.

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

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

allauth.WebAuthnRequestOptionsResponse

WebAuthn credential request options.

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

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

Common parameters

This section describes common parameters that are reused across operations.

allauth.EmailVerificationKey

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

allauth.PasswordLess

Name In Type Default Nullable Description
passwordless query boolean No

allauth.PasswordResetKey

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

Security schemes

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

More documentation

More information about InvenTree in the official docs


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