u
This commit is contained in:
@@ -50,6 +50,13 @@
|
||||
* type: number
|
||||
* reducedtaxrate:
|
||||
* type: number
|
||||
* SuccessResponse:
|
||||
* type: object
|
||||
* required: [ok]
|
||||
* properties:
|
||||
* ok:
|
||||
* type: boolean
|
||||
* example: true
|
||||
* CompanySetting:
|
||||
* type: object
|
||||
* required: [key, value]
|
||||
@@ -73,14 +80,18 @@
|
||||
* type: string
|
||||
* Unit:
|
||||
* type: object
|
||||
* description: Measurement unit with conversion factor to base SI unit (e.g. g -> kg, ml -> l)
|
||||
* required: [si, basesi, basesifactor]
|
||||
* properties:
|
||||
* si:
|
||||
* type: string
|
||||
* description: Unit code identifier (e.g. "g", "kg", "ml", "l", "stk")
|
||||
* basesi:
|
||||
* type: string
|
||||
* description: Base SI reference unit (e.g. "kg" for mass, "l" or "m3" for volume, "stk" for counts)
|
||||
* basesifactor:
|
||||
* type: number
|
||||
* description: Conversion factor to base SI (1 si = basesifactor * basesi; e.g. 0.001 for g -> kg)
|
||||
* symbol:
|
||||
* type: string
|
||||
* nullable: true
|
||||
@@ -130,9 +141,11 @@
|
||||
* unitamount:
|
||||
* type: number
|
||||
* nullable: true
|
||||
* description: Net package content quantity measured in article unit (e.g. 500 for 500g, 0.75 for 0.75l)
|
||||
* weight:
|
||||
* type: number
|
||||
* nullable: true
|
||||
* description: Shipping weight in kg (must be >= 0)
|
||||
* unit:
|
||||
* $ref: '#/components/schemas/Unit'
|
||||
* brand:
|
||||
@@ -353,6 +366,7 @@
|
||||
* type: array
|
||||
* description: Brand pictures sorted by sort
|
||||
* items:
|
||||
* $ref: '#/components/schemas/BrandPic'
|
||||
* ArticleBrand:
|
||||
* type: object
|
||||
* required: [name]
|
||||
|
||||
@@ -717,12 +717,14 @@ export function register(app, basePath = '') {
|
||||
* /article/{sku}/prices:
|
||||
* put:
|
||||
* tags: [Article]
|
||||
* summary: Replace POS prices by SKU
|
||||
* summary: Replace POS prices by SKU (net > gross; price=net, tax=taxRate %)
|
||||
* description: |
|
||||
* Replace-all prices for the company POS customer group.
|
||||
* Each entry accepts `net` OR `gross` price (or legacy `price`), `taxRate` OR `tax` (percentage, e.g. 19 for 19%, ensured via tax.ensure), optional `minmultiplier` (default 1).
|
||||
* `net` takes precedence over `price` (legacy alias for net) and `gross`.
|
||||
* `tax` and `taxRate` both specify the tax rate percentage (e.g. 19 for 19%), not monetary tax.
|
||||
* When `gross` is provided, net price is computed as `gross / (1 + taxRate / 100)`.
|
||||
* Empty `prices` clears all POS prices. Returns the same shape as GET by SKU (article `prices` array contains `{ minmultiplier, net, taxRate, customergroupId }`).
|
||||
* Prices are strictly scoped to the company's designated POS customer group (customergroupId returned on GET).
|
||||
* Empty `prices` clears all POS prices. Returns the same shape as GET by SKU.
|
||||
* security:
|
||||
* - cookieAuth: []
|
||||
* x-signals: [article-<sku>]
|
||||
@@ -1199,7 +1201,7 @@ export function register(app, basePath = '') {
|
||||
* /article/{sku}/brand:
|
||||
* put:
|
||||
* tags: [Article]
|
||||
* summary: Set or clear article brand by SKU
|
||||
* summary: Set or clear article brand by SKU (null to clear)
|
||||
* description: |
|
||||
* Sets the article's `brandId` (must belong to the article's company).
|
||||
* Pass `null` to clear the brand. Returns the same shape as GET by SKU.
|
||||
@@ -1224,6 +1226,7 @@ export function register(app, basePath = '') {
|
||||
* brandId:
|
||||
* type: integer
|
||||
* nullable: true
|
||||
* description: Brand ID to assign, or null to remove the brand
|
||||
* example:
|
||||
* brandId: 3
|
||||
* responses:
|
||||
@@ -1585,6 +1588,15 @@ export function register(app, basePath = '') {
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Print job dispatched
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* type: object
|
||||
* required: [success]
|
||||
* properties:
|
||||
* success:
|
||||
* type: boolean
|
||||
* example: true
|
||||
* 400:
|
||||
* description: Invalid parameters
|
||||
* 404:
|
||||
|
||||
@@ -178,6 +178,10 @@ export function register(app, basePath = '') {
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Deleted successfully
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: '#/components/schemas/SuccessResponse'
|
||||
*/
|
||||
app.delete(`${basePath}/article/:sku/property/:propertyId`, async (req, res) => {
|
||||
const selected = requireSelectedCompany(req);
|
||||
|
||||
@@ -133,6 +133,10 @@ export function register(app, basePath = '') {
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Reordered successfully
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: '#/components/schemas/SuccessResponse'
|
||||
*/
|
||||
app.put(`${basePath}/attributename/order`, async (req, res) => {
|
||||
const selected = requireSelectedCompany(req);
|
||||
@@ -202,6 +206,10 @@ export function register(app, basePath = '') {
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Deleted successfully
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: '#/components/schemas/SuccessResponse'
|
||||
* 400:
|
||||
* description: Bad request or no company selected
|
||||
* content:
|
||||
|
||||
@@ -150,6 +150,10 @@ export function register(app, basePath = '') {
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Reordered successfully
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: '#/components/schemas/SuccessResponse'
|
||||
*/
|
||||
app.put(`${basePath}/attributename/:attributeId/value/order`, async (req, res) => {
|
||||
const selected = requireSelectedCompany(req);
|
||||
@@ -218,6 +222,10 @@ export function register(app, basePath = '') {
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Deleted successfully
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: '#/components/schemas/SuccessResponse'
|
||||
* 400:
|
||||
* description: Bad request or no company selected
|
||||
* content:
|
||||
|
||||
@@ -180,6 +180,10 @@ export function register(app, basePath = '') {
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Deleted successfully
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: '#/components/schemas/SuccessResponse'
|
||||
*/
|
||||
app.delete(`${basePath}/category/:id/property/:propertyId`, async (req, res) => {
|
||||
const selected = requireSelectedCompany(req);
|
||||
|
||||
@@ -145,6 +145,10 @@ export function register(app, basePath = '') {
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Reordered successfully
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: '#/components/schemas/SuccessResponse'
|
||||
* 400:
|
||||
* description: Bad request
|
||||
*/
|
||||
@@ -216,6 +220,10 @@ export function register(app, basePath = '') {
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Deleted successfully
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: '#/components/schemas/SuccessResponse'
|
||||
* 400:
|
||||
* description: Bad request or no company selected
|
||||
* content:
|
||||
|
||||
Reference in New Issue
Block a user