This commit is contained in:
seb
2026-10-04 20:38:22 +02:00
parent e00533f9fa
commit ab9ce9b600
3 changed files with 1049 additions and 411 deletions

View File

@@ -4,192 +4,556 @@ Overview of all 181 API endpoints across all modules.
### Parameter Notation
- **Required parameters** have no `?` (e.g. `sku:string`, `categoryId`, `query: si:string`, `body: { name }`).
- **Optional parameters** are marked with `?` (e.g. `query: categoryId?:integer`, `track_stock?`, `body?: ...`).
- **Every value carries its type** — `string`, `integer`, `number`, `boolean`, `object`, arrays as `type[]`.
- **Required parameters** have no `?` (e.g. `sku: string`, `id: integer`, `query: si: string`, `body: { name: string }`).
- **Optional parameters** are marked with `?` (e.g. `query: limit?: integer`, `body: { sort?: integer }`, `body?: { … }`).
- **Path parameters** match `{param}` in the route URL.
- **Query parameters** are prefixed with `query: ...`.
- **Request bodies** are prefixed with `body: ...` (or `body?: ...` if optional).
- **Request bodies** are prefixed with `body: ...` (or `body?: ...` if the whole body is optional).
- **Response objects** use the same notation, so `201 { article: { … } }` means a JSON object with an `article` property.
| Method | Route | Params | Return Type | Summary |
|:---|:---|:---|:---|:---|
| `POST` | `/article` | `body: { categoryId, name, track_stock? }` | `201 { article: { id, categoryId, name, sku, track_stock } }` | Create article in category |
| `GET` | `/article/export.zip` | `query: categoryId?:integer` | `200 zip` | Export articles as ZIP |
| `DELETE` | `/article/{sku}` | `sku:string, query: cascade?:boolean` | `204 void` | Delete article by SKU |
| `GET` | `/article/{sku}` | `sku:string` | `200 { article: { id, sku, name, slug, track_stock, unitamount, weight, unit, brand, categoryIds: integer[], photos: { sort, fullHash, fullW, fullH, fullSize, thumbW, thumbH, thumbHash }[], eans: string[], prices: { minmultiplier, net, taxRate, customergroupId }[], suppliers: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price }[] } }` | Get article by SKU |
| `PATCH` | `/article/{sku}` | `sku:string, body: { name?, unitamount?, unitSi?, track_stock? }` | `200 { article: { id, sku, name, slug, track_stock, unitamount, weight, unit, brand, categoryIds: integer[], photos: { sort, fullHash, fullW, fullH, fullSize, thumbW, thumbH, thumbHash }[], eans: string[], prices: { minmultiplier, net, taxRate, customergroupId }[], suppliers: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price }[] } }` | Update article by SKU |
| `GET` | `/article/{sku}/articlelist` | `sku:string` | `200 { items: { id, articleId, sku, name, count, sort }[] }` | Get Stückliste (bundle items) for an article |
| `PUT` | `/article/{sku}/articlelist` | `sku:string, body: { items: { articleId?, sku?: string, count?, sort? }[] }` | `200 { items: object[] }` | Set Stückliste (bundle items) for an article |
| `GET` | `/article/{sku}/attributevalue` | `sku:string` | `200 { attributevalues: { id, articleId, attributeId, attributeName, exclusive, attributeValueId, value, sort }[] }` | List article attribute values |
| `PUT` | `/article/{sku}/attributevalue` | `sku:string, body: integer[]` | `200 { attributevalues: { id, articleId, attributeId, attributeName, exclusive, attributeValueId, value, sort }[] }` | Bulk set article attribute values |
| `PUT` | `/article/{sku}/brand` | `sku:string, body: { brandId: integer }` | `200 { article: { id, sku, name, slug, track_stock, unitamount, weight, unit, brand, categoryIds: integer[], photos: { sort, fullHash, fullW, fullH, fullSize, thumbW, thumbH, thumbHash }[], eans: string[], prices: { minmultiplier, net, taxRate, customergroupId }[], suppliers: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price }[] } }` | Set or clear article brand by SKU |
| `PUT` | `/article/{sku}/categories` | `sku:string, body: { categoryIds: integer[] }` | `200 { article: { id, sku, name, slug, track_stock, unitamount, weight, unit, brand, categoryIds: integer[], photos: { sort, fullHash, fullW, fullH, fullSize, thumbW, thumbH, thumbHash }[], eans: string[], prices: { minmultiplier, net, taxRate, customergroupId }[], suppliers: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price }[] } }` | Replace article categories by SKU |
| `GET` | `/article/{sku}/children` | `sku:string` | `200 { children: { id, sku, name, fathersort, attributeValueId, attributeValue }[] }` | List child articles of a father article |
| `POST` | `/article/{sku}/children` | `sku:string, body: { attributeValueId?, value?, name? }` | `201 { article: { id, categoryId, name, sku, track_stock } }` | Create and attach a new child article to a father article |
| `PUT` | `/article/{sku}/children` | `sku:string, body: { sku: string, attributeValueId?, value?, reparent? }` | `200 { article, children: object[] }` | Attach an existing article as a child to a father article |
| `DELETE` | `/article/{sku}/children/{childSku}` | `sku:string, childSku:string, query: deleteArticle?:boolean` | `200 { success, deleted }` | Remove a child article from a father article |
| `PUT` | `/article/{sku}/eans` | `sku:string, body: { eans: string[] }` | `200 { article: { id, sku, name, slug, track_stock, unitamount, weight, unit, brand, categoryIds: integer[], photos: { sort, fullHash, fullW, fullH, fullSize, thumbW, thumbH, thumbHash }[], eans: string[], prices: { minmultiplier, net, taxRate, customergroupId }[], suppliers: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price }[] } }` | Replace article EANs by SKU |
| `POST` | `/article/{sku}/father` | `sku:string, body: { isFather, attributeNameId? }` | `200 { article: { id, categoryId, name, sku, track_stock } }` | Toggle father mode for an article |
| `GET` | `/article/{sku}/history` | `sku:string, query: limit?:integer` | `200 { history: { id, date, text }[], truncated }` | Get article history by SKU |
| `POST` | `/article/{sku}/image` | `sku:string, image/avif` | `201 { image: { picId, sort, full, thumb, hash, thumbHash } }` | Add article image |
| `DELETE` | `/article/{sku}/image/{fullHash}` | `sku:string, fullHash:string` | `204 void` | Delete article image |
| `PUT` | `/article/{sku}/images/order` | `sku:string, body: { fullHashes: string[] }` | `200 { fullHashes: string[] }` | Reorder article images |
| `GET` | `/article/{sku}/optionslist` | `sku:string` | `200 { options: { id, articleId, sku, name, count, sort, mandated }[] }` | Get options list for an article |
| `PUT` | `/article/{sku}/optionslist` | `sku:string, body: { options: { articleId?, sku?: string, count?, sort?, mandated? }[] }` | `200 { options: object[] }` | Set options list for an article |
| `PUT` | `/article/{sku}/prices` | `sku:string, body: { prices: { price, tax, minmultiplier? }[] }` | `200 { article: { id, sku, name, slug, track_stock, unitamount, weight, unit, brand, categoryIds: integer[], photos: { sort, fullHash, fullW, fullH, fullSize, thumbW, thumbH, thumbHash }[], eans: string[], prices: { minmultiplier, net, taxRate, customergroupId }[], suppliers: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price }[] } }` | Replace POS prices by SKU |
| `POST` | `/article/{sku}/print` | `sku:string, body: { templateId, printerId, quantity }` | `200` | Print article label |
| `GET` | `/article/{sku}/property` | `sku:string` | `200 { properties: { id, articleId, propertyId, name, exclusive, value, sort }[] }` | List article properties |
| `PUT` | `/article/{sku}/property` | `sku:string, body: { properties: { propertyId, value, sort? }[] }` | `200 { properties: { id, articleId, propertyId, name, exclusive, value, sort }[] }` | Bulk set article properties |
| `DELETE` | `/article/{sku}/property/{propertyId}` | `sku:string, propertyId:integer` | `200` | Delete article property |
| `GET` | `/article/{sku}/supplier` | `sku:string` | `200 { suppliers: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price }[] }` | List article suppliers |
| `POST` | `/article/{sku}/supplier` | `sku:string, body: { entityId, sku?: string, pu?, stock?, sort?, netPrice?, taxId?, taxRate? }` | `201 { supplier: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price } }` | Assign supplier to article |
| `PUT` | `/article/{sku}/supplier/order` | `sku:string, body: { ids: integer[] }` | `200 { ids: integer[] }` | Reorder article suppliers |
| `DELETE` | `/article/{sku}/supplier/{id}` | `sku:string, id:integer` | `204 void` | Remove supplier assignment from article |
| `PATCH` | `/article/{sku}/supplier/{id}` | `sku:string, id:integer, body: { sku?: string, pu?, stock?, sort?, netPrice?, taxId?, taxRate? }` | `200 { supplier: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price } }` | Update article supplier assignment |
| `PUT` | `/article/{sku}/track_stock` | `sku:string, body: { track_stock: boolean }` | `200 { article: { id, sku, name, slug, track_stock, unitamount, weight, unit, brand, categoryIds: integer[], photos: { sort, fullHash, fullW, fullH, fullSize, thumbW, thumbH, thumbHash }[], eans: string[], prices: { minmultiplier, net, taxRate, customergroupId }[], suppliers: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price }[] } }` | Set article track_stock flag by SKU |
| `PUT` | `/article/{sku}/weight` | `sku:string, body: { weight: number }` | `200 { article: { id, sku, name, slug, track_stock, unitamount, weight, unit, brand, categoryIds: integer[], photos: { sort, fullHash, fullW, fullH, fullSize, thumbW, thumbH, thumbHash }[], eans: string[], prices: { minmultiplier, net, taxRate, customergroupId }[], suppliers: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price }[] } }` | Set article weight by SKU |
| `GET` | `/articleIndex` | `query: windowSize:integer` | `200 { articles: { id, sku, name, eans: string[], categoryIds: integer[] }[], truncated }` | List article search index |
| `GET` | `/attributename` | — | `200 { attributenames: { id, name, sort, exclusive, values: { id, attributeId, value, sort }[] }[] }` | List attribute names |
| `POST` | `/attributename` | `body: { name, sort?, exclusive? }` | `201 { attributename: { id, name, sort, exclusive, values: { id, attributeId, value, sort }[] } }` | Create attribute name |
| `PUT` | `/attributename/order` | `body: { attributenameIds: integer[] }` | `200` | Reorder attribute names |
| `GET` | `/attributename/{attributeId}/value` | `attributeId:integer` | `200 { values: { id, attributeId, value, sort }[] }` | List values for an attribute |
| `POST` | `/attributename/{attributeId}/value` | `attributeId:integer, body: { value, sort? }` | `201 { attributevalue: { id, attributeId, value, sort } }` | Create value for an attribute |
| `PUT` | `/attributename/{attributeId}/value/order` | `attributeId:integer, body: { attributevalueIds: integer[] }` | `200` | Reorder values of an attribute |
| `DELETE` | `/attributename/{id}` | `id:integer` | `200` | Delete attribute name |
| `PATCH` | `/attributename/{id}` | `id:integer, body: { name?, sort?, exclusive? }` | `200 { attributename: { id, name, sort, exclusive, values: { id, attributeId, value, sort }[] } }` | Update attribute name |
| `DELETE` | `/attributevalue/{id}` | `id:integer` | `200` | Delete attribute value |
| `PATCH` | `/attributevalue/{id}` | `id:integer, body: { value?, sort? }` | `200 { attributevalue: { id, attributeId, value, sort } }` | Update attribute value |
| `POST` | `/auth/login` | `body: { idToken: string }` | `200 { message, user }` | Login with Google ID token |
| `POST` | `/auth/logout` | — | `200 { message: string }` | Logout |
| `GET` | `/auth/me` | — | `200 { user, googleClientId }` | Current user |
| `PUT` | `/auth/selected-company` | `body: { companyId: integer }` | `200 { user: { id, email, selectedCompanyId, picture } }` | Set selected company |
| `GET` | `/brand` | — | `200 { brands: { id, name, gsprpinfo, pics: { id, sort, fullHash, thumbW, thumbH, thumbHash }[] }[] }` | List brands |
| `PUT` | `/brand` | `body: { name, gsprpinfo? }` | `200 { brand: { id, name, gsprpinfo, pics: { id, sort, fullHash, thumbW, thumbH, thumbHash }[] } }` | Upsert brand |
| `DELETE` | `/brand/{id}` | `id:integer` | `204 void` | Delete brand |
| `POST` | `/category` | `body: { parentId, name }` | `201 { category: { id, parentId, sort, name } }` | Create category |
| `GET` | `/category/export.zip` | — | `200 zip` | Export categories as ZIP |
| `PUT` | `/category/order` | `body: { parentId, categoryIds: integer[] }` | `200 { categoryIds: integer[] }` | Reorder sibling categories |
| `GET` | `/category/tree` | — | `200 { languageId, tree: object[], articles: object[] }` | Category tree |
| `DELETE` | `/category/{id}` | `id:integer` | `204 void` | Delete category |
| `PATCH` | `/category/{id}` | `id:integer, body: { name?, parentId? }` | `200 { category: { id, name, slug, parentId, sort } }` | Update category (rename or move) |
| `GET` | `/category/{id}/articles` | `id:integer` | `200 { articles: { id, sku, name, slug, net, taxRate, track_stock, optionsCount, articleListCount, childCount, fullHash, thumbW, thumbH, thumbHash, brand }[] }` | Articles in category |
| `GET` | `/category/{id}/attributevalue` | `id:integer` | `200 { attributevalues: { id, categoryId, attributeId, attributeName, exclusive, attributeValueId, value, sort }[] }` | List category attribute values |
| `PUT` | `/category/{id}/attributevalue` | `id:integer, body: integer[]` | `200 { attributevalues: { id, categoryId, attributeId, attributeName, exclusive, attributeValueId, value, sort }[] }` | Bulk set category attribute values |
| `DELETE` | `/category/{id}/image` | `id:integer` | `200 { category: { id, thumbW, thumbH, thumbHash } }` | Delete category image |
| `POST` | `/category/{id}/image` | `id:integer, image/avif` | `201 { category: { id, thumbW, thumbH, thumbHash } }` | Add category image |
| `GET` | `/category/{id}/property` | `id:integer` | `200 { properties: { id, categoryId, propertyId, name, exclusive, value, sort }[] }` | List category properties |
| `PUT` | `/category/{id}/property` | `id:integer, body: { properties: { propertyId, value, sort? }[] }` | `200 { properties: { id, categoryId, propertyId, name, exclusive, value, sort }[] }` | Bulk set category properties |
| `DELETE` | `/category/{id}/property/{propertyId}` | `id:integer, propertyId:integer` | `200` | Delete category property |
| `GET` | `/company` | — | `200 { companies: { id, iso639, name, taxrate, reducedtaxrate }[] }` | List companies |
| `POST` | `/company` | `body: { iso639, name, taxrate, reducedtaxrate }` | `201 { company, user }` | Create company |
| `GET` | `/company/history` | `query: limit?:integer` | `200 { history: { id, companyuserId, date, text }[], truncated }` | Get company history |
| `POST` | `/company/history` | `body: { text: string }` | `201 { history: { id, companyuserId, date, text } }` | Add company history entry |
| `GET` | `/company/setting` | — | `200 { settings: { key, value }[] }` | List company settings |
| `GET` | `/company/setting/{key}` | `key:string` | `200 { setting: { key, value } }` | Get company setting by key |
| `PUT` | `/company/setting/{key}` | `key:string, body: { value, frontend? }` | `200 { setting: { key, value } }` | Upsert company setting |
| `DELETE` | `/company/{id}` | `id:integer` | `204 void` | Delete company |
| `PUT` | `/company/{id}` | `id:integer, body: { iso639, name, taxrate, reducedtaxrate }` | `200 { company: { id, iso639, name, taxrate, reducedtaxrate } }` | Update company |
| `GET` | `/customergroup` | — | `200 { customergroups: { id, name, sort, editable }[] }` | List customer groups |
| `POST` | `/customergroup` | `body: { name: string }` | `201 { customergroup: { id, name, sort } }` | Create customer group |
| `PUT` | `/customergroup/order` | `body: { customergroupIds: integer[] }` | `200 { customergroupIds: integer[] }` | Reorder customer groups |
| `DELETE` | `/customergroup/{id}` | `id:integer` | `204 void` | Delete customer group |
| `PATCH` | `/customergroup/{id}` | `id:integer, body: { name: string }` | `200 { customergroup: { id, name, sort } }` | Update customer group |
| `GET` | `/delivery` | — | `200 { deliveries: { id, number, type, supplierId, externalNumber, date, createdAt, ledger }[] }` | List deliveries |
| `POST` | `/delivery` | `body: { externalNumber, date, lines: { amount, net, taxrate, sku?: string, name?, pu?, rebate?, comment? }[], supplierId?, files?: { mimetype, name, content, sort?, size?, hash?, created?, modified?, meta? }[] }` | `201 { delivery: { id, number, type, supplierId, externalNumber, date, createdAt, ledger, lines: { id, sku, name, pu, amount, net, rebate, taxrate, comment }[], files: { id, manifestId, fileId, sort, hash, mimetype, name, size, created, modified, thumbavif, thumbx, thumby, meta }[] } }` | Create delivery |
| `POST` | `/delivery/parse` | `form: { file: string }` | `200 SSE` | Parse document (SSE) |
| `DELETE` | `/delivery/{id}` | `id:integer` | `204 void` | Delete delivery |
| `GET` | `/delivery/{id}` | `id:integer` | `200 { delivery: { id, number, type, supplierId, externalNumber, date, createdAt, ledger, lines: { id, sku, name, pu, amount, net, rebate, taxrate, comment }[], files: { id, manifestId, fileId, sort, hash, mimetype, name, size, created, modified, thumbavif, thumbx, thumby, meta }[] } }` | Get delivery |
| `PATCH` | `/delivery/{id}` | `id:integer, body: { externalNumber?, date?, supplierId?, lines?: { amount, net, taxrate, sku?: string, name?, pu?, rebate?, comment? }[], files?: { mimetype, name, content, sort?, size?, hash?, created?, modified?, meta? }[] }` | `200 { delivery: { id, number, type, supplierId, externalNumber, date, createdAt, ledger, lines: { id, sku, name, pu, amount, net, rebate, taxrate, comment }[], files: { id, manifestId, fileId, sort, hash, mimetype, name, size, created, modified, thumbavif, thumbx, thumby, meta }[] } }` | Update delivery |
| `GET` | `/delivery/{id}/file/{fileId}` | `id:integer, fileId:integer, query: download?:boolean` | `200 string` | Get delivery attachment file content |
| `GET` | `/entity` | `query: customergroupId?:integer, role?:string` | `200 { entities: { id, customergroupId, firstName, name, number, createdAt, updatedAt }[] }` | List entities |
| `POST` | `/entity` | `body: { customergroupId, name, firstName?, number? }` | `201 { entity: { id, customergroupId, firstName, name, number, createdAt, updatedAt } }` | Create entity |
| `GET` | `/entity/next-number` | — | `200 { number: string }` | Peek next customer number |
| `GET` | `/entity/{entityId}/address` | `entityId:integer` | `200 { addresses: { id, entityId, firstName, name, street, streetNumber, zip, city, county, addressType }[] }` | List entity addresses |
| `POST` | `/entity/{entityId}/address` | `entityId:integer, body: { addressType, firstName?, name?, street?, streetNumber?, zip?, city?, county? }` | `201 { address: { id, entityId, firstName, name, street, streetNumber, zip, city, county, addressType } }` | Create entity address |
| `DELETE` | `/entity/{entityId}/address/{id}` | `entityId:integer, id:integer` | `204 void` | Delete entity address |
| `PATCH` | `/entity/{entityId}/address/{id}` | `entityId:integer, id:integer, body: { addressType?, firstName?, name?, street?, streetNumber?, zip?, city?, county? }` | `200 { address: { id, entityId, firstName, name, street, streetNumber, zip, city, county, addressType } }` | Update entity address |
| `GET` | `/entity/{entityId}/contact` | `entityId:integer` | `200 { contacts: { id, entityId, contactType, contact }[] }` | List entity contacts |
| `POST` | `/entity/{entityId}/contact` | `entityId:integer, body: { contactType, contact }` | `201 { contact: { id, entityId, contactType, contact } }` | Create entity contact |
| `DELETE` | `/entity/{entityId}/contact/{id}` | `entityId:integer, id:integer` | `204 void` | Delete entity contact |
| `PATCH` | `/entity/{entityId}/contact/{id}` | `entityId:integer, id:integer, body: { contactType?, contact? }` | `200 { contact: { id, entityId, contactType, contact } }` | Update entity contact |
| `DELETE` | `/entity/{id}` | `id:integer` | `204 void` | Delete entity |
| `GET` | `/entity/{id}` | `id:integer` | `200 { entity: { id, customergroupId, firstName, name, number, createdAt, updatedAt } }` | Get entity |
| `PATCH` | `/entity/{id}` | `id:integer, body: { name?, firstName?, number? }` | `200 { entity: { id, customergroupId, firstName, name, number, createdAt, updatedAt } }` | Update entity |
| `GET` | `/events` | — | `200 SSE` | Subscribe to update signals (SSE) |
| `GET` | `/health` | — | `200 { ok: boolean }` | Database health check |
| `GET` | `/image/{fullHash}` | `fullHash:string` | `200 avif` | Full image by hash |
| `GET` | `/labeltemplate` | — | `200 { labeltemplates: { id, name, width, height, dpi, type, content, thumb }[] }` | List label templates |
| `POST` | `/labeltemplate` | `body: { name, width, height, dpi, type, content }` | `201 { labeltemplate: { id, name, width, height, dpi, type, content, thumb } }` | Create label template |
| `DELETE` | `/labeltemplate/{id}` | `id:integer` | `204 void` | Delete label template |
| `GET` | `/labeltemplate/{id}` | `id:integer` | `200 { labeltemplate: { id, name, width, height, dpi, type, content, thumb } }` | Get label template by ID |
| `PATCH` | `/labeltemplate/{id}` | `id:integer, body: { name?, width?, height?, dpi?, type?, content? }` | `200 { labeltemplate: { id, name, width, height, dpi, type, content, thumb } }` | Update label template (partial) |
| `PUT` | `/labeltemplate/{id}` | `id:integer, body: { name?, width?, height?, dpi?, type?, content? }` | `200 { labeltemplate: { id, name, width, height, dpi, type, content, thumb } }` | Update label template |
| `GET` | `/ledger` | `query: manifestarticle_id?:integer, sku?:string, transaction_type?:string` | `200 { ledger: { id, manifestarticle_id, transaction_type, amount, transaction_text, hash_version, prev_hash, sku, created_at }[] }` | Query ledger by manifest article ID or SKU |
| `POST` | `/ledger` | `body: { manifestarticle_id, transaction_type, amount, transaction_text }` | `201 { ledger: { id, manifestarticle_id, transaction_type, amount, transaction_text, hash_version, prev_hash, sku, created_at } }` | Add ledger entry |
| `GET` | `/ledger/manifestarticle/{manifestarticleId}` | `manifestarticleId:integer, query: transaction_type?:string` | `200 { ledger: { id, manifestarticle_id, transaction_type, amount, transaction_text, hash_version, prev_hash, sku, created_at }[] }` | Query ledger by manifest article ID |
| `GET` | `/ledger/sku/{sku}` | `sku:string, query: transaction_type?:string` | `200 { ledger: { id, manifestarticle_id, transaction_type, amount, transaction_text, hash_version, prev_hash, sku, created_at }[] }` | Query ledger by article SKU |
| `GET` | `/modelconversation` | — | `200 { conversations: { id, companyuser_id, provider, model, created_at, updated_at, state }[] }` | List conversations |
| `POST` | `/modelconversation` | `body: { provider, model }` | `201 { conversation: { id, companyuser_id, provider, model, created_at, updated_at, state } }` | Create conversation |
| `DELETE` | `/modelconversation/{id}` | `id:integer` | `204 void` | Delete conversation |
| `GET` | `/modelconversation/{id}` | `id:integer` | `200 { conversation: { id, companyuser_id, provider, model, created_at, updated_at, state } }` | Get conversation |
| `GET` | `/modelconversation/{id}/message` | `id:integer` | `200 { messages: { id, conversation_id, created_at, role, message }[] }` | List conversation messages |
| `POST` | `/modelconversation/{id}/message` | `id:integer, body: { message?, role?, tool_call_id?, content?, answer? }` | `201 { message: { id, conversation_id, created_at, role, message } }` | Post a user message |
| `GET` | `/modelconversation/{id}/stream` | `id:integer` | `200 SSE` | Stream conversation events (SSE) |
| `GET` | `/number` | — | `200 { numbers: { id, type, prefix, padding, next }[] }` | List number sequences |
| `PATCH` | `/number/{id}` | `id:integer, body: { prefix?, padding?, next? }` | `200 { number: { id, type, prefix, padding, next } }` | Update number sequence |
| `GET` | `/order` | — | `200 { orders: { id, number, type, entityId, date, createdAt }[] }` | List orders |
| `POST` | `/order` | `body: { number, date, lines: { amount, net, taxrate, sku?: string, name?, pu?, rebate?, comment? }[], entityId? }` | `201 { order: { id, number, type, entityId, date, createdAt, lines: { id, sku, name, pu, amount, net, rebate, taxrate, comment }[] } }` | Create order |
| `DELETE` | `/order/{id}` | `id:integer` | `204 void` | Delete order |
| `GET` | `/order/{id}` | `id:integer` | `200 { order: { id, number, type, entityId, date, createdAt, lines: { id, sku, name, pu, amount, net, rebate, taxrate, comment }[] } }` | Get order |
| `PATCH` | `/order/{id}` | `id:integer, body: { number?, date?, entityId?, lines?: { amount, net, taxrate, sku?: string, name?, pu?, rebate?, comment? }[] }` | `200 { order: { id, number, type, entityId, date, createdAt, lines: { id, sku, name, pu, amount, net, rebate, taxrate, comment }[] } }` | Update order |
| `GET` | `/posterminal` | — | `200 { posterminals: { id, name, pairingpin, categoryIds: integer[] }[] }` | List POS terminals |
| `PUT` | `/posterminal` | `body: { name: string }` | `200 { posterminal: { id, name, pairingpin, categoryIds: integer[] } }` | Create POS terminal |
| `DELETE` | `/posterminal/{id}` | `id:integer` | `204 void` | Delete POS terminal |
| `DELETE` | `/posterminal/{id}/all` | `id:integer` | `200 { id, categoryIds: integer[] }` | Disable all categories on terminal |
| `PUT` | `/posterminal/{id}/all` | `id:integer` | `200 { id, categoryIds: integer[] }` | Enable all categories on terminal |
| `DELETE` | `/posterminal/{id}/category/{categoryId}` | `id:integer, categoryId:integer` | `200 { id, categoryIds: integer[] }` | Disable category on terminal |
| `PUT` | `/posterminal/{id}/category/{categoryId}` | `id:integer, categoryId:integer` | `200 { id, categoryIds: integer[] }` | Enable category on terminal |
| `GET` | `/printer` | — | `200 { printers: { id, company_id, address, type, model, serial, sort, desc }[] }` | List printers |
| `POST` | `/printer` | `body: { address, type, model?, serial?, sort?, desc? }` | `201 { printer: { id, company_id, address, type, model, serial, sort, desc } }` | Create printer |
| `PUT` | `/printer/order` | `body: { printerIds: integer[] }` | `200 { printerIds: integer[] }` | Reorder printers |
| `DELETE` | `/printer/{id}` | `id:integer` | `204 void` | Delete printer |
| `GET` | `/printer/{id}` | `id:integer` | `200 { printer: { id, company_id, address, type, model, serial, sort, desc } }` | Get printer by ID |
| `PATCH` | `/printer/{id}` | `id:integer, body: { address?, type?, model?, serial?, sort?, desc? }` | `200 { printer: { id, company_id, address, type, model, serial, sort, desc } }` | Update printer (partial) |
| `PUT` | `/printer/{id}` | `id:integer, body: { address?, type?, model?, serial?, sort?, desc? }` | `200 { printer: { id, company_id, address, type, model, serial, sort, desc } }` | Update printer |
| `GET` | `/propertyname` | — | `200 { propertynames: { id, name, sort, exclusive }[] }` | List property names |
| `POST` | `/propertyname` | `body: { name, sort?, exclusive? }` | `201 { propertyname: { id, name, sort, exclusive } }` | Create property name |
| `PUT` | `/propertyname/order` | `body: { propertynameIds: integer[] }` | `200` | Reorder property names |
| `DELETE` | `/propertyname/{id}` | `id:integer` | `200` | Delete property name |
| `PATCH` | `/propertyname/{id}` | `id:integer, body: { name?, sort?, exclusive? }` | `200 { propertyname: { id, name, sort, exclusive } }` | Update property name |
| `GET` | `/public/{companyId}/articles` | `companyId:integer, query: categoryId?:integer, search?:string, limit?:integer, offset?:integer` | `200 { articles: { id, sku, name, slug, net, taxRate, gross, trackStock, brand, fullHash, thumbW, thumbH, thumbHash }[] }` | List public articles |
| `GET` | `/public/{companyId}/articles/{sku}` | `companyId:integer, sku:string` | `200 { article: { id, sku, name, slug, description, unitamount, weight, trackStock, unit, brand, price, prices: object[], categories: object[], photos: object[], eans: string[], isFather, fatherSku, variants: object[] } }` | Get public article detail |
| `GET` | `/public/{companyId}/categories` | `companyId:integer` | `200 { categories: { id, parentId, sort, name, slug, fullHash, thumbW, thumbH, thumbHash }[] }` | List public categories |
| `GET` | `/quote` | — | `200 { quotes: { id, number, type, entityId, date, createdAt }[] }` | List quotes |
| `POST` | `/quote` | `body: { number, date, lines: { amount, net, taxrate, sku?: string, name?, pu?, rebate?, comment? }[], entityId? }` | `201 { quote: { id, number, type, entityId, date, createdAt, lines: { id, sku, name, pu, amount, net, rebate, taxrate, comment }[] } }` | Create quote |
| `DELETE` | `/quote/{id}` | `id:integer` | `204 void` | Delete quote |
| `GET` | `/quote/{id}` | `id:integer` | `200 { quote: { id, number, type, entityId, date, createdAt, lines: { id, sku, name, pu, amount, net, rebate, taxrate, comment }[] } }` | Get quote |
| `PATCH` | `/quote/{id}` | `id:integer, body: { number?, date?, entityId?, lines?: { amount, net, taxrate, sku?: string, name?, pu?, rebate?, comment? }[] }` | `200 { quote: { id, number, type, entityId, date, createdAt, lines: { id, sku, name, pu, amount, net, rebate, taxrate, comment }[] } }` | Update quote |
| `POST` | `/serper/image` | `body: { url: string }` | `200 avif` | Crawl image from URL, crop white/transparency borders, and return AVIF |
| `POST` | `/serper/images` | `body: { q, gl?, hl?, num?, preferSource? }` | `200 SSE` | Search images via Serper.dev and stream WebP thumbnails (SSE) |
| `POST` | `/stock/adjust` | `body: { sku?: string, warehouseId?, amount?, text?, lines?: { sku: string, amount, warehouseId?, text? }[] }` | `201 { manifest, lines: object[], ledger: { id, manifestarticle_id, transaction_type, amount, transaction_text, hash_version, prev_hash, sku, created_at }[] }` | Adjust stock manually |
| `GET` | `/supplier` | — | `200 { suppliers: { id, name, createdAt, updatedAt }[] }` | List suppliers |
| `POST` | `/supplier` | `body: { name: string }` | `201 { supplier: { id, name, createdAt, updatedAt } }` | Create supplier |
| `DELETE` | `/supplier/{id}` | `id:integer` | `204 void` | Delete supplier |
| `PATCH` | `/supplier/{id}` | `id:integer, body: { name: string }` | `200 { supplier: { id, name, createdAt, updatedAt } }` | Update supplier |
| `GET` | `/supplier/{id}/articles` | `id:integer, query: skus?` | `200 { articles: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price, article }[] }` | List supplier articles by SKUs |
| `POST` | `/supplier/{id}/articles` | `id:integer, body?: { skus?: string[] }` | `200 { articles: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price, article }[] }` | Query supplier articles by SKUs (bulk) |
| `GET` | `/thumb/{fullHash}` | `fullHash:string` | `200 avif` | Thumb image by hash |
| `DELETE` | `/unit` | `query: si:string` | `204 void` | Delete unit |
| `GET` | `/unit` | — | `200 { units: { si, basesi, basesifactor, symbol, name }[] }` | List units |
| `PUT` | `/unit` | `body: { si, basesi, basesifactor, symbol, name }` | `200 { unit: { si, basesi, basesifactor, symbol, name } }` | Upsert unit |
| `GET` | `/v1/category` | `query: lastChangedCategory?:string, limit?:integer` | `200 object[]` | JTL-POS category synchronization |
| `GET` | `/v1/client` | `query: authCode:string, name?:string` | `200 { authCode, authToken, certificateFingerprint, certificateSerialNumber, mandantId, mandantName, mandantDatabase, serverFingerprint, name, serverTimestamp }` | POS discovery and pairing |
| `GET` | `/v1/init` | `query: lastChangedProduct?:integer, lastChangedCategory?:integer, lastChangedCustomer?:integer, lastChangedCustomerGroup?:integer, lastChangedCompositeProduct?:integer, lastChangedDeletedEntity?:integer` | `200 { version, product_count, category_count, customer_count, customerGroup_count, compositeProduct_count, configurationGroup_count, configurationItem_count, deletedEntity_count, max_orderId_count }` | POS sync initialization counts |
| `GET` | `/v1/product` | `query: lastChangedProduct?:string, limit?:integer` | `200 object[]` | JTL-POS product catalog synchronization |
| `GET` | `/vfs/{*path}` | `path:string, query: download?:boolean` | `200 string` | Get a virtual filesystem file |
| `GET` | `/warehouse` | — | `200 { warehouses: { id, name, sort }[] }` | List warehouses |
| `POST` | `/warehouse` | `body: { name, sort? }` | `201 { warehouse: { id, name, sort } }` | Create warehouse |
| `PUT` | `/warehouse/order` | `body: { warehouseIds: integer[] }` | `200 { warehouseIds: integer[] }` | Reorder warehouses |
| `DELETE` | `/warehouse/{id}` | `id:integer` | `204 void` | Delete warehouse |
| `GET` | `/warehouse/{id}` | `id:integer` | `200 { warehouse: { id, name, sort } }` | Get warehouse by ID |
| `PATCH` | `/warehouse/{id}` | `id:integer, body: { name?, sort? }` | `200 { warehouse: { id, name, sort } }` | Update warehouse (partial) |
| `PUT` | `/warehouse/{id}` | `id:integer, body: { name?, sort? }` | `200 { warehouse: { id, name, sort } }` | Update warehouse |
### Routes
#### Create article in category — `POST /article`
- Params: `body: { categoryId: integer, name: string, track_stock?: boolean }`
- Returns: `201 { article: { id: integer, categoryId: integer, name: string, sku: string, track_stock: boolean } }`
#### Export articles as ZIP — `GET /article/export.zip`
- Params: `query: categoryId?: integer`
- Returns: `200 zip`
#### Delete article by SKU — `DELETE /article/{sku}`
- Params: `sku: string, query: cascade?: boolean`
- Returns: `204 void`
#### Get article by SKU — `GET /article/{sku}`
- Params: `sku: string`
- Returns: `200 { article: { id: integer, sku: string, name: string, slug: string, track_stock: boolean, unitamount: number, weight: number, unit: object, brand: object, categoryIds: integer[], photos: { sort: integer, fullHash: string, fullW: integer, fullH: integer, fullSize: integer, thumbW: integer, thumbH: integer, thumbHash: string }[], eans: string[], prices: { minmultiplier: number, net: number, taxRate: number, customergroupId: integer }[], suppliers: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number } }[] } }`
#### Update article by SKU — `PATCH /article/{sku}`
- Params: `sku: string, body: { name?: string, unitamount?: number, unitSi?: string, track_stock?: boolean }`
- Returns: `200 { article: { id: integer, sku: string, name: string, slug: string, track_stock: boolean, unitamount: number, weight: number, unit: object, brand: object, categoryIds: integer[], photos: { sort: integer, fullHash: string, fullW: integer, fullH: integer, fullSize: integer, thumbW: integer, thumbH: integer, thumbHash: string }[], eans: string[], prices: { minmultiplier: number, net: number, taxRate: number, customergroupId: integer }[], suppliers: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number } }[] } }`
#### Get Stückliste (bundle items) for an article — `GET /article/{sku}/articlelist`
- Params: `sku: string`
- Returns: `200 { items: { id: integer, articleId: integer, sku: string, name: string, count: integer, sort: integer }[] }`
#### Set Stückliste (bundle items) for an article — `PUT /article/{sku}/articlelist`
- Params: `sku: string, body: { items: { articleId?: integer, sku?: string, count?: integer, sort?: integer }[] }`
- Returns: `200 { items: object[] }`
#### List article attribute values — `GET /article/{sku}/attributevalue`
- Params: `sku: string`
- Returns: `200 { attributevalues: { id: integer, articleId: integer, attributeId: integer, attributeName: string, exclusive: boolean, attributeValueId: integer, value: string, sort: integer }[] }`
#### Bulk set article attribute values — `PUT /article/{sku}/attributevalue`
- Params: `sku: string, body: integer[]`
- Returns: `200 { attributevalues: { id: integer, articleId: integer, attributeId: integer, attributeName: string, exclusive: boolean, attributeValueId: integer, value: string, sort: integer }[] }`
#### Set or clear article brand by SKU — `PUT /article/{sku}/brand`
- Params: `sku: string, body: { brandId: integer }`
- Returns: `200 { article: { id: integer, sku: string, name: string, slug: string, track_stock: boolean, unitamount: number, weight: number, unit: object, brand: object, categoryIds: integer[], photos: { sort: integer, fullHash: string, fullW: integer, fullH: integer, fullSize: integer, thumbW: integer, thumbH: integer, thumbHash: string }[], eans: string[], prices: { minmultiplier: number, net: number, taxRate: number, customergroupId: integer }[], suppliers: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number } }[] } }`
#### Replace article categories by SKU — `PUT /article/{sku}/categories`
- Params: `sku: string, body: { categoryIds: integer[] }`
- Returns: `200 { article: { id: integer, sku: string, name: string, slug: string, track_stock: boolean, unitamount: number, weight: number, unit: object, brand: object, categoryIds: integer[], photos: { sort: integer, fullHash: string, fullW: integer, fullH: integer, fullSize: integer, thumbW: integer, thumbH: integer, thumbHash: string }[], eans: string[], prices: { minmultiplier: number, net: number, taxRate: number, customergroupId: integer }[], suppliers: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number } }[] } }`
#### List child articles of a father article — `GET /article/{sku}/children`
- Params: `sku: string`
- Returns: `200 { children: { id: integer, sku: string, name: string, fathersort: integer, attributeValueId: integer, attributeValue: string }[] }`
#### Create and attach a new child article to a father article — `POST /article/{sku}/children`
- Params: `sku: string, body: { attributeValueId?: integer, value?: string, name?: string }`
- Returns: `201 { article: { id: integer, categoryId: integer, name: string, sku: string, track_stock: boolean } }`
#### Attach an existing article as a child to a father article — `PUT /article/{sku}/children`
- Params: `sku: string, body: { sku: string, attributeValueId?: integer, value?: string, reparent?: boolean }`
- Returns: `200 { article: { id: integer, categoryId: integer, name: string, sku: string, track_stock: boolean }, children: object[] }`
#### Remove a child article from a father article — `DELETE /article/{sku}/children/{childSku}`
- Params: `sku: string, childSku: string, query: deleteArticle?: boolean`
- Returns: `200 { success: boolean, deleted: boolean }`
#### Replace article EANs by SKU — `PUT /article/{sku}/eans`
- Params: `sku: string, body: { eans: string[] }`
- Returns: `200 { article: { id: integer, sku: string, name: string, slug: string, track_stock: boolean, unitamount: number, weight: number, unit: object, brand: object, categoryIds: integer[], photos: { sort: integer, fullHash: string, fullW: integer, fullH: integer, fullSize: integer, thumbW: integer, thumbH: integer, thumbHash: string }[], eans: string[], prices: { minmultiplier: number, net: number, taxRate: number, customergroupId: integer }[], suppliers: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number } }[] } }`
#### Toggle father mode for an article — `POST /article/{sku}/father`
- Params: `sku: string, body: { isFather: boolean, attributeNameId?: integer }`
- Returns: `200 { article: { id: integer, categoryId: integer, name: string, sku: string, track_stock: boolean } }`
#### Get article history by SKU — `GET /article/{sku}/history`
- Params: `sku: string, query: limit?: integer`
- Returns: `200 { history: { id: integer, date: string, text: string }[], truncated: boolean }`
#### Add article image — `POST /article/{sku}/image`
- Params: `sku: string, image/avif`
- Returns: `201 { image: { picId: integer, sort: integer, full: { w: integer, h: integer, size: integer }, thumb: { w: integer, h: integer }, hash: string, thumbHash: string } }`
#### Delete article image — `DELETE /article/{sku}/image/{fullHash}`
- Params: `sku: string, fullHash: string`
- Returns: `204 void`
#### Reorder article images — `PUT /article/{sku}/images/order`
- Params: `sku: string, body: { fullHashes: string[] }`
- Returns: `200 { fullHashes: string[] }`
#### Get options list for an article — `GET /article/{sku}/optionslist`
- Params: `sku: string`
- Returns: `200 { options: { id: integer, articleId: integer, sku: string, name: string, count: integer, sort: integer, mandated: boolean }[] }`
#### Set options list for an article — `PUT /article/{sku}/optionslist`
- Params: `sku: string, body: { options: { articleId?: integer, sku?: string, count?: integer, sort?: integer, mandated?: boolean }[] }`
- Returns: `200 { options: object[] }`
#### Replace POS prices by SKU — `PUT /article/{sku}/prices`
- Params: `sku: string, body: { prices: { price: number, tax: number, minmultiplier?: number }[] }`
- Returns: `200 { article: { id: integer, sku: string, name: string, slug: string, track_stock: boolean, unitamount: number, weight: number, unit: object, brand: object, categoryIds: integer[], photos: { sort: integer, fullHash: string, fullW: integer, fullH: integer, fullSize: integer, thumbW: integer, thumbH: integer, thumbHash: string }[], eans: string[], prices: { minmultiplier: number, net: number, taxRate: number, customergroupId: integer }[], suppliers: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number } }[] } }`
#### Print article label — `POST /article/{sku}/print`
- Params: `sku: string, body: { templateId: integer, printerId: integer, quantity: integer }`
- Returns: `200`
#### List article properties — `GET /article/{sku}/property`
- Params: `sku: string`
- Returns: `200 { properties: { id: integer, articleId: integer, propertyId: integer, name: string, exclusive: boolean, value: string, sort: integer }[] }`
#### Bulk set article properties — `PUT /article/{sku}/property`
- Params: `sku: string, body: { properties: { propertyId: integer, value: string, sort?: integer }[] }`
- Returns: `200 { properties: { id: integer, articleId: integer, propertyId: integer, name: string, exclusive: boolean, value: string, sort: integer }[] }`
#### Delete article property — `DELETE /article/{sku}/property/{propertyId}`
- Params: `sku: string, propertyId: integer`
- Returns: `200`
#### List article suppliers — `GET /article/{sku}/supplier`
- Params: `sku: string`
- Returns: `200 { suppliers: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number } }[] }`
#### Assign supplier to article — `POST /article/{sku}/supplier`
- Params: `sku: string, body: { entityId: integer, sku?: string, pu?: number, stock?: number, sort?: integer, netPrice?: number, taxId?: integer, taxRate?: number }`
- Returns: `201 { supplier: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number } } }`
#### Reorder article suppliers — `PUT /article/{sku}/supplier/order`
- Params: `sku: string, body: { ids: integer[] }`
- Returns: `200 { ids: integer[] }`
#### Remove supplier assignment from article — `DELETE /article/{sku}/supplier/{id}`
- Params: `sku: string, id: integer`
- Returns: `204 void`
#### Update article supplier assignment — `PATCH /article/{sku}/supplier/{id}`
- Params: `sku: string, id: integer, body: { sku?: string, pu?: number, stock?: number, sort?: integer, netPrice?: number, taxId?: integer, taxRate?: number }`
- Returns: `200 { supplier: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number } } }`
#### Set article track_stock flag by SKU — `PUT /article/{sku}/track_stock`
- Params: `sku: string, body: { track_stock: boolean }`
- Returns: `200 { article: { id: integer, sku: string, name: string, slug: string, track_stock: boolean, unitamount: number, weight: number, unit: object, brand: object, categoryIds: integer[], photos: { sort: integer, fullHash: string, fullW: integer, fullH: integer, fullSize: integer, thumbW: integer, thumbH: integer, thumbHash: string }[], eans: string[], prices: { minmultiplier: number, net: number, taxRate: number, customergroupId: integer }[], suppliers: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number } }[] } }`
#### Set article weight by SKU — `PUT /article/{sku}/weight`
- Params: `sku: string, body: { weight: number }`
- Returns: `200 { article: { id: integer, sku: string, name: string, slug: string, track_stock: boolean, unitamount: number, weight: number, unit: object, brand: object, categoryIds: integer[], photos: { sort: integer, fullHash: string, fullW: integer, fullH: integer, fullSize: integer, thumbW: integer, thumbH: integer, thumbHash: string }[], eans: string[], prices: { minmultiplier: number, net: number, taxRate: number, customergroupId: integer }[], suppliers: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number } }[] } }`
#### List article search index — `GET /articleIndex`
- Params: `query: windowSize: integer`
- Returns: `200 { articles: { id: integer, sku: string, name: string, eans: string[], categoryIds: integer[] }[], truncated: boolean }`
#### List attribute names — `GET /attributename`
_none_
- Returns: `200 { attributenames: { id: integer, name: string, sort: integer, exclusive: boolean, values: { id: integer, attributeId: integer, value: string, sort: integer }[] }[] }`
#### Create attribute name — `POST /attributename`
- Params: `body: { name: string, sort?: integer, exclusive?: boolean }`
- Returns: `201 { attributename: { id: integer, name: string, sort: integer, exclusive: boolean, values: { id: integer, attributeId: integer, value: string, sort: integer }[] } }`
#### Reorder attribute names — `PUT /attributename/order`
- Params: `body: { attributenameIds: integer[] }`
- Returns: `200`
#### List values for an attribute — `GET /attributename/{attributeId}/value`
- Params: `attributeId: integer`
- Returns: `200 { values: { id: integer, attributeId: integer, value: string, sort: integer }[] }`
#### Create value for an attribute — `POST /attributename/{attributeId}/value`
- Params: `attributeId: integer, body: { value: string, sort?: integer }`
- Returns: `201 { attributevalue: { id: integer, attributeId: integer, value: string, sort: integer } }`
#### Reorder values of an attribute — `PUT /attributename/{attributeId}/value/order`
- Params: `attributeId: integer, body: { attributevalueIds: integer[] }`
- Returns: `200`
#### Delete attribute name — `DELETE /attributename/{id}`
- Params: `id: integer`
- Returns: `200`
#### Update attribute name — `PATCH /attributename/{id}`
- Params: `id: integer, body: { name?: string, sort?: integer, exclusive?: boolean }`
- Returns: `200 { attributename: { id: integer, name: string, sort: integer, exclusive: boolean, values: { id: integer, attributeId: integer, value: string, sort: integer }[] } }`
#### Delete attribute value — `DELETE /attributevalue/{id}`
- Params: `id: integer`
- Returns: `200`
#### Update attribute value — `PATCH /attributevalue/{id}`
- Params: `id: integer, body: { value?: string, sort?: integer }`
- Returns: `200 { attributevalue: { id: integer, attributeId: integer, value: string, sort: integer } }`
#### Login with Google ID token — `POST /auth/login`
- Params: `body: { idToken: string }`
- Returns: `200 { message: string, user: { id: integer, email: string, selectedCompanyId: integer, picture: string } }`
#### Logout — `POST /auth/logout`
_none_
- Returns: `200 { message: string }`
#### Current user — `GET /auth/me`
_none_
- Returns: `200 { user: { id: integer, email: string, selectedCompanyId: integer, picture: string }, googleClientId: string }`
#### Set selected company — `PUT /auth/selected-company`
- Params: `body: { companyId: integer }`
- Returns: `200 { user: { id: integer, email: string, selectedCompanyId: integer, picture: string } }`
#### List brands — `GET /brand`
_none_
- Returns: `200 { brands: { id: integer, name: string, gsprpinfo: string, pics: { id: integer, sort: integer, fullHash: string, thumbW: integer, thumbH: integer, thumbHash: string }[] }[] }`
#### Upsert brand — `PUT /brand`
- Params: `body: { name: string, gsprpinfo?: string }`
- Returns: `200 { brand: { id: integer, name: string, gsprpinfo: string, pics: { id: integer, sort: integer, fullHash: string, thumbW: integer, thumbH: integer, thumbHash: string }[] } }`
#### Delete brand — `DELETE /brand/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Create category — `POST /category`
- Params: `body: { parentId: integer, name: string }`
- Returns: `201 { category: { id: integer, parentId: integer, sort: integer, name: string } }`
#### Export categories as ZIP — `GET /category/export.zip`
_none_
- Returns: `200 zip`
#### Reorder sibling categories — `PUT /category/order`
- Params: `body: { parentId: integer, categoryIds: integer[] }`
- Returns: `200 { categoryIds: integer[] }`
#### Category tree — `GET /category/tree`
_none_
- Returns: `200 { languageId: integer, tree: object[], articles: object[] }`
#### Delete category — `DELETE /category/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Update category (rename or move) — `PATCH /category/{id}`
- Params: `id: integer, body: { name?: string, parentId?: integer }`
- Returns: `200 { category: { id: integer, name: string, slug: string, parentId: integer, sort: integer } }`
#### Articles in category — `GET /category/{id}/articles`
- Params: `id: integer`
- Returns: `200 { articles: { id: integer, sku: string, name: string, slug: string, net: number, taxRate: number, track_stock: boolean, optionsCount: integer, articleListCount: integer, childCount: integer, fullHash: string, thumbW: integer, thumbH: integer, thumbHash: string, brand: object }[] }`
#### List category attribute values — `GET /category/{id}/attributevalue`
- Params: `id: integer`
- Returns: `200 { attributevalues: { id: integer, categoryId: integer, attributeId: integer, attributeName: string, exclusive: boolean, attributeValueId: integer, value: string, sort: integer }[] }`
#### Bulk set category attribute values — `PUT /category/{id}/attributevalue`
- Params: `id: integer, body: integer[]`
- Returns: `200 { attributevalues: { id: integer, categoryId: integer, attributeId: integer, attributeName: string, exclusive: boolean, attributeValueId: integer, value: string, sort: integer }[] }`
#### Delete category image — `DELETE /category/{id}/image`
- Params: `id: integer`
- Returns: `200 { category: { id: integer, thumbW: integer, thumbH: integer, thumbHash: string } }`
#### Add category image — `POST /category/{id}/image`
- Params: `id: integer, image/avif`
- Returns: `201 { category: { id: integer, thumbW: integer, thumbH: integer, thumbHash: string } }`
#### List category properties — `GET /category/{id}/property`
- Params: `id: integer`
- Returns: `200 { properties: { id: integer, categoryId: integer, propertyId: integer, name: string, exclusive: boolean, value: string, sort: integer }[] }`
#### Bulk set category properties — `PUT /category/{id}/property`
- Params: `id: integer, body: { properties: { propertyId: integer, value: string, sort?: integer }[] }`
- Returns: `200 { properties: { id: integer, categoryId: integer, propertyId: integer, name: string, exclusive: boolean, value: string, sort: integer }[] }`
#### Delete category property — `DELETE /category/{id}/property/{propertyId}`
- Params: `id: integer, propertyId: integer`
- Returns: `200`
#### List companies — `GET /company`
_none_
- Returns: `200 { companies: { id: integer, iso639: string, name: string, taxrate: number, reducedtaxrate: number }[] }`
#### Create company — `POST /company`
- Params: `body: { iso639: string, name: string, taxrate: number, reducedtaxrate: number }`
- Returns: `201 { company: { id: integer, iso639: string, name: string, taxrate: number, reducedtaxrate: number }, user: { id: integer, email: string, selectedCompanyId: integer, picture: string } }`
#### Get company history — `GET /company/history`
- Params: `query: limit?: integer`
- Returns: `200 { history: { id: integer, companyuserId: integer, date: string, text: string }[], truncated: boolean }`
#### Add company history entry — `POST /company/history`
- Params: `body: { text: string }`
- Returns: `201 { history: { id: integer, companyuserId: integer, date: string, text: string } }`
#### List company settings — `GET /company/setting`
_none_
- Returns: `200 { settings: { key: string, value: string }[] }`
#### Get company setting by key — `GET /company/setting/{key}`
- Params: `key: string`
- Returns: `200 { setting: { key: string, value: string } }`
#### Upsert company setting — `PUT /company/setting/{key}`
- Params: `key: string, body: { value: string, frontend?: boolean }`
- Returns: `200 { setting: { key: string, value: string } }`
#### Delete company — `DELETE /company/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Update company — `PUT /company/{id}`
- Params: `id: integer, body: { iso639: string, name: string, taxrate: number, reducedtaxrate: number }`
- Returns: `200 { company: { id: integer, iso639: string, name: string, taxrate: number, reducedtaxrate: number } }`
#### List customer groups — `GET /customergroup`
_none_
- Returns: `200 { customergroups: { id: integer, name: string, sort: integer, editable: boolean }[] }`
#### Create customer group — `POST /customergroup`
- Params: `body: { name: string }`
- Returns: `201 { customergroup: { id: integer, name: string, sort: integer } }`
#### Reorder customer groups — `PUT /customergroup/order`
- Params: `body: { customergroupIds: integer[] }`
- Returns: `200 { customergroupIds: integer[] }`
#### Delete customer group — `DELETE /customergroup/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Update customer group — `PATCH /customergroup/{id}`
- Params: `id: integer, body: { name: string }`
- Returns: `200 { customergroup: { id: integer, name: string, sort: integer } }`
#### List deliveries — `GET /delivery`
_none_
- Returns: `200 { deliveries: { id: integer, number: string, type: string, supplierId: integer, externalNumber: string, date: string, createdAt: string, ledger: { totalPositions: integer, completelyOnLedgerPositions: integer } }[] }`
#### Create delivery — `POST /delivery`
- Params: `body: { externalNumber: string, date: string, lines: { amount: number, net: number, taxrate: number, sku?: string, name?: string, pu?: number, rebate?: number, comment?: string }[], supplierId?: integer, files?: { mimetype: string, name: string, content: string, sort?: integer, size?: integer, hash?: string, created?: string, modified?: string, meta?: object }[] }`
- Returns: `201 { delivery: { id: integer, number: string, type: string, supplierId: integer, externalNumber: string, date: string, createdAt: string, ledger: { totalPositions: integer, completelyOnLedgerPositions: integer }, lines: { id: integer, sku: string, name: string, pu: number, amount: number, net: number, rebate: number, taxrate: number, comment: string }[], files: { id: integer, manifestId: integer, fileId: integer, sort: integer, hash: string, mimetype: string, name: string, size: integer, created: string, modified: string, thumbavif: string, thumbx: integer, thumby: integer, meta: object }[] } }`
#### Parse document (SSE) — `POST /delivery/parse`
- Params: `form: { file: string }`
- Returns: `200 SSE`
#### Delete delivery — `DELETE /delivery/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Get delivery — `GET /delivery/{id}`
- Params: `id: integer`
- Returns: `200 { delivery: { id: integer, number: string, type: string, supplierId: integer, externalNumber: string, date: string, createdAt: string, ledger: { totalPositions: integer, completelyOnLedgerPositions: integer }, lines: { id: integer, sku: string, name: string, pu: number, amount: number, net: number, rebate: number, taxrate: number, comment: string }[], files: { id: integer, manifestId: integer, fileId: integer, sort: integer, hash: string, mimetype: string, name: string, size: integer, created: string, modified: string, thumbavif: string, thumbx: integer, thumby: integer, meta: object }[] } }`
#### Update delivery — `PATCH /delivery/{id}`
- Params: `id: integer, body: { externalNumber?: string, date?: string, supplierId?: integer, lines?: { amount: number, net: number, taxrate: number, sku?: string, name?: string, pu?: number, rebate?: number, comment?: string }[], files?: { mimetype: string, name: string, content: string, sort?: integer, size?: integer, hash?: string, created?: string, modified?: string, meta?: object }[] }`
- Returns: `200 { delivery: { id: integer, number: string, type: string, supplierId: integer, externalNumber: string, date: string, createdAt: string, ledger: { totalPositions: integer, completelyOnLedgerPositions: integer }, lines: { id: integer, sku: string, name: string, pu: number, amount: number, net: number, rebate: number, taxrate: number, comment: string }[], files: { id: integer, manifestId: integer, fileId: integer, sort: integer, hash: string, mimetype: string, name: string, size: integer, created: string, modified: string, thumbavif: string, thumbx: integer, thumby: integer, meta: object }[] } }`
#### Get delivery attachment file content — `GET /delivery/{id}/file/{fileId}`
- Params: `id: integer, fileId: integer, query: download?: boolean`
- Returns: `200 string`
#### List entities — `GET /entity`
- Params: `query: customergroupId?: integer, role?: string`
- Returns: `200 { entities: { id: integer, customergroupId: integer, firstName: string, name: string, number: string, createdAt: string, updatedAt: string }[] }`
#### Create entity — `POST /entity`
- Params: `body: { customergroupId: integer, name: string, firstName?: string, number?: string }`
- Returns: `201 { entity: { id: integer, customergroupId: integer, firstName: string, name: string, number: string, createdAt: string, updatedAt: string } }`
#### Peek next customer number — `GET /entity/next-number`
_none_
- Returns: `200 { number: string }`
#### List entity addresses — `GET /entity/{entityId}/address`
- Params: `entityId: integer`
- Returns: `200 { addresses: { id: integer, entityId: integer, firstName: string, name: string, street: string, streetNumber: string, zip: string, city: string, county: string, addressType: string }[] }`
#### Create entity address — `POST /entity/{entityId}/address`
- Params: `entityId: integer, body: { addressType: string, firstName?: string, name?: string, street?: string, streetNumber?: string, zip?: string, city?: string, county?: string }`
- Returns: `201 { address: { id: integer, entityId: integer, firstName: string, name: string, street: string, streetNumber: string, zip: string, city: string, county: string, addressType: string } }`
#### Delete entity address — `DELETE /entity/{entityId}/address/{id}`
- Params: `entityId: integer, id: integer`
- Returns: `204 void`
#### Update entity address — `PATCH /entity/{entityId}/address/{id}`
- Params: `entityId: integer, id: integer, body: { addressType?: string, firstName?: string, name?: string, street?: string, streetNumber?: string, zip?: string, city?: string, county?: string }`
- Returns: `200 { address: { id: integer, entityId: integer, firstName: string, name: string, street: string, streetNumber: string, zip: string, city: string, county: string, addressType: string } }`
#### List entity contacts — `GET /entity/{entityId}/contact`
- Params: `entityId: integer`
- Returns: `200 { contacts: { id: integer, entityId: integer, contactType: string, contact: string }[] }`
#### Create entity contact — `POST /entity/{entityId}/contact`
- Params: `entityId: integer, body: { contactType: string, contact: string }`
- Returns: `201 { contact: { id: integer, entityId: integer, contactType: string, contact: string } }`
#### Delete entity contact — `DELETE /entity/{entityId}/contact/{id}`
- Params: `entityId: integer, id: integer`
- Returns: `204 void`
#### Update entity contact — `PATCH /entity/{entityId}/contact/{id}`
- Params: `entityId: integer, id: integer, body: { contactType?: string, contact?: string }`
- Returns: `200 { contact: { id: integer, entityId: integer, contactType: string, contact: string } }`
#### Delete entity — `DELETE /entity/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Get entity — `GET /entity/{id}`
- Params: `id: integer`
- Returns: `200 { entity: { id: integer, customergroupId: integer, firstName: string, name: string, number: string, createdAt: string, updatedAt: string } }`
#### Update entity — `PATCH /entity/{id}`
- Params: `id: integer, body: { name?: string, firstName?: string, number?: string }`
- Returns: `200 { entity: { id: integer, customergroupId: integer, firstName: string, name: string, number: string, createdAt: string, updatedAt: string } }`
#### Subscribe to update signals (SSE) — `GET /events`
_none_
- Returns: `200 SSE`
#### Database health check — `GET /health`
_none_
- Returns: `200 { ok: boolean }`
#### Full image by hash — `GET /image/{fullHash}`
- Params: `fullHash: string`
- Returns: `200 avif`
#### List label templates — `GET /labeltemplate`
_none_
- Returns: `200 { labeltemplates: { id: integer, name: string, width: number, height: number, dpi: integer, type: string, content: object, thumb: string }[] }`
#### Create label template — `POST /labeltemplate`
- Params: `body: { name: string, width: number, height: number, dpi: integer, type: string, content: object }`
- Returns: `201 { labeltemplate: { id: integer, name: string, width: number, height: number, dpi: integer, type: string, content: object, thumb: string } }`
#### Delete label template — `DELETE /labeltemplate/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Get label template by ID — `GET /labeltemplate/{id}`
- Params: `id: integer`
- Returns: `200 { labeltemplate: { id: integer, name: string, width: number, height: number, dpi: integer, type: string, content: object, thumb: string } }`
#### Update label template (partial) — `PATCH /labeltemplate/{id}`
- Params: `id: integer, body: { name?: string, width?: number, height?: number, dpi?: integer, type?: string, content?: object }`
- Returns: `200 { labeltemplate: { id: integer, name: string, width: number, height: number, dpi: integer, type: string, content: object, thumb: string } }`
#### Update label template — `PUT /labeltemplate/{id}`
- Params: `id: integer, body: { name?: string, width?: number, height?: number, dpi?: integer, type?: string, content?: object }`
- Returns: `200 { labeltemplate: { id: integer, name: string, width: number, height: number, dpi: integer, type: string, content: object, thumb: string } }`
#### Query ledger by manifest article ID or SKU — `GET /ledger`
- Params: `query: manifestarticle_id?: integer, sku?: string, transaction_type?: string`
- Returns: `200 { ledger: { id: integer, manifestarticle_id: integer, transaction_type: string, amount: number, transaction_text: string, hash_version: integer, prev_hash: string, sku: string, created_at: string }[] }`
#### Add ledger entry — `POST /ledger`
- Params: `body: { manifestarticle_id: integer, transaction_type: string, amount: number, transaction_text: string }`
- Returns: `201 { ledger: { id: integer, manifestarticle_id: integer, transaction_type: string, amount: number, transaction_text: string, hash_version: integer, prev_hash: string, sku: string, created_at: string } }`
#### Query ledger by manifest article ID — `GET /ledger/manifestarticle/{manifestarticleId}`
- Params: `manifestarticleId: integer, query: transaction_type?: string`
- Returns: `200 { ledger: { id: integer, manifestarticle_id: integer, transaction_type: string, amount: number, transaction_text: string, hash_version: integer, prev_hash: string, sku: string, created_at: string }[] }`
#### Query ledger by article SKU — `GET /ledger/sku/{sku}`
- Params: `sku: string, query: transaction_type?: string`
- Returns: `200 { ledger: { id: integer, manifestarticle_id: integer, transaction_type: string, amount: number, transaction_text: string, hash_version: integer, prev_hash: string, sku: string, created_at: string }[] }`
#### List conversations — `GET /modelconversation`
_none_
- Returns: `200 { conversations: { id: integer, companyuser_id: integer, provider: string, model: string, created_at: string, updated_at: string, state: string }[] }`
#### Create conversation — `POST /modelconversation`
- Params: `body: { provider: string, model: string }`
- Returns: `201 { conversation: { id: integer, companyuser_id: integer, provider: string, model: string, created_at: string, updated_at: string, state: string } }`
#### Delete conversation — `DELETE /modelconversation/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Get conversation — `GET /modelconversation/{id}`
- Params: `id: integer`
- Returns: `200 { conversation: { id: integer, companyuser_id: integer, provider: string, model: string, created_at: string, updated_at: string, state: string } }`
#### List conversation messages — `GET /modelconversation/{id}/message`
- Params: `id: integer`
- Returns: `200 { messages: { id: integer, conversation_id: integer, created_at: string, role: string, message: string }[] }`
#### Post a user message — `POST /modelconversation/{id}/message`
- Params: `id: integer, body: { message?: string, role?: string, tool_call_id?: string, content?: any, answer?: any }`
- Returns: `201 { message: { id: integer, conversation_id: integer, created_at: string, role: string, message: string } }`
#### Stream conversation events (SSE) — `GET /modelconversation/{id}/stream`
- Params: `id: integer`
- Returns: `200 SSE`
#### List number sequences — `GET /number`
_none_
- Returns: `200 { numbers: { id: integer, type: string, prefix: string, padding: integer, next: integer }[] }`
#### Update number sequence — `PATCH /number/{id}`
- Params: `id: integer, body: { prefix?: string, padding?: integer, next?: integer }`
- Returns: `200 { number: { id: integer, type: string, prefix: string, padding: integer, next: integer } }`
#### List orders — `GET /order`
_none_
- Returns: `200 { orders: { id: integer, number: string, type: string, entityId: integer, date: string, createdAt: string }[] }`
#### Create order — `POST /order`
- Params: `body: { number: string, date: string, lines: { amount: number, net: number, taxrate: number, sku?: string, name?: string, pu?: number, rebate?: number, comment?: string }[], entityId?: integer }`
- Returns: `201 { order: { id: integer, number: string, type: string, entityId: integer, date: string, createdAt: string, lines: { id: integer, sku: string, name: string, pu: number, amount: number, net: number, rebate: number, taxrate: number, comment: string }[] } }`
#### Delete order — `DELETE /order/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Get order — `GET /order/{id}`
- Params: `id: integer`
- Returns: `200 { order: { id: integer, number: string, type: string, entityId: integer, date: string, createdAt: string, lines: { id: integer, sku: string, name: string, pu: number, amount: number, net: number, rebate: number, taxrate: number, comment: string }[] } }`
#### Update order — `PATCH /order/{id}`
- Params: `id: integer, body: { number?: string, date?: string, entityId?: integer, lines?: { amount: number, net: number, taxrate: number, sku?: string, name?: string, pu?: number, rebate?: number, comment?: string }[] }`
- Returns: `200 { order: { id: integer, number: string, type: string, entityId: integer, date: string, createdAt: string, lines: { id: integer, sku: string, name: string, pu: number, amount: number, net: number, rebate: number, taxrate: number, comment: string }[] } }`
#### List POS terminals — `GET /posterminal`
_none_
- Returns: `200 { posterminals: { id: integer, name: string, pairingpin: string, categoryIds: integer[] }[] }`
#### Create POS terminal — `PUT /posterminal`
- Params: `body: { name: string }`
- Returns: `200 { posterminal: { id: integer, name: string, pairingpin: string, categoryIds: integer[] } }`
#### Delete POS terminal — `DELETE /posterminal/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Disable all categories on terminal — `DELETE /posterminal/{id}/all`
- Params: `id: integer`
- Returns: `200 { id: integer, categoryIds: integer[] }`
#### Enable all categories on terminal — `PUT /posterminal/{id}/all`
- Params: `id: integer`
- Returns: `200 { id: integer, categoryIds: integer[] }`
#### Disable category on terminal — `DELETE /posterminal/{id}/category/{categoryId}`
- Params: `id: integer, categoryId: integer`
- Returns: `200 { id: integer, categoryIds: integer[] }`
#### Enable category on terminal — `PUT /posterminal/{id}/category/{categoryId}`
- Params: `id: integer, categoryId: integer`
- Returns: `200 { id: integer, categoryIds: integer[] }`
#### List printers — `GET /printer`
_none_
- Returns: `200 { printers: { id: integer, company_id: integer, address: string, type: string, model: string, serial: string, sort: integer, desc: string }[] }`
#### Create printer — `POST /printer`
- Params: `body: { address: string, type: string, model?: string, serial?: string, sort?: integer, desc?: string }`
- Returns: `201 { printer: { id: integer, company_id: integer, address: string, type: string, model: string, serial: string, sort: integer, desc: string } }`
#### Reorder printers — `PUT /printer/order`
- Params: `body: { printerIds: integer[] }`
- Returns: `200 { printerIds: integer[] }`
#### Delete printer — `DELETE /printer/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Get printer by ID — `GET /printer/{id}`
- Params: `id: integer`
- Returns: `200 { printer: { id: integer, company_id: integer, address: string, type: string, model: string, serial: string, sort: integer, desc: string } }`
#### Update printer (partial) — `PATCH /printer/{id}`
- Params: `id: integer, body: { address?: string, type?: string, model?: string, serial?: string, sort?: integer, desc?: string }`
- Returns: `200 { printer: { id: integer, company_id: integer, address: string, type: string, model: string, serial: string, sort: integer, desc: string } }`
#### Update printer — `PUT /printer/{id}`
- Params: `id: integer, body: { address?: string, type?: string, model?: string, serial?: string, sort?: integer, desc?: string }`
- Returns: `200 { printer: { id: integer, company_id: integer, address: string, type: string, model: string, serial: string, sort: integer, desc: string } }`
#### List property names — `GET /propertyname`
_none_
- Returns: `200 { propertynames: { id: integer, name: string, sort: integer, exclusive: boolean }[] }`
#### Create property name — `POST /propertyname`
- Params: `body: { name: string, sort?: integer, exclusive?: boolean }`
- Returns: `201 { propertyname: { id: integer, name: string, sort: integer, exclusive: boolean } }`
#### Reorder property names — `PUT /propertyname/order`
- Params: `body: { propertynameIds: integer[] }`
- Returns: `200`
#### Delete property name — `DELETE /propertyname/{id}`
- Params: `id: integer`
- Returns: `200`
#### Update property name — `PATCH /propertyname/{id}`
- Params: `id: integer, body: { name?: string, sort?: integer, exclusive?: boolean }`
- Returns: `200 { propertyname: { id: integer, name: string, sort: integer, exclusive: boolean } }`
#### List public articles — `GET /public/{companyId}/articles`
- Params: `companyId: integer, query: categoryId?: integer, search?: string, limit?: integer, offset?: integer`
- Returns: `200 { articles: { id: integer, sku: string, name: string, slug: string, net: number, taxRate: number, gross: number, trackStock: boolean, brand: { id: integer, name: string }, fullHash: string, thumbW: integer, thumbH: integer, thumbHash: string }[] }`
#### Get public article detail — `GET /public/{companyId}/articles/{sku}`
- Params: `companyId: integer, sku: string`
- Returns: `200 { article: { id: integer, sku: string, name: string, slug: string, description: string, unitamount: number, weight: number, trackStock: boolean, unit: object, brand: object, price: object, prices: object[], categories: object[], photos: object[], eans: string[], isFather: boolean, fatherSku: string, variants: object[] } }`
#### List public categories — `GET /public/{companyId}/categories`
- Params: `companyId: integer`
- Returns: `200 { categories: { id: integer, parentId: integer, sort: integer, name: string, slug: string, fullHash: string, thumbW: integer, thumbH: integer, thumbHash: string }[] }`
#### List quotes — `GET /quote`
_none_
- Returns: `200 { quotes: { id: integer, number: string, type: string, entityId: integer, date: string, createdAt: string }[] }`
#### Create quote — `POST /quote`
- Params: `body: { number: string, date: string, lines: { amount: number, net: number, taxrate: number, sku?: string, name?: string, pu?: number, rebate?: number, comment?: string }[], entityId?: integer }`
- Returns: `201 { quote: { id: integer, number: string, type: string, entityId: integer, date: string, createdAt: string, lines: { id: integer, sku: string, name: string, pu: number, amount: number, net: number, rebate: number, taxrate: number, comment: string }[] } }`
#### Delete quote — `DELETE /quote/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Get quote — `GET /quote/{id}`
- Params: `id: integer`
- Returns: `200 { quote: { id: integer, number: string, type: string, entityId: integer, date: string, createdAt: string, lines: { id: integer, sku: string, name: string, pu: number, amount: number, net: number, rebate: number, taxrate: number, comment: string }[] } }`
#### Update quote — `PATCH /quote/{id}`
- Params: `id: integer, body: { number?: string, date?: string, entityId?: integer, lines?: { amount: number, net: number, taxrate: number, sku?: string, name?: string, pu?: number, rebate?: number, comment?: string }[] }`
- Returns: `200 { quote: { id: integer, number: string, type: string, entityId: integer, date: string, createdAt: string, lines: { id: integer, sku: string, name: string, pu: number, amount: number, net: number, rebate: number, taxrate: number, comment: string }[] } }`
#### Crawl image from URL, crop white/transparency borders, and return AVIF — `POST /serper/image`
- Params: `body: { url: string }`
- Returns: `200 avif`
#### Search images via Serper.dev and stream WebP thumbnails (SSE) — `POST /serper/images`
- Params: `body: { q: string, gl?: string, hl?: string, num?: integer, preferSource?: boolean }`
- Returns: `200 SSE`
#### Adjust stock manually — `POST /stock/adjust`
- Params: `body: { sku?: string, warehouseId?: integer, amount?: number, text?: string, lines?: { sku: string, amount: number, warehouseId?: integer, text?: string }[] }`
- Returns: `201 { manifest: { id: integer, number: string, type: string, date: string, createdAt: string }, lines: object[], ledger: { id: integer, manifestarticle_id: integer, transaction_type: string, amount: number, transaction_text: string, hash_version: integer, prev_hash: string, sku: string, created_at: string }[] }`
#### List suppliers — `GET /supplier`
_none_
- Returns: `200 { suppliers: { id: integer, name: string, createdAt: string, updatedAt: string }[] }`
#### Create supplier — `POST /supplier`
- Params: `body: { name: string }`
- Returns: `201 { supplier: { id: integer, name: string, createdAt: string, updatedAt: string } }`
#### Delete supplier — `DELETE /supplier/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Update supplier — `PATCH /supplier/{id}`
- Params: `id: integer, body: { name: string }`
- Returns: `200 { supplier: { id: integer, name: string, createdAt: string, updatedAt: string } }`
#### List supplier articles by SKUs — `GET /supplier/{id}/articles`
- Params: `id: integer, query: skus?: string`
- Returns: `200 { articles: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number }, article: { id: integer, sku: string, name: string, slug: string, photos: { sort: integer, fullHash: string, thumbW: integer, thumbH: integer, thumbHash: string }[], eans: string[] } }[] }`
#### Query supplier articles by SKUs (bulk) — `POST /supplier/{id}/articles`
- Params: `id: integer, body?: { skus?: string[] }`
- Returns: `200 { articles: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number }, article: { id: integer, sku: string, name: string, slug: string, photos: { sort: integer, fullHash: string, thumbW: integer, thumbH: integer, thumbHash: string }[], eans: string[] } }[] }`
#### Thumb image by hash — `GET /thumb/{fullHash}`
- Params: `fullHash: string`
- Returns: `200 avif`
#### Delete unit — `DELETE /unit`
- Params: `query: si: string`
- Returns: `204 void`
#### List units — `GET /unit`
_none_
- Returns: `200 { units: { si: string, basesi: string, basesifactor: number, symbol: string, name: string }[] }`
#### Upsert unit — `PUT /unit`
- Params: `body: { si: string, basesi: string, basesifactor: number, symbol: string, name: string }`
- Returns: `200 { unit: { si: string, basesi: string, basesifactor: number, symbol: string, name: string } }`
#### JTL-POS category synchronization — `GET /v1/category`
- Params: `query: lastChangedCategory?: string, limit?: integer`
- Returns: `200 object[]`
#### POS discovery and pairing — `GET /v1/client`
- Params: `query: authCode: string, name?: string`
- Returns: `200 { authCode: string, authToken: string, certificateFingerprint: string, certificateSerialNumber: string, mandantId: string, mandantName: string, mandantDatabase: string, serverFingerprint: string, name: string, serverTimestamp: string }`
#### POS sync initialization counts — `GET /v1/init`
- Params: `query: lastChangedProduct?: integer, lastChangedCategory?: integer, lastChangedCustomer?: integer, lastChangedCustomerGroup?: integer, lastChangedCompositeProduct?: integer, lastChangedDeletedEntity?: integer`
- Returns: `200 { version: string, product_count: string, category_count: string, customer_count: string, customerGroup_count: string, compositeProduct_count: string, configurationGroup_count: string, configurationItem_count: string, deletedEntity_count: string, max_orderId_count: string }`
#### JTL-POS product catalog synchronization — `GET /v1/product`
- Params: `query: lastChangedProduct?: string, limit?: integer`
- Returns: `200 object[]`
#### Get a virtual filesystem file — `GET /vfs/{*path}`
- Params: `path: string, query: download?: boolean`
- Returns: `200 string`
#### List warehouses — `GET /warehouse`
_none_
- Returns: `200 { warehouses: { id: integer, name: string, sort: integer }[] }`
#### Create warehouse — `POST /warehouse`
- Params: `body: { name: string, sort?: integer }`
- Returns: `201 { warehouse: { id: integer, name: string, sort: integer } }`
#### Reorder warehouses — `PUT /warehouse/order`
- Params: `body: { warehouseIds: integer[] }`
- Returns: `200 { warehouseIds: integer[] }`
#### Delete warehouse — `DELETE /warehouse/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Get warehouse by ID — `GET /warehouse/{id}`
- Params: `id: integer`
- Returns: `200 { warehouse: { id: integer, name: string, sort: integer } }`
#### Update warehouse (partial) — `PATCH /warehouse/{id}`
- Params: `id: integer, body: { name?: string, sort?: integer }`
- Returns: `200 { warehouse: { id: integer, name: string, sort: integer } }`
#### Update warehouse — `PUT /warehouse/{id}`
- Params: `id: integer, body: { name?: string, sort?: integer }`
- Returns: `200 { warehouse: { id: integer, name: string, sort: integer } }`

View File

@@ -4,159 +4,451 @@ Overview of all 145 API endpoints across all modules.
### Parameter Notation
- **Required parameters** have no `?` (e.g. `sku:string`, `categoryId`, `query: si:string`, `body: { name }`).
- **Optional parameters** are marked with `?` (e.g. `query: categoryId?:integer`, `track_stock?`, `body?: ...`).
- **Every value carries its type** — `string`, `integer`, `number`, `boolean`, `object`, arrays as `type[]`.
- **Required parameters** have no `?` (e.g. `sku: string`, `id: integer`, `query: si: string`, `body: { name: string }`).
- **Optional parameters** are marked with `?` (e.g. `query: limit?: integer`, `body: { sort?: integer }`, `body?: { … }`).
- **Path parameters** match `{param}` in the route URL.
- **Query parameters** are prefixed with `query: ...`.
- **Request bodies** are prefixed with `body: ...` (or `body?: ...` if optional).
- **Request bodies** are prefixed with `body: ...` (or `body?: ...` if the whole body is optional).
- **Response objects** use the same notation, so `201 { article: { … } }` means a JSON object with an `article` property.
| Method | Route | Params | Return Type | Summary |
|:---|:---|:---|:---|:---|
| `POST` | `/article` | `body: { categoryId, name, track_stock? }` | `201 { article: { id, categoryId, name, sku, track_stock } }` | Create article in category |
| `DELETE` | `/article/{sku}` | `sku:string, query: cascade?:boolean` | `204 void` | Delete article by SKU |
| `GET` | `/article/{sku}` | `sku:string` | `200 { article: { id, sku, name, slug, track_stock, unitamount, weight, unit, brand, categoryIds: integer[], photos: { sort, fullHash, fullW, fullH, fullSize, thumbW, thumbH, thumbHash }[], eans: string[], prices: { minmultiplier, net, taxRate, customergroupId }[], suppliers: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price }[] } }` | Get article by SKU |
| `PATCH` | `/article/{sku}` | `sku:string, body: { name?, unitamount?, unitSi?, track_stock? }` | `200 { article: { id, sku, name, slug, track_stock, unitamount, weight, unit, brand, categoryIds: integer[], photos: { sort, fullHash, fullW, fullH, fullSize, thumbW, thumbH, thumbHash }[], eans: string[], prices: { minmultiplier, net, taxRate, customergroupId }[], suppliers: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price }[] } }` | Update article by SKU |
| `GET` | `/article/{sku}/articlelist` | `sku:string` | `200 { items: { id, articleId, sku, name, count, sort }[] }` | Get Stückliste (bundle items) for an article |
| `PUT` | `/article/{sku}/articlelist` | `sku:string, body: { items: { articleId?, sku?: string, count?, sort? }[] }` | `200 { items: object[] }` | Set Stückliste (bundle items) for an article |
| `GET` | `/article/{sku}/attributevalue` | `sku:string` | `200 { attributevalues: { id, articleId, attributeId, attributeName, exclusive, attributeValueId, value, sort }[] }` | List article attribute values |
| `PUT` | `/article/{sku}/attributevalue` | `sku:string, body: integer[]` | `200 { attributevalues: { id, articleId, attributeId, attributeName, exclusive, attributeValueId, value, sort }[] }` | Bulk set article attribute values |
| `PUT` | `/article/{sku}/brand` | `sku:string, body: { brandId: integer }` | `200 { article: { id, sku, name, slug, track_stock, unitamount, weight, unit, brand, categoryIds: integer[], photos: { sort, fullHash, fullW, fullH, fullSize, thumbW, thumbH, thumbHash }[], eans: string[], prices: { minmultiplier, net, taxRate, customergroupId }[], suppliers: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price }[] } }` | Set or clear article brand by SKU |
| `PUT` | `/article/{sku}/categories` | `sku:string, body: { categoryIds: integer[] }` | `200 { article: { id, sku, name, slug, track_stock, unitamount, weight, unit, brand, categoryIds: integer[], photos: { sort, fullHash, fullW, fullH, fullSize, thumbW, thumbH, thumbHash }[], eans: string[], prices: { minmultiplier, net, taxRate, customergroupId }[], suppliers: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price }[] } }` | Replace article categories by SKU |
| `GET` | `/article/{sku}/children` | `sku:string` | `200 { children: { id, sku, name, fathersort, attributeValueId, attributeValue }[] }` | List child articles of a father article |
| `POST` | `/article/{sku}/children` | `sku:string, body: { attributeValueId?, value?, name? }` | `201 { article: { id, categoryId, name, sku, track_stock } }` | Create and attach a new child article to a father article |
| `PUT` | `/article/{sku}/children` | `sku:string, body: { sku: string, attributeValueId?, value?, reparent? }` | `200 { article, children: object[] }` | Attach an existing article as a child to a father article |
| `DELETE` | `/article/{sku}/children/{childSku}` | `sku:string, childSku:string, query: deleteArticle?:boolean` | `200 { success, deleted }` | Remove a child article from a father article |
| `PUT` | `/article/{sku}/eans` | `sku:string, body: { eans: string[] }` | `200 { article: { id, sku, name, slug, track_stock, unitamount, weight, unit, brand, categoryIds: integer[], photos: { sort, fullHash, fullW, fullH, fullSize, thumbW, thumbH, thumbHash }[], eans: string[], prices: { minmultiplier, net, taxRate, customergroupId }[], suppliers: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price }[] } }` | Replace article EANs by SKU |
| `POST` | `/article/{sku}/father` | `sku:string, body: { isFather, attributeNameId? }` | `200 { article: { id, categoryId, name, sku, track_stock } }` | Toggle father mode for an article |
| `GET` | `/article/{sku}/history` | `sku:string, query: limit?:integer` | `200 { history: { id, date, text }[], truncated }` | Get article history by SKU |
| `DELETE` | `/article/{sku}/image/{fullHash}` | `sku:string, fullHash:string` | `204 void` | Delete article image |
| `PUT` | `/article/{sku}/images/order` | `sku:string, body: { fullHashes: string[] }` | `200 { fullHashes: string[] }` | Reorder article images |
| `GET` | `/article/{sku}/optionslist` | `sku:string` | `200 { options: { id, articleId, sku, name, count, sort, mandated }[] }` | Get options list for an article |
| `PUT` | `/article/{sku}/optionslist` | `sku:string, body: { options: { articleId?, sku?: string, count?, sort?, mandated? }[] }` | `200 { options: object[] }` | Set options list for an article |
| `PUT` | `/article/{sku}/prices` | `sku:string, body: { prices: { price, tax, minmultiplier? }[] }` | `200 { article: { id, sku, name, slug, track_stock, unitamount, weight, unit, brand, categoryIds: integer[], photos: { sort, fullHash, fullW, fullH, fullSize, thumbW, thumbH, thumbHash }[], eans: string[], prices: { minmultiplier, net, taxRate, customergroupId }[], suppliers: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price }[] } }` | Replace POS prices by SKU |
| `POST` | `/article/{sku}/print` | `sku:string, body: { templateId, printerId, quantity }` | `200` | Print article label |
| `GET` | `/article/{sku}/property` | `sku:string` | `200 { properties: { id, articleId, propertyId, name, exclusive, value, sort }[] }` | List article properties |
| `PUT` | `/article/{sku}/property` | `sku:string, body: { properties: { propertyId, value, sort? }[] }` | `200 { properties: { id, articleId, propertyId, name, exclusive, value, sort }[] }` | Bulk set article properties |
| `DELETE` | `/article/{sku}/property/{propertyId}` | `sku:string, propertyId:integer` | `200` | Delete article property |
| `GET` | `/article/{sku}/supplier` | `sku:string` | `200 { suppliers: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price }[] }` | List article suppliers |
| `POST` | `/article/{sku}/supplier` | `sku:string, body: { entityId, sku?: string, pu?, stock?, sort?, netPrice?, taxId?, taxRate? }` | `201 { supplier: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price } }` | Assign supplier to article |
| `PUT` | `/article/{sku}/supplier/order` | `sku:string, body: { ids: integer[] }` | `200 { ids: integer[] }` | Reorder article suppliers |
| `DELETE` | `/article/{sku}/supplier/{id}` | `sku:string, id:integer` | `204 void` | Remove supplier assignment from article |
| `PATCH` | `/article/{sku}/supplier/{id}` | `sku:string, id:integer, body: { sku?: string, pu?, stock?, sort?, netPrice?, taxId?, taxRate? }` | `200 { supplier: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price } }` | Update article supplier assignment |
| `PUT` | `/article/{sku}/track_stock` | `sku:string, body: { track_stock: boolean }` | `200 { article: { id, sku, name, slug, track_stock, unitamount, weight, unit, brand, categoryIds: integer[], photos: { sort, fullHash, fullW, fullH, fullSize, thumbW, thumbH, thumbHash }[], eans: string[], prices: { minmultiplier, net, taxRate, customergroupId }[], suppliers: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price }[] } }` | Set article track_stock flag by SKU |
| `PUT` | `/article/{sku}/weight` | `sku:string, body: { weight: number }` | `200 { article: { id, sku, name, slug, track_stock, unitamount, weight, unit, brand, categoryIds: integer[], photos: { sort, fullHash, fullW, fullH, fullSize, thumbW, thumbH, thumbHash }[], eans: string[], prices: { minmultiplier, net, taxRate, customergroupId }[], suppliers: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price }[] } }` | Set article weight by SKU |
| `GET` | `/articleIndex` | `query: windowSize:integer` | `200 { articles: { id, sku, name, eans: string[], categoryIds: integer[] }[], truncated }` | List article search index |
| `GET` | `/attributename` | — | `200 { attributenames: { id, name, sort, exclusive, values: { id, attributeId, value, sort }[] }[] }` | List attribute names |
| `POST` | `/attributename` | `body: { name, sort?, exclusive? }` | `201 { attributename: { id, name, sort, exclusive, values: { id, attributeId, value, sort }[] } }` | Create attribute name |
| `PUT` | `/attributename/order` | `body: { attributenameIds: integer[] }` | `200` | Reorder attribute names |
| `GET` | `/attributename/{attributeId}/value` | `attributeId:integer` | `200 { values: { id, attributeId, value, sort }[] }` | List values for an attribute |
| `POST` | `/attributename/{attributeId}/value` | `attributeId:integer, body: { value, sort? }` | `201 { attributevalue: { id, attributeId, value, sort } }` | Create value for an attribute |
| `PUT` | `/attributename/{attributeId}/value/order` | `attributeId:integer, body: { attributevalueIds: integer[] }` | `200` | Reorder values of an attribute |
| `DELETE` | `/attributename/{id}` | `id:integer` | `200` | Delete attribute name |
| `PATCH` | `/attributename/{id}` | `id:integer, body: { name?, sort?, exclusive? }` | `200 { attributename: { id, name, sort, exclusive, values: { id, attributeId, value, sort }[] } }` | Update attribute name |
| `DELETE` | `/attributevalue/{id}` | `id:integer` | `200` | Delete attribute value |
| `PATCH` | `/attributevalue/{id}` | `id:integer, body: { value?, sort? }` | `200 { attributevalue: { id, attributeId, value, sort } }` | Update attribute value |
| `POST` | `/auth/login` | `body: { idToken: string }` | `200 { message, user }` | Login with Google ID token |
| `POST` | `/auth/logout` | — | `200 { message: string }` | Logout |
| `GET` | `/brand` | — | `200 { brands: { id, name, gsprpinfo, pics: { id, sort, fullHash, thumbW, thumbH, thumbHash }[] }[] }` | List brands |
| `PUT` | `/brand` | `body: { name, gsprpinfo? }` | `200 { brand: { id, name, gsprpinfo, pics: { id, sort, fullHash, thumbW, thumbH, thumbHash }[] } }` | Upsert brand |
| `DELETE` | `/brand/{id}` | `id:integer` | `204 void` | Delete brand |
| `POST` | `/category` | `body: { parentId, name }` | `201 { category: { id, parentId, sort, name } }` | Create category |
| `PUT` | `/category/order` | `body: { parentId, categoryIds: integer[] }` | `200 { categoryIds: integer[] }` | Reorder sibling categories |
| `GET` | `/category/tree` | — | `200 { languageId, tree: object[], articles: object[] }` | Category tree |
| `DELETE` | `/category/{id}` | `id:integer` | `204 void` | Delete category |
| `PATCH` | `/category/{id}` | `id:integer, body: { name?, parentId? }` | `200 { category: { id, name, slug, parentId, sort } }` | Update category (rename or move) |
| `GET` | `/category/{id}/articles` | `id:integer` | `200 { articles: { id, sku, name, slug, net, taxRate, track_stock, optionsCount, articleListCount, childCount, fullHash, thumbW, thumbH, thumbHash, brand }[] }` | Articles in category |
| `GET` | `/category/{id}/attributevalue` | `id:integer` | `200 { attributevalues: { id, categoryId, attributeId, attributeName, exclusive, attributeValueId, value, sort }[] }` | List category attribute values |
| `PUT` | `/category/{id}/attributevalue` | `id:integer, body: integer[]` | `200 { attributevalues: { id, categoryId, attributeId, attributeName, exclusive, attributeValueId, value, sort }[] }` | Bulk set category attribute values |
| `DELETE` | `/category/{id}/image` | `id:integer` | `200 { category: { id, thumbW, thumbH, thumbHash } }` | Delete category image |
| `GET` | `/category/{id}/property` | `id:integer` | `200 { properties: { id, categoryId, propertyId, name, exclusive, value, sort }[] }` | List category properties |
| `PUT` | `/category/{id}/property` | `id:integer, body: { properties: { propertyId, value, sort? }[] }` | `200 { properties: { id, categoryId, propertyId, name, exclusive, value, sort }[] }` | Bulk set category properties |
| `DELETE` | `/category/{id}/property/{propertyId}` | `id:integer, propertyId:integer` | `200` | Delete category property |
| `GET` | `/company` | — | `200 { companies: { id, iso639, name, taxrate, reducedtaxrate }[] }` | List companies |
| `GET` | `/company/history` | `query: limit?:integer` | `200 { history: { id, companyuserId, date, text }[], truncated }` | Get company history |
| `POST` | `/company/history` | `body: { text: string }` | `201 { history: { id, companyuserId, date, text } }` | Add company history entry |
| `GET` | `/company/setting` | — | `200 { settings: { key, value }[] }` | List company settings |
| `GET` | `/company/setting/{key}` | `key:string` | `200 { setting: { key, value } }` | Get company setting by key |
| `PUT` | `/company/setting/{key}` | `key:string, body: { value, frontend? }` | `200 { setting: { key, value } }` | Upsert company setting |
| `PUT` | `/company/{id}` | `id:integer, body: { iso639, name, taxrate, reducedtaxrate }` | `200 { company: { id, iso639, name, taxrate, reducedtaxrate } }` | Update company |
| `GET` | `/customergroup` | — | `200 { customergroups: { id, name, sort, editable }[] }` | List customer groups |
| `POST` | `/customergroup` | `body: { name: string }` | `201 { customergroup: { id, name, sort } }` | Create customer group |
| `PUT` | `/customergroup/order` | `body: { customergroupIds: integer[] }` | `200 { customergroupIds: integer[] }` | Reorder customer groups |
| `DELETE` | `/customergroup/{id}` | `id:integer` | `204 void` | Delete customer group |
| `PATCH` | `/customergroup/{id}` | `id:integer, body: { name: string }` | `200 { customergroup: { id, name, sort } }` | Update customer group |
| `GET` | `/delivery` | — | `200 { deliveries: { id, number, type, supplierId, externalNumber, date, createdAt, ledger }[] }` | List deliveries |
| `POST` | `/delivery` | `body: { externalNumber, date, lines: { amount, net, taxrate, sku?: string, name?, pu?, rebate?, comment? }[], supplierId?, files?: { mimetype, name, content, sort?, size?, hash?, created?, modified?, meta? }[] }` | `201 { delivery: { id, number, type, supplierId, externalNumber, date, createdAt, ledger, lines: { id, sku, name, pu, amount, net, rebate, taxrate, comment }[], files: { id, manifestId, fileId, sort, hash, mimetype, name, size, created, modified, thumbavif, thumbx, thumby, meta }[] } }` | Create delivery |
| `DELETE` | `/delivery/{id}` | `id:integer` | `204 void` | Delete delivery |
| `GET` | `/delivery/{id}` | `id:integer` | `200 { delivery: { id, number, type, supplierId, externalNumber, date, createdAt, ledger, lines: { id, sku, name, pu, amount, net, rebate, taxrate, comment }[], files: { id, manifestId, fileId, sort, hash, mimetype, name, size, created, modified, thumbavif, thumbx, thumby, meta }[] } }` | Get delivery |
| `PATCH` | `/delivery/{id}` | `id:integer, body: { externalNumber?, date?, supplierId?, lines?: { amount, net, taxrate, sku?: string, name?, pu?, rebate?, comment? }[], files?: { mimetype, name, content, sort?, size?, hash?, created?, modified?, meta? }[] }` | `200 { delivery: { id, number, type, supplierId, externalNumber, date, createdAt, ledger, lines: { id, sku, name, pu, amount, net, rebate, taxrate, comment }[], files: { id, manifestId, fileId, sort, hash, mimetype, name, size, created, modified, thumbavif, thumbx, thumby, meta }[] } }` | Update delivery |
| `GET` | `/delivery/{id}/file/{fileId}` | `id:integer, fileId:integer, query: download?:boolean` | `200 string` | Get delivery attachment file content |
| `GET` | `/entity` | `query: customergroupId?:integer, role?:string` | `200 { entities: { id, customergroupId, firstName, name, number, createdAt, updatedAt }[] }` | List entities |
| `POST` | `/entity` | `body: { customergroupId, name, firstName?, number? }` | `201 { entity: { id, customergroupId, firstName, name, number, createdAt, updatedAt } }` | Create entity |
| `GET` | `/entity/next-number` | — | `200 { number: string }` | Peek next customer number |
| `GET` | `/entity/{entityId}/address` | `entityId:integer` | `200 { addresses: { id, entityId, firstName, name, street, streetNumber, zip, city, county, addressType }[] }` | List entity addresses |
| `POST` | `/entity/{entityId}/address` | `entityId:integer, body: { addressType, firstName?, name?, street?, streetNumber?, zip?, city?, county? }` | `201 { address: { id, entityId, firstName, name, street, streetNumber, zip, city, county, addressType } }` | Create entity address |
| `DELETE` | `/entity/{entityId}/address/{id}` | `entityId:integer, id:integer` | `204 void` | Delete entity address |
| `PATCH` | `/entity/{entityId}/address/{id}` | `entityId:integer, id:integer, body: { addressType?, firstName?, name?, street?, streetNumber?, zip?, city?, county? }` | `200 { address: { id, entityId, firstName, name, street, streetNumber, zip, city, county, addressType } }` | Update entity address |
| `GET` | `/entity/{entityId}/contact` | `entityId:integer` | `200 { contacts: { id, entityId, contactType, contact }[] }` | List entity contacts |
| `POST` | `/entity/{entityId}/contact` | `entityId:integer, body: { contactType, contact }` | `201 { contact: { id, entityId, contactType, contact } }` | Create entity contact |
| `DELETE` | `/entity/{entityId}/contact/{id}` | `entityId:integer, id:integer` | `204 void` | Delete entity contact |
| `PATCH` | `/entity/{entityId}/contact/{id}` | `entityId:integer, id:integer, body: { contactType?, contact? }` | `200 { contact: { id, entityId, contactType, contact } }` | Update entity contact |
| `DELETE` | `/entity/{id}` | `id:integer` | `204 void` | Delete entity |
| `GET` | `/entity/{id}` | `id:integer` | `200 { entity: { id, customergroupId, firstName, name, number, createdAt, updatedAt } }` | Get entity |
| `PATCH` | `/entity/{id}` | `id:integer, body: { name?, firstName?, number? }` | `200 { entity: { id, customergroupId, firstName, name, number, createdAt, updatedAt } }` | Update entity |
| `GET` | `/labeltemplate` | — | `200 { labeltemplates: { id, name, width, height, dpi, type, content, thumb }[] }` | List label templates |
| `POST` | `/labeltemplate` | `body: { name, width, height, dpi, type, content }` | `201 { labeltemplate: { id, name, width, height, dpi, type, content, thumb } }` | Create label template |
| `DELETE` | `/labeltemplate/{id}` | `id:integer` | `204 void` | Delete label template |
| `GET` | `/labeltemplate/{id}` | `id:integer` | `200 { labeltemplate: { id, name, width, height, dpi, type, content, thumb } }` | Get label template by ID |
| `PATCH` | `/labeltemplate/{id}` | `id:integer, body: { name?, width?, height?, dpi?, type?, content? }` | `200 { labeltemplate: { id, name, width, height, dpi, type, content, thumb } }` | Update label template (partial) |
| `PUT` | `/labeltemplate/{id}` | `id:integer, body: { name?, width?, height?, dpi?, type?, content? }` | `200 { labeltemplate: { id, name, width, height, dpi, type, content, thumb } }` | Update label template |
| `GET` | `/ledger` | `query: manifestarticle_id?:integer, sku?:string, transaction_type?:string` | `200 { ledger: { id, manifestarticle_id, transaction_type, amount, transaction_text, hash_version, prev_hash, sku, created_at }[] }` | Query ledger by manifest article ID or SKU |
| `POST` | `/ledger` | `body: { manifestarticle_id, transaction_type, amount, transaction_text }` | `201 { ledger: { id, manifestarticle_id, transaction_type, amount, transaction_text, hash_version, prev_hash, sku, created_at } }` | Add ledger entry |
| `GET` | `/ledger/manifestarticle/{manifestarticleId}` | `manifestarticleId:integer, query: transaction_type?:string` | `200 { ledger: { id, manifestarticle_id, transaction_type, amount, transaction_text, hash_version, prev_hash, sku, created_at }[] }` | Query ledger by manifest article ID |
| `GET` | `/ledger/sku/{sku}` | `sku:string, query: transaction_type?:string` | `200 { ledger: { id, manifestarticle_id, transaction_type, amount, transaction_text, hash_version, prev_hash, sku, created_at }[] }` | Query ledger by article SKU |
| `GET` | `/number` | — | `200 { numbers: { id, type, prefix, padding, next }[] }` | List number sequences |
| `PATCH` | `/number/{id}` | `id:integer, body: { prefix?, padding?, next? }` | `200 { number: { id, type, prefix, padding, next } }` | Update number sequence |
| `GET` | `/order` | — | `200 { orders: { id, number, type, entityId, date, createdAt }[] }` | List orders |
| `POST` | `/order` | `body: { number, date, lines: { amount, net, taxrate, sku?: string, name?, pu?, rebate?, comment? }[], entityId? }` | `201 { order: { id, number, type, entityId, date, createdAt, lines: { id, sku, name, pu, amount, net, rebate, taxrate, comment }[] } }` | Create order |
| `DELETE` | `/order/{id}` | `id:integer` | `204 void` | Delete order |
| `GET` | `/order/{id}` | `id:integer` | `200 { order: { id, number, type, entityId, date, createdAt, lines: { id, sku, name, pu, amount, net, rebate, taxrate, comment }[] } }` | Get order |
| `PATCH` | `/order/{id}` | `id:integer, body: { number?, date?, entityId?, lines?: { amount, net, taxrate, sku?: string, name?, pu?, rebate?, comment? }[] }` | `200 { order: { id, number, type, entityId, date, createdAt, lines: { id, sku, name, pu, amount, net, rebate, taxrate, comment }[] } }` | Update order |
| `GET` | `/printer` | — | `200 { printers: { id, company_id, address, type, model, serial, sort, desc }[] }` | List printers |
| `POST` | `/printer` | `body: { address, type, model?, serial?, sort?, desc? }` | `201 { printer: { id, company_id, address, type, model, serial, sort, desc } }` | Create printer |
| `PUT` | `/printer/order` | `body: { printerIds: integer[] }` | `200 { printerIds: integer[] }` | Reorder printers |
| `DELETE` | `/printer/{id}` | `id:integer` | `204 void` | Delete printer |
| `GET` | `/printer/{id}` | `id:integer` | `200 { printer: { id, company_id, address, type, model, serial, sort, desc } }` | Get printer by ID |
| `PATCH` | `/printer/{id}` | `id:integer, body: { address?, type?, model?, serial?, sort?, desc? }` | `200 { printer: { id, company_id, address, type, model, serial, sort, desc } }` | Update printer (partial) |
| `PUT` | `/printer/{id}` | `id:integer, body: { address?, type?, model?, serial?, sort?, desc? }` | `200 { printer: { id, company_id, address, type, model, serial, sort, desc } }` | Update printer |
| `GET` | `/propertyname` | — | `200 { propertynames: { id, name, sort, exclusive }[] }` | List property names |
| `POST` | `/propertyname` | `body: { name, sort?, exclusive? }` | `201 { propertyname: { id, name, sort, exclusive } }` | Create property name |
| `PUT` | `/propertyname/order` | `body: { propertynameIds: integer[] }` | `200` | Reorder property names |
| `DELETE` | `/propertyname/{id}` | `id:integer` | `200` | Delete property name |
| `PATCH` | `/propertyname/{id}` | `id:integer, body: { name?, sort?, exclusive? }` | `200 { propertyname: { id, name, sort, exclusive } }` | Update property name |
| `GET` | `/quote` | — | `200 { quotes: { id, number, type, entityId, date, createdAt }[] }` | List quotes |
| `POST` | `/quote` | `body: { number, date, lines: { amount, net, taxrate, sku?: string, name?, pu?, rebate?, comment? }[], entityId? }` | `201 { quote: { id, number, type, entityId, date, createdAt, lines: { id, sku, name, pu, amount, net, rebate, taxrate, comment }[] } }` | Create quote |
| `DELETE` | `/quote/{id}` | `id:integer` | `204 void` | Delete quote |
| `GET` | `/quote/{id}` | `id:integer` | `200 { quote: { id, number, type, entityId, date, createdAt, lines: { id, sku, name, pu, amount, net, rebate, taxrate, comment }[] } }` | Get quote |
| `PATCH` | `/quote/{id}` | `id:integer, body: { number?, date?, entityId?, lines?: { amount, net, taxrate, sku?: string, name?, pu?, rebate?, comment? }[] }` | `200 { quote: { id, number, type, entityId, date, createdAt, lines: { id, sku, name, pu, amount, net, rebate, taxrate, comment }[] } }` | Update quote |
| `POST` | `/stock/adjust` | `body: { sku?: string, warehouseId?, amount?, text?, lines?: { sku: string, amount, warehouseId?, text? }[] }` | `201 { manifest, lines: object[], ledger: { id, manifestarticle_id, transaction_type, amount, transaction_text, hash_version, prev_hash, sku, created_at }[] }` | Adjust stock manually |
| `GET` | `/supplier` | — | `200 { suppliers: { id, name, createdAt, updatedAt }[] }` | List suppliers |
| `POST` | `/supplier` | `body: { name: string }` | `201 { supplier: { id, name, createdAt, updatedAt } }` | Create supplier |
| `DELETE` | `/supplier/{id}` | `id:integer` | `204 void` | Delete supplier |
| `PATCH` | `/supplier/{id}` | `id:integer, body: { name: string }` | `200 { supplier: { id, name, createdAt, updatedAt } }` | Update supplier |
| `GET` | `/supplier/{id}/articles` | `id:integer, query: skus?` | `200 { articles: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price, article }[] }` | List supplier articles by SKUs |
| `POST` | `/supplier/{id}/articles` | `id:integer, body?: { skus?: string[] }` | `200 { articles: { id, articleId, entityId, supplierName, sku, pu, stock, sort, priceId, price, article }[] }` | Query supplier articles by SKUs (bulk) |
| `DELETE` | `/unit` | `query: si:string` | `204 void` | Delete unit |
| `GET` | `/unit` | — | `200 { units: { si, basesi, basesifactor, symbol, name }[] }` | List units |
| `PUT` | `/unit` | `body: { si, basesi, basesifactor, symbol, name }` | `200 { unit: { si, basesi, basesifactor, symbol, name } }` | Upsert unit |
| `GET` | `/vfs/{*path}` | `path:string, query: download?:boolean` | `200 string` | Get a virtual filesystem file |
| `GET` | `/warehouse` | — | `200 { warehouses: { id, name, sort }[] }` | List warehouses |
| `POST` | `/warehouse` | `body: { name, sort? }` | `201 { warehouse: { id, name, sort } }` | Create warehouse |
| `PUT` | `/warehouse/order` | `body: { warehouseIds: integer[] }` | `200 { warehouseIds: integer[] }` | Reorder warehouses |
| `DELETE` | `/warehouse/{id}` | `id:integer` | `204 void` | Delete warehouse |
| `GET` | `/warehouse/{id}` | `id:integer` | `200 { warehouse: { id, name, sort } }` | Get warehouse by ID |
| `PATCH` | `/warehouse/{id}` | `id:integer, body: { name?, sort? }` | `200 { warehouse: { id, name, sort } }` | Update warehouse (partial) |
| `PUT` | `/warehouse/{id}` | `id:integer, body: { name?, sort? }` | `200 { warehouse: { id, name, sort } }` | Update warehouse |
### Routes
#### Create article in category — `POST /article`
- Params: `body: { categoryId: integer, name: string, track_stock?: boolean }`
- Returns: `201 { article: { id: integer, categoryId: integer, name: string, sku: string, track_stock: boolean } }`
#### Delete article by SKU — `DELETE /article/{sku}`
- Params: `sku: string, query: cascade?: boolean`
- Returns: `204 void`
#### Get article by SKU — `GET /article/{sku}`
- Params: `sku: string`
- Returns: `200 { article: { id: integer, sku: string, name: string, slug: string, track_stock: boolean, unitamount: number, weight: number, unit: object, brand: object, categoryIds: integer[], photos: { sort: integer, fullHash: string, fullW: integer, fullH: integer, fullSize: integer, thumbW: integer, thumbH: integer, thumbHash: string }[], eans: string[], prices: { minmultiplier: number, net: number, taxRate: number, customergroupId: integer }[], suppliers: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number } }[] } }`
#### Update article by SKU — `PATCH /article/{sku}`
- Params: `sku: string, body: { name?: string, unitamount?: number, unitSi?: string, track_stock?: boolean }`
- Returns: `200 { article: { id: integer, sku: string, name: string, slug: string, track_stock: boolean, unitamount: number, weight: number, unit: object, brand: object, categoryIds: integer[], photos: { sort: integer, fullHash: string, fullW: integer, fullH: integer, fullSize: integer, thumbW: integer, thumbH: integer, thumbHash: string }[], eans: string[], prices: { minmultiplier: number, net: number, taxRate: number, customergroupId: integer }[], suppliers: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number } }[] } }`
#### Get Stückliste (bundle items) for an article — `GET /article/{sku}/articlelist`
- Params: `sku: string`
- Returns: `200 { items: { id: integer, articleId: integer, sku: string, name: string, count: integer, sort: integer }[] }`
#### Set Stückliste (bundle items) for an article — `PUT /article/{sku}/articlelist`
- Params: `sku: string, body: { items: { articleId?: integer, sku?: string, count?: integer, sort?: integer }[] }`
- Returns: `200 { items: object[] }`
#### List article attribute values — `GET /article/{sku}/attributevalue`
- Params: `sku: string`
- Returns: `200 { attributevalues: { id: integer, articleId: integer, attributeId: integer, attributeName: string, exclusive: boolean, attributeValueId: integer, value: string, sort: integer }[] }`
#### Bulk set article attribute values — `PUT /article/{sku}/attributevalue`
- Params: `sku: string, body: integer[]`
- Returns: `200 { attributevalues: { id: integer, articleId: integer, attributeId: integer, attributeName: string, exclusive: boolean, attributeValueId: integer, value: string, sort: integer }[] }`
#### Set or clear article brand by SKU — `PUT /article/{sku}/brand`
- Params: `sku: string, body: { brandId: integer }`
- Returns: `200 { article: { id: integer, sku: string, name: string, slug: string, track_stock: boolean, unitamount: number, weight: number, unit: object, brand: object, categoryIds: integer[], photos: { sort: integer, fullHash: string, fullW: integer, fullH: integer, fullSize: integer, thumbW: integer, thumbH: integer, thumbHash: string }[], eans: string[], prices: { minmultiplier: number, net: number, taxRate: number, customergroupId: integer }[], suppliers: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number } }[] } }`
#### Replace article categories by SKU — `PUT /article/{sku}/categories`
- Params: `sku: string, body: { categoryIds: integer[] }`
- Returns: `200 { article: { id: integer, sku: string, name: string, slug: string, track_stock: boolean, unitamount: number, weight: number, unit: object, brand: object, categoryIds: integer[], photos: { sort: integer, fullHash: string, fullW: integer, fullH: integer, fullSize: integer, thumbW: integer, thumbH: integer, thumbHash: string }[], eans: string[], prices: { minmultiplier: number, net: number, taxRate: number, customergroupId: integer }[], suppliers: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number } }[] } }`
#### List child articles of a father article — `GET /article/{sku}/children`
- Params: `sku: string`
- Returns: `200 { children: { id: integer, sku: string, name: string, fathersort: integer, attributeValueId: integer, attributeValue: string }[] }`
#### Create and attach a new child article to a father article — `POST /article/{sku}/children`
- Params: `sku: string, body: { attributeValueId?: integer, value?: string, name?: string }`
- Returns: `201 { article: { id: integer, categoryId: integer, name: string, sku: string, track_stock: boolean } }`
#### Attach an existing article as a child to a father article — `PUT /article/{sku}/children`
- Params: `sku: string, body: { sku: string, attributeValueId?: integer, value?: string, reparent?: boolean }`
- Returns: `200 { article: { id: integer, categoryId: integer, name: string, sku: string, track_stock: boolean }, children: object[] }`
#### Remove a child article from a father article — `DELETE /article/{sku}/children/{childSku}`
- Params: `sku: string, childSku: string, query: deleteArticle?: boolean`
- Returns: `200 { success: boolean, deleted: boolean }`
#### Replace article EANs by SKU — `PUT /article/{sku}/eans`
- Params: `sku: string, body: { eans: string[] }`
- Returns: `200 { article: { id: integer, sku: string, name: string, slug: string, track_stock: boolean, unitamount: number, weight: number, unit: object, brand: object, categoryIds: integer[], photos: { sort: integer, fullHash: string, fullW: integer, fullH: integer, fullSize: integer, thumbW: integer, thumbH: integer, thumbHash: string }[], eans: string[], prices: { minmultiplier: number, net: number, taxRate: number, customergroupId: integer }[], suppliers: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number } }[] } }`
#### Toggle father mode for an article — `POST /article/{sku}/father`
- Params: `sku: string, body: { isFather: boolean, attributeNameId?: integer }`
- Returns: `200 { article: { id: integer, categoryId: integer, name: string, sku: string, track_stock: boolean } }`
#### Get article history by SKU — `GET /article/{sku}/history`
- Params: `sku: string, query: limit?: integer`
- Returns: `200 { history: { id: integer, date: string, text: string }[], truncated: boolean }`
#### Delete article image — `DELETE /article/{sku}/image/{fullHash}`
- Params: `sku: string, fullHash: string`
- Returns: `204 void`
#### Reorder article images — `PUT /article/{sku}/images/order`
- Params: `sku: string, body: { fullHashes: string[] }`
- Returns: `200 { fullHashes: string[] }`
#### Get options list for an article — `GET /article/{sku}/optionslist`
- Params: `sku: string`
- Returns: `200 { options: { id: integer, articleId: integer, sku: string, name: string, count: integer, sort: integer, mandated: boolean }[] }`
#### Set options list for an article — `PUT /article/{sku}/optionslist`
- Params: `sku: string, body: { options: { articleId?: integer, sku?: string, count?: integer, sort?: integer, mandated?: boolean }[] }`
- Returns: `200 { options: object[] }`
#### Replace POS prices by SKU — `PUT /article/{sku}/prices`
- Params: `sku: string, body: { prices: { price: number, tax: number, minmultiplier?: number }[] }`
- Returns: `200 { article: { id: integer, sku: string, name: string, slug: string, track_stock: boolean, unitamount: number, weight: number, unit: object, brand: object, categoryIds: integer[], photos: { sort: integer, fullHash: string, fullW: integer, fullH: integer, fullSize: integer, thumbW: integer, thumbH: integer, thumbHash: string }[], eans: string[], prices: { minmultiplier: number, net: number, taxRate: number, customergroupId: integer }[], suppliers: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number } }[] } }`
#### Print article label — `POST /article/{sku}/print`
- Params: `sku: string, body: { templateId: integer, printerId: integer, quantity: integer }`
- Returns: `200`
#### List article properties — `GET /article/{sku}/property`
- Params: `sku: string`
- Returns: `200 { properties: { id: integer, articleId: integer, propertyId: integer, name: string, exclusive: boolean, value: string, sort: integer }[] }`
#### Bulk set article properties — `PUT /article/{sku}/property`
- Params: `sku: string, body: { properties: { propertyId: integer, value: string, sort?: integer }[] }`
- Returns: `200 { properties: { id: integer, articleId: integer, propertyId: integer, name: string, exclusive: boolean, value: string, sort: integer }[] }`
#### Delete article property — `DELETE /article/{sku}/property/{propertyId}`
- Params: `sku: string, propertyId: integer`
- Returns: `200`
#### List article suppliers — `GET /article/{sku}/supplier`
- Params: `sku: string`
- Returns: `200 { suppliers: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number } }[] }`
#### Assign supplier to article — `POST /article/{sku}/supplier`
- Params: `sku: string, body: { entityId: integer, sku?: string, pu?: number, stock?: number, sort?: integer, netPrice?: number, taxId?: integer, taxRate?: number }`
- Returns: `201 { supplier: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number } } }`
#### Reorder article suppliers — `PUT /article/{sku}/supplier/order`
- Params: `sku: string, body: { ids: integer[] }`
- Returns: `200 { ids: integer[] }`
#### Remove supplier assignment from article — `DELETE /article/{sku}/supplier/{id}`
- Params: `sku: string, id: integer`
- Returns: `204 void`
#### Update article supplier assignment — `PATCH /article/{sku}/supplier/{id}`
- Params: `sku: string, id: integer, body: { sku?: string, pu?: number, stock?: number, sort?: integer, netPrice?: number, taxId?: integer, taxRate?: number }`
- Returns: `200 { supplier: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number } } }`
#### Set article track_stock flag by SKU — `PUT /article/{sku}/track_stock`
- Params: `sku: string, body: { track_stock: boolean }`
- Returns: `200 { article: { id: integer, sku: string, name: string, slug: string, track_stock: boolean, unitamount: number, weight: number, unit: object, brand: object, categoryIds: integer[], photos: { sort: integer, fullHash: string, fullW: integer, fullH: integer, fullSize: integer, thumbW: integer, thumbH: integer, thumbHash: string }[], eans: string[], prices: { minmultiplier: number, net: number, taxRate: number, customergroupId: integer }[], suppliers: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number } }[] } }`
#### Set article weight by SKU — `PUT /article/{sku}/weight`
- Params: `sku: string, body: { weight: number }`
- Returns: `200 { article: { id: integer, sku: string, name: string, slug: string, track_stock: boolean, unitamount: number, weight: number, unit: object, brand: object, categoryIds: integer[], photos: { sort: integer, fullHash: string, fullW: integer, fullH: integer, fullSize: integer, thumbW: integer, thumbH: integer, thumbHash: string }[], eans: string[], prices: { minmultiplier: number, net: number, taxRate: number, customergroupId: integer }[], suppliers: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number } }[] } }`
#### List article search index — `GET /articleIndex`
- Params: `query: windowSize: integer`
- Returns: `200 { articles: { id: integer, sku: string, name: string, eans: string[], categoryIds: integer[] }[], truncated: boolean }`
#### List attribute names — `GET /attributename`
_none_
- Returns: `200 { attributenames: { id: integer, name: string, sort: integer, exclusive: boolean, values: { id: integer, attributeId: integer, value: string, sort: integer }[] }[] }`
#### Create attribute name — `POST /attributename`
- Params: `body: { name: string, sort?: integer, exclusive?: boolean }`
- Returns: `201 { attributename: { id: integer, name: string, sort: integer, exclusive: boolean, values: { id: integer, attributeId: integer, value: string, sort: integer }[] } }`
#### Reorder attribute names — `PUT /attributename/order`
- Params: `body: { attributenameIds: integer[] }`
- Returns: `200`
#### List values for an attribute — `GET /attributename/{attributeId}/value`
- Params: `attributeId: integer`
- Returns: `200 { values: { id: integer, attributeId: integer, value: string, sort: integer }[] }`
#### Create value for an attribute — `POST /attributename/{attributeId}/value`
- Params: `attributeId: integer, body: { value: string, sort?: integer }`
- Returns: `201 { attributevalue: { id: integer, attributeId: integer, value: string, sort: integer } }`
#### Reorder values of an attribute — `PUT /attributename/{attributeId}/value/order`
- Params: `attributeId: integer, body: { attributevalueIds: integer[] }`
- Returns: `200`
#### Delete attribute name — `DELETE /attributename/{id}`
- Params: `id: integer`
- Returns: `200`
#### Update attribute name — `PATCH /attributename/{id}`
- Params: `id: integer, body: { name?: string, sort?: integer, exclusive?: boolean }`
- Returns: `200 { attributename: { id: integer, name: string, sort: integer, exclusive: boolean, values: { id: integer, attributeId: integer, value: string, sort: integer }[] } }`
#### Delete attribute value — `DELETE /attributevalue/{id}`
- Params: `id: integer`
- Returns: `200`
#### Update attribute value — `PATCH /attributevalue/{id}`
- Params: `id: integer, body: { value?: string, sort?: integer }`
- Returns: `200 { attributevalue: { id: integer, attributeId: integer, value: string, sort: integer } }`
#### Login with Google ID token — `POST /auth/login`
- Params: `body: { idToken: string }`
- Returns: `200 { message: string, user: { id: integer, email: string, selectedCompanyId: integer, picture: string } }`
#### Logout — `POST /auth/logout`
_none_
- Returns: `200 { message: string }`
#### List brands — `GET /brand`
_none_
- Returns: `200 { brands: { id: integer, name: string, gsprpinfo: string, pics: { id: integer, sort: integer, fullHash: string, thumbW: integer, thumbH: integer, thumbHash: string }[] }[] }`
#### Upsert brand — `PUT /brand`
- Params: `body: { name: string, gsprpinfo?: string }`
- Returns: `200 { brand: { id: integer, name: string, gsprpinfo: string, pics: { id: integer, sort: integer, fullHash: string, thumbW: integer, thumbH: integer, thumbHash: string }[] } }`
#### Delete brand — `DELETE /brand/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Create category — `POST /category`
- Params: `body: { parentId: integer, name: string }`
- Returns: `201 { category: { id: integer, parentId: integer, sort: integer, name: string } }`
#### Reorder sibling categories — `PUT /category/order`
- Params: `body: { parentId: integer, categoryIds: integer[] }`
- Returns: `200 { categoryIds: integer[] }`
#### Category tree — `GET /category/tree`
_none_
- Returns: `200 { languageId: integer, tree: object[], articles: object[] }`
#### Delete category — `DELETE /category/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Update category (rename or move) — `PATCH /category/{id}`
- Params: `id: integer, body: { name?: string, parentId?: integer }`
- Returns: `200 { category: { id: integer, name: string, slug: string, parentId: integer, sort: integer } }`
#### Articles in category — `GET /category/{id}/articles`
- Params: `id: integer`
- Returns: `200 { articles: { id: integer, sku: string, name: string, slug: string, net: number, taxRate: number, track_stock: boolean, optionsCount: integer, articleListCount: integer, childCount: integer, fullHash: string, thumbW: integer, thumbH: integer, thumbHash: string, brand: object }[] }`
#### List category attribute values — `GET /category/{id}/attributevalue`
- Params: `id: integer`
- Returns: `200 { attributevalues: { id: integer, categoryId: integer, attributeId: integer, attributeName: string, exclusive: boolean, attributeValueId: integer, value: string, sort: integer }[] }`
#### Bulk set category attribute values — `PUT /category/{id}/attributevalue`
- Params: `id: integer, body: integer[]`
- Returns: `200 { attributevalues: { id: integer, categoryId: integer, attributeId: integer, attributeName: string, exclusive: boolean, attributeValueId: integer, value: string, sort: integer }[] }`
#### Delete category image — `DELETE /category/{id}/image`
- Params: `id: integer`
- Returns: `200 { category: { id: integer, thumbW: integer, thumbH: integer, thumbHash: string } }`
#### List category properties — `GET /category/{id}/property`
- Params: `id: integer`
- Returns: `200 { properties: { id: integer, categoryId: integer, propertyId: integer, name: string, exclusive: boolean, value: string, sort: integer }[] }`
#### Bulk set category properties — `PUT /category/{id}/property`
- Params: `id: integer, body: { properties: { propertyId: integer, value: string, sort?: integer }[] }`
- Returns: `200 { properties: { id: integer, categoryId: integer, propertyId: integer, name: string, exclusive: boolean, value: string, sort: integer }[] }`
#### Delete category property — `DELETE /category/{id}/property/{propertyId}`
- Params: `id: integer, propertyId: integer`
- Returns: `200`
#### List companies — `GET /company`
_none_
- Returns: `200 { companies: { id: integer, iso639: string, name: string, taxrate: number, reducedtaxrate: number }[] }`
#### Get company history — `GET /company/history`
- Params: `query: limit?: integer`
- Returns: `200 { history: { id: integer, companyuserId: integer, date: string, text: string }[], truncated: boolean }`
#### Add company history entry — `POST /company/history`
- Params: `body: { text: string }`
- Returns: `201 { history: { id: integer, companyuserId: integer, date: string, text: string } }`
#### List company settings — `GET /company/setting`
_none_
- Returns: `200 { settings: { key: string, value: string }[] }`
#### Get company setting by key — `GET /company/setting/{key}`
- Params: `key: string`
- Returns: `200 { setting: { key: string, value: string } }`
#### Upsert company setting — `PUT /company/setting/{key}`
- Params: `key: string, body: { value: string, frontend?: boolean }`
- Returns: `200 { setting: { key: string, value: string } }`
#### Update company — `PUT /company/{id}`
- Params: `id: integer, body: { iso639: string, name: string, taxrate: number, reducedtaxrate: number }`
- Returns: `200 { company: { id: integer, iso639: string, name: string, taxrate: number, reducedtaxrate: number } }`
#### List customer groups — `GET /customergroup`
_none_
- Returns: `200 { customergroups: { id: integer, name: string, sort: integer, editable: boolean }[] }`
#### Create customer group — `POST /customergroup`
- Params: `body: { name: string }`
- Returns: `201 { customergroup: { id: integer, name: string, sort: integer } }`
#### Reorder customer groups — `PUT /customergroup/order`
- Params: `body: { customergroupIds: integer[] }`
- Returns: `200 { customergroupIds: integer[] }`
#### Delete customer group — `DELETE /customergroup/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Update customer group — `PATCH /customergroup/{id}`
- Params: `id: integer, body: { name: string }`
- Returns: `200 { customergroup: { id: integer, name: string, sort: integer } }`
#### List deliveries — `GET /delivery`
_none_
- Returns: `200 { deliveries: { id: integer, number: string, type: string, supplierId: integer, externalNumber: string, date: string, createdAt: string, ledger: { totalPositions: integer, completelyOnLedgerPositions: integer } }[] }`
#### Create delivery — `POST /delivery`
- Params: `body: { externalNumber: string, date: string, lines: { amount: number, net: number, taxrate: number, sku?: string, name?: string, pu?: number, rebate?: number, comment?: string }[], supplierId?: integer, files?: { mimetype: string, name: string, content: string, sort?: integer, size?: integer, hash?: string, created?: string, modified?: string, meta?: object }[] }`
- Returns: `201 { delivery: { id: integer, number: string, type: string, supplierId: integer, externalNumber: string, date: string, createdAt: string, ledger: { totalPositions: integer, completelyOnLedgerPositions: integer }, lines: { id: integer, sku: string, name: string, pu: number, amount: number, net: number, rebate: number, taxrate: number, comment: string }[], files: { id: integer, manifestId: integer, fileId: integer, sort: integer, hash: string, mimetype: string, name: string, size: integer, created: string, modified: string, thumbavif: string, thumbx: integer, thumby: integer, meta: object }[] } }`
#### Delete delivery — `DELETE /delivery/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Get delivery — `GET /delivery/{id}`
- Params: `id: integer`
- Returns: `200 { delivery: { id: integer, number: string, type: string, supplierId: integer, externalNumber: string, date: string, createdAt: string, ledger: { totalPositions: integer, completelyOnLedgerPositions: integer }, lines: { id: integer, sku: string, name: string, pu: number, amount: number, net: number, rebate: number, taxrate: number, comment: string }[], files: { id: integer, manifestId: integer, fileId: integer, sort: integer, hash: string, mimetype: string, name: string, size: integer, created: string, modified: string, thumbavif: string, thumbx: integer, thumby: integer, meta: object }[] } }`
#### Update delivery — `PATCH /delivery/{id}`
- Params: `id: integer, body: { externalNumber?: string, date?: string, supplierId?: integer, lines?: { amount: number, net: number, taxrate: number, sku?: string, name?: string, pu?: number, rebate?: number, comment?: string }[], files?: { mimetype: string, name: string, content: string, sort?: integer, size?: integer, hash?: string, created?: string, modified?: string, meta?: object }[] }`
- Returns: `200 { delivery: { id: integer, number: string, type: string, supplierId: integer, externalNumber: string, date: string, createdAt: string, ledger: { totalPositions: integer, completelyOnLedgerPositions: integer }, lines: { id: integer, sku: string, name: string, pu: number, amount: number, net: number, rebate: number, taxrate: number, comment: string }[], files: { id: integer, manifestId: integer, fileId: integer, sort: integer, hash: string, mimetype: string, name: string, size: integer, created: string, modified: string, thumbavif: string, thumbx: integer, thumby: integer, meta: object }[] } }`
#### Get delivery attachment file content — `GET /delivery/{id}/file/{fileId}`
- Params: `id: integer, fileId: integer, query: download?: boolean`
- Returns: `200 string`
#### List entities — `GET /entity`
- Params: `query: customergroupId?: integer, role?: string`
- Returns: `200 { entities: { id: integer, customergroupId: integer, firstName: string, name: string, number: string, createdAt: string, updatedAt: string }[] }`
#### Create entity — `POST /entity`
- Params: `body: { customergroupId: integer, name: string, firstName?: string, number?: string }`
- Returns: `201 { entity: { id: integer, customergroupId: integer, firstName: string, name: string, number: string, createdAt: string, updatedAt: string } }`
#### Peek next customer number — `GET /entity/next-number`
_none_
- Returns: `200 { number: string }`
#### List entity addresses — `GET /entity/{entityId}/address`
- Params: `entityId: integer`
- Returns: `200 { addresses: { id: integer, entityId: integer, firstName: string, name: string, street: string, streetNumber: string, zip: string, city: string, county: string, addressType: string }[] }`
#### Create entity address — `POST /entity/{entityId}/address`
- Params: `entityId: integer, body: { addressType: string, firstName?: string, name?: string, street?: string, streetNumber?: string, zip?: string, city?: string, county?: string }`
- Returns: `201 { address: { id: integer, entityId: integer, firstName: string, name: string, street: string, streetNumber: string, zip: string, city: string, county: string, addressType: string } }`
#### Delete entity address — `DELETE /entity/{entityId}/address/{id}`
- Params: `entityId: integer, id: integer`
- Returns: `204 void`
#### Update entity address — `PATCH /entity/{entityId}/address/{id}`
- Params: `entityId: integer, id: integer, body: { addressType?: string, firstName?: string, name?: string, street?: string, streetNumber?: string, zip?: string, city?: string, county?: string }`
- Returns: `200 { address: { id: integer, entityId: integer, firstName: string, name: string, street: string, streetNumber: string, zip: string, city: string, county: string, addressType: string } }`
#### List entity contacts — `GET /entity/{entityId}/contact`
- Params: `entityId: integer`
- Returns: `200 { contacts: { id: integer, entityId: integer, contactType: string, contact: string }[] }`
#### Create entity contact — `POST /entity/{entityId}/contact`
- Params: `entityId: integer, body: { contactType: string, contact: string }`
- Returns: `201 { contact: { id: integer, entityId: integer, contactType: string, contact: string } }`
#### Delete entity contact — `DELETE /entity/{entityId}/contact/{id}`
- Params: `entityId: integer, id: integer`
- Returns: `204 void`
#### Update entity contact — `PATCH /entity/{entityId}/contact/{id}`
- Params: `entityId: integer, id: integer, body: { contactType?: string, contact?: string }`
- Returns: `200 { contact: { id: integer, entityId: integer, contactType: string, contact: string } }`
#### Delete entity — `DELETE /entity/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Get entity — `GET /entity/{id}`
- Params: `id: integer`
- Returns: `200 { entity: { id: integer, customergroupId: integer, firstName: string, name: string, number: string, createdAt: string, updatedAt: string } }`
#### Update entity — `PATCH /entity/{id}`
- Params: `id: integer, body: { name?: string, firstName?: string, number?: string }`
- Returns: `200 { entity: { id: integer, customergroupId: integer, firstName: string, name: string, number: string, createdAt: string, updatedAt: string } }`
#### List label templates — `GET /labeltemplate`
_none_
- Returns: `200 { labeltemplates: { id: integer, name: string, width: number, height: number, dpi: integer, type: string, content: object, thumb: string }[] }`
#### Create label template — `POST /labeltemplate`
- Params: `body: { name: string, width: number, height: number, dpi: integer, type: string, content: object }`
- Returns: `201 { labeltemplate: { id: integer, name: string, width: number, height: number, dpi: integer, type: string, content: object, thumb: string } }`
#### Delete label template — `DELETE /labeltemplate/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Get label template by ID — `GET /labeltemplate/{id}`
- Params: `id: integer`
- Returns: `200 { labeltemplate: { id: integer, name: string, width: number, height: number, dpi: integer, type: string, content: object, thumb: string } }`
#### Update label template (partial) — `PATCH /labeltemplate/{id}`
- Params: `id: integer, body: { name?: string, width?: number, height?: number, dpi?: integer, type?: string, content?: object }`
- Returns: `200 { labeltemplate: { id: integer, name: string, width: number, height: number, dpi: integer, type: string, content: object, thumb: string } }`
#### Update label template — `PUT /labeltemplate/{id}`
- Params: `id: integer, body: { name?: string, width?: number, height?: number, dpi?: integer, type?: string, content?: object }`
- Returns: `200 { labeltemplate: { id: integer, name: string, width: number, height: number, dpi: integer, type: string, content: object, thumb: string } }`
#### Query ledger by manifest article ID or SKU — `GET /ledger`
- Params: `query: manifestarticle_id?: integer, sku?: string, transaction_type?: string`
- Returns: `200 { ledger: { id: integer, manifestarticle_id: integer, transaction_type: string, amount: number, transaction_text: string, hash_version: integer, prev_hash: string, sku: string, created_at: string }[] }`
#### Add ledger entry — `POST /ledger`
- Params: `body: { manifestarticle_id: integer, transaction_type: string, amount: number, transaction_text: string }`
- Returns: `201 { ledger: { id: integer, manifestarticle_id: integer, transaction_type: string, amount: number, transaction_text: string, hash_version: integer, prev_hash: string, sku: string, created_at: string } }`
#### Query ledger by manifest article ID — `GET /ledger/manifestarticle/{manifestarticleId}`
- Params: `manifestarticleId: integer, query: transaction_type?: string`
- Returns: `200 { ledger: { id: integer, manifestarticle_id: integer, transaction_type: string, amount: number, transaction_text: string, hash_version: integer, prev_hash: string, sku: string, created_at: string }[] }`
#### Query ledger by article SKU — `GET /ledger/sku/{sku}`
- Params: `sku: string, query: transaction_type?: string`
- Returns: `200 { ledger: { id: integer, manifestarticle_id: integer, transaction_type: string, amount: number, transaction_text: string, hash_version: integer, prev_hash: string, sku: string, created_at: string }[] }`
#### List number sequences — `GET /number`
_none_
- Returns: `200 { numbers: { id: integer, type: string, prefix: string, padding: integer, next: integer }[] }`
#### Update number sequence — `PATCH /number/{id}`
- Params: `id: integer, body: { prefix?: string, padding?: integer, next?: integer }`
- Returns: `200 { number: { id: integer, type: string, prefix: string, padding: integer, next: integer } }`
#### List orders — `GET /order`
_none_
- Returns: `200 { orders: { id: integer, number: string, type: string, entityId: integer, date: string, createdAt: string }[] }`
#### Create order — `POST /order`
- Params: `body: { number: string, date: string, lines: { amount: number, net: number, taxrate: number, sku?: string, name?: string, pu?: number, rebate?: number, comment?: string }[], entityId?: integer }`
- Returns: `201 { order: { id: integer, number: string, type: string, entityId: integer, date: string, createdAt: string, lines: { id: integer, sku: string, name: string, pu: number, amount: number, net: number, rebate: number, taxrate: number, comment: string }[] } }`
#### Delete order — `DELETE /order/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Get order — `GET /order/{id}`
- Params: `id: integer`
- Returns: `200 { order: { id: integer, number: string, type: string, entityId: integer, date: string, createdAt: string, lines: { id: integer, sku: string, name: string, pu: number, amount: number, net: number, rebate: number, taxrate: number, comment: string }[] } }`
#### Update order — `PATCH /order/{id}`
- Params: `id: integer, body: { number?: string, date?: string, entityId?: integer, lines?: { amount: number, net: number, taxrate: number, sku?: string, name?: string, pu?: number, rebate?: number, comment?: string }[] }`
- Returns: `200 { order: { id: integer, number: string, type: string, entityId: integer, date: string, createdAt: string, lines: { id: integer, sku: string, name: string, pu: number, amount: number, net: number, rebate: number, taxrate: number, comment: string }[] } }`
#### List printers — `GET /printer`
_none_
- Returns: `200 { printers: { id: integer, company_id: integer, address: string, type: string, model: string, serial: string, sort: integer, desc: string }[] }`
#### Create printer — `POST /printer`
- Params: `body: { address: string, type: string, model?: string, serial?: string, sort?: integer, desc?: string }`
- Returns: `201 { printer: { id: integer, company_id: integer, address: string, type: string, model: string, serial: string, sort: integer, desc: string } }`
#### Reorder printers — `PUT /printer/order`
- Params: `body: { printerIds: integer[] }`
- Returns: `200 { printerIds: integer[] }`
#### Delete printer — `DELETE /printer/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Get printer by ID — `GET /printer/{id}`
- Params: `id: integer`
- Returns: `200 { printer: { id: integer, company_id: integer, address: string, type: string, model: string, serial: string, sort: integer, desc: string } }`
#### Update printer (partial) — `PATCH /printer/{id}`
- Params: `id: integer, body: { address?: string, type?: string, model?: string, serial?: string, sort?: integer, desc?: string }`
- Returns: `200 { printer: { id: integer, company_id: integer, address: string, type: string, model: string, serial: string, sort: integer, desc: string } }`
#### Update printer — `PUT /printer/{id}`
- Params: `id: integer, body: { address?: string, type?: string, model?: string, serial?: string, sort?: integer, desc?: string }`
- Returns: `200 { printer: { id: integer, company_id: integer, address: string, type: string, model: string, serial: string, sort: integer, desc: string } }`
#### List property names — `GET /propertyname`
_none_
- Returns: `200 { propertynames: { id: integer, name: string, sort: integer, exclusive: boolean }[] }`
#### Create property name — `POST /propertyname`
- Params: `body: { name: string, sort?: integer, exclusive?: boolean }`
- Returns: `201 { propertyname: { id: integer, name: string, sort: integer, exclusive: boolean } }`
#### Reorder property names — `PUT /propertyname/order`
- Params: `body: { propertynameIds: integer[] }`
- Returns: `200`
#### Delete property name — `DELETE /propertyname/{id}`
- Params: `id: integer`
- Returns: `200`
#### Update property name — `PATCH /propertyname/{id}`
- Params: `id: integer, body: { name?: string, sort?: integer, exclusive?: boolean }`
- Returns: `200 { propertyname: { id: integer, name: string, sort: integer, exclusive: boolean } }`
#### List quotes — `GET /quote`
_none_
- Returns: `200 { quotes: { id: integer, number: string, type: string, entityId: integer, date: string, createdAt: string }[] }`
#### Create quote — `POST /quote`
- Params: `body: { number: string, date: string, lines: { amount: number, net: number, taxrate: number, sku?: string, name?: string, pu?: number, rebate?: number, comment?: string }[], entityId?: integer }`
- Returns: `201 { quote: { id: integer, number: string, type: string, entityId: integer, date: string, createdAt: string, lines: { id: integer, sku: string, name: string, pu: number, amount: number, net: number, rebate: number, taxrate: number, comment: string }[] } }`
#### Delete quote — `DELETE /quote/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Get quote — `GET /quote/{id}`
- Params: `id: integer`
- Returns: `200 { quote: { id: integer, number: string, type: string, entityId: integer, date: string, createdAt: string, lines: { id: integer, sku: string, name: string, pu: number, amount: number, net: number, rebate: number, taxrate: number, comment: string }[] } }`
#### Update quote — `PATCH /quote/{id}`
- Params: `id: integer, body: { number?: string, date?: string, entityId?: integer, lines?: { amount: number, net: number, taxrate: number, sku?: string, name?: string, pu?: number, rebate?: number, comment?: string }[] }`
- Returns: `200 { quote: { id: integer, number: string, type: string, entityId: integer, date: string, createdAt: string, lines: { id: integer, sku: string, name: string, pu: number, amount: number, net: number, rebate: number, taxrate: number, comment: string }[] } }`
#### Adjust stock manually — `POST /stock/adjust`
- Params: `body: { sku?: string, warehouseId?: integer, amount?: number, text?: string, lines?: { sku: string, amount: number, warehouseId?: integer, text?: string }[] }`
- Returns: `201 { manifest: { id: integer, number: string, type: string, date: string, createdAt: string }, lines: object[], ledger: { id: integer, manifestarticle_id: integer, transaction_type: string, amount: number, transaction_text: string, hash_version: integer, prev_hash: string, sku: string, created_at: string }[] }`
#### List suppliers — `GET /supplier`
_none_
- Returns: `200 { suppliers: { id: integer, name: string, createdAt: string, updatedAt: string }[] }`
#### Create supplier — `POST /supplier`
- Params: `body: { name: string }`
- Returns: `201 { supplier: { id: integer, name: string, createdAt: string, updatedAt: string } }`
#### Delete supplier — `DELETE /supplier/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Update supplier — `PATCH /supplier/{id}`
- Params: `id: integer, body: { name: string }`
- Returns: `200 { supplier: { id: integer, name: string, createdAt: string, updatedAt: string } }`
#### List supplier articles by SKUs — `GET /supplier/{id}/articles`
- Params: `id: integer, query: skus?: string`
- Returns: `200 { articles: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number }, article: { id: integer, sku: string, name: string, slug: string, photos: { sort: integer, fullHash: string, thumbW: integer, thumbH: integer, thumbHash: string }[], eans: string[] } }[] }`
#### Query supplier articles by SKUs (bulk) — `POST /supplier/{id}/articles`
- Params: `id: integer, body?: { skus?: string[] }`
- Returns: `200 { articles: { id: integer, articleId: integer, entityId: integer, supplierName: string, sku: string, pu: number, stock: number, sort: integer, priceId: integer, price: { net: number, taxId: integer, taxRate: number }, article: { id: integer, sku: string, name: string, slug: string, photos: { sort: integer, fullHash: string, thumbW: integer, thumbH: integer, thumbHash: string }[], eans: string[] } }[] }`
#### Delete unit — `DELETE /unit`
- Params: `query: si: string`
- Returns: `204 void`
#### List units — `GET /unit`
_none_
- Returns: `200 { units: { si: string, basesi: string, basesifactor: number, symbol: string, name: string }[] }`
#### Upsert unit — `PUT /unit`
- Params: `body: { si: string, basesi: string, basesifactor: number, symbol: string, name: string }`
- Returns: `200 { unit: { si: string, basesi: string, basesifactor: number, symbol: string, name: string } }`
#### Get a virtual filesystem file — `GET /vfs/{*path}`
- Params: `path: string, query: download?: boolean`
- Returns: `200 string`
#### List warehouses — `GET /warehouse`
_none_
- Returns: `200 { warehouses: { id: integer, name: string, sort: integer }[] }`
#### Create warehouse — `POST /warehouse`
- Params: `body: { name: string, sort?: integer }`
- Returns: `201 { warehouse: { id: integer, name: string, sort: integer } }`
#### Reorder warehouses — `PUT /warehouse/order`
- Params: `body: { warehouseIds: integer[] }`
- Returns: `200 { warehouseIds: integer[] }`
#### Delete warehouse — `DELETE /warehouse/{id}`
- Params: `id: integer`
- Returns: `204 void`
#### Get warehouse by ID — `GET /warehouse/{id}`
- Params: `id: integer`
- Returns: `200 { warehouse: { id: integer, name: string, sort: integer } }`
#### Update warehouse (partial) — `PATCH /warehouse/{id}`
- Params: `id: integer, body: { name?: string, sort?: integer }`
- Returns: `200 { warehouse: { id: integer, name: string, sort: integer } }`
#### Update warehouse — `PUT /warehouse/{id}`
- Params: `id: integer, body: { name?: string, sort?: integer }`
- Returns: `200 { warehouse: { id: integer, name: string, sort: integer } }`
### 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:

