diff --git a/docs/api/routes-all.md b/docs/api/routes-all.md index 801ca8a..c0c817e 100644 --- a/docs/api/routes-all.md +++ b/docs/api/routes-all.md @@ -4,56 +4,60 @@ Overview of all 189 API endpoints across all modules. ### Notation -Types: `str` string, `int` integer, `num` number, `bool` boolean, `{}` object; `T[]` array; `?` optional. +Types: `str` string, `int` integer, `num` number, `bool` boolean; `T[]` array; `?` optional. Params: path values first, then `query:` and `body:` (`body?` = optional body). Responses: status code + JSON shape; `Tn` refers to a reusable type below. ### Reusable types - `T1` = `{ article: T2 }` -- `T2` = `{ id: int, sku: str, name: str, slug: str, track_stock: bool, unitamount: num, weight: num, unit: T28, brand: T24, categoryIds: int[], photos: T17[], eans: str[], prices: T29[], suppliers: T9[] }` +- `T2` = `{ id: int, sku: str, name: str, slug: str, track_stock: bool, unitamount: num, weight: num, unit: T32, brand: T28, categoryIds: int[], photos: T22[], eans: str[], prices: T33[], suppliers: T11[] }` - `T3` = `{ delivery: T4 }` -- `T4` = `{ id: int, number: str, type: str, supplierId: int, externalNumber: str, date: str, createdAt: str, ledger: T34, lines: T18[], files: T8[] }` -- `T5` = `{ order: T7 }` -- `T6` = `{ quote: T7 }` -- `T7` = `{ id: int, number: str, type: str, entityId: int, date: str, createdAt: str, lines: T18[] }` -- `T8` = `{ id: int, manifestId: int, fileId: int, sort: int, hash: str, mimetype: str, name: str, size: int, created: str, modified: str, thumbavif: str, thumbx: int, thumby: int, meta: { [k]: str } }` -- `T9` = `{ id: int, articleId: int, entityId: int, supplierName: str, sku: str, pu: num, stock: num, sort: int, priceId: int, price: T37 }` -- `T10` = `{ ledger: T11[] }` -- `T11` = `{ id: int, manifestarticle_id: int, transaction_type: str, amount: num, transaction_text: str, hash_version: int, prev_hash: str, sku: str, created_at: str }` -- `T12` = `{ id: int, entityId: int, firstName: str, name: str, street: str, streetNumber: str, zip: str, city: str, county: str, addressType: str }` -- `T13` = `{ id: int, name: str, sort: int, exclusive: bool, values: T32[] }` -- `T14` = `{ entity: T20 }` -- `T15` = `{ printer: T21 }` -- `T16` = `{ labeltemplate: T23 }` -- `T17` = `{ sort: int, fullHash: str, fullW: int, fullH: int, fullSize: int, thumbW: int, thumbH: int, thumbHash: str }` -- `T18` = `{ id: int, sku: str, name: str, pu: num, amount: num, net: num, rebate: num, taxrate: num, comment: str }` -- `T19` = `{ id: int, companyuser_id: int, provider: str, model: str, created_at: str, updated_at: str, state: str }` -- `T20` = `{ id: int, customergroupId: int, firstName: str, name: str, number: str, createdAt: str, updatedAt: str }` -- `T21` = `{ id: int, company_id: int, address: str, type: str, model: str, serial: str, sort: int, desc: str }` -- `T22` = `{ amount: num, net: num, taxrate: num, sku?: str, name?: str, pu?: num, rebate?: num, comment?: str }` -- `T23` = `{ id: int, name: str, width: num, height: num, dpi: int, type: str, content: {}, thumb: str }` -- `T24` = `{ id: int, name: str, fullHash: str, thumbW: int, thumbH: int, thumbHash: str }` -- `T25` = `{ article: T27 }` -- `T26` = `{ id: int, iso639: str, name: str, taxrate: num, reducedtaxrate: num }` -- `T27` = `{ id: int, categoryId: int, name: str, sku: str, track_stock: bool }` -- `T28` = `{ si: str, basesi: str, basesifactor: num, symbol: str, name: str }` -- `T29` = `{ minmultiplier: num, net: num, taxRate: num, customergroupId: int }` -- `T30` = `{ id: int, email: str, selectedCompanyId: int, picture: str }` -- `T31` = `{ id: int, entityId: int, contactType: str, contact: str }` -- `T32` = `{ id: int, attributeId: int, value: str, sort: int }` -- `T33` = `{ id: int, name: str, createdAt: str, updatedAt: str }` -- `T34` = `{ totalPositions: int, completelyOnLedgerPositions: int }` -- `T35` = `{ id: int, name: str, sort: int, exclusive: bool }` -- `T36` = `{ warehouse: T38 }` -- `T37` = `{ net: num, taxId: int, taxRate: num }` -- `T38` = `{ id: int, name: str, sort: int }` -- `T39` = `{ id: int, categoryIds: int[] }` +- `T4` = `{ id: int, number: str, type: str, supplierId: int, externalNumber: str, date: str, createdAt: str, ledger: T38, lines: T23[], files: T10[] }` +- `T5` = `{ labeltemplate: T6 }` +- `T6` = `{ id: int, name: str, width: num, height: num, dpi: int, type: str, content: T16, thumb: str }` +- `T7` = `{ order: T9 }` +- `T8` = `{ quote: T9 }` +- `T9` = `{ id: int, number: str, type: str, entityId: int, date: str, createdAt: str, lines: T23[] }` +- `T10` = `{ id: int, manifestId: int, fileId: int, sort: int, hash: str, mimetype: str, name: str, size: int, created: str, modified: str, thumbavif: str, thumbx: int, thumby: int, meta: { [k]: str } }` +- `T11` = `{ id: int, articleId: int, entityId: int, supplierName: str, sku: str, pu: num, stock: num, sort: int, priceId: int, price: T41 }` +- `T12` = `{ ledger: T13[] }` +- `T13` = `{ id: int, manifestarticle_id: int, transaction_type: str, amount: num, transaction_text: str, hash_version: int, prev_hash: str, sku: str, created_at: str }` +- `T14` = `{ id: int, entityId: int, firstName: str, name: str, street: str, streetNumber: str, zip: str, city: str, county: str, addressType: str }` +- `T15` = `{ objects: T17[] }` +- `T16` = `{ objects: T19[] }` +- `T17` = `{ id: str, type: str, x: num, y: num, w?: num, h?: num, text?: str, font?: str, fontSize?: num, barcodeFormat?: str }` +- `T18` = `{ id: int, name: str, sort: int, exclusive: bool, values: T36[] }` +- `T19` = `{ id: str, type: str, x: num, y: num, w: num, h: num, text: str, font: str, fontSize: num, barcodeFormat: str }` +- `T20` = `{ entity: T25 }` +- `T21` = `{ printer: T26 }` +- `T22` = `{ sort: int, fullHash: str, fullW: int, fullH: int, fullSize: int, thumbW: int, thumbH: int, thumbHash: str }` +- `T23` = `{ id: int, sku: str, name: str, pu: num, amount: num, net: num, rebate: num, taxrate: num, comment: str }` +- `T24` = `{ id: int, companyuser_id: int, provider: str, model: str, created_at: str, updated_at: str, state: str }` +- `T25` = `{ id: int, customergroupId: int, firstName: str, name: str, number: str, createdAt: str, updatedAt: str }` +- `T26` = `{ id: int, company_id: int, address: str, type: str, model: str, serial: str, sort: int, desc: str }` +- `T27` = `{ amount: num, net: num, taxrate: num, sku?: str, name?: str, pu?: num, rebate?: num, comment?: str }` +- `T28` = `{ id: int, name: str, fullHash: str, thumbW: int, thumbH: int, thumbHash: str }` +- `T29` = `{ article: T31 }` +- `T30` = `{ id: int, iso639: str, name: str, taxrate: num, reducedtaxrate: num }` +- `T31` = `{ id: int, categoryId: int, name: str, sku: str, track_stock: bool }` +- `T32` = `{ si: str, basesi: str, basesifactor: num, symbol: str, name: str }` +- `T33` = `{ minmultiplier: num, net: num, taxRate: num, customergroupId: int }` +- `T34` = `{ id: int, email: str, selectedCompanyId: int, picture: str }` +- `T35` = `{ id: int, entityId: int, contactType: str, contact: str }` +- `T36` = `{ id: int, attributeId: int, value: str, sort: int }` +- `T37` = `{ id: int, name: str, createdAt: str, updatedAt: str }` +- `T38` = `{ totalPositions: int, completelyOnLedgerPositions: int }` +- `T39` = `{ id: int, name: str, sort: int, exclusive: bool }` +- `T40` = `{ warehouse: T42 }` +- `T41` = `{ net: num, taxId: int, taxRate: num }` +- `T42` = `{ id: int, name: str, sort: int }` +- `T43` = `{ id: int, categoryIds: int[] }` ### Routes #### Create article in category — `POST /article` - Params: `body: { categoryId: int, name: str, track_stock?: bool }` -- Returns: `201 T25` +- Returns: `201 T29` #### Export articles as ZIP — `GET /article/export.zip` - Params: `query: categoryId?: int` - Returns: `200 zip` @@ -89,10 +93,10 @@ Params: path values first, then `query:` and `body:` (`body?` = optional body). - Returns: `200 { children: { id: int, sku: str, name: str, parentsort: int, attributeValueId: int, attributeValue: str }[] }` #### Create and attach a new child article to a parent article — `POST /article/{sku}/children` - Params: `sku: str, body: { attributeValueId?: int, value?: str, name?: str }` -- Returns: `201 T25` +- Returns: `201 T29` #### Attach an existing article as a child to a parent article — `PUT /article/{sku}/children` - Params: `sku: str, body: { sku: str, attributeValueId?: int, value?: str, reparent?: bool }` -- Returns: `200 { article: T27, children: { id: int, sku: str, name: str, parentsort: int, attributeValueId: int, attributeValue: str }[] }` +- Returns: `200 { article: T31, children: { id: int, sku: str, name: str, parentsort: int, attributeValueId: int, attributeValue: str }[] }` #### Remove a child article from a parent article — `DELETE /article/{sku}/children/{childSku}` - Params: `sku: str, childSku: str, query: deleteArticle?: bool` - Returns: `200 { success: bool, deleted: bool }` @@ -119,7 +123,7 @@ Params: path values first, then `query:` and `body:` (`body?` = optional body). - Returns: `200 { options: { id: int, articleId: int, sku: str, name: str, count: int, sort: int, mandated: bool }[] }` #### Toggle parent mode for an article — `POST /article/{sku}/parent` - Params: `sku: str, body: { isParent: bool, attributeNameId?: int }` -- Returns: `200 T25` +- Returns: `200 T29` #### Replace POS prices by SKU — `PUT /article/{sku}/prices` - Params: `sku: str, body: { prices: { net?: num, gross?: num, price?: num, taxRate?: num, tax?: num, minmultiplier?: num }[] }` - Returns: `200 T1` @@ -137,10 +141,10 @@ Params: path values first, then `query:` and `body:` (`body?` = optional body). - Returns: `200` #### List article suppliers — `GET /article/{sku}/supplier` - Params: `sku: str` -- Returns: `200 { suppliers: T9[] }` +- Returns: `200 { suppliers: T11[] }` #### Assign supplier to article — `POST /article/{sku}/supplier` - Params: `sku: str, body: { entityId: int, sku?: str, pu?: num, stock?: num, sort?: int, netPrice?: num, taxId?: int, taxRate?: num }` -- Returns: `201 { supplier: T9 }` +- Returns: `201 { supplier: T11 }` #### Reorder article suppliers — `PUT /article/{sku}/supplier/order` - Params: `sku: str, body: { ids: int[] }` - Returns: `200 { ids: int[] }` @@ -149,7 +153,7 @@ Params: path values first, then `query:` and `body:` (`body?` = optional body). - Returns: `204 void` #### Update article supplier assignment — `PATCH /article/{sku}/supplier/{id}` - Params: `sku: str, id: int, body: { sku?: str, pu?: num, stock?: num, sort?: int, netPrice?: num, taxId?: int, taxRate?: num }` -- Returns: `200 { supplier: T9 }` +- Returns: `200 { supplier: T11 }` #### Set article track_stock flag by SKU — `PUT /article/{sku}/track_stock` - Params: `sku: str, body: { track_stock: bool }` - Returns: `200 T1` @@ -158,19 +162,19 @@ Params: path values first, then `query:` and `body:` (`body?` = optional body). - Returns: `200 T1` #### List attribute names — `GET /attributename` _none_ -- Returns: `200 { attributenames: T13[] }` +- Returns: `200 { attributenames: T18[] }` #### Create attribute name — `POST /attributename` - Params: `body: { name: str, sort?: int, exclusive?: bool }` -- Returns: `201 { attributename: T13 }` +- Returns: `201 { attributename: T18 }` #### Reorder attribute names — `PUT /attributename/order` - Params: `body: { attributenameIds: int[] }` - Returns: `200` #### List values for an attribute — `GET /attributename/{attributeId}/value` - Params: `attributeId: int` -- Returns: `200 { values: T32[] }` +- Returns: `200 { values: T36[] }` #### Create value for an attribute — `POST /attributename/{attributeId}/value` - Params: `attributeId: int, body: { value: str, sort?: int }` -- Returns: `201 { attributevalue: T32 }` +- Returns: `201 { attributevalue: T36 }` #### Reorder values of an attribute — `PUT /attributename/{attributeId}/value/order` - Params: `attributeId: int, body: { attributevalueIds: int[] }` - Returns: `200` @@ -179,25 +183,25 @@ _none_ - Returns: `200` #### Update attribute name — `PATCH /attributename/{id}` - Params: `id: int, body: { name?: str, sort?: int, exclusive?: bool }` -- Returns: `200 { attributename: T13 }` +- Returns: `200 { attributename: T18 }` #### Delete attribute value — `DELETE /attributevalue/{id}` - Params: `id: int` - Returns: `200` #### Update attribute value — `PATCH /attributevalue/{id}` - Params: `id: int, body: { value?: str, sort?: int }` -- Returns: `200 { attributevalue: T32 }` +- Returns: `200 { attributevalue: T36 }` #### Login with Google ID token — `POST /auth/login` - Params: `body: { idToken: str }` -- Returns: `200 { message: str, user: T30 }` +- Returns: `200 { message: str, user: T34 }` #### Logout — `POST /auth/logout` _none_ - Returns: `200 { message: str }` #### Current user — `GET /auth/me` _none_ -- Returns: `200 { user: T30, googleClientId: str }` +- Returns: `200 { user: T34, googleClientId: str }` #### Set selected company — `PUT /auth/selected-company` - Params: `body: { companyId: int }` -- Returns: `200 { user: T30 }` +- Returns: `200 { user: T34 }` #### List brands — `GET /brand` _none_ - Returns: `200 { brands: { id: int, name: str, gsprpinfo: str, pics: any[] }[] }` @@ -224,7 +228,7 @@ _none_ - Returns: `200 { categoryIds: int[] }` #### Category tree — `GET /category/tree` _none_ -- Returns: `200 { languageId: int, tree: { id: int, parentId: int, sort: int, name: str, slug: str, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, posterminalIds: int[] }[], articles: { id: int, sku: str, name: str, slug: str, net: num, taxRate: num, track_stock: bool, optionsCount: int, articleListCount: int, childCount: int, parentArticleId: int, parentSku: str, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, brand: T24 }[] }` +- Returns: `200 { languageId: int, tree: { id: int, parentId: int, sort: int, name: str, slug: str, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, posterminalIds: int[] }[], articles: { id: int, sku: str, name: str, slug: str, net: num, taxRate: num, track_stock: bool, optionsCount: int, articleListCount: int, childCount: int, parentArticleId: int, parentSku: str, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, brand: T28 }[] }` #### Delete category — `DELETE /category/{id}` - Params: `id: int` - Returns: `204 void` @@ -233,7 +237,7 @@ _none_ - Returns: `200 { category: { id: int, name: str, slug: str, parentId: int, sort: int } }` #### Articles in category — `GET /category/{id}/articles` - Params: `id: int` -- Returns: `200 { articles: { id: int, sku: str, name: str, slug: str, net: num, taxRate: num, track_stock: bool, optionsCount: int, articleListCount: int, childCount: int, parentArticleId: int, parentSku: str, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, brand: T24 }[] }` +- Returns: `200 { articles: { id: int, sku: str, name: str, slug: str, net: num, taxRate: num, track_stock: bool, optionsCount: int, articleListCount: int, childCount: int, parentArticleId: int, parentSku: str, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, brand: T28 }[] }` #### List category attribute values — `GET /category/{id}/attributevalue` - Params: `id: int` - Returns: `200 { attributevalues: { id: int, categoryId: int, attributeId: int, attributeName: str, exclusive: bool, attributeValueId: int, value: str, sort: int }[] }` @@ -257,10 +261,10 @@ _none_ - Returns: `200` #### List companies — `GET /company` _none_ -- Returns: `200 { companies: T26[] }` +- Returns: `200 { companies: T30[] }` #### Create company — `POST /company` - Params: `body: { iso639: str, name: str, taxrate: num, reducedtaxrate: num }` -- Returns: `201 { company: T26, user: T30 }` +- Returns: `201 { company: T30, user: T34 }` #### Get company history — `GET /company/history` - Params: `query: limit?: int` - Returns: `200 { history: { id: int, companyuserId: int, date: str, text: str }[], truncated: bool }` @@ -281,13 +285,13 @@ _none_ - Returns: `204 void` #### Update company — `PUT /company/{id}` - Params: `id: int, body: { iso639: str, name: str, taxrate: num, reducedtaxrate: num }` -- Returns: `200 { company: T26 }` +- Returns: `200 { company: T30 }` #### List customer groups — `GET /customergroup` _none_ - Returns: `200 { customergroups: { id: int, name: str, sort: int, editable: bool }[] }` #### Create customer group — `POST /customergroup` - Params: `body: { name: str }` -- Returns: `201 { customergroup: T38 }` +- Returns: `201 { customergroup: T42 }` #### Reorder customer groups — `PUT /customergroup/order` - Params: `body: { customergroupIds: int[] }` - Returns: `200 { customergroupIds: int[] }` @@ -296,12 +300,12 @@ _none_ - Returns: `204 void` #### Update customer group — `PATCH /customergroup/{id}` - Params: `id: int, body: { name: str }` -- Returns: `200 { customergroup: T38 }` +- Returns: `200 { customergroup: T42 }` #### List deliveries — `GET /delivery` _none_ -- Returns: `200 { deliveries: { id: int, number: str, type: str, supplierId: int, externalNumber: str, date: str, createdAt: str, ledger: T34 }[] }` +- Returns: `200 { deliveries: { id: int, number: str, type: str, supplierId: int, externalNumber: str, date: str, createdAt: str, ledger: T38 }[] }` #### Create delivery — `POST /delivery` -- Params: `body: { externalNumber: str, date: str, lines: T22[], supplierId?: int, files?: { mimetype: str, name: str, content: str, sort?: int, size?: int, hash?: str, created?: str, modified?: str, meta?: { [k]: str } }[] }` +- Params: `body: { externalNumber: str, date: str, lines: T27[], supplierId?: int, files?: { mimetype: str, name: str, content: str, sort?: int, size?: int, hash?: str, created?: str, modified?: str, meta?: { [k]: str } }[] }` - Returns: `201 T3` #### Parse document (SSE) — `POST /delivery/parse` - Params: `form: { file: str }` @@ -313,53 +317,53 @@ _none_ - Params: `id: int` - Returns: `200 T3` #### Update delivery — `PATCH /delivery/{id}` -- Params: `id: int, body: { externalNumber?: str, date?: str, supplierId?: int, lines?: T22[], files?: { mimetype: str, name: str, content: str, sort?: int, size?: int, hash?: str, created?: str, modified?: str, meta?: { [k]: str } }[] }` +- Params: `id: int, body: { externalNumber?: str, date?: str, supplierId?: int, lines?: T27[], files?: { mimetype: str, name: str, content: str, sort?: int, size?: int, hash?: str, created?: str, modified?: str, meta?: { [k]: str } }[] }` - Returns: `200 T3` #### Get delivery attachment file content — `GET /delivery/{id}/file/{fileId}` - Params: `id: int, fileId: int, query: download?: bool` - Returns: `200 str` #### List entities — `GET /entity` - Params: `query: customergroupId?: int, role?: str` -- Returns: `200 { entities: T20[] }` +- Returns: `200 { entities: T25[] }` #### Create entity — `POST /entity` - Params: `body: { customergroupId: int, name: str, firstName?: str, number?: str }` -- Returns: `201 T14` +- Returns: `201 T20` #### Peek next customer number — `GET /entity/next-number` _none_ - Returns: `200 { number: str }` #### List entity addresses — `GET /entity/{entityId}/address` - Params: `entityId: int` -- Returns: `200 { addresses: T12[] }` +- Returns: `200 { addresses: T14[] }` #### Create entity address — `POST /entity/{entityId}/address` - Params: `entityId: int, body: { addressType: str, firstName?: str, name?: str, street?: str, streetNumber?: str, zip?: str, city?: str, county?: str }` -- Returns: `201 { address: T12 }` +- Returns: `201 { address: T14 }` #### Delete entity address — `DELETE /entity/{entityId}/address/{id}` - Params: `entityId: int, id: int` - Returns: `204 void` #### Update entity address — `PATCH /entity/{entityId}/address/{id}` - Params: `entityId: int, id: int, body: { addressType?: str, firstName?: str, name?: str, street?: str, streetNumber?: str, zip?: str, city?: str, county?: str }` -- Returns: `200 { address: T12 }` +- Returns: `200 { address: T14 }` #### List entity contacts — `GET /entity/{entityId}/contact` - Params: `entityId: int` -- Returns: `200 { contacts: T31[] }` +- Returns: `200 { contacts: T35[] }` #### Create entity contact — `POST /entity/{entityId}/contact` - Params: `entityId: int, body: { contactType: str, contact: str }` -- Returns: `201 { contact: T31 }` +- Returns: `201 { contact: T35 }` #### Delete entity contact — `DELETE /entity/{entityId}/contact/{id}` - Params: `entityId: int, id: int` - Returns: `204 void` #### Update entity contact — `PATCH /entity/{entityId}/contact/{id}` - Params: `entityId: int, id: int, body: { contactType?: str, contact?: str }` -- Returns: `200 { contact: T31 }` +- Returns: `200 { contact: T35 }` #### Delete entity — `DELETE /entity/{id}` - Params: `id: int` - Returns: `204 void` #### Get entity — `GET /entity/{id}` - Params: `id: int` -- Returns: `200 T14` +- Returns: `200 T20` #### Update entity — `PATCH /entity/{id}` - Params: `id: int, body: { name?: str, firstName?: str, number?: str }` -- Returns: `200 T14` +- Returns: `200 T20` #### Subscribe to update signals (SSE) — `GET /events` _none_ - Returns: `200 SSE` @@ -371,46 +375,46 @@ _none_ - Returns: `200 avif` #### List label templates — `GET /labeltemplate` _none_ -- Returns: `200 { labeltemplates: T23[] }` +- Returns: `200 { labeltemplates: { id: int, name: str, width: num, height: num, dpi: int, type: str, thumb: str }[] }` #### Create label template — `POST /labeltemplate` -- Params: `body: { name: str, width: num, height: num, dpi: int, type: str, content: {} }` -- Returns: `201 T16` +- Params: `body: { name: str, width: num, height: num, dpi: int, type: str, content: T15 }` +- Returns: `201 T5` #### Delete label template — `DELETE /labeltemplate/{id}` - Params: `id: int` - Returns: `204 void` #### Get label template by ID — `GET /labeltemplate/{id}` - Params: `id: int` -- Returns: `200 T16` +- Returns: `200 T5` #### Update label template (partial) — `PATCH /labeltemplate/{id}` -- Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: {} }` -- Returns: `200 T16` +- Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: T15 }` +- Returns: `200 T5` #### Update label template — `PUT /labeltemplate/{id}` -- Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: {} }` -- Returns: `200 T16` +- Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: T15 }` +- Returns: `200 T5` #### Query ledger by manifest article ID or SKU — `GET /ledger` - Params: `query: manifestarticle_id?: int, sku?: str, transaction_type?: str` -- Returns: `200 T10` +- Returns: `200 T12` #### Add ledger entry — `POST /ledger` - Params: `body: { manifestarticle_id: int, transaction_type: str, amount: num, transaction_text: str }` -- Returns: `201 { ledger: T11 }` +- Returns: `201 { ledger: T13 }` #### Query ledger by manifest article ID — `GET /ledger/manifestarticle/{manifestarticleId}` - Params: `manifestarticleId: int, query: transaction_type?: str` -- Returns: `200 T10` +- Returns: `200 T12` #### Query ledger by article SKU — `GET /ledger/sku/{sku}` - Params: `sku: str, query: transaction_type?: str` -- Returns: `200 T10` +- Returns: `200 T12` #### List conversations — `GET /modelconversation` _none_ -- Returns: `200 { conversations: T19[] }` +- Returns: `200 { conversations: T24[] }` #### Create conversation — `POST /modelconversation` - Params: `body: { provider: str, model: str }` -- Returns: `201 { conversation: T19 }` +- Returns: `201 { conversation: T24 }` #### Delete conversation — `DELETE /modelconversation/{id}` - Params: `id: int` - Returns: `204 void` #### Get conversation — `GET /modelconversation/{id}` - Params: `id: int` -- Returns: `200 { conversation: T19 }` +- Returns: `200 { conversation: T24 }` #### List conversation messages — `GET /modelconversation/{id}/message` - Params: `id: int` - Returns: `200 { messages: { id: int, conversation_id: int, created_at: str, role: str, message: str }[] }` @@ -430,17 +434,17 @@ _none_ _none_ - Returns: `200 { orders: { id: int, number: str, type: str, entityId: int, date: str, createdAt: str }[] }` #### Create order — `POST /order` -- Params: `body: { number: str, date: str, lines: T22[], entityId?: int }` -- Returns: `201 T5` +- Params: `body: { number: str, date: str, lines: T27[], entityId?: int }` +- Returns: `201 T7` #### Delete order — `DELETE /order/{id}` - Params: `id: int` - Returns: `204 void` #### Get order — `GET /order/{id}` - Params: `id: int` -- Returns: `200 T5` +- Returns: `200 T7` #### Update order — `PATCH /order/{id}` -- Params: `id: int, body: { number?: str, date?: str, entityId?: int, lines?: T22[] }` -- Returns: `200 T5` +- Params: `id: int, body: { number?: str, date?: str, entityId?: int, lines?: T27[] }` +- Returns: `200 T7` #### List POS terminals — `GET /posterminal` _none_ - Returns: `200 { posterminals: { id: int, name: str, pairingpin: str, categoryIds: int[] }[] }` @@ -452,22 +456,22 @@ _none_ - Returns: `204 void` #### Disable all categories on terminal — `DELETE /posterminal/{id}/all` - Params: `id: int` -- Returns: `200 T39` +- Returns: `200 T43` #### Enable all categories on terminal — `PUT /posterminal/{id}/all` - Params: `id: int` -- Returns: `200 T39` +- Returns: `200 T43` #### Disable category on terminal — `DELETE /posterminal/{id}/category/{categoryId}` - Params: `id: int, categoryId: int` -- Returns: `200 T39` +- Returns: `200 T43` #### Enable category on terminal — `PUT /posterminal/{id}/category/{categoryId}` - Params: `id: int, categoryId: int` -- Returns: `200 T39` +- Returns: `200 T43` #### List printers — `GET /printer` _none_ -- Returns: `200 { printers: T21[] }` +- Returns: `200 { printers: T26[] }` #### Create printer — `POST /printer` - Params: `body: { address: str, type: str, model?: str, serial?: str, sort?: int, desc?: str }` -- Returns: `201 T15` +- Returns: `201 T21` #### Reorder printers — `PUT /printer/order` - Params: `body: { printerIds: int[] }` - Returns: `200 { printerIds: int[] }` @@ -476,19 +480,19 @@ _none_ - Returns: `204 void` #### Get printer by ID — `GET /printer/{id}` - Params: `id: int` -- Returns: `200 T15` +- Returns: `200 T21` #### Update printer (partial) — `PATCH /printer/{id}` - Params: `id: int, body: { address?: str, type?: str, model?: str, serial?: str, sort?: int, desc?: str }` -- Returns: `200 T15` +- Returns: `200 T21` #### Update printer — `PUT /printer/{id}` - Params: `id: int, body: { address?: str, type?: str, model?: str, serial?: str, sort?: int, desc?: str }` -- Returns: `200 T15` +- Returns: `200 T21` #### List property names — `GET /propertyname` _none_ -- Returns: `200 { propertynames: T35[] }` +- Returns: `200 { propertynames: T39[] }` #### Create property name — `POST /propertyname` - Params: `body: { name: str, sort?: int, exclusive?: bool }` -- Returns: `201 { propertyname: T35 }` +- Returns: `201 { propertyname: T39 }` #### Reorder property names — `PUT /propertyname/order` - Params: `body: { propertynameIds: int[] }` - Returns: `200` @@ -497,7 +501,7 @@ _none_ - Returns: `200` #### Update property name — `PATCH /propertyname/{id}` - Params: `id: int, body: { name?: str, sort?: int, exclusive?: bool }` -- Returns: `200 { propertyname: T35 }` +- Returns: `200 { propertyname: T39 }` #### List public articles — `GET /public/{companyId}/articles` - Params: `companyId: int, query: categoryId?: int, search?: str, limit?: int, offset?: int` - Returns: `200 { articles: { id: int, sku: str, name: str, slug: str, net: num, taxRate: num, gross: num, trackStock: bool, brand: { id: int, name: str }, fullHash: str, thumbW: int, thumbH: int, thumbHash: str }[] }` @@ -511,17 +515,17 @@ _none_ _none_ - Returns: `200 { quotes: { id: int, number: str, type: str, entityId: int, date: str, createdAt: str }[] }` #### Create quote — `POST /quote` -- Params: `body: { number: str, date: str, lines: T22[], entityId?: int }` -- Returns: `201 T6` +- Params: `body: { number: str, date: str, lines: T27[], entityId?: int }` +- Returns: `201 T8` #### Delete quote — `DELETE /quote/{id}` - Params: `id: int` - Returns: `204 void` #### Get quote — `GET /quote/{id}` - Params: `id: int` -- Returns: `200 T6` +- Returns: `200 T8` #### Update quote — `PATCH /quote/{id}` -- Params: `id: int, body: { number?: str, date?: str, entityId?: int, lines?: T22[] }` -- Returns: `200 T6` +- Params: `id: int, body: { number?: str, date?: str, entityId?: int, lines?: T27[] }` +- Returns: `200 T8` #### Crawl image from URL, crop white/transparency borders, and return AVIF — `POST /serper/image` - Params: `body: { url: str }` - Returns: `200 avif` @@ -530,25 +534,25 @@ _none_ - Returns: `200 SSE` #### Adjust stock manually — `POST /stock/adjust` - Params: `body: { sku?: str, warehouseId?: int, amount?: num, text?: str, lines?: { sku: str, amount: num, warehouseId?: int, text?: str }[] }` -- Returns: `201 { manifest: { id: int, number: str, type: str, date: str, createdAt: str }, lines: { manifestarticle_id: int, sku: str, name: str, warehouse_id: int, amount: num, text: str }[], ledger: T11[] }` +- Returns: `201 { manifest: { id: int, number: str, type: str, date: str, createdAt: str }, lines: { manifestarticle_id: int, sku: str, name: str, warehouse_id: int, amount: num, text: str }[], ledger: T13[] }` #### List suppliers — `GET /supplier` _none_ -- Returns: `200 { suppliers: T33[] }` +- Returns: `200 { suppliers: T37[] }` #### Create supplier — `POST /supplier` - Params: `body: { name: str }` -- Returns: `201 { supplier: T33 }` +- Returns: `201 { supplier: T37 }` #### Delete supplier — `DELETE /supplier/{id}` - Params: `id: int` - Returns: `204 void` #### Update supplier — `PATCH /supplier/{id}` - Params: `id: int, body: { name: str }` -- Returns: `200 { supplier: T33 }` +- Returns: `200 { supplier: T37 }` #### List supplier articles by SKUs — `GET /supplier/{id}/articles` - Params: `id: int, query: skus?: string` -- Returns: `200 { articles: { id: int, articleId: int, entityId: int, supplierName: str, sku: str, pu: num, stock: num, sort: int, priceId: int, price: T37, article: { id: int, sku: str, name: str, slug: str, photos: { sort: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str }[], eans: str[] } }[] }` +- Returns: `200 { articles: { id: int, articleId: int, entityId: int, supplierName: str, sku: str, pu: num, stock: num, sort: int, priceId: int, price: T41, article: { id: int, sku: str, name: str, slug: str, photos: { sort: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str }[], eans: str[] } }[] }` #### Query supplier articles by SKUs (bulk) — `POST /supplier/{id}/articles` - Params: `id: int, body?: { skus?: str[] }` -- Returns: `200 { articles: { id: int, articleId: int, entityId: int, supplierName: str, sku: str, pu: num, stock: num, sort: int, priceId: int, price: T37, article: { id: int, sku: str, name: str, slug: str, photos: { sort: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str }[], eans: str[] } }[] }` +- Returns: `200 { articles: { id: int, articleId: int, entityId: int, supplierName: str, sku: str, pu: num, stock: num, sort: int, priceId: int, price: T41, article: { id: int, sku: str, name: str, slug: str, photos: { sort: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str }[], eans: str[] } }[] }` #### Thumb image by hash — `GET /thumb/{fullHash}` - Params: `fullHash: str` - Returns: `200 avif` @@ -557,10 +561,10 @@ _none_ - Returns: `204 void` #### List units — `GET /unit` _none_ -- Returns: `200 { units: T28[] }` +- Returns: `200 { units: T32[] }` #### Upsert unit — `PUT /unit` - Params: `body: { si: str, basesi: str, basesifactor: num, symbol: str, name: str }` -- Returns: `200 { unit: T28 }` +- Returns: `200 { unit: T32 }` #### JTL-POS category synchronization — `GET /v1/category` - Params: `query: lastChangedCategory?: str, limit?: int` - Returns: `200 {}[]` @@ -599,10 +603,10 @@ _none_ - Returns: `200 { success: bool, file: { name: str, size: int, mime: str, updated_at: str } }` #### List warehouses — `GET /warehouse` _none_ -- Returns: `200 { warehouses: T38[] }` +- Returns: `200 { warehouses: T42[] }` #### Create warehouse — `POST /warehouse` - Params: `body: { name: str, sort?: int }` -- Returns: `201 T36` +- Returns: `201 T40` #### Reorder warehouses — `PUT /warehouse/order` - Params: `body: { warehouseIds: int[] }` - Returns: `200 { warehouseIds: int[] }` @@ -611,10 +615,10 @@ _none_ - Returns: `204 void` #### Get warehouse by ID — `GET /warehouse/{id}` - Params: `id: int` -- Returns: `200 T36` +- Returns: `200 T40` #### Update warehouse (partial) — `PATCH /warehouse/{id}` - Params: `id: int, body: { name?: str, sort?: int }` -- Returns: `200 T36` +- Returns: `200 T40` #### Update warehouse — `PUT /warehouse/{id}` - Params: `id: int, body: { name?: str, sort?: int }` -- Returns: `200 T36` +- Returns: `200 T40` diff --git a/docs/api/routes.md b/docs/api/routes.md index 9b1419e..833faf0 100644 --- a/docs/api/routes.md +++ b/docs/api/routes.md @@ -4,52 +4,56 @@ Overview of all 145 API endpoints across all modules. ### Notation -Types: `str` string, `int` integer, `num` number, `bool` boolean, `{}` object; `T[]` array; `?` optional. +Types: `str` string, `int` integer, `num` number, `bool` boolean; `T[]` array; `?` optional. Params: path values first, then `query:` and `body:` (`body?` = optional body). Responses: status code + JSON shape; `Tn` refers to a reusable type below. ### Reusable types - `T1` = `{ article: T2 }` -- `T2` = `{ id: int, sku: str, name: str, slug: str, track_stock: bool, unitamount: num, weight: num, unit: T26, brand: T23, categoryIds: int[], photos: T17[], eans: str[], prices: T27[], suppliers: T9[] }` +- `T2` = `{ id: int, sku: str, name: str, slug: str, track_stock: bool, unitamount: num, weight: num, unit: T30, brand: T27, categoryIds: int[], photos: T22[], eans: str[], prices: T31[], suppliers: T11[] }` - `T3` = `{ delivery: T4 }` -- `T4` = `{ id: int, number: str, type: str, supplierId: int, externalNumber: str, date: str, createdAt: str, ledger: T31, lines: T18[], files: T8[] }` -- `T5` = `{ order: T7 }` -- `T6` = `{ quote: T7 }` -- `T7` = `{ id: int, number: str, type: str, entityId: int, date: str, createdAt: str, lines: T18[] }` -- `T8` = `{ id: int, manifestId: int, fileId: int, sort: int, hash: str, mimetype: str, name: str, size: int, created: str, modified: str, thumbavif: str, thumbx: int, thumby: int, meta: { [k]: str } }` -- `T9` = `{ id: int, articleId: int, entityId: int, supplierName: str, sku: str, pu: num, stock: num, sort: int, priceId: int, price: T34 }` -- `T10` = `{ ledger: T11[] }` -- `T11` = `{ id: int, manifestarticle_id: int, transaction_type: str, amount: num, transaction_text: str, hash_version: int, prev_hash: str, sku: str, created_at: str }` -- `T12` = `{ id: int, entityId: int, firstName: str, name: str, street: str, streetNumber: str, zip: str, city: str, county: str, addressType: str }` -- `T13` = `{ id: int, name: str, sort: int, exclusive: bool, values: T29[] }` -- `T14` = `{ entity: T19 }` -- `T15` = `{ printer: T20 }` -- `T16` = `{ labeltemplate: T22 }` -- `T17` = `{ sort: int, fullHash: str, fullW: int, fullH: int, fullSize: int, thumbW: int, thumbH: int, thumbHash: str }` -- `T18` = `{ id: int, sku: str, name: str, pu: num, amount: num, net: num, rebate: num, taxrate: num, comment: str }` -- `T19` = `{ id: int, customergroupId: int, firstName: str, name: str, number: str, createdAt: str, updatedAt: str }` -- `T20` = `{ id: int, company_id: int, address: str, type: str, model: str, serial: str, sort: int, desc: str }` -- `T21` = `{ amount: num, net: num, taxrate: num, sku?: str, name?: str, pu?: num, rebate?: num, comment?: str }` -- `T22` = `{ id: int, name: str, width: num, height: num, dpi: int, type: str, content: {}, thumb: str }` -- `T23` = `{ id: int, name: str, fullHash: str, thumbW: int, thumbH: int, thumbHash: str }` -- `T24` = `{ article: T25 }` -- `T25` = `{ id: int, categoryId: int, name: str, sku: str, track_stock: bool }` -- `T26` = `{ si: str, basesi: str, basesifactor: num, symbol: str, name: str }` -- `T27` = `{ minmultiplier: num, net: num, taxRate: num, customergroupId: int }` -- `T28` = `{ id: int, entityId: int, contactType: str, contact: str }` -- `T29` = `{ id: int, attributeId: int, value: str, sort: int }` -- `T30` = `{ id: int, name: str, createdAt: str, updatedAt: str }` -- `T31` = `{ totalPositions: int, completelyOnLedgerPositions: int }` -- `T32` = `{ id: int, name: str, sort: int, exclusive: bool }` -- `T33` = `{ warehouse: T35 }` -- `T34` = `{ net: num, taxId: int, taxRate: num }` -- `T35` = `{ id: int, name: str, sort: int }` +- `T4` = `{ id: int, number: str, type: str, supplierId: int, externalNumber: str, date: str, createdAt: str, ledger: T35, lines: T23[], files: T10[] }` +- `T5` = `{ labeltemplate: T6 }` +- `T6` = `{ id: int, name: str, width: num, height: num, dpi: int, type: str, content: T16, thumb: str }` +- `T7` = `{ order: T9 }` +- `T8` = `{ quote: T9 }` +- `T9` = `{ id: int, number: str, type: str, entityId: int, date: str, createdAt: str, lines: T23[] }` +- `T10` = `{ id: int, manifestId: int, fileId: int, sort: int, hash: str, mimetype: str, name: str, size: int, created: str, modified: str, thumbavif: str, thumbx: int, thumby: int, meta: { [k]: str } }` +- `T11` = `{ id: int, articleId: int, entityId: int, supplierName: str, sku: str, pu: num, stock: num, sort: int, priceId: int, price: T38 }` +- `T12` = `{ ledger: T13[] }` +- `T13` = `{ id: int, manifestarticle_id: int, transaction_type: str, amount: num, transaction_text: str, hash_version: int, prev_hash: str, sku: str, created_at: str }` +- `T14` = `{ id: int, entityId: int, firstName: str, name: str, street: str, streetNumber: str, zip: str, city: str, county: str, addressType: str }` +- `T15` = `{ objects: T17[] }` +- `T16` = `{ objects: T19[] }` +- `T17` = `{ id: str, type: str, x: num, y: num, w?: num, h?: num, text?: str, font?: str, fontSize?: num, barcodeFormat?: str }` +- `T18` = `{ id: int, name: str, sort: int, exclusive: bool, values: T33[] }` +- `T19` = `{ id: str, type: str, x: num, y: num, w: num, h: num, text: str, font: str, fontSize: num, barcodeFormat: str }` +- `T20` = `{ entity: T24 }` +- `T21` = `{ printer: T25 }` +- `T22` = `{ sort: int, fullHash: str, fullW: int, fullH: int, fullSize: int, thumbW: int, thumbH: int, thumbHash: str }` +- `T23` = `{ id: int, sku: str, name: str, pu: num, amount: num, net: num, rebate: num, taxrate: num, comment: str }` +- `T24` = `{ id: int, customergroupId: int, firstName: str, name: str, number: str, createdAt: str, updatedAt: str }` +- `T25` = `{ id: int, company_id: int, address: str, type: str, model: str, serial: str, sort: int, desc: str }` +- `T26` = `{ amount: num, net: num, taxrate: num, sku?: str, name?: str, pu?: num, rebate?: num, comment?: str }` +- `T27` = `{ id: int, name: str, fullHash: str, thumbW: int, thumbH: int, thumbHash: str }` +- `T28` = `{ article: T29 }` +- `T29` = `{ id: int, categoryId: int, name: str, sku: str, track_stock: bool }` +- `T30` = `{ si: str, basesi: str, basesifactor: num, symbol: str, name: str }` +- `T31` = `{ minmultiplier: num, net: num, taxRate: num, customergroupId: int }` +- `T32` = `{ id: int, entityId: int, contactType: str, contact: str }` +- `T33` = `{ id: int, attributeId: int, value: str, sort: int }` +- `T34` = `{ id: int, name: str, createdAt: str, updatedAt: str }` +- `T35` = `{ totalPositions: int, completelyOnLedgerPositions: int }` +- `T36` = `{ id: int, name: str, sort: int, exclusive: bool }` +- `T37` = `{ warehouse: T39 }` +- `T38` = `{ net: num, taxId: int, taxRate: num }` +- `T39` = `{ id: int, name: str, sort: int }` ### Routes #### Create article in category — `POST /article` - Params: `body: { categoryId: int, name: str, track_stock?: bool }` -- Returns: `201 T24` +- Returns: `201 T28` #### Delete article by SKU — `DELETE /article/{sku}` - Params: `sku: str, query: cascade?: bool` - Returns: `204 void` @@ -82,10 +86,10 @@ Params: path values first, then `query:` and `body:` (`body?` = optional body). - Returns: `200 { children: { id: int, sku: str, name: str, parentsort: int, attributeValueId: int, attributeValue: str }[] }` #### Create and attach a new child article to a parent article — `POST /article/{sku}/children` - Params: `sku: str, body: { attributeValueId?: int, value?: str, name?: str }` -- Returns: `201 T24` +- Returns: `201 T28` #### Attach an existing article as a child to a parent article — `PUT /article/{sku}/children` - Params: `sku: str, body: { sku: str, attributeValueId?: int, value?: str, reparent?: bool }` -- Returns: `200 { article: T25, children: { id: int, sku: str, name: str, parentsort: int, attributeValueId: int, attributeValue: str }[] }` +- Returns: `200 { article: T29, children: { id: int, sku: str, name: str, parentsort: int, attributeValueId: int, attributeValue: str }[] }` #### Remove a child article from a parent article — `DELETE /article/{sku}/children/{childSku}` - Params: `sku: str, childSku: str, query: deleteArticle?: bool` - Returns: `200 { success: bool, deleted: bool }` @@ -109,7 +113,7 @@ Params: path values first, then `query:` and `body:` (`body?` = optional body). - Returns: `200 { options: { id: int, articleId: int, sku: str, name: str, count: int, sort: int, mandated: bool }[] }` #### Toggle parent mode for an article — `POST /article/{sku}/parent` - Params: `sku: str, body: { isParent: bool, attributeNameId?: int }` -- Returns: `200 T24` +- Returns: `200 T28` #### Replace POS prices by SKU — `PUT /article/{sku}/prices` - Params: `sku: str, body: { prices: { net?: num, gross?: num, price?: num, taxRate?: num, tax?: num, minmultiplier?: num }[] }` - Returns: `200 T1` @@ -127,10 +131,10 @@ Params: path values first, then `query:` and `body:` (`body?` = optional body). - Returns: `200` #### List article suppliers — `GET /article/{sku}/supplier` - Params: `sku: str` -- Returns: `200 { suppliers: T9[] }` +- Returns: `200 { suppliers: T11[] }` #### Assign supplier to article — `POST /article/{sku}/supplier` - Params: `sku: str, body: { entityId: int, sku?: str, pu?: num, stock?: num, sort?: int, netPrice?: num, taxId?: int, taxRate?: num }` -- Returns: `201 { supplier: T9 }` +- Returns: `201 { supplier: T11 }` #### Reorder article suppliers — `PUT /article/{sku}/supplier/order` - Params: `sku: str, body: { ids: int[] }` - Returns: `200 { ids: int[] }` @@ -139,7 +143,7 @@ Params: path values first, then `query:` and `body:` (`body?` = optional body). - Returns: `204 void` #### Update article supplier assignment — `PATCH /article/{sku}/supplier/{id}` - Params: `sku: str, id: int, body: { sku?: str, pu?: num, stock?: num, sort?: int, netPrice?: num, taxId?: int, taxRate?: num }` -- Returns: `200 { supplier: T9 }` +- Returns: `200 { supplier: T11 }` #### Set article track_stock flag by SKU — `PUT /article/{sku}/track_stock` - Params: `sku: str, body: { track_stock: bool }` - Returns: `200 T1` @@ -148,19 +152,19 @@ Params: path values first, then `query:` and `body:` (`body?` = optional body). - Returns: `200 T1` #### List attribute names — `GET /attributename` _none_ -- Returns: `200 { attributenames: T13[] }` +- Returns: `200 { attributenames: T18[] }` #### Create attribute name — `POST /attributename` - Params: `body: { name: str, sort?: int, exclusive?: bool }` -- Returns: `201 { attributename: T13 }` +- Returns: `201 { attributename: T18 }` #### Reorder attribute names — `PUT /attributename/order` - Params: `body: { attributenameIds: int[] }` - Returns: `200` #### List values for an attribute — `GET /attributename/{attributeId}/value` - Params: `attributeId: int` -- Returns: `200 { values: T29[] }` +- Returns: `200 { values: T33[] }` #### Create value for an attribute — `POST /attributename/{attributeId}/value` - Params: `attributeId: int, body: { value: str, sort?: int }` -- Returns: `201 { attributevalue: T29 }` +- Returns: `201 { attributevalue: T33 }` #### Reorder values of an attribute — `PUT /attributename/{attributeId}/value/order` - Params: `attributeId: int, body: { attributevalueIds: int[] }` - Returns: `200` @@ -169,13 +173,13 @@ _none_ - Returns: `200` #### Update attribute name — `PATCH /attributename/{id}` - Params: `id: int, body: { name?: str, sort?: int, exclusive?: bool }` -- Returns: `200 { attributename: T13 }` +- Returns: `200 { attributename: T18 }` #### Delete attribute value — `DELETE /attributevalue/{id}` - Params: `id: int` - Returns: `200` #### Update attribute value — `PATCH /attributevalue/{id}` - Params: `id: int, body: { value?: str, sort?: int }` -- Returns: `200 { attributevalue: T29 }` +- Returns: `200 { attributevalue: T33 }` #### Login with Google ID token — `POST /auth/login` - Params: `body: { idToken: str }` - Returns: `200 { message: str, user: { id: int, email: str, selectedCompanyId: int, picture: str } }` @@ -205,7 +209,7 @@ _none_ - Returns: `200 { categoryIds: int[] }` #### Category tree — `GET /category/tree` _none_ -- Returns: `200 { languageId: int, tree: { id: int, parentId: int, sort: int, name: str, slug: str, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, posterminalIds: int[] }[], articles: { id: int, sku: str, name: str, slug: str, net: num, taxRate: num, track_stock: bool, optionsCount: int, articleListCount: int, childCount: int, parentArticleId: int, parentSku: str, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, brand: T23 }[] }` +- Returns: `200 { languageId: int, tree: { id: int, parentId: int, sort: int, name: str, slug: str, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, posterminalIds: int[] }[], articles: { id: int, sku: str, name: str, slug: str, net: num, taxRate: num, track_stock: bool, optionsCount: int, articleListCount: int, childCount: int, parentArticleId: int, parentSku: str, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, brand: T27 }[] }` #### Delete category — `DELETE /category/{id}` - Params: `id: int` - Returns: `204 void` @@ -214,7 +218,7 @@ _none_ - Returns: `200 { category: { id: int, name: str, slug: str, parentId: int, sort: int } }` #### Articles in category — `GET /category/{id}/articles` - Params: `id: int` -- Returns: `200 { articles: { id: int, sku: str, name: str, slug: str, net: num, taxRate: num, track_stock: bool, optionsCount: int, articleListCount: int, childCount: int, parentArticleId: int, parentSku: str, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, brand: T23 }[] }` +- Returns: `200 { articles: { id: int, sku: str, name: str, slug: str, net: num, taxRate: num, track_stock: bool, optionsCount: int, articleListCount: int, childCount: int, parentArticleId: int, parentSku: str, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, brand: T27 }[] }` #### List category attribute values — `GET /category/{id}/attributevalue` - Params: `id: int` - Returns: `200 { attributevalues: { id: int, categoryId: int, attributeId: int, attributeName: str, exclusive: bool, attributeValueId: int, value: str, sort: int }[] }` @@ -259,7 +263,7 @@ _none_ - Returns: `200 { customergroups: { id: int, name: str, sort: int, editable: bool }[] }` #### Create customer group — `POST /customergroup` - Params: `body: { name: str }` -- Returns: `201 { customergroup: T35 }` +- Returns: `201 { customergroup: T39 }` #### Reorder customer groups — `PUT /customergroup/order` - Params: `body: { customergroupIds: int[] }` - Returns: `200 { customergroupIds: int[] }` @@ -268,12 +272,12 @@ _none_ - Returns: `204 void` #### Update customer group — `PATCH /customergroup/{id}` - Params: `id: int, body: { name: str }` -- Returns: `200 { customergroup: T35 }` +- Returns: `200 { customergroup: T39 }` #### List deliveries — `GET /delivery` _none_ -- Returns: `200 { deliveries: { id: int, number: str, type: str, supplierId: int, externalNumber: str, date: str, createdAt: str, ledger: T31 }[] }` +- Returns: `200 { deliveries: { id: int, number: str, type: str, supplierId: int, externalNumber: str, date: str, createdAt: str, ledger: T35 }[] }` #### Create delivery — `POST /delivery` -- Params: `body: { externalNumber: str, date: str, lines: T21[], supplierId?: int, files?: { mimetype: str, name: str, content: str, sort?: int, size?: int, hash?: str, created?: str, modified?: str, meta?: { [k]: str } }[] }` +- Params: `body: { externalNumber: str, date: str, lines: T26[], supplierId?: int, files?: { mimetype: str, name: str, content: str, sort?: int, size?: int, hash?: str, created?: str, modified?: str, meta?: { [k]: str } }[] }` - Returns: `201 T3` #### Delete delivery — `DELETE /delivery/{id}` - Params: `id: int` @@ -282,83 +286,83 @@ _none_ - Params: `id: int` - Returns: `200 T3` #### Update delivery — `PATCH /delivery/{id}` -- Params: `id: int, body: { externalNumber?: str, date?: str, supplierId?: int, lines?: T21[], files?: { mimetype: str, name: str, content: str, sort?: int, size?: int, hash?: str, created?: str, modified?: str, meta?: { [k]: str } }[] }` +- Params: `id: int, body: { externalNumber?: str, date?: str, supplierId?: int, lines?: T26[], files?: { mimetype: str, name: str, content: str, sort?: int, size?: int, hash?: str, created?: str, modified?: str, meta?: { [k]: str } }[] }` - Returns: `200 T3` #### Get delivery attachment file content — `GET /delivery/{id}/file/{fileId}` - Params: `id: int, fileId: int, query: download?: bool` - Returns: `200 str` #### List entities — `GET /entity` - Params: `query: customergroupId?: int, role?: str` -- Returns: `200 { entities: T19[] }` +- Returns: `200 { entities: T24[] }` #### Create entity — `POST /entity` - Params: `body: { customergroupId: int, name: str, firstName?: str, number?: str }` -- Returns: `201 T14` +- Returns: `201 T20` #### Peek next customer number — `GET /entity/next-number` _none_ - Returns: `200 { number: str }` #### List entity addresses — `GET /entity/{entityId}/address` - Params: `entityId: int` -- Returns: `200 { addresses: T12[] }` +- Returns: `200 { addresses: T14[] }` #### Create entity address — `POST /entity/{entityId}/address` - Params: `entityId: int, body: { addressType: str, firstName?: str, name?: str, street?: str, streetNumber?: str, zip?: str, city?: str, county?: str }` -- Returns: `201 { address: T12 }` +- Returns: `201 { address: T14 }` #### Delete entity address — `DELETE /entity/{entityId}/address/{id}` - Params: `entityId: int, id: int` - Returns: `204 void` #### Update entity address — `PATCH /entity/{entityId}/address/{id}` - Params: `entityId: int, id: int, body: { addressType?: str, firstName?: str, name?: str, street?: str, streetNumber?: str, zip?: str, city?: str, county?: str }` -- Returns: `200 { address: T12 }` +- Returns: `200 { address: T14 }` #### List entity contacts — `GET /entity/{entityId}/contact` - Params: `entityId: int` -- Returns: `200 { contacts: T28[] }` +- Returns: `200 { contacts: T32[] }` #### Create entity contact — `POST /entity/{entityId}/contact` - Params: `entityId: int, body: { contactType: str, contact: str }` -- Returns: `201 { contact: T28 }` +- Returns: `201 { contact: T32 }` #### Delete entity contact — `DELETE /entity/{entityId}/contact/{id}` - Params: `entityId: int, id: int` - Returns: `204 void` #### Update entity contact — `PATCH /entity/{entityId}/contact/{id}` - Params: `entityId: int, id: int, body: { contactType?: str, contact?: str }` -- Returns: `200 { contact: T28 }` +- Returns: `200 { contact: T32 }` #### Delete entity — `DELETE /entity/{id}` - Params: `id: int` - Returns: `204 void` #### Get entity — `GET /entity/{id}` - Params: `id: int` -- Returns: `200 T14` +- Returns: `200 T20` #### Update entity — `PATCH /entity/{id}` - Params: `id: int, body: { name?: str, firstName?: str, number?: str }` -- Returns: `200 T14` +- Returns: `200 T20` #### List label templates — `GET /labeltemplate` _none_ -- Returns: `200 { labeltemplates: T22[] }` +- Returns: `200 { labeltemplates: { id: int, name: str, width: num, height: num, dpi: int, type: str, thumb: str }[] }` #### Create label template — `POST /labeltemplate` -- Params: `body: { name: str, width: num, height: num, dpi: int, type: str, content: {} }` -- Returns: `201 T16` +- Params: `body: { name: str, width: num, height: num, dpi: int, type: str, content: T15 }` +- Returns: `201 T5` #### Delete label template — `DELETE /labeltemplate/{id}` - Params: `id: int` - Returns: `204 void` #### Get label template by ID — `GET /labeltemplate/{id}` - Params: `id: int` -- Returns: `200 T16` +- Returns: `200 T5` #### Update label template (partial) — `PATCH /labeltemplate/{id}` -- Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: {} }` -- Returns: `200 T16` +- Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: T15 }` +- Returns: `200 T5` #### Update label template — `PUT /labeltemplate/{id}` -- Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: {} }` -- Returns: `200 T16` +- Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: T15 }` +- Returns: `200 T5` #### Query ledger by manifest article ID or SKU — `GET /ledger` - Params: `query: manifestarticle_id?: int, sku?: str, transaction_type?: str` -- Returns: `200 T10` +- Returns: `200 T12` #### Add ledger entry — `POST /ledger` - Params: `body: { manifestarticle_id: int, transaction_type: str, amount: num, transaction_text: str }` -- Returns: `201 { ledger: T11 }` +- Returns: `201 { ledger: T13 }` #### Query ledger by manifest article ID — `GET /ledger/manifestarticle/{manifestarticleId}` - Params: `manifestarticleId: int, query: transaction_type?: str` -- Returns: `200 T10` +- Returns: `200 T12` #### Query ledger by article SKU — `GET /ledger/sku/{sku}` - Params: `sku: str, query: transaction_type?: str` -- Returns: `200 T10` +- Returns: `200 T12` #### List number sequences — `GET /number` _none_ - Returns: `200 { numbers: { id: int, type: str, prefix: str, padding: int, next: int }[] }` @@ -369,23 +373,23 @@ _none_ _none_ - Returns: `200 { orders: { id: int, number: str, type: str, entityId: int, date: str, createdAt: str }[] }` #### Create order — `POST /order` -- Params: `body: { number: str, date: str, lines: T21[], entityId?: int }` -- Returns: `201 T5` +- Params: `body: { number: str, date: str, lines: T26[], entityId?: int }` +- Returns: `201 T7` #### Delete order — `DELETE /order/{id}` - Params: `id: int` - Returns: `204 void` #### Get order — `GET /order/{id}` - Params: `id: int` -- Returns: `200 T5` +- Returns: `200 T7` #### Update order — `PATCH /order/{id}` -- Params: `id: int, body: { number?: str, date?: str, entityId?: int, lines?: T21[] }` -- Returns: `200 T5` +- Params: `id: int, body: { number?: str, date?: str, entityId?: int, lines?: T26[] }` +- Returns: `200 T7` #### List printers — `GET /printer` _none_ -- Returns: `200 { printers: T20[] }` +- Returns: `200 { printers: T25[] }` #### Create printer — `POST /printer` - Params: `body: { address: str, type: str, model?: str, serial?: str, sort?: int, desc?: str }` -- Returns: `201 T15` +- Returns: `201 T21` #### Reorder printers — `PUT /printer/order` - Params: `body: { printerIds: int[] }` - Returns: `200 { printerIds: int[] }` @@ -394,19 +398,19 @@ _none_ - Returns: `204 void` #### Get printer by ID — `GET /printer/{id}` - Params: `id: int` -- Returns: `200 T15` +- Returns: `200 T21` #### Update printer (partial) — `PATCH /printer/{id}` - Params: `id: int, body: { address?: str, type?: str, model?: str, serial?: str, sort?: int, desc?: str }` -- Returns: `200 T15` +- Returns: `200 T21` #### Update printer — `PUT /printer/{id}` - Params: `id: int, body: { address?: str, type?: str, model?: str, serial?: str, sort?: int, desc?: str }` -- Returns: `200 T15` +- Returns: `200 T21` #### List property names — `GET /propertyname` _none_ -- Returns: `200 { propertynames: T32[] }` +- Returns: `200 { propertynames: T36[] }` #### Create property name — `POST /propertyname` - Params: `body: { name: str, sort?: int, exclusive?: bool }` -- Returns: `201 { propertyname: T32 }` +- Returns: `201 { propertyname: T36 }` #### Reorder property names — `PUT /propertyname/order` - Params: `body: { propertynameIds: int[] }` - Returns: `200` @@ -415,58 +419,58 @@ _none_ - Returns: `200` #### Update property name — `PATCH /propertyname/{id}` - Params: `id: int, body: { name?: str, sort?: int, exclusive?: bool }` -- Returns: `200 { propertyname: T32 }` +- Returns: `200 { propertyname: T36 }` #### List quotes — `GET /quote` _none_ - Returns: `200 { quotes: { id: int, number: str, type: str, entityId: int, date: str, createdAt: str }[] }` #### Create quote — `POST /quote` -- Params: `body: { number: str, date: str, lines: T21[], entityId?: int }` -- Returns: `201 T6` +- Params: `body: { number: str, date: str, lines: T26[], entityId?: int }` +- Returns: `201 T8` #### Delete quote — `DELETE /quote/{id}` - Params: `id: int` - Returns: `204 void` #### Get quote — `GET /quote/{id}` - Params: `id: int` -- Returns: `200 T6` +- Returns: `200 T8` #### Update quote — `PATCH /quote/{id}` -- Params: `id: int, body: { number?: str, date?: str, entityId?: int, lines?: T21[] }` -- Returns: `200 T6` +- Params: `id: int, body: { number?: str, date?: str, entityId?: int, lines?: T26[] }` +- Returns: `200 T8` #### Adjust stock manually — `POST /stock/adjust` - Params: `body: { sku?: str, warehouseId?: int, amount?: num, text?: str, lines?: { sku: str, amount: num, warehouseId?: int, text?: str }[] }` -- Returns: `201 { manifest: { id: int, number: str, type: str, date: str, createdAt: str }, lines: { manifestarticle_id: int, sku: str, name: str, warehouse_id: int, amount: num, text: str }[], ledger: T11[] }` +- Returns: `201 { manifest: { id: int, number: str, type: str, date: str, createdAt: str }, lines: { manifestarticle_id: int, sku: str, name: str, warehouse_id: int, amount: num, text: str }[], ledger: T13[] }` #### List suppliers — `GET /supplier` _none_ -- Returns: `200 { suppliers: T30[] }` +- Returns: `200 { suppliers: T34[] }` #### Create supplier — `POST /supplier` - Params: `body: { name: str }` -- Returns: `201 { supplier: T30 }` +- Returns: `201 { supplier: T34 }` #### Delete supplier — `DELETE /supplier/{id}` - Params: `id: int` - Returns: `204 void` #### Update supplier — `PATCH /supplier/{id}` - Params: `id: int, body: { name: str }` -- Returns: `200 { supplier: T30 }` +- Returns: `200 { supplier: T34 }` #### List supplier articles by SKUs — `GET /supplier/{id}/articles` - Params: `id: int, query: skus?: string` -- Returns: `200 { articles: { id: int, articleId: int, entityId: int, supplierName: str, sku: str, pu: num, stock: num, sort: int, priceId: int, price: T34, article: { id: int, sku: str, name: str, slug: str, photos: { sort: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str }[], eans: str[] } }[] }` +- Returns: `200 { articles: { id: int, articleId: int, entityId: int, supplierName: str, sku: str, pu: num, stock: num, sort: int, priceId: int, price: T38, article: { id: int, sku: str, name: str, slug: str, photos: { sort: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str }[], eans: str[] } }[] }` #### Query supplier articles by SKUs (bulk) — `POST /supplier/{id}/articles` - Params: `id: int, body?: { skus?: str[] }` -- Returns: `200 { articles: { id: int, articleId: int, entityId: int, supplierName: str, sku: str, pu: num, stock: num, sort: int, priceId: int, price: T34, article: { id: int, sku: str, name: str, slug: str, photos: { sort: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str }[], eans: str[] } }[] }` +- Returns: `200 { articles: { id: int, articleId: int, entityId: int, supplierName: str, sku: str, pu: num, stock: num, sort: int, priceId: int, price: T38, article: { id: int, sku: str, name: str, slug: str, photos: { sort: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str }[], eans: str[] } }[] }` #### Delete unit — `DELETE /unit` - Params: `query: si: str` - Returns: `204 void` #### List units — `GET /unit` _none_ -- Returns: `200 { units: T26[] }` +- Returns: `200 { units: T30[] }` #### Upsert unit — `PUT /unit` - Params: `body: { si: str, basesi: str, basesifactor: num, symbol: str, name: str }` -- Returns: `200 { unit: T26 }` +- Returns: `200 { unit: T30 }` #### List warehouses — `GET /warehouse` _none_ -- Returns: `200 { warehouses: T35[] }` +- Returns: `200 { warehouses: T39[] }` #### Create warehouse — `POST /warehouse` - Params: `body: { name: str, sort?: int }` -- Returns: `201 T33` +- Returns: `201 T37` #### Reorder warehouses — `PUT /warehouse/order` - Params: `body: { warehouseIds: int[] }` - Returns: `200 { warehouseIds: int[] }` @@ -475,13 +479,13 @@ _none_ - Returns: `204 void` #### Get warehouse by ID — `GET /warehouse/{id}` - Params: `id: int` -- Returns: `200 T33` +- Returns: `200 T37` #### Update warehouse (partial) — `PATCH /warehouse/{id}` - Params: `id: int, body: { name?: str, sort?: int }` -- Returns: `200 T33` +- Returns: `200 T37` #### Update warehouse — `PUT /warehouse/{id}` - Params: `id: int, body: { name?: str, sort?: int }` -- Returns: `200 T33` +- Returns: `200 T37` ### Binary & streaming routes (reachable only via `fetch()` in javascript_execute) These routes are NOT in the table above because their responses are binary or long-lived streams, which the `dashback_request` tool cannot return usefully. They ARE reachable from inside `javascript_execute` with `fetch("/route")`, where you can decode the bytes, write them to the VFS and embed them in your reply: diff --git a/docs/api/routes/labeltemplate/create.md b/docs/api/routes/labeltemplate/create.md index 3df52a5..69ab417 100644 --- a/docs/api/routes/labeltemplate/create.md +++ b/docs/api/routes/labeltemplate/create.md @@ -18,7 +18,7 @@ and stored with the template. | `height` | yes | number | | | `dpi` | yes | integer | | | `type` | yes | string | | -| `content` | yes | object | | +| `content` | yes | LabelContent | | ```json { @@ -27,7 +27,22 @@ and stored with the template. "height": 1, "dpi": 1, "type": "…", - "content": {} + "content": { + "objects": [ + { + "id": "…", + "type": "textbox", + "x": 1, + "y": 1, + "w": 1, + "h": 1, + "text": "…", + "font": "…", + "fontSize": 1, + "barcodeFormat": "EAN8" + } + ] + } } ``` @@ -44,7 +59,22 @@ Created label template "height": 1, "dpi": 1, "type": "…", - "content": {}, + "content": { + "objects": [ + { + "id": "…", + "type": "textbox", + "x": 1, + "y": 1, + "w": 1, + "h": 1, + "text": "…", + "font": "…", + "fontSize": 1, + "barcodeFormat": "EAN8" + } + ] + }, "thumb": "…" } } diff --git a/docs/api/routes/labeltemplate/get.md b/docs/api/routes/labeltemplate/get.md index 9d692c5..f8344db 100644 --- a/docs/api/routes/labeltemplate/get.md +++ b/docs/api/routes/labeltemplate/get.md @@ -25,7 +25,22 @@ Label template details "height": 1, "dpi": 1, "type": "…", - "content": {}, + "content": { + "objects": [ + { + "id": "…", + "type": "textbox", + "x": 1, + "y": 1, + "w": 1, + "h": 1, + "text": "…", + "font": "…", + "fontSize": 1, + "barcodeFormat": "EAN8" + } + ] + }, "thumb": "…" } } diff --git a/docs/api/routes/labeltemplate/list.md b/docs/api/routes/labeltemplate/list.md index 3e74cb7..9f466f0 100644 --- a/docs/api/routes/labeltemplate/list.md +++ b/docs/api/routes/labeltemplate/list.md @@ -20,7 +20,6 @@ List of label templates "height": 1, "dpi": 1, "type": "…", - "content": {}, "thumb": "…" } ] diff --git a/docs/api/routes/labeltemplate/update.md b/docs/api/routes/labeltemplate/update.md index 7c09c5d..af2e343 100644 --- a/docs/api/routes/labeltemplate/update.md +++ b/docs/api/routes/labeltemplate/update.md @@ -23,7 +23,7 @@ When `content` (or `width`/`height`) is provided, the thumbnail is automatically | `height` | no | number | | | `dpi` | no | integer | | | `type` | no | string | | -| `content` | no | object | | +| `content` | no | LabelContent | | ```json { @@ -32,7 +32,22 @@ When `content` (or `width`/`height`) is provided, the thumbnail is automatically "height": 1, "dpi": 1, "type": "…", - "content": {} + "content": { + "objects": [ + { + "id": "…", + "type": "textbox", + "x": 1, + "y": 1, + "w": 1, + "h": 1, + "text": "…", + "font": "…", + "fontSize": 1, + "barcodeFormat": "EAN8" + } + ] + } } ``` @@ -49,7 +64,22 @@ Updated label template "height": 1, "dpi": 1, "type": "…", - "content": {}, + "content": { + "objects": [ + { + "id": "…", + "type": "textbox", + "x": 1, + "y": 1, + "w": 1, + "h": 1, + "text": "…", + "font": "…", + "fontSize": 1, + "barcodeFormat": "EAN8" + } + ] + }, "thumb": "…" } } diff --git a/scripts/generateApiDocs.js b/scripts/generateApiDocs.js index 04cb883..9e38112 100644 --- a/scripts/generateApiDocs.js +++ b/scripts/generateApiDocs.js @@ -747,7 +747,7 @@ function renderRoutesOverview(operations, title = 'Dash API Routes Overview') { lines.push(''); lines.push('### Notation'); lines.push(''); - lines.push('Types: `str` string, `int` integer, `num` number, `bool` boolean, `{}` object; `T[]` array; `?` optional.'); + lines.push('Types: `str` string, `int` integer, `num` number, `bool` boolean; `T[]` array; `?` optional.'); lines.push('Params: path values first, then `query:` and `body:` (`body?` = optional body). Responses: status code + JSON shape; `Tn` refers to a reusable type below.'); if (definitions.length) { lines.push(''); diff --git a/src/api/openapi.js b/src/api/openapi.js index 6252fa2..555c9b7 100644 --- a/src/api/openapi.js +++ b/src/api/openapi.js @@ -1162,6 +1162,60 @@ * type: array * items: * type: integer + * LabelObject: + * type: object + * required: [id, type, x, y] + * properties: + * id: + * type: string + * type: + * type: string + * enum: [textbox, barcode, png] + * x: + * type: number + * y: + * type: number + * w: + * type: number + * h: + * type: number + * text: + * type: string + * font: + * type: string + * fontSize: + * type: number + * barcodeFormat: + * type: string + * enum: [EAN8, EAN13, CODE128, QR] + * LabelContent: + * type: object + * required: [objects] + * properties: + * objects: + * type: array + * description: Canvas label editor items + * items: + * $ref: '#/components/schemas/LabelObject' + * LabelTemplateSummary: + * type: object + * required: [id, name, width, height, dpi, type] + * properties: + * id: + * type: integer + * name: + * type: string + * width: + * type: number + * height: + * type: number + * dpi: + * type: integer + * type: + * type: string + * thumb: + * type: string + * nullable: true * LabelTemplate: * type: object * required: [id, name, width, height, dpi, type, content] @@ -1179,7 +1233,7 @@ * type: * type: string * content: - * type: object + * $ref: '#/components/schemas/LabelContent' * thumb: * type: string * nullable: true @@ -1198,7 +1252,7 @@ * type: * type: string * content: - * type: object + * $ref: '#/components/schemas/LabelContent' * LabelTemplateUpdateInput: * type: object * properties: @@ -1213,7 +1267,7 @@ * type: * type: string * content: - * type: object + * $ref: '#/components/schemas/LabelContent' * Warehouse: * type: object * required: [id, name, sort] diff --git a/src/api/routes/labeltemplate.js b/src/api/routes/labeltemplate.js index bbe91b1..03df190 100644 --- a/src/api/routes/labeltemplate.js +++ b/src/api/routes/labeltemplate.js @@ -61,7 +61,7 @@ export function register(app, basePath = '') { * labeltemplates: * type: array * items: - * $ref: '#/components/schemas/LabelTemplate' + * $ref: '#/components/schemas/LabelTemplateSummary' * 400: * description: No company selected * content: