{ "openapi": "3.0.3", "info": { "title": "Multicalc Service", "version": "1.0.0" }, "paths": { "/v1/product-info": { "get": { "summary": "Syncs the order with the ERP", "description": "Create or update all products in the order, then syncs with the ERP", "parameters": [ { "name": "CID", "in": "query", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Succesful operation", "content": { "application/xml": { "schema": { "$ref": "#/components/schemas/GetProductInfoResponse" } } } } } } }, "/v1/product-price": { "post": { "summary": "Creates or updates a product in the ERP", "description": "Creates or updates the product with the given CID in the ERP", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetProductPriceRequest" } } } }, "responses": { "200": { "description": "Succesful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetProductPriceResponse" } } } } } } }, "/v1/create-product": { "post": { "summary": "Creates or updates a product in the ERP", "description": "Creates or updates the product with the given CID in the ERP", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateProductRequest" } } } }, "responses": { "201": { "description": "Succesfully created product", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateProductResponse" } } } }, "500": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateProductErrorResponse" } } } } } } } }, "components": { "schemas": { "GetProductInfoResponse": { "type": "object", "properties": { "Familie": { "type": "string", "example": "L" }, "Variant": { "type": "string", "example": "M_LBX" }, "KenmerkNamen": { "type": "string", "example": "Variant/Family/BoxSystemColour" }, "KenmerkWaarden": { "type": "string", "example": "LBX/Lade/OG-M" }, "NietMeeleverenNamen": { "type": "string", "example": "DND.CoverCapInner/DND.CoverCapOuter" }, "NietMeeleverenWaarden": { "type": "string", "example": "true/false" }, "Rollen": { "type": "string" } } }, "GetProductPriceRequest": { "type": "object", "properties": { "kenmerkNamen": { "type": "string", "example": "Variant/Family/BoxSystemColour" }, "kenmerkWaarden": { "type": "string", "example": "LBX/Lade/OG-M" }, "afwijkendeKenmerkNamen": { "type": "string", "example": "BoxSystemColour" }, "afwijkendeKenmerkWaarden": { "type": "string", "example": "SW-M" }, "klantId": { "type": "string" }, "model": { "type": "string" } } }, "GetProductPriceResponse": { "type": "object", "properties": { "isValid": { "type": "boolean" }, "Prijs": { "type": "string" } } }, "CreateProductRequest": { "type": "object", "properties": { "kenmerkNamen": { "type": "string", "example": "Variant/Family/BoxSystemColour" }, "kenmerkWaarden": { "type": "string", "example": "LBX/Lade/OG-M" }, "afwijkendeKenmerkNamen": { "type": "string", "example": "BoxSystemColour" }, "afwijkendeKenmerkWaarden": { "type": "string", "example": "SW-M" }, "nietMeeleveren": { "type": "string" }, "afwijkendeNietMeeleveren": { "type": "string" }, "klantId": { "type": "string" }, "model": { "type": "string" } } }, "CreateProductResponse": { "type": "object", "properties": { "isValid": { "type": "boolean", "example": true }, "CID": { "type": "string" } } }, "CreateProductErrorResponse": { "type": "object", "properties": { "isValid": { "type": "boolean", "example": false }, "errors": { "type": "object" } } } } } }