u
This commit is contained in:
@@ -762,7 +762,7 @@
|
||||
"Quote"
|
||||
],
|
||||
"summary": "Create quote",
|
||||
"description": "Creates a quote with header and lines in one transaction.\n`date` is the document date (valid-until).\n`entityId` must be a company customer (not Lieferanten/POS), or null.\nEach line requires `sku` or `name`, `amount`, `net`, and `tax` (rate); `pu` defaults to `1`; `rebate` defaults to `0`.\n",
|
||||
"description": "Creates a quote with header and lines in one transaction.\n`date` is the document date (valid-until).\n`entityId` must be a company customer (not Lieferanten/POS), or null.\nEach line requires `sku` or `name`, `amount`, `net`, and `taxrate` (rate); `pu` defaults to `1`; `rebate` defaults to `0`.\n",
|
||||
"security": [
|
||||
{
|
||||
"cookieAuth": []
|
||||
@@ -812,7 +812,7 @@
|
||||
"pu": 1,
|
||||
"amount": 10,
|
||||
"net": 99.5,
|
||||
"tax": 19
|
||||
"taxrate": 19
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -2014,7 +2014,7 @@
|
||||
"Order"
|
||||
],
|
||||
"summary": "Create order",
|
||||
"description": "Creates a sales order with header and lines in one transaction.\n`date` is the document date (expected delivery).\n`entityId` must be a company customer (not Lieferanten/POS), or null.\nEach line requires `sku` or `name`, `amount`, `net`, and `tax` (rate); `pu` defaults to `1`; `rebate` defaults to `0`.\n",
|
||||
"description": "Creates a sales order with header and lines in one transaction.\n`date` is the document date (expected delivery).\n`entityId` must be a company customer (not Lieferanten/POS), or null.\nEach line requires `sku` or `name`, `amount`, `net`, and `taxrate` (rate); `pu` defaults to `1`; `rebate` defaults to `0`.\n",
|
||||
"security": [
|
||||
{
|
||||
"cookieAuth": []
|
||||
@@ -2064,7 +2064,7 @@
|
||||
"pu": 1,
|
||||
"amount": 10,
|
||||
"net": 99.5,
|
||||
"tax": 19
|
||||
"taxrate": 19
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4227,7 +4227,7 @@
|
||||
"Delivery"
|
||||
],
|
||||
"summary": "Create delivery",
|
||||
"description": "Creates a goods receipt with header and lines in one transaction.\nThe manifest `number` is allocated automatically via\n`nextNumber('delivery')`; the user-supplied reference is stored as\n`externalNumber`. Each line requires `sku` or `name`, `amount`, `net`, and\n`tax` (rate). `pu` defaults to `1`; `rebate` defaults to `0`.\n",
|
||||
"description": "Creates a goods receipt with header and lines in one transaction.\nThe manifest `number` is allocated automatically via\n`nextNumber('delivery')`; the user-supplied reference is stored as\n`externalNumber`. Each line requires `sku` or `name`, `amount`, `net`, and\n`taxrate` (rate). `pu` defaults to `1`; `rebate` defaults to `0`.\n",
|
||||
"security": [
|
||||
{
|
||||
"cookieAuth": []
|
||||
@@ -4276,7 +4276,7 @@
|
||||
"pu": 1,
|
||||
"amount": 10,
|
||||
"net": 99.5,
|
||||
"tax": 19
|
||||
"taxrate": 19
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -6735,6 +6735,460 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/article/{sku}/supplier": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Article"
|
||||
],
|
||||
"summary": "List article suppliers",
|
||||
"description": "Fetches all suppliers linked to the specified article SKU.",
|
||||
"security": [
|
||||
{
|
||||
"cookieAuth": []
|
||||
}
|
||||
],
|
||||
"x-markdown": "article/supplier/list.md",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "sku",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Article SKU"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "List of suppliers linked to the article",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"suppliers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/ArticleSupplier"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "No company selected or invalid sku",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Not authorized",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Article or company not found",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"tags": [
|
||||
"Article"
|
||||
],
|
||||
"summary": "Assign supplier to article",
|
||||
"description": "Assigns a supplier to an article with optional purchase price, stock, and supplier SKU.\n",
|
||||
"security": [
|
||||
{
|
||||
"cookieAuth": []
|
||||
}
|
||||
],
|
||||
"x-signals": [
|
||||
"article-<sku>"
|
||||
],
|
||||
"x-markdown": "article/supplier/create.md",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "sku",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Article SKU"
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"entityId"
|
||||
],
|
||||
"properties": {
|
||||
"entityId": {
|
||||
"type": "integer",
|
||||
"description": "Supplier entity ID (in Lieferanten group)"
|
||||
},
|
||||
"sku": {
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"description": "Supplier's item number"
|
||||
},
|
||||
"pu": {
|
||||
"type": "number",
|
||||
"default": 1,
|
||||
"description": "Packaging unit (VPE)"
|
||||
},
|
||||
"stock": {
|
||||
"type": "number",
|
||||
"nullable": true,
|
||||
"description": "Supplier stock"
|
||||
},
|
||||
"netPrice": {
|
||||
"type": "number",
|
||||
"nullable": true,
|
||||
"description": "Net purchase price"
|
||||
},
|
||||
"taxId": {
|
||||
"type": "integer",
|
||||
"nullable": true,
|
||||
"description": "Tax ID for purchase price"
|
||||
},
|
||||
"taxRate": {
|
||||
"type": "number",
|
||||
"nullable": true,
|
||||
"description": "Tax rate in percent"
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"entityId": 88,
|
||||
"sku": "MET-44910",
|
||||
"pu": 1,
|
||||
"stock": 140,
|
||||
"netPrice": 4.2,
|
||||
"taxId": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "Created supplier assignment",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"supplier": {
|
||||
"$ref": "#/components/schemas/ArticleSupplier"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "entityId required, invalid pu, invalid stock, invalid price, or no company selected",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Not authorized",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Article, supplier, or company not found",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"409": {
|
||||
"description": "Supplier already assigned",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/article/{sku}/supplier/{id}": {
|
||||
"patch": {
|
||||
"tags": [
|
||||
"Article"
|
||||
],
|
||||
"summary": "Update article supplier assignment",
|
||||
"description": "Updates an existing article-supplier association (supplier SKU, packaging unit, stock, purchase price).\n",
|
||||
"security": [
|
||||
{
|
||||
"cookieAuth": []
|
||||
}
|
||||
],
|
||||
"x-signals": [
|
||||
"article-<sku>"
|
||||
],
|
||||
"x-markdown": "article/supplier/update.md",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "sku",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Article SKU"
|
||||
},
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"description": "articlesupplier assignment ID"
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sku": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"pu": {
|
||||
"type": "number"
|
||||
},
|
||||
"stock": {
|
||||
"type": "number",
|
||||
"nullable": true
|
||||
},
|
||||
"netPrice": {
|
||||
"type": "number",
|
||||
"nullable": true
|
||||
},
|
||||
"taxId": {
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
"taxRate": {
|
||||
"type": "number",
|
||||
"nullable": true
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"sku": "MET-44910-B",
|
||||
"pu": 6,
|
||||
"stock": 95,
|
||||
"netPrice": 22.5
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Updated supplier assignment",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"supplier": {
|
||||
"$ref": "#/components/schemas/ArticleSupplier"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid pu, invalid stock, invalid price, invalid id, or no company selected",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Not authorized",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Supplier assignment, article, or company not found",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"tags": [
|
||||
"Article"
|
||||
],
|
||||
"summary": "Remove supplier assignment from article",
|
||||
"description": "Removes a supplier assignment from the article and cleans up its associated purchase price.\n",
|
||||
"security": [
|
||||
{
|
||||
"cookieAuth": []
|
||||
}
|
||||
],
|
||||
"x-signals": [
|
||||
"article-<sku>"
|
||||
],
|
||||
"x-markdown": "article/supplier/delete.md",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "sku",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Article SKU"
|
||||
},
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"description": "articlesupplier assignment ID"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "Deleted"
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid id, invalid sku, or no company selected",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Not authorized",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Supplier assignment or article not found",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/article": {
|
||||
"post": {
|
||||
"tags": [
|
||||
@@ -8680,6 +9134,74 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"ArticleSupplierPrice": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"net",
|
||||
"taxId"
|
||||
],
|
||||
"properties": {
|
||||
"net": {
|
||||
"type": "number",
|
||||
"description": "Net purchase price"
|
||||
},
|
||||
"taxId": {
|
||||
"type": "integer",
|
||||
"description": "Tax ID"
|
||||
},
|
||||
"taxRate": {
|
||||
"type": "number",
|
||||
"nullable": true,
|
||||
"description": "Tax rate in percent"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ArticleSupplier": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"articleId",
|
||||
"entityId",
|
||||
"pu"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"articleId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"entityId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"supplierName": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"sku": {
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"description": "Supplier-specific SKU (Lieferanten-Art.-Nr.)"
|
||||
},
|
||||
"pu": {
|
||||
"type": "number",
|
||||
"description": "Packaging unit (Verpackungseinheit / VPE)"
|
||||
},
|
||||
"stock": {
|
||||
"type": "number",
|
||||
"nullable": true,
|
||||
"description": "Supplier stock"
|
||||
},
|
||||
"priceId": {
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
"price": {
|
||||
"$ref": "#/components/schemas/ArticleSupplierPrice",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"Brand": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -8952,7 +9474,7 @@
|
||||
"amount",
|
||||
"net",
|
||||
"rebate",
|
||||
"tax",
|
||||
"taxrate",
|
||||
"comment"
|
||||
],
|
||||
"properties": {
|
||||
@@ -8981,9 +9503,9 @@
|
||||
"rebate": {
|
||||
"type": "number"
|
||||
},
|
||||
"tax": {
|
||||
"taxrate": {
|
||||
"type": "number",
|
||||
"description": "tax.rate (manifestarticle.taxrate)"
|
||||
"description": "Tax rate in percent (e.g. 19)"
|
||||
},
|
||||
"comment": {
|
||||
"type": "string",
|
||||
@@ -8996,7 +9518,7 @@
|
||||
"required": [
|
||||
"amount",
|
||||
"net",
|
||||
"tax"
|
||||
"taxrate"
|
||||
],
|
||||
"description": "Line item input. Requires `sku` or `name`.",
|
||||
"properties": {
|
||||
@@ -9020,9 +9542,9 @@
|
||||
"net": {
|
||||
"type": "number"
|
||||
},
|
||||
"tax": {
|
||||
"taxrate": {
|
||||
"type": "number",
|
||||
"description": "Tax rate (resolved via tax.ensure)"
|
||||
"description": "Tax rate in percent (resolved via tax.ensure)"
|
||||
},
|
||||
"rebate": {
|
||||
"type": "number",
|
||||
@@ -9065,7 +9587,7 @@
|
||||
"amount",
|
||||
"net",
|
||||
"rebate",
|
||||
"tax",
|
||||
"taxrate",
|
||||
"comment"
|
||||
],
|
||||
"description": "Line shape for quote and order",
|
||||
@@ -9095,9 +9617,9 @@
|
||||
"rebate": {
|
||||
"type": "number"
|
||||
},
|
||||
"tax": {
|
||||
"taxrate": {
|
||||
"type": "number",
|
||||
"description": "tax.rate (manifestarticle.taxrate)"
|
||||
"description": "Tax rate in percent (e.g. 19)"
|
||||
},
|
||||
"comment": {
|
||||
"type": "string",
|
||||
@@ -9110,7 +9632,7 @@
|
||||
"required": [
|
||||
"amount",
|
||||
"net",
|
||||
"tax"
|
||||
"taxrate"
|
||||
],
|
||||
"description": "Line item input. Requires `sku` or `name`.",
|
||||
"properties": {
|
||||
@@ -9134,9 +9656,9 @@
|
||||
"net": {
|
||||
"type": "number"
|
||||
},
|
||||
"tax": {
|
||||
"taxrate": {
|
||||
"type": "number",
|
||||
"description": "Tax rate (resolved via tax.ensure)"
|
||||
"description": "Tax rate in percent (resolved via tax.ensure)"
|
||||
},
|
||||
"rebate": {
|
||||
"type": "number",
|
||||
|
||||
Reference in New Issue
Block a user