Appearance
barcodes
11 endpoints.
GET /api/v1/barcodes/config
Config
What the pages offer: label sizes, barcode types, and the document types an order can be checked against.
200 — Successful Response
json
{}GET /api/v1/barcodes/lookup
Lookup
One scan. Always 200: found: false is an answer, not an error.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
code | query | yes | string |
200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}GET /api/v1/barcodes/till-index
Till Index
{barcode: item_id} for the register to match scans against its catalogue.
200 — Successful Response
json
{}GET /api/v1/barcodes/items
Items
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
q | query | no | string | |
missing | query | no | boolean | |
limit | query | no | integer | |
ids | query | no |
200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}POST /api/v1/barcodes/link
Link
Put a barcode on an item — what "Link to an item" does after scanning a code the catalogue does not know yet.
Request body
json
{
"properties": {
"item_id": {
"type": "integer",
"title": "Item Id"
},
"barcode": {
"type": "string",
"maxLength": 64,
"title": "Barcode"
},
"symbology": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Symbology"
}
},
"type": "object",
"required": [
"item_id",
"barcode"
],
"title": "LinkIn"
}200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}DELETE /api/v1/barcodes/link/{barcode_id}
Unlink
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
barcode_id | path | yes | integer |
200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}POST /api/v1/barcodes/generate
Generate
Request body
json
{
"properties": {
"item_ids": {
"anyOf": [
{
"items": {
"type": "integer"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Item Ids"
}
},
"type": "object",
"title": "GenerateIn"
}200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}POST /api/v1/barcodes/labels/pdf
Labels Pdf
The labels as a PDF at the chosen physical size. An item with no barcode prints its item code as Code 128 (which scans back to the item — see :func:app.services.barcodes.find_item).
Request body
json
{
"properties": {
"items": {
"items": {
"properties": {
"item_id": {
"type": "integer",
"title": "Item Id"
},
"copies": {
"type": "integer",
"maximum": 500,
"minimum": 1,
"title": "Copies",
"default": 1
}
},
"type": "object",
"required": [
"item_id"
],
"title": "LabelItemIn"
},
"type": "array",
"maxItems": 500,
"minItems": 1,
"title": "Items"
},
"size": {
"type": "string",
"title": "Size",
"default": "roll-50x25"
},
"show_name": {
"type": "boolean",
"title": "Show Name",
"default": true
},
"show_code": {
"type": "boolean",
"title": "Show Code",
"default": true
},
"show_price": {
"type": "boolean",
"title": "Show Price",
"default": false
},
"skip": {
"type": "integer",
"maximum": 200,
"minimum": 0,
"title": "Skip",
"default": 0
}
},
"type": "object",
"required": [
"items"
],
"title": "LabelsIn"
}200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}GET /api/v1/barcodes/documents
Documents
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
kind | query | yes | string | |
q | query | no | string |
200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}GET /api/v1/barcodes/documents/{kind}/{doc_id}
Document
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
kind | path | yes | string | |
doc_id | path | yes | integer |
200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}POST /api/v1/barcodes/checks
Save Check
Record a finished check. The verdict is worked out here, from the document as it stands, not taken from the browser.
Request body
json
{
"properties": {
"kind": {
"type": "string",
"title": "Kind"
},
"doc_id": {
"type": "integer",
"title": "Doc Id"
},
"scanned": {
"additionalProperties": {
"type": "number"
},
"type": "object",
"title": "Scanned"
},
"unknown_codes": {
"items": {
"type": "string"
},
"type": "array",
"maxItems": 200,
"title": "Unknown Codes"
},
"notes": {
"anyOf": [
{
"type": "string",
"maxLength": 1000
},
{
"type": "null"
}
],
"title": "Notes"
}
},
"type": "object",
"required": [
"kind",
"doc_id"
],
"title": "CheckIn"
}200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}