This commit is contained in:
seb
2026-10-12 18:36:55 +02:00
parent 3748020b03
commit 77367b7716
8 changed files with 97 additions and 103 deletions

View File

@@ -10,41 +10,41 @@ Params: path values first, then `query:` and `body:` (`body?` = optional body).
### Reusable types ### Reusable types
- `T1` = `{ article: T2 }` - `T1` = `{ article: T2 }`
- `T2` = `{ id: int, sku: str, name: str, slug: str, desc: str|null, seo: str|null, track_stock: bool, unitamount: num|null, weight: num|null, unit: T32, brand: T30|null, categoryIds: int[], photos: T28[], eans: str[], prices: T40[], suppliers: T13[] }` - `T2` = `{ id: int, sku: str, name: str, slug: str, desc: str|null, seo: str|null, track_stock: bool, unitamount: num|null, weight: num|null, unit: T33, brand: T31|null, categoryIds: int[], photos: T29[], eans: str[], prices: T40[], suppliers: T13[] }`
- `T3` = `{ order: T4 }` - `T3` = `{ order: T4 }`
- `T4` = `{ id: int, number: str, type: str, entityId: int|null, date: str, lines: T23[], createdAt?: str, shipping?: T39|null, shippings?: T39[], payment?: T35|null, payments?: T35[], paid?: bool, delivered?: bool }` - `T4` = `{ id: int, number: str, type: str, entityId: int|null, date: str, lines: T24[], createdAt?: str, shipping?: T39|null, shippings?: T39[], payment?: T36|null, payments?: T36[], paid?: bool, delivered?: bool }`
- `T5` = `{ delivery: T6 }` - `T5` = `{ delivery: T6 }`
- `T6` = `{ id: int, number: str, type: str, supplierId: int|null, date: str, lines: T23[], files: T10[], externalNumber?: str|null, createdAt?: str, ledger?: T44 }` - `T6` = `{ id: int, number: str, type: str, supplierId: int|null, date: str, lines: T24[], files: T10[], externalNumber?: str|null, createdAt?: str, ledger?: T44 }`
- `T7` = `{ labeltemplate: T8 }` - `T7` = `{ labeltemplate: T8 }`
- `T8` = `{ id: int, name: str, width: num, height: num, dpi: int, type: str, content: T19, thumb?: str|null }` - `T8` = `{ id: int, name: str, width: num, height: num, dpi: int, type: str, content: T20, thumb?: str|null }`
- `T9` = `{ quote: T12 }` - `T9` = `{ quote: T12 }`
- `T10` = `{ id: int, manifestId: int, fileId: int, sort: int, hash: str, mimetype: str, name: str, size: int, created?: str, modified?: str, thumbavif?: str|null, thumbx?: int|null, thumby?: int|null, meta?: { [k]: str }|null }` - `T10` = `{ id: int, manifestId: int, fileId: int, sort: int, hash: str, mimetype: str, name: str, size: int, created?: str, modified?: str, thumbavif?: str|null, thumbx?: int|null, thumby?: int|null, meta?: { [k]: str }|null }`
- `T11` = `{ id: int, name: str, pairingpin?: str|null, token?: str|null, pairedAt?: str|null, clientserial?: str|null, rootCategoryId?: int|null, syncRootArticles?: bool, lastseenAt?: str|null, updatedAt?: str|null, categoryIds?: int[] }` - `T11` = `{ id: int, name: str, pairingpin?: str|null, token?: str|null, pairedAt?: str|null, clientserial?: str|null, rootCategoryId?: int|null, syncRootArticles?: bool, lastseenAt?: str|null, updatedAt?: str|null, categoryIds?: int[] }`
- `T12` = `{ id: int, number: str, type: str, entityId: int|null, date: str, lines: T23[], createdAt?: str }` - `T12` = `{ id: int, number: str, type: str, entityId: int|null, date: str, lines: T24[], createdAt?: str }`
- `T13` = `{ id: int, articleId: int, entityId: int, pu: num, sort: int, supplierName?: str|null, sku?: str|null, stock?: num|null, priceId?: int|null, price?: T46|null }` - `T13` = `{ id: int, articleId: int, entityId: int, pu: num, sort: int, supplierName?: str|null, sku?: str|null, stock?: num|null, priceId?: int|null, price?: T46|null }`
- `T14` = `{ id: int, entityId: int, addressType: str, firstName?: str|null, name?: str|null, street?: str|null, streetNumber?: str|null, zip?: str|null, city?: str|null, county?: str|null }` - `T14` = `{ id: int, entityId: int, addressType: str, firstName?: str|null, name?: str|null, street?: str|null, streetNumber?: str|null, zip?: str|null, city?: str|null, county?: str|null }`
- `T15` = `{ ledger: T16[] }` - `T15` = `{ ledger: T16[] }`
- `T16` = `{ id: int, manifestarticle_id: int, transaction_type: str, amount: num, transaction_text: str, hash_version: int, prev_hash?: str, sku?: str|null, created_at?: str }` - `T16` = `{ id: int, manifestarticle_id: int, transaction_type: str, amount: num, transaction_text: str, hash_version: int, prev_hash?: str, sku?: str|null, created_at?: str }`
- `T17` = `{ id: int, name: str, sort: int, exclusive: bool, values: T33[], articleCount?: int }` - `T17` = `{ id: int, name: str, sort: int, exclusive: bool, values: T34[], articleCount?: int }`
- `T18` = `{ id: int, companyuser_id: int, provider: str, model: str, created_at: str, updated_at: str, state: str, started_by?: integer,null, first_message?: string,null }` - `T18` = `{ id: int, companyuser_id: int, provider: str, model: str, created_at: str, updated_at: str, state: str, started_by?: integer,null, first_message?: string,null }`
- `T19` = `{ objects: T24[] }` - `T19` = `{ id: int, name: str, rootCategoryId: int|null, languageId: int|null, iso639: str|null, taxrate: num, reducedtaxrate: num, taxfreerate: num }`
- `T20` = `{ objects: T25[] }` - `T20` = `{ objects: T25[] }`
- `T21` = `{ printer: T26 }` - `T21` = `{ objects: T26[] }`
- `T22` = `{ entity: T29 }` - `T22` = `{ printer: T27 }`
- `T23` = `{ id: int, sku: str|null, name: str|null, pu: num, amount: num, net: num, rebate: num, taxrate: num, comment: str|null }` - `T23` = `{ entity: T30 }`
- `T24` = `{ id: str, type: str, x: num, y: num, w?: num, h?: num, text?: str, font?: str, fontSize?: num, barcodeFormat?: str }` - `T24` = `{ id: int, sku: str|null, name: str|null, pu: num, amount: num, net: num, rebate: num, taxrate: num, comment: str|null }`
- `T25` = `{ id: str, type: str, x: num, y: num, w?: num, h?: num, text?: str, font?: str, fontSize?: num, barcodeFormat?: str }` - `T25` = `{ id: str, type: str, x: num, y: num, w?: num, h?: num, text?: str, font?: str, fontSize?: num, barcodeFormat?: str }`
- `T26` = `{ id: int, company_id: int, address: str, type: str, sort: int, model?: str|null, serial?: str|null, desc?: str|null }` - `T26` = `{ id: str, type: str, x: num, y: num, w?: num, h?: num, text?: str, font?: str, fontSize?: num, barcodeFormat?: str }`
- `T27` = `{ amount: num, net: num, taxrate: num, sku?: str|null, name?: str|null, pu?: num, rebate?: num, comment?: str|null }` - `T27` = `{ id: int, company_id: int, address: str, type: str, sort: int, model?: str|null, serial?: str|null, desc?: str|null }`
- `T28` = `{ sort: int, fullHash: str, fullW: int, fullH: int, fullSize: int, thumbW: int, thumbH: int, thumbHash: str }` - `T28` = `{ amount: num, net: num, taxrate: num, sku?: str|null, name?: str|null, pu?: num, rebate?: num, comment?: str|null }`
- `T29` = `{ id: int, customergroupId: int, firstName: str|null, name: str, number: str|null, createdAt: str, updatedAt: str }` - `T29` = `{ sort: int, fullHash: str, fullW: int, fullH: int, fullSize: int, thumbW: int, thumbH: int, thumbHash: str }`
- `T30` = `{ name: str, id?: int|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null }` - `T30` = `{ id: int, customergroupId: int, firstName: str|null, name: str, number: str|null, createdAt: str, updatedAt: str }`
- `T31` = `{ article: T37 }` - `T31` = `{ name: str, id?: int|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null }`
- `T32` = `{ si: str, basesi: str, basesifactor: num, symbol?: str|null, name?: str|null }` - `T32` = `{ article: T37 }`
- `T33` = `{ id: int, attributeId: int, value: str, sort: int, articleCount?: int }` - `T33` = `{ si: str, basesi: str, basesifactor: num, symbol?: str|null, name?: str|null }`
- `T34` = `{ id: int, name: str, sort: int, exclusive: bool, articleCount?: int }` - `T34` = `{ id: int, attributeId: int, value: str, sort: int, articleCount?: int }`
- `T35` = `{ id: int, accountId: int, manifestId: int, type: str, amount: num }` - `T35` = `{ id: int, name: str, sort: int, exclusive: bool, articleCount?: int }`
- `T36` = `{ id: int, iso639: str, name: str, taxrate: num, reducedtaxrate: num }` - `T36` = `{ id: int, accountId: int, manifestId: int, type: str, amount: num }`
- `T37` = `{ id: int, categoryId: int, name: str, sku: str, track_stock: bool }` - `T37` = `{ id: int, categoryId: int, name: str, sku: str, track_stock: bool }`
- `T38` = `{ id: int, email: str, selectedCompanyId: int|null, picture?: str }` - `T38` = `{ id: int, email: str, selectedCompanyId: int|null, picture?: str }`
- `T39` = `{ id: int, manifestId: int, number: str, type: str, state: str }` - `T39` = `{ id: int, manifestId: int, number: str, type: str, state: str }`
@@ -77,7 +77,7 @@ _none_
#### Create article in category — `POST /article` #### Create article in category — `POST /article`
- Params: `body: { categoryId: int, name: str, desc?: str, seo?: str, track_stock?: bool }` - Params: `body: { categoryId: int, name: str, desc?: str, seo?: str, track_stock?: bool }`
- Returns: `201 T31` - Returns: `201 T32`
#### Export articles as ZIP — `GET /article/export.zip` #### Export articles as ZIP — `GET /article/export.zip`
- Params: `query: categoryId?: int` - Params: `query: categoryId?: int`
- Returns: `200 zip` - Returns: `200 zip`
@@ -113,7 +113,7 @@ _none_
- Returns: `200 { children: { id: int, sku: str, name: str, parentsort: int, attributeValueId: int, attributeValue: str }[] }` - 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` #### 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 }` - Params: `sku: str, body: { attributeValueId?: int, value?: str, name?: str }`
- Returns: `201 T31` - Returns: `201 T32`
#### Attach an existing article as a child to a parent article — `PUT /article/{sku}/children` #### 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 }` - Params: `sku: str, body: { sku: str, attributeValueId?: int, value?: str, reparent?: bool }`
- Returns: `200 { article: T37, children: { id: int, sku: str, name: str, parentsort: int, attributeValueId: int, attributeValue: str }[] }` - Returns: `200 { article: T37, children: { id: int, sku: str, name: str, parentsort: int, attributeValueId: int, attributeValue: str }[] }`
@@ -143,7 +143,7 @@ _none_
- Returns: `200 { options: { id: int, articleId: int, sku: str, name: str, count: int, sort: int, mandated: bool }[] }` - 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` #### Toggle parent mode for an article — `POST /article/{sku}/parent`
- Params: `sku: str, body: { isParent: bool, attributeNameId?: int }` - Params: `sku: str, body: { isParent: bool, attributeNameId?: int }`
- Returns: `200 T31` - Returns: `200 T32`
#### Replace POS prices by SKU (net > gross; price=net, tax=taxRate %) — `PUT /article/{sku}/prices` #### Replace POS prices by SKU (net > gross; price=net, tax=taxRate %) — `PUT /article/{sku}/prices`
- Params: `sku: str, body: { prices: { net?: num, gross?: num, price?: num, taxRate?: num, tax?: num, minmultiplier?: num }[] }` - Params: `sku: str, body: { prices: { net?: num, gross?: num, price?: num, taxRate?: num, tax?: num, minmultiplier?: num }[] }`
- Returns: `200 T1` - Returns: `200 T1`
@@ -194,10 +194,10 @@ _none_
- Returns: `200 { ok: bool }` - Returns: `200 { ok: bool }`
#### List values for an attribute — `GET /attributename/{attributeId}/value` #### List values for an attribute — `GET /attributename/{attributeId}/value`
- Params: `attributeId: int` - Params: `attributeId: int`
- Returns: `200 { values: T33[] }` - Returns: `200 { values: T34[] }`
#### Create value for an attribute — `POST /attributename/{attributeId}/value` #### Create value for an attribute — `POST /attributename/{attributeId}/value`
- Params: `attributeId: int, body: { value: str, sort?: int }` - Params: `attributeId: int, body: { value: str, sort?: int }`
- Returns: `201 { attributevalue: T33 }` - Returns: `201 { attributevalue: T34 }`
#### Reorder values of an attribute — `PUT /attributename/{attributeId}/value/order` #### Reorder values of an attribute — `PUT /attributename/{attributeId}/value/order`
- Params: `attributeId: int, body: { attributevalueIds: int[] }` - Params: `attributeId: int, body: { attributevalueIds: int[] }`
- Returns: `200 { ok: bool }` - Returns: `200 { ok: bool }`
@@ -215,7 +215,7 @@ _none_
- Returns: `200 { ok: bool }` - Returns: `200 { ok: bool }`
#### Update attribute value — `PATCH /attributevalue/{id}` #### Update attribute value — `PATCH /attributevalue/{id}`
- Params: `id: int, body: { value?: str, sort?: int }` - Params: `id: int, body: { value?: str, sort?: int }`
- Returns: `200 { attributevalue: T33 }` - Returns: `200 { attributevalue: T34 }`
#### Delete attribute value image — `DELETE /attributevalue/{id}/image` #### Delete attribute value image — `DELETE /attributevalue/{id}/image`
- Params: `id: int` - Params: `id: int`
- Returns: `200 { attributevalue: { id: int, thumbW: int|null, thumbH: int|null, thumbHash: str|null, pics: T41[] } }` - Returns: `200 { attributevalue: { id: int, thumbW: int|null, thumbH: int|null, thumbHash: str|null, pics: T41[] } }`
@@ -272,7 +272,7 @@ _none_
- Returns: `200 { categoryIds: int[] }` - Returns: `200 { categoryIds: int[] }`
#### Category tree — `GET /category/tree` #### Category tree — `GET /category/tree`
_none_ _none_
- Returns: `200 { languageId: int, tree: { id: int, sort: int, posterminalIds: int[], parentId?: int|null, name?: str|null, slug?: str|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null }[], articles: { id: int, sku: str, name: str, slug: str, track_stock: bool, optionsCount: int, articleListCount: int, childCount: int, net?: num|null, taxRate?: num|null, parentArticleId?: int|null, parentSku?: str|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null, brand?: T30|null }[] }` - Returns: `200 { languageId: int, tree: { id: int, sort: int, posterminalIds: int[], parentId?: int|null, name?: str|null, slug?: str|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null, articleCount?: int }[], articleCount: int }`
#### Delete category — `DELETE /category/{id}` #### Delete category — `DELETE /category/{id}`
- Params: `id: int, query: recursive?: bool` - Params: `id: int, query: recursive?: bool`
- Returns: `204 void` - Returns: `204 void`
@@ -281,7 +281,7 @@ _none_
- Returns: `200 { category: { id: int, name: str, slug: str, parentId: int, sort: int } }` - Returns: `200 { category: { id: int, name: str, slug: str, parentId: int, sort: int } }`
#### Articles in category — `GET /category/{id}/articles` #### Articles in category — `GET /category/{id}/articles`
- Params: `id: int` - Params: `id: int`
- Returns: `200 { articles: { id: int, sku: str, name: str, slug: str, track_stock: bool, optionsCount: int, articleListCount: int, childCount: int, net?: num|null, taxRate?: num|null, parentArticleId?: int|null, parentSku?: str|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null, brand?: T30|null }[] }` - Returns: `200 { articles: { id: int, sku: str, name: str, slug: str, track_stock: bool, optionsCount: int, articleListCount: int, childCount: int, net?: num|null, taxRate?: num|null, parentArticleId?: int|null, parentSku?: str|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null, brand?: T31|null }[] }`
#### List category attribute values — `GET /category/{id}/attributevalue` #### List category attribute values — `GET /category/{id}/attributevalue`
- Params: `id: int` - Params: `id: int`
- Returns: `200 { attributevalues: { id: int, attributeId: int, attributeName: str, attributeValueId: int, value: str, sort: int, categoryId?: int, exclusive?: bool }[] }` - Returns: `200 { attributevalues: { id: int, attributeId: int, attributeName: str, attributeValueId: int, value: str, sort: int, categoryId?: int, exclusive?: bool }[] }`
@@ -308,10 +308,10 @@ _none_
#### List companies — `GET /company` #### List companies — `GET /company`
_none_ _none_
- Returns: `200 { companies: T36[] }` - Returns: `200 { companies: T19[] }`
#### Create company — `POST /company` #### Create company — `POST /company`
- Params: `body: { iso639: str, name: str, taxrate: num, reducedtaxrate: num }` - Params: `body: { iso639: str, name: str, taxrate: num, reducedtaxrate: num }`
- Returns: `201 { company: T36, user: T38 }` - Returns: `201 { company: T19, user: T38 }`
#### Get company history — `GET /company/history` #### Get company history — `GET /company/history`
- Params: `query: limit?: int` - Params: `query: limit?: int`
- Returns: `200 { history: { id: int, date: str, text: str, companyuserId?: int|null }[], truncated: bool }` - Returns: `200 { history: { id: int, date: str, text: str, companyuserId?: int|null }[], truncated: bool }`
@@ -335,7 +335,7 @@ _none_
- Returns: `204 void` - Returns: `204 void`
#### Update company — `PUT /company/{id}` #### Update company — `PUT /company/{id}`
- Params: `id: int, body: { iso639: str, name: str, taxrate: num, reducedtaxrate: num }` - Params: `id: int, body: { iso639: str, name: str, taxrate: num, reducedtaxrate: num }`
- Returns: `200 { company: T36 }` - Returns: `200 { company: T19 }`
### Section: /customergroup ### Section: /customergroup
@@ -361,7 +361,7 @@ _none_
_none_ _none_
- Returns: `200 { deliveries: { id: int, number: str, type: str, supplierId: int|null, date: str, externalNumber?: str|null, createdAt?: str, ledger?: T44 }[] }` - Returns: `200 { deliveries: { id: int, number: str, type: str, supplierId: int|null, date: str, externalNumber?: str|null, createdAt?: str, ledger?: T44 }[] }`
#### Create delivery — `POST /delivery` #### Create delivery — `POST /delivery`
- Params: `body: { externalNumber: str, date: str, lines: T27[], supplierId?: int|null, 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: T28[], supplierId?: int|null, files?: { mimetype: str, name: str, content: str, sort?: int, size?: int, hash?: str, created?: str, modified?: str, meta?: { [k]: str } }[] }`
- Returns: `201 T5` - Returns: `201 T5`
#### Parse document (SSE) — `POST /delivery/parse` #### Parse document (SSE) — `POST /delivery/parse`
- Params: `form: { file: str }` - Params: `form: { file: str }`
@@ -382,7 +382,7 @@ _none_
- Params: `id: int` - Params: `id: int`
- Returns: `200 T5` - Returns: `200 T5`
#### Update delivery — `PATCH /delivery/{id}` #### Update delivery — `PATCH /delivery/{id}`
- Params: `id: int, body: { externalNumber?: str|null, date?: str, supplierId?: int|null, lines?: T27[], 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|null, date?: str, supplierId?: int|null, lines?: T28[], files?: { mimetype: str, name: str, content: str, sort?: int, size?: int, hash?: str, created?: str, modified?: str, meta?: { [k]: str } }[] }`
- Returns: `200 T5` - Returns: `200 T5`
#### Get delivery attachment file content — `GET /delivery/{id}/file/{fileId}` #### Get delivery attachment file content — `GET /delivery/{id}/file/{fileId}`
- Params: `id: int, fileId: int, query: download?: bool` - Params: `id: int, fileId: int, query: download?: bool`
@@ -392,10 +392,10 @@ _none_
#### List entities — `GET /entity` #### List entities — `GET /entity`
- Params: `query: customergroupId?: int, role?: str` - Params: `query: customergroupId?: int, role?: str`
- Returns: `200 { entities: T29[] }` - Returns: `200 { entities: T30[] }`
#### Create entity — `POST /entity` #### Create entity — `POST /entity`
- Params: `body: { customergroupId: int, name: str, firstName?: str|null, number?: str }` - Params: `body: { customergroupId: int, name: str, firstName?: str|null, number?: str }`
- Returns: `201 T22` - Returns: `201 T23`
#### Peek next customer number — `GET /entity/next-number` #### Peek next customer number — `GET /entity/next-number`
_none_ _none_
- Returns: `200 { number: str }` - Returns: `200 { number: str }`
@@ -428,10 +428,10 @@ _none_
- Returns: `204 void` - Returns: `204 void`
#### Get entity — `GET /entity/{id}` #### Get entity — `GET /entity/{id}`
- Params: `id: int` - Params: `id: int`
- Returns: `200 T22` - Returns: `200 T23`
#### Update entity — `PATCH /entity/{id}` #### Update entity — `PATCH /entity/{id}`
- Params: `id: int, body: { name?: str, firstName?: str|null, number?: str|null }` - Params: `id: int, body: { name?: str, firstName?: str|null, number?: str|null }`
- Returns: `200 T22` - Returns: `200 T23`
### Section: /events ### Section: /events
@@ -473,7 +473,7 @@ _none_
_none_ _none_
- Returns: `200 { labeltemplates: { id: int, name: str, width: num, height: num, dpi: int, type: str, thumb?: str|null }[] }` - Returns: `200 { labeltemplates: { id: int, name: str, width: num, height: num, dpi: int, type: str, thumb?: str|null }[] }`
#### Create label template — `POST /labeltemplate` #### Create label template — `POST /labeltemplate`
- Params: `body: { name: str, width: num, height: num, dpi: int, type: str, content: T20 }` - Params: `body: { name: str, width: num, height: num, dpi: int, type: str, content: T21 }`
- Returns: `201 T7` - Returns: `201 T7`
#### Delete label template — `DELETE /labeltemplate/{id}` #### Delete label template — `DELETE /labeltemplate/{id}`
- Params: `id: int` - Params: `id: int`
@@ -482,10 +482,10 @@ _none_
- Params: `id: int` - Params: `id: int`
- Returns: `200 T7` - Returns: `200 T7`
#### Update label template (partial) — `PATCH /labeltemplate/{id}` #### Update label template (partial) — `PATCH /labeltemplate/{id}`
- Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: T20 }` - Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: T21 }`
- Returns: `200 T7` - Returns: `200 T7`
#### Update label template — `PUT /labeltemplate/{id}` #### Update label template — `PUT /labeltemplate/{id}`
- Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: T20 }` - Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: T21 }`
- Returns: `200 T7` - Returns: `200 T7`
### Section: /ledger ### Section: /ledger
@@ -542,7 +542,7 @@ _none_
- Params: `query: offset?: int, limit?: int` - Params: `query: offset?: int, limit?: int`
- Returns: `200 { orders: T4[], total: int, offset: int, limit: int }` - Returns: `200 { orders: T4[], total: int, offset: int, limit: int }`
#### Create order — `POST /order` #### Create order — `POST /order`
- Params: `body: { number: str, date: str, lines: T27[], entityId?: int|null }` - Params: `body: { number: str, date: str, lines: T28[], entityId?: int|null }`
- Returns: `201 T3` - Returns: `201 T3`
#### Delete order — `DELETE /order/{id}` #### Delete order — `DELETE /order/{id}`
- Params: `id: int` - Params: `id: int`
@@ -551,14 +551,14 @@ _none_
- Params: `id: int` - Params: `id: int`
- Returns: `200 T3` - Returns: `200 T3`
#### Update order — `PATCH /order/{id}` #### Update order — `PATCH /order/{id}`
- Params: `id: int, body: { number?: str, date?: str, entityId?: int|null, lines?: T27[] }` - Params: `id: int, body: { number?: str, date?: str, entityId?: int|null, lines?: T28[] }`
- Returns: `200 T3` - Returns: `200 T3`
#### List payments of an order — `GET /order/{id}/payment` #### List payments of an order — `GET /order/{id}/payment`
- Params: `id: int` - Params: `id: int`
- Returns: `200 { payments: T35[] }` - Returns: `200 { payments: T36[] }`
#### Add payment to an order — `POST /order/{id}/payment` #### Add payment to an order — `POST /order/{id}/payment`
- Params: `id: int, body: { accountId: int, type: str, amount: num }` - Params: `id: int, body: { accountId: int, type: str, amount: num }`
- Returns: `201 { payment: T35 }` - Returns: `201 { payment: T36 }`
#### List shippings of an order — `GET /order/{id}/shipping` #### List shippings of an order — `GET /order/{id}/shipping`
- Params: `id: int` - Params: `id: int`
- Returns: `200 { shippings: T39[] }` - Returns: `200 { shippings: T39[] }`
@@ -609,10 +609,10 @@ _none_
#### List printers — `GET /printer` #### List printers — `GET /printer`
_none_ _none_
- Returns: `200 { printers: T26[] }` - Returns: `200 { printers: T27[] }`
#### Create printer — `POST /printer` #### Create printer — `POST /printer`
- Params: `body: { address: str, type: str, model?: str|null, serial?: str|null, sort?: int, desc?: str|null }` - Params: `body: { address: str, type: str, model?: str|null, serial?: str|null, sort?: int, desc?: str|null }`
- Returns: `201 T21` - Returns: `201 T22`
#### Reorder printers — `PUT /printer/order` #### Reorder printers — `PUT /printer/order`
- Params: `body: { printerIds: int[] }` - Params: `body: { printerIds: int[] }`
- Returns: `200 { printerIds: int[] }` - Returns: `200 { printerIds: int[] }`
@@ -621,22 +621,22 @@ _none_
- Returns: `204 void` - Returns: `204 void`
#### Get printer by ID — `GET /printer/{id}` #### Get printer by ID — `GET /printer/{id}`
- Params: `id: int` - Params: `id: int`
- Returns: `200 T21` - Returns: `200 T22`
#### Update printer (partial) — `PATCH /printer/{id}` #### Update printer (partial) — `PATCH /printer/{id}`
- Params: `id: int, body: { address?: str, type?: str, model?: str|null, serial?: str|null, sort?: int, desc?: str|null }` - Params: `id: int, body: { address?: str, type?: str, model?: str|null, serial?: str|null, sort?: int, desc?: str|null }`
- Returns: `200 T21` - Returns: `200 T22`
#### Update printer — `PUT /printer/{id}` #### Update printer — `PUT /printer/{id}`
- Params: `id: int, body: { address?: str, type?: str, model?: str|null, serial?: str|null, sort?: int, desc?: str|null }` - Params: `id: int, body: { address?: str, type?: str, model?: str|null, serial?: str|null, sort?: int, desc?: str|null }`
- Returns: `200 T21` - Returns: `200 T22`
### Section: /propertyname ### Section: /propertyname
#### List property names — `GET /propertyname` #### List property names — `GET /propertyname`
_none_ _none_
- Returns: `200 { propertynames: T34[] }` - Returns: `200 { propertynames: T35[] }`
#### Create property name — `POST /propertyname` #### Create property name — `POST /propertyname`
- Params: `body: { name: str, sort?: int, exclusive?: bool }` - Params: `body: { name: str, sort?: int, exclusive?: bool }`
- Returns: `201 { propertyname: T34 }` - Returns: `201 { propertyname: T35 }`
#### Reorder property names — `PUT /propertyname/order` #### Reorder property names — `PUT /propertyname/order`
- Params: `body: { propertynameIds: int[] }` - Params: `body: { propertynameIds: int[] }`
- Returns: `200 { ok: bool }` - Returns: `200 { ok: bool }`
@@ -645,7 +645,7 @@ _none_
- Returns: `200 { ok: bool }` - Returns: `200 { ok: bool }`
#### Update property name — `PATCH /propertyname/{id}` #### Update property name — `PATCH /propertyname/{id}`
- Params: `id: int, body: { name?: str, sort?: int, exclusive?: bool }` - Params: `id: int, body: { name?: str, sort?: int, exclusive?: bool }`
- Returns: `200 { propertyname: T34 }` - Returns: `200 { propertyname: T35 }`
### Section: /public ### Section: /public
@@ -668,7 +668,7 @@ _none_
_none_ _none_
- Returns: `200 { quotes: { id: int, number: str, type: str, entityId: int|null, date: str, createdAt?: str }[] }` - Returns: `200 { quotes: { id: int, number: str, type: str, entityId: int|null, date: str, createdAt?: str }[] }`
#### Create quote — `POST /quote` #### Create quote — `POST /quote`
- Params: `body: { number: str, date: str, lines: T27[], entityId?: int|null }` - Params: `body: { number: str, date: str, lines: T28[], entityId?: int|null }`
- Returns: `201 T9` - Returns: `201 T9`
#### Delete quote — `DELETE /quote/{id}` #### Delete quote — `DELETE /quote/{id}`
- Params: `id: int` - Params: `id: int`
@@ -677,7 +677,7 @@ _none_
- Params: `id: int` - Params: `id: int`
- Returns: `200 T9` - Returns: `200 T9`
#### Update quote — `PATCH /quote/{id}` #### Update quote — `PATCH /quote/{id}`
- Params: `id: int, body: { number?: str, date?: str, entityId?: int|null, lines?: T27[] }` - Params: `id: int, body: { number?: str, date?: str, entityId?: int|null, lines?: T28[] }`
- Returns: `200 T9` - Returns: `200 T9`
### Section: /serper ### Section: /serper
@@ -756,10 +756,10 @@ _none_
- Returns: `204 void` - Returns: `204 void`
#### List units — `GET /unit` #### List units — `GET /unit`
_none_ _none_
- Returns: `200 { units: T32[] }` - Returns: `200 { units: T33[] }`
#### Upsert unit — `PUT /unit` #### Upsert unit — `PUT /unit`
- Params: `body: { si: str, basesi: str, basesifactor: num, symbol: str, name: str }` - Params: `body: { si: str, basesi: str, basesifactor: num, symbol: str, name: str }`
- Returns: `200 { unit: T32 }` - Returns: `200 { unit: T33 }`
### Section: /v1 ### Section: /v1

View File

@@ -252,7 +252,7 @@ _none_
- Returns: `200 { categoryIds: int[] }` - Returns: `200 { categoryIds: int[] }`
#### Category tree — `GET /category/tree` #### Category tree — `GET /category/tree`
_none_ _none_
- Returns: `200 { languageId: int, tree: { id: int, sort: int, posterminalIds: int[], parentId?: int|null, name?: str|null, slug?: str|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null }[], articles: { id: int, sku: str, name: str, slug: str, track_stock: bool, optionsCount: int, articleListCount: int, childCount: int, net?: num|null, taxRate?: num|null, parentArticleId?: int|null, parentSku?: str|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null, brand?: T28|null }[] }` - Returns: `200 { languageId: int, tree: { id: int, sort: int, posterminalIds: int[], parentId?: int|null, name?: str|null, slug?: str|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null, articleCount?: int }[], articleCount: int }`
#### Delete category — `DELETE /category/{id}` #### Delete category — `DELETE /category/{id}`
- Params: `id: int, query: recursive?: bool` - Params: `id: int, query: recursive?: bool`
- Returns: `204 void` - Returns: `204 void`
@@ -285,7 +285,7 @@ _none_
#### List companies — `GET /company` #### List companies — `GET /company`
_none_ _none_
- Returns: `200 { companies: { id: int, iso639: str, name: str, taxrate: num, reducedtaxrate: num }[] }` - Returns: `200 { companies: { id: int, name: str, rootCategoryId: int|null, languageId: int|null, iso639: str|null, taxrate: num, reducedtaxrate: num, taxfreerate: num }[] }`
#### Get company history — `GET /company/history` #### Get company history — `GET /company/history`
- Params: `query: limit?: int` - Params: `query: limit?: int`
- Returns: `200 { history: { id: int, date: str, text: str, companyuserId?: int|null }[], truncated: bool }` - Returns: `200 { history: { id: int, date: str, text: str, companyuserId?: int|null }[], truncated: bool }`
@@ -306,7 +306,7 @@ _none_
- Returns: `200 { setting: { key: str, value: str|null } }` - Returns: `200 { setting: { key: str, value: str|null } }`
#### Update company — `PUT /company/{id}` #### Update company — `PUT /company/{id}`
- Params: `id: int, body: { iso639: str, name: str, taxrate: num, reducedtaxrate: num }` - Params: `id: int, body: { iso639: str, name: str, taxrate: num, reducedtaxrate: num }`
- Returns: `200 { company: { id: int, iso639: str, name: str, taxrate: num, reducedtaxrate: num } }` - Returns: `200 { company: { id: int, name: str, rootCategoryId: int|null, languageId: int|null, iso639: str|null, taxrate: num, reducedtaxrate: num, taxfreerate: num } }`
### Section: /customergroup ### Section: /customergroup

View File

@@ -8,7 +8,7 @@ Returns the category tree for the authenticated user's selected company.
## Response `200` ## Response `200`
Tree and articles for the selected company Tree and article count for the selected company
```json ```json
{ {
@@ -24,39 +24,13 @@ Tree and articles for the selected company
"thumbW": 1, "thumbW": 1,
"thumbH": 1, "thumbH": 1,
"thumbHash": "…", "thumbHash": "…",
"articleCount": 1,
"posterminalIds": [ "posterminalIds": [
1 1
] ]
} }
], ],
"articles": [ "articleCount": 1
{
"id": 1,
"sku": "…",
"name": "…",
"slug": "…",
"net": 1,
"taxRate": 1,
"track_stock": true,
"optionsCount": 1,
"articleListCount": 1,
"childCount": 1,
"parentArticleId": 1,
"parentSku": "…",
"fullHash": "…",
"thumbW": 1,
"thumbH": 1,
"thumbHash": "…",
"brand": {
"id": 1,
"name": "…",
"fullHash": "…",
"thumbW": 1,
"thumbH": 1,
"thumbHash": "…"
}
}
]
} }
``` ```

View File

@@ -32,10 +32,13 @@ Created; selected company updated
{ {
"company": { "company": {
"id": 1, "id": 1,
"iso639": "…",
"name": "…", "name": "…",
"rootCategoryId": 1,
"languageId": 1,
"iso639": "…",
"taxrate": 1, "taxrate": 1,
"reducedtaxrate": 1 "reducedtaxrate": 1,
"taxfreerate": 1
}, },
"user": { "user": {
"id": 1, "id": 1,

View File

@@ -15,10 +15,13 @@ Company list
"companies": [ "companies": [
{ {
"id": 1, "id": 1,
"iso639": "…",
"name": "…", "name": "…",
"rootCategoryId": 1,
"languageId": 1,
"iso639": "…",
"taxrate": 1, "taxrate": 1,
"reducedtaxrate": 1 "reducedtaxrate": 1,
"taxfreerate": 1
} }
] ]
} }

View File

@@ -38,10 +38,13 @@ Updated
{ {
"company": { "company": {
"id": 1, "id": 1,
"iso639": "…",
"name": "…", "name": "…",
"rootCategoryId": 1,
"languageId": 1,
"iso639": "…",
"taxrate": 1, "taxrate": 1,
"reducedtaxrate": 1 "reducedtaxrate": 1,
"taxfreerate": 1
} }
} }
``` ```

View File

@@ -42,14 +42,23 @@
* properties: * properties:
* id: * id:
* type: integer * type: integer
* iso639:
* type: string
* name: * name:
* type: string * type: string
* rootCategoryId:
* type: integer
* nullable: true
* languageId:
* type: integer
* nullable: true
* iso639:
* type: string
* nullable: true
* taxrate: * taxrate:
* type: number * type: number
* reducedtaxrate: * reducedtaxrate:
* type: number * type: number
* taxfreerate:
* type: number
* SuccessResponse: * SuccessResponse:
* type: object * type: object
* required: [ok] * required: [ok]
@@ -513,6 +522,9 @@
* thumbHash: * thumbHash:
* type: string * type: string
* nullable: true * nullable: true
* articleCount:
* type: integer
* description: Number of articles assigned directly to this category
* posterminalIds: * posterminalIds:
* type: array * type: array
* items: * items:

View File

@@ -74,7 +74,7 @@ export function register(app, basePath = '') {
* x-markdown: category/tree.md * x-markdown: category/tree.md
* responses: * responses:
* 200: * 200:
* description: Tree and articles for the selected company * description: Tree and article count for the selected company
* content: * content:
* application/json: * application/json:
* schema: * schema:
@@ -86,10 +86,9 @@ export function register(app, basePath = '') {
* type: array * type: array
* items: * items:
* $ref: '#/components/schemas/CategoryTreeNode' * $ref: '#/components/schemas/CategoryTreeNode'
* articles: * articleCount:
* type: array * type: integer
* items: * description: Total number of parent articles across the category tree
* $ref: '#/components/schemas/CategoryArticle'
* 400: * 400:
* description: No company selected * description: No company selected
* content: * content: