u
This commit is contained in:
@@ -10,46 +10,46 @@ Params: path values first, then `query:` and `body:` (`body?` = optional body).
|
||||
### Reusable types
|
||||
|
||||
- `T1` = `{ article: T2 }`
|
||||
- `T2` = `{ id: int, sku: str, name: str, slug: str, desc: str|null, seo: str|null, track_stock: bool, unitamount: num|null, weight: num|null, unit: T31, brand: T28|null, categoryIds: int[], photos: T26[], eans: str[], prices: T35[], suppliers: T12[] }`
|
||||
- `T2` = `{ id: int, sku: str, name: str, slug: str, desc: str|null, seo: str|null, track_stock: bool, unitamount: num|null, weight: num|null, unit: T31, brand: T28|null, categoryIds: int[], photos: T26[], eans: str[], prices: T37[], suppliers: T12[] }`
|
||||
- `T3` = `{ delivery: T4 }`
|
||||
- `T4` = `{ id: int, number: str, type: str, supplierId: int|null, date: str, lines: T20[], files: T9[], externalNumber?: str|null, createdAt?: str, ledger?: T40 }`
|
||||
- `T4` = `{ id: int, number: str, type: str, supplierId: int|null, date: str, lines: T21[], files: T9[], externalNumber?: str|null, createdAt?: str, ledger?: T41 }`
|
||||
- `T5` = `{ labeltemplate: T6 }`
|
||||
- `T6` = `{ id: int, name: str, width: num, height: num, dpi: int, type: str, content: T16, thumb?: str|null }`
|
||||
- `T6` = `{ id: int, name: str, width: num, height: num, dpi: int, type: str, content: T17, thumb?: str|null }`
|
||||
- `T7` = `{ order: T11 }`
|
||||
- `T8` = `{ quote: T11 }`
|
||||
- `T9` = `{ id: int, manifestId: int, fileId: int, sort: int, hash: str, mimetype: str, name: str, size: int, created?: str, modified?: str, thumbavif?: str|null, thumbx?: int|null, thumby?: int|null, meta?: { [k]: str }|null }`
|
||||
- `T10` = `{ id: int, name: str, pairingpin?: str|null, token?: str|null, pairedAt?: str|null, clientserial?: str|null, rootCategoryId?: int|null, syncRootArticles?: bool, lastseenAt?: str|null, updatedAt?: str|null, categoryIds?: int[] }`
|
||||
- `T11` = `{ id: int, number: str, type: str, entityId: int|null, date: str, lines: T20[], createdAt?: str }`
|
||||
- `T11` = `{ id: int, number: str, type: str, entityId: int|null, date: str, lines: T21[], createdAt?: str }`
|
||||
- `T12` = `{ id: int, articleId: int, entityId: int, pu: num, sort: int, supplierName?: str|null, sku?: str|null, stock?: num|null, priceId?: int|null, price?: T43|null }`
|
||||
- `T13` = `{ id: int, entityId: int, addressType: str, firstName?: str|null, name?: str|null, street?: str|null, streetNumber?: str|null, zip?: str|null, city?: str|null, county?: str|null }`
|
||||
- `T14` = `{ ledger: T15[] }`
|
||||
- `T15` = `{ id: int, manifestarticle_id: int, transaction_type: str, amount: num, transaction_text: str, hash_version: int, prev_hash?: str, sku?: str|null, created_at?: str }`
|
||||
- `T16` = `{ objects: T21[] }`
|
||||
- `T16` = `{ id: int, name: str, sort: int, exclusive: bool, values: T32[], articleCount?: int }`
|
||||
- `T17` = `{ objects: T22[] }`
|
||||
- `T18` = `{ printer: T23 }`
|
||||
- `T19` = `{ entity: T27 }`
|
||||
- `T20` = `{ id: int, sku: str|null, name: str|null, pu: num, amount: num, net: num, rebate: num, taxrate: num, comment: str|null }`
|
||||
- `T21` = `{ id: str, type: str, x: num, y: num, w?: num, h?: num, text?: str, font?: str, fontSize?: num, barcodeFormat?: str }`
|
||||
- `T18` = `{ objects: T23[] }`
|
||||
- `T19` = `{ printer: T24 }`
|
||||
- `T20` = `{ entity: T27 }`
|
||||
- `T21` = `{ id: int, sku: str|null, name: str|null, pu: num, amount: num, net: num, rebate: num, taxrate: num, comment: str|null }`
|
||||
- `T22` = `{ id: str, type: str, x: num, y: num, w?: num, h?: num, text?: str, font?: str, fontSize?: num, barcodeFormat?: str }`
|
||||
- `T23` = `{ id: int, company_id: int, address: str, type: str, sort: int, model?: str|null, serial?: str|null, desc?: str|null }`
|
||||
- `T24` = `{ id: int, name: str, sort: int, exclusive: bool, values: T38[] }`
|
||||
- `T23` = `{ id: str, type: str, x: num, y: num, w?: num, h?: num, text?: str, font?: str, fontSize?: num, barcodeFormat?: str }`
|
||||
- `T24` = `{ id: int, company_id: int, address: str, type: str, sort: int, model?: str|null, serial?: str|null, desc?: str|null }`
|
||||
- `T25` = `{ amount: num, net: num, taxrate: num, sku?: str|null, name?: str|null, pu?: num, rebate?: num, comment?: str|null }`
|
||||
- `T26` = `{ sort: int, fullHash: str, fullW: int, fullH: int, fullSize: int, thumbW: int, thumbH: int, thumbHash: str }`
|
||||
- `T27` = `{ id: int, customergroupId: int, firstName: str|null, name: str, number: str|null, createdAt: str, updatedAt: str }`
|
||||
- `T28` = `{ name: str, id?: int|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null }`
|
||||
- `T29` = `{ id: int, companyuser_id: int, provider: str, model: str, created_at: str, updated_at: str, state: str }`
|
||||
- `T30` = `{ article: T33 }`
|
||||
- `T30` = `{ article: T35 }`
|
||||
- `T31` = `{ si: str, basesi: str, basesifactor: num, symbol?: str|null, name?: str|null }`
|
||||
- `T32` = `{ id: int, iso639: str, name: str, taxrate: num, reducedtaxrate: num }`
|
||||
- `T33` = `{ id: int, categoryId: int, name: str, sku: str, track_stock: bool }`
|
||||
- `T34` = `{ id: int, email: str, selectedCompanyId: int|null, picture?: str }`
|
||||
- `T35` = `{ minmultiplier: num, net: num, taxRate: num, customergroupId: int }`
|
||||
- `T36` = `{ fullHash: str, thumbW: int, thumbH: int, thumbHash: str }`
|
||||
- `T37` = `{ id: int, entityId: int, contactType: str, contact: str }`
|
||||
- `T38` = `{ id: int, attributeId: int, value: str, sort: int }`
|
||||
- `T39` = `{ id: int, name: str, createdAt: str, updatedAt: str }`
|
||||
- `T40` = `{ totalPositions: int, completelyOnLedgerPositions: int }`
|
||||
- `T41` = `{ id: int, name: str, sort: int, exclusive: bool }`
|
||||
- `T32` = `{ id: int, attributeId: int, value: str, sort: int, articleCount?: int }`
|
||||
- `T33` = `{ id: int, name: str, sort: int, exclusive: bool, articleCount?: int }`
|
||||
- `T34` = `{ id: int, iso639: str, name: str, taxrate: num, reducedtaxrate: num }`
|
||||
- `T35` = `{ id: int, categoryId: int, name: str, sku: str, track_stock: bool }`
|
||||
- `T36` = `{ id: int, email: str, selectedCompanyId: int|null, picture?: str }`
|
||||
- `T37` = `{ minmultiplier: num, net: num, taxRate: num, customergroupId: int }`
|
||||
- `T38` = `{ fullHash: str, thumbW: int, thumbH: int, thumbHash: str }`
|
||||
- `T39` = `{ id: int, entityId: int, contactType: str, contact: str }`
|
||||
- `T40` = `{ id: int, name: str, createdAt: str, updatedAt: str }`
|
||||
- `T41` = `{ totalPositions: int, completelyOnLedgerPositions: int }`
|
||||
- `T42` = `{ warehouse: T44 }`
|
||||
- `T43` = `{ net: num, taxId: int, taxRate?: num|null }`
|
||||
- `T44` = `{ id: int, name: str, sort: int }`
|
||||
@@ -113,7 +113,7 @@ _none_
|
||||
- Returns: `201 T30`
|
||||
#### Attach an existing article as a child to a parent article — `PUT /article/{sku}/children`
|
||||
- Params: `sku: str, body: { sku: str, attributeValueId?: int, value?: str, reparent?: bool }`
|
||||
- Returns: `200 { article: T33, children: { id: int, sku: str, name: str, parentsort: int, attributeValueId: int, attributeValue: str }[] }`
|
||||
- Returns: `200 { article: T35, children: { id: int, sku: str, name: str, parentsort: int, attributeValueId: int, attributeValue: str }[] }`
|
||||
#### Remove a child article from a parent article — `DELETE /article/{sku}/children/{childSku}`
|
||||
- Params: `sku: str, childSku: str, query: deleteArticle?: bool`
|
||||
- Returns: `200 { success: bool, deleted: bool }`
|
||||
@@ -182,19 +182,19 @@ _none_
|
||||
|
||||
#### List attribute names — `GET /attributename`
|
||||
_none_
|
||||
- Returns: `200 { attributenames: T24[] }`
|
||||
- Returns: `200 { attributenames: T16[] }`
|
||||
#### Create attribute name — `POST /attributename`
|
||||
- Params: `body: { name: str, sort?: int, exclusive?: bool }`
|
||||
- Returns: `201 { attributename: T24 }`
|
||||
- Returns: `201 { attributename: T16 }`
|
||||
#### Reorder attribute names — `PUT /attributename/order`
|
||||
- Params: `body: { attributenameIds: int[] }`
|
||||
- Returns: `200 { ok: bool }`
|
||||
#### List values for an attribute — `GET /attributename/{attributeId}/value`
|
||||
- Params: `attributeId: int`
|
||||
- Returns: `200 { values: T38[] }`
|
||||
- Returns: `200 { values: T32[] }`
|
||||
#### Create value for an attribute — `POST /attributename/{attributeId}/value`
|
||||
- Params: `attributeId: int, body: { value: str, sort?: int }`
|
||||
- Returns: `201 { attributevalue: T38 }`
|
||||
- Returns: `201 { attributevalue: T32 }`
|
||||
#### Reorder values of an attribute — `PUT /attributename/{attributeId}/value/order`
|
||||
- Params: `attributeId: int, body: { attributevalueIds: int[] }`
|
||||
- Returns: `200 { ok: bool }`
|
||||
@@ -203,7 +203,7 @@ _none_
|
||||
- Returns: `200 { ok: bool }`
|
||||
#### Update attribute name — `PATCH /attributename/{id}`
|
||||
- Params: `id: int, body: { name?: str, sort?: int, exclusive?: bool }`
|
||||
- Returns: `200 { attributename: T24 }`
|
||||
- Returns: `200 { attributename: T16 }`
|
||||
|
||||
### Section: /attributevalue
|
||||
|
||||
@@ -212,28 +212,28 @@ _none_
|
||||
- Returns: `200 { ok: bool }`
|
||||
#### Update attribute value — `PATCH /attributevalue/{id}`
|
||||
- Params: `id: int, body: { value?: str, sort?: int }`
|
||||
- Returns: `200 { attributevalue: T38 }`
|
||||
- Returns: `200 { attributevalue: T32 }`
|
||||
#### Delete attribute value image — `DELETE /attributevalue/{id}/image`
|
||||
- Params: `id: int`
|
||||
- Returns: `200 { attributevalue: { id: int, thumbW: int|null, thumbH: int|null, thumbHash: str|null, pics: T36[] } }`
|
||||
- Returns: `200 { attributevalue: { id: int, thumbW: int|null, thumbH: int|null, thumbHash: str|null, pics: T38[] } }`
|
||||
#### Add or replace attribute value image — `POST /attributevalue/{id}/image`
|
||||
- Params: `id: int, image/avif`
|
||||
- Returns: `201 { attributevalue: { id: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, pics: T36[] } }`
|
||||
- Returns: `201 { attributevalue: { id: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, pics: T38[] } }`
|
||||
|
||||
### Section: /auth
|
||||
|
||||
#### Login with Google ID token — `POST /auth/login`
|
||||
- Params: `body: { idToken: str }`
|
||||
- Returns: `200 { message: str, user: T34 }`
|
||||
- Returns: `200 { message: str, user: T36 }`
|
||||
#### Logout — `POST /auth/logout`
|
||||
_none_
|
||||
- Returns: `200 { message: str }`
|
||||
#### Current user — `GET /auth/me`
|
||||
_none_
|
||||
- Returns: `200 { user: T34, googleClientId: str }`
|
||||
- Returns: `200 { user: T36, googleClientId: str }`
|
||||
#### Set selected company — `PUT /auth/selected-company`
|
||||
- Params: `body: { companyId: int }`
|
||||
- Returns: `200 { user: T34 }`
|
||||
- Returns: `200 { user: T36 }`
|
||||
|
||||
### Section: /brand
|
||||
|
||||
@@ -242,7 +242,7 @@ _none_
|
||||
- Returns: `200 { brands: { id: int, name: str, articleCount: int, pics: { fullHash: str, thumbW: int, thumbH: int, thumbHash: str, smallThumbW?: int|null, smallThumbH?: int|null, smallThumbBinary?: str|null }[], gsprpinfo?: str|null }[], total: int, offset: int, limit: int }`
|
||||
#### Create brand — `POST /brand`
|
||||
- Params: `body: { name: str, gsprpinfo?: str }`
|
||||
- Returns: `201 { brand: { id: int, name: str, pics: T36[], gsprpinfo?: str|null } }`
|
||||
- Returns: `201 { brand: { id: int, name: str, pics: T38[], gsprpinfo?: str|null } }`
|
||||
#### Delete brand — `DELETE /brand/{id}`
|
||||
- Params: `id: int`
|
||||
- Returns: `204 void`
|
||||
@@ -251,10 +251,10 @@ _none_
|
||||
- Returns: `200 { brand: { id: int, name: str, touchedArticleCount: int, gsprpinfo?: str|null } }`
|
||||
#### Delete brand image — `DELETE /brand/{id}/image`
|
||||
- Params: `id: int`
|
||||
- Returns: `200 { brand: { id: int, thumbW: int|null, thumbH: int|null, thumbHash: str|null, pics: T36[] } }`
|
||||
- Returns: `200 { brand: { id: int, thumbW: int|null, thumbH: int|null, thumbHash: str|null, pics: T38[] } }`
|
||||
#### Add or replace brand image — `POST /brand/{id}/image`
|
||||
- Params: `id: int, image/avif`
|
||||
- Returns: `201 { brand: { id: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, pics: T36[] } }`
|
||||
- Returns: `201 { brand: { id: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, pics: T38[] } }`
|
||||
|
||||
### Section: /category
|
||||
|
||||
@@ -305,10 +305,10 @@ _none_
|
||||
|
||||
#### List companies — `GET /company`
|
||||
_none_
|
||||
- Returns: `200 { companies: T32[] }`
|
||||
- Returns: `200 { companies: T34[] }`
|
||||
#### Create company — `POST /company`
|
||||
- Params: `body: { iso639: str, name: str, taxrate: num, reducedtaxrate: num }`
|
||||
- Returns: `201 { company: T32, user: T34 }`
|
||||
- Returns: `201 { company: T34, user: T36 }`
|
||||
#### Get company history — `GET /company/history`
|
||||
- Params: `query: limit?: int`
|
||||
- Returns: `200 { history: { id: int, date: str, text: str, companyuserId?: int|null }[], truncated: bool }`
|
||||
@@ -332,7 +332,7 @@ _none_
|
||||
- Returns: `204 void`
|
||||
#### Update company — `PUT /company/{id}`
|
||||
- Params: `id: int, body: { iso639: str, name: str, taxrate: num, reducedtaxrate: num }`
|
||||
- Returns: `200 { company: T32 }`
|
||||
- Returns: `200 { company: T34 }`
|
||||
|
||||
### Section: /customergroup
|
||||
|
||||
@@ -356,7 +356,7 @@ _none_
|
||||
|
||||
#### List deliveries — `GET /delivery`
|
||||
_none_
|
||||
- Returns: `200 { deliveries: { id: int, number: str, type: str, supplierId: int|null, date: str, externalNumber?: str|null, createdAt?: str, ledger?: T40 }[] }`
|
||||
- Returns: `200 { deliveries: { id: int, number: str, type: str, supplierId: int|null, date: str, externalNumber?: str|null, createdAt?: str, ledger?: T41 }[] }`
|
||||
#### Create delivery — `POST /delivery`
|
||||
- Params: `body: { externalNumber: str, date: str, lines: T25[], supplierId?: int|null, files?: { mimetype: str, name: str, content: str, sort?: int, size?: int, hash?: str, created?: str, modified?: str, meta?: { [k]: str } }[] }`
|
||||
- Returns: `201 T3`
|
||||
@@ -392,7 +392,7 @@ _none_
|
||||
- Returns: `200 { entities: T27[] }`
|
||||
#### Create entity — `POST /entity`
|
||||
- Params: `body: { customergroupId: int, name: str, firstName?: str|null, number?: str }`
|
||||
- Returns: `201 T19`
|
||||
- Returns: `201 T20`
|
||||
#### Peek next customer number — `GET /entity/next-number`
|
||||
_none_
|
||||
- Returns: `200 { number: str }`
|
||||
@@ -410,25 +410,25 @@ _none_
|
||||
- Returns: `200 { address: T13 }`
|
||||
#### List entity contacts — `GET /entity/{entityId}/contact`
|
||||
- Params: `entityId: int`
|
||||
- Returns: `200 { contacts: T37[] }`
|
||||
- Returns: `200 { contacts: T39[] }`
|
||||
#### Create entity contact — `POST /entity/{entityId}/contact`
|
||||
- Params: `entityId: int, body: { contactType: str, contact: str }`
|
||||
- Returns: `201 { contact: T37 }`
|
||||
- Returns: `201 { contact: T39 }`
|
||||
#### Delete entity contact — `DELETE /entity/{entityId}/contact/{id}`
|
||||
- Params: `entityId: int, id: int`
|
||||
- Returns: `204 void`
|
||||
#### Update entity contact — `PATCH /entity/{entityId}/contact/{id}`
|
||||
- Params: `entityId: int, id: int, body: { contactType?: str, contact?: str }`
|
||||
- Returns: `200 { contact: T37 }`
|
||||
- Returns: `200 { contact: T39 }`
|
||||
#### Delete entity — `DELETE /entity/{id}`
|
||||
- Params: `id: int`
|
||||
- Returns: `204 void`
|
||||
#### Get entity — `GET /entity/{id}`
|
||||
- Params: `id: int`
|
||||
- Returns: `200 T19`
|
||||
- Returns: `200 T20`
|
||||
#### Update entity — `PATCH /entity/{id}`
|
||||
- Params: `id: int, body: { name?: str, firstName?: str|null, number?: str|null }`
|
||||
- Returns: `200 T19`
|
||||
- Returns: `200 T20`
|
||||
|
||||
### Section: /events
|
||||
|
||||
@@ -470,7 +470,7 @@ _none_
|
||||
_none_
|
||||
- Returns: `200 { labeltemplates: { id: int, name: str, width: num, height: num, dpi: int, type: str, thumb?: str|null }[] }`
|
||||
#### Create label template — `POST /labeltemplate`
|
||||
- Params: `body: { name: str, width: num, height: num, dpi: int, type: str, content: T17 }`
|
||||
- Params: `body: { name: str, width: num, height: num, dpi: int, type: str, content: T18 }`
|
||||
- Returns: `201 T5`
|
||||
#### Delete label template — `DELETE /labeltemplate/{id}`
|
||||
- Params: `id: int`
|
||||
@@ -479,10 +479,10 @@ _none_
|
||||
- Params: `id: int`
|
||||
- Returns: `200 T5`
|
||||
#### Update label template (partial) — `PATCH /labeltemplate/{id}`
|
||||
- Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: T17 }`
|
||||
- Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: T18 }`
|
||||
- Returns: `200 T5`
|
||||
#### Update label template — `PUT /labeltemplate/{id}`
|
||||
- Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: T17 }`
|
||||
- Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: T18 }`
|
||||
- Returns: `200 T5`
|
||||
|
||||
### Section: /ledger
|
||||
@@ -606,10 +606,10 @@ _none_
|
||||
|
||||
#### List printers — `GET /printer`
|
||||
_none_
|
||||
- Returns: `200 { printers: T23[] }`
|
||||
- Returns: `200 { printers: T24[] }`
|
||||
#### Create printer — `POST /printer`
|
||||
- Params: `body: { address: str, type: str, model?: str|null, serial?: str|null, sort?: int, desc?: str|null }`
|
||||
- Returns: `201 T18`
|
||||
- Returns: `201 T19`
|
||||
#### Reorder printers — `PUT /printer/order`
|
||||
- Params: `body: { printerIds: int[] }`
|
||||
- Returns: `200 { printerIds: int[] }`
|
||||
@@ -618,22 +618,22 @@ _none_
|
||||
- Returns: `204 void`
|
||||
#### Get printer by ID — `GET /printer/{id}`
|
||||
- Params: `id: int`
|
||||
- Returns: `200 T18`
|
||||
- Returns: `200 T19`
|
||||
#### Update printer (partial) — `PATCH /printer/{id}`
|
||||
- Params: `id: int, body: { address?: str, type?: str, model?: str|null, serial?: str|null, sort?: int, desc?: str|null }`
|
||||
- Returns: `200 T18`
|
||||
- Returns: `200 T19`
|
||||
#### Update printer — `PUT /printer/{id}`
|
||||
- Params: `id: int, body: { address?: str, type?: str, model?: str|null, serial?: str|null, sort?: int, desc?: str|null }`
|
||||
- Returns: `200 T18`
|
||||
- Returns: `200 T19`
|
||||
|
||||
### Section: /propertyname
|
||||
|
||||
#### List property names — `GET /propertyname`
|
||||
_none_
|
||||
- Returns: `200 { propertynames: T41[] }`
|
||||
- Returns: `200 { propertynames: T33[] }`
|
||||
#### Create property name — `POST /propertyname`
|
||||
- Params: `body: { name: str, sort?: int, exclusive?: bool }`
|
||||
- Returns: `201 { propertyname: T41 }`
|
||||
- Returns: `201 { propertyname: T33 }`
|
||||
#### Reorder property names — `PUT /propertyname/order`
|
||||
- Params: `body: { propertynameIds: int[] }`
|
||||
- Returns: `200 { ok: bool }`
|
||||
@@ -642,7 +642,7 @@ _none_
|
||||
- Returns: `200 { ok: bool }`
|
||||
#### Update property name — `PATCH /propertyname/{id}`
|
||||
- Params: `id: int, body: { name?: str, sort?: int, exclusive?: bool }`
|
||||
- Returns: `200 { propertyname: T41 }`
|
||||
- Returns: `200 { propertyname: T33 }`
|
||||
|
||||
### Section: /public
|
||||
|
||||
@@ -720,16 +720,16 @@ _none_
|
||||
|
||||
#### List suppliers — `GET /supplier`
|
||||
_none_
|
||||
- Returns: `200 { suppliers: T39[] }`
|
||||
- Returns: `200 { suppliers: T40[] }`
|
||||
#### Create supplier — `POST /supplier`
|
||||
- Params: `body: { name: str }`
|
||||
- Returns: `201 { supplier: T39 }`
|
||||
- Returns: `201 { supplier: T40 }`
|
||||
#### Delete supplier — `DELETE /supplier/{id}`
|
||||
- Params: `id: int`
|
||||
- Returns: `204 void`
|
||||
#### Update supplier — `PATCH /supplier/{id}`
|
||||
- Params: `id: int, body: { name: str }`
|
||||
- Returns: `200 { supplier: T39 }`
|
||||
- Returns: `200 { supplier: T40 }`
|
||||
#### List supplier articles by SKUs — `GET /supplier/{id}/articles`
|
||||
- Params: `id: int, query: skus?: string`
|
||||
- Returns: `200 { articles: { id: int, articleId: int, entityId: int, pu: num, sort: int, article: { id: int, sku: str, name?: str|null, slug?: str|null, photos?: { sort: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str }[], eans?: str[] }, supplierName?: str|null, sku?: str|null, stock?: num|null, priceId?: int|null, price?: T43|null }[] }`
|
||||
|
||||
@@ -10,42 +10,42 @@ Params: path values first, then `query:` and `body:` (`body?` = optional body).
|
||||
### Reusable types
|
||||
|
||||
- `T1` = `{ article: T2 }`
|
||||
- `T2` = `{ id: int, sku: str, name: str, slug: str, desc: str|null, seo: str|null, track_stock: bool, unitamount: num|null, weight: num|null, unit: T29, brand: T27|null, categoryIds: int[], photos: T25[], eans: str[], prices: T31[], suppliers: T11[] }`
|
||||
- `T2` = `{ id: int, sku: str, name: str, slug: str, desc: str|null, seo: str|null, track_stock: bool, unitamount: num|null, weight: num|null, unit: T29, brand: T27|null, categoryIds: int[], photos: T25[], eans: str[], prices: T33[], suppliers: T11[] }`
|
||||
- `T3` = `{ delivery: T4 }`
|
||||
- `T4` = `{ id: int, number: str, type: str, supplierId: int|null, date: str, lines: T19[], files: T9[], externalNumber?: str|null, createdAt?: str, ledger?: T36 }`
|
||||
- `T4` = `{ id: int, number: str, type: str, supplierId: int|null, date: str, lines: T20[], files: T9[], externalNumber?: str|null, createdAt?: str, ledger?: T37 }`
|
||||
- `T5` = `{ labeltemplate: T6 }`
|
||||
- `T6` = `{ id: int, name: str, width: num, height: num, dpi: int, type: str, content: T15, thumb?: str|null }`
|
||||
- `T6` = `{ id: int, name: str, width: num, height: num, dpi: int, type: str, content: T16, thumb?: str|null }`
|
||||
- `T7` = `{ order: T10 }`
|
||||
- `T8` = `{ quote: T10 }`
|
||||
- `T9` = `{ id: int, manifestId: int, fileId: int, sort: int, hash: str, mimetype: str, name: str, size: int, created?: str, modified?: str, thumbavif?: str|null, thumbx?: int|null, thumby?: int|null, meta?: { [k]: str }|null }`
|
||||
- `T10` = `{ id: int, number: str, type: str, entityId: int|null, date: str, lines: T19[], createdAt?: str }`
|
||||
- `T10` = `{ id: int, number: str, type: str, entityId: int|null, date: str, lines: T20[], createdAt?: str }`
|
||||
- `T11` = `{ id: int, articleId: int, entityId: int, pu: num, sort: int, supplierName?: str|null, sku?: str|null, stock?: num|null, priceId?: int|null, price?: T39|null }`
|
||||
- `T12` = `{ id: int, entityId: int, addressType: str, firstName?: str|null, name?: str|null, street?: str|null, streetNumber?: str|null, zip?: str|null, city?: str|null, county?: str|null }`
|
||||
- `T13` = `{ ledger: T14[] }`
|
||||
- `T14` = `{ id: int, manifestarticle_id: int, transaction_type: str, amount: num, transaction_text: str, hash_version: int, prev_hash?: str, sku?: str|null, created_at?: str }`
|
||||
- `T15` = `{ objects: T20[] }`
|
||||
- `T15` = `{ id: int, name: str, sort: int, exclusive: bool, values: T30[], articleCount?: int }`
|
||||
- `T16` = `{ objects: T21[] }`
|
||||
- `T17` = `{ printer: T22 }`
|
||||
- `T18` = `{ entity: T26 }`
|
||||
- `T19` = `{ id: int, sku: str|null, name: str|null, pu: num, amount: num, net: num, rebate: num, taxrate: num, comment: str|null }`
|
||||
- `T20` = `{ id: str, type: str, x: num, y: num, w?: num, h?: num, text?: str, font?: str, fontSize?: num, barcodeFormat?: str }`
|
||||
- `T17` = `{ objects: T22[] }`
|
||||
- `T18` = `{ printer: T23 }`
|
||||
- `T19` = `{ entity: T26 }`
|
||||
- `T20` = `{ id: int, sku: str|null, name: str|null, pu: num, amount: num, net: num, rebate: num, taxrate: num, comment: str|null }`
|
||||
- `T21` = `{ id: str, type: str, x: num, y: num, w?: num, h?: num, text?: str, font?: str, fontSize?: num, barcodeFormat?: str }`
|
||||
- `T22` = `{ id: int, company_id: int, address: str, type: str, sort: int, model?: str|null, serial?: str|null, desc?: str|null }`
|
||||
- `T23` = `{ id: int, name: str, sort: int, exclusive: bool, values: T34[] }`
|
||||
- `T22` = `{ id: str, type: str, x: num, y: num, w?: num, h?: num, text?: str, font?: str, fontSize?: num, barcodeFormat?: str }`
|
||||
- `T23` = `{ id: int, company_id: int, address: str, type: str, sort: int, model?: str|null, serial?: str|null, desc?: str|null }`
|
||||
- `T24` = `{ amount: num, net: num, taxrate: num, sku?: str|null, name?: str|null, pu?: num, rebate?: num, comment?: str|null }`
|
||||
- `T25` = `{ sort: int, fullHash: str, fullW: int, fullH: int, fullSize: int, thumbW: int, thumbH: int, thumbHash: str }`
|
||||
- `T26` = `{ id: int, customergroupId: int, firstName: str|null, name: str, number: str|null, createdAt: str, updatedAt: str }`
|
||||
- `T27` = `{ name: str, id?: int|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null }`
|
||||
- `T28` = `{ article: T30 }`
|
||||
- `T28` = `{ article: T32 }`
|
||||
- `T29` = `{ si: str, basesi: str, basesifactor: num, symbol?: str|null, name?: str|null }`
|
||||
- `T30` = `{ id: int, categoryId: int, name: str, sku: str, track_stock: bool }`
|
||||
- `T31` = `{ minmultiplier: num, net: num, taxRate: num, customergroupId: int }`
|
||||
- `T32` = `{ fullHash: str, thumbW: int, thumbH: int, thumbHash: str }`
|
||||
- `T33` = `{ id: int, entityId: int, contactType: str, contact: str }`
|
||||
- `T34` = `{ id: int, attributeId: int, value: str, sort: int }`
|
||||
- `T35` = `{ id: int, name: str, createdAt: str, updatedAt: str }`
|
||||
- `T36` = `{ totalPositions: int, completelyOnLedgerPositions: int }`
|
||||
- `T37` = `{ id: int, name: str, sort: int, exclusive: bool }`
|
||||
- `T30` = `{ id: int, attributeId: int, value: str, sort: int, articleCount?: int }`
|
||||
- `T31` = `{ id: int, name: str, sort: int, exclusive: bool, articleCount?: int }`
|
||||
- `T32` = `{ id: int, categoryId: int, name: str, sku: str, track_stock: bool }`
|
||||
- `T33` = `{ minmultiplier: num, net: num, taxRate: num, customergroupId: int }`
|
||||
- `T34` = `{ fullHash: str, thumbW: int, thumbH: int, thumbHash: str }`
|
||||
- `T35` = `{ id: int, entityId: int, contactType: str, contact: str }`
|
||||
- `T36` = `{ id: int, name: str, createdAt: str, updatedAt: str }`
|
||||
- `T37` = `{ totalPositions: int, completelyOnLedgerPositions: int }`
|
||||
- `T38` = `{ warehouse: T40 }`
|
||||
- `T39` = `{ net: num, taxId: int, taxRate?: num|null }`
|
||||
- `T40` = `{ id: int, name: str, sort: int }`
|
||||
@@ -105,7 +105,7 @@ _none_
|
||||
- Returns: `201 T28`
|
||||
#### Attach an existing article as a child to a parent article — `PUT /article/{sku}/children`
|
||||
- Params: `sku: str, body: { sku: str, attributeValueId?: int, value?: str, reparent?: bool }`
|
||||
- Returns: `200 { article: T30, children: { id: int, sku: str, name: str, parentsort: int, attributeValueId: int, attributeValue: str }[] }`
|
||||
- Returns: `200 { article: T32, children: { id: int, sku: str, name: str, parentsort: int, attributeValueId: int, attributeValue: str }[] }`
|
||||
#### Remove a child article from a parent article — `DELETE /article/{sku}/children/{childSku}`
|
||||
- Params: `sku: str, childSku: str, query: deleteArticle?: bool`
|
||||
- Returns: `200 { success: bool, deleted: bool }`
|
||||
@@ -171,19 +171,19 @@ _none_
|
||||
|
||||
#### List attribute names — `GET /attributename`
|
||||
_none_
|
||||
- Returns: `200 { attributenames: T23[] }`
|
||||
- Returns: `200 { attributenames: T15[] }`
|
||||
#### Create attribute name — `POST /attributename`
|
||||
- Params: `body: { name: str, sort?: int, exclusive?: bool }`
|
||||
- Returns: `201 { attributename: T23 }`
|
||||
- Returns: `201 { attributename: T15 }`
|
||||
#### Reorder attribute names — `PUT /attributename/order`
|
||||
- Params: `body: { attributenameIds: int[] }`
|
||||
- Returns: `200 { ok: bool }`
|
||||
#### List values for an attribute — `GET /attributename/{attributeId}/value`
|
||||
- Params: `attributeId: int`
|
||||
- Returns: `200 { values: T34[] }`
|
||||
- Returns: `200 { values: T30[] }`
|
||||
#### Create value for an attribute — `POST /attributename/{attributeId}/value`
|
||||
- Params: `attributeId: int, body: { value: str, sort?: int }`
|
||||
- Returns: `201 { attributevalue: T34 }`
|
||||
- Returns: `201 { attributevalue: T30 }`
|
||||
#### Reorder values of an attribute — `PUT /attributename/{attributeId}/value/order`
|
||||
- Params: `attributeId: int, body: { attributevalueIds: int[] }`
|
||||
- Returns: `200 { ok: bool }`
|
||||
@@ -192,7 +192,7 @@ _none_
|
||||
- Returns: `200 { ok: bool }`
|
||||
#### Update attribute name — `PATCH /attributename/{id}`
|
||||
- Params: `id: int, body: { name?: str, sort?: int, exclusive?: bool }`
|
||||
- Returns: `200 { attributename: T23 }`
|
||||
- Returns: `200 { attributename: T15 }`
|
||||
|
||||
### Section: /attributevalue
|
||||
|
||||
@@ -201,13 +201,13 @@ _none_
|
||||
- Returns: `200 { ok: bool }`
|
||||
#### Update attribute value — `PATCH /attributevalue/{id}`
|
||||
- Params: `id: int, body: { value?: str, sort?: int }`
|
||||
- Returns: `200 { attributevalue: T34 }`
|
||||
- Returns: `200 { attributevalue: T30 }`
|
||||
#### Delete attribute value image — `DELETE /attributevalue/{id}/image`
|
||||
- Params: `id: int`
|
||||
- Returns: `200 { attributevalue: { id: int, thumbW: int|null, thumbH: int|null, thumbHash: str|null, pics: T32[] } }`
|
||||
- Returns: `200 { attributevalue: { id: int, thumbW: int|null, thumbH: int|null, thumbHash: str|null, pics: T34[] } }`
|
||||
#### Add or replace attribute value image — `POST /attributevalue/{id}/image`
|
||||
- Params: `id: int, image/avif`
|
||||
- Returns: `201 { attributevalue: { id: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, pics: T32[] } }`
|
||||
- Returns: `201 { attributevalue: { id: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, pics: T34[] } }`
|
||||
|
||||
### Section: /auth
|
||||
|
||||
@@ -225,7 +225,7 @@ _none_
|
||||
- Returns: `200 { brands: { id: int, name: str, articleCount: int, pics: { fullHash: str, thumbW: int, thumbH: int, thumbHash: str, smallThumbW?: int|null, smallThumbH?: int|null, smallThumbBinary?: str|null }[], gsprpinfo?: str|null }[], total: int, offset: int, limit: int }`
|
||||
#### Create brand — `POST /brand`
|
||||
- Params: `body: { name: str, gsprpinfo?: str }`
|
||||
- Returns: `201 { brand: { id: int, name: str, pics: T32[], gsprpinfo?: str|null } }`
|
||||
- Returns: `201 { brand: { id: int, name: str, pics: T34[], gsprpinfo?: str|null } }`
|
||||
#### Delete brand — `DELETE /brand/{id}`
|
||||
- Params: `id: int`
|
||||
- Returns: `204 void`
|
||||
@@ -234,10 +234,10 @@ _none_
|
||||
- Returns: `200 { brand: { id: int, name: str, touchedArticleCount: int, gsprpinfo?: str|null } }`
|
||||
#### Delete brand image — `DELETE /brand/{id}/image`
|
||||
- Params: `id: int`
|
||||
- Returns: `200 { brand: { id: int, thumbW: int|null, thumbH: int|null, thumbHash: str|null, pics: T32[] } }`
|
||||
- Returns: `200 { brand: { id: int, thumbW: int|null, thumbH: int|null, thumbHash: str|null, pics: T34[] } }`
|
||||
#### Add or replace brand image — `POST /brand/{id}/image`
|
||||
- Params: `id: int, image/avif`
|
||||
- Returns: `201 { brand: { id: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, pics: T32[] } }`
|
||||
- Returns: `201 { brand: { id: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str, pics: T34[] } }`
|
||||
|
||||
### Section: /category
|
||||
|
||||
@@ -327,7 +327,7 @@ _none_
|
||||
|
||||
#### List deliveries — `GET /delivery`
|
||||
_none_
|
||||
- Returns: `200 { deliveries: { id: int, number: str, type: str, supplierId: int|null, date: str, externalNumber?: str|null, createdAt?: str, ledger?: T36 }[] }`
|
||||
- Returns: `200 { deliveries: { id: int, number: str, type: str, supplierId: int|null, date: str, externalNumber?: str|null, createdAt?: str, ledger?: T37 }[] }`
|
||||
#### Create delivery — `POST /delivery`
|
||||
- Params: `body: { externalNumber: str, date: str, lines: T24[], supplierId?: int|null, files?: { mimetype: str, name: str, content: str, sort?: int, size?: int, hash?: str, created?: str, modified?: str, meta?: { [k]: str } }[] }`
|
||||
- Returns: `201 T3`
|
||||
@@ -351,7 +351,7 @@ _none_
|
||||
- Returns: `200 { entities: T26[] }`
|
||||
#### Create entity — `POST /entity`
|
||||
- Params: `body: { customergroupId: int, name: str, firstName?: str|null, number?: str }`
|
||||
- Returns: `201 T18`
|
||||
- Returns: `201 T19`
|
||||
#### Peek next customer number — `GET /entity/next-number`
|
||||
_none_
|
||||
- Returns: `200 { number: str }`
|
||||
@@ -369,25 +369,25 @@ _none_
|
||||
- Returns: `200 { address: T12 }`
|
||||
#### List entity contacts — `GET /entity/{entityId}/contact`
|
||||
- Params: `entityId: int`
|
||||
- Returns: `200 { contacts: T33[] }`
|
||||
- Returns: `200 { contacts: T35[] }`
|
||||
#### Create entity contact — `POST /entity/{entityId}/contact`
|
||||
- Params: `entityId: int, body: { contactType: str, contact: str }`
|
||||
- Returns: `201 { contact: T33 }`
|
||||
- Returns: `201 { contact: T35 }`
|
||||
#### Delete entity contact — `DELETE /entity/{entityId}/contact/{id}`
|
||||
- Params: `entityId: int, id: int`
|
||||
- Returns: `204 void`
|
||||
#### Update entity contact — `PATCH /entity/{entityId}/contact/{id}`
|
||||
- Params: `entityId: int, id: int, body: { contactType?: str, contact?: str }`
|
||||
- Returns: `200 { contact: T33 }`
|
||||
- Returns: `200 { contact: T35 }`
|
||||
#### Delete entity — `DELETE /entity/{id}`
|
||||
- Params: `id: int`
|
||||
- Returns: `204 void`
|
||||
#### Get entity — `GET /entity/{id}`
|
||||
- Params: `id: int`
|
||||
- Returns: `200 T18`
|
||||
- Returns: `200 T19`
|
||||
#### Update entity — `PATCH /entity/{id}`
|
||||
- Params: `id: int, body: { name?: str, firstName?: str|null, number?: str|null }`
|
||||
- Returns: `200 T18`
|
||||
- Returns: `200 T19`
|
||||
|
||||
### Section: /labeltemplate
|
||||
|
||||
@@ -395,7 +395,7 @@ _none_
|
||||
_none_
|
||||
- Returns: `200 { labeltemplates: { id: int, name: str, width: num, height: num, dpi: int, type: str, thumb?: str|null }[] }`
|
||||
#### Create label template — `POST /labeltemplate`
|
||||
- Params: `body: { name: str, width: num, height: num, dpi: int, type: str, content: T16 }`
|
||||
- Params: `body: { name: str, width: num, height: num, dpi: int, type: str, content: T17 }`
|
||||
- Returns: `201 T5`
|
||||
#### Delete label template — `DELETE /labeltemplate/{id}`
|
||||
- Params: `id: int`
|
||||
@@ -404,10 +404,10 @@ _none_
|
||||
- Params: `id: int`
|
||||
- Returns: `200 T5`
|
||||
#### Update label template (partial) — `PATCH /labeltemplate/{id}`
|
||||
- Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: T16 }`
|
||||
- Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: T17 }`
|
||||
- Returns: `200 T5`
|
||||
#### Update label template — `PUT /labeltemplate/{id}`
|
||||
- Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: T16 }`
|
||||
- Params: `id: int, body: { name?: str, width?: num, height?: num, dpi?: int, type?: str, content?: T17 }`
|
||||
- Returns: `200 T5`
|
||||
|
||||
### Section: /ledger
|
||||
@@ -480,10 +480,10 @@ _none_
|
||||
|
||||
#### List printers — `GET /printer`
|
||||
_none_
|
||||
- Returns: `200 { printers: T22[] }`
|
||||
- Returns: `200 { printers: T23[] }`
|
||||
#### Create printer — `POST /printer`
|
||||
- Params: `body: { address: str, type: str, model?: str|null, serial?: str|null, sort?: int, desc?: str|null }`
|
||||
- Returns: `201 T17`
|
||||
- Returns: `201 T18`
|
||||
#### Reorder printers — `PUT /printer/order`
|
||||
- Params: `body: { printerIds: int[] }`
|
||||
- Returns: `200 { printerIds: int[] }`
|
||||
@@ -492,22 +492,22 @@ _none_
|
||||
- Returns: `204 void`
|
||||
#### Get printer by ID — `GET /printer/{id}`
|
||||
- Params: `id: int`
|
||||
- Returns: `200 T17`
|
||||
- Returns: `200 T18`
|
||||
#### Update printer (partial) — `PATCH /printer/{id}`
|
||||
- Params: `id: int, body: { address?: str, type?: str, model?: str|null, serial?: str|null, sort?: int, desc?: str|null }`
|
||||
- Returns: `200 T17`
|
||||
- Returns: `200 T18`
|
||||
#### Update printer — `PUT /printer/{id}`
|
||||
- Params: `id: int, body: { address?: str, type?: str, model?: str|null, serial?: str|null, sort?: int, desc?: str|null }`
|
||||
- Returns: `200 T17`
|
||||
- Returns: `200 T18`
|
||||
|
||||
### Section: /propertyname
|
||||
|
||||
#### List property names — `GET /propertyname`
|
||||
_none_
|
||||
- Returns: `200 { propertynames: T37[] }`
|
||||
- Returns: `200 { propertynames: T31[] }`
|
||||
#### Create property name — `POST /propertyname`
|
||||
- Params: `body: { name: str, sort?: int, exclusive?: bool }`
|
||||
- Returns: `201 { propertyname: T37 }`
|
||||
- Returns: `201 { propertyname: T31 }`
|
||||
#### Reorder property names — `PUT /propertyname/order`
|
||||
- Params: `body: { propertynameIds: int[] }`
|
||||
- Returns: `200 { ok: bool }`
|
||||
@@ -516,7 +516,7 @@ _none_
|
||||
- Returns: `200 { ok: bool }`
|
||||
#### Update property name — `PATCH /propertyname/{id}`
|
||||
- Params: `id: int, body: { name?: str, sort?: int, exclusive?: bool }`
|
||||
- Returns: `200 { propertyname: T37 }`
|
||||
- Returns: `200 { propertyname: T31 }`
|
||||
|
||||
### Section: /quote
|
||||
|
||||
@@ -564,16 +564,16 @@ _none_
|
||||
|
||||
#### List suppliers — `GET /supplier`
|
||||
_none_
|
||||
- Returns: `200 { suppliers: T35[] }`
|
||||
- Returns: `200 { suppliers: T36[] }`
|
||||
#### Create supplier — `POST /supplier`
|
||||
- Params: `body: { name: str }`
|
||||
- Returns: `201 { supplier: T35 }`
|
||||
- Returns: `201 { supplier: T36 }`
|
||||
#### Delete supplier — `DELETE /supplier/{id}`
|
||||
- Params: `id: int`
|
||||
- Returns: `204 void`
|
||||
#### Update supplier — `PATCH /supplier/{id}`
|
||||
- Params: `id: int, body: { name: str }`
|
||||
- Returns: `200 { supplier: T35 }`
|
||||
- Returns: `200 { supplier: T36 }`
|
||||
#### List supplier articles by SKUs — `GET /supplier/{id}/articles`
|
||||
- Params: `id: int, query: skus?: string`
|
||||
- Returns: `200 { articles: { id: int, articleId: int, entityId: int, pu: num, sort: int, article: { id: int, sku: str, name?: str|null, slug?: str|null, photos?: { sort: int, fullHash: str, thumbW: int, thumbH: int, thumbHash: str }[], eans?: str[] }, supplierName?: str|null, sku?: str|null, stock?: num|null, priceId?: int|null, price?: T39|null }[] }`
|
||||
|
||||
@@ -4,7 +4,7 @@ Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
List attribute names
|
||||
|
||||
Lists all attribute names defined for the selected company, including nested values.
|
||||
Lists all attribute names defined for the selected company, including nested values. Each attribute name includes `articleCount` (the number of parent articles configured with this attribute) and each value includes `articleCount` (the number of articles having this attribute value).
|
||||
|
||||
## Response `200`
|
||||
|
||||
@@ -18,12 +18,14 @@ List of attribute names
|
||||
"name": "…",
|
||||
"sort": 1,
|
||||
"exclusive": true,
|
||||
"articleCount": 1,
|
||||
"values": [
|
||||
{
|
||||
"id": 1,
|
||||
"attributeId": 1,
|
||||
"value": "…",
|
||||
"sort": 1
|
||||
"sort": 1,
|
||||
"articleCount": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -37,12 +37,14 @@ Created attribute name
|
||||
"name": "…",
|
||||
"sort": 1,
|
||||
"exclusive": true,
|
||||
"articleCount": 1,
|
||||
"values": [
|
||||
{
|
||||
"id": 1,
|
||||
"attributeId": 1,
|
||||
"value": "…",
|
||||
"sort": 1
|
||||
"sort": 1,
|
||||
"articleCount": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
List values for an attribute
|
||||
|
||||
Lists all values for a specific attribute.
|
||||
Lists all values for a specific attribute. Each value includes `articleCount` (the number of articles having this attribute value).
|
||||
|
||||
## Path parameters
|
||||
|
||||
@@ -23,7 +23,8 @@ List of attribute values
|
||||
"id": 1,
|
||||
"attributeId": 1,
|
||||
"value": "…",
|
||||
"sort": 1
|
||||
"sort": 1,
|
||||
"articleCount": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -36,7 +36,8 @@ Created attribute value
|
||||
"id": 1,
|
||||
"attributeId": 1,
|
||||
"value": "…",
|
||||
"sort": 1
|
||||
"sort": 1,
|
||||
"articleCount": 1
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -43,12 +43,14 @@ Updated attribute name
|
||||
"name": "…",
|
||||
"sort": 1,
|
||||
"exclusive": true,
|
||||
"articleCount": 1,
|
||||
"values": [
|
||||
{
|
||||
"id": 1,
|
||||
"attributeId": 1,
|
||||
"value": "…",
|
||||
"sort": 1
|
||||
"sort": 1,
|
||||
"articleCount": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -36,7 +36,8 @@ Updated attribute value
|
||||
"id": 1,
|
||||
"attributeId": 1,
|
||||
"value": "…",
|
||||
"sort": 1
|
||||
"sort": 1,
|
||||
"articleCount": 1
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -4,7 +4,7 @@ Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
List property names
|
||||
|
||||
Lists all property names defined for the selected company, ordered by sort.
|
||||
Lists all property names defined for the selected company, ordered by sort. Each property name includes `articleCount` (the number of articles in this company that have an articleproperty row for that property).
|
||||
|
||||
## Response `200`
|
||||
|
||||
@@ -17,7 +17,8 @@ List of property names
|
||||
"id": 1,
|
||||
"name": "…",
|
||||
"sort": 1,
|
||||
"exclusive": true
|
||||
"exclusive": true,
|
||||
"articleCount": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -36,7 +36,8 @@ Created property name
|
||||
"id": 1,
|
||||
"name": "…",
|
||||
"sort": 1,
|
||||
"exclusive": true
|
||||
"exclusive": true,
|
||||
"articleCount": 1
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -42,7 +42,8 @@ Updated property name
|
||||
"id": 1,
|
||||
"name": "…",
|
||||
"sort": 1,
|
||||
"exclusive": true
|
||||
"exclusive": true,
|
||||
"articleCount": 1
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -1526,6 +1526,9 @@
|
||||
* type: integer
|
||||
* exclusive:
|
||||
* type: boolean
|
||||
* articleCount:
|
||||
* type: integer
|
||||
* description: Number of articles in the selected company that have an articleproperty row for this property.
|
||||
* ArticleProperty:
|
||||
* type: object
|
||||
* required: [id, propertyId, name, exclusive, value, sort]
|
||||
@@ -1556,6 +1559,9 @@
|
||||
* type: string
|
||||
* sort:
|
||||
* type: integer
|
||||
* articleCount:
|
||||
* type: integer
|
||||
* description: Number of articles in the selected company having this attribute value.
|
||||
* AttributeValuePic:
|
||||
* type: object
|
||||
* required: [fullHash, thumbW, thumbH, thumbHash]
|
||||
@@ -1580,6 +1586,9 @@
|
||||
* type: integer
|
||||
* exclusive:
|
||||
* type: boolean
|
||||
* articleCount:
|
||||
* type: integer
|
||||
* description: Number of parent articles in the selected company configured with this attribute name.
|
||||
* values:
|
||||
* type: array
|
||||
* items:
|
||||
|
||||
@@ -34,7 +34,7 @@ export function register(app, basePath = '') {
|
||||
* get:
|
||||
* tags: [Article]
|
||||
* summary: List attribute names
|
||||
* description: Lists all attribute names defined for the selected company, including nested values.
|
||||
* description: Lists all attribute names defined for the selected company, including nested values. Each attribute name includes `articleCount` (the number of parent articles configured with this attribute) and each value includes `articleCount` (the number of articles having this attribute value).
|
||||
* security:
|
||||
* - cookieAuth: []
|
||||
* responses:
|
||||
|
||||
@@ -38,7 +38,7 @@ export function register(app, basePath = '') {
|
||||
* get:
|
||||
* tags: [Article]
|
||||
* summary: List values for an attribute
|
||||
* description: Lists all values for a specific attribute.
|
||||
* description: Lists all values for a specific attribute. Each value includes `articleCount` (the number of articles having this attribute value).
|
||||
* security:
|
||||
* - cookieAuth: []
|
||||
* parameters:
|
||||
|
||||
@@ -38,7 +38,7 @@ export function register(app, basePath = '') {
|
||||
* get:
|
||||
* tags: [Article]
|
||||
* summary: List property names
|
||||
* description: Lists all property names defined for the selected company, ordered by sort.
|
||||
* description: Lists all property names defined for the selected company, ordered by sort. Each property name includes `articleCount` (the number of articles in this company that have an articleproperty row for that property).
|
||||
* security:
|
||||
* - cookieAuth: []
|
||||
* responses:
|
||||
|
||||
Reference in New Issue
Block a user