View File

@@ -505,85 +505,65 @@ function renderReadme(operations) {
return lines.join('\n');
}
function summarizeSchemaCompact(schema, components = spec.components, depth = 0) {
if (!schema || depth > 4) return '';
const resolved = resolveSchema(schema, components);
if (!resolved) return schemaRefName(schema) || '';
if (resolved.type === 'array') {
const item = summarizeSchemaCompact(resolved.items, components, depth + 1) || 'any';
return `${item}[]`;
}
if (resolved.type === 'object' || resolved.properties) {
const props = Object.keys(resolved.properties || {});
if (props.length === 0) return schemaRefName(schema) || 'object';
if (props.length === 1) {
const k = props[0];
const v = summarizeSchemaCompact(resolved.properties[k], components, depth + 1);
return v ? `{ ${k}: ${v} }` : `{ ${k} }`;
}
const inner = props.map((k) => {
const sub = resolved.properties[k];
if (sub && sub.type === 'array') {
const subItem = summarizeSchemaCompact(sub.items, components, depth + 1) || 'any';
return `${k}: ${subItem}[]`;
}
return k;
});
return `{ ${inner.join(', ')} }`;
}
if (resolved.type) return resolved.type;
return schemaRefName(schema) || '';
}
function summarizeParamSchema(schema, components) {
/**
* Compact one-line schema summary. Every leaf carries its explicit type
* (`string`, `integer`, `number`, `boolean`, `object`), arrays render as `T[]`,
* and objects render as `{ key: type, … }` at every nesting level.
*
* @param {object} [schema]
* @param {object} [components]
* @param {number} [depth]
* @param {boolean} [markOptional] suffix non-required props with `?` (request bodies)
* @returns {string}
*/
function summarizeSchema(schema, components = spec.components, depth = 0, markOptional = false) {
if (!schema) return '';
if (depth > 6) return 'object';
const resolved = resolveSchema(schema, components);
if (!resolved) return schemaRefName(schema) || '';
if (resolved.$ref) return schemaRefName(resolved) || '';
if (resolved.type === 'array') {
const item = summarizeParamSchema(resolved.items, components) || 'any';
const item = summarizeSchema(resolved.items, components, depth + 1, markOptional) || 'any';
return `${item}[]`;
}
if (resolved.type === 'object' || resolved.properties) {
const required = new Set(resolved.required || []);
const props = Object.keys(resolved.properties || {});
if (props.length === 0) {
return schemaRefName(schema) || 'object';
let entries = Object.entries(resolved.properties || {});
if (entries.length === 0) return 'object';
// Required props first, then optional ones (stable within each group).
if (markOptional) {
entries = entries
.map(([name], i) => ({ name, i }))
.sort((a, b) => (required.has(a.name) ? 0 : 1) - (required.has(b.name) ? 0 : 1) || a.i - b.i)
.map(({ name }) => [name, resolved.properties[name]]);
}
// Prioritize required props before optional props
const sortedProps = [...props].sort((a, b) => {
const reqA = required.has(a) ? 0 : 1;
const reqB = required.has(b) ? 0 : 1;
return reqA - reqB;
});
const formattedProps = sortedProps.map((k) => {
const isOpt = !required.has(k);
const propSchema = resolved.properties[k];
const optSuffix = isOpt ? '?' : '';
if (propSchema?.type === 'array') {
const subItem = summarizeParamSchema(propSchema.items, components) || 'any';
return `${k}${optSuffix}: ${subItem}[]`;
}
if (propSchema?.type === 'object' && propSchema.properties) {
const sub = summarizeParamSchema(propSchema, components);
return `${k}${optSuffix}: ${sub}`;
}
if ((k === 'sku' || sortedProps.length === 1) && propSchema?.type) {
return `${k}${optSuffix}: ${propSchema.type}`;
}
return `${k}${optSuffix}`;
const parts = entries.map(([name, prop]) => {
const opt = markOptional && !required.has(name) ? '?' : '';
const type = summarizeSchema(prop, components, depth + 1, markOptional) || 'any';
return `${name}${opt}: ${type}`;
});
return `{ ${formattedProps.join(', ')} }`;
return `{ ${parts.join(', ')} }`;
}
if (resolved.type) return resolved.type;
return schemaRefName(schema) || '';
}
/**
* Always-visible type for a path/query parameter, so declarations are uniform.
* Falls back to `string` only when the parameter schema omits a type entirely.
* @param {object} param
* @returns {string}
*/
function paramType(param) {
return summarizeSchema(param?.schema, spec.components) || 'string';
}
function summarizeOperationParams(operation) {
const parts = [];
const params = operation.parameters || [];
@@ -592,13 +572,12 @@ function summarizeOperationParams(operation) {
for (const p of params) {
if (p.in === 'header' || p.in === 'cookie') continue;
const type = p.schema?.type ? `:${p.schema.type}` : '';
const isOpt = !p.required;
const optSuffix = isOpt ? '?' : '';
if (p.in === 'path') {
pathParams.push(`${p.name}${type}`);
pathParams.push(`${p.name}: ${paramType(p)}`);
} else if (p.in === 'query') {
queryParams.push(`${p.name}${optSuffix}${type}`);
queryParams.push(`${p.name}${optSuffix}: ${paramType(p)}`);
}
}
@@ -615,11 +594,11 @@ function summarizeOperationParams(operation) {
const content = operation.requestBody.content;
if (content['application/json']?.schema) {
const s = content['application/json'].schema;
const sub = summarizeParamSchema(s, spec.components);
const sub = summarizeSchema(s, spec.components, 0, true);
parts.push(`${bodyPrefix}: ${sub || 'json'}`);
} else if (content['multipart/form-data']) {
const formSchema = content['multipart/form-data'].schema;
const formSub = summarizeParamSchema(formSchema, spec.components);
const formSub = summarizeSchema(formSchema, spec.components, 0, true);
parts.push(`form: ${formSub || 'multipart'}`);
} else {
const ct = Object.keys(content)[0];
@@ -662,7 +641,7 @@ function summarizeOperationReturns(operation) {
continue;
}
const s = resp.content[ct]?.schema;
const sub = summarizeSchemaCompact(s);
const sub = summarizeSchema(s);
if (sub) {
parts.push(`${code} ${sub}`);
} else {
@@ -680,20 +659,23 @@ function renderRoutesOverview(operations, title = 'Dash API Routes Overview') {
lines.push('');
lines.push('### Parameter Notation');
lines.push('');
lines.push('- **Required parameters** have no `?` (e.g. `sku:string`, `categoryId`, `query: si:string`, `body: { name }`).');
lines.push('- **Optional parameters** are marked with `?` (e.g. `query: categoryId?:integer`, `track_stock?`, `body?: ...`).');
lines.push('- **Every value carries its type** — `string`, `integer`, `number`, `boolean`, `object`, arrays as `type[]`.');
lines.push('- **Required parameters** have no `?` (e.g. `sku: string`, `id: integer`, `query: si: string`, `body: { name: string }`).');
lines.push('- **Optional parameters** are marked with `?` (e.g. `query: limit?: integer`, `body: { sort?: integer }`, `body?: { … }`).');
lines.push('- **Path parameters** match `{param}` in the route URL.');
lines.push('- **Query parameters** are prefixed with `query: ...`.');
lines.push('- **Request bodies** are prefixed with `body: ...` (or `body?: ...` if optional).');
lines.push('- **Request bodies** are prefixed with `body: ...` (or `body?: ...` if the whole body is optional).');
lines.push('- **Response objects** use the same notation, so `201 { article: { … } }` means a JSON object with an `article` property.');
lines.push('');
lines.push('### Routes');
lines.push('');
lines.push('| Method | Route | Params | Return Type | Summary |');
lines.push('|:---|:---|:---|:---|:---|');
for (const op of operations) {
const method = op.method.toUpperCase();
const summary = (op.summary || '').replace(/[\r\n|]+/g, ' ').trim();
const paramsStr = op.params === '—' ? '—' : `\`${op.params.replace(/\|/g, '\\|')}\``;
const returnsStr = op.returns === '—' ? '—' : `\`${op.returns.replace(/\|/g, '\\|')}\``;
lines.push(`| \`${method}\` | \`${op.path}\` | ${paramsStr} | ${returnsStr} | ${summary} |`);
const summary = (op.summary || '').replace(/[\r\n]+/g, ' ').trim();
const heading = summary ? `${summary} — \`${method} ${op.path}\`` : `\`${method} ${op.path}\``;
lines.push(`#### ${heading}`);
lines.push(op.params === '—' ? '_none_' : `- Params: \`${op.params}\``);
lines.push(op.returns === '—' ? '_no response body_' : `- Returns: \`${op.returns}\``);
}
lines.push('');
return lines.join('\n');