{ "openapi": "3.0.0", "info": { "title": "Xentral API", "version": "v0.1", "description": "Xentral is an ERP platform.", "contact": { "name": "Xentral", "url": "https://xentral.com", "email": "api@xentral.com" } }, "tags": [ { "name": "Accounting Export", "description": "Accounting Export endpoints" }, { "name": "Analytics", "description": "Analytics Platform proxy API." }, { "name": "App", "description": "App represents information about apps available in the appstore." }, { "name": "AuthPlatform", "description": "AuthPlatform represents the oauth login for Xentral" }, { "name": "Contact", "description": "Contacts represents the individual or company information." }, { "name": "Credit Note", "description": "A credit note is a document you send to your customer to correct a mistake on an order or an invoice, or to refund an amount paid for products or services." }, { "name": "Credit Note Tag", "description": "Credit Note resource tags management." }, { "name": "Customer", "description": "Customer represents an information related to company, or individual person." }, { "name": "Customer Tag", "description": "Customer resource tags management." }, { "name": "Delivery Note", "description": "Delivery notes." }, { "name": "Delivery", "description": "Delivery information." }, { "name": "Delivery Terms", "description": "Delivery Terms" }, { "name": "Device Gateway", "description": "Device Gateway" }, { "name": "Email", "description": "Email related operations" }, { "name": "Email Account", "description": "Email accounts that are available for sending/receiving emails in Xentral." }, { "name": "Employee", "description": "Employees" }, { "name": "External Reference", "description": "External shop references that are linked to a product." }, { "name": "External Reference Target", "description": "All external shops that exists within Xentral" }, { "name": "Inventory", "description": "Inventory run management." }, { "name": "Invoice", "description": "An invoice is a commercial document issued by a seller to a buyer relating to a sale transaction and indicating the products, quantities, and agreed-upon prices for products or services the seller had provided the buyer." }, { "name": "Invoice Tag", "description": "Invoice resource tags management." }, { "name": "License", "description": "License and app subscription management" }, { "name": "Liability", "description": "Returns a collection with all liabilities." }, { "name": "Oauth", "description": "Oauth tokens for external providers." }, { "name": "Payment Methods", "description": "Payment Methods resource" }, { "name": "Payment Terms Group", "description": "PaymentTermsGroups can be used to group customers with identical payment terms such as different discounts, payment targets, and free postage options." }, { "name": "Password Reset", "description": "Password Reset represents an one-time access key to change the password of the connected User." }, { "name": "Personal Access Token", "description": "Personal access token which are used to authenticate against API v3." }, { "name": "Picking Run", "description": "A picking run contains instructions how to retrieve stock for fulfilling a single or a set of orders" }, { "name": "Pick List", "description": "A picking list contains instructions how to retrieve stock for fulfilling a single or a set of orders" }, { "name": "Point Of Sale", "description": "Point Of Sale (POS) endpoints." }, { "name": "Printer", "description": "An entity represent the physical printer connected to the instance." }, { "name": "Printer Setup", "description": "A printer setup for the wizard." }, { "name": "Product", "description": "Product represents the services or things given company sells in the business." }, { "name": "Product Category", "description": "Product Category represents the Product Category Tree that can be used to categorise products." }, { "name": "Product Free Field", "description": "40 product free fields can be used and individually labeled." }, { "name": "Product Import", "description": "Management of various ways of importing products into the system." }, { "name": "Product Media", "description": "Images of a product" }, { "name": "Product Tag", "description": "Product resource tags management." }, { "name": "Product Property", "description": "Product properties describe its physical traits." }, { "name": "Product Merchandise Group", "description": "Product merchandise groups." }, { "name": "Production", "description": "Production resource management" }, { "name": "Project", "description": "Project resource." }, { "name": "Purchase Order", "description": "Purchase Orders made at a supplier." }, { "name": "Purchase Price", "description": "PurchasePrices determine the prices used for the purchasing of products." }, { "name": "Report Builder", "description": "Report Builder API endpoints for accessing Analytics Platform." }, { "name": "Return", "description": "Return represents incoming shipments from customer to supplier" }, { "name": "Return Reason", "description": "Return reason describes why an item is being returned" }, { "name": "Sales Channel", "description": "SalesChannel are the configured Shops/Marketplaces." }, { "name": "Sales Price", "description": "SalesPrices determine the prices used in sales to customers." }, { "name": "Sales Order", "description": "SalesOrders are an outbound orders, meaning that someone has bought from you." }, { "name": "Setting", "description": "Settings represents the application's configurations." }, { "name": "Setting Item", "description": "SettingItems represents settings menu." }, { "name": "Shipping Methods", "description": "Shipping methods" }, { "name": "Supplier", "description": "Suppliers represents an information related to providers of goods the company is managing." }, { "name": "Supplier Tag", "description": "Supplier resource tags management." }, { "name": "System Health", "description": "System Health" }, { "name": "Tax Rates", "description": "Tax Rates resource" }, { "name": "Token", "description": "Valid tokens grant access to API endpoints. You can exchange credentials in POST endpoint to create one." }, { "name": "Ticket", "description": "Tickets (currently only ticket /queues)" }, { "name": "UI Analytics", "description": "Information about instance statistics and insights." }, { "name": "UI Bookmark", "description": "Bookmarks allow saving external resources for a quick access." }, { "name": "UI Calendar", "description": "Calendar hosts resources related to the events scheduled in the company." }, { "name": "UI Query", "description": "Collection of endpoints which return data for BI features in the front end." }, { "name": "UI Search", "description": "Search allows to look for information matching given query and interact with it." }, { "name": "UI SystemMessage", "description": "SystemMessage is an automated status check verifying correct behavior of one of the many modules." }, { "name": "User", "description": "User represents a Xentral account used to access other parts of the system." }, { "name": "User Invitation", "description": "Invites created for new users." }, { "name": "User Email Verification", "description": "User Email Verification" }, { "name": "Storage Location", "description": "Represents the spaces within a warehouse" }, { "name": "Storage Item", "description": "Represent a storage item in a storage location" }, { "name": "Warehouse", "description": "Represents a location with storage space" }, { "name": "Webhook", "description": "Manage webhooks." }, { "name": "Tax Rate", "description": "Represents a tax rate for a product on given day and for given country" } ], "components": { "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "description": "Bearer token obtained in POST /tokens endpoint or pregenerated in the system." } } }, "security": [ { "BearerAuth": [] } ], "servers": [ { "url": "https://{xentralId}.xentral.biz", "description": "Your Xentral Instance", "variables": { "xentralId": { "default": "xentral" } } }, { "url": "https://{domain}", "description": "Xentral at a custom domain", "variables": { "domain": { "default": "xentral.com" } } } ], "x-readme": { "samples-languages": [] }, "paths": { "/api/creditNotes": { "post": { "tags": [ "Credit Note" ], "operationId": "creditNote.create", "summary": "Create credit note", "description": "Creates a credit note", "requestBody": { "description": "[EARLY ACCESS] Create a credit note object", "content": { "application/vnd.xentral.default.v1-alpha+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "customer" ], "properties": { "date": { "type": "string", "format": "date" }, "costCenter": { "type": "string" }, "project": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "customer": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "tags": { "type": "array", "items": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "externalOrderReference": { "type": "string", "nullable": true }, "devCustomer": { "type": "string", "nullable": true }, "billingAddress": { "type": "object", "additionalProperties": false, "required": [ "name", "contactPerson", "department", "subdivision", "street", "additionalDetails", "city", "zipCode", "country" ], "nullable": true, "properties": { "name": { "type": "string" }, "contactPerson": { "type": "string" }, "department": { "type": "string", "nullable": true }, "subdivision": { "type": "string", "nullable": true }, "street": { "type": "string" }, "additionalDetails": { "type": "string", "nullable": true }, "city": { "type": "string" }, "zipCode": { "type": "string" }, "country": { "type": "string", "pattern": "[A-Z]{2}" } } }, "paymentMethodName": { "type": "string" }, "paymentStatus": { "type": "string", "enum": [ "pending", "paid", "partlyPaid", "canceled", "partialCancellation", "badDebt", "debited" ] }, "gln": { "type": "string", "nullable": true }, "taxation": { "type": "number" }, "positions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "product", "quantity", "price", "vatCategory", "taxRate" ], "properties": { "salesOrderPosition": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "quantity": { "x-description-missing": true, "type": "number", "format": "double" }, "price": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "vatCategory": { "x-description-missing": true, "type": "string" }, "taxRate": { "x-description-missing": true, "type": "number", "format": "float" }, "discounts": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "totalPercent": { "x-description-missing": true, "type": "number", "format": "float", "nullable": true } } } } } } } }, "examples": { "create CreditNote payload": { "value": { "date": "2023-01-01", "customer": { "id": "1337" }, "costCenter": "1024", "project": { "id": "42" }, "tags": [ "314" ], "externalOrderReference": "ref", "devCustomer": "dev", "billingAddress": null, "paymentMethodName": "name", "gln": null, "taxation": 7, "positions": [] } } } }, "application/vnd.xentral.minimal.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "invoice": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } } } }, "examples": { "id": { "value": { "invoice": { "id": "1337" } } } } }, "application/vnd.xentral.fromreturn.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "return": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "isApproved": { "type": "boolean", "default": false }, "isPaid": { "type": "boolean", "default": false } } }, "examples": { "return": { "value": { "return": { "id": "1337" }, "isApproved": true, "isPaid": false } } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "get": { "tags": [ "Credit Note" ], "operationId": "creditNote.list", "summary": "List credit notes", "description": "Returns a collection with all credit notes.", "parameters": [ { "name": "filter", "in": "query", "style": "deepObject", "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "array", "items": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } }, { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "search", "id", "creditNote", "date", "status", "customerName", "customerNumber", "country", "projectId", "projectName", "projectAbbr", "paymentMethod", "paymentStatus", "amount", "currency" ] }, "op": { "type": "string", "enum": [ "equals", "notEquals", "in", "notIn", "allIn", "allNotIn", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan" ] }, "value": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] } } } } ] } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "creditNote", "date", "customerName", "customerNumber", "country", "project", "paymentMethod", "amount", "currency", "paymentStatus", "status" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.minimal.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "number": { "x-description-missing": true, "type": "string", "nullable": true }, "date": { "x-description-missing": true, "type": "string", "format": "date" }, "status": { "x-description-missing": true, "type": "string", "enum": [ "approved", "sent", "created", "closed", "canceled" ] }, "amount": { "x-description-missing": true, "type": "object", "additionalProperties": false, "nullable": false, "required": [ "amount", "currencyCode" ], "properties": { "amount": { "type": "string" }, "currencyCode": { "type": "string" } } }, "invoice": { "x-description-missing": true, "type": "object", "additionalProperties": false, "nullable": true, "required": [ "number" ], "properties": { "number": { "type": "string" } } }, "address": { "x-description-missing": true, "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id", "name", "customerNumber", "country" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "customerNumber": { "type": "string" }, "country": { "type": "string" } } }, "project": { "x-description-missing": true, "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id", "name", "abbreviation" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "abbreviation": { "type": "string" } } }, "payment": { "x-description-missing": true, "type": "object", "additionalProperties": false, "nullable": true, "required": [ "method", "status" ], "properties": { "method": { "type": "string" }, "status": { "type": "string" } } }, "paymentTransaction": { "x-description-missing": true, "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id", "paymentStatus" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "paymentStatus": { "type": "string" } } }, "updatedBy": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "updatedAt": { "x-description-missing": true, "type": "string", "format": "date-time" }, "tags": { "description": "A list of tags", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The identifier of the tag", "type": "string", "pattern": "\\d+", "example": "1337" }, "name": { "description": "The name of the tag", "type": "string", "example": "Active" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } }, "application/vnd.xentral.default.v1+csv": { "schema": { "type": "string" } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/creditNotes/{id}": { "get": { "tags": [ "Credit Note" ], "operationId": "creditNote.view", "summary": "[ALPHA] View credit note", "description": "Returns details of a single credit note.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data" ], "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "number": { "x-description-missing": true, "type": "string", "nullable": true }, "date": { "x-description-missing": true, "type": "string", "format": "date" }, "createdAt": { "x-description-missing": true, "type": "string", "format": "date-time" }, "createdBy": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "name" ], "nullable": true, "properties": { "name": { "type": "string" } } }, "sentAt": { "x-description-missing": true, "type": "string", "format": "date-time", "nullable": true }, "sentBy": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "name" ], "nullable": true, "properties": { "name": { "type": "string" } } }, "updatedAt": { "x-description-missing": true, "type": "string", "format": "date-time" }, "grossValue": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "netValue": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "costCenter": { "x-description-missing": true, "type": "string" }, "status": { "x-description-missing": true, "type": "string", "enum": [ "approved", "sent", "created", "closed", "canceled" ] }, "project": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } } }, "customer": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } } }, "tags": { "description": "A list of tags", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The identifier of the tag", "type": "string", "pattern": "\\d+", "example": "1337" }, "name": { "description": "The name of the tag", "type": "string", "example": "Active" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "externalOrderReference": { "x-description-missing": true, "type": "string", "nullable": true }, "devCustomer": { "x-description-missing": true, "type": "string", "nullable": true }, "billingAddress": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "name", "contactPerson", "department", "subdivision", "street", "additionalDetails", "city", "zipCode", "country" ], "nullable": true, "properties": { "name": { "type": "string" }, "contactPerson": { "type": "string" }, "department": { "type": "string" }, "subdivision": { "type": "string" }, "street": { "type": "string" }, "additionalDetails": { "type": "string" }, "city": { "type": "string" }, "zipCode": { "type": "string" }, "country": { "type": "string", "pattern": "[A-Z]{2}" } } }, "paymentMethodName": { "x-description-missing": true, "type": "string" }, "paymentStatus": { "x-description-missing": true, "type": "string", "enum": [ "pending", "paid", "partlyPaid", "canceled", "partialCancellation", "badDebt", "debited", "unknown" ] }, "gln": { "x-description-missing": true, "type": "string", "nullable": true }, "taxation": { "x-description-missing": true, "type": "number" }, "positions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "number" }, "position": { "type": "number" }, "salesOrderPosition": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "createdAt": { "type": "string", "format": "date-time" }, "productId": { "type": "number" }, "productNumber": { "type": "string" }, "description": { "type": "string" }, "quantity": { "type": "number" }, "price": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "vatCategory": { "type": "string" }, "taxRate": { "type": "number", "format": "float" }, "discount": { "type": "number", "format": "float", "nullable": true } } } } } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "delete": { "tags": [ "Credit Note" ], "operationId": "creditNote.delete", "summary": "[ALPHA] Delete single credit note", "description": "Deletes a single credit note resource identified by its URI", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Credit Note" ], "operationId": "creditNote.update", "summary": "[EARLY ACCESS] Update single credit note", "description": "[EARLY ACCESS] Update single credit note", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "[EARLY ACCESS] Update single credit note", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "date", "costCenter", "project", "customer", "tags", "externalOrderReference", "devCustomer", "billingAddress", "paymentMethodName", "gln", "taxation" ], "properties": { "date": { "type": "string", "format": "date" }, "costCenter": { "type": "string" }, "project": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "customer": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "tags": { "type": "array", "items": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } } }, "externalOrderReference": { "type": "string", "nullable": true }, "devCustomer": { "type": "string", "nullable": true }, "billingAddress": { "type": "object", "additionalProperties": false, "required": [ "name", "contactPerson", "department", "subdivision", "street", "additionalDetails", "city", "zipCode", "country" ], "nullable": true, "properties": { "name": { "type": "string" }, "contactPerson": { "type": "string" }, "department": { "type": "string", "nullable": true }, "subdivision": { "type": "string", "nullable": true }, "street": { "type": "string" }, "additionalDetails": { "type": "string", "nullable": true }, "city": { "type": "string" }, "zipCode": { "type": "string" }, "country": { "type": "string", "pattern": "[A-Z]{2}" } } }, "paymentMethodName": { "type": "string" }, "gln": { "type": "string", "nullable": true }, "taxation": { "type": "string", "pattern": "\\d+" } } }, "examples": { "update CreditNote": { "value": { "date": "2023-01-01", "costCenter": "center", "project": { "id": "32" }, "customer": { "id": "64" }, "tags": [ { "id": "128" } ], "externalOrderReference": "ref", "devCustomer": "dev", "billingAddress": null, "paymentMethodName": "method", "gln": null, "taxation": "7" } } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/creditNotes/{id}/balance": { "get": { "tags": [ "Credit Note" ], "operationId": "creditNote.balance", "summary": "View Credit Note Balance", "description": "Returns balance information (documents, payments) for a single credit note", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "documents": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "invoices": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "amount": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "date": { "type": "string", "format": "date-time" } } } }, "creditNotes": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "amount": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "date": { "type": "string", "format": "date-time" } } } } } }, "payments": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "reference": { "type": "object", "additionalProperties": false, "description": "Only one of the actually referenced object.", "properties": { "invoice": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "creditNote": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } } } }, "payment": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "type": { "type": "string", "enum": [ "incoming", "outgoing" ], "nullable": false }, "statementId": { "type": "string" }, "accountName": { "type": "string" }, "amount": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "date": { "type": "string", "format": "date-time" } } } } } } } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/creditNotesTags": { "get": { "tags": [ "Credit Note Tag" ], "operationId": "creditNoteTag.list", "summary": "List Credit Notes tags", "description": "Returns a collection with all credit notes tags.", "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "description": "A list of tags", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The identifier of the tag", "type": "string", "pattern": "\\d+", "example": "1337" }, "name": { "description": "The name of the tag", "type": "string", "example": "Active" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } } } } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/creditNotes/{id}/documents": { "get": { "tags": [ "Credit Note" ], "operationId": "creditNote.documents.view", "summary": "[EARLY ACCESS] View related documents for credit note", "description": "Returns details for related documents of a single credit note.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data" ], "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "salesOrder": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "status": { "type": "string", "enum": [ "created", "released", "sent", "canceled", "completed", "unknown" ] }, "number": { "type": "string" }, "url": { "type": "string" }, "date": { "type": "string", "format": "date" } } } }, "deliveryNotes": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "status": { "type": "string", "enum": [ "created", "released", "sent", "canceled", "completed", "unknown" ] }, "number": { "type": "string" }, "url": { "type": "string" }, "date": { "type": "string", "format": "date" } } } }, "invoices": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "status": { "type": "string", "enum": [ "created", "released", "sent", "canceled", "completed", "unknown" ] }, "number": { "type": "string" }, "url": { "type": "string" }, "date": { "type": "string", "format": "date" } } } }, "pdfArchives": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "url": { "type": "string" }, "date": { "type": "string", "format": "datetime" }, "name": { "type": "string" }, "createdBy": { "type": "object", "additionalProperties": false, "required": [ "name" ], "properties": { "name": { "type": "string" } } } } } } } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/creditNotes/{id}/positions": { "post": { "tags": [ "Credit Note" ], "operationId": "creditNote.createPositions", "summary": "[ALPHA] Create Positions for Credit note", "description": "[ALPHA] Adds credit note positions", "requestBody": { "description": "[ALPHA] Create credit note positions object", "content": { "application/vnd.xentral.default.v1-alpha+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "product", "quantity", "price", "vatCategory", "taxRate" ], "properties": { "salesOrderPosition": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "quantity": { "x-description-missing": true, "type": "number", "format": "double" }, "price": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "vatCategory": { "x-description-missing": true, "type": "string" }, "taxRate": { "x-description-missing": true, "type": "number", "format": "float" }, "discounts": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "totalPercent": { "x-description-missing": true, "type": "number", "format": "float", "nullable": true } } } } } }, "examples": { "create CreditNote positions": { "value": [ { "product": { "id": "16" }, "quantity": 32.64, "price": { "currency": "EUR", "amount": "16.8" }, "vatCategory": "cat", "taxRate": 16 } ] } } } } }, "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Credit Note" ], "operationId": "creditNote.updatePositions", "summary": "[ALPHA] Update Positions for Credit Note", "description": "[ALPHA] Updates credit note positions", "requestBody": { "description": "[ALPHA] Update credit note positions object", "content": { "application/vnd.xentral.default.v1-alpha+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "product", "quantity", "price", "vatCategory", "taxRate" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "salesOrderPosition": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "quantity": { "x-description-missing": true, "type": "number", "format": "double" }, "price": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "vatCategory": { "x-description-missing": true, "type": "string" }, "taxRate": { "x-description-missing": true, "type": "number", "format": "float" }, "discounts": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "totalPercent": { "x-description-missing": true, "type": "number", "format": "float", "nullable": true } } } } } }, "examples": { "update CreditNote positions": { "value": [ { "id": "1337", "product": { "id": "42" }, "quantity": 12.24, "price": { "currency": "EUR", "amount": "1024.0" }, "vatCategory": "cat", "taxRate": 16 } ] } } } } }, "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/creditNotes/{id}/positions/{positionId}": { "delete": { "operationId": "creditNote.deletePosition", "summary": "[ALPHA] Delete Position from Credit Note", "description": "[ALPHA] Delete single credit note position", "tags": [ "Credit Note" ], "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "name": "positionId", "in": "path", "description": "Credit note position ID", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/customers": { "post": { "tags": [ "Customer" ], "operationId": "customer.create", "summary": "Create customer", "description": "Creates a new customer. If you provide a specific project then it must be existing otherwise you get 400 HTTP status.", "requestBody": { "description": "Create a customer object", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "type", "general" ], "properties": { "type": { "type": "string", "enum": [ "company", "person" ] }, "general": { "type": "object", "additionalProperties": false, "required": [ "name" ], "properties": { "title": { "type": "string", "nullable": true }, "name": { "type": "string" }, "birthday": { "type": "string", "format": "date" }, "address": { "type": "object", "additionalProperties": false, "required": [ "street", "zip", "city", "state", "country", "note" ], "properties": { "street": { "type": "string" }, "zip": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string", "nullable": true }, "country": { "type": "string" }, "note": { "type": "string" } } } } }, "contact": { "type": "object", "additionalProperties": false, "properties": { "phone": { "type": "string", "nullable": true }, "fax": { "type": "string", "nullable": true }, "mobile": { "type": "string", "nullable": true }, "email": { "type": "string" }, "website": { "type": "string", "nullable": true }, "marketingMails": { "type": "boolean" }, "trackingMails": { "type": "boolean" } } }, "bankAccount": { "type": "object", "additionalProperties": false, "properties": { "holder": { "type": "string" }, "iban": { "type": "string" }, "bic": { "type": "string" }, "sepa": { "type": "boolean" } } }, "project": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string" } } }, "tags": { "type": "array", "items": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } } } } }, "examples": { "create customer": { "value": { "type": "company", "general": { "title": "Doktor", "name": "Tom Schneider", "birthday": "1980-04-30", "address": { "note": "Erster Stock", "street": "Musterstrasse 20", "zip": "12345", "city": "Musterstadt", "state": "Bayern", "country": "Deutschland" } }, "contact": { "email": "xentral@xentral.com", "marketingMails": false, "trackingMails": false }, "bankAccount": { "holder": "Tom", "iban": "DE46500105171867232974", "bic": "DE", "sepa": false }, "project": { "id": "1" }, "tags": [ { "id": "1" }, { "id": "2" } ] } } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "get": { "tags": [ "Customer" ], "operationId": "customer.list", "summary": "List customer", "description": "Lists an existing customer", "parameters": [ { "name": "filter", "in": "query", "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "array", "items": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } }, { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "search", "id", "name", "number", "country", "zip", "city", "project", "projectName", "phone", "fax", "mobile", "email", "addressNote", "department", "subdivision", "vatNumber", "taxNumber", "gln", "tag", "tagName", "street" ] }, "op": { "type": "string", "enum": [ "equals", "notEquals", "in", "notIn", "exactlyIn", "allIn", "allNotIn", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan" ] }, "value": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] } } } } ] } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "name", "number", "country", "zip", "city", "project", "projectName", "telephone", "fax", "mobile", "email", "addressNote", "department", "subdivision", "vatNumber", "taxNumber", "gln" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Customer list.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data", "extra" ], "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "type", "general" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "type": { "x-description-missing": true, "type": "string" }, "project": { "description": "An optional object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "nullable": true, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } }, "general": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "name", "address" ], "properties": { "number": { "type": "string" }, "fax": { "type": "string", "nullable": true }, "mobile": { "type": "string", "nullable": true }, "department": { "type": "string" }, "subdivision": { "type": "string" }, "vatNumber": { "type": "string" }, "taxNumber": { "type": "string", "nullable": true }, "gln": { "type": "string" }, "employeeNumber": { "type": "string" }, "honorific": { "type": "string" }, "title": { "type": "string" }, "name": { "type": "string" }, "birthday": { "type": "string", "nullable": true, "format": "date" }, "tags": { "description": "A list of tags", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The identifier of the tag", "type": "string", "pattern": "\\d+", "example": "1337" }, "name": { "description": "The name of the tag", "type": "string", "example": "Active" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "customerNumber": { "type": "string" }, "phone": { "type": "string", "nullable": true }, "email": { "type": "string" }, "address": { "type": "object", "additionalProperties": false, "required": [ "street", "zip", "city", "state", "country", "note" ], "properties": { "street": { "type": "string" }, "zip": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string", "nullable": true }, "country": { "type": "string" }, "note": { "type": "string" } } } } }, "tags": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "description": "Either ID or name and key." }, "key": { "type": "string" }, "name": { "type": "string" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "freeFields": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "value": { "type": "string" } } } } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } }, "application/vnd.xentral.default.v1+csv": { "schema": { "type": "string" } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Customer" ], "operationId": "customer.updateMultiple", "summary": "Update multiple customers tags", "description": "Updates tags for multiple customers", "requestBody": { "description": "Customer update multiple request payload", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "tags": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "description": "Either ID or name and key." }, "key": { "x-description-missing": true, "type": "string" }, "name": { "x-description-missing": true, "type": "string" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } } } } }, "examples": { "patch multiple customers": { "value": [ { "id": "1201", "tags": [ { "id": "1101" }, { "key": "Tag3", "name": "Tag#3", "color": "FF0000" }, { "key": "Tag4", "name": "Tag#4", "color": "0000FF" } ] }, { "id": "1202", "tags": [ { "id": "1101" }, { "key": "Tag3", "name": "Tag#3", "color": "FF0000" }, { "key": "Tag4", "name": "Tag#4", "color": "0000FF" } ] } ] } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } } } } }, "/api/customers/{id}": { "get": { "tags": [ "Customer" ], "operationId": "customer.view", "summary": "View customer", "description": "Shows an existing customer details", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Customer view.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data" ], "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "id", "type", "general" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "type": { "x-description-missing": true, "type": "string" }, "number": { "x-description-missing": true, "type": "string" }, "general": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "name", "address" ], "properties": { "honorific": { "type": "string" }, "title": { "type": "string" }, "name": { "type": "string" }, "birthday": { "type": "string", "format": "date" }, "address": { "type": "object", "additionalProperties": false, "required": [ "street", "zip", "city", "state", "country", "note" ], "properties": { "street": { "type": "string" }, "zip": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string", "nullable": true }, "country": { "type": "string" }, "note": { "type": "string" } } } } }, "tags": { "description": "A list of tags", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The identifier of the tag", "type": "string", "pattern": "\\d+", "example": "1337" }, "name": { "description": "The name of the tag", "type": "string", "example": "Active" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } } } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." } } }, "patch": { "tags": [ "Customer" ], "operationId": "customer.update", "summary": "Update single customer tags", "description": "Updates tags of a single customer", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "Customer update request payload", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "tags": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "description": "Either ID or name and key." }, "key": { "type": "string" }, "name": { "type": "string" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } } } }, "examples": { "update customer": { "value": { "tags": [ { "id": "1101" }, { "key": "Tag3", "name": "Tag#3", "color": "FF0000" }, { "key": "Tag4", "name": "Tag#4", "color": "0000FF" } ] } } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "404": { "description": "Resource was not found or not enough access privileges" } } }, "delete": { "tags": [ "Customer" ], "operationId": "customer.delete", "summary": "Delete customer", "description": "Delete existing customer", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "204": { "description": "Operation completed successfully, no response body" }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." } } } }, "/api/customersTags": { "get": { "tags": [ "Customer Tag" ], "operationId": "customerTag.list", "summary": "List customers tags", "description": "Returns a collection with all customers tags.", "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "description": "A list of tags", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The identifier of the tag", "type": "string", "pattern": "\\d+", "example": "1337" }, "name": { "description": "The name of the tag", "type": "string", "example": "Active" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/deliveries": { "get": { "tags": [ "Delivery" ], "operationId": "deliveries.list", "summary": "List deliveries", "description": "Lists existing deliveries", "parameters": [ { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "salesOrderId" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } }, { "name": "filter", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "salesOrderId" ] }, "op": { "type": "string", "enum": [ "equals", "in" ] }, "value": { "oneOf": [ { "type": "string" }, { "type": "array", "description": "Used for the operations 'in'.", "title": "Array", "items": { "type": "string" } } ] } } } } } ], "responses": { "200": { "description": "Delivery list", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data", "extra" ], "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "deliveryNote", "tracking", "salesOrder", "shippingMethod" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "tracking": { "type": "object", "required": [ "number" ], "additionalProperties": false, "properties": { "number": { "type": "string", "description": "The tracking number provided by the carrier." }, "link": { "type": "string", "description": "Carrier tracking link" }, "carrier": { "type": "string", "description": "Carrier that shipping the delivery" } }, "description": "Tracking information for the delivery", "example": { "number": "101010101010101" } }, "deliveryNote": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "salesOrder": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "shippingMethod": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "429": { "description": "Too many API calls made." } } } }, "/api/deliveryNotes": { "get": { "tags": [ "Delivery Note" ], "operationId": "deliveryNote.list", "summary": "[EARLY ACCESS] Delivery note list", "description": "This endpoint is only available as beta version and will introduce breaking changes without further notice or versioning. Returns all delivery notes.", "parameters": [ { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id, deliveryNoteNumber" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } }, { "name": "filter", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "documentDate", "createdAt", "status", "salesOrderId" ] }, "op": { "type": "string", "enum": [ "greaterThan", "lessThan", "equals", "notEquals", "in", "notIn" ] }, "value": { "oneOf": [ { "type": "string", "description": "For dates use format: 2023-01-26 and encode as url. Valid statuses are created,released,canceled,sent.", "title": "String" }, { "type": "array", "description": "Used for the operations 'in', 'notIn', 'exactlyIn', 'allIn' and 'allNotIn'.", "title": "Array", "items": { "type": "string" } } ] } } } } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "number": { "type": "string", "description": "Number of the document", "example": "200001" }, "createdAt": { "type": "string", "format": "datetime", "description": "Creation date of the delivery note", "example": "2024-01-01 00:00:00" }, "documentDate": { "type": "string", "format": "date", "description": "Date of the document", "example": "2024-01-01" }, "receiver": { "type": "object", "nullable": true, "required": [ "number", "name" ], "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string", "nullable": true }, "number": { "type": "string", "nullable": true } }, "description": "Receiver contact for the delivery", "example": { "name": "Mr. John Doe", "number": "10" } }, "country": { "type": "string", "description": "Country code for the delivery", "example": "DE" }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "description": "Project to which the delivery note belongs to", "example": { "id": "1" } }, "shippingMethod": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "description": "Shipping method used for the delivery note", "example": { "id": "1" } }, "type": { "type": "string", "description": "Internal type of the delivery note", "example": "type" }, "status": { "type": "string", "enum": [ "created", "released", "canceled", "sent", "unknown" ], "description": "Status of the delivery note", "example": "created" }, "salesOrder": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/deliveryNotes/{id}": { "get": { "tags": [ "Delivery Note" ], "operationId": "deliveryNote.view", "summary": "[EARLY ACCESS] View delivery note", "description": "Returns details of a delivery note", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "documentNumber": { "type": "string", "description": "Internal identification for the delivery note", "example": "200001" }, "salesOrder": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "transactionNumber": { "type": "string", "description": "Transaction number associated with a delivery note", "example": "transaction1" }, "customerOrderNumber": { "type": "string", "description": "Customer order associated with a delivery note", "example": "customerOrder1" }, "salesChannel": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "bodyIntroduction": { "type": "string", "description": "Initial description message for delivery note", "example": "Initial info" }, "bodyOutroduction": { "type": "string", "description": "Ending description message for delivery note", "example": "Additional info" }, "internalDesignation": { "type": "string", "description": "Internal designation for delivery note", "example": "InternalDN1" }, "date": { "type": "string", "format": "date", "description": "Date of creation of a delivery note", "example": "2025-01-01" }, "status": { "type": "string", "enum": [ "completed", "created", "released", "canceled", "unknown" ], "description": "Status of the delivery note", "example": "completed" }, "customer": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "number": { "type": "string", "nullable": true } }, "description": "Customer linked to a Sales Order", "example": { "id": "1" } }, "comment": { "type": "string", "example": "A comment about this delivery note", "description": "Comment included in the delivery note" }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "language": { "type": "object", "additionalProperties": false, "required": [ "iso2" ], "properties": { "iso2": { "type": "string", "description": "ISO 639-1 Code", "nullable": true } }, "description": "Language information for a Sales Order", "example": { "iso2": "DE" } }, "log": { "type": "object", "properties": { "createdAt": { "type": "string", "format": "date-time", "nullable": true }, "createdBy": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "email": { "type": "string", "format": "email" } } } }, "description": "Logging information for the delivery note", "example": { "createdAt": "2023-12-01 00:00:00", "createdBy": { "id": "1", "name": "User 1" } } }, "delivery": { "allOf": [ { "type": "object", "properties": { "autoShipping": { "type": "boolean" }, "fastLane": { "type": "boolean" }, "shippingCosts": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "shippingCostProduct", "quantity" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "quantity": { "type": "number", "format": "double" }, "comment": { "type": "string" }, "shippingCostProduct": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "description": { "type": "string" }, "freeFields": { "type": "array", "nullable": true, "items": { "type": "object", "additionalProperties": false, "required": [ "id", "value" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "value": { "type": "string" } } } }, "number": { "type": "string", "nullable": true } } }, "tax": { "type": "object", "required": [ "taxText" ], "properties": { "effectiveVatRate": { "type": "number", "format": "float", "description": "The final VAT on a position. Calculated based on other fields. Only supported on the view endpoint and is always returned" }, "vatCategory": { "type": "string", "nullable": true, "enum": [ "reduced", "normal", "exempt" ], "description": "VAT category. When importing a position only one of `rate` or `vatCategory` must be used.", "example": "reduced" }, "rate": { "type": "number", "format": "float", "example": 0.5, "nullable": true, "description": "VAT rate. When importing a position only one of `rate` or `vatCategory` must be used." }, "taxText": { "type": "string", "example": "Tax Text", "nullable": true, "description": "Tax Text" } } }, "price": { "type": "object", "additionalProperties": false, "properties": { "amount": { "type": "string", "format": "float" }, "currency": { "type": "string", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ] } } }, "discount": { "type": "number", "format": "float" }, "webId": { "type": "string" } } } }, "shippingAddress": { "type": "object", "additionalProperties": false, "required": [ "name", "city", "country", "zipCode", "street" ], "properties": { "type": { "type": "string", "enum": [ "mr", "mrs", "company", "other" ] }, "name": { "type": "string" }, "department": { "type": "string" }, "contactPerson": { "type": "string" }, "subDepartment": { "type": "string" }, "street": { "type": "string" }, "zipCode": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "country": { "type": "string" }, "addressSupplement": { "type": "string" }, "gln": { "type": "string" }, "email": { "type": "string", "format": "email" } } } } }, { "type": "object", "required": [ "shippingMethod" ], "properties": { "shippingMethod": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "deliveryTerms": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "email": { "type": "string", "format": "email" }, "conditions": { "type": "string" } } } ], "description": "Delivery information for the delivery note", "example": { "autoShipping": true, "fastLane": true, "shippingMethod": { "id": "1" }, "shippingCosts": [ { "id": "1", "quantity": 3, "shippingCostProduct": { "id": "1" } } ], "email": "user.email@email.org", "conditions": "none" } }, "tags": { "type": "array", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "type": { "type": "string", "nullable": true }, "title": { "type": "string", "nullable": true } } }, "description": "Tags associated with the delivery note", "example": [ { "id": "1" } ] }, "positions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "product", "quantity" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "quantity": { "type": "number", "format": "double" }, "comment": { "type": "string" }, "product": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "description": { "type": "string" }, "freeFields": { "type": "array", "nullable": true, "items": { "type": "object", "additionalProperties": false, "required": [ "id", "value" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "value": { "type": "string" } } } }, "number": { "type": "string", "nullable": true } } }, "tax": { "type": "object", "required": [ "taxText" ], "properties": { "effectiveVatRate": { "type": "number", "format": "float", "description": "The final VAT on a position. Calculated based on other fields. Only supported on the view endpoint and is always returned" }, "vatCategory": { "type": "string", "nullable": true, "enum": [ "reduced", "normal", "exempt" ], "description": "VAT category. When importing a position only one of `rate` or `vatCategory` must be used.", "example": "reduced" }, "rate": { "type": "number", "format": "float", "example": 0.5, "nullable": true, "description": "VAT rate. When importing a position only one of `rate` or `vatCategory` must be used." }, "taxText": { "type": "string", "example": "Tax Text", "nullable": true, "description": "Tax Text" } } }, "price": { "type": "object", "additionalProperties": false, "properties": { "amount": { "type": "string", "format": "float" }, "currency": { "type": "string", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ] } } }, "discount": { "type": "number", "format": "float" }, "webId": { "type": "string" } } }, "description": "Items included within the delivery note", "example": [ { "product": { "id": "1" }, "quantity": 5 } ] } }, "description": "Data representation of a single delivery note", "example": { "id": "1", "documentNumber": "200001", "salesOrder": { "id": "1" }, "transactionNumber": "transaction1", "customerOrderNumber": "customerOrder1", "salesChannel": { "id": "1" }, "bodyIntroduction": "Initial info", "bodyOutroduction": "Additional info", "internalDesignation": "internalDN1", "date": "2025-01-01", "status": "completed", "customer": { "id": "1" }, "comment": "A comment about this delivery note", "project": { "id": "1" }, "language": { "iso2": "DE" }, "log": { "createdAt": "2023-12-01 00:00:00", "createdBy": { "id": "1", "name": "User 1" } }, "delivery": { "autoShipping": true, "fastLane": true, "shippingMethod": { "id": "1" }, "shippingCosts": [ { "id": "1", "quantity": 3, "shippingCostProduct": { "id": "1" } } ], "email": "user.email@email.org", "conditions": "none" }, "tags": [ { "id": "1" } ], "positions": [ { "product": { "id": "1" }, "quantity": 5 } ] } } } } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" } } } }, "/api/deliveryTerms": { "get": { "tags": [ "Delivery Terms" ], "operationId": "DeliveryTerms.list", "summary": "List Delivery Terms", "description": "Lists existing Delivery Terms", "parameters": [ { "name": "filter", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "id", "designation" ] }, "op": { "type": "string", "enum": [ "equals", "notEquals", "in", "notIn", "exactlyIn", "allIn", "allNotIn", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan", "is" ] }, "value": { "oneOf": [ { "type": "string", "description": "Used for the operations 'equals', 'notEquals', 'contains', 'notContains', 'startsWith', 'endsWith' and 'is'.", "title": "String" }, { "type": "array", "description": "Used for the operations 'in', 'notIn', 'exactlyIn', 'allIn' and 'allNotIn'.", "title": "Array", "items": { "type": "string" } } ] } } } } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } } ], "responses": { "200": { "description": "Delivery Terms list", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data", "extra" ], "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "designation" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "uuid": { "description": "UUID identifier of the resource.", "type": "string", "pattern": "^$|^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$", "example": "a00fd11e-3a67-433b-83c0-4e815fd4a0e1" }, "designation": { "type": "string", "description": "Designation of delivery term", "example": "Term" } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/employees": { "get": { "tags": [ "Employee" ], "operationId": "employee.list", "summary": "List employees", "description": "Lists existing employees", "parameters": [ { "name": "searchTerm", "in": "query", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Employee minimal list.", "content": { "application/vnd.xentral.minimal.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "number": { "x-description-missing": true, "type": "string" }, "name": { "x-description-missing": true, "type": "string" } } } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." } } } }, "/api/products/{id}/externalReferences": { "get": { "tags": [ "External Reference" ], "operationId": "externalReference.list", "summary": "[EARLY ACCESS] List external references for given Product", "description": "Returns list of external references for given Product.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "x-description-missing": true, "type": "string", "minLength": 1 }, "number": { "x-description-missing": true, "type": "string", "minLength": 1 }, "isActive": { "x-description-missing": true, "type": "boolean" }, "isScannable": { "x-description-missing": true, "type": "boolean" }, "target": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string", "minLength": 1 }, "isActive": { "type": "boolean" } } } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } }, "examples": { "Lists all external references of a single product": { "value": { "data": [ { "id": "1", "name": "SKU", "number": "11111", "isActive": true, "isScannable": false, "target": { "id": "1", "name": "Shopware" } }, { "id": "3", "name": "SKU Shop", "number": "22222", "isActive": true, "isScannable": false, "target": { "id": "1", "name": "Shopware" } } ] } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "post": { "tags": [ "External Reference" ], "operationId": "externalReference.create", "summary": "[EARLY ACCESS] Create new external references for a given Product", "description": "Creates new external references for a given Product", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "ExternalReference create request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "number": { "type": "string" }, "isActive": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isScannable": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "target": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } } } }, "examples": { "Create external reference": { "value": { "name": "Example external reference", "number": "1234567", "isActive": true, "isScannable": true, "target": { "id": "3543" } } } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "External Reference" ], "operationId": "externalReference.updateMultiple", "summary": "[EARLY ACCESS] Update external references for a given Product", "description": "Updates external references for a given Product", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "ExternalReference update multiple request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "x-description-missing": true, "type": "string" }, "number": { "x-description-missing": true, "type": "string" }, "isActive": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isScannable": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "target": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } } } } }, "examples": { "Update external references": { "value": [ { "id": "123", "isActive": false }, { "id": "456", "isActive": false } ] } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "429": { "description": "Too many API calls made." } } }, "delete": { "tags": [ "External Reference" ], "operationId": "externalReference.deleteMultiple", "summary": "[EARLY ACCESS] Delete external references of a given Product", "description": "Deletes external references of a given Product", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "ExternalReference delete multiple request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "array", "items": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "429": { "description": "Too many API calls made." } } } }, "/api/externalReferenceTargets": { "get": { "tags": [ "External Reference Target" ], "operationId": "externalReferenceTarget.list", "summary": "[EARLY ACCESS] List External Reference Targets", "description": "Returns a collection with all External Reference Targets.", "responses": { "200": { "description": "ExternalReferenceTarget list", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "x-description-missing": true, "type": "string", "minLength": 1 }, "isActive": { "x-description-missing": true, "type": "boolean" } } } } } }, "examples": { "Lists all external reference targets": { "value": { "data": [ { "id": "1", "name": "Shopware", "isActive": true } ] } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." } } } }, "/api/invoices": { "post": { "tags": [ "Invoice" ], "operationId": "invoice.create", "summary": "Create invoice", "description": "Creates a invoice", "requestBody": { "description": "Create an invoice object", "content": { "application/vnd.xentral.default.v1-alpha+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "customer" ], "properties": { "date": { "type": "string", "format": "date" }, "costCenter": { "type": "string" }, "project": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "customer": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "tags": { "type": "array", "items": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "externalOrderReference": { "type": "string", "nullable": true }, "devCustomer": { "type": "string", "nullable": true }, "billingAddress": { "type": "object", "additionalProperties": false, "required": [ "name", "contactPerson", "department", "subdivision", "street", "additionalDetails", "city", "zipCode", "country" ], "nullable": true, "properties": { "name": { "type": "string" }, "contactPerson": { "type": "string" }, "department": { "type": "string", "nullable": true }, "subdivision": { "type": "string", "nullable": true }, "street": { "type": "string" }, "additionalDetails": { "type": "string", "nullable": true }, "city": { "type": "string" }, "zipCode": { "type": "string" }, "country": { "type": "string", "pattern": "[A-Z]{2}" } } }, "paymentTerms": { "type": "object", "additionalProperties": false, "required": [ "dueDate", "earlyPaymentDate", "earlyPaymentDiscount" ], "nullable": true, "properties": { "dueDate": { "type": "string", "format": "date-time", "nullable": true }, "earlyPaymentDate": { "type": "string", "format": "date-time", "nullable": true }, "earlyPaymentDiscount": { "type": "number", "format": "float" } } }, "paymentMethodName": { "type": "string" }, "paymentStatus": { "type": "string", "enum": [ "pending", "paid", "partlyPaid", "canceled", "partialCancellation", "badDebt", "debited" ] }, "gln": { "type": "string", "nullable": true }, "taxation": { "type": "number" }, "positions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "product", "quantity", "price", "vatCategory", "taxRate" ], "properties": { "salesOrderPosition": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "quantity": { "x-description-missing": true, "type": "number", "format": "double" }, "price": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "vatCategory": { "x-description-missing": true, "type": "string" }, "taxRate": { "x-description-missing": true, "type": "number", "format": "float" }, "discounts": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "totalPercent": { "x-description-missing": true, "type": "number", "format": "float", "nullable": true } } } } } } } }, "examples": { "Create new minimal invoice": { "value": { "project": { "id": "1" }, "customer": { "id": "12" } } } } }, "application/vnd.xentral.minimal.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "salesOrder": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } } } }, "examples": { "Create invoice from sales order": { "value": { "salesOrder": { "id": "12" } } } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "get": { "tags": [ "Invoice" ], "operationId": "invoice.list", "summary": "List invoices", "description": "Returns a collection with all invoices.", "parameters": [ { "name": "filter", "in": "query", "style": "deepObject", "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "array", "items": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } }, { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "search", "id", "invoice", "date", "status", "customerName", "customerNumber", "country", "projectId", "projectName", "projectAbbr", "paymentMethod", "paymentStatus", "debit", "balance", "currency", "shippingMethod", "amountNet", "salesOrder" ] }, "op": { "type": "string", "enum": [ "equals", "notEquals", "in", "notIn", "exactlyIn", "allIn", "allNotIn", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan" ] }, "value": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] } } } } ] } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "invoice", "date", "customerName", "customerNumber", "country", "project", "paymentMethod", "debit", "currency", "paymentStatus", "balance", "status", "shippingMethod", "amountNet" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.minimal.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "number": { "x-description-missing": true, "type": "string", "nullable": true }, "date": { "x-description-missing": true, "type": "string", "format": "date-time" }, "status": { "x-description-missing": true, "type": "string", "enum": [ "created", "released", "sent", "canceled", "completed", "partialCancellation", "unknown" ] }, "address": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "name", "country", "customerNumber" ], "properties": { "name": { "type": "string" }, "country": { "type": "string" }, "customerNumber": { "type": "string" } } }, "project": { "x-description-missing": true, "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id", "name", "abbreviation" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "abbreviation": { "type": "string" } } }, "payment": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "method", "status", "debit", "balance" ], "properties": { "method": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "paid", "partlyPaid", "canceled", "partialCancellation", "badDebt", "debited", "unknown" ] }, "debit": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "balance": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } } } }, "additionalFields": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "amountNet", "shippingMethod", "orderNumber", "internet" ] }, "value": { "type": "string" } } } }, "tags": { "description": "A list of tags", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The identifier of the tag", "type": "string", "pattern": "\\d+", "example": "1337" }, "name": { "description": "The name of the tag", "type": "string", "example": "Active" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "updatedBy": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "updatedAt": { "x-description-missing": true, "type": "string", "format": "date-time" } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } }, "application/vnd.xentral.default.v1+csv": { "schema": { "type": "string" } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/invoices/{id}": { "get": { "tags": [ "Invoice" ], "operationId": "invoice.view", "summary": "View invoice", "description": "Returns details of a single invoice.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data" ], "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "documentNumber": { "x-description-missing": true, "type": "string", "nullable": true }, "documentDate": { "x-description-missing": true, "type": "string", "format": "date-time" }, "log": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "createdAt", "createdBy", "sentAt", "sentBy", "updatedAt" ], "properties": { "createdAt": { "type": "string", "format": "date-time" }, "createdBy": { "type": "object", "additionalProperties": false, "required": [ "name" ], "nullable": true, "properties": { "name": { "type": "string" } } }, "sentAt": { "type": "string", "format": "date-time", "nullable": true }, "sentBy": { "type": "object", "additionalProperties": false, "required": [ "name" ], "nullable": true, "properties": { "name": { "type": "string" } } }, "updatedAt": { "type": "string", "format": "date-time" } } }, "amountGross": { "x-description-missing": true, "type": "number", "format": "float" }, "amountNet": { "x-description-missing": true, "type": "number", "format": "float" }, "costCenter": { "x-description-missing": true, "type": "string" }, "status": { "x-description-missing": true, "type": "string", "enum": [ "created", "released", "sent", "canceled", "completed", "partialCancellation", "unknown" ] }, "project": { "x-description-missing": true, "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id", "name", "abbreviation" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "abbreviation": { "type": "string" } } }, "customer": { "description": "An optional object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "nullable": true, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } }, "tags": { "description": "A list of tags", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The identifier of the tag", "type": "string", "pattern": "\\d+", "example": "1337" }, "name": { "description": "The name of the tag", "type": "string", "example": "Active" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "externalOrderReference": { "x-description-missing": true, "type": "string", "nullable": true }, "devCustomer": { "x-description-missing": true, "type": "string", "nullable": true }, "billingAddress": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "id", "name", "contactPerson", "department", "subdivision", "street", "additionalDetails", "city", "zipCode", "country" ], "nullable": true, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "contactPerson": { "type": "string" }, "department": { "type": "string" }, "subdivision": { "type": "string" }, "street": { "type": "string" }, "additionalDetails": { "type": "string" }, "city": { "type": "string" }, "zipCode": { "type": "string" }, "country": { "type": "string", "pattern": "[A-Z]{2}" }, "email": { "type": "string", "format": "email", "nullable": true } } }, "paymentTerms": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "dueDate", "earlyPaymentDate", "earlyPaymentDiscount" ], "nullable": true, "properties": { "dueDate": { "type": "string", "format": "date-time", "nullable": true }, "earlyPaymentDate": { "type": "string", "format": "date-time", "nullable": true }, "earlyPaymentDiscount": { "type": "number", "format": "float" } } }, "paymentMethodName": { "x-description-missing": true, "type": "string" }, "paymentStatus": { "x-description-missing": true, "type": "string", "enum": [ "pending", "paid", "partlyPaid", "canceled", "partialCancellation", "badDebt", "debited", "unknown" ] }, "dunning": { "x-description-missing": true, "type": "string", "nullable": true }, "dunningDate": { "x-description-missing": true, "type": "string", "format": "date", "nullable": true }, "gln": { "x-description-missing": true, "type": "string", "nullable": true }, "taxation": { "x-description-missing": true, "type": "number" }, "positions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "number" }, "position": { "type": "number" }, "saleOrderPositionId": { "type": "number" }, "createdAt": { "type": "string", "format": "date-time" }, "productId": { "type": "number" }, "productNumber": { "type": "string" }, "description": { "type": "string" }, "quantity": { "type": "number" }, "price": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "vatCategory": { "type": "string" }, "taxRate": { "type": "number", "format": "float" }, "discount": { "type": "number", "format": "float", "nullable": true } } } } } } } } }, "application/vnd.xentral.minimal.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } }, "application/vnd.xentral.default.v1-beta+pdf": { "schema": { "type": "string", "format": "binary" } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "delete": { "tags": [ "Invoice" ], "operationId": "invoice.delete", "summary": "[ALPHA] Delete single invoice", "description": "Deletes a single invoice resource identified by its URI", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "204": { "description": "Operation completed successfully, no response body" }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Invoice" ], "operationId": "invoice.update", "summary": "[EARLY ACCESS] Update single invoice", "description": "[EARLY ACCESS] Update single invoice}", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "[EARLY ACCESS] Update single invoice", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "date", "costCenter", "project", "customer", "tags", "devCustomer", "billingAddress", "paymentMethodName", "gln", "taxation" ], "properties": { "date": { "type": "string", "format": "date" }, "costCenter": { "type": "string" }, "project": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "customer": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "tags": { "type": "array", "items": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } } }, "devCustomer": { "type": "string", "nullable": true }, "billingAddress": { "type": "object", "additionalProperties": false, "required": [ "name", "contactPerson", "department", "subdivision", "street", "additionalDetails", "city", "zipCode", "country" ], "nullable": true, "properties": { "name": { "type": "string" }, "contactPerson": { "type": "string" }, "department": { "type": "string", "nullable": true }, "subdivision": { "type": "string", "nullable": true }, "street": { "type": "string" }, "additionalDetails": { "type": "string", "nullable": true }, "city": { "type": "string" }, "zipCode": { "type": "string" }, "country": { "type": "string", "pattern": "[A-Z]{2}" } } }, "paymentMethodName": { "type": "string" }, "gln": { "type": "string", "nullable": true }, "taxation": { "type": "string", "pattern": "\\d+" } } }, "examples": { "Update invoice": { "value": { "date": "2020-01-01", "costCenter": "3456", "project": { "id": "1" }, "customer": { "id": "12" }, "tags": [ { "id": "1" }, { "id": "2" } ], "devCustomer": "dev", "billingAddress": { "name": "John Doe", "contactPerson": "John Doe", "department": "Sales", "subdivision": "Sales", "street": "Main Street 1", "additionalDetails": "1st floor", "city": "New York", "zipCode": "12345", "country": "US" }, "paymentMethodName": "invoice", "gln": null, "taxation": "0" } } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/invoices/{id}/balance": { "get": { "tags": [ "Invoice" ], "operationId": "invoice.balance", "summary": "View Invoice Balance", "description": "Returns balance information (documents, payments) for a single invoice", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "documents": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "invoices": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "amount": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "date": { "type": "string", "format": "date-time" } } } }, "creditNotes": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "amount": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "date": { "type": "string", "format": "date-time" } } } } } }, "payments": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "reference": { "type": "object", "additionalProperties": false, "description": "Only one of the actually referenced object.", "properties": { "invoice": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "creditNote": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } } } }, "payment": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "type": { "type": "string", "enum": [ "incoming", "outgoing" ], "nullable": false }, "statementId": { "type": "string" }, "accountName": { "type": "string" }, "amount": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "date": { "type": "string", "format": "date-time" } } } } } } } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/invoicesTags": { "get": { "tags": [ "Invoice Tag" ], "operationId": "invoiceTag.list", "summary": "List Invoice tags", "description": "Returns a collection with all invoice tags.", "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "description": "A list of tags", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The identifier of the tag", "type": "string", "pattern": "\\d+", "example": "1337" }, "name": { "description": "The name of the tag", "type": "string", "example": "Active" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } } } } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/invoices/{id}/documents": { "get": { "tags": [ "Invoice" ], "operationId": "invoice.documents.view", "summary": "[EARLY ACCESS] View related documents for invoice", "description": "Returns details for related documents of a single invoice.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data" ], "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "salesOrder": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "status": { "type": "string", "enum": [ "created", "released", "sent", "canceled", "completed", "unknown" ] }, "documentNumber": { "type": "string" }, "documentUrl": { "type": "string" }, "documentDate": { "type": "string", "format": "date" } } } }, "deliveryNotes": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "status": { "type": "string", "enum": [ "created", "released", "sent", "canceled", "completed", "unknown" ] }, "documentNumber": { "type": "string" }, "documentUrl": { "type": "string" }, "documentDate": { "type": "string", "format": "date" } } } }, "creditNotes": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "status": { "type": "string", "enum": [ "approved", "canceled", "completed", "created", "unknown" ] }, "documentNumber": { "type": "string" }, "documentUrl": { "type": "string" }, "documentDate": { "type": "string", "format": "date" } } } }, "returns": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "status": { "type": "string", "enum": [ "created", "released", "sent", "canceled", "completed", "unknown" ] }, "documentNumber": { "type": "string" }, "documentUrl": { "type": "string" }, "documentDate": { "type": "string", "format": "date" } } } }, "pdfArchives": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "documentUrl": { "type": "string" }, "documentDate": { "type": "string", "format": "datetime" }, "documentName": { "type": "string" }, "createdBy": { "type": "object", "additionalProperties": false, "required": [ "name" ], "properties": { "name": { "type": "string" } } } } } } } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/invoices/{id}/positions": { "post": { "tags": [ "Invoice" ], "operationId": "invoice.createPositions", "summary": "[ALPHA] Create Positions for Invoice", "description": "[ALPHA] Adds invoice positions", "requestBody": { "description": "Create credit note positions object", "content": { "application/vnd.xentral.default.v1-alpha+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "product", "quantity", "price", "vatCategory", "taxRate" ], "properties": { "salesOrderPosition": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "quantity": { "x-description-missing": true, "type": "number", "format": "double" }, "price": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "vatCategory": { "x-description-missing": true, "type": "string" }, "taxRate": { "x-description-missing": true, "type": "number", "format": "float" }, "discounts": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "totalPercent": { "x-description-missing": true, "type": "number", "format": "float", "nullable": true } } } } } }, "examples": { "Create invoice positions": { "value": [ { "product": { "id": "1" }, "quantity": 1, "price": { "amount": "100.00", "currency": "EUR" }, "vatCategory": "normal", "taxRate": 19 }, { "product": { "id": "2" }, "quantity": 3, "price": { "amount": "20.20", "currency": "EUR" }, "vatCategory": "normal", "taxRate": 19 } ] } } } } }, "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/invoices/{id}/positions/{positionId}": { "delete": { "operationId": "invoice.deletePosition", "summary": "[ALPHA] Delete Position from Invoice", "description": "[ALPHA] Delete single invoice position", "tags": [ "Invoice" ], "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "name": "positionId", "in": "path", "description": "Invoice position ID", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/invoices/{id}/send": { "patch": { "tags": [ "Invoice" ], "operationId": "invoice.send", "summary": "[EARLY ACCESS] Send invoice", "description": "[EARLY ACCESS] Send invoice", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "[EARLY ACCESS] Send invoice", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "anyOf": [ { "type": "object", "properties": { "email": { "type": "object", "additionalProperties": false, "required": [ "to", "subject", "body" ], "properties": { "to": { "type": "array", "minItems": 1, "items": { "type": "string", "format": "email" } }, "cc": { "type": "array", "nullable": true, "items": { "type": "string", "format": "email" } }, "bcc": { "type": "array", "nullable": true, "items": { "type": "string", "format": "email" } }, "subject": { "type": "string" }, "body": { "type": "string" } } } } }, { "type": "object", "properties": { "printer": { "type": "object", "additionalProperties": false, "oneOf": [ { "type": "object", "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } }, { "type": "object", "properties": { "name": { "type": "string" } } } ] } } } ] }, "examples": { "Send invoice by email": { "value": { "email": { "to": [ "test@example.com" ], "subject": "Your Invoice", "body": "Please find your invoice attached." } } }, "Send invoice to printer": { "value": { "printer": { "id": "1" } } } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/invoices/{id}/status": { "patch": { "tags": [ "Invoice" ], "operationId": "invoice.status", "summary": "[EARLY ACCESS] Update status for single invoice", "description": "[EARLY ACCESS] Update status for single invoice", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } }, "requestBody": { "description": "[EARLY ACCESS] Update status for single invoice", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "description": "At least one of the properties must be present.", "properties": { "status": { "type": "string", "enum": [ "released", "sent" ] }, "paymentStatus": { "type": "string", "enum": [ "paid" ] } } }, "examples": { "Mark invoice as released": { "value": { "status": "released" } }, "Mark invoice as sent": { "value": { "status": "sent" } }, "Set invoice payment status": { "value": { "paymentStatus": "paid" } }, "Mark invoice as sent and set payment status": { "value": { "status": "sent", "paymentStatus": "paid" } } } } } } } }, "/api/liabilities": { "get": { "tags": [ "Liability" ], "operationId": "liability.list", "summary": "List Liability", "description": "Returns a collection with all Liability", "parameters": [ { "name": "filter", "in": "query", "style": "deepObject", "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "array", "items": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } }, { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "supplier", "status", "project", "createdAt" ] }, "op": { "type": "string", "enum": [ "equals", "notEquals", "in", "notIn", "allIn", "allNotIn", "greaterThan", "lessThan" ] }, "value": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] } } } } ] } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "documentNumber", "status", "project", "createdAt" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "description": "A list of liabilities", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "documentNumber": { "description": "Incremental document number. Before the document is approved, there is no document number.", "type": "string", "nullable": true, "example": "LB-100001" }, "date": { "description": "Date of the supplier's invoice", "type": "string", "nullable": false, "format": "date", "example": "2020-01-15" }, "createdAt": { "x-description-missing": true, "type": "string", "nullable": false, "format": "date-time", "example": "2020-01-01 12:00:00+02:00" }, "createdBy": { "description": "The user that created the liability", "type": "object", "additionalProperties": false, "required": [ "name" ], "properties": { "name": { "type": "string", "nullable": true } } }, "updatedAt": { "x-description-missing": true, "type": "string", "nullable": false, "format": "date-time", "example": "2020-01-01 13:00:00+02:00" }, "status": { "description": "Workflow status of the liability", "type": "string", "nullable": false, "enum": [ "PENDING", "PAID", "PARTIALLY_PAID", "CANCELLED" ], "example": "PENDING" }, "supplier": { "description": "The supplier that issued the invoice", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "123456" } }, "supplierInvoiceNumber": { "description": "Document number and receipt Day of the invoice in the supplier's system", "type": "string", "example": "INV-23456" }, "receiptDate": { "description": "Day when the invoice was received", "type": "string", "nullable": true, "format": "date", "example": "2020-01-01" }, "financials": { "description": "Financial information", "type": "object", "additionalProperties": false, "properties": { "amountGross": { "description": "Gross value of the liability", "type": "object", "additionalProperties": false, "required": [ "amount", "currency" ], "properties": { "amount": { "type": "string", "nullable": false, "format": "float", "example": "1234.56", "x-description-missing": true }, "currency": { "type": "string", "nullable": false, "example": "EUR", "x-description-missing": true } } }, "freightCharge": { "x-description-missing": true, "type": "number", "nullable": true, "example": 9.3 }, "taxation": { "description": "The taxation method", "type": "string", "example": "Domestic", "nullable": false }, "taxes": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "normalTax", "reducedTax", "customTax1", "customTax2" ], "properties": { "normalTax": { "description": "The normal tax rate", "type": "object", "additionalProperties": false, "required": [ "rate", "amount" ], "properties": { "rate": { "description": "The tax rate in percent", "type": "number", "nullable": false, "example": 19 }, "amount": { "description": "The tax amount", "type": "number", "nullable": false, "example": 120.5 } } }, "reducedTax": { "description": "The reduced tax rate", "type": "object", "additionalProperties": false, "required": [ "rate", "amount" ], "properties": { "rate": { "description": "The tax rate in percent", "type": "number", "nullable": false, "example": 7 }, "amount": { "description": "The tax amount", "type": "number", "nullable": false, "example": 60.5 } } }, "customTax1": { "description": "The first custom tax rate", "type": "object", "additionalProperties": false, "required": [ "rate", "amount" ], "properties": { "rate": { "description": "The tax rate in percent", "type": "number", "nullable": false, "example": 8.1 }, "amount": { "description": "The tax amount", "type": "number", "nullable": false, "example": 50.5 } } }, "customTax2": { "description": "The second custom tax rate", "type": "object", "additionalProperties": false, "required": [ "rate", "amount" ], "properties": { "rate": { "description": "The tax rate in percent", "type": "number", "nullable": false, "example": 10 }, "amount": { "description": "The tax amount", "type": "number", "nullable": false, "example": 50.5 } } } } }, "bookingText": { "description": "header booking text", "type": "string" }, "paymentTerms": { "description": "The payment terms", "type": "object", "additionalProperties": false, "required": [ "dueDate", "earlyPaymentDate", "earlyPaymentDiscount" ], "properties": { "dueDate": { "description": "The due date of the payment", "type": "string", "nullable": true, "example": "2020-01-15" }, "earlyPaymentDate": { "description": "The date when the early payment discount is valid", "type": "string", "nullable": true, "example": "2020-01-10" }, "earlyPaymentDiscount": { "description": "The discount for early payment", "type": "number", "nullable": false, "example": 2.5 } } }, "payment": { "description": "Information about the payment", "type": "object", "additionalProperties": false, "required": [ "methodName", "paidAmount", "paidOnDate", "discountReceived" ], "properties": { "methodName": { "description": "Name of the used payment method", "type": "string", "nullable": false, "example": "invoice" }, "paidAmount": { "description": "The amount that was paid already", "type": "number", "nullable": false, "example": 1234.56 }, "paidOnDate": { "description": "The date when the latest payment was made", "type": "string", "nullable": true, "example": "2020-01-12" }, "discountReceived": { "description": "The discount that was received from the supplier", "type": "number", "nullable": false, "example": 12.34 } } } } }, "purchaseOrder": { "description": "The purchase order associated with the liability", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } }, "project": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/liabilities/{id}": { "get": { "tags": [ "Liability" ], "operationId": "liability.view", "summary": "[ALPHA] View liability", "description": "Returns details of a single liability.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data" ], "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "documentNumber": { "x-description-missing": true, "type": "string", "nullable": true }, "date": { "x-description-missing": true, "type": "string", "format": "date" }, "createdAt": { "x-description-missing": true, "type": "string", "format": "date-time" }, "createdBy": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "name" ], "nullable": true, "properties": { "name": { "type": "string" } } }, "updatedAt": { "x-description-missing": true, "type": "string", "nullable": false, "format": "date-time", "example": "2020-01-01 13:00:00+02:00" }, "supplierInvoice": { "type": "string", "description": "The invoice number issued by the supplier" }, "receiptDate": { "description": "The date when the supplier invoice was received by the recipient", "type": "string", "format": "date-time", "nullable": true }, "deliveryDate": { "description": "The date on which the goods where shipped or the services where rendered", "type": "string", "format": "date", "nullable": true }, "status": { "type": "string", "enum": [ "PENDING", "PAID", "PARTIALLY_PAID", "CANCELLED" ], "description": "Status of liability" }, "supplier": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Supplier reference" }, "supplierInvoiceNumber": { "type": "string", "description": "The invoice number issued by the supplier" }, "financials": { "type": "object", "additionalProperties": false, "description": "financial information", "properties": { "amountGross": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "freightCharge": { "type": "number", "format": "float", "description": "Freigth costs" }, "taxation": { "x-description-missing": true, "type": "string" }, "taxes": { "type": "object", "additionalProperties": false, "properties": { "normalTax": { "type": "object", "additionalProperties": false, "nullable": true, "properties": { "rate": { "type": "number", "description": "percentual rate" }, "amount": { "type": "number", "format": "float", "description": "absolut amount" } } }, "reducedTax": { "type": "object", "additionalProperties": false, "nullable": true, "properties": { "rate": { "type": "number", "description": "percentual rate" }, "amount": { "type": "number", "format": "float", "description": "absolut amount" } } }, "customTax1": { "type": "object", "additionalProperties": false, "nullable": true, "properties": { "rate": { "type": "number", "description": "percentual rate" }, "amount": { "type": "number", "format": "float", "description": "absolut amount" } } }, "customTax2": { "type": "object", "additionalProperties": false, "nullable": true, "properties": { "rate": { "type": "number", "description": "percentual rate" }, "amount": { "type": "number", "format": "float", "description": "absolut amount" } } } } }, "paymentTerms": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "dueDate": { "type": "string", "format": "date", "nullable": true }, "earlyPaymentDate": { "type": "string", "format": "date", "nullable": true }, "earlyPaymentDiscount": { "type": "number", "format": "float" } } }, "bookingText": { "description": "header booking text", "type": "string" }, "payment": { "type": "object", "additionalProperties": false, "properties": { "methodName": { "x-description-missing": true, "type": "string" }, "paidAmount": { "type": "number", "format": "float" }, "paidOnDate": { "type": "string", "format": "date", "nullable": true }, "discountReceived": { "type": "number", "format": "float" } }, "description": "payment information" }, "glAccount": { "type": "string", "nullable": true, "description": "ledger account" }, "costCenter": { "type": "string", "nullable": true, "description": "cost center" } } }, "purchaseOrder": { "type": "object", "additionalProperties": false, "nullable": true, "description": "global connected purchase order", "properties": { "id": { "type": "string", "description": "related purchase order" } } }, "assignedPurchaseOrders": { "x-description-missing": true, "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "number": { "type": "string" }, "amountGross": { "type": "number", "format": "float" }, "amountNet": { "type": "number", "format": "float" }, "project": { "type": "object", "additionalProperties": false, "description": "related project ID", "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } }, "salesOrder": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } }, "costCenter": { "type": "string" } } } }, "project": { "type": "object", "additionalProperties": false, "description": "related project ID", "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } }, "accounting": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "glAccount": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "bookingText": { "type": "string", "description": "1st accounting entry text" }, "amount": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "tax": { "type": "object", "description": "percentual tax rate", "additionalProperties": false, "properties": { "rate": { "type": "number", "format": "float" } } }, "costCenter": { "type": "string" } } } }, "positions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "sort": { "description": "The position of the position in the list", "type": "number" }, "number": { "type": "string" }, "purchaseOrder": { "type": "object", "additionalProperties": false, "nullable": true, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } }, "product": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "supplierProductNumber": { "type": "string" } } }, "deliveryDate": { "description": "The date the position was delivered", "type": "string", "format": "date", "nullable": true }, "quantity": { "description": "The quantity of the position", "type": "number" }, "unit": { "type": "string" }, "packagingUnit": { "type": "string" }, "price": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "costCenter": { "type": "string" }, "tax": { "type": "object", "additionalProperties": false, "properties": { "vatCategory": { "description": "The category of the value added tax", "type": "string" }, "rate": { "description": "Tax rate in percent", "type": "number", "format": "float", "nullable": true }, "taxText": { "type": "string", "nullable": true } } } } } } } } } } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/paymentMethods": { "get": { "tags": [ "Payment Methods" ], "operationId": "paymentMethod.list", "summary": "[EARLY ACCESS] Payment method list", "description": "Lists all payment methods.", "parameters": [ { "name": "filter", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "key", "op", "value" ], "properties": { "key": { "type": "string", "enum": [ "search", "id", "type", "project" ] }, "op": { "type": "string", "enum": [ "equals", "notEquals", "in", "notIn", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan" ] }, "value": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] } } } } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "type", "project" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "type": { "x-description-missing": true, "type": "string", "nullable": false }, "designation": { "x-description-missing": true, "type": "string", "nullable": false }, "project": { "x-description-missing": true, "type": "object", "nullable": true, "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/paymentTermsGroups": { "get": { "tags": [ "Payment Terms Group" ], "operationId": "paymentTermsGroup.list", "summary": "[EARLY ACCESS] Get a list of paymentTermsGroups", "description": "This endpoint is only available as early access version and will introduce breaking changes without further notice or versioning.\n\nPaymentTermsGroups can be used to group customers with identical payment terms such as different discounts, payment targets, and free postage options. For more details about the group feature have a look at our handbook article.", "parameters": [ { "name": "filter", "in": "query", "style": "deepObject", "schema": { "oneOf": [ { "type": "array", "title": "Pass the array of filters.", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "description": "Pass the array as filter[0][key], filter[0][op], filter[0][value]", "enum": [ "id", "name", "key", "isActive", "projectId", "categoryId" ] }, "op": { "type": "string", "enum": [ "equals", "notEquals", "in", "notIn", "exactlyIn", "allIn", "allNotIn", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan", "is" ] }, "value": { "oneOf": [ { "type": "string", "description": "Used for the operations 'equals', 'notEquals', 'contains', 'notContains', 'startsWith', 'endsWith' and 'is'.", "title": "String" }, { "type": "array", "title": "Array", "items": { "type": "string", "description": "Used for the operations 'in', 'notIn', 'exactlyIn', 'allIn' and 'allNotIn'." } } ] } } } } ] } }, { "name": "order", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "name", "key" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "key": { "x-description-missing": true, "type": "string", "example": "payment_terms_group_1" }, "name": { "x-description-missing": true, "type": "string", "example": "Sample payment terms group" }, "isActive": { "x-description-missing": true, "type": "boolean" }, "comment": { "x-description-missing": true, "type": "string", "nullable": true, "example": "This is a payment terms group." }, "paymentTerms": { "x-description-missing": true, "nullable": true, "type": "object", "additionalProperties": false, "properties": { "basicDiscount": { "type": "number", "example": 5, "nullable": true }, "paymentTargetDays": { "type": "integer", "example": 30, "nullable": true }, "earlyPaymentDiscount": { "nullable": true, "type": "object", "additionalProperties": false, "properties": { "value": { "type": "number", "example": 2 }, "paymentTargetDays": { "type": "integer", "example": 7 } } }, "postageFreeFrom": { "nullable": true, "type": "number", "example": 99.99, "description": "null = no free shipping; 0 = free shipping for all orders; > 0 = free shipping for orders with a value of at least this value" } } }, "project": { "x-description-missing": true, "nullable": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } }, "category": { "x-description-missing": true, "nullable": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } }, "example": { "id": "123", "key": "DISCOUNT-10", "name": "Customer Discount 10%", "isActive": true, "comment": "Customers in this group get 10% discount on all orders. And free shipping if the order value is at least 100.00 EUR.", "paymentTerms": { "basicDiscount": 10, "paymentTargetDays": 30, "earlyPaymentDiscount": { "value": 2, "paymentTargetDays": 15 }, "postageFreeFrom": 100 }, "project": { "id": "1" }, "category": { "id": "789" } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } }, "example": { "data": [ { "id": "1", "key": "DISCOUNT", "name": "10.5% discount for customers", "isActive": true, "comment": "All customer in this group get a 10.5% discount on their orders.", "paymentTerms": { "basicDiscount": 10.5, "paymentTargetDays": 30, "earlyPaymentDiscount": null, "postageFreeFrom": null }, "project": { "id": "1" }, "category": { "id": "1" } }, { "id": "2", "key": "FREE-SHIPPING", "name": "free shipping on all orders", "isActive": true, "comment": null, "paymentTerms": { "basicDiscount": null, "paymentTargetDays": null, "earlyPaymentDiscount": null, "postageFreeFrom": 0 }, "project": null, "category": null }, { "id": "3", "key": "EARLY_PAYMENT", "name": "early payment discount", "isActive": false, "comment": "Customers in this group tend to delay payments -> we offer higher early payment discount.", "paymentTerms": { "basicDiscount": null, "paymentTargetDays": null, "earlyPaymentDiscount": { "value": 5.5, "paymentTargetDays": 14 }, "postageFreeFrom": null }, "project": null, "category": null } ], "extra": { "totalCount": 3, "page": { "number": 1, "size": 10 } } } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "post": { "tags": [ "Payment Terms Group" ], "operationId": "paymentTermsGroup.create", "summary": "[EARLY ACCESS] Create a new paymentTermsGroup", "description": "This endpoint is only available as early access version and will introduce breaking changes without further notice or versioning.\n\nPaymentTermsGroups can be used to group customers with identical payment terms such as different discounts, payment targets, and free postage options. For more details about the group feature have a look at our handbook article.", "parameters": [], "requestBody": { "description": "Request to create a new paymentTermsGroup.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "key", "name" ], "properties": { "key": { "type": "string", "pattern": "^[a-zA-Z0-9_-]{3,255}$", "minLength": 3, "maxLength": 255, "example": "DISCOUNT_10-5" }, "name": { "type": "string", "minLength": 3, "maxLength": 512, "example": "Customer Discount 10.5%" }, "comment": { "nullable": true, "type": "string", "maxLength": 64000, "example": "Customers in this group get 10.5% discount on all orders. And free shipping if the order value is at least 99.99 EUR." }, "isActive": { "type": "boolean", "default": true }, "paymentTerms": { "nullable": true, "type": "object", "additionalProperties": false, "minProperties": 1, "properties": { "basicDiscount": { "nullable": true, "type": "number", "example": 5.5 }, "paymentTargetDays": { "nullable": true, "type": "integer", "example": 30, "description": "default: 14 days", "default": 14 }, "earlyPaymentDiscount": { "nullable": true, "type": "object", "additionalProperties": false, "properties": { "value": { "type": "number", "example": 2.1 }, "paymentTargetDays": { "type": "integer", "example": 7 } } }, "postageFreeFrom": { "nullable": true, "type": "number", "example": 99.99, "default": null, "description": "null = no free shipping; 0 = free shipping for all orders; > 0 = free shipping for orders with a value of at least this value" } } }, "project": { "x-description-missing": true, "nullable": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } }, "category": { "x-description-missing": true, "nullable": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } } }, "examples": { "create payment terms": { "value": { "key": "DISCOUNT-10", "name": "Customer Discount 10%", "isActive": true, "comment": "Customers in this group get 10% discount on all orders. And free shipping if the order value is at least 99.99 EUR.", "paymentTerms": { "basicDiscount": 10, "paymentTargetDays": 30, "earlyPaymentDiscount": { "value": 2, "paymentTargetDays": 15 }, "postageFreeFrom": 99.99 }, "project": { "id": "1" }, "category": { "id": "789" } } } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/paymentTermsGroups/{id}": { "get": { "tags": [ "Payment Terms Group" ], "operationId": "paymentTermsGroup.view", "summary": "[EARLY ACCESS] Get a single paymentTermsGroup", "description": "This endpoint is only available as early access version and will introduce breaking changes without further notice or versioning.\n\nPaymentTermsGroups can be used to group customers with identical payment terms such as different discounts, payment targets, and free postage options. For more details about the group feature have a look at our handbook article.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "key": { "x-description-missing": true, "type": "string", "example": "payment_terms_group_1" }, "name": { "x-description-missing": true, "type": "string", "example": "Sample payment terms group" }, "isActive": { "x-description-missing": true, "type": "boolean" }, "comment": { "x-description-missing": true, "type": "string", "nullable": true, "example": "This is a payment terms group." }, "paymentTerms": { "x-description-missing": true, "nullable": true, "type": "object", "additionalProperties": false, "properties": { "basicDiscount": { "type": "number", "example": 5, "nullable": true }, "paymentTargetDays": { "type": "integer", "example": 30, "nullable": true }, "earlyPaymentDiscount": { "nullable": true, "type": "object", "additionalProperties": false, "properties": { "value": { "type": "number", "example": 2 }, "paymentTargetDays": { "type": "integer", "example": 7 } } }, "postageFreeFrom": { "nullable": true, "type": "number", "example": 99.99, "description": "null = no free shipping; 0 = free shipping for all orders; > 0 = free shipping for orders with a value of at least this value" } } }, "project": { "x-description-missing": true, "nullable": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } }, "category": { "x-description-missing": true, "nullable": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } }, "example": { "id": "123", "key": "DISCOUNT-10", "name": "Customer Discount 10%", "isActive": true, "comment": "Customers in this group get 10% discount on all orders. And free shipping if the order value is at least 100.00 EUR.", "paymentTerms": { "basicDiscount": 10, "paymentTargetDays": 30, "earlyPaymentDiscount": { "value": 2, "paymentTargetDays": 15 }, "postageFreeFrom": 100 }, "project": { "id": "1" }, "category": { "id": "789" } } } } } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/cashiers": { "get": { "tags": [ "Point Of Sale" ], "operationId": "cashier.list", "summary": "[EARLY ACCESS] Cashier list", "description": "Lists all active cashiers.", "parameters": [ { "name": "project_id", "in": "query", "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "x-description-missing": true, "type": "string", "nullable": true }, "number": { "x-description-missing": true, "type": "string", "nullable": true }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "permissionLevel": { "x-description-missing": true, "type": "string", "nullable": true } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/cashiers/{id}/pinCheck": { "post": { "tags": [ "Point Of Sale" ], "operationId": "cashier.pinCheck", "summary": "[EARLY ACCESS] Cashier PIN check", "description": "Checks a pin for cashier.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "Verify PIN", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "pin", "project" ], "properties": { "pin": { "type": "string", "nullable": false, "pattern": "\\d{4}" }, "project": { "type": "string", "nullable": false, "pattern": "\\d" } } }, "examples": { "Verify PIN": { "value": { "pin": "1234", "project": "5" } } } } } }, "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data" ], "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "x-description-missing": true, "type": "string", "nullable": false }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "permissionLevel": { "x-description-missing": true, "type": "string", "pattern": "\\d", "nullable": false } } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/cashRegisters/{id}/balance": { "get": { "tags": [ "Point Of Sale" ], "operationId": "cashRegister.balance", "summary": "[EARLY ACCESS] Cash Register balance", "description": "Retrieves the balance of a cash register.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data" ], "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "openingBalance": { "x-description-missing": true, "type": "string", "nullable": false }, "targetAmount": { "x-description-missing": true, "type": "string", "nullable": false } } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/posJournals": { "get": { "tags": [ "Point Of Sale" ], "operationId": "journal.list", "summary": "[EARLY ACCESS] Journals list", "description": "Lists all active journals.", "parameters": [ { "name": "filter", "in": "query", "style": "deepObject", "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "array", "items": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } }, { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "id", "date", "customerId", "projectId", "salesOrderId", "externalOrderNumber" ] }, "op": { "type": "string", "enum": [ "equals", "notEquals", "in", "notIn", "allIn", "allNotIn", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan" ] }, "value": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] } } } } ] } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "date", "customerId", "projectId" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "date": { "x-description-missing": true, "type": "string", "format": "date-time", "nullable": true }, "projectId": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "type": { "x-description-missing": true, "type": "string" }, "posFunction": { "x-description-missing": true, "type": "string" }, "doctype": { "x-description-missing": true, "type": "string" }, "paymentType": { "x-description-missing": true, "type": "string" }, "doctypeId": { "x-description-missing": true, "type": "number" }, "documentNumber": { "x-description-missing": true, "type": "string" }, "journalText": { "x-description-missing": true, "type": "string" }, "revenueAccount": { "x-description-missing": true, "type": "string" }, "currency": { "x-description-missing": true, "type": "string" }, "tax": { "x-description-missing": true, "type": "number", "format": "float" }, "amountGross": { "x-description-missing": true, "type": "number", "format": "float" }, "amountNet": { "x-description-missing": true, "type": "number", "format": "float" }, "cashRegisterId": { "x-description-missing": true, "type": "number" }, "customerId": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "createdAt": { "x-description-missing": true, "type": "string", "format": "date-time" }, "createdBy": { "x-description-missing": true, "type": "string" }, "businessTransactionType": { "x-description-missing": true, "type": "string", "nullable": true }, "qrString": { "x-description-missing": true, "type": "string", "nullable": true }, "fiscalDocumentReference": { "description": "This field represents an object with dynamic structure", "type": "object", "additionalProperties": true, "nullable": true }, "salesOrder": { "x-description-missing": true, "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id", "number" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "number": { "type": "string" }, "externalOrderNumber": { "type": "string" } } } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/posJournals/actions/add": { "post": { "tags": [ "Point Of Sale" ], "operationId": "journal.add", "summary": "[EARLY ACCESS] Add journal entry", "description": "[EARLY ACCESS] Add a new journal entry.", "parameters": [], "requestBody": { "description": "[EARLY ACCESS] Add journal entry", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "project", "cashier", "transaction", "entry", "payment" ], "properties": { "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "cashier": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "transaction": { "type": "object", "additionalProperties": false, "required": [ "type", "text" ], "properties": { "type": { "type": "string", "nullable": false }, "text": { "type": "string", "nullable": false } } }, "entry": { "oneOf": [ { "type": "object", "additionalProperties": false, "nullable": false, "required": [ "type", "timestamp", "document" ], "properties": { "type": { "type": "string", "enum": [ "invoice", "credit_note" ], "nullable": false }, "timestamp": { "description": "a atom formatted date time", "type": "string", "format": "date-time", "example": "2023-08-13T14:45:36+02:00" }, "document": { "type": "object", "description": "When `entry.type` is `creditNote`, credit note ID will be provided. When `type` is `invoice`the invoice ID will be provided", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } }, "qrString": { "type": "string", "description": "When `entry.type` is `invoice` or `credit_note` a string representing the QR code will be provided", "additionalProperties": false } } }, { "type": "object", "additionalProperties": false, "nullable": false, "required": [ "type", "timestamp", "amount" ], "properties": { "type": { "type": "string", "enum": [ "cash_in", "cash_out", "cash_difference" ], "nullable": false }, "timestamp": { "type": "string", "format": "date-time", "nullable": false }, "amount": { "type": "object", "description": "Mandatory field when `entry.type` has one of the values: `cash_in`, `cash_out`, `cash_difference`.", "additionalProperties": false, "required": [ "amount", "currency" ], "properties": { "amount": { "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217." } } } } } ] }, "payment": { "type": "object", "additionalProperties": false, "nullable": false, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "cash", "ec", "credit", "ec_card" ], "nullable": false } } }, "fiscalDocumentReference": { "description": "This field represents an object with dynamic structure", "type": "object", "additionalProperties": true, "nullable": true } } }, "examples": { "Add journal entry": { "value": { "project": { "id": "2" }, "cashier": { "id": "4" }, "transaction": { "type": "invoice", "text": "Invoice 123" }, "entry": { "type": "invoice", "timestamp": "2023-10-01T00:00:00Z", "document": { "id": "1" } }, "payment": { "type": "cash" }, "fiscalDocumentReference": null } } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/posCashCount/actions/add": { "post": { "tags": [ "Point Of Sale" ], "operationId": "cashCount.add", "summary": "[EARLY ACCESS] Add cash count entry", "description": "[EARLY ACCESS] Add a new cash count entry.", "parameters": [], "requestBody": { "description": "Add cash count body", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "project", "cashier", "comment", "difference", "cashQuantity" ], "properties": { "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "cashier": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "comment": { "type": "string", "nullable": false }, "difference": { "type": "number", "format": "float", "nullable": false }, "cashQuantity": { "type": "object", "additionalProperties": false, "nullable": true, "required": [ "eur500", "eur200", "eur100", "eur50", "eur20", "eur10", "eur5", "eur2", "eur1", "eur05", "eur02", "eur01", "eur005", "eur002", "eur001" ], "properties": { "eur500": { "type": "integer", "format": "int64", "nullable": false }, "eur200": { "type": "integer", "format": "int64", "nullable": false }, "eur100": { "type": "integer", "format": "int64", "nullable": false }, "eur50": { "type": "integer", "format": "int64", "nullable": false }, "eur20": { "type": "integer", "format": "int64", "nullable": false }, "eur10": { "type": "integer", "format": "int64", "nullable": false }, "eur5": { "type": "integer", "format": "int64", "nullable": false }, "eur2": { "type": "integer", "format": "int64", "nullable": false }, "eur1": { "type": "integer", "format": "int64", "nullable": false }, "eur05": { "type": "integer", "format": "int64", "nullable": false }, "eur02": { "type": "integer", "format": "int64", "nullable": false }, "eur01": { "type": "integer", "format": "int64", "nullable": false }, "eur005": { "type": "integer", "format": "int64", "nullable": false }, "eur002": { "type": "integer", "format": "int64", "nullable": false }, "eur001": { "type": "integer", "format": "int64", "nullable": false } } } } }, "examples": { "Add cash count": { "value": { "project": { "id": "2" }, "cashier": { "id": "4" }, "comment": "Cash count comment", "difference": 0, "cashQuantity": { "eur500": 0, "eur200": 0, "eur100": 2, "eur50": 3, "eur20": 8, "eur10": 12, "eur5": 8, "eur2": 19, "eur1": 28, "eur05": 20, "eur02": 10, "eur01": 7, "eur005": 29, "eur002": 29, "eur001": 20 } } } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/products": { "post": { "tags": [ "Product" ], "operationId": "product.create", "summary": "Create new product", "description": "Creates a new product.", "parameters": [], "requestBody": { "description": "Product create request payload", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Name of the product." }, "number": { "type": "string", "description": "Number / SKU of the product." }, "description": { "type": "string", "description": "Description of the product." }, "shortDescription": { "type": "string", "description": "Short description of the product." }, "customsTariffNumber": { "type": "string", "description": "Customs tariff number of the product." }, "ean": { "type": "string", "description": "EAN of the product." }, "internalComment": { "type": "string", "description": "Text only for internal information." }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "tags": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+" }, "key": { "x-description-missing": true, "type": "string" }, "name": { "x-description-missing": true, "type": "string" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "minimumOrderQuantity": { "type": "integer", "description": "Numerical minimum order quantity of the product." }, "minimumStorageQuantity": { "type": "integer", "description": "Numerical minimum storage quantity of the product." }, "allowPurchaseFromAllSuppliers": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hidePriceOnDocuments": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "manufacturer": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Name of the manufacturer." }, "number": { "type": "string", "description": "Product number at the manufacturer." }, "link": { "type": "string", "description": "URI of the manufacturer." } } }, "measurements": { "type": "object", "additionalProperties": false, "properties": { "width": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "height": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "length": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "weight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } }, "netWeight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } } } }, "hasBatches": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "serialNumbersMode": { "type": "string", "enum": [ "disabled", "user", "product", "productAndWarehouse" ], "description": "4 different modes available if the product has serial numbers or not and how they are handled. For more information about the different modes have a look into our handbook." }, "hasBestBeforeDate": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hasBillOfMaterials": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isAssembledJustInTime": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isProductionProduct": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isExternallyProduced": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isDisabled": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "disabledReason": { "type": "string", "nullable": true, "description": "Shows the reason why the product is locked when clicking into the product." }, "ageRating": { "type": "string", "enum": [ "", "16", "18" ], "description": "Sets an age rating for the product. Currently only used for the shipping service provider DHL." }, "countryOfOrigin": { "type": "string", "pattern": "[A-Z]{2}", "nullable": true, "description": "Two-digit ISO country code for country of origin of the product." }, "regionOfOrigin": { "type": "string", "enum": [ "", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "99" ], "description": "01 - Schleswig-Holstein, 02 - Hamburg, 03 - Niedersachsen, 04 - Bremen, 05 - Nordhrein-Westfalen, 06 - Hessen, 07 - Rheinland-Pfalz, 08 - Baden-Württemberg, 09 - Bayern, 10 - Saarland, 11 - Berlin, 12 - Brandenburg, 13 - Mecklenburg-Vorpommern, 14 - Sachsen, 15 - Sachsen-Anhalt, 16 - Thüringen, 99 - foreign origin" }, "salesTax": { "type": "string", "enum": [ "standard", "reduced", "free" ], "description": "Selection of three possible values for the sales tax of the product." }, "isStockItem": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isStockTakingDisabled": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hideJustInTimeItemsOnDocuments": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "shopPriceDisplay": { "type": "string", "format": "float", "nullable": true, "description": "Only used by some online shops. For more information have a look into our handbook." }, "category": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "standardSupplier": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "nullable": true, "x-example-ignore": true, "description": "Nullable resource identifier" } }, "description": "Reference to a standard supplier for this product", "nullable": true }, "isShippingCostsProduct": { "type": "boolean", "description": "Determines if a product is used as a shipping costs product. For more information have a look into our handbook." }, "isMatrixProduct": { "type": "boolean", "description": "Determines if a product is a matrix product. For more information have a look into our handbook." }, "discount": { "type": "object", "additionalProperties": false, "properties": { "isDiscountProduct": { "type": "boolean", "description": "Determines if a product is used as a discount. For more information have a look into our handbook." }, "discountPercentage": { "type": "number", "format": "float", "description": "Sets the discount value if the product is a discount. For more information have a look into our handbook." } } }, "freeFields": { "type": "array", "nullable": true, "items": { "type": "object", "additionalProperties": false, "required": [ "id", "value" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "value": { "x-description-missing": true, "type": "string" } } } }, "variantOf": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a parent product", "nullable": true }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "values": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "sort": { "type": "integer" } } } } } } }, "variants": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "options" ], "properties": { "name": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "name", "option" ], "properties": { "name": { "type": "string" }, "option": { "type": "object", "additionalProperties": false, "required": [ "name" ], "properties": { "name": { "type": "string" } } } } } } } }, "example": [ { "name": "OptionalName(overrides autogenerated)", "options": [ { "name": "Cotton", "option": { "name": "Material" } }, { "name": "M", "option": { "name": "Size" } }, { "name": "NoLogo", "option": { "name": "Logo" } } ] } ] } } }, "examples": { "Create Product": { "value": { "name": "Test Product Beverage", "number": "123456", "description": "This is a very long description for the Test Product Beverage.", "shortDescription": "This is a short description.", "project": { "id": "7" }, "category": { "id": "1001" }, "customsTariffNumber": "12345678", "ean": "1234567890", "internalComment": "Attention: Only available for customers over the age of 18.", "minimumOrderQuantity": 100, "minimumStorageQuantity": 30, "allowPurchaseFromAllSuppliers": false, "hidePriceOnDocuments": false, "hasBatches": true, "serialNumbersMode": "disabled", "hasBestBeforeDate": true, "hasBillOfMaterials": false, "isAssembledJustInTime": false, "isProductionProduct": false, "isExternallyProduced": false, "isDisabled": false, "countryOfOrigin": "DE", "regionOfOrigin": "01", "salesTax": "standard", "isStockItem": true, "manufacturer": { "name": "Beverage Manufacturer", "number": "BM#1", "link": "https://example.com" }, "ageRating": "18", "freeFields": [ { "id": "8", "value": "FF8" }, { "id": "16", "value": "FF16" }, { "id": "32", "value": "FF32" } ], "variantOf": { "id": "1336" } } } } }, "application/vnd.xentral.upsert.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Name of the product." }, "number": { "type": "string", "description": "Number / SKU of the product." }, "description": { "type": "string", "description": "Description of the product." }, "shortDescription": { "type": "string", "description": "Short description of the product." }, "customsTariffNumber": { "type": "string", "description": "Customs tariff number of the product." }, "ean": { "type": "string", "description": "EAN of the product." }, "internalComment": { "type": "string", "description": "Text only for internal information." }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "tags": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+" }, "key": { "x-description-missing": true, "type": "string" }, "name": { "x-description-missing": true, "type": "string" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "minimumOrderQuantity": { "type": "integer", "description": "Numerical minimum order quantity of the product." }, "minimumStorageQuantity": { "type": "integer", "description": "Numerical minimum storage quantity of the product." }, "allowPurchaseFromAllSuppliers": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hidePriceOnDocuments": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "manufacturer": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Name of the manufacturer." }, "number": { "type": "string", "description": "Product number at the manufacturer." }, "link": { "type": "string", "description": "URI of the manufacturer." } } }, "measurements": { "type": "object", "additionalProperties": false, "properties": { "width": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "height": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "length": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "weight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } }, "netWeight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } } } }, "hasBatches": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "serialNumbersMode": { "type": "string", "enum": [ "disabled", "user", "product", "productAndWarehouse" ], "description": "4 different modes available if the product has serial numbers or not and how they are handled. For more information about the different modes have a look into our handbook." }, "hasBestBeforeDate": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hasBillOfMaterials": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isAssembledJustInTime": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isProductionProduct": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isExternallyProduced": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isDisabled": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "disabledReason": { "type": "string", "nullable": true, "description": "Shows the reason why the product is locked when clicking into the product." }, "ageRating": { "type": "string", "enum": [ "", "16", "18" ], "description": "Sets an age rating for the product. Currently only used for the shipping service provider DHL." }, "countryOfOrigin": { "type": "string", "pattern": "[A-Z]{2}", "nullable": true, "description": "Two-digit ISO country code for country of origin of the product." }, "regionOfOrigin": { "type": "string", "enum": [ "", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "99" ], "description": "01 - Schleswig-Holstein, 02 - Hamburg, 03 - Niedersachsen, 04 - Bremen, 05 - Nordhrein-Westfalen, 06 - Hessen, 07 - Rheinland-Pfalz, 08 - Baden-Württemberg, 09 - Bayern, 10 - Saarland, 11 - Berlin, 12 - Brandenburg, 13 - Mecklenburg-Vorpommern, 14 - Sachsen, 15 - Sachsen-Anhalt, 16 - Thüringen, 99 - foreign origin" }, "salesTax": { "type": "string", "enum": [ "standard", "reduced", "free" ], "description": "Selection of three possible values for the sales tax of the product." }, "isStockItem": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isStockTakingDisabled": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hideJustInTimeItemsOnDocuments": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "shopPriceDisplay": { "type": "string", "format": "float", "nullable": true, "description": "Only used by some online shops. For more information have a look into our handbook." }, "category": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "standardSupplier": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "nullable": true, "x-example-ignore": true, "description": "Nullable resource identifier" } }, "description": "Reference to a standard supplier for this product", "nullable": true }, "isShippingCostsProduct": { "type": "boolean", "description": "Determines if a product is used as a shipping costs product. For more information have a look into our handbook." }, "isMatrixProduct": { "type": "boolean", "description": "Determines if a product is a matrix product. For more information have a look into our handbook." }, "discount": { "type": "object", "additionalProperties": false, "properties": { "isDiscountProduct": { "type": "boolean", "description": "Determines if a product is used as a discount. For more information have a look into our handbook." }, "discountPercentage": { "type": "number", "format": "float", "description": "Sets the discount value if the product is a discount. For more information have a look into our handbook." } } }, "freeFields": { "type": "array", "nullable": true, "items": { "type": "object", "additionalProperties": false, "required": [ "id", "value" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "value": { "x-description-missing": true, "type": "string" } } } }, "variantOf": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a parent product", "nullable": true }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "values": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "sort": { "type": "integer" } } } } } } }, "variants": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "options" ], "properties": { "name": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "name", "option" ], "properties": { "name": { "type": "string" }, "option": { "type": "object", "additionalProperties": false, "required": [ "name" ], "properties": { "name": { "type": "string" } } } } } } } }, "example": [ { "name": "OptionalName(overrides autogenerated)", "options": [ { "name": "Cotton", "option": { "name": "Material" } }, { "name": "M", "option": { "name": "Size" } }, { "name": "NoLogo", "option": { "name": "Logo" } } ] } ] } } }, "examples": { "Create Product": { "value": { "name": "Test Product", "number": "123456", "project": { "id": "7" } } } } }, "application/vnd.xentral.default.v2-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Name of the product." }, "number": { "type": "string", "description": "Number / SKU of the product." }, "description": { "type": "string", "description": "Description of the product." }, "shortDescription": { "type": "string", "description": "Short description of the product." }, "customsTariffNumber": { "type": "string", "description": "Customs tariff number of the product." }, "ean": { "type": "string", "description": "EAN of the product." }, "internalComment": { "type": "string", "description": "Text only for internal information." }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "tags": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+" }, "key": { "x-description-missing": true, "type": "string" }, "name": { "x-description-missing": true, "type": "string" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "minimumOrderQuantity": { "type": "integer", "description": "Numerical minimum order quantity of the product." }, "minimumStorageQuantity": { "type": "integer", "description": "Numerical minimum storage quantity of the product." }, "allowPurchaseFromAllSuppliers": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hidePriceOnDocuments": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "manufacturer": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Name of the manufacturer." }, "number": { "type": "string", "description": "Product number at the manufacturer." }, "link": { "type": "string", "description": "URI of the manufacturer." } } }, "measurements": { "type": "object", "additionalProperties": false, "properties": { "width": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "height": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "length": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "weight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } }, "netWeight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } } } }, "hasBatches": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "serialNumbersMode": { "type": "string", "enum": [ "disabled", "user", "product", "productAndWarehouse" ], "description": "4 different modes available if the product has serial numbers or not and how they are handled. For more information about the different modes have a look into our handbook." }, "hasBestBeforeDate": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hasBillOfMaterials": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isAssembledJustInTime": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isProductionProduct": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isExternallyProduced": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isDisabled": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "disabledReason": { "type": "string", "nullable": true, "description": "Shows the reason why the product is locked when clicking into the product." }, "ageRating": { "type": "string", "enum": [ "", "16", "18" ], "description": "Sets an age rating for the product. Currently only used for the shipping service provider DHL." }, "countryOfOrigin": { "type": "string", "pattern": "[A-Z]{2}", "nullable": true, "description": "Two-digit ISO country code for country of origin of the product." }, "regionOfOrigin": { "type": "string", "enum": [ "", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "99" ], "description": "01 - Schleswig-Holstein, 02 - Hamburg, 03 - Niedersachsen, 04 - Bremen, 05 - Nordhrein-Westfalen, 06 - Hessen, 07 - Rheinland-Pfalz, 08 - Baden-Württemberg, 09 - Bayern, 10 - Saarland, 11 - Berlin, 12 - Brandenburg, 13 - Mecklenburg-Vorpommern, 14 - Sachsen, 15 - Sachsen-Anhalt, 16 - Thüringen, 99 - foreign origin" }, "salesTax": { "type": "string", "enum": [ "standard", "reduced", "free" ], "description": "Selection of three possible values for the sales tax of the product." }, "isStockItem": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isStockTakingDisabled": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hideJustInTimeItemsOnDocuments": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "shopPriceDisplay": { "type": "string", "format": "float", "nullable": true, "description": "Only used by some online shops. For more information have a look into our handbook." }, "merchandiseGroup": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "standardSupplier": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "nullable": true, "x-example-ignore": true, "description": "Nullable resource identifier" } }, "description": "Reference to a standard supplier for this product", "nullable": true }, "isShippingCostsProduct": { "type": "boolean", "description": "Determines if a product is used as a shipping costs product. For more information have a look into our handbook." }, "isVisibleInOnlineShops": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isMatrixProduct": { "type": "boolean", "description": "Determines if a product is a matrix product. For more information have a look into our handbook." }, "discount": { "type": "object", "additionalProperties": false, "properties": { "isDiscountProduct": { "type": "boolean", "description": "Determines if a product is used as a discount. For more information have a look into our handbook." }, "discountPercentage": { "type": "number", "format": "float", "description": "Sets the discount value if the product is a discount. For more information have a look into our handbook." } } }, "freeFields": { "type": "array", "nullable": true, "items": { "type": "object", "additionalProperties": false, "required": [ "id", "value" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "value": { "x-description-missing": true, "type": "string" } } } }, "variantOf": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a parent product", "nullable": true }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "values": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "sort": { "type": "integer" } } } } } } }, "variants": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "options" ], "properties": { "name": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "name", "option" ], "properties": { "name": { "type": "string" }, "option": { "type": "object", "additionalProperties": false, "required": [ "name" ], "properties": { "name": { "type": "string" } } } } } } } }, "example": [ { "name": "OptionalName(overrides autogenerated)", "options": [ { "name": "Cotton", "option": { "name": "Material" } }, { "name": "M", "option": { "name": "Size" } }, { "name": "NoLogo", "option": { "name": "Logo" } } ] } ] }, "categories": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } }, "example": [ { "id": "1" }, { "id": "2" } ] } } }, "examples": { "Create Product": { "value": { "name": "Test Product Beverage", "number": "123456", "description": "This is a very long description for the Test Product Beverage.", "shortDescription": "This is a short description.", "project": { "id": "7" }, "merchandiseGroup": { "id": "1001" }, "categories": [ { "id": "10" }, { "id": "11" } ], "customsTariffNumber": "12345678", "ean": "1234567890", "internalComment": "Attention: Only available for customers over the age of 18.", "minimumOrderQuantity": 100, "minimumStorageQuantity": 30, "allowPurchaseFromAllSuppliers": false, "hidePriceOnDocuments": false, "hasBatches": true, "serialNumbersMode": "disabled", "hasBestBeforeDate": true, "hasBillOfMaterials": false, "isAssembledJustInTime": false, "isProductionProduct": false, "isExternallyProduced": false, "isDisabled": false, "countryOfOrigin": "DE", "regionOfOrigin": "01", "salesTax": "standard", "isStockItem": true, "manufacturer": { "name": "Beverage Manufacturer", "number": "BM#1", "link": "https://example.com" }, "ageRating": "18", "freeFields": [ { "id": "8", "value": "FF8" }, { "id": "16", "value": "FF16" }, { "id": "32", "value": "FF32" } ], "variantOf": { "id": "1336" } } } } }, "application/vnd.xentral.upsert.v2-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Name of the product." }, "number": { "type": "string", "description": "Number / SKU of the product." }, "description": { "type": "string", "description": "Description of the product." }, "shortDescription": { "type": "string", "description": "Short description of the product." }, "customsTariffNumber": { "type": "string", "description": "Customs tariff number of the product." }, "ean": { "type": "string", "description": "EAN of the product." }, "internalComment": { "type": "string", "description": "Text only for internal information." }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "tags": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+" }, "key": { "x-description-missing": true, "type": "string" }, "name": { "x-description-missing": true, "type": "string" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "minimumOrderQuantity": { "type": "integer", "description": "Numerical minimum order quantity of the product." }, "minimumStorageQuantity": { "type": "integer", "description": "Numerical minimum storage quantity of the product." }, "allowPurchaseFromAllSuppliers": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hidePriceOnDocuments": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "manufacturer": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Name of the manufacturer." }, "number": { "type": "string", "description": "Product number at the manufacturer." }, "link": { "type": "string", "description": "URI of the manufacturer." } } }, "measurements": { "type": "object", "additionalProperties": false, "properties": { "width": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "height": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "length": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "weight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } }, "netWeight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } } } }, "hasBatches": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "serialNumbersMode": { "type": "string", "enum": [ "disabled", "user", "product", "productAndWarehouse" ], "description": "4 different modes available if the product has serial numbers or not and how they are handled. For more information about the different modes have a look into our handbook." }, "hasBestBeforeDate": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hasBillOfMaterials": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isAssembledJustInTime": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isProductionProduct": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isExternallyProduced": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isDisabled": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "disabledReason": { "type": "string", "nullable": true, "description": "Shows the reason why the product is locked when clicking into the product." }, "ageRating": { "type": "string", "enum": [ "", "16", "18" ], "description": "Sets an age rating for the product. Currently only used for the shipping service provider DHL." }, "countryOfOrigin": { "type": "string", "pattern": "[A-Z]{2}", "nullable": true, "description": "Two-digit ISO country code for country of origin of the product." }, "regionOfOrigin": { "type": "string", "enum": [ "", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "99" ], "description": "01 - Schleswig-Holstein, 02 - Hamburg, 03 - Niedersachsen, 04 - Bremen, 05 - Nordhrein-Westfalen, 06 - Hessen, 07 - Rheinland-Pfalz, 08 - Baden-Württemberg, 09 - Bayern, 10 - Saarland, 11 - Berlin, 12 - Brandenburg, 13 - Mecklenburg-Vorpommern, 14 - Sachsen, 15 - Sachsen-Anhalt, 16 - Thüringen, 99 - foreign origin" }, "salesTax": { "type": "string", "enum": [ "standard", "reduced", "free" ], "description": "Selection of three possible values for the sales tax of the product." }, "isStockItem": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isStockTakingDisabled": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hideJustInTimeItemsOnDocuments": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "shopPriceDisplay": { "type": "string", "format": "float", "nullable": true, "description": "Only used by some online shops. For more information have a look into our handbook." }, "merchandiseGroup": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "standardSupplier": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "nullable": true, "x-example-ignore": true, "description": "Nullable resource identifier" } }, "description": "Reference to a standard supplier for this product", "nullable": true }, "isShippingCostsProduct": { "type": "boolean", "description": "Determines if a product is used as a shipping costs product. For more information have a look into our handbook." }, "isVisibleInOnlineShops": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isMatrixProduct": { "type": "boolean", "description": "Determines if a product is a matrix product. For more information have a look into our handbook." }, "discount": { "type": "object", "additionalProperties": false, "properties": { "isDiscountProduct": { "type": "boolean", "description": "Determines if a product is used as a discount. For more information have a look into our handbook." }, "discountPercentage": { "type": "number", "format": "float", "description": "Sets the discount value if the product is a discount. For more information have a look into our handbook." } } }, "freeFields": { "type": "array", "nullable": true, "items": { "type": "object", "additionalProperties": false, "required": [ "id", "value" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "value": { "x-description-missing": true, "type": "string" } } } }, "variantOf": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a parent product", "nullable": true }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "values": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "sort": { "type": "integer" } } } } } } }, "variants": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "options" ], "properties": { "name": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "name", "option" ], "properties": { "name": { "type": "string" }, "option": { "type": "object", "additionalProperties": false, "required": [ "name" ], "properties": { "name": { "type": "string" } } } } } } } }, "example": [ { "name": "OptionalName(overrides autogenerated)", "options": [ { "name": "Cotton", "option": { "name": "Material" } }, { "name": "M", "option": { "name": "Size" } }, { "name": "NoLogo", "option": { "name": "Logo" } } ] } ] }, "categories": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } }, "example": [ { "id": "1" }, { "id": "2" } ] } } }, "examples": { "Create Product": { "value": { "name": "Test Product", "number": "123456", "project": { "id": "7" } } } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "409": { "description": "Request conflict with the current state of the target resource", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "get": { "tags": [ "Product" ], "operationId": "product.list", "summary": "List products", "description": "Returns a collection with all products.", "parameters": [ { "name": "filter", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "search", "id", "uuid", "category", "merchandiseGroup", "standardSupplier", "name", "number", "description", "project", "projectName", "purchasePriceNet", "purchasePriceGross", "salesPriceNet", "salesPriceGross", "shopPriceDisplay", "purchasedCount", "availableCount", "inProductionCount", "ean", "manufacturerName", "manufacturerNumber", "customsTariffNumber", "freeField1", "freeField2", "freeField3", "freeField4", "freeField5", "freeField6", "freeField7", "freeField8", "freeField9", "freeField10", "freeField11", "freeField12", "freeField13", "freeField14", "freeField15", "freeField16", "freeField17", "freeField18", "freeField19", "freeField20", "freeField21", "freeField22", "freeField23", "freeField24", "freeField25", "freeField26", "freeField27", "freeField28", "freeField29", "freeField30", "freeField31", "freeField32", "freeField33", "freeField34", "freeField35", "freeField36", "freeField37", "freeField38", "freeField39", "freeField40", "onlyStockItems", "noStockItems", "onlyVariants", "noVariants", "onlyPartsList", "noPartsList", "onlyActive", "onlyLocked", "onlyInStock", "updatedAt", "isStockItem", "categoryId", "tagId", "isDiscountProduct", "isShippingCostsProduct", "isVariant", "variantOf" ] }, "op": { "type": "string", "enum": [ "equals", "notEquals", "in", "notIn", "exactlyIn", "allIn", "allNotIn", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan", "is" ] }, "value": { "oneOf": [ { "type": "string", "description": "Used for the operations 'equals', 'notEquals', 'contains', 'notContains', 'startsWith', 'endsWith' and 'is'.", "title": "String" }, { "type": "array", "description": "Used for the operations 'in', 'notIn', 'exactlyIn', 'allIn' and 'allNotIn'.", "title": "Array", "items": { "type": "string" } } ] } } } } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "name", "number", "description", "project", "purchasePriceNet", "purchasePriceGross", "salesPriceNet", "salesPriceGross", "ean", "manufacturerName", "manufacturerNumber", "customsTariffNumber" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "uuid": { "description": "UUID identifier of the resource.", "type": "string", "pattern": "^$|^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$", "example": "a00fd11e-3a67-433b-83c0-4e815fd4a0e1" }, "project": { "description": "An object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } }, "category": { "description": "An optional object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "nullable": true, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } }, "standardSupplier": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "nullable": true, "x-example-ignore": true, "description": "Nullable resource identifier" } }, "description": "Reference to a standard supplier for this product", "nullable": true }, "name": { "type": "string", "description": "Name of the product." }, "stockCount": { "x-description-missing": true, "type": "number" }, "number": { "type": "string", "description": "Number / SKU of the product." }, "description": { "type": "string", "nullable": true, "description": "Description of the product." }, "internalComment": { "type": "string", "description": "Text only for internal information." }, "shortDescription": { "type": "string", "nullable": true, "description": "Short description of the product." }, "thumbnailUrl": { "type": "string", "nullable": true, "description": "URL of the product's thumbnail." }, "thumbnailId": { "type": "string", "nullable": true, "description": "ID of the product's thumbnail." }, "minimumOrderQuantity": { "type": "number", "description": "Numerical minimum order quantity of the product." }, "minimumStorageQuantity": { "type": "number", "description": "Numerical minimum storage quantity of the product." }, "allowPurchaseFromAllSuppliers": { "type": "boolean", "description": "Shows if the product can be purchased from all suppliers." }, "hasBatches": { "type": "boolean", "description": "Shows if the product has batches." }, "serialNumbersMode": { "type": "string", "description": "Shows one of the 4 different modes if the product has serial numbers or not and how they are handled. For more information about the different modes have a look into our handbook." }, "hasBestBeforeDate": { "type": "boolean", "description": "Shows if the product has a best before date." }, "hasBillOfMaterials": { "type": "boolean", "description": "Shows if the product has a bill of materials." }, "isAssembledJustInTime": { "type": "boolean", "description": "Shows if the product is assembled just in time." }, "isProductionProduct": { "type": "boolean", "description": "Shows if the product is made in production." }, "isExternallyProduced": { "type": "boolean", "description": "Shows if the product is externally produced." }, "hidePriceOnDocuments": { "type": "boolean", "description": "Shows if the price is hidden on documents." }, "ageRating": { "type": "string", "nullable": true, "description": "Shows if the product has an age rating. Currently only used for the shipping service provider DHL." }, "countryOfOrigin": { "type": "string", "pattern": "[A-Z]{2}", "nullable": true, "description": "Two-digit ISO country code for country of origin of the product." }, "unit": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" } }, "description": "Shows the name of the product unit." }, "measurements": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "width": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "height": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "length": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "weight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } }, "netWeight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } } } }, "isStockItem": { "type": "boolean", "description": "Shows if the product is a stock item." }, "isStockTakingDisabled": { "type": "boolean", "description": "Shows if the product is used for stock taking." }, "hideJustInTimeItemsOnDocuments": { "type": "boolean", "description": "Shows if the just in time items of the parts list are visible on documents." }, "isDisabled": { "type": "boolean", "description": "Shows if the product is locked." }, "disabledReason": { "type": "string", "nullable": true, "description": "Shows the reason why the product is locked when clicking into the product." }, "salesTax": { "type": "string", "enum": [ "standard", "reduced", "free" ], "description": "Selection of three possible values for the sales tax of the product." }, "shopPriceDisplay": { "type": "string", "format": "float", "nullable": true, "description": "Only used by some online shops. For more information have a look into our handbook." }, "ean": { "type": "string", "nullable": true, "description": "EAN of the product." }, "manufacturerName": { "type": "string", "nullable": true, "description": "Name of the manufacturer." }, "manufacturerNumber": { "type": "string", "nullable": true, "description": "Product number at the manufacturer." }, "customsTariffNumber": { "type": "string", "nullable": true, "description": "Customs tariff number of the product." }, "regionOfOrigin": { "type": "string", "description": "Region where the product originates from." }, "isShippingCostsProduct": { "type": "boolean", "description": "Determines if a product is used as a shipping costs product. For more information have a look into our handbook." }, "discount": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "isDiscountProduct": { "type": "boolean", "description": "Determines if a product is used as a discount. For more information have a look into our handbook." }, "discountPercentage": { "type": "number", "format": "float", "description": "Shows the discount value if the product is a discount. For more information have a look into our handbook." } } }, "purchasePriceNet": { "description": "Optional Money object with amount and currency", "type": "object", "nullable": true, "additionalProperties": false, "example": { "amount": "13.37", "currency": "EUR" }, "properties": { "amount": { "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "purchasePriceGross": { "description": "Optional Money object with amount and currency", "type": "object", "nullable": true, "additionalProperties": false, "example": { "amount": "13.37", "currency": "EUR" }, "properties": { "amount": { "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "salesPriceNet": { "description": "Optional Money object with amount and currency", "type": "object", "nullable": true, "additionalProperties": false, "example": { "amount": "13.37", "currency": "EUR" }, "properties": { "amount": { "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "salesPriceGross": { "description": "Optional Money object with amount and currency", "type": "object", "nullable": true, "additionalProperties": false, "example": { "amount": "13.37", "currency": "EUR" }, "properties": { "amount": { "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "stockStats": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "purchasedCount": { "type": "string", "format": "float", "nullable": true }, "totalCount": { "type": "string", "format": "float", "nullable": true }, "availableCount": { "type": "string", "format": "float", "nullable": true }, "inProductionCount": { "type": "string", "format": "float", "nullable": true } } }, "freeFields": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "name", "value" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string", "nullable": true }, "value": { "type": "string" } } } }, "tags": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+" }, "key": { "x-description-missing": true, "type": "string" }, "name": { "x-description-missing": true, "type": "string" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "selectedOptions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "values": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "sort": { "type": "integer" } } } } } } }, "isVariant": { "description": "Shows if the product is a variant from another product.", "type": "boolean", "nullable": true }, "variantOf": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a parent product", "nullable": true }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp of when the product was updated." } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } }, "examples": { "Lists information from all products": { "value": { "data": [ { "id": "1", "uuid": "018a2690-647a-7a8b-b100-cfc11ab7d4e8", "name": "Screw M10x20", "description": "", "shortDescription": null, "number": "700001", "project": { "id": "1", "name": "Standard project" }, "category": { "id": "2", "name": "Service" }, "standardSupplier": { "id": "7" }, "stockCount": 22, "stockStats": { "purchasedCount": null, "totalCount": "22.0000", "availableCount": null, "inProductionCount": null }, "purchasePriceNet": null, "purchasePriceGross": null, "salesPriceNet": null, "salesPriceGross": null, "shopPriceDisplay": "0.00", "ean": "", "manufacturerName": "", "manufacturerNumber": "", "customsTariffNumber": "", "isVariant": false, "variantOf": null, "thumbnailUrl": null, "thumbnailId": null, "tags": [], "freeFields": [], "countryOfOrigin": "DE", "regionOfOrigin": "", "internalComment": "", "measurements": { "weight": { "value": 0, "unit": "kg" }, "netWeight": { "value": 0, "unit": "kg" }, "length": { "value": 0, "unit": "cm" }, "width": { "value": 0, "unit": "cm" }, "height": { "value": 0, "unit": "cm" } }, "minimumOrderQuantity": 0, "minimumStorageQuantity": 0, "salesTax": "reduced", "hasBatches": false, "serialNumbersMode": "disabled", "hasBestBeforeDate": false, "hasBillOfMaterials": false, "isAssembledJustInTime": false, "isProductionProduct": false, "isExternallyProduced": false, "allowPurchaseFromAllSuppliers": false, "isDisabled": false, "disabledReason": "", "hidePriceOnDocuments": false, "ageRating": null, "isStockItem": true, "isStockTakingDisabled": false, "hideJustInTimeItemsOnDocuments": false, "isShippingCostsProduct": false, "discount": { "isDiscountProduct": false, "discountPercentage": 0 }, "unit": { "name": "abc" }, "updatedAt": "2024-04-15T13:10:58+02:00" }, { "id": "2", "uuid": "018a2690-647b-7970-97c8-e02df3a2ae1f", "name": "hex nut M10", "description": "", "shortDescription": null, "number": "700002", "project": { "id": "1", "name": "Standard project" }, "category": null, "standardSupplier": { "id": "7" }, "stockCount": 93, "stockStats": { "purchasedCount": null, "totalCount": "93.0000", "availableCount": null, "inProductionCount": null }, "purchasePriceNet": null, "purchasePriceGross": null, "salesPriceNet": null, "salesPriceGross": null, "shopPriceDisplay": "0.00", "ean": "", "manufacturerName": "", "manufacturerNumber": "", "customsTariffNumber": "", "isVariant": false, "variantOf": null, "thumbnailUrl": null, "thumbnailId": null, "tags": [], "freeFields": [], "countryOfOrigin": "DE", "regionOfOrigin": "", "internalComment": "", "measurements": { "weight": { "value": 0, "unit": "kg" }, "netWeight": { "value": 0, "unit": "kg" }, "length": { "value": 0, "unit": "cm" }, "width": { "value": 0, "unit": "cm" }, "height": { "value": 0, "unit": "cm" } }, "minimumOrderQuantity": 0, "minimumStorageQuantity": 0, "salesTax": "reduced", "hasBatches": false, "serialNumbersMode": "disabled", "hasBestBeforeDate": false, "hasBillOfMaterials": false, "isAssembledJustInTime": false, "isProductionProduct": false, "isExternallyProduced": false, "allowPurchaseFromAllSuppliers": false, "isDisabled": false, "disabledReason": "", "hidePriceOnDocuments": false, "ageRating": null, "isStockItem": true, "isStockTakingDisabled": false, "hideJustInTimeItemsOnDocuments": false, "isShippingCostsProduct": false, "discount": { "isDiscountProduct": false, "discountPercentage": 0 }, "unit": { "name": "" }, "updatedAt": "2024-03-27T15:13:25+01:00" } ], "extra": { "totalCount": 2, "page": { "number": 1, "size": 10 } } } } } }, "application/vnd.xentral.default.v2-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "uuid": { "description": "UUID identifier of the resource.", "type": "string", "pattern": "^$|^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$", "example": "a00fd11e-3a67-433b-83c0-4e815fd4a0e1" }, "project": { "description": "An object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } }, "merchandiseGroup": { "description": "An optional object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "nullable": true, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } }, "name": { "type": "string", "description": "Name of the product." }, "stockCount": { "x-description-missing": true, "type": "number" }, "number": { "type": "string", "description": "Number / SKU of the product." }, "description": { "type": "string", "nullable": true, "description": "Description of the product." }, "internalComment": { "type": "string", "description": "Text only for internal information." }, "shortDescription": { "type": "string", "nullable": true, "description": "Short description of the product." }, "standardSupplier": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "nullable": true, "x-example-ignore": true, "description": "Nullable resource identifier" } }, "description": "Reference to a standard supplier for this product", "nullable": true }, "thumbnailUrl": { "type": "string", "nullable": true, "description": "URL of the product's thumbnail." }, "thumbnailId": { "type": "string", "nullable": true, "description": "ID of the product's thumbnail." }, "tags": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+" }, "key": { "x-description-missing": true, "type": "string" }, "name": { "x-description-missing": true, "type": "string" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "purchasePriceNet": { "description": "Optional Money object with amount and currency", "type": "object", "nullable": true, "additionalProperties": false, "example": { "amount": "13.37", "currency": "EUR" }, "properties": { "amount": { "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "purchasePriceGross": { "description": "Optional Money object with amount and currency", "type": "object", "nullable": true, "additionalProperties": false, "example": { "amount": "13.37", "currency": "EUR" }, "properties": { "amount": { "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "salesPriceNet": { "description": "Optional Money object with amount and currency", "type": "object", "nullable": true, "additionalProperties": false, "example": { "amount": "13.37", "currency": "EUR" }, "properties": { "amount": { "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "salesPriceGross": { "description": "Optional Money object with amount and currency", "type": "object", "nullable": true, "additionalProperties": false, "example": { "amount": "13.37", "currency": "EUR" }, "properties": { "amount": { "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "ean": { "type": "string", "nullable": true, "description": "EAN of the product." }, "manufacturer": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "nullable": true, "description": "Name of the manufacturer." }, "number": { "type": "string", "nullable": true, "description": "Product number at the manufacturer." }, "link": { "type": "string", "nullable": true, "description": "URI of the manufacturer." } } }, "customsTariffNumber": { "type": "string", "nullable": true, "description": "Customs tariff number of the product." }, "isShippingCostsProduct": { "type": "boolean", "description": "Determines if a product is used as a shipping costs product. For more information have a look into our handbook." }, "discount": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "isDiscountProduct": { "type": "boolean", "description": "Determines if a product is used as a discount. For more information have a look into our handbook." }, "discountPercentage": { "type": "number", "format": "float", "description": "Shows the discount value if the product is a discount. For more information have a look into our handbook." } } }, "stockStats": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "purchasedCount": { "type": "string", "format": "float", "nullable": true }, "totalCount": { "type": "string", "format": "float", "nullable": true }, "availableCount": { "type": "string", "format": "float", "nullable": true }, "inProductionCount": { "type": "string", "format": "float", "nullable": true } } }, "minimumOrderQuantity": { "type": "number", "description": "Numerical minimum order quantity of the product." }, "minimumStorageQuantity": { "type": "number", "description": "Numerical minimum storage quantity of the product." }, "allowPurchaseFromAllSuppliers": { "type": "boolean", "description": "Shows if the product can be purchased from all suppliers." }, "isCustomProduct": { "type": "boolean", "description": "Shows if the product is a custom product." }, "isDeleted": { "type": "boolean", "description": "Shows if the product is deleted." }, "hasBatches": { "type": "boolean", "description": "Shows if the product has batches." }, "serialNumbersMode": { "type": "string", "description": "Shows one of the 4 different modes if the product has serial numbers or not and how they are handled. For more information about the different modes have a look into our handbook." }, "hasBestBeforeDate": { "type": "boolean", "description": "Shows if the product has a best before date." }, "hasBillOfMaterials": { "type": "boolean", "description": "Shows if the product has a bill of materials." }, "isAssembledJustInTime": { "type": "boolean", "description": "Shows if the product is assembled just in time." }, "isProductionProduct": { "type": "boolean", "description": "Shows if the product is made in production." }, "isExternallyProduced": { "type": "boolean", "description": "Shows if the product is externally produced." }, "hidePriceOnDocuments": { "type": "boolean", "description": "Shows if the price is hidden on documents." }, "ageRating": { "type": "string", "nullable": true, "description": "Shows if the product has an age rating. Currently only used for the shipping service provider DHL." }, "countryOfOrigin": { "type": "string", "pattern": "[A-Z]{2}", "nullable": true, "description": "Two-digit ISO country code for country of origin of the product." }, "unit": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" } }, "description": "Shows the name of the product unit." }, "measurements": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "width": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "height": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "length": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "weight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } }, "netWeight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } } } }, "isStockItem": { "type": "boolean", "description": "Shows if the product is a stock item." }, "isStockTakingDisabled": { "type": "boolean", "description": "Shows if the product is used for stock taking." }, "hideJustInTimeItemsOnDocuments": { "type": "boolean", "description": "Shows if the just in time items of the parts list are visible on documents." }, "isDisabled": { "type": "boolean", "description": "Shows if the product is locked." }, "disabledReason": { "type": "string", "nullable": true, "description": "Shows the reason why the product is locked when clicking into the product." }, "salesTax": { "type": "string", "enum": [ "standard", "reduced", "free" ], "description": "Shows the sales tax of the product." }, "regionOfOrigin": { "type": "string", "description": "Region where the product originates from." }, "freeFields": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "name", "value" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string", "nullable": true }, "value": { "type": "string" } } } }, "isMatrixProduct": { "type": "boolean", "description": "Shows if the product is a matrix product." }, "salesChannel": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "description": { "type": "string" }, "meta": { "type": "object", "additionalProperties": false, "properties": { "title": { "type": "string" }, "description": { "type": "string" }, "keywords": { "type": "string" } } }, "isStockNumberSyncActive": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isSoldOut": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isRemainingQuantity": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "suggestedRetailPrice": { "type": "string", "format": "float", "nullable": true, "description": "Was earlier called shopPriceDisplay. Only used by some online shops. For more information have a look into our handbook." }, "isVisible": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] } } }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "values": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "sort": { "type": "integer" } } } } } } }, "selectedOptions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "values": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "sort": { "type": "integer" } } } } } } }, "isVariant": { "description": "Shows if the product is a variant from another product.", "type": "boolean", "nullable": true }, "variantOf": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a parent product", "nullable": true }, "variants": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } } } } }, "mainVariant": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a main variant of this product", "nullable": true }, "categories": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp of when the product was updated." } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } }, "examples": { "Lists information from all products": { "value": { "data": [ { "id": "1", "uuid": "018a2690-647a-7a8b-b100-cfc11ab7d4e8", "name": "Screw M10x20", "description": "", "shortDescription": null, "number": "700001", "project": { "id": "1", "name": "Standard project" }, "merchandiseGroup": { "id": "2", "name": "Service" }, "categories": [ { "id": "1" } ], "standardSupplier": { "id": "7" }, "stockCount": 22, "stockStats": { "purchasedCount": null, "totalCount": "22.0000", "availableCount": null, "inProductionCount": null }, "purchasePriceNet": null, "purchasePriceGross": null, "salesPriceNet": null, "salesPriceGross": null, "ean": "", "manufacturer": { "name": "", "number": "", "link": "" }, "customsTariffNumber": "", "isMatrixProduct": true, "options": [], "selectedOptions": [], "variants": [], "isVariant": false, "variantOf": null, "mainVariant": null, "thumbnailUrl": null, "thumbnailId": null, "tags": [], "freeFields": [], "countryOfOrigin": "DE", "regionOfOrigin": "", "internalComment": "", "isDeleted": false, "measurements": { "weight": { "value": 0, "unit": "kg" }, "netWeight": { "value": 0, "unit": "kg" }, "length": { "value": 0, "unit": "cm" }, "width": { "value": 0, "unit": "cm" }, "height": { "value": 0, "unit": "cm" } }, "minimumOrderQuantity": 0, "minimumStorageQuantity": 0, "salesTax": "reduced", "hasBatches": false, "serialNumbersMode": "disabled", "hasBestBeforeDate": false, "hasBillOfMaterials": false, "isAssembledJustInTime": false, "isProductionProduct": false, "isExternallyProduced": false, "allowPurchaseFromAllSuppliers": false, "isDisabled": false, "disabledReason": "", "hidePriceOnDocuments": false, "ageRating": null, "isStockItem": true, "isStockTakingDisabled": false, "isCustomProduct": false, "hideJustInTimeItemsOnDocuments": false, "isShippingCostsProduct": false, "discount": { "isDiscountProduct": false, "discountPercentage": 0 }, "salesChannel": { "description": "", "meta": { "title": "", "description": "", "keywords": "" }, "isStockNumberSyncActive": false, "isRemainingQuantity": false, "isSoldOut": false, "isVisible": true, "suggestedRetailPrice": "0.00" }, "unit": { "name": "abc" }, "updatedAt": "2024-04-15T13:10:58+02:00" }, { "id": "2", "uuid": "018a2690-647b-7970-97c8-e02df3a2ae1f", "name": "hex nut M10", "description": "", "shortDescription": null, "number": "700002", "project": { "id": "1", "name": "Standard project" }, "merchandiseGroup": null, "categories": [ { "id": "1" } ], "standardSupplier": { "id": "7" }, "stockCount": 93, "stockStats": { "purchasedCount": null, "totalCount": "93.0000", "availableCount": null, "inProductionCount": null }, "purchasePriceNet": null, "purchasePriceGross": null, "salesPriceNet": null, "salesPriceGross": null, "ean": "", "manufacturer": { "name": "", "number": "", "link": "" }, "customsTariffNumber": "", "isMatrixProduct": false, "options": [], "selectedOptions": [], "variants": [], "isVariant": false, "variantOf": null, "mainVariant": null, "thumbnailUrl": null, "thumbnailId": null, "tags": [], "freeFields": [], "countryOfOrigin": "DE", "regionOfOrigin": "", "internalComment": "", "isDeleted": false, "measurements": { "weight": { "value": 0, "unit": "kg" }, "netWeight": { "value": 0, "unit": "kg" }, "length": { "value": 0, "unit": "cm" }, "width": { "value": 0, "unit": "cm" }, "height": { "value": 0, "unit": "cm" } }, "minimumOrderQuantity": 0, "minimumStorageQuantity": 0, "salesTax": "reduced", "hasBatches": false, "serialNumbersMode": "disabled", "hasBestBeforeDate": false, "hasBillOfMaterials": false, "isAssembledJustInTime": false, "isProductionProduct": false, "isExternallyProduced": false, "allowPurchaseFromAllSuppliers": false, "isDisabled": false, "disabledReason": "", "hidePriceOnDocuments": false, "ageRating": null, "isStockItem": true, "isStockTakingDisabled": false, "isCustomProduct": false, "hideJustInTimeItemsOnDocuments": false, "isShippingCostsProduct": false, "discount": { "isDiscountProduct": false, "discountPercentage": 0 }, "salesChannel": { "description": "", "meta": { "title": "", "description": "", "keywords": "" }, "isStockNumberSyncActive": false, "isRemainingQuantity": false, "isSoldOut": false, "isVisible": true, "suggestedRetailPrice": "0.00" }, "unit": { "name": "" }, "updatedAt": "2024-03-27T15:13:25+01:00" } ], "extra": { "totalCount": 2, "page": { "number": 1, "size": 10 } } } } } }, "application/vnd.xentral.default.v1+csv": { "schema": { "type": "string" } }, "application/vnd.xentral.minimal.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "uuid": { "description": "UUID identifier of the resource.", "type": "string", "pattern": "^$|^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$", "example": "a00fd11e-3a67-433b-83c0-4e815fd4a0e1" }, "project": { "description": "An object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } }, "category": { "description": "An optional object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "nullable": true, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } }, "standardSupplier": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "nullable": true, "x-example-ignore": true, "description": "Nullable resource identifier" } }, "description": "Reference to a standard supplier for this product", "nullable": true }, "name": { "type": "string", "description": "Name of the product." }, "stockCount": { "x-description-missing": true, "type": "number" }, "number": { "type": "string", "description": "Number / SKU of the product." }, "description": { "type": "string", "nullable": true, "description": "Description of the product." }, "internalComment": { "type": "string", "description": "Text only for internal information." }, "shortDescription": { "type": "string", "nullable": true, "description": "Short description of the product." }, "thumbnailUrl": { "type": "string", "nullable": true, "description": "URL of the product's thumbnail." }, "thumbnailId": { "type": "string", "nullable": true, "description": "ID of the product's thumbnail." }, "minimumOrderQuantity": { "type": "number", "description": "Numerical minimum order quantity of the product." }, "minimumStorageQuantity": { "type": "number", "description": "Numerical minimum storage quantity of the product." }, "allowPurchaseFromAllSuppliers": { "type": "boolean", "description": "Shows if the product can be purchased from all suppliers." }, "hasBatches": { "type": "boolean", "description": "Shows if the product has batches." }, "serialNumbersMode": { "type": "string", "description": "Shows one of the 4 different modes if the product has serial numbers or not and how they are handled. For more information about the different modes have a look into our handbook." }, "hasBestBeforeDate": { "type": "boolean", "description": "Shows if the product has a best before date." }, "hasBillOfMaterials": { "type": "boolean", "description": "Shows if the product has a bill of materials." }, "isAssembledJustInTime": { "type": "boolean", "description": "Shows if the product is assembled just in time." }, "isProductionProduct": { "type": "boolean", "description": "Shows if the product is made in production." }, "isExternallyProduced": { "type": "boolean", "description": "Shows if the product is externally produced." }, "hidePriceOnDocuments": { "type": "boolean", "description": "Shows if the price is hidden on documents." }, "ageRating": { "type": "string", "nullable": true, "description": "Shows if the product has an age rating. Currently only used for the shipping service provider DHL." }, "countryOfOrigin": { "type": "string", "pattern": "[A-Z]{2}", "nullable": true, "description": "Two-digit ISO country code for country of origin of the product." }, "unit": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" } }, "description": "Shows the name of the product unit." }, "measurements": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "width": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "height": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "length": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "weight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } }, "netWeight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } } } }, "isStockItem": { "type": "boolean", "description": "Shows if the product is a stock item." }, "isStockTakingDisabled": { "type": "boolean", "description": "Shows if the product is used for stock taking." }, "hideJustInTimeItemsOnDocuments": { "type": "boolean", "description": "Shows if the just in time items of the parts list are visible on documents." }, "isDisabled": { "type": "boolean", "description": "Shows if the product is locked." }, "disabledReason": { "type": "string", "nullable": true, "description": "Shows the reason why the product is locked when clicking into the product." }, "salesTax": { "type": "string", "enum": [ "standard", "reduced", "free" ], "description": "Selection of three possible values for the sales tax of the product." }, "shopPriceDisplay": { "type": "string", "format": "float", "nullable": true, "description": "Only used by some online shops. For more information have a look into our handbook." }, "ean": { "type": "string", "nullable": true, "description": "EAN of the product." }, "manufacturerName": { "type": "string", "nullable": true, "description": "Name of the manufacturer." }, "manufacturerNumber": { "type": "string", "nullable": true, "description": "Product number at the manufacturer." }, "customsTariffNumber": { "type": "string", "nullable": true, "description": "Customs tariff number of the product." }, "regionOfOrigin": { "type": "string", "description": "Region where the product originates from." }, "isShippingCostsProduct": { "type": "boolean", "description": "Determines if a product is used as a shipping costs product. For more information have a look into our handbook." }, "discount": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "isDiscountProduct": { "type": "boolean", "description": "Determines if a product is used as a discount. For more information have a look into our handbook." }, "discountPercentage": { "type": "number", "format": "float", "description": "Shows the discount value if the product is a discount. For more information have a look into our handbook." } } }, "purchasePriceNet": { "description": "Optional Money object with amount and currency", "type": "object", "nullable": true, "additionalProperties": false, "example": { "amount": "13.37", "currency": "EUR" }, "properties": { "amount": { "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "purchasePriceGross": { "description": "Optional Money object with amount and currency", "type": "object", "nullable": true, "additionalProperties": false, "example": { "amount": "13.37", "currency": "EUR" }, "properties": { "amount": { "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "salesPriceNet": { "description": "Optional Money object with amount and currency", "type": "object", "nullable": true, "additionalProperties": false, "example": { "amount": "13.37", "currency": "EUR" }, "properties": { "amount": { "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "salesPriceGross": { "description": "Optional Money object with amount and currency", "type": "object", "nullable": true, "additionalProperties": false, "example": { "amount": "13.37", "currency": "EUR" }, "properties": { "amount": { "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "stockStats": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "purchasedCount": { "type": "string", "format": "float", "nullable": true }, "totalCount": { "type": "string", "format": "float", "nullable": true }, "availableCount": { "type": "string", "format": "float", "nullable": true }, "inProductionCount": { "type": "string", "format": "float", "nullable": true } } }, "freeFields": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "name", "value" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string", "nullable": true }, "value": { "type": "string" } } } }, "tags": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+" }, "key": { "x-description-missing": true, "type": "string" }, "name": { "x-description-missing": true, "type": "string" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "selectedOptions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "values": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "sort": { "type": "integer" } } } } } } }, "isVariant": { "description": "Shows if the product is a variant from another product.", "type": "boolean", "nullable": true }, "variantOf": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a parent product", "nullable": true }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp of when the product was updated." } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } }, "example": { "data": [ { "id": "2", "name": "Coca Cola" }, { "id": "4", "name": "beer" }, { "id": "5", "name": "mate" } ], "extra": { "totalCount": 53841, "page": { "number": 1, "size": 3 } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Product" ], "operationId": "product.updateMultiple", "summary": "Update multiple products", "description": "Updates multiple products", "requestBody": { "description": "Product update multiple request payload", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string", "description": "Name of the product." }, "number": { "type": "string", "description": "Number / SKU of the product." }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "description": { "type": "string", "nullable": true, "description": "Description of the product." }, "internalComment": { "type": "string", "nullable": true, "description": "Text only for internal information." }, "shortDescription": { "type": "string", "nullable": true, "description": "Short description of the product." }, "customsTariffNumber": { "type": "string", "nullable": true, "description": "Customs tariff number of the product." }, "ean": { "type": "string", "nullable": true, "description": "EAN of the product." }, "minimumOrderQuantity": { "type": "number", "description": "Numerical minimum order quantity of the product." }, "minimumStorageQuantity": { "type": "number", "description": "Numerical minimum storage quantity of the product." }, "allowPurchaseFromAllSuppliers": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hasBatches": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "serialNumbersMode": { "type": "string", "enum": [ "disabled", "user", "product", "productAndWarehouse" ], "description": "4 different modes available if the product has serial numbers or not and how they are handled. For more information about the different modes have a look into our handbook." }, "hasBestBeforeDate": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hasBillOfMaterials": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isAssembledJustInTime": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isProductionProduct": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isExternallyProduced": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isDisabled": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "disabledReason": { "type": "string", "nullable": true, "description": "Shows the reason why the product is locked when clicking into the product." }, "hidePriceOnDocuments": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "ageRating": { "type": "string", "enum": [ "", "16", "18" ], "nullable": true, "description": "Sets an age rating for the product. Currently only used for the shipping service provider DHL." }, "countryOfOrigin": { "type": "string", "pattern": "[A-Z]{2}", "nullable": true, "description": "Two-digit ISO country code for country of origin of the product." }, "measurements": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "width": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "height": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "length": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "weight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } }, "netWeight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } } } }, "manufacturer": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "nullable": true, "description": "Name of the manufacturer." }, "number": { "type": "string", "nullable": true, "description": "Product number at the manufacturer." }, "link": { "type": "string", "nullable": true, "description": "URI of the manufacturer." } } }, "isStockItem": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isStockTakingDisabled": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hideJustInTimeItemsOnDocuments": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "salesTax": { "type": "string", "enum": [ "standard", "reduced", "free" ], "description": "Selection of three possible values for the sales tax of the product." }, "shopPriceDisplay": { "type": "string", "format": "float", "nullable": true, "description": "Only used by some online shops. For more information have a look into our handbook." }, "category": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "standardSupplier": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "nullable": true, "x-example-ignore": true, "description": "Nullable resource identifier" } }, "description": "Reference to a standard supplier for this product", "nullable": true }, "isShippingCostsProduct": { "type": "boolean", "description": "Determines if a product is used as a shipping costs product. For more information have a look into our handbook." }, "discount": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "isDiscountProduct": { "type": "boolean", "description": "Determines if a product is used as a discount. For more information have a look into our handbook." }, "discountPercentage": { "type": "number", "format": "float", "description": "Sets the discount value if the product is a discount. For more information have a look into our handbook." } } }, "regionOfOrigin": { "type": "string", "enum": [ "", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "99" ], "description": "01 - Schleswig-Holstein, 02 - Hamburg, 03 - Niedersachsen, 04 - Bremen, 05 - Nordhrein-Westfalen, 06 - Hessen, 07 - Rheinland-Pfalz, 08 - Baden-Württemberg, 09 - Bayern, 10 - Saarland, 11 - Berlin, 12 - Brandenburg, 13 - Mecklenburg-Vorpommern, 14 - Sachsen, 15 - Sachsen-Anhalt, 16 - Thüringen, 99 - foreign origin", "nullable": true }, "isMatrixProduct": { "type": "boolean", "description": "Determines if a product is a matrix product. For more information have a look into our handbook." }, "freeFields": { "type": "array", "nullable": true, "items": { "type": "object", "additionalProperties": false, "required": [ "id", "value" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "value": { "x-description-missing": true, "type": "string" } } } }, "tags": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "description": "Either ID or name and key." }, "key": { "x-description-missing": true, "type": "string" }, "name": { "x-description-missing": true, "type": "string" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "variantOf": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a parent product", "nullable": true } } } }, "examples": { "Update multiple products": { "value": [ { "id": "17", "name": "Shipping Discount Small", "category": { "id": "2000" }, "discount": { "isDiscountProduct": true, "discountPercentage": 2 }, "isStockItem": false }, { "id": "18", "name": "Shipping Discount Big", "category": { "id": "2000" }, "discount": { "isDiscountProduct": true, "discountPercentage": 5 }, "isStockItem": false } ] } } }, "application/vnd.xentral.default.v2-beta+json": { "schema": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string", "description": "Name of the product." }, "number": { "type": "string", "description": "Number / SKU of the product." }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "description": { "type": "string", "nullable": true, "description": "Description of the product." }, "internalComment": { "type": "string", "nullable": true, "description": "Text only for internal information." }, "shortDescription": { "type": "string", "nullable": true, "description": "Short description of the product." }, "customsTariffNumber": { "type": "string", "nullable": true, "description": "Customs tariff number of the product." }, "ean": { "type": "string", "nullable": true, "description": "EAN of the product." }, "minimumOrderQuantity": { "type": "number", "description": "Numerical minimum order quantity of the product." }, "minimumStorageQuantity": { "type": "number", "description": "Numerical minimum storage quantity of the product." }, "allowPurchaseFromAllSuppliers": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hasBatches": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "serialNumbersMode": { "type": "string", "enum": [ "disabled", "user", "product", "productAndWarehouse" ], "description": "4 different modes available if the product has serial numbers or not and how they are handled. For more information about the different modes have a look into our handbook." }, "hasBestBeforeDate": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hasBillOfMaterials": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isAssembledJustInTime": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isProductionProduct": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isExternallyProduced": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isDisabled": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "disabledReason": { "type": "string", "nullable": true, "description": "Shows the reason why the product is locked when clicking into the product." }, "hidePriceOnDocuments": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "ageRating": { "type": "string", "enum": [ "", "16", "18" ], "nullable": true, "description": "Sets an age rating for the product. Currently only used for the shipping service provider DHL." }, "countryOfOrigin": { "type": "string", "pattern": "[A-Z]{2}", "nullable": true, "description": "Two-digit ISO country code for country of origin of the product." }, "measurements": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "width": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "height": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "length": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "weight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } }, "netWeight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } } } }, "manufacturer": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "nullable": true, "description": "Name of the manufacturer." }, "number": { "type": "string", "nullable": true, "description": "Product number at the manufacturer." }, "link": { "type": "string", "nullable": true, "description": "URI of the manufacturer." } } }, "isStockItem": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isStockTakingDisabled": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hideJustInTimeItemsOnDocuments": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "salesTax": { "type": "string", "enum": [ "standard", "reduced", "free" ], "description": "Selection of three possible values for the sales tax of the product." }, "shopPriceDisplay": { "type": "string", "format": "float", "nullable": true, "description": "Only used by some online shops. For more information have a look into our handbook." }, "merchandiseGroup": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "categories": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } }, "example": [ { "id": "1" }, { "id": "2" } ] }, "standardSupplier": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "nullable": true, "x-example-ignore": true, "description": "Nullable resource identifier" } }, "description": "Reference to a standard supplier for this product", "nullable": true }, "isShippingCostsProduct": { "type": "boolean", "description": "Determines if a product is used as a shipping costs product. For more information have a look into our handbook." }, "isVisibleInOnlineShops": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isMatrixProduct": { "type": "boolean", "description": "Determines if a product is a matrix product. For more information have a look into our handbook." }, "discount": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "isDiscountProduct": { "type": "boolean", "description": "Determines if a product is used as a discount. For more information have a look into our handbook." }, "discountPercentage": { "type": "number", "format": "float", "description": "Sets the discount value if the product is a discount. For more information have a look into our handbook." } } }, "regionOfOrigin": { "type": "string", "enum": [ "", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "99" ], "description": "01 - Schleswig-Holstein, 02 - Hamburg, 03 - Niedersachsen, 04 - Bremen, 05 - Nordhrein-Westfalen, 06 - Hessen, 07 - Rheinland-Pfalz, 08 - Baden-Württemberg, 09 - Bayern, 10 - Saarland, 11 - Berlin, 12 - Brandenburg, 13 - Mecklenburg-Vorpommern, 14 - Sachsen, 15 - Sachsen-Anhalt, 16 - Thüringen, 99 - foreign origin", "nullable": true }, "freeFields": { "type": "array", "nullable": true, "items": { "type": "object", "additionalProperties": false, "required": [ "id", "value" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "value": { "x-description-missing": true, "type": "string" } } } }, "tags": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "description": "Either ID or name and key." }, "key": { "x-description-missing": true, "type": "string" }, "name": { "x-description-missing": true, "type": "string" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "variantOf": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a parent product", "nullable": true } } } }, "examples": { "Update multiple products": { "value": [ { "id": "17", "name": "Shipping Discount Small", "merchandiseGroup": { "id": "2000" }, "discount": { "isDiscountProduct": true, "discountPercentage": 2 }, "isStockItem": false }, { "id": "18", "name": "Shipping Discount Small", "merchandiseGroup": { "id": "2000" }, "discount": { "isDiscountProduct": true, "discountPercentage": 5 }, "isStockItem": false } ] } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "409": { "description": "Request conflict with the current state of the target resource", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "delete": { "tags": [ "Product" ], "operationId": "product.deleteMultiple", "summary": "Delete multiple products", "description": "Deletes multiple products", "requestBody": { "description": "Product delete multiple request payload", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } }, "examples": { "Delete multiple products": { "value": [ { "id": "1337" }, { "id": "1339" }, { "id": "1340" } ] } } }, "application/vnd.xentral.force.v1+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } }, "examples": { "Delete multiple products": { "value": [ { "id": "1337" }, { "id": "1339" }, { "id": "1340" } ] } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "409": { "description": "Request conflict with the current state of the target resource", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "429": { "description": "Too many API calls made." } } } }, "/api/products/{id}": { "get": { "tags": [ "Product" ], "operationId": "product.view", "summary": "View product", "description": "Returns details of a single product", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "uuid": { "description": "UUID identifier of the resource.", "type": "string", "pattern": "^$|^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$", "example": "a00fd11e-3a67-433b-83c0-4e815fd4a0e1" }, "project": { "description": "An object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } }, "category": { "description": "An optional object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "nullable": true, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } }, "standardSupplier": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "nullable": true, "x-example-ignore": true, "description": "Nullable resource identifier" } }, "description": "Reference to a standard supplier for this product", "nullable": true }, "name": { "type": "string", "description": "Name of the product." }, "description": { "x-description-missing": true, "type": "string", "nullable": true }, "ean": { "type": "string", "nullable": true, "description": "EAN of the product." }, "stockCount": { "x-description-missing": true, "type": "number" }, "number": { "type": "string", "description": "Number / SKU of the product." }, "thumbnailUrl": { "type": "string", "nullable": true, "description": "URL of the product's thumbnail." }, "thumbnailId": { "type": "string", "nullable": true, "description": "ID of the product's thumbnail." }, "customsTariffNumber": { "type": "string", "nullable": true, "description": "Customs tariff number of the product." }, "countryOfOrigin": { "type": "string", "pattern": "[A-Z]{2}", "nullable": true, "description": "Two-digit ISO country code for country of origin of the product." }, "tags": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+" }, "key": { "x-description-missing": true, "type": "string" }, "name": { "x-description-missing": true, "type": "string" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "shortDescription": { "type": "string", "nullable": true, "description": "Short description of the product." }, "internalComment": { "type": "string", "description": "Text only for internal information." }, "minimumOrderQuantity": { "type": "number", "description": "Numerical minimum order quantity of the product." }, "minimumStorageQuantity": { "type": "number", "description": "Numerical minimum storage quantity of the product." }, "isMatrixProduct": { "type": "boolean", "description": "Shows if the product is a matrix product." }, "hasBatches": { "type": "boolean", "description": "Shows if the product has batches." }, "serialNumbersMode": { "type": "string", "description": "Shows one of the 4 different modes if the product has serial numbers or not and how they are handled. For more information about the different modes have a look into our handbook." }, "hasBestBeforeDate": { "type": "boolean", "description": "Shows if the product has a best before date." }, "allowPurchaseFromAllSuppliers": { "type": "boolean", "description": "Shows if the product can be purchased from all suppliers." }, "isStockTakingDisabled": { "type": "boolean", "description": "Shows if the product is used for stock taking." }, "ageRating": { "type": "string", "nullable": true, "description": "Shows if the product has an age rating. Currently only used for the shipping service provider DHL." }, "hasBillOfMaterials": { "type": "boolean", "description": "Shows if the product has a bill of materials." }, "isAssembledJustInTime": { "type": "boolean", "description": "Shows if the product is assembled just in time." }, "hideJustInTimeItemsOnDocuments": { "type": "boolean", "description": "Shows if the just in time items of the parts list are visible on documents." }, "isProductionProduct": { "type": "boolean", "description": "Shows if the product is made in production." }, "isExternallyProduced": { "type": "boolean", "description": "Shows if the product is externally produced." }, "isCustomProduct": { "type": "boolean", "description": "Shows if the product is a custom product." }, "hidePriceOnDocuments": { "type": "boolean", "description": "Shows if the price is hidden on documents." }, "isDisabled": { "type": "boolean", "description": "Shows if the product is locked." }, "disabledReason": { "type": "string", "nullable": true, "description": "Shows the reason why the product is locked when clicking into the product." }, "markAsSoldOut": { "type": "boolean", "description": "Shows if the product is sold out." }, "markAsInactive": { "type": "boolean", "description": "Shows if the product is inactive." }, "isDeleted": { "type": "boolean", "description": "Shows if the product is deleted." }, "unit": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" } }, "description": "Shows the name of the product unit." }, "measurements": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "width": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "height": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "length": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "weight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } }, "netWeight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } } } }, "manufacturer": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "nullable": true, "description": "Name of the manufacturer." }, "number": { "type": "string", "nullable": true, "description": "Product number at the manufacturer." }, "url": { "type": "string", "nullable": true, "description": "URI of the manufacturer." } } }, "isStockItem": { "type": "boolean", "description": "Shows if the product is a stock item." }, "salesTax": { "type": "string", "enum": [ "standard", "reduced", "free" ], "description": "Shows the sales tax of the product." }, "shopPriceDisplay": { "type": "string", "format": "float", "nullable": true, "description": "Only used by some online shops. For more information have a look into our handbook." }, "isRemainingQuantity": { "type": "boolean", "description": "Shows if only the remaining quantity of the product is left." }, "regionOfOrigin": { "type": "string", "description": "Region where the product originates from." }, "isShippingCostsProduct": { "type": "boolean", "description": "Determines if a product is used as a shipping costs product. For more information have a look into our handbook." }, "discount": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "isDiscountProduct": { "type": "boolean", "description": "Determines if a product is used as a discount. For more information have a look into our handbook." }, "discountPercentage": { "type": "number", "format": "float", "description": "Shows the discount value if the product is a discount. For more information have a look into our handbook." } } }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "values": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "sort": { "type": "integer" } } } } } } }, "selectedOptions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "values": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "sort": { "type": "integer" } } } } } } }, "variants": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } } } } }, "mainVariant": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a main variant of this product", "nullable": true }, "freeFields": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "name", "value" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string", "nullable": true }, "value": { "type": "string" } } } }, "isVariant": { "description": "Shows if the product is a variant from another product.", "type": "boolean", "nullable": true }, "variantOf": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a parent product", "nullable": true }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp of when the product was updated." } } } } }, "examples": { "Shows information about a single product": { "value": { "data": { "id": "1", "uuid": "018a2690-647a-7a8b-b100-cfc11ab7d4e8", "name": "Screw M10x20", "description": null, "shortDescription": null, "number": "700001", "project": { "id": "1", "name": "Standard project" }, "category": { "id": "2", "name": "Service" }, "standardSupplier": { "id": "7" }, "stockCount": 22, "shopPriceDisplay": "0.00", "ean": null, "manufacturer": { "name": null, "number": null, "url": null }, "customsTariffNumber": null, "options": [ { "id": "1", "name": "Color", "values": [ { "id": "1", "name": "blue", "sort": 1 }, { "id": "2", "name": "red", "sort": 2 } ] } ], "selectedOptions": [], "variants": [ { "id": "15", "options": [ { "id": "1" } ] }, { "id": "16", "options": [ { "id": "2" } ] } ], "isVariant": false, "variantOf": null, "mainVariant": { "id": "15" }, "thumbnailUrl": null, "thumbnailId": null, "tags": [], "freeFields": [], "countryOfOrigin": "DE", "regionOfOrigin": "", "internalComment": "", "isDeleted": false, "measurements": { "weight": { "value": 0, "unit": "kg" }, "netWeight": { "value": 0, "unit": "kg" }, "length": { "value": 0, "unit": "cm" }, "width": { "value": 0, "unit": "cm" }, "height": { "value": 0, "unit": "cm" } }, "minimumOrderQuantity": 0, "minimumStorageQuantity": 0, "salesTax": "reduced", "hasBatches": false, "serialNumbersMode": "disabled", "hasBestBeforeDate": false, "hasBillOfMaterials": false, "isAssembledJustInTime": false, "isProductionProduct": false, "isExternallyProduced": false, "allowPurchaseFromAllSuppliers": false, "isDisabled": false, "disabledReason": null, "hidePriceOnDocuments": false, "ageRating": null, "isStockItem": true, "isStockTakingDisabled": false, "isCustomProduct": false, "hideJustInTimeItemsOnDocuments": false, "markAsSoldOut": false, "markAsInactive": false, "isRemainingQuantity": false, "isShippingCostsProduct": false, "discount": { "isDiscountProduct": false, "discountPercentage": 0 }, "unit": { "name": "Stk." }, "updatedAt": "2024-04-15T13:10:58+02:00" } } } } }, "application/vnd.xentral.default.v2-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "uuid": { "description": "UUID identifier of the resource.", "type": "string", "pattern": "^$|^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$", "example": "a00fd11e-3a67-433b-83c0-4e815fd4a0e1" }, "project": { "description": "An object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } }, "merchandiseGroup": { "description": "An optional object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "nullable": true, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } }, "name": { "type": "string", "description": "Name of the product." }, "standardSupplier": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "nullable": true, "x-example-ignore": true, "description": "Nullable resource identifier" } }, "description": "Reference to a standard supplier for this product", "nullable": true }, "description": { "type": "string", "nullable": true, "description": "Description of the product." }, "ean": { "type": "string", "nullable": true, "description": "EAN of the product." }, "stockCount": { "x-description-missing": true, "type": "number" }, "number": { "type": "string", "description": "Number / SKU of the product." }, "thumbnailUrl": { "type": "string", "nullable": true, "description": "URL of the product's thumbnail." }, "thumbnailId": { "type": "string", "nullable": true, "description": "ID of the product's thumbnail." }, "customsTariffNumber": { "type": "string", "nullable": true, "description": "Customs tariff number of the product." }, "countryOfOrigin": { "type": "string", "pattern": "[A-Z]{2}", "nullable": true, "description": "Two-digit ISO country code for country of origin of the product." }, "tags": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+" }, "key": { "x-description-missing": true, "type": "string" }, "name": { "x-description-missing": true, "type": "string" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "shortDescription": { "type": "string", "nullable": true, "description": "Short description of the product." }, "internalComment": { "type": "string", "description": "Text only for internal information." }, "minimumStorageQuantity": { "type": "number", "description": "Numerical minimum storage quantity of the product." }, "minimumOrderQuantity": { "type": "number", "description": "Numerical minimum order quantity of the product." }, "isMatrixProduct": { "type": "boolean", "description": "Shows if the product is a matrix product." }, "hasBatches": { "type": "boolean", "description": "Shows if the product has batches." }, "serialNumbersMode": { "type": "string", "description": "Shows one of the 4 different modes if the product has serial numbers or not and how they are handled. For more information about the different modes have a look into our handbook." }, "hasBestBeforeDate": { "type": "boolean", "description": "Shows if the product has a best before date." }, "allowPurchaseFromAllSuppliers": { "type": "boolean", "description": "Shows if the product can be purchased from all suppliers." }, "isStockTakingDisabled": { "type": "boolean", "description": "Shows if the product is used for stock taking." }, "ageRating": { "type": "string", "nullable": true, "description": "Shows if the product has an age rating. Currently only used for the shipping service provider DHL." }, "hasBillOfMaterials": { "type": "boolean", "description": "Shows if the product has a bill of materials." }, "isAssembledJustInTime": { "type": "boolean", "description": "Shows if the product is assembled just in time." }, "hideJustInTimeItemsOnDocuments": { "type": "boolean", "description": "Shows if the just in time items of the parts list are visible on documents." }, "isProductionProduct": { "type": "boolean", "description": "Shows if the product is made in production." }, "isExternallyProduced": { "type": "boolean", "description": "Shows if the product is externally produced." }, "isCustomProduct": { "type": "boolean", "description": "Shows if the product is a custom product." }, "hidePriceOnDocuments": { "type": "boolean", "description": "Shows if the price is hidden on documents." }, "isDisabled": { "type": "boolean", "description": "Shows if the product is locked." }, "disabledReason": { "type": "string", "nullable": true, "description": "Shows the reason why the product is locked when clicking into the product." }, "isDeleted": { "type": "boolean", "description": "Shows if the product is deleted." }, "regionOfOrigin": { "type": "string", "description": "Region where the product originates from." }, "unit": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" } }, "description": "Shows the name of the product unit." }, "measurements": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "width": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "height": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "length": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "weight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } }, "netWeight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } } } }, "manufacturer": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "nullable": true, "description": "Name of the manufacturer." }, "number": { "type": "string", "nullable": true, "description": "Product number at the manufacturer." }, "link": { "type": "string", "nullable": true, "description": "URI of the manufacturer." } } }, "isStockItem": { "type": "boolean", "description": "Shows if the product is a stock item." }, "salesTax": { "type": "string", "enum": [ "standard", "reduced", "free" ], "description": "Shows the sales tax of the product." }, "isShippingCostsProduct": { "type": "boolean", "description": "Determines if a product is used as a shipping costs product. For more information have a look into our handbook." }, "discount": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "isDiscountProduct": { "type": "boolean", "description": "Determines if a product is used as a discount. For more information have a look into our handbook." }, "discountPercentage": { "type": "number", "format": "float", "description": "Shows the discount value if the product is a discount. For more information have a look into our handbook." } } }, "salesChannel": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "description": { "type": "string" }, "meta": { "type": "object", "additionalProperties": false, "properties": { "title": { "type": "string" }, "description": { "type": "string" }, "keywords": { "type": "string" } } }, "isStockNumberSyncActive": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isSoldOut": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isRemainingQuantity": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "suggestedRetailPrice": { "type": "string", "format": "float", "nullable": true, "description": "Was earlier called shopPriceDisplay. Only used by some online shops. For more information have a look into our handbook." }, "isVisible": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] } } }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "values": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "sort": { "type": "integer" } } } } } } }, "selectedOptions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "values": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "sort": { "type": "integer" } } } } } } }, "variants": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } } } } }, "mainVariant": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a main variant of this product", "nullable": true }, "freeFields": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "name", "value" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string", "nullable": true }, "value": { "type": "string" } } } }, "isVariant": { "description": "Shows if the product is a variant from another product.", "type": "boolean", "nullable": true }, "variantOf": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a parent product", "nullable": true }, "categories": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp of when the product was updated." } } } } }, "examples": { "Shows information about a single product": { "value": { "data": { "id": "1", "uuid": "018a2690-647a-7a8b-b100-cfc11ab7d4e8", "name": "Screw M10x20", "description": null, "shortDescription": null, "number": "700001", "project": { "id": "1", "name": "Standard project" }, "merchandiseGroup": { "id": "2", "name": "Service" }, "categories": [ { "id": "1" } ], "standardSupplier": { "id": "7" }, "stockCount": 22, "ean": null, "manufacturer": { "name": null, "number": null, "link": null }, "customsTariffNumber": null, "isMatrixProduct": true, "options": [ { "id": "1", "name": "Color", "values": [ { "id": "1", "name": "blue", "sort": 1 }, { "id": "2", "name": "red", "sort": 2 } ] } ], "selectedOptions": [], "variants": [ { "id": "15", "options": [ { "id": "1" } ] }, { "id": "16", "options": [ { "id": "2" } ] } ], "isVariant": false, "variantOf": null, "mainVariant": { "id": "15" }, "thumbnailUrl": null, "thumbnailId": null, "tags": [], "freeFields": [], "countryOfOrigin": "DE", "regionOfOrigin": "", "internalComment": "", "isDeleted": false, "measurements": { "weight": { "value": 0, "unit": "kg" }, "netWeight": { "value": 0, "unit": "kg" }, "length": { "value": 0, "unit": "cm" }, "width": { "value": 0, "unit": "cm" }, "height": { "value": 0, "unit": "cm" } }, "minimumOrderQuantity": 0, "minimumStorageQuantity": 0, "salesTax": "reduced", "hasBatches": false, "serialNumbersMode": "disabled", "hasBestBeforeDate": false, "hasBillOfMaterials": false, "isAssembledJustInTime": false, "isProductionProduct": false, "isExternallyProduced": false, "allowPurchaseFromAllSuppliers": false, "isDisabled": false, "disabledReason": null, "hidePriceOnDocuments": false, "ageRating": null, "isStockItem": true, "isStockTakingDisabled": false, "isCustomProduct": false, "hideJustInTimeItemsOnDocuments": false, "isShippingCostsProduct": false, "discount": { "isDiscountProduct": false, "discountPercentage": 0 }, "salesChannel": { "description": "", "meta": { "title": "", "description": "", "keywords": "" }, "isStockNumberSyncActive": false, "isRemainingQuantity": false, "isSoldOut": false, "isVisible": true, "suggestedRetailPrice": "0.00" }, "unit": { "name": "abc" }, "updatedAt": "2024-04-15T13:10:58+02:00" } } } } }, "application/vnd.xentral.minimal.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "uuid": { "description": "UUID identifier of the resource.", "type": "string", "pattern": "^$|^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$", "example": "a00fd11e-3a67-433b-83c0-4e815fd4a0e1" }, "name": { "type": "string", "description": "Name of the product." } } } } }, "examples": { "Shows minimal information about a single product": { "value": { "data": { "id": "1", "uuid": "018a2690-647a-7a8b-b100-cfc11ab7d4e8", "name": "Screw M10x20" } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Product" ], "operationId": "product.update", "summary": "Update product", "description": "Updates details of a single product", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "Product update request payload", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Name of the product." }, "number": { "type": "string", "description": "Number / SKU of the product." }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "description": { "type": "string", "nullable": true, "description": "Description of the product." }, "internalComment": { "type": "string", "nullable": true, "description": "Text only for internal information." }, "shortDescription": { "type": "string", "nullable": true, "description": "Short description of the product." }, "customsTariffNumber": { "type": "string", "nullable": true, "description": "Customs tariff number of the product." }, "ean": { "type": "string", "nullable": true, "description": "EAN of the product." }, "minimumOrderQuantity": { "type": "number", "description": "Numerical minimum order quantity of the product." }, "minimumStorageQuantity": { "type": "number", "description": "Numerical minimum storage quantity of the product." }, "allowPurchaseFromAllSuppliers": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hasBatches": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "serialNumbersMode": { "type": "string", "enum": [ "disabled", "user", "product", "productAndWarehouse" ], "description": "4 different modes available if the product has serial numbers or not and how they are handled. For more information about the different modes have a look into our handbook." }, "hasBestBeforeDate": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hasBillOfMaterials": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isAssembledJustInTime": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isProductionProduct": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isExternallyProduced": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isDisabled": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "disabledReason": { "type": "string", "nullable": true, "description": "Shows the reason why the product is locked when clicking into the product." }, "hidePriceOnDocuments": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "ageRating": { "type": "string", "enum": [ "", "16", "18" ], "nullable": true, "description": "Sets an age rating for the product. Currently only used for the shipping service provider DHL." }, "countryOfOrigin": { "type": "string", "pattern": "[A-Z]{2}", "nullable": true, "description": "Two-digit ISO country code for country of origin of the product." }, "regionOfOrigin": { "type": "string", "enum": [ "", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "99" ], "description": "01 - Schleswig-Holstein, 02 - Hamburg, 03 - Niedersachsen, 04 - Bremen, 05 - Nordhrein-Westfalen, 06 - Hessen, 07 - Rheinland-Pfalz, 08 - Baden-Württemberg, 09 - Bayern, 10 - Saarland, 11 - Berlin, 12 - Brandenburg, 13 - Mecklenburg-Vorpommern, 14 - Sachsen, 15 - Sachsen-Anhalt, 16 - Thüringen, 99 - foreign origin", "nullable": true }, "measurements": { "type": "object", "additionalProperties": false, "properties": { "width": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "height": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "length": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "weight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } }, "netWeight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } } } }, "manufacturer": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "nullable": true, "description": "Name of the manufacturer." }, "number": { "type": "string", "nullable": true, "description": "Product number at the manufacturer." }, "link": { "type": "string", "nullable": true, "description": "URI of the manufacturer." } } }, "isStockItem": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isStockTakingDisabled": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hideJustInTimeItemsOnDocuments": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "salesTax": { "type": "string", "enum": [ "standard", "reduced", "free" ], "description": "Selection of three possible values for the sales tax of the product." }, "shopPriceDisplay": { "type": "string", "format": "float", "nullable": true, "description": "Only used by some online shops. For more information have a look into our handbook." }, "isShippingCostsProduct": { "type": "boolean", "description": "Determines if a product is used as a shipping costs product. For more information have a look into our handbook." }, "discount": { "type": "object", "additionalProperties": false, "properties": { "isDiscountProduct": { "type": "boolean", "description": "Determines if a product is used as a discount. For more information have a look into our handbook." }, "discountPercentage": { "type": "number", "format": "float", "description": "Sets the discount value if the product is a discount. For more information have a look into our handbook." } } }, "isMatrixProduct": { "type": "boolean", "description": "Determines if a product is a matrix product. For more information have a look into our handbook." }, "category": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "standardSupplier": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "nullable": true, "x-example-ignore": true, "description": "Nullable resource identifier" } }, "description": "Reference to a standard supplier for this product", "nullable": true }, "freeFields": { "type": "array", "nullable": true, "items": { "type": "object", "additionalProperties": false, "required": [ "id", "value" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "value": { "x-description-missing": true, "type": "string" } } } }, "options": { "type": "array", "nullable": true, "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "sort": { "nullable": true, "type": "integer" } } } } } } }, "selectedOptions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "option": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } } } }, "tags": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "description": "Either ID or name and key." }, "key": { "x-description-missing": true, "type": "string" }, "name": { "x-description-missing": true, "type": "string" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "variantOf": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a parent product", "nullable": true } } }, "examples": { "Update Product": { "value": { "name": "Test Product Beverage", "description": "This is a very long description for the Test Product Beverage.", "shortDescription": "This is a short description.", "project": { "id": "7" }, "category": { "id": "1001" }, "customsTariffNumber": "12345678", "ean": "1234567890", "internalComment": "Attention: Only available for customers over the age of 18.", "minimumOrderQuantity": 100, "minimumStorageQuantity": 30, "allowPurchaseFromAllSuppliers": false, "hidePriceOnDocuments": false, "hasBatches": true, "serialNumbersMode": "disabled", "hasBestBeforeDate": true, "hasBillOfMaterials": false, "isAssembledJustInTime": false, "isProductionProduct": false, "isExternallyProduced": false, "isDisabled": false, "countryOfOrigin": "DE", "regionOfOrigin": "01", "salesTax": "standard", "isStockItem": true, "manufacturer": { "name": "Beverage Manufacturer", "number": "BM#1", "link": "https://example.com" }, "ageRating": "18", "freeFields": [ { "id": "8", "value": "FF8" } ], "variantOf": { "id": "1336" } } } } }, "application/vnd.xentral.default.v2-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Name of the product." }, "number": { "type": "string", "description": "Number / SKU of the product." }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "description": { "type": "string", "nullable": true, "description": "Description of the product." }, "internalComment": { "type": "string", "nullable": true, "description": "Text only for internal information." }, "shortDescription": { "type": "string", "nullable": true, "description": "Short description of the product." }, "customsTariffNumber": { "type": "string", "nullable": true, "description": "Customs tariff number of the product." }, "ean": { "type": "string", "nullable": true, "description": "EAN of the product" }, "minimumOrderQuantity": { "type": "number", "description": "Numerical minimum order quantity of the product." }, "minimumStorageQuantity": { "type": "number", "description": "Numerical minimum storage quantity of the product." }, "allowPurchaseFromAllSuppliers": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hasBatches": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "serialNumbersMode": { "type": "string", "enum": [ "disabled", "user", "product", "productAndWarehouse" ], "description": "4 different modes available if the product has serial numbers or not and how they are handled. For more information about the different modes have a look into our handbook." }, "hasBestBeforeDate": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hasBillOfMaterials": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isAssembledJustInTime": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isProductionProduct": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isExternallyProduced": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isDisabled": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "disabledReason": { "type": "string", "nullable": true, "description": "Shows the reason why the product is locked when clicking into the product." }, "hidePriceOnDocuments": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "ageRating": { "type": "string", "enum": [ "", "16", "18" ], "nullable": true, "description": "Sets an age rating for the product. Currently only used for the shipping service provider DHL." }, "countryOfOrigin": { "type": "string", "pattern": "[A-Z]{2}", "nullable": true, "description": "Two-digit ISO country code for country of origin of the product." }, "regionOfOrigin": { "type": "string", "enum": [ "", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "99" ], "description": "01 - Schleswig-Holstein, 02 - Hamburg, 03 - Niedersachsen, 04 - Bremen, 05 - Nordhrein-Westfalen, 06 - Hessen, 07 - Rheinland-Pfalz, 08 - Baden-Württemberg, 09 - Bayern, 10 - Saarland, 11 - Berlin, 12 - Brandenburg, 13 - Mecklenburg-Vorpommern, 14 - Sachsen, 15 - Sachsen-Anhalt, 16 - Thüringen, 99 - foreign origin", "nullable": true }, "measurements": { "type": "object", "additionalProperties": false, "properties": { "width": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "height": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "length": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "cm" ], "description": "Currently only cm as unit allowed." } } }, "weight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } }, "netWeight": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "number", "format": "float" }, "unit": { "type": "string", "enum": [ "kg" ], "description": "Currently only kg as unit allowed." } } } } }, "manufacturer": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "nullable": true, "description": "Name of the manufacturer." }, "number": { "type": "string", "nullable": true, "description": "Product number at the manufacturer." }, "link": { "type": "string", "nullable": true, "description": "URI of the manufacturer." } } }, "isStockItem": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isStockTakingDisabled": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "hideJustInTimeItemsOnDocuments": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "salesTax": { "type": "string", "enum": [ "standard", "reduced", "free" ], "description": "Selection of three possible values for the sales tax of the product." }, "shopPriceDisplay": { "type": "string", "format": "float", "nullable": true, "description": "Only used by some online shops. For more information have a look into our handbook." }, "isShippingCostsProduct": { "type": "boolean", "description": "Determines if a product is used as a shipping costs product. For more information have a look into our handbook." }, "isVisibleInOnlineShops": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "isMatrixProduct": { "type": "boolean", "description": "Determines if a product is a matrix product. For more information have a look into our handbook." }, "discount": { "type": "object", "additionalProperties": false, "properties": { "isDiscountProduct": { "type": "boolean", "description": "Determines if a product is used as a discount. For more information have a look into our handbook." }, "discountPercentage": { "type": "number", "format": "float", "description": "Sets the discount value if the product is a discount. For more information have a look into our handbook." } } }, "merchandiseGroup": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "categories": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } }, "example": [ { "id": "1" }, { "id": "2" } ] }, "standardSupplier": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "nullable": true, "x-example-ignore": true, "description": "Nullable resource identifier" } }, "description": "Reference to a standard supplier for this product", "nullable": true }, "freeFields": { "type": "array", "nullable": true, "items": { "type": "object", "additionalProperties": false, "required": [ "id", "value" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "value": { "x-description-missing": true, "type": "string" } } } }, "options": { "type": "array", "nullable": true, "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "values": { "type": "array", "nullable": true, "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "sort": { "nullable": true, "type": "integer" } } } } } } }, "selectedOptions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "option": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } } } }, "tags": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "description": "Either ID or name and key." }, "key": { "x-description-missing": true, "type": "string" }, "name": { "x-description-missing": true, "type": "string" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "variantOf": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a parent product", "nullable": true } } }, "examples": { "Update Product": { "value": { "name": "Test Product Beverage", "description": "This is a very long description for the Test Product Beverage.", "shortDescription": "This is a short description.", "project": { "id": "7" }, "merchandiseGroup": { "id": "2001" }, "customsTariffNumber": "12345678", "ean": "1234567890", "internalComment": "Attention: Only available for customers over the age of 18.", "minimumOrderQuantity": 100, "minimumStorageQuantity": 30, "allowPurchaseFromAllSuppliers": false, "hidePriceOnDocuments": false, "hasBatches": true, "serialNumbersMode": "disabled", "hasBestBeforeDate": true, "hasBillOfMaterials": false, "isAssembledJustInTime": false, "isProductionProduct": false, "isExternallyProduced": false, "isDisabled": false, "countryOfOrigin": "DE", "regionOfOrigin": "01", "salesTax": "standard", "isStockItem": true, "manufacturer": { "name": "Beverage Manufacturer", "number": "BM#1", "link": "https://example.com" }, "ageRating": "18", "freeFields": [ { "id": "8", "value": "FF8" } ], "variantOf": { "id": "1336" } } } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "409": { "description": "Request conflict with the current state of the target resource", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "delete": { "tags": [ "Product" ], "operationId": "product.delete", "summary": "Delete product", "description": "Deletes a single product", "requestBody": { "content": { "application/vnd.xentral.default.v1": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } }, "application/vnd.xentral.force.v1": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "204": { "description": "Operation completed successfully, no response body" }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "409": { "description": "Request conflict with the current state of the target resource", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "429": { "description": "Too many API calls made." } } } }, "/api/products/{id}/media": { "get": { "tags": [ "Product" ], "operationId": "product.listMedia", "summary": "[EARLY ACCESS] View media", "description": "Returns a list of given Products' Media", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "title": { "x-description-missing": true, "type": "string", "nullable": true }, "description": { "x-description-missing": true, "type": "string", "nullable": true }, "keyword": { "x-description-missing": true, "type": "string", "nullable": true }, "sort": { "x-description-missing": true, "type": "integer" }, "currentVersion": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "version": { "type": "integer" }, "url": { "type": "string" }, "remark": { "type": "string", "nullable": true }, "filename": { "type": "string" }, "size": { "type": "integer" }, "updatedAt": { "type": "string", "format": "date-time" } } }, "updatedAt": { "x-description-missing": true, "type": "string", "format": "date-time" } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } }, "examples": { "Lists all product media": { "value": { "data": [ { "id": "5", "product": { "id": "1" }, "title": "", "description": "", "keyword": "defaultImage", "sort": 1, "currentVersion": { "id": "17", "version": 3, "url": "/api/productMedia/5/versions/3", "remark": "Initial Version", "filename": "test.png", "size": 12345, "updatedAt": "2024-02-16T14:32:41+02:00" }, "updatedAt": "2024-02-16T14:32:41+02:00" }, { "id": "6", "product": { "id": "1" }, "title": "", "description": "", "keyword": "printImage", "sort": 2, "currentVersion": { "id": "16", "version": 2, "url": "/api/productMedia/6/versions/2", "remark": "Initial Version", "filename": "test.png", "size": 12345, "updatedAt": "2024-02-16T14:32:41+02:00" }, "updatedAt": "2024-02-16T14:32:41+02:00" } ], "extra": { "totalCount": 2, "page": { "number": 1, "size": 10 } } } } } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/products/{id}/purchasePrices": { "get": { "tags": [ "Product" ], "operationId": "product.listPurchasePrices", "summary": "View purchase prices", "description": "Returns a list of given Products' PurchasePrices", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "amount", "priceAmount", "supplier", "supplierName" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "amount": { "x-description-missing": true, "type": "integer" }, "supplier": { "description": "An object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } }, "price": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } } } } }, "extra": { "type": "object", "required": [ "page" ], "additionalProperties": false, "description": "Pagination data from the current request.", "properties": { "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "type": "integer" }, "size": { "type": "integer" } }, "example": { "number": 1, "size": 10 } } }, "example": { "page": { "number": 1, "size": 10 } } } } }, "examples": { "Lists all purchase prices for given product": { "value": { "data": [ { "id": "15", "amount": 1, "supplier": { "id": "7", "name": "Thilo Altmann-Meyer" }, "price": { "amount": "1.00000000", "currency": "EUR" } }, { "id": "7", "amount": 100, "supplier": { "id": "7", "name": "Thilo Altmann-Meyer" }, "price": { "amount": "0.80000000", "currency": "EUR" } } ], "extra": { "page": { "number": 1, "size": 10 } } } } } } } }, "429": { "description": "Too many API calls made." } } } }, "/api/products/{id}/salesPrices": { "get": { "tags": [ "Product" ], "operationId": "product.listSalesPrices", "summary": "View sales prices", "description": "Returns a list of given Products' SalesPrices", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "amount", "priceAmount", "customer", "customerName" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "x-description-missing": true, "type": "string" }, "validFrom": { "x-description-missing": true, "type": "string", "format": "date", "nullable": true }, "expiresAt": { "x-description-missing": true, "type": "string", "format": "date", "nullable": true }, "amount": { "x-description-missing": true, "type": "integer" }, "customer": { "description": "An optional object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "nullable": true, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } }, "customerGroup": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "nullable": true, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "reference": { "type": "string" } } }, "price": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } } } } }, "extra": { "type": "object", "required": [ "page" ], "additionalProperties": false, "description": "Pagination data from the current request.", "properties": { "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "type": "integer" }, "size": { "type": "integer" } }, "example": { "number": 1, "size": 10 } } }, "example": { "page": { "number": 1, "size": 10 } } } } }, "examples": { "Lists all sales prices for a given product": { "value": { "data": [ { "id": "2", "customer": { "id": "7", "name": "Thilo Altmann-Meyer" }, "customerGroup": null, "validFrom": "2024-04-01", "expiresAt": "2024-04-30", "amount": 1, "price": { "amount": "0.16000000", "currency": "EUR" } }, { "id": "17", "customer": null, "customerGroup": null, "validFrom": null, "expiresAt": "2024-12-12", "amount": 10, "price": { "amount": "3.00000000", "currency": "CHF" } }, { "id": "16", "customer": null, "customerGroup": null, "validFrom": "2025-01-01", "expiresAt": null, "amount": 10, "price": { "amount": "3.00000000", "currency": "CHF" } } ], "extra": { "page": { "number": 1, "size": 10 } } } } } } } }, "429": { "description": "Too many API calls made." } } } }, "/api/products/{id}/purchaseOrdersPositions": { "get": { "tags": [ "Product" ], "operationId": "product.listPurchaseOrdersPositions", "summary": "View purchase orders positions", "description": "Returns a list of given Products' positions in PurchaseOrders", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "amount", "deliveryDate", "order", "orderDate", "orderNumber", "supplier", "supplierName" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "number": { "x-description-missing": true, "type": "string" }, "date": { "x-description-missing": true, "type": "string" }, "amount": { "x-description-missing": true, "type": "string", "format": "float" }, "deliveredAmount": { "x-description-missing": true, "type": "string", "format": "float" }, "deliveryDate": { "x-description-missing": true, "type": "string", "format": "date" }, "isInstantDelivery": { "x-description-missing": true, "type": "boolean" }, "purchaseOrder": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "number": { "type": "string" }, "deliveryDate": { "type": "string", "format": "date" }, "supplier": { "description": "An object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } } } } } } }, "extra": { "type": "object", "required": [ "page" ], "additionalProperties": false, "description": "Pagination data from the current request.", "properties": { "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "type": "integer" }, "size": { "type": "integer" } }, "example": { "number": 1, "size": 10 } } }, "example": { "page": { "number": 1, "size": 10 } } } } }, "examples": { "Lists all purchase order positions with given product": { "value": { "data": [ { "id": "9", "amount": "8", "deliveredAmount": "0", "deliveryDate": "2024-04-12", "isInstantDelivery": true, "purchaseOrder": { "id": "5", "number": "", "deliveryDate": "2024-04-12", "supplier": { "id": "7", "name": "Thilo Altmann-Meyer" } } }, { "id": "8", "amount": "8", "deliveredAmount": "0", "deliveryDate": "2024-03-24", "isInstantDelivery": true, "purchaseOrder": { "id": "4", "number": "", "deliveryDate": "2024-03-24", "supplier": { "id": "7", "name": "Thilo Altmann-Meyer" } } }, { "id": "6", "amount": "10.5", "deliveredAmount": "0", "deliveryDate": "2024-03-24", "isInstantDelivery": true, "purchaseOrder": { "id": "3", "number": "", "deliveryDate": "2024-03-27", "supplier": { "id": "7", "name": "Thilo Altmann-Meyer" } } }, { "id": "4", "amount": "100", "deliveredAmount": "0", "deliveryDate": "2024-03-16", "isInstantDelivery": true, "purchaseOrder": { "id": "2", "number": "100001", "deliveryDate": "2022-03-16", "supplier": { "id": "7", "name": "Thilo Altmann-Meyer" } } } ], "extra": { "page": { "number": 1, "size": 10 } } } } } } } }, "429": { "description": "Too many API calls made." } } } }, "/api/products/{id}/salesOrdersPositions": { "get": { "tags": [ "Product" ], "operationId": "product.listSalesOrdersPositions", "summary": "View sales orders positions", "description": "Returns a list of given Products' positions in SalesOrders", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "amount", "customer", "customerName", "order", "orderNumber", "orderStatus" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "amount": { "x-description-missing": true, "type": "string", "format": "float" }, "salesOrder": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "number": { "type": "string" }, "status": { "type": "string" }, "date": { "type": "string", "format": "date" }, "customer": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "number": { "type": "string" }, "date": { "type": "string", "format": "date" } } } } } } } }, "extra": { "type": "object", "required": [ "page" ], "additionalProperties": false, "description": "Pagination data from the current request.", "properties": { "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "type": "integer" }, "size": { "type": "integer" } }, "example": { "number": 1, "size": 10 } } }, "example": { "page": { "number": 1, "size": 10 } } } } }, "examples": { "Lists all sales order positions with given product": { "value": { "data": [ { "id": "22", "amount": "10", "salesOrder": { "id": "4", "number": "200003", "status": "freigegeben", "customer": { "id": "5", "name": "Lisbeth Lange", "number": "75" } } }, { "id": "16", "amount": "40", "salesOrder": { "id": "1", "number": "200000", "status": "freigegeben", "customer": { "id": "3", "name": "Dominik Scheffler B.A.", "number": "76146" } } }, { "id": "4", "amount": "20", "salesOrder": { "id": "3", "number": "200002", "status": "freigegeben", "customer": { "id": "5", "name": "Lisbeth Lange", "number": "75" } } }, { "id": "10", "amount": "4", "salesOrder": { "id": "2", "number": "200001", "status": "freigegeben", "customer": { "id": "4", "name": "Nicolas Pape", "number": "40000" } } } ], "extra": { "page": { "number": 1, "size": 10 } } } } } } } }, "429": { "description": "Too many API calls made." } } } }, "/api/products/{id}/productionsPositions": { "get": { "tags": [ "Product" ], "operationId": "product.listProductionsPositions", "summary": "View productions positions", "description": "Returns a list of given Products' positions in Productions", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "amount" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "amount": { "x-description-missing": true, "type": "string", "format": "float" }, "product": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } }, "production": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "number": { "type": "string" }, "status": { "type": "string" }, "customer": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } } } } } } } }, "extra": { "type": "object", "required": [ "page" ], "additionalProperties": false, "description": "Pagination data from the current request.", "properties": { "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "type": "integer" }, "size": { "type": "integer" } }, "example": { "number": 1, "size": 10 } } }, "example": { "page": { "number": 1, "size": 10 } } } } }, "examples": { "Lists all production positions with given product": { "value": { "data": [ { "id": "1", "amount": "1000", "product": { "id": "1" }, "production": { "id": "1", "number": "2024-400000", "status": "freigegeben", "customer": { "id": "4", "name": "Nicolas Pape" } } } ], "extra": { "page": { "number": 1, "size": 10 } } } } } } } }, "429": { "description": "Too many API calls made." } } } }, "/api/products/{id}/properties": { "get": { "tags": [ "Product" ], "operationId": "product.listProperties", "summary": "View properties", "description": "Returns a list of given Products' Properties", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "name", "value", "unit" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "property": { "description": "An object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } }, "value": { "x-description-missing": true, "type": "string" }, "unit": { "x-description-missing": true, "type": "string", "nullable": true } } } }, "extra": { "type": "object", "required": [ "page" ], "additionalProperties": false, "description": "Pagination data from the current request.", "properties": { "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "type": "integer" }, "size": { "type": "integer" } }, "example": { "number": 1, "size": 10 } } }, "example": { "page": { "number": 1, "size": 10 } } } } }, "examples": { "Lists all properties of given product": { "value": { "data": [ { "id": "1", "property": { "id": "1", "name": "Color" }, "value": "blue", "unit": null } ], "extra": { "page": { "number": 1, "size": 10 } } } } } } } }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Product" ], "operationId": "product.updateProperties", "summary": "Update properties", "description": "Update Properties of a single product", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "property": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "name": { "x-description-missing": true, "type": "string" }, "unit": { "x-description-missing": true, "type": "string", "nullable": true }, "value": { "x-description-missing": true, "type": "string" } } } }, "examples": { "Update property by id": { "value": [ { "id": "17", "value": "green" } ] } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "429": { "description": "Too many API calls made." } } } }, "/api/products/{id}/reservations": { "get": { "tags": [ "Product" ], "operationId": "product.listReservations", "summary": "View reservations", "description": "Returns a list of given Products' Reservations", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "amount", "customer", "customerName" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "amount": { "x-description-missing": true, "type": "string", "format": "float" }, "reason": { "x-description-missing": true, "type": "string" }, "project": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "reference": { "type": "string" } } }, "customer": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "number": { "type": "string" } } } } } }, "extra": { "type": "object", "required": [ "page" ], "additionalProperties": false, "description": "Pagination data from the current request.", "properties": { "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "type": "integer" }, "size": { "type": "integer" } }, "example": { "number": 1, "size": 10 } } }, "example": { "page": { "number": 1, "size": 10 } } } } }, "examples": { "Lists all reservations for given product": { "value": { "data": [ { "id": "1301", "amount": "10", "reason": "R1", "project": { "id": "1", "reference": "" }, "customer": { "id": "1201", "name": "Tom Schneider", "number": "155780" } } ], "extra": { "page": { "number": 1, "size": 10 } } } } } } } }, "429": { "description": "Too many API calls made." } } } }, "/api/products/{id}/parts": { "get": { "tags": [ "Product" ], "operationId": "product.listParts", "summary": "View parts", "description": "Returns a list of given Products' Parts", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "product", "productName", "amount" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "amount": { "x-description-missing": true, "type": "string", "format": "float" }, "product": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "number": { "type": "string" } } } } } }, "extra": { "type": "object", "required": [ "page" ], "additionalProperties": false, "description": "Pagination data from the current request.", "properties": { "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "type": "integer" }, "size": { "type": "integer" } }, "example": { "number": 1, "size": 10 } } }, "example": { "page": { "number": 1, "size": 10 } } } } }, "examples": { "Lists all parts of a given product": { "value": { "data": [ { "id": "1301", "amount": "2.0000", "product": { "id": "1102", "name": "Fabric", "number": "346532" } } ], "extra": { "page": { "number": 1, "size": 10 } } } } } } } }, "429": { "description": "Too many API calls made." } } }, "post": { "tags": [ "Product" ], "operationId": "product.createParts", "summary": "Create new parts for product", "description": "Creates new parts for a product.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "part": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "amount": { "type": "number", "format": "float", "description": "Sets the amount for how many times the product is included" } } } }, "examples": { "Create parts for product": { "value": [ { "part": { "id": "17" }, "amount": 1 }, { "part": { "id": "18" }, "amount": 2 } ] } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Product" ], "operationId": "product.updateParts", "summary": "Update parts of a product", "description": "Updates the parts of a product.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "amount": { "type": "number", "format": "float", "description": "Sets the amount for how many times the product is included" } } } }, "examples": { "Update parts of product": { "value": [ { "id": "17", "amount": 1 } ] } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "429": { "description": "Too many API calls made." } } }, "delete": { "tags": [ "Product" ], "operationId": "product.deleteParts", "summary": "Deletes parts of a product", "description": "Deletes the parts of a product.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "404": { "description": "Resource was not found or not enough access privileges" }, "429": { "description": "Too many API calls made." } } } }, "/api/products/{id}/storageLocations": { "get": { "tags": [ "Product" ], "operationId": "product.storageLocations", "summary": "View storage locations", "description": "Returns a list of given Products' warehouses entries", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "amount", "warehouse", "warehouseName" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "amount": { "x-description-missing": true, "type": "string", "format": "float" }, "product": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } }, "storageLocation": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "warehouse": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } } } } } } } }, "extra": { "type": "object", "required": [ "page" ], "additionalProperties": false, "description": "Pagination data from the current request.", "properties": { "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "type": "integer" }, "size": { "type": "integer" } }, "example": { "number": 1, "size": 10 } } }, "example": { "page": { "number": 1, "size": 10 } } } } } } } }, "404": { "description": "Resource was not found or not enough access privileges" }, "429": { "description": "Too many API calls made." } } } }, "/api/products/{id}/crossSelling": { "get": { "tags": [ "Product" ], "operationId": "product.listCrossSelling", "summary": "List cross selling of a product", "description": "Returns a list of product's cross-selling products", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "productId", "productName", "productNumber", "type", "salesChannelId", "sort" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "active": { "type": "boolean", "description": "Shows if the cross selling relation is active." }, "assignToEachOther": { "type": "boolean", "description": "Shows if the selected products are assigned to each other. For more information have a look into our handbook." }, "type": { "type": "number", "description": "Shows the type of the cross selling product. 1 means similar product, 2 means accessory. For more information have a look into our handbook." }, "salesChannel": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "nullable": true, "x-example-ignore": true, "description": "Nullable resource identifier" } }, "description": "Reference to an external sales channel AKA online shop", "nullable": true }, "sort": { "type": "number", "description": "Sorting order of the cross selling entries. 0 means automatically." }, "note": { "type": "string", "nullable": true, "description": "Internal note." }, "product": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "number": { "type": "string" } } } } } }, "extra": { "type": "object", "required": [ "page" ], "additionalProperties": false, "description": "Pagination data from the current request.", "properties": { "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "type": "integer" }, "size": { "type": "integer" } }, "example": { "number": 1, "size": 10 } } }, "example": { "page": { "number": 1, "size": 10 } } } } }, "examples": { "Lists all cross selling relations of given product": { "value": { "data": [ { "id": "1111", "product": { "id": "1102", "name": "Second", "number": "346532" }, "active": true, "assignToEachOther": false, "type": 1, "salesChannel": null, "sort": 1, "note": "just a note" } ], "extra": { "page": { "number": 1, "size": 10 } } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "post": { "tags": [ "Product" ], "operationId": "product.createCrossSellingProducts", "summary": "Create new cross selling for a product", "description": "Creates new cross selling for a product.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "product" ], "properties": { "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "active": { "type": "boolean", "default": true, "description": "Determines if the cross selling relation is active." }, "assignToEachOther": { "type": "boolean", "default": false, "description": "Determines if the selected products are assigned to each other. For more information have a look into our handbook." }, "type": { "type": "number", "enum": [ 1, 2 ], "default": 1, "description": "Determines the type of the cross selling product. 1 means similar product, 2 means accessory. For more information have a look into our handbook." }, "salesChannel": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "nullable": true, "x-example-ignore": true, "description": "Nullable resource identifier" } }, "description": "Reference to an external sales channel AKA online shop", "nullable": true }, "sort": { "type": "number", "default": 0, "description": "Sorting order of the cross selling entries. 0 means automatically." }, "note": { "type": "string", "nullable": true, "description": "Internal note." } } } }, "examples": { "Create cross selling for product": { "value": [ { "product": { "id": "17" }, "active": false, "assignToEachOther": false, "type": 1, "salesChannel": { "id": "17" }, "sort": 0, "note": "A sample note for the cross selling association" } ] } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "409": { "description": "Request conflict with the current state of the target resource", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Product" ], "operationId": "product.updateCrossSellingProducts", "summary": "Update cross selling of a product", "description": "Updates cross selling products of a product.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "active": { "type": "boolean", "description": "Determines if the cross selling relation is active." }, "assignToEachOther": { "type": "boolean", "description": "Determines if the selected products are assigned to each other. For more information have a look into our handbook." }, "type": { "type": "number", "enum": [ 1, 2 ], "description": "Determines the type of the cross selling product. 1 means similar product, 2 means accessory. For more information have a look into our handbook." }, "salesChannel": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "nullable": true, "x-example-ignore": true, "description": "Nullable resource identifier" } }, "description": "Reference to an external sales channel AKA online shop", "nullable": true }, "sort": { "type": "number", "description": "Sorting order of the cross selling entries. 0 means automatically." }, "note": { "type": "string", "nullable": true, "description": "Internal note." } } } }, "examples": { "Update cross selling for product": { "value": [ { "id": "17", "active": false, "assignToEachOther": true, "type": 1, "salesChannel": { "id": "17" }, "sort": 0, "note": "A sample note for the cross selling association" } ] } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "409": { "description": "Request conflict with the current state of the target resource", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "delete": { "tags": [ "Product" ], "operationId": "product.deleteCrossSelling", "summary": "Delete cross selling of a product", "description": "Deletes cross selling items of a product.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "409": { "description": "Request conflict with the current state of the target resource", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/products/{id}/options": { "get": { "tags": [ "Product" ], "operationId": "product.listOptions", "summary": "View options of a product", "description": "Returns a list of product's options", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "name", "sort" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "x-description-missing": true, "type": "string" }, "sort": { "x-description-missing": true, "type": "integer" }, "createdAt": { "x-description-missing": true, "type": "string", "format": "date-time" } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } }, "examples": { "Lists all options of a given product": { "value": { "data": [ { "id": "1", "name": "Color", "sort": 0, "createdAt": "2024-04-08T11:45:12+02:00" } ], "extra": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "post": { "tags": [ "Product" ], "operationId": "product.createOption", "summary": "Creates new option for a product", "description": "Creates new option for a product.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "name" ], "properties": { "sort": { "type": "number", "default": 0, "description": "Sorting order of the option" }, "name": { "type": "string", "description": "Name of the option" } } }, "examples": { "Create option for product": { "value": { "name": "Color" } } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Product" ], "operationId": "product.updateMultipleOptions", "summary": "Update multiple options of a product", "description": "Updates multiple options of a product.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "sort": { "type": "number", "description": "Sorting order of the option" }, "name": { "type": "string", "description": "Name of the option" } } } }, "examples": { "Update options for product": { "value": [ { "id": "17", "name": "Color" }, { "id": "18", "name": "Size" } ] } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "delete": { "tags": [ "Product" ], "operationId": "product.deleteMultipleOptions", "summary": "Deletes multiple options of a product", "description": "Deletes multiple options of a product.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/products/{id}/actions/createVariants": { "post": { "tags": [ "Product" ], "operationId": "product.createVariants", "summary": "Creates variants for a matrix product", "description": "Creates variants for a matrix product", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "mode", "variants" ], "properties": { "variants": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "options" ], "properties": { "options": { "description": "...", "allOf": [ { "type": "array", "items": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } } } ] } } } }, "mode": { "type": "string", "enum": [ "1", "2", "3", "4" ], "description": "1: Use item numbers from number range of merchandise group.\n2: Add product numbers from options to the main number.\n3: Create product numbers from the main number and the appendix to product numbers. No additional separators.\n4: Product numbers of main products with suffix." }, "prefixSeparator": { "type": "string", "description": "Separator of prefix (applicable to mode 4 only)" }, "prefixDigits": { "type": "integer", "description": "Number of digits of prefix (applicable to mode 4 only)" }, "prefixNextNumber": { "type": "string", "pattern": "\\d+", "description": "Next number of prefix (applicable to mode 4 only)" }, "appendOptionsToDescription": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "createAdditionalDescription": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] } } }, "examples": { "Create 2 variants": { "value": { "mode": "1", "variants": [ { "options": [ { "id": "2" }, { "id": "5" } ] }, { "options": [ { "id": "3" }, { "id": "6" } ] } ], "prefixSeparator": "_", "prefixDigits": 3, "prefixNextNumber": "001", "appendOptionsToDescription": true, "createAdditionalDescription": true } } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/productsCategories": { "get": { "tags": [ "Product Category" ], "operationId": "productCategory.list", "summary": "Lists available products categories", "description": "Lists all available products categories.", "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string", "description": "Name of the product category" }, "parent": { "description": "An optional object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "nullable": true, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } } } } } } }, "examples": { "Lists all product categories": { "value": { "data": [ { "id": "5", "name": "Candy", "parent": { "id": "3", "name": "Food" } }, { "id": "3", "name": "Food", "parent": null }, { "id": "4", "name": "Gardening", "parent": null }, { "id": "6", "name": "Plants", "parent": { "id": "4", "name": "Gardening" } }, { "id": "8", "name": "Repair", "parent": { "id": "2", "name": "Services" } }, { "id": "2", "name": "Services", "parent": null }, { "id": "7", "name": "Tools", "parent": { "id": "4", "name": "Gardening" } } ] } } } }, "application/vnd.xentral.hierarchy.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string", "description": "Name of the product category" }, "parent": { "description": "An optional object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "nullable": true, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } }, "children": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "parent": { "description": "An optional object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "nullable": true, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } }, "children": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "parent": { "description": "An optional object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "nullable": true, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } }, "children": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "parent": { "description": "An optional object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "nullable": true, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } }, "children": { "type": "array", "items": { "type": "object", "description": "Categories nested indefinitely." } } } } } } } } } } } } }, "description": "Nested categories." } } }, "examples": { "Lists all product categories in hierarchical order": { "value": { "data": [ { "id": "3", "name": "Food", "parent": null, "children": [ { "id": "5", "name": "Candy", "parent": { "id": "3", "name": "Food" }, "children": [] } ] }, { "id": "4", "name": "Gardening", "parent": null, "children": [ { "id": "6", "name": "Plants", "parent": { "id": "4", "name": "Gardening" }, "children": [] }, { "id": "7", "name": "Tools", "parent": { "id": "4", "name": "Gardening" }, "children": [] } ] }, { "id": "2", "name": "Services", "parent": null, "children": [ { "id": "8", "name": "Repair", "parent": { "id": "2", "name": "Services" }, "children": [] } ] } ] } } } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "post": { "tags": [ "Product Category" ], "operationId": "productCategory.create", "summary": "Create new product category", "description": "Creates a new product category.", "parameters": [], "requestBody": { "description": "Product category create request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "parent": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } } } }, "examples": { "create ProductCategory payload": { "value": { "name": "Computers", "parent": { "id": "1024" } } } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "409": { "description": "Request conflict with the current state of the target resource", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/productsCategories/{id}": { "get": { "tags": [ "Product Category" ], "operationId": "productCategory.view", "summary": "View a single product category", "description": "Returns details of a single product category", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string", "description": "Name of the product category" }, "parent": { "description": "An optional object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "nullable": true, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } } } } } }, "examples": { "Shows a single product category": { "value": { "data": { "id": "3", "name": "Food", "parent": null } } } } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Product Category" ], "operationId": "productCategory.update", "summary": "Update a single product category", "description": "Updates details of a single product category", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "Product category update request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "parent": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } } } }, "examples": { "create ProductCategory payload": { "value": { "name": "Computers", "parent": { "id": "1024" } } } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "404": { "description": "Resource was not found or not enough access privileges" }, "409": { "description": "Request conflict with the current state of the target resource", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "429": { "description": "Too many API calls made." } } }, "delete": { "tags": [ "Product Category" ], "operationId": "productCategory.delete", "summary": "Delete a single product category", "description": "Deletes a single product", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "204": { "description": "Operation completed successfully, no response body" }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "409": { "description": "Request conflict with the current state of the target resource", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "429": { "description": "Too many API calls made." } } } }, "/api/productsFreeFields": { "get": { "tags": [ "Product Free Field" ], "operationId": "productFreeField.list", "summary": "[BETA] list of information about product free fields from company settings", "description": "Returns a list of information about product free fields from the company settings", "parameters": [ { "name": "filter", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "id", "name" ] }, "op": { "type": "string", "enum": [ "equals", "notEquals", "in", "notIn", "exactlyIn", "allIn", "allNotIn", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan", "is" ] }, "value": { "oneOf": [ { "type": "string", "description": "Used for the operations 'equals', 'notEquals', 'contains', 'notContains', 'startsWith', 'endsWith' and 'is'.", "title": "String" }, { "type": "array", "description": "Used for the operations 'in', 'notIn', 'exactlyIn', 'allIn' and 'allNotIn'.", "title": "Array", "items": { "type": "string" } } ] } } } } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "name" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string", "nullable": true, "description": "Name of the product free field" } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } }, "examples": { "Lists all product free fields": { "value": { "data": [ { "id": "1", "name": "Other free field name 1" }, { "id": "2", "name": "Other free field name 2" }, { "id": "3", "name": "Other free field name 3" }, { "id": "4", "name": "Other free field name 4" }, { "id": "5", "name": "Other free field name 5" }, { "id": "6", "name": "Other free field name 6" }, { "id": "7", "name": "Other free field name 7" }, { "id": "8", "name": "Other free field name 8" }, { "id": "9", "name": "Other free field name 9" }, { "id": "10", "name": "Other free field name 10" } ], "extra": { "totalCount": 40, "page": { "number": 1, "size": 10 } } } } } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Product Free Field" ], "operationId": "productFreeField.updateMultiple", "summary": "[BETA] update information of multiple product free fields from company settings", "description": "Updates details of multiple product free fields from company settings", "requestBody": { "description": "Product free field update multiple request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string", "description": "Name of the product free field" } } } }, "examples": { "Update multiple product free fields": { "value": [ { "id": "5", "name": "My new product free field name" }, { "id": "8", "name": "My other new product free field name" } ] } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/productsFreeFields/{id}": { "get": { "tags": [ "Product Free Field" ], "operationId": "productFreeField.view", "summary": "[BETA] view information about a single product free field from company settings", "description": "Returns details of a single product free field from company settings", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string", "nullable": true, "description": "Name of the product free field" } } } } }, "examples": { "Shows a single product free field": { "value": { "data": { "id": "1", "name": "Other free field name 1" } } } } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Product Free Field" ], "operationId": "productFreeField.update", "summary": "[BETA] update information about a single product free field from company settings", "description": "Updates details of a single product free field from company settings", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "Product free field update request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Name of the product free field" } } }, "examples": { "Update product free field": { "value": { "name": "My new product free field name" } } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/productMedia": { "post": { "tags": [ "Product Media" ], "operationId": "productMedia.create", "summary": "[EARLY ACCESS] Create product media", "description": "Creates new product media", "requestBody": { "description": "Product media create request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "properties": { "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "title": { "type": "string", "nullable": true }, "description": { "type": "string", "nullable": true }, "keyword": { "type": "string", "enum": [ "defaultImage", "printImage", "labelImage", "otherImage" ] }, "fileName": { "type": "string" }, "fileContent": { "type": "string", "description": "A base64 encoded image. Supported image formats JPEG, PNG", "format": "byte" } } }, "examples": { "Create product media": { "value": { "product": { "id": "52" }, "title": "Product image", "description": "Product image", "keyword": "defaultImage", "fileName": "sample.png", "fileContent": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=" } } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Product Media" ], "operationId": "productMedia.updateMultiple", "summary": "[EARLY ACCESS] Update multiple product media", "description": "Updates multiple product media", "requestBody": { "description": "Product media update multiple request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "title": { "x-description-missing": true, "type": "string", "nullable": true }, "description": { "x-description-missing": true, "type": "string", "nullable": true }, "keyword": { "x-description-missing": true, "type": "string", "enum": [ "defaultImage", "printImage", "labelImage", "otherImage" ] }, "sort": { "x-description-missing": true, "type": "integer", "nullable": true } } } }, "examples": { "Update multiple product media": { "value": [ { "id": "52", "title": "Product image", "description": "Product image", "keyword": "defaultImage", "sort": 1 }, { "id": "53", "title": "Second product image", "description": "Product image", "sort": 2 } ] } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "delete": { "tags": [ "Product Media" ], "operationId": "productMedia.deleteMultiple", "summary": "[EARLY ACCESS] Delete multiple product media", "description": "Deletes a multiple product media", "requestBody": { "description": "Product media delete multiple request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } }, "examples": { "Delete multiple product media": { "value": [ { "id": "52" }, { "id": "53" } ] } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "get": { "tags": [ "Product Media" ], "operationId": "productMedia.list", "summary": "[EARLY ACCESS] List product media", "description": "Returns list of a product media", "parameters": [ { "name": "filter", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "id", "product" ] }, "op": { "type": "string", "enum": [ "equals", "notEquals", "in", "notIn", "exactlyIn", "allIn", "allNotIn", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan", "is" ] }, "value": { "oneOf": [ { "type": "string", "description": "Used for the operations 'equals', 'notEquals', 'contains', 'notContains', 'startsWith', 'endsWith' and 'is'.", "title": "String" }, { "type": "array", "description": "Used for the operations 'in', 'notIn', 'exactlyIn', 'allIn' and 'allNotIn'.", "title": "Array", "items": { "type": "string" } } ] } } } } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "title": { "x-description-missing": true, "type": "string", "nullable": true }, "description": { "x-description-missing": true, "type": "string", "nullable": true }, "keyword": { "x-description-missing": true, "type": "string", "enum": [ "defaultImage", "printImage", "defaultGroupImage", "labelImage", "otherImage", "dataSheet", "certificateAttachment" ] }, "sort": { "x-description-missing": true, "type": "integer" }, "currentVersion": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "version": { "x-description-missing": true, "type": "integer" }, "url": { "x-description-missing": true, "type": "string" }, "remark": { "x-description-missing": true, "type": "string", "nullable": true }, "filename": { "x-description-missing": true, "type": "string" }, "size": { "x-description-missing": true, "type": "integer" }, "updatedAt": { "x-description-missing": true, "type": "string", "format": "date-time" } } }, "updatedAt": { "x-description-missing": true, "type": "string", "format": "date-time" } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } }, "examples": { "Lists all product media from all products": { "value": { "data": [ { "id": "5", "product": { "id": "1" }, "title": "", "description": "", "keyword": "defaultImage", "sort": 1, "currentVersion": { "id": "17", "version": 3, "url": "/api/productMedia/5/versions/3", "remark": "Initial Version", "filename": "test.png", "size": 12345, "updatedAt": "2024-02-16T14:32:41+02:00" }, "updatedAt": "2024-02-16T14:32:41+02:00" }, { "id": "8", "product": { "id": "2" }, "title": "", "description": "", "keyword": "defaultGroupImage", "sort": 1, "currentVersion": { "id": "20", "version": 2, "url": "/api/productMedia/8/versions/2", "remark": "Initial Version", "filename": "test.png", "size": 12345, "updatedAt": "2024-02-16T14:32:41+02:00" }, "updatedAt": "2024-02-16T14:32:41+02:00" } ], "extra": { "page": { "number": 1, "size": 10 }, "totalCount": 2 } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/productMedia/{id}": { "get": { "tags": [ "Product Media" ], "operationId": "productMedia.view", "summary": "[EARLY ACCESS] View product media", "description": "Returns details of a single product media", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "title": { "x-description-missing": true, "type": "string", "nullable": true }, "description": { "x-description-missing": true, "type": "string", "nullable": true }, "keyword": { "x-description-missing": true, "type": "string", "enum": [ "defaultImage", "printImage", "defaultGroupImage", "labelImage", "otherImage", "dataSheet", "certificateAttachment" ] }, "sort": { "x-description-missing": true, "type": "integer" }, "versions": { "type": "array", "items": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "version": { "x-description-missing": true, "type": "integer" }, "url": { "x-description-missing": true, "type": "string" }, "remark": { "x-description-missing": true, "type": "string", "nullable": true }, "filename": { "x-description-missing": true, "type": "string" }, "size": { "x-description-missing": true, "type": "integer" }, "updatedAt": { "x-description-missing": true, "type": "string", "format": "date-time" } } } }, "currentVersion": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "version": { "x-description-missing": true, "type": "integer" }, "url": { "x-description-missing": true, "type": "string" }, "remark": { "x-description-missing": true, "type": "string", "nullable": true }, "filename": { "x-description-missing": true, "type": "string" }, "size": { "x-description-missing": true, "type": "integer" }, "updatedAt": { "x-description-missing": true, "type": "string", "format": "date-time" } } }, "updatedAt": { "x-description-missing": true, "type": "string", "format": "date-time" } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } }, "examples": { "Shows detailed information for a given product media": { "value": { "data": { "id": "6", "product": { "id": "1" }, "title": "", "description": "", "keyword": "printImage", "sort": 2, "versions": [ { "id": "15", "version": 1, "url": "/api/productMedia/6/versions/1", "remark": "Initial Version", "filename": "test.png", "size": 12345, "updatedAt": "2024-02-16T14:32:41+02:00" }, { "id": "16", "version": 2, "url": "/api/productMedia/6/versions/2", "remark": "Initial Version", "filename": "test.png", "size": 12345, "updatedAt": "2024-02-16T14:32:41+02:00" } ], "currentVersion": { "id": "16", "version": 2, "url": "/api/productMedia/6/versions/2", "remark": "Initial Version", "filename": "test.png", "size": 12345, "updatedAt": "2024-02-16T14:32:41+02:00" }, "updatedAt": "2024-02-16T14:32:41+02:00" } } } } }, "image/*": { "schema": { "type": "string", "format": "binary" } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/productMedia/{id}/versions": { "post": { "tags": [ "Product Media" ], "operationId": "productMedia.createVersion", "summary": "[EARLY ACCESS] Create product media version", "description": "Creates new product media version", "requestBody": { "description": "Product media version create request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "nullable": true }, "remark": { "type": "string", "nullable": true }, "fileName": { "type": "string" }, "fileContent": { "type": "string", "description": "A base64 encoded image. Supported image formats JPEG, PNG", "format": "byte" } } }, "examples": { "Create product media version": { "value": { "name": "Version 1", "remark": "Version 1", "fileName": "sample.png", "fileContent": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=" } } } } } }, "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/productMedia/{id}/versions/{version}": { "get": { "tags": [ "Product Media" ], "operationId": "productMedia.viewVersion", "summary": "[EARLY ACCESS] View product media version", "description": "Returns content or details of a single product media", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "in": "path", "name": "version", "required": true, "description": "The resource's version.", "schema": { "type": "string", "pattern": "\\d+" } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "version": { "x-description-missing": true, "type": "integer" }, "url": { "x-description-missing": true, "type": "string" }, "remark": { "x-description-missing": true, "type": "string", "nullable": true }, "filename": { "x-description-missing": true, "type": "string" }, "size": { "x-description-missing": true, "type": "integer" }, "updatedAt": { "x-description-missing": true, "type": "string", "format": "date-time" } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } }, "examples": { "Shows information about a single product media version": { "value": { "data": { "id": "14", "version": 2, "url": "/api/productMedia/5/versions/2", "remark": "Initial Version", "filename": "test.png", "size": 12345, "updatedAt": "2024-02-16T14:32:41+02:00" } } } } }, "image/*": { "schema": { "type": "string", "format": "binary" } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Product Media" ], "operationId": "productMedia.updateVersion", "summary": "[ALPHA] Updates product media version", "description": "Updates product media", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "in": "path", "name": "version", "required": true, "description": "The resource's version.", "schema": { "type": "string", "pattern": "\\d+" } } ], "requestBody": { "description": "", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "properties": { "forceCurrentVersion": { "oneOf": [ { "type": "boolean", "nullable": true }, { "type": "number", "nullable": true, "enum": [ 0, 1 ] }, { "type": "string", "nullable": true, "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] } } }, "examples": { "Update product media version": { "value": { "forceCurrentVersion": true } } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "delete": { "tags": [ "Product Media" ], "operationId": "productMedia.deleteVersion", "summary": "[EARLY ACCESS] Delete product media version", "description": "Deletes a single product media version", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "in": "path", "name": "version", "required": true, "description": "The resource's version.", "schema": { "type": "string", "pattern": "\\d+" } } ], "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "404": { "description": "Resource was not found or not enough access privileges" }, "429": { "description": "Too many API calls made." } } } }, "/api/productsProperties": { "post": { "tags": [ "Product Property" ], "operationId": "productProperty.create", "summary": "Create products properties", "description": "Creates new products properties.", "requestBody": { "content": { "application/vnd.xentral.batch.v1+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "minLength": 1, "description": "Name of the product property." }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } } } } }, "examples": { "Create product property": { "value": [ { "name": "Color", "project": { "id": "1" } } ] } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "get": { "tags": [ "Product Property" ], "operationId": "productProperty.list", "summary": "List products properties", "description": "Lists available products properties.", "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string", "description": "Name of the product property." }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } } } } } } }, "examples": { "Lists all product properties": { "value": { "data": [ { "id": "1", "name": "Color", "project": { "id": "0" } } ] } } } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Product Property" ], "operationId": "productProperty.updateMultiple", "summary": "Update multiple products properties", "description": "Updates multiple products properties.", "requestBody": { "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "x-description-missing": true, "type": "string", "minLength": 1 } } } }, "examples": { "Update multiple product properties": { "value": [ { "id": "4", "name": "Color" }, { "id": "7", "name": "Size" } ] } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "delete": { "tags": [ "Product Property" ], "operationId": "productProperty.deleteMultiple", "summary": "Delete multiple products properties", "description": "Deletes multiple products properties.", "requestBody": { "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } }, "examples": { "Delete multiple product properties": { "value": [ { "id": "4" }, { "id": "7" } ] } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/productsTags": { "get": { "tags": [ "Product Tag" ], "operationId": "productTag.list", "summary": "List products tags", "description": "Returns a collection with all products tags.", "parameters": [ { "name": "filter", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "name", "id" ] }, "op": { "type": "string", "enum": [ "equals", "notEquals", "in", "notIn", "exactlyIn", "allIn", "allNotIn", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan", "is" ] }, "value": { "oneOf": [ { "type": "string", "description": "Used for the operations 'equals', 'notEquals', 'contains', 'notContains', 'startsWith', 'endsWith' and 'is'.", "title": "String" }, { "type": "array", "description": "Used for the operations 'in', 'notIn', 'exactlyIn', 'allIn' and 'allNotIn'.", "title": "Array", "items": { "type": "string" } } ] } } } } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "name", "number", "description", "project", "purchasePriceNet", "purchasePriceGross", "salesPriceNet", "salesPriceGross", "ean", "manufacturerName", "manufacturerNumber", "customsTariffNumber" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "description": "A list of tags", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The identifier of the tag", "type": "string", "pattern": "\\d+", "example": "1337" }, "name": { "description": "The name of the tag", "type": "string", "example": "Active" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } }, "examples": { "Lists all product tags": { "value": { "data": [ { "id": "1", "name": "Done", "color": "339966" }, { "id": "5", "name": "Prio", "color": "ff00ff" } ], "extra": { "totalCount": 2, "page": { "number": 1, "size": 10 } } } } } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "post": { "tags": [ "Product Tag" ], "operationId": "productTag.create", "summary": "Create new product tag", "description": "Creates a new product tag.", "parameters": [], "requestBody": { "description": "Product tag create request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "pattern": "^[a-z0-9_-]{3,24}$" }, "name": { "type": "string" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } }, "examples": { "Create product tag": { "value": { "key": "new-name", "name": "New name", "color": "#ff0000" } } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/productsTags/{id}": { "patch": { "tags": [ "Product Tag" ], "operationId": "productTag.update", "summary": "Update a single product tag", "description": "Updates details of a single product tag", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "Product tag update request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } }, "examples": { "Update product tag": { "value": { "name": "New name", "color": "#ff0000" } } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "409": { "description": "Request conflict with the current state of the target resource", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "429": { "description": "Too many API calls made." } } } }, "/api/productsMerchandiseGroups": { "get": { "tags": [ "Product Merchandise Group" ], "operationId": "productMerchandiseGroup.list", "summary": "Lists available products merchandise groups", "description": "Lists all available products merchandise groups.", "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string", "description": "Shows the name of the merchandise group." }, "project": { "description": "An optional object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "nullable": true, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } }, "lastUsedProductNumber": { "type": "string", "description": "Shows the last used product number used by the merchandise group." }, "useMainProductNumberRange": { "type": "boolean", "description": "Shows if the product number is taken from the main product number range or not." }, "revenue": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "domesticStandard": { "type": "string" }, "domesticReduced": { "type": "string" }, "domesticFree": { "type": "string" }, "intraCommunityEu": { "type": "string" }, "intraCommunityEuTaxText": { "type": "string" }, "euStandard": { "type": "string" }, "euReduced": { "type": "string" }, "export": { "type": "string" }, "exportTaxText": { "type": "string" } } }, "expenses": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "domesticStandard": { "type": "string" }, "domesticReduced": { "type": "string" }, "domesticFree": { "type": "string" }, "intraCommunityEu": { "type": "string" }, "euStandard": { "type": "string" }, "euReduced": { "type": "string" }, "import": { "type": "string" } } } } } } } }, "examples": { "Lists all product merchandise groups": { "value": { "data": [ { "id": "2", "name": "Dienstleistungen", "project": { "id": "1", "name": "Standard Projekt" }, "lastUsedProductNumber": "", "useMainProductNumberRange": true, "revenue": { "domesticStandard": "", "domesticReduced": "", "domesticFree": "", "intraCommunityEu": "", "intraCommunityEuTaxText": "", "euStandard": "", "euReduced": "", "export": "", "exportTaxText": "" }, "expenses": { "domesticStandard": "", "domesticReduced": "", "domesticFree": "", "intraCommunityEu": "", "euStandard": "", "euReduced": "", "import": "" } }, { "id": "5", "name": "Fremdleistung", "project": null, "lastUsedProductNumber": "F1100", "useMainProductNumberRange": false, "revenue": { "domesticStandard": "", "domesticReduced": "", "domesticFree": "", "intraCommunityEu": "", "intraCommunityEuTaxText": "", "euStandard": "", "euReduced": "", "export": "", "exportTaxText": "" }, "expenses": { "domesticStandard": "", "domesticReduced": "", "domesticFree": "", "intraCommunityEu": "", "euStandard": "", "euReduced": "", "import": "" } } ] } } } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "post": { "tags": [ "Product Merchandise Group" ], "operationId": "productMerchandiseGroup.create", "summary": "Create new product merchandise group", "description": "Creates a new product merchandise group.", "parameters": [], "requestBody": { "description": "Product merchandise group create request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Sets the name of the merchandise group." }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "lastUsedProductNumber": { "type": "string", "description": "Sets the last used product number by the merchandise group." }, "useMainProductNumberRange": { "type": "boolean", "description": "Determines if the product number should be taken from the main product number range or not." }, "revenue": { "type": "object", "additionalProperties": false, "properties": { "domesticStandard": { "type": "string" }, "domesticReduced": { "type": "string" }, "domesticFree": { "type": "string" }, "intraCommunityEu": { "type": "string" }, "intraCommunityEuTaxText": { "type": "string" }, "euStandard": { "type": "string" }, "euReduced": { "type": "string" }, "export": { "type": "string" }, "exportTaxText": { "type": "string" } } }, "expenses": { "type": "object", "additionalProperties": false, "properties": { "domesticStandard": { "type": "string" }, "domesticReduced": { "type": "string" }, "domesticFree": { "type": "string" }, "intraCommunityEu": { "type": "string" }, "euStandard": { "type": "string" }, "euReduced": { "type": "string" }, "import": { "type": "string" } } } } }, "examples": { "Create product merchandise group": { "value": { "name": "My Merchandise Group", "project": { "id": "1" }, "lastUsedProductNumber": "1000", "useMainProductNumberRange": true, "revenue": { "domesticStandard": "19", "domesticReduced": "7", "domesticFree": "0", "intraCommunityEu": "0", "intraCommunityEuTaxText": "VAT free intra-community supply", "euStandard": "0", "euReduced": "0", "export": "0", "exportTaxText": "VAT free export" }, "expenses": { "domesticStandard": "19", "domesticReduced": "7", "domesticFree": "0", "intraCommunityEu": "0", "euStandard": "0", "euReduced": "0", "import": "0" } } } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "409": { "description": "Request conflict with the current state of the target resource", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/productsMerchandiseGroups/{id}": { "get": { "tags": [ "Product Merchandise Group" ], "operationId": "productMerchandiseGroup.view", "summary": "View a single product merchandise group", "description": "Returns details of a single product merchandise group", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string", "description": "Shows the name of the merchandise group." }, "project": { "description": "An optional object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "nullable": true, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } }, "lastUsedProductNumber": { "type": "string", "description": "Shows the last used product number by the merchandise group." }, "useMainProductNumberRange": { "type": "boolean", "description": "Shows if the product number is taken from the main product number range or not." }, "revenue": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "domesticStandard": { "type": "string" }, "domesticReduced": { "type": "string" }, "domesticFree": { "type": "string" }, "intraCommunityEu": { "type": "string" }, "intraCommunityEuTaxText": { "type": "string" }, "euStandard": { "type": "string" }, "euReduced": { "type": "string" }, "export": { "type": "string" }, "exportTaxText": { "type": "string" } } }, "expenses": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "domesticStandard": { "type": "string" }, "domesticReduced": { "type": "string" }, "domesticFree": { "type": "string" }, "intraCommunityEu": { "type": "string" }, "euStandard": { "type": "string" }, "euReduced": { "type": "string" }, "import": { "type": "string" } } } } } } }, "examples": { "Shows a single product merchandise group": { "value": { "data": { "id": "1", "name": "Handelsware (100000)", "project": null, "lastUsedProductNumber": "100000", "useMainProductNumberRange": false, "revenue": { "domesticStandard": "", "domesticReduced": "", "domesticFree": "", "intraCommunityEu": "", "intraCommunityEuTaxText": "", "euStandard": "", "euReduced": "", "export": "", "exportTaxText": "" }, "expenses": { "domesticStandard": "", "domesticReduced": "", "domesticFree": "", "intraCommunityEu": "", "euStandard": "", "euReduced": "", "import": "" } } } } } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Product Merchandise Group" ], "operationId": "productMerchandiseGroup.update", "summary": "Update a single product merchandise group", "description": "Updates details of a single product merchandise group", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "Product merchandise group update request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Sets the name of the merchandise group." }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "lastUsedProductNumber": { "type": "string", "description": "Sets the last used product number by the merchandise group." }, "useMainProductNumberRange": { "type": "boolean", "description": "Determines if the product number should be taken from the main product number range or not." }, "revenue": { "type": "object", "additionalProperties": false, "properties": { "domesticStandard": { "type": "string" }, "domesticReduced": { "type": "string" }, "domesticFree": { "type": "string" }, "intraCommunityEu": { "type": "string" }, "intraCommunityEuTaxText": { "type": "string" }, "euStandard": { "type": "string" }, "euReduced": { "type": "string" }, "export": { "type": "string" }, "exportTaxText": { "type": "string" } } }, "expenses": { "type": "object", "additionalProperties": false, "properties": { "domesticStandard": { "type": "string" }, "domesticReduced": { "type": "string" }, "domesticFree": { "type": "string" }, "intraCommunityEu": { "type": "string" }, "euStandard": { "type": "string" }, "euReduced": { "type": "string" }, "import": { "type": "string" } } } } }, "examples": { "Update product merchandise group": { "value": { "name": "My Merchandise Group", "project": { "id": "1" }, "lastUsedProductNumber": "1000", "useMainProductNumberRange": true, "revenue": { "domesticStandard": "19", "domesticReduced": "7", "domesticFree": "0", "intraCommunityEu": "0", "intraCommunityEuTaxText": "VAT free intra-community supply", "euStandard": "0", "euReduced": "0", "export": "0", "exportTaxText": "VAT free export" }, "expenses": { "domesticStandard": "19", "domesticReduced": "7", "domesticFree": "0", "intraCommunityEu": "0", "euStandard": "0", "euReduced": "0", "import": "0" } } } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "404": { "description": "Resource was not found or not enough access privileges" }, "409": { "description": "Request conflict with the current state of the target resource", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "429": { "description": "Too many API calls made." } } }, "delete": { "tags": [ "Product Merchandise Group" ], "operationId": "productMerchandiseGroup.delete", "summary": "Delete a single product merchandise group", "description": "Deletes a single merchandise group", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "204": { "description": "Operation completed successfully, no response body" }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "409": { "description": "Request conflict with the current state of the target resource", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "429": { "description": "Too many API calls made." } } } }, "/api/productions": { "get": { "tags": [ "Production" ], "operationId": "productions.list", "summary": "List Productions", "description": "List Productions", "parameters": [ { "name": "filter", "in": "query", "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "array", "items": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } }, { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "id", "date", "createdAt", "updatedAt", "status", "salesOrderId", "projectId" ] }, "op": { "type": "string", "enum": [ "equals", "notEquals", "in", "notIn", "allIn", "allNotIn", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan" ] }, "value": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] } } } } ] } }, { "name": "order", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "date", "createdAt", "updatedAt" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } } ], "responses": { "200": { "description": "Productions list", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data", "extra" ], "properties": { "data": { "type": "array", "items": { "description": "An entity of production response", "type": "object", "additionalProperties": false, "required": [ "id", "documentNumber", "bodyOutroduction", "date", "dateDelivery", "dateProvision", "dateProduction", "dateProductionEnd", "status", "customer", "project", "salesOrder", "internalDesignation", "preferredWarehouse", "reservationType", "retrievalType", "explodeSublists", "functionalTest", "displayWorkingStepTexts", "createSerialNumbers", "captureComponentSerialnumbers", "internalComment", "completed", "finalRemark", "customerCheckOk", "depletingOk", "partialProductionNumber", "partialProductionOf", "stockingOk", "stockOk", "log" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "documentNumber": { "type": "string", "description": "documentNumber" }, "bodyOutroduction": { "type": "string", "description": "BodyOutroduction of the production" }, "date": { "type": "string", "format": "date", "description": "Date of the production" }, "dateDelivery": { "type": "string", "format": "date", "nullable": true, "description": "Date Delivery of the production" }, "dateProvision": { "type": "string", "format": "date", "nullable": true, "description": "Date Provision of the production" }, "dateProduction": { "type": "string", "format": "date", "nullable": true, "description": "Date Production of the production" }, "dateProductionEnd": { "type": "string", "format": "date", "nullable": true, "description": "Date Production End of the production" }, "status": { "type": "string", "description": "Status of the production" }, "customer": { "type": "object", "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "nullable": true, "description": "Customer of the production" }, "project": { "type": "object", "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "nullable": true, "description": "Project of the production" }, "salesOrder": { "type": "object", "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "nullable": true, "description": "Sales Order of the production" }, "internalDesignation": { "type": "string", "description": "Internal Designation of the production" }, "preferredWarehouse": { "type": "object", "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "nullable": true, "description": "Preferred Warehouse of the production" }, "reservationType": { "type": "string", "description": "Reservation Type of the production" }, "retrievalType": { "type": "string", "description": "Retrieval Type of the production" }, "explodeSublists": { "type": "boolean", "description": "Explode Sublists of the production" }, "functionalTest": { "type": "boolean", "description": "Functional Test of the production" }, "displayWorkingStepTexts": { "type": "boolean", "description": "Display Working Step Texts of the production" }, "createSerialNumbers": { "type": "boolean", "description": "Create Serial Numbers of the production" }, "captureComponentSerialnumbers": { "type": "boolean", "description": "Capture Component Serialnumbers of the production" }, "internalComment": { "type": "string", "description": "Internal Comment of the production" }, "completed": { "type": "boolean", "description": "Completed of the production" }, "finalRemark": { "type": "string", "description": "Final Remark of the production" }, "customerCheckOk": { "type": "boolean", "description": "Customer Check Ok of the production" }, "depletingOk": { "type": "boolean", "description": "Depleting Ok of the production" }, "partialProductionNumber": { "type": "integer", "description": "Partial Production Number of the production" }, "partialProductionOf": { "type": "integer", "description": "Partial Production of the production" }, "stockingOk": { "type": "boolean", "description": "Stocking Ok of the production" }, "stockOk": { "type": "boolean", "description": "Stock Ok of the production" }, "log": { "type": "object", "properties": { "createdAt": { "type": "string", "format": "date" }, "createdBy": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } } }, "description": "log of the production" } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } }, "example": { "data": [ { "id": "1", "documentNumber": "", "bodyOutroduction": "", "date": "2024-03-13", "dateDelivery": null, "dateProvision": null, "dateProduction": null, "dateProductionEnd": null, "status": "released", "customer": null, "project": { "id": "1" }, "salesOrder": null, "internalDesignation": "", "preferredWarehouse": null, "reservationType": "abschluss", "retrievalType": "sammel", "explodeSublists": true, "functionalTest": false, "displayWorkingStepTexts": true, "createSerialNumbers": true, "captureComponentSerialnumbers": false, "internalComment": "", "completed": false, "finalRemark": "", "customerCheckOk": true, "depletingOk": false, "partialProductionNumber": 0, "partialProductionOf": 0, "stockingOk": false, "stockOk": true, "log": { "createdAt": "2024-03-13", "createdBy": { "id": "1", "name": "admin" } } }, { "id": "2", "documentNumber": "2024-400000", "bodyOutroduction": "bodyOutroduction", "date": "2024-03-14", "dateDelivery": "2024-03-15", "dateProvision": null, "dateProduction": null, "dateProductionEnd": null, "status": "released", "customer": { "id": "2" }, "project": { "id": "1" }, "salesOrder": { "id": "2" }, "internalDesignation": "", "preferredWarehouse": { "id": "12" }, "reservationType": "abschluss", "retrievalType": "sammel", "explodeSublists": true, "functionalTest": false, "displayWorkingStepTexts": true, "createSerialNumbers": true, "captureComponentSerialnumbers": false, "internalComment": "This is internal comment ", "completed": false, "finalRemark": "", "customerCheckOk": true, "depletingOk": false, "partialProductionNumber": 0, "partialProductionOf": 0, "stockingOk": false, "stockOk": true, "log": { "createdAt": "2024-03-14", "createdBy": { "id": "1", "name": "admin" } } } ], "extra": { "totalCount": 20, "page": { "number": 1, "size": 2 } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/productions/{id}": { "get": { "tags": [ "Production" ], "operationId": "productions.view", "summary": "View Production", "description": "View a production", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Productions view based on id", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data" ], "properties": { "data": { "description": "An entity of production response", "type": "object", "additionalProperties": false, "required": [ "id", "documentNumber", "bodyOutroduction", "date", "dateDelivery", "dateProvision", "dateProduction", "dateProductionEnd", "status", "customer", "project", "salesOrder", "internalDesignation", "preferredWarehouse", "reservationType", "retrievalType", "explodeSublists", "functionalTest", "displayWorkingStepTexts", "createSerialNumbers", "captureComponentSerialnumbers", "internalComment", "completed", "finalRemark", "customerCheckOk", "depletingOk", "partialProductionNumber", "partialProductionOf", "stockingOk", "stockOk", "log" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "documentNumber": { "type": "string", "description": "documentNumber" }, "bodyOutroduction": { "type": "string", "description": "BodyOutroduction of the production" }, "date": { "type": "string", "format": "date", "description": "Date of the production" }, "dateDelivery": { "type": "string", "format": "date", "nullable": true, "description": "Date Delivery of the production" }, "dateProvision": { "type": "string", "format": "date", "nullable": true, "description": "Date Provision of the production" }, "dateProduction": { "type": "string", "format": "date", "nullable": true, "description": "Date Production of the production" }, "dateProductionEnd": { "type": "string", "format": "date", "nullable": true, "description": "Date Production End of the production" }, "status": { "type": "string", "description": "Status of the production" }, "customer": { "type": "object", "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "nullable": true, "description": "Customer of the production" }, "project": { "type": "object", "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "nullable": true, "description": "Project of the production" }, "salesOrder": { "type": "object", "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "nullable": true, "description": "Sales Order of the production" }, "internalDesignation": { "type": "string", "description": "Internal Designation of the production" }, "preferredWarehouse": { "type": "object", "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "nullable": true, "description": "Preferred Warehouse of the production" }, "reservationType": { "type": "string", "description": "Reservation Type of the production" }, "retrievalType": { "type": "string", "description": "Retrieval Type of the production" }, "explodeSublists": { "type": "boolean", "description": "Explode Sublists of the production" }, "functionalTest": { "type": "boolean", "description": "Functional Test of the production" }, "displayWorkingStepTexts": { "type": "boolean", "description": "Display Working Step Texts of the production" }, "createSerialNumbers": { "type": "boolean", "description": "Create Serial Numbers of the production" }, "captureComponentSerialnumbers": { "type": "boolean", "description": "Capture Component Serialnumbers of the production" }, "internalComment": { "type": "string", "description": "Internal Comment of the production" }, "completed": { "type": "boolean", "description": "Completed of the production" }, "finalRemark": { "type": "string", "description": "Final Remark of the production" }, "customerCheckOk": { "type": "boolean", "description": "Customer Check Ok of the production" }, "depletingOk": { "type": "boolean", "description": "Depleting Ok of the production" }, "partialProductionNumber": { "type": "integer", "description": "Partial Production Number of the production" }, "partialProductionOf": { "type": "integer", "description": "Partial Production of the production" }, "stockingOk": { "type": "boolean", "description": "Stocking Ok of the production" }, "stockOk": { "type": "boolean", "description": "Stock Ok of the production" }, "log": { "type": "object", "properties": { "createdAt": { "type": "string", "format": "date" }, "createdBy": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } } }, "description": "log of the production" } } } }, "example": { "data": { "id": "1", "documentNumber": "", "bodyOutroduction": "", "date": "2024-03-13", "dateDelivery": null, "dateProvision": null, "dateProduction": null, "dateProductionEnd": null, "status": "created", "customer": null, "project": { "id": "1" }, "salesOrder": null, "internalDesignation": "", "preferredWarehouse": null, "reservationType": "abschluss", "retrievalType": "sammel", "explodeSublists": true, "functionalTest": false, "displayWorkingStepTexts": true, "createSerialNumbers": true, "captureComponentSerialnumbers": false, "internalComment": "", "completed": false, "finalRemark": "", "customerCheckOk": true, "depletingOk": false, "partialProductionNumber": 0, "partialProductionOf": 0, "stockingOk": false, "stockOk": true, "log": { "createdAt": "2024-03-13", "createdBy": { "id": "1", "name": "admin" } } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/purchaseOrders": { "get": { "tags": [ "Purchase Order" ], "operationId": "purchaseOrder.list", "summary": "Lists available purchase orders", "description": "Lists all available purchase orders.", "parameters": [ { "name": "filter", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "id", "status", "date", "supplier", "documentNumber", "project", "createdAt", "updatedAt", "salesOrderConfirmationReference", "suppliersOfferReference" ] }, "op": { "type": "string", "enum": [ "equals", "notEquals", "in", "notIn", "exactlyIn", "allIn", "allNotIn", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan", "is" ] }, "value": { "oneOf": [ { "type": "string", "description": "Used for the operations 'equals', 'notEquals', 'contains', 'notContains', 'startsWith', 'endsWith' and 'is'.", "title": "String" }, { "type": "array", "description": "Used for the operations 'in', 'notIn', 'exactlyIn', 'allIn' and 'allNotIn'.", "title": "Array", "items": { "type": "string" } } ] } } } } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "date", "project", "status", "documentNumber" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "description": "List information of the purchase order.", "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "date": { "type": "string", "format": "date", "description": "Date of the purchase order." }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "status": { "type": "string", "description": "Current status of the purchase order." }, "documentNumber": { "type": "string", "description": "Document number of the purchase order." }, "supplier": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "number": { "type": "string" }, "customerNumberAtSupplier": { "type": "string" }, "honorific": { "type": "string", "description": "Honorific of the billing address." }, "name": { "type": "string", "description": "Name of the billing address." }, "department": { "type": "string", "description": "Department of the billing address." }, "subDepartment": { "type": "string", "description": "Subdepartment of the billing address." }, "extraAddressLine": { "type": "string", "description": "Extra address line of the billing address." }, "street": { "type": "string", "description": "Street of the billing address." }, "zipCode": { "type": "string", "description": "Zip code of the billing address." }, "city": { "type": "string", "description": "City of the billing address." }, "state": { "type": "string", "description": "State of the billing address." }, "country": { "type": "string", "description": "Country of the billing address." }, "contactPerson": { "type": "string", "description": "Contact person of the billing address." }, "telephone": { "type": "string", "description": "Telephone of the billing address." }, "telefax": { "type": "string", "description": "Telefax of the billing address." }, "email": { "type": "string", "description": "E-mail of the billing address." } }, "description": "Information about the supplier of the purchase order." }, "requestForQuotation": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "bodyIntroduction": { "type": "string", "description": "Text above the position table in the PDF." }, "bodyOutroduction": { "type": "string", "description": "Text below the position table in the PDF." }, "salesOrderConfirmationReference": { "type": "string", "description": "Reference of the sales order confirmation." }, "isConfirmationRequested": { "type": "boolean", "description": "Shows if a confirmation is requested." }, "suppliersOfferReference": { "type": "string", "description": "Offer reference of the supplier." }, "internalDesignation": { "type": "string", "description": "Internal designation of the purchase order." }, "language": { "type": "object", "additionalProperties": false, "description": "Language of the purchase order.", "properties": { "iso2": { "type": "string", "pattern": "[A-Z]{2}", "default": "DE" } } }, "isConfirmed": { "type": "boolean", "description": "Shows if the purchase order is confirmed." }, "confirmedVia": { "type": "string", "description": "Shows via the purchase order was confirmed." }, "financials": { "type": "object", "additionalProperties": false, "description": "Financial information about the purchase order.", "properties": { "paymentMethod": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "total": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "paymentTerms": { "type": "object", "additionalProperties": false, "description": "Information about payment terms of the purchase order.", "properties": { "paymentTargetDiscount": { "type": "number", "format": "float" }, "paymentTargetDays": { "type": "number" }, "paymentTargetDiscountDays": { "type": "number" }, "paymentTargetDiscountAmount": { "type": "number", "format": "float" }, "isPaymentTargetDiscountApplied": { "type": "boolean" } } }, "costCenter": { "type": "string", "description": "The assigned cost center for the purchase order." }, "tax": { "type": "object", "additionalProperties": false, "description": "Tax information of the purchase order.", "properties": { "taxation": { "type": "string" }, "vatId": { "type": "string" }, "taxDisplay": { "type": "string" } } } } }, "delivery": { "type": "object", "additionalProperties": false, "description": "Delivery information of the purchase order.", "properties": { "deliveryTerms": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "hasDifferentDeliveryAddress": { "type": "boolean" }, "deliveryAddress": { "type": "object", "additionalProperties": false, "description": "Delivery address of the purchase order.", "properties": { "honorific": { "type": "string" }, "name": { "type": "string" }, "department": { "type": "string" }, "subDepartment": { "type": "string" }, "extraAddressLine": { "type": "string" }, "street": { "type": "string" }, "zipCode": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "country": { "type": "string" }, "contactPerson": { "type": "string" } } }, "dates": { "type": "object", "additionalProperties": false, "description": "Delivery dates of the purchase order.", "properties": { "desiredDeliveryDate": { "type": "string", "format": "date", "nullable": true }, "confirmedDeliveryDate": { "type": "string", "format": "date", "nullable": true } } } } }, "formatting": { "type": "object", "additionalProperties": false, "properties": { "hideLetterHead": { "type": "boolean" }, "hidePrices": { "type": "boolean" }, "hideProductNumbers": { "type": "boolean" }, "showLongProductNumbers": { "type": "boolean" }, "hideProductDescriptions": { "type": "boolean" }, "showOwnProductNumberInColumn": { "type": "boolean" } }, "description": "Formatting settings for the PDF of a purchase order." }, "internalComment": { "type": "string", "description": "Internal Comment about the purchase order." }, "liabilitiesInfo": { "type": "string", "description": "Information for liabilities." } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "post": { "tags": [ "Purchase Order" ], "operationId": "purchaseOrder.create", "summary": "Create new purchase order", "description": "Creates a new purchase order.", "parameters": [], "requestBody": { "description": "Purchase order create request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "date": { "type": "string", "format": "date", "description": "Date of the purchase order." }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "supplier": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "honorific": { "type": "string" }, "name": { "type": "string" }, "department": { "type": "string" }, "subDepartment": { "type": "string" }, "extraAddressLine": { "type": "string" }, "street": { "type": "string" }, "zipCode": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "country": { "type": "string" }, "contactPerson": { "type": "string" }, "telephone": { "type": "string" }, "telefax": { "type": "string" }, "email": { "type": "string" } } }, "requestForQuotation": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "bodyIntroduction": { "type": "string", "description": "Text above the position table in the PDF." }, "bodyOutroduction": { "type": "string", "description": "Text below the position table in the PDF." }, "salesOrderConfirmationReference": { "type": "string", "description": "Reference of the sales order confirmation." }, "isConfirmationRequested": { "type": "boolean", "description": "Shows if a confirmation is requested." }, "suppliersOfferReference": { "type": "string", "description": "Offer reference of the supplier." }, "internalDesignation": { "type": "string", "description": "Internal designation of the purchase order." }, "language": { "type": "object", "additionalProperties": false, "description": "Language of the purchase order.", "properties": { "iso2": { "type": "string", "pattern": "[A-Z]{2}", "default": "DE" } } }, "isConfirmed": { "type": "boolean", "description": "Shows if the purchase order is confirmed." }, "confirmedVia": { "type": "string", "enum": [ "Internet", "E-Mail", "Telephone", "Telefax", "Letter", "Other" ], "default": "Internet", "description": "Determines how the purchase order was confirmed." }, "financials": { "type": "object", "additionalProperties": false, "description": "Financial information about the purchase order.", "properties": { "paymentMethod": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "paymentTerms": { "type": "object", "additionalProperties": false, "description": "Information about payment terms of the purchase order.", "properties": { "paymentTargetDiscount": { "type": "number", "format": "float" }, "paymentTargetDays": { "type": "number" }, "paymentTargetDiscountDays": { "type": "number" }, "paymentTargetDiscountAmount": { "type": "number", "format": "float" }, "isPaymentTargetDiscountApplied": { "type": "boolean" } } }, "costCenter": { "type": "string", "description": "The assigned cost center for the purchase order." }, "tax": { "type": "object", "additionalProperties": false, "description": "Tax information of the purchase order.", "properties": { "taxation": { "type": "string", "enum": [ "Domestic", "EU delivery", "Import", "Tax free domestic" ], "default": "Domestic" }, "vatId": { "type": "string" }, "taxDisplay": { "type": "string", "enum": [ "Automatic", "Net", "Gross" ], "default": "Automatic" } } }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "delivery": { "type": "object", "additionalProperties": false, "description": "Delivery information of the purchase order.", "properties": { "deliveryTerms": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "hasDifferentDeliveryAddress": { "type": "boolean" }, "deliveryAddress": { "type": "object", "additionalProperties": false, "properties": { "honorific": { "type": "string" }, "name": { "type": "string" }, "department": { "type": "string" }, "subDepartment": { "type": "string" }, "extraAddressLine": { "type": "string" }, "street": { "type": "string" }, "zipCode": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "country": { "type": "string" }, "contactPerson": { "type": "string" } } }, "dates": { "type": "object", "additionalProperties": false, "properties": { "desiredDeliveryDate": { "type": "string", "format": "date", "nullable": true, "description": "Desired delivery date of the purchase order." }, "confirmedDeliveryDate": { "type": "string", "format": "date", "nullable": true, "description": "Confirmed delivery date of the purchase order." } } } } }, "formatting": { "type": "object", "additionalProperties": false, "description": "Formatting settings for the PDF of a purchase order.", "properties": { "hideLetterHead": { "type": "boolean" }, "hidePrices": { "type": "boolean" }, "hideProductNumbers": { "type": "boolean" }, "showLongProductNumbers": { "type": "boolean" }, "hideProductDescriptions": { "type": "boolean" }, "showOwnProductNumberInColumn": { "type": "boolean" } } }, "internalComment": { "type": "string", "description": "Internal comment about the purchase order." }, "liabilitiesInfo": { "type": "string", "description": "Information for liabilities." }, "positions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "name": { "type": "string" }, "description": { "type": "string" }, "quantity": { "type": "number", "format": "float" }, "price": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "taxRate": { "type": "string", "enum": [ "standard", "reduced", "free" ] } } } } } }, "examples": {} } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "409": { "description": "Request conflict with the current state of the target resource", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/purchaseOrders/{id}": { "get": { "tags": [ "Purchase Order" ], "operationId": "purchaseOrder.view", "summary": "View a single purchase order", "description": "Returns details of a single purchase order", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "description": "View information of the purchase order.", "properties": { "data": { "type": "object", "additionalProperties": false, "x-description-ignore": true, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "date": { "type": "string", "format": "date", "description": "Date of the purchase order." }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "status": { "type": "string", "description": "Current status of the purchase order." }, "documentNumber": { "type": "string", "description": "Document number of the purchase order." }, "supplier": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "number": { "type": "string" }, "customerNumberAtSupplier": { "type": "string" }, "honorific": { "type": "string", "description": "Honorific of the billing address." }, "name": { "type": "string", "description": "Name of the billing address." }, "department": { "type": "string", "description": "Department of the billing address." }, "subDepartment": { "type": "string", "description": "Subdepartment of the billing address." }, "extraAddressLine": { "type": "string", "description": "Extra address line of the billing address." }, "street": { "type": "string", "description": "Street of the billing address." }, "zipCode": { "type": "string", "description": "Zip code of the billing address." }, "city": { "type": "string", "description": "City of the billing address." }, "state": { "type": "string", "description": "State of the billing address." }, "country": { "type": "string", "description": "Country of the billing address." }, "contactPerson": { "type": "string", "description": "Contact person of the billing address." }, "telephone": { "type": "string", "description": "Telephone of the billing address." }, "telefax": { "type": "string", "description": "Telefax of the billing address." }, "email": { "type": "string", "description": "E-mail of the billing address." } }, "description": "Information about the supplier of the purchase order." }, "requestForQuotation": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "bodyIntroduction": { "type": "string", "description": "Text above the position table in the PDF." }, "bodyOutroduction": { "type": "string", "description": "Text below the position table in the PDF." }, "salesOrderConfirmationReference": { "type": "string", "description": "Reference of the sales order confirmation." }, "isConfirmationRequested": { "type": "boolean", "description": "Shows if a confirmation is requested." }, "suppliersOfferReference": { "type": "string", "description": "Offer reference of the supplier." }, "internalDesignation": { "type": "string", "description": "Internal designation of the purchase order." }, "language": { "type": "object", "additionalProperties": false, "description": "Language of the purchase order.", "properties": { "iso2": { "type": "string", "pattern": "[A-Z]{2}", "default": "DE" } } }, "isConfirmed": { "type": "boolean", "description": "Shows if the purchase order is confirmed." }, "confirmedVia": { "type": "string", "description": "Shows via the purchase order was confirmed." }, "financials": { "type": "object", "additionalProperties": false, "description": "Financial information about the purchase order.", "properties": { "paymentMethod": { "type": "object", "nullable": true, "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "ID of the payment method used for the purchase order." }, "total": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "paymentTerms": { "type": "object", "additionalProperties": false, "description": "Information about payment terms of the purchase order.", "properties": { "paymentTargetDiscount": { "type": "number", "format": "float" }, "paymentTargetDays": { "type": "number" }, "paymentTargetDiscountDays": { "type": "number" }, "paymentTargetDiscountAmount": { "type": "number", "format": "float" }, "isPaymentTargetDiscountApplied": { "type": "boolean" } } }, "costCenter": { "type": "string", "description": "The assigned cost center for the purchase order." }, "tax": { "type": "object", "additionalProperties": false, "description": "Tax information of the purchase order.", "properties": { "taxation": { "type": "string" }, "vatId": { "type": "string" }, "taxDisplay": { "type": "string" } } } } }, "delivery": { "type": "object", "additionalProperties": false, "description": "Delivery information of the purchase order.", "properties": { "deliveryTerms": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "hasDifferentDeliveryAddress": { "type": "boolean" }, "deliveryAddress": { "type": "object", "additionalProperties": false, "description": "Delivery address of the purchase order.", "properties": { "honorific": { "type": "string" }, "name": { "type": "string" }, "department": { "type": "string" }, "subDepartment": { "type": "string" }, "extraAddressLine": { "type": "string" }, "street": { "type": "string" }, "zipCode": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "country": { "type": "string" }, "contactPerson": { "type": "string" } } }, "dates": { "type": "object", "additionalProperties": false, "description": "Delivery dates of the purchase order.", "properties": { "desiredDeliveryDate": { "type": "string", "format": "date", "nullable": true }, "confirmedDeliveryDate": { "type": "string", "format": "date", "nullable": true } } } } }, "formatting": { "type": "object", "additionalProperties": false, "properties": { "hideLetterHead": { "type": "boolean" }, "hidePrices": { "type": "boolean" }, "hideProductNumbers": { "type": "boolean" }, "showLongProductNumbers": { "type": "boolean" }, "hideProductDescriptions": { "type": "boolean" }, "showOwnProductNumberInColumn": { "type": "boolean" } }, "description": "Formatting settings for the PDF of a purchase order." }, "internalComment": { "type": "string", "description": "Internal Comment about the purchase order." }, "liabilitiesInfo": { "type": "string", "description": "Information for liabilities." }, "positions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "description": "Positions of the purchase order.", "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "name": { "type": "string" }, "description": { "type": "string" }, "quantity": { "type": "number", "format": "float" }, "price": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "taxRate": { "type": "string" } } } }, "log": { "type": "object", "additionalProperties": false, "description": "Log information of the purchase order.", "properties": { "createdAt": { "type": "string", "format": "date-time", "nullable": true }, "isSent": { "type": "boolean" }, "sentAt": { "type": "string", "format": "date-time", "nullable": true }, "sentBy": { "type": "string" }, "sentVia": { "type": "string" } } } } } } } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Purchase Order" ], "operationId": "purchaseOrder.update", "summary": "Update existing purchase order", "description": "Updates an existing purchase order.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "Purchase order update request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "date": { "type": "string", "format": "date", "description": "Date of the purchase order." }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "supplier": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "honorific": { "type": "string" }, "name": { "type": "string" }, "department": { "type": "string" }, "subDepartment": { "type": "string" }, "extraAddressLine": { "type": "string" }, "street": { "type": "string" }, "zipCode": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "country": { "type": "string" }, "contactPerson": { "type": "string" }, "telephone": { "type": "string" }, "telefax": { "type": "string" }, "email": { "type": "string" } } }, "requestForQuotation": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "bodyIntroduction": { "type": "string", "description": "Text above the position table in the PDF." }, "bodyOutroduction": { "type": "string", "description": "Text below the position table in the PDF." }, "salesOrderConfirmationReference": { "type": "string", "description": "Reference of the sales order confirmation." }, "isConfirmationRequested": { "type": "boolean", "description": "Shows if a confirmation is requested." }, "suppliersOfferReference": { "type": "string", "description": "Offer reference of the supplier." }, "internalDesignation": { "type": "string", "description": "Internal designation of the purchase order." }, "language": { "type": "object", "additionalProperties": false, "description": "Language of the purchase order.", "properties": { "iso2": { "type": "string", "pattern": "[A-Z]{2}", "default": "DE" } } }, "isConfirmed": { "type": "boolean", "description": "Shows if the purchase order is confirmed." }, "confirmedVia": { "type": "string", "enum": [ "Internet", "E-Mail", "Telephone", "Telefax", "Letter", "Other" ], "default": "Internet", "description": "Determines how the purchase order was confirmed." }, "financials": { "type": "object", "additionalProperties": false, "description": "Financial information about the purchase order.", "properties": { "paymentMethod": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "paymentTerms": { "type": "object", "additionalProperties": false, "description": "Information about payment terms of the purchase order.", "properties": { "paymentTargetDiscount": { "type": "number", "format": "float" }, "paymentTargetDays": { "type": "number" }, "paymentTargetDiscountDays": { "type": "number" }, "paymentTargetDiscountAmount": { "type": "number", "format": "float" }, "isPaymentTargetDiscountApplied": { "type": "boolean" } } }, "costCenter": { "type": "string", "description": "The assigned cost center for the purchase order." }, "tax": { "type": "object", "additionalProperties": false, "description": "Tax information of the purchase order.", "properties": { "taxation": { "type": "string", "enum": [ "Domestic", "EU delivery", "Import", "Tax free domestic" ], "default": "Domestic" }, "vatId": { "type": "string" }, "taxDisplay": { "type": "string", "enum": [ "Automatic", "Net", "Gross" ], "default": "Automatic" } } }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "delivery": { "type": "object", "additionalProperties": false, "description": "Delivery information of the purchase order.", "properties": { "deliveryTerms": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "hasDifferentDeliveryAddress": { "type": "boolean" }, "deliveryAddress": { "type": "object", "additionalProperties": false, "properties": { "honorific": { "type": "string" }, "name": { "type": "string" }, "department": { "type": "string" }, "subDepartment": { "type": "string" }, "extraAddressLine": { "type": "string" }, "street": { "type": "string" }, "zipCode": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "country": { "type": "string" }, "contactPerson": { "type": "string" } } }, "dates": { "type": "object", "additionalProperties": false, "properties": { "desiredDeliveryDate": { "type": "string", "format": "date", "nullable": true, "description": "Desired delivery date of the purchase order." }, "confirmedDeliveryDate": { "type": "string", "format": "date", "nullable": true, "description": "Confirmed delivery date of the purchase order." } } } } }, "formatting": { "type": "object", "additionalProperties": false, "description": "Formatting settings for the PDF of a purchase order.", "properties": { "hideLetterHead": { "type": "boolean" }, "hidePrices": { "type": "boolean" }, "hideProductNumbers": { "type": "boolean" }, "showLongProductNumbers": { "type": "boolean" }, "hideProductDescriptions": { "type": "boolean" }, "showOwnProductNumberInColumn": { "type": "boolean" } } }, "internalComment": { "type": "string", "description": "Internal comment about the purchase order." }, "liabilitiesInfo": { "type": "string", "description": "Information for liabilities." }, "positions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "product": { "type": "object", "description": "Reference to position Product, only one value is allowed at a time", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "sku": { "type": "string", "example": "SKU1" }, "externalReferenceNumber": { "type": "string", "example": "REF2" } } }, "name": { "type": "string" }, "description": { "type": "string" }, "quantity": { "type": "number", "format": "float" }, "price": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "taxRate": { "type": "string", "enum": [ "standard", "reduced", "free" ] }, "isDeleted": { "type": "boolean" } } } } } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "409": { "description": "Request conflict with the current state of the target resource", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/purchaseOrders/{id}/actions/cancel": { "patch": { "tags": [ "Purchase Order" ], "operationId": "purchaseOrder.actions.cancel", "summary": "Cancels a purchase order", "description": "Cancels the purchase order", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "204": { "description": "Operation completed successfully, no response body" }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "409": { "description": "Request conflict with the current state of the target resource", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "429": { "description": "Too many API calls made." } } } }, "/api/purchaseOrders/{id}/actions/release": { "patch": { "tags": [ "Purchase Order" ], "operationId": "purchaseOrder.actions.release", "summary": "Releases a purchase order", "description": "Releases the purchase order", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "204": { "description": "Operation completed successfully, no response body" }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "409": { "description": "Request conflict with the current state of the target resource", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "429": { "description": "Too many API calls made." } } } }, "/api/purchasePrices": { "post": { "tags": [ "Purchase Price" ], "operationId": "purchasePrice.create", "summary": "Create purchase price", "description": "Creates new purchase price", "requestBody": { "description": "", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "product", "fromQuantity", "price", "validFrom", "expiresAt" ], "properties": { "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "supplier": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a supplier for this price", "nullable": true }, "isStandardSupplier": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "supplierDesignation": { "type": "string", "nullable": true }, "supplierItemNumber": { "type": "string", "nullable": true }, "fromQuantity": { "type": "number", "format": "float" }, "packageAmount": { "type": "number", "format": "float", "nullable": true }, "price": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "amount": { "x-description-missing": true, "type": "number", "format": "float" }, "currency": { "x-description-missing": true, "type": "string", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ] } } }, "validFrom": { "type": "string", "format": "date", "nullable": true }, "expiresAt": { "type": "string", "format": "date", "nullable": true } } }, "examples": { "Create purchase price": { "value": { "product": { "id": "18" }, "supplier": { "id": "194" }, "isStandardSupplier": true, "supplierDesignation": "Pillow 20x20", "supplierItemNumber": "4992042-20", "fromQuantity": 50, "packageAmount": 10, "validFrom": "2021-01-01", "expiresAt": null, "price": { "amount": 7.3, "currency": "EUR" } } } } }, "application/vnd.xentral.default.v2-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "product", "fromQuantity", "price", "validFrom", "expiresAt" ], "properties": { "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "supplier": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a supplier for this price", "nullable": true }, "isStandardSupplier": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "supplierDesignation": { "type": "string", "nullable": true }, "supplierItemNumber": { "type": "string", "nullable": true }, "fromQuantity": { "type": "number", "format": "float" }, "packageAmount": { "type": "number", "format": "float", "nullable": true }, "price": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "validFrom": { "type": "string", "format": "date", "nullable": true }, "expiresAt": { "type": "string", "format": "date", "nullable": true } } }, "examples": { "Create purchase price": { "value": { "product": { "id": "18" }, "supplier": { "id": "194" }, "isStandardSupplier": true, "supplierDesignation": "Pillow 20x20", "supplierItemNumber": "4992042-20", "fromQuantity": 50, "packageAmount": 10, "validFrom": "2021-01-01", "expiresAt": null, "price": { "amount": "7.30", "currency": "EUR" } } } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "get": { "tags": [ "Purchase Price" ], "operationId": "purchasePrice.list", "summary": "List purchase prices", "parameters": [ { "name": "filter", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "id", "product", "supplier", "currency", "fromQuantity", "isValidAt" ] }, "op": { "type": "string", "enum": [ "equals", "notEquals", "in", "notIn", "exactlyIn", "allIn", "allNotIn", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan", "is" ] }, "value": { "oneOf": [ { "type": "string", "description": "Used for the operations 'equals', 'notEquals', 'contains', 'notContains', 'startsWith', 'endsWith' and 'is'.", "title": "String" }, { "type": "array", "description": "Used for the operations 'in', 'notIn', 'exactlyIn', 'allIn' and 'allNotIn'.", "title": "Array", "items": { "type": "string" } } ] } } } } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "description": "Returns list of a purchase prices", "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "supplier": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a supplier for this price", "nullable": true }, "isStandardSupplier": { "x-description-missing": true, "type": "boolean" }, "supplierDesignation": { "x-description-missing": true, "type": "string", "nullable": true }, "supplierItemNumber": { "x-description-missing": true, "type": "string", "nullable": true }, "fromQuantity": { "x-description-missing": true, "type": "number", "format": "float" }, "packageAmount": { "x-description-missing": true, "type": "number", "format": "float", "nullable": true }, "price": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "amount": { "x-description-missing": true, "type": "number", "format": "float" }, "currency": { "x-description-missing": true, "type": "string", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ] } } }, "validFrom": { "x-description-missing": true, "type": "string", "format": "date", "nullable": true }, "expiresAt": { "x-description-missing": true, "type": "string", "format": "date", "nullable": true } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } }, "examples": { "Lists all purchase prices": { "value": { "data": [ { "id": "1", "product": { "id": "5" }, "supplier": { "id": "7" }, "isStandardSupplier": false, "supplierDesignation": "123456", "supplierItemNumber": "", "fromQuantity": 1, "packageAmount": 1, "price": { "amount": 12.92, "currency": "EUR" }, "validFrom": null, "expiresAt": null }, { "id": "2", "product": { "id": "5" }, "supplier": { "id": "7" }, "isStandardSupplier": false, "supplierDesignation": "123456", "supplierItemNumber": "", "fromQuantity": 10, "packageAmount": 1, "price": { "amount": 10.45, "currency": "EUR" }, "validFrom": null, "expiresAt": "2024-04-10" } ], "extra": { "totalCount": 2, "page": { "number": 1, "size": 10 } } } } } }, "application/vnd.xentral.default.v2-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "supplier": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a supplier for this price", "nullable": true }, "isStandardSupplier": { "x-description-missing": true, "type": "boolean" }, "supplierDesignation": { "x-description-missing": true, "type": "string", "nullable": true }, "supplierItemNumber": { "x-description-missing": true, "type": "string", "nullable": true }, "fromQuantity": { "x-description-missing": true, "type": "number", "format": "float" }, "packageAmount": { "x-description-missing": true, "type": "number", "format": "float", "nullable": true }, "price": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "validFrom": { "x-description-missing": true, "type": "string", "format": "date", "nullable": true }, "expiresAt": { "x-description-missing": true, "type": "string", "format": "date", "nullable": true } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } }, "examples": { "Lists all purchase prices": { "value": { "data": [ { "id": "1", "product": { "id": "5" }, "supplier": { "id": "7" }, "isStandardSupplier": false, "supplierDesignation": "123456", "supplierItemNumber": "", "fromQuantity": 1, "packageAmount": 1, "price": { "amount": "12.92000000", "currency": "EUR" }, "validFrom": null, "expiresAt": null }, { "id": "2", "product": { "id": "5" }, "supplier": { "id": "7" }, "isStandardSupplier": false, "supplierDesignation": "123456", "supplierItemNumber": "", "fromQuantity": 10, "packageAmount": 1, "price": { "amount": "10.45000000", "currency": "EUR" }, "validFrom": null, "expiresAt": "2024-04-10" } ], "extra": { "totalCount": 2, "page": { "number": 1, "size": 10 } } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Purchase Price" ], "operationId": "purchasePrice.updateMultiple", "summary": "Update multiple purchase prices", "description": "Updates multiple purchase prices", "requestBody": { "description": "", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "supplier": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a supplier for this price", "nullable": true }, "isStandardSupplier": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "supplierDesignation": { "x-description-missing": true, "type": "string", "nullable": true }, "supplierItemNumber": { "x-description-missing": true, "type": "string", "nullable": true }, "fromQuantity": { "x-description-missing": true, "type": "number", "format": "float" }, "packageAmount": { "x-description-missing": true, "type": "number", "format": "float", "nullable": true }, "price": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "amount": { "x-description-missing": true, "type": "number", "format": "float" }, "currency": { "x-description-missing": true, "type": "string", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ] } } }, "validFrom": { "x-description-missing": true, "type": "string", "format": "date", "nullable": true }, "expiresAt": { "x-description-missing": true, "type": "string", "format": "date", "nullable": true } } } }, "examples": { "Update multiple purchase prices": { "value": [ { "id": "194", "price": { "amount": 7.3, "currency": "EUR" } }, { "id": "199", "price": { "amount": 10.3, "currency": "EUR" } } ] } } }, "application/vnd.xentral.default.v2-beta+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "supplier": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a supplier for this price", "nullable": true }, "isStandardSupplier": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "supplierDesignation": { "x-description-missing": true, "type": "string", "nullable": true }, "supplierItemNumber": { "x-description-missing": true, "type": "string", "nullable": true }, "fromQuantity": { "x-description-missing": true, "type": "number", "format": "float" }, "packageAmount": { "x-description-missing": true, "type": "number", "format": "float", "nullable": true }, "price": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "validFrom": { "x-description-missing": true, "type": "string", "format": "date", "nullable": true }, "expiresAt": { "x-description-missing": true, "type": "string", "format": "date", "nullable": true } } } }, "examples": { "Update multiple purchase prices": { "value": [ { "id": "194", "price": { "amount": "7.30", "currency": "EUR" } }, { "id": "199", "price": { "amount": "10.30", "currency": "EUR" } } ] } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/purchasePrices/{id}": { "get": { "tags": [ "Purchase Price" ], "operationId": "purchasePrice.view", "summary": "View purchase price", "description": "Returns details of a single purchase price", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "supplier": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a supplier for this price", "nullable": true }, "isStandardSupplier": { "x-description-missing": true, "type": "boolean" }, "supplierDesignation": { "x-description-missing": true, "type": "string", "nullable": true }, "supplierItemNumber": { "x-description-missing": true, "type": "string", "nullable": true }, "fromQuantity": { "x-description-missing": true, "type": "number", "format": "float" }, "packageAmount": { "x-description-missing": true, "type": "number", "format": "float", "nullable": true }, "price": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "amount": { "x-description-missing": true, "type": "number", "format": "float" }, "currency": { "x-description-missing": true, "type": "string", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ] } } }, "validFrom": { "x-description-missing": true, "type": "string", "format": "date", "nullable": true }, "expiresAt": { "x-description-missing": true, "type": "string", "format": "date", "nullable": true } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } }, "examples": { "Shows a single purchase price": { "value": { "data": { "id": "1", "product": { "id": "5" }, "supplier": { "id": "7" }, "isStandardSupplier": false, "supplierDesignation": "123456", "supplierItemNumber": "", "fromQuantity": 1, "packageAmount": 1, "price": { "amount": 12.92, "currency": "EUR" }, "validFrom": null, "expiresAt": "2024-12-12" } } } } }, "application/vnd.xentral.default.v2-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "supplier": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a supplier for this price", "nullable": true }, "isStandardSupplier": { "x-description-missing": true, "type": "boolean" }, "supplierDesignation": { "x-description-missing": true, "type": "string", "nullable": true }, "supplierItemNumber": { "x-description-missing": true, "type": "string", "nullable": true }, "fromQuantity": { "x-description-missing": true, "type": "number", "format": "float" }, "packageAmount": { "x-description-missing": true, "type": "number", "format": "float", "nullable": true }, "price": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } }, "validFrom": { "x-description-missing": true, "type": "string", "format": "date", "nullable": true }, "expiresAt": { "x-description-missing": true, "type": "string", "format": "date", "nullable": true } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } }, "examples": { "Shows a single purchase price": { "value": { "data": { "id": "1", "product": { "id": "5" }, "supplier": { "id": "7" }, "isStandardSupplier": false, "supplierDesignation": "123456", "supplierItemNumber": "", "fromQuantity": 1, "packageAmount": 1, "price": { "amount": "12.92000000", "currency": "EUR" }, "validFrom": null, "expiresAt": "2024-12-12" } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Purchase Price" ], "operationId": "purchasePrice.update", "summary": "Update purchase price", "description": "Updates details of a single purchase price", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "supplier": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Reference to a supplier for this price", "nullable": true }, "isStandardSupplier": { "description": "Loose boolean type which accepts boolean, number 0 or 1 and string 'true' or 'false'", "example": "'true'", "oneOf": [ { "type": "boolean" }, { "type": "number", "enum": [ 0, 1 ] }, { "type": "string", "enum": [ "true", "false", "True", "False", "TRUE", "FALSE" ] } ] }, "supplierDesignation": { "type": "string", "nullable": true }, "supplierItemNumber": { "type": "string", "nullable": true }, "fromQuantity": { "type": "number", "format": "float" }, "packageAmount": { "type": "number", "format": "float", "nullable": true }, "price": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "amount": { "x-description-missing": true, "type": "number", "format": "float" }, "currency": { "x-description-missing": true, "type": "string", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ] } } }, "validFrom": { "type": "string", "format": "date", "nullable": true }, "expiresAt": { "type": "string", "format": "date", "nullable": true } } }, "examples": { "Update Purchase Price": { "value": { "validFrom": "2023-12-01", "fromQuantity": 1, "price": { "amount": 24.2, "currency": "EUR" } } } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "404": { "description": "Resource was not found or not enough access privileges" }, "409": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "429": { "description": "Too many API calls made." } } }, "delete": { "tags": [ "Purchase Price" ], "operationId": "purchasePrice.delete", "summary": "Delete purchase price", "description": "Deletes a single purchase price", "requestBody": { "content": { "application/vnd.xentral.default.v1": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "204": { "description": "Operation completed successfully, no response body" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/projects": { "get": { "tags": [ "Project" ], "operationId": "Project.list", "summary": "[EARLY ACCESS] List projects", "description": "Returns a collection of projects", "parameters": [ { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "filter", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "search", "id", "name", "keyName", "description", "currency", "normalTaxRate", "reducedTaxRate", "storageProcess", "pickingProcess" ] }, "op": { "type": "string", "enum": [ "equals", "notEquals", "in", "notIn", "exactlyIn", "allIn", "allNotIn", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan", "is" ] }, "value": { "oneOf": [ { "type": "string", "description": "Used for the operations 'equals', 'notEquals', 'contains', 'notContains', 'startsWith', 'endsWith' and 'is'.", "title": "String" }, { "type": "array", "description": "Used for the operations 'in', 'notIn', 'exactlyIn', 'allIn' and 'allNotIn'.", "title": "Array", "items": { "type": "string" } } ] } } } } }, { "name": "order", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "name", "keyName", "description", "currency", "normalTaxRate", "reducedTaxRate", "storageProcess", "pickingProcess" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "x-description-missing": true, "type": "string" }, "keyName": { "x-description-missing": true, "type": "string" }, "description": { "x-description-missing": true, "type": "string" }, "currency": { "x-description-missing": true, "type": "string" }, "normalTaxRate": { "x-description-missing": true, "type": "number", "format": "float" }, "reducedTaxRate": { "x-description-missing": true, "type": "number", "format": "float" }, "storageProcess": { "x-description-missing": true, "type": "string", "enum": [ "none", "order", "orderPointOfSale" ] }, "pickingProcess": { "x-description-missing": true, "type": "string", "enum": [ "invoiceMail", "shipmentNote", "shipmentNoteScan", "shipmentNoteWarehouse", "shipmentNoteWarehouseScan", "twoLevel" ] } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } }, "example": { "data": [ { "id": "91", "name": "Standard - 1", "keyName": "STANDARD1", "description": "This is a standard project", "currency": "EUR", "normalTaxRate": 19, "reducedTaxRate": 7, "storageProcess": "none", "pickingProcess": "twoLevel" }, { "id": "92", "name": "Standard - 2", "keyName": "STANDARD2", "description": "This is a standard project", "currency": "CH", "normalTaxRate": 20, "reducedTaxRate": 10, "storageProcess": "order", "pickingProcess": "shipmentNote" } ], "extra": { "totalCount": 2, "page": { "number": 1, "size": 10 } } } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/projects/{id}/posSettings": { "get": { "tags": [ "Project" ], "operationId": "Project.posSettings", "summary": "[EARLY ACCESS] List POS settings for project", "description": "Returns a list of POS settings of a project", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "storageProcess": { "x-description-missing": true, "type": "string" }, "adapterBoxId": { "x-description-missing": true, "type": "integer" }, "warehouse": { "x-description-missing": true, "type": "integer" }, "priceGroup": { "x-description-missing": true, "type": "integer" }, "cashRegister": { "x-description-missing": true, "type": "integer" }, "defaultCustomer": { "x-description-missing": true, "type": "integer" }, "allowAllCustomers": { "x-description-missing": true, "type": "boolean" }, "allowOnlyProjectItems": { "x-description-missing": true, "type": "boolean" }, "sumItems": { "x-description-missing": true, "type": "boolean" }, "discountItems": { "x-description-missing": true, "type": "integer" }, "createDeliveryNote": { "x-description-missing": true, "type": "boolean" }, "label1": { "x-description-missing": true, "type": "string" }, "label2": { "x-description-missing": true, "type": "string" }, "applyItemDescriptionToReceipts": { "x-description-missing": true, "type": "boolean" }, "displayNet": { "x-description-missing": true, "type": "boolean" }, "allowMultipleOrdersPerCashier": { "x-description-missing": true, "type": "boolean" }, "journalPdfDetailedView": { "x-description-missing": true, "type": "boolean" }, "hideIndividualBookings": { "x-description-missing": true, "type": "boolean" }, "monthlyReportsWithoutIndividualDays": { "x-description-missing": true, "type": "boolean" }, "hideCountingLog": { "x-description-missing": true, "type": "boolean" }, "hideSignatureBlock": { "x-description-missing": true, "type": "boolean" }, "buttonPaymentBar": { "x-description-missing": true, "type": "boolean" }, "buttonPaymentBarPaid": { "x-description-missing": true, "type": "boolean" }, "buttonPaymentEc": { "x-description-missing": true, "type": "boolean" }, "buttonPaymentEcPaid": { "x-description-missing": true, "type": "boolean" }, "buttonPaymentCreditCard": { "x-description-missing": true, "type": "boolean" }, "buttonPaymentCreditCardPaid": { "x-description-missing": true, "type": "boolean" }, "buttonPaymentTransfer": { "x-description-missing": true, "type": "boolean" }, "buttonPaymentTransferPaid": { "x-description-missing": true, "type": "boolean" }, "buttonInvoice": { "x-description-missing": true, "type": "boolean" }, "buttonReceipt": { "x-description-missing": true, "type": "boolean" }, "buttonDiscountPercent": { "x-description-missing": true, "type": "boolean" }, "buttonDiscountEuro": { "x-description-missing": true, "type": "boolean" }, "buttonWithdrawal": { "x-description-missing": true, "type": "boolean" }, "buttonDeposit": { "x-description-missing": true, "type": "boolean" }, "buttonTipping": { "x-description-missing": true, "type": "boolean" }, "buttonTippingCredit": { "x-description-missing": true, "type": "boolean" }, "buttonOpenDrawer": { "x-description-missing": true, "type": "boolean" }, "buttonLoadReceipts": { "x-description-missing": true, "type": "boolean" }, "buttonCancellation": { "x-description-missing": true, "type": "boolean" }, "cashierAutologout": { "x-description-missing": true, "type": "integer" }, "cashierAutologoutAfterPaymenet": { "x-description-missing": true, "type": "integer" }, "extendedAddressFields": { "x-description-missing": true, "type": "boolean" }, "compulsorySelectionPaymentMethod": { "x-description-missing": true, "type": "boolean" }, "preselectionOfSalutation": { "x-description-missing": true, "type": "string" }, "printerReceiptAfterCompletion": { "x-description-missing": true, "type": "string" }, "printerId": { "x-description-missing": true, "type": "integer" }, "printerNumberOfDeliveryNotes": { "x-description-missing": true, "type": "integer" }, "printerNumberOfInvoices": { "x-description-missing": true, "type": "integer" }, "printerNumberOfCreditNotes": { "x-description-missing": true, "type": "integer" }, "printerNumberOfDeliveryNoteDuplicates": { "x-description-missing": true, "type": "integer" }, "printerPrintReceiptWithInvoice": { "x-description-missing": true, "type": "boolean" }, "printerPrintQr": { "x-description-missing": true, "type": "boolean" }, "printerReceiptActive": { "x-description-missing": true, "type": "boolean" }, "printerReceiptCount": { "x-description-missing": true, "type": "integer" }, "printerReceiptLine1": { "x-description-missing": true, "type": "string" }, "printerReceiptLine2": { "x-description-missing": true, "type": "string" }, "printerReceiptLine3": { "x-description-missing": true, "type": "string" }, "printerReceiptFreeField": { "x-description-missing": true, "type": "boolean" }, "printerReceiptQr": { "x-description-missing": true, "type": "boolean" }, "ownVatId": { "x-description-missing": true, "type": "string", "format": "float", "nullable": true } } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/returns": { "post": { "tags": [ "Return" ], "operationId": "return.create", "summary": "[EARLY ACCESS] Create a return", "description": "Creates a new return.", "requestBody": { "description": "Request payload for return creation", "content": { "application/vnd.xentral.fromsalesorder.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "salesOrder" ], "properties": { "date": { "type": "string", "format": "date", "nullable": true, "example": "2023-03-16" }, "salesOrder": { "type": "object", "additionalProperties": false, "required": [ "id", "positions" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "positions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "quantity", "returnReason" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "quantity": { "type": "number", "format": "double", "example": 14 }, "returnReason": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } } } } } } } }, "examples": { "Create a return from a return": { "value": { "date": "2023-10-16", "salesOrder": { "id": "155", "positions": [ { "id": "345", "quantity": 1, "returnReason": { "id": "1" } }, { "id": "346", "quantity": 3, "returnReason": { "id": "2" } } ] } } } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "415": { "description": "Resource representation send in the request is not supported." } } }, "get": { "tags": [ "Return" ], "operationId": "return.list", "summary": "[EARLY ACCESS] List returns", "description": "Lists existing returns", "parameters": [ { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "filter", "in": "query", "style": "deepObject", "schema": { "oneOf": [ { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "customerId", "salesOrderId" ] }, "op": { "type": "string", "enum": [ "equals", "in" ] }, "value": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] } } } } ] } } ], "responses": { "200": { "description": "A list of returns", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "date", "documentNumber", "tags", "customer", "salesOrder", "status" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "date": { "type": "string", "nullable": true, "format": "date", "example": "2023-03-16", "description": "Date of creation of the Return order" }, "status": { "type": "string", "enum": [ "unknown", "open", "canceled", "completed", "sent", "created", "announced", "released", "checked", "done" ], "description": "Status of the Return order", "example": "completed" }, "documentNumber": { "type": "string", "nullable": true, "example": "2023-000001", "description": "Internal identification of the Return order" }, "tags": { "description": "A list of tags", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The identifier of the tag", "type": "string", "pattern": "\\d+", "example": "1337" }, "name": { "description": "The name of the tag", "type": "string", "example": "Active" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "salesOrder": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "customer": { "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id", "number" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "number": { "type": "string", "example": "K-000001", "nullable": true } }, "description": "Customer linked to the Return order", "example": { "id": "1", "number": "K-000001" } } } }, "description": "Data representation of a list of Return orders", "example": [ { "id": "1", "date": "2023-03-16", "documentNumber": "2023-000001", "tags": [], "customer": { "id": "1", "number": "K-000001" }, "salesOrder": { "id": "1" }, "status": "completed" } ] }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/returns/{id}": { "get": { "tags": [ "Return" ], "operationId": "return.view", "summary": "[EARLY ACCESS] View return", "description": "Return details of an existing return", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "One return.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "object", "additionalProperties": false, "required": [ "id", "date", "salesOrder", "positions" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "date": { "type": "string", "nullable": true, "format": "date", "example": "2023-03-16", "description": "Date of creation of the Return order" }, "salesOrder": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "positions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "quantity", "returnReason", "product", "salesOrderPosition" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "quantity": { "type": "number", "format": "double", "example": 14.5 }, "salesOrderPosition": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "product": { "type": "object", "additionalProperties": false, "required": [ "id", "number", "name" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "number": { "type": "string", "example": "SKU-700010" }, "name": { "type": "string", "example": "Product name" } } }, "returnReason": { "type": "object", "required": [ "designation" ], "properties": { "designation": { "type": "string", "nullable": true, "example": "Damaged" } } } } }, "description": "Items included within the Return order", "example": [ { "id": "1", "quantity": 3, "salesOrderPosition": { "id": "1" }, "product": { "id": "1", "number": "SKU-700010", "name": "Product name" }, "returnReason": { "designation": "Damaged" } } ] } }, "description": "Representation of a Return order", "example": { "id": "1", "date": "2023-03-16", "salesOrder": { "id": "1" }, "positions": [ { "id": "1", "quantity": 3, "salesOrderPosition": { "id": "1" }, "product": { "id": "1", "number": "SKU-700010", "name": "Product name" }, "returnReason": { "designation": "Damaged" } } ] } } } } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/returns/{id}/documents": { "post": { "tags": [ "Return" ], "operationId": "return.createDocument", "summary": "[EARLY ACCESS] Create return document", "description": "Creates new return document", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "Sales order document create request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "nullable": true }, "description": { "type": "string", "nullable": true }, "keyword": { "type": "string", "enum": [ "otherFile", "coverPage", "attachment" ] }, "fileName": { "type": "string" }, "fileContent": { "type": "string", "description": "A base64 encoded document. Supported formats PDF", "format": "byte" } } }, "examples": { "Create product media": { "value": { "title": "Sales order document", "description": "Sales order document", "keyword": "otherFile", "fileName": "sample.pdf", "fileContent": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=" } } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Return" ], "operationId": "return.updateMultiple", "summary": "[EARLY ACCESS] Update multiple return documents", "description": "Updates multiple return documents", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "Sales order documents update multiple request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "title": { "x-description-missing": true, "type": "string", "nullable": true }, "description": { "x-description-missing": true, "type": "string", "nullable": true }, "keyword": { "x-description-missing": true, "type": "string", "enum": [ "otherFile", "coverPage", "attachment" ] }, "sort": { "x-description-missing": true, "type": "integer", "nullable": true } } } }, "examples": { "Update multiple return documents": { "value": [ { "id": "52", "title": "Sales order document", "description": "Sales order document", "keyword": "attachment", "sort": 1 }, { "id": "53", "title": "Second return document", "description": "Second return document", "sort": 2 } ] } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "delete": { "tags": [ "Return" ], "operationId": "return.deleteMultiple", "summary": "[EARLY ACCESS] Delete multiple return documents", "description": "Deletes a multiple return documents", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "Sales order documents delete multiple request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } }, "examples": { "Delete multiple return documents": { "value": [ { "id": "52" }, { "id": "53" } ] } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "get": { "tags": [ "Return" ], "operationId": "return.listDocument", "summary": "[EARLY ACCESS] View return document list", "description": "Returns a list of given return documents", "parameters": [ { "name": "filter", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "id", "currentFileVersionId", "fileName" ] }, "op": { "type": "string", "enum": [ "equals", "notEquals", "in", "notIn", "exactlyIn", "allIn", "allNotIn", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan", "is" ] }, "value": { "oneOf": [ { "type": "string", "description": "Used for the operations 'equals', 'notEquals', 'contains', 'notContains', 'startsWith', 'endsWith' and 'is'.", "title": "String" }, { "type": "array", "description": "Used for the operations 'in', 'notIn', 'exactlyIn', 'allIn' and 'allNotIn'.", "title": "Array", "items": { "type": "string" } } ] } } } } }, { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "entity": { "x-description-missing": true, "type": "string" }, "entityId": { "x-description-missing": true, "type": "integer" }, "title": { "x-description-missing": true, "type": "string", "nullable": true }, "description": { "x-description-missing": true, "type": "string", "nullable": true }, "keyword": { "x-description-missing": true, "type": "string", "nullable": true }, "sort": { "x-description-missing": true, "type": "integer" }, "currentVersion": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "version": { "type": "integer" }, "remark": { "type": "string", "nullable": true }, "filename": { "type": "string" }, "size": { "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "integer" }, "unit": { "type": "string", "enum": [ "byte" ], "description": "Currently only byte as unit allowed." } } }, "updatedAt": { "type": "string", "format": "date-time" } } }, "updatedAt": { "x-description-missing": true, "type": "string", "format": "date-time" } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/returns/{id}/documents/{documentId}": { "get": { "tags": [ "Return" ], "operationId": "return.viewDocument", "summary": "[EARLY ACCESS] View return document", "description": "Returns details of a single return document", "parameters": [ { "name": "documentId", "in": "path", "description": "ID of document", "required": true, "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "entity": { "x-description-missing": true, "type": "string" }, "entityId": { "x-description-missing": true, "type": "integer" }, "title": { "x-description-missing": true, "type": "string", "nullable": true }, "description": { "x-description-missing": true, "type": "string", "nullable": true }, "keyword": { "x-description-missing": true, "type": "string", "nullable": true }, "sort": { "x-description-missing": true, "type": "integer" }, "versions": { "type": "array", "items": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "version": { "type": "integer" }, "remark": { "type": "string", "nullable": true }, "filename": { "type": "string" }, "size": { "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "integer" }, "unit": { "type": "string", "enum": [ "byte" ], "description": "Currently only byte as unit allowed." } } }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "currentVersion": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "version": { "type": "integer" }, "remark": { "type": "string", "nullable": true }, "filename": { "type": "string" }, "size": { "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "integer" }, "unit": { "type": "string", "enum": [ "byte" ], "description": "Currently only byte as unit allowed." } } }, "updatedAt": { "type": "string", "format": "date-time" } } }, "updatedAt": { "x-description-missing": true, "type": "string", "format": "date-time" } } } } } }, "image/*": { "schema": { "type": "string", "format": "binary" } }, "application/pdf": { "schema": { "type": "string", "format": "binary" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/returns/{id}/actions/release": { "post": { "tags": [ "Return" ], "operationId": "return.actions.release", "summary": "[EARLY ACCESS] Release a return", "description": "Releases a return.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "Empty", "content": { "application/vnd.xentral.default.v1-beta": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." } } } }, "/api/returnReasons": { "get": { "tags": [ "Return Reason" ], "operationId": "returnReason.list", "summary": "[EARLY ACCESS] List of return reasons", "description": "Returns a list of return reasons", "parameters": [ { "name": "project", "style": "deepObject", "in": "query", "schema": { "type": "object", "additionalProperties": false, "description": "Project to optionally filter by", "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } }, { "name": "language", "in": "query", "schema": { "type": "string", "description": "Language code, 2-letter ISO code." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "designation", "description", "language", "project" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "designation": { "type": "string", "example": "Broken packaging", "description": "Designation of the return reason" }, "description": { "type": "string", "example": "The boxes have been ripped off during transit", "description": "Description of the return reason" }, "language": { "type": "string", "example": "DE", "description": "Language in which the return reason is written" }, "project": { "type": "object", "required": [ "id" ], "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "description": "Project for the return reason", "example": { "id": "1" } } } }, "description": "Data representation of a list of return reasons", "example": [ { "id": "1", "designation": "Broken packaging", "description": "The boxes have been ripped off during transit", "language": "DE", "project": { "id": "1" } } ] }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "415": { "description": "Resource representation send in the request is not supported." } } } }, "/api/salesOrders": { "get": { "tags": [ "Sales Order" ], "operationId": "salesOrder.list", "summary": "[EARLY ACCESS] List sales orders", "description": "Returns a collection with all sales orders.", "parameters": [ { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id, documentNumber" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } }, { "name": "filter", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "orderDate", "status", "documentNumber", "transactionNumber", "externalOrderNumber", "customerOrderNumber", "externalOrderId" ] }, "op": { "type": "string", "enum": [ "greaterThan", "lessThan", "equals", "notEquals", "in", "notIn" ] }, "value": { "oneOf": [ { "type": "string", "description": "For dates use format: 2023-01-26T10:42:42+01:00 and encode as url. Valid statuses are created,released,canceled,completed.", "title": "String" }, { "type": "array", "description": "Used for the operations 'in', 'notIn', 'exactlyIn', 'allIn' and 'allNotIn'.", "title": "Array", "items": { "type": "string" } } ] } } } } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "documentNumber": { "type": "string", "description": "Internal identification associated with a Sales Order", "example": "SO-1234" }, "externalOrderNumber": { "type": "string", "description": "External identification associated with a Sales Order", "example": "ESO-1234" }, "transactionNumber": { "type": "string", "description": "Transaction number associated with a Sales Order", "example": "transaction1" }, "customerOrderNumber": { "type": "string", "description": "Customer order associated with a Sales Order", "example": "customerOrder1" }, "externalOrderId": { "type": "string", "description": "External ID associated with a Sales Order", "example": "10" }, "bodyOutroduction": { "type": "string", "description": "Ending description message for Sales Order", "example": "Additional info" }, "date": { "type": "string", "format": "date", "description": "Date of creation of a Sales Order", "example": "2025-01-01" }, "status": { "type": "string", "enum": [ "completed", "created", "released", "canceled", "unknown" ], "description": "Status of the Sales Order", "example": "completed" }, "customer": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "number": { "type": "string", "nullable": true } }, "description": "Customer linked to a Sales Order", "example": { "id": "1" } }, "comment": { "type": "string", "description": "Comment included in the Sales Order", "example": "Comment" }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "language": { "type": "object", "additionalProperties": false, "required": [ "iso2" ], "properties": { "iso2": { "type": "string", "description": "ISO 639-1 Code", "nullable": true } }, "description": "Language information for a Sales Order", "example": { "iso2": "DE" } }, "log": { "type": "object", "properties": { "createdAt": { "type": "string", "format": "date-time", "nullable": true }, "createdBy": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } } } }, "description": "Logging information for the Sales Order", "example": { "createdAt": "2023-12-01 00:00:00", "createdBy": { "id": "1", "name": "User 1" } } }, "financials": { "type": "object", "additionalProperties": false, "required": [ "paymentMethod", "currency" ], "properties": { "paymentMethod": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "currency": { "type": "string" }, "billingAddress": { "type": "object", "additionalProperties": false, "required": [ "name", "country" ], "properties": { "type": { "type": "string", "enum": [ "mr", "mrs", "company", "other" ] }, "name": { "type": "string" }, "contactPerson": { "type": "string" }, "department": { "type": "string" }, "subDepartment": { "type": "string" }, "street": { "type": "string" }, "zipCode": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "country": { "type": "string" }, "addressSupplement": { "type": "string" }, "gln": { "type": "string" }, "email": { "type": "string", "format": "email" } } }, "tax": { "type": "object", "additionalProperties": false, "properties": { "taxation": { "type": "string", "enum": [ "domestic", "eu", "export", "taxfreedomestic" ] }, "vatId": { "type": "string" }, "taxDisplay": { "type": "string", "enum": [ "gross", "net", "auto" ] }, "noTaxInfoText": { "type": "boolean" }, "normalTaxRate": { "type": "number", "format": "float" }, "reducedTaxRate": { "type": "number", "format": "float" } } }, "paymentTerms": { "type": "object", "additionalProperties": false, "properties": { "paymentTargetDiscount": { "type": "number", "format": "float" }, "paymentTargetDays": { "type": "integer", "format": "int64" }, "paymentTargetDiscountDays": { "type": "integer", "format": "int64" } } } }, "description": "Financial information for a Sales Order", "example": { "paymentMethod": { "id": "3" }, "currency": "EUR" } }, "delivery": { "allOf": [ { "type": "object", "properties": { "autoShipping": { "type": "boolean" }, "fastLane": { "type": "boolean" }, "shippingCosts": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "shippingCostProduct", "quantity" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "quantity": { "type": "number", "format": "double" }, "comment": { "type": "string" }, "shippingCostProduct": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "description": { "type": "string" }, "freeFields": { "type": "array", "nullable": true, "items": { "type": "object", "additionalProperties": false, "required": [ "id", "value" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "value": { "type": "string" } } } }, "number": { "type": "string", "nullable": true } } }, "tax": { "type": "object", "required": [ "taxText" ], "properties": { "effectiveVatRate": { "type": "number", "format": "float", "description": "The final VAT on a position. Calculated based on other fields. Only supported on the view endpoint and is always returned" }, "vatCategory": { "type": "string", "nullable": true, "enum": [ "reduced", "normal", "exempt" ], "description": "VAT category. When importing a position only one of `rate` or `vatCategory` must be used.", "example": "reduced" }, "rate": { "type": "number", "format": "float", "example": 0.5, "nullable": true, "description": "VAT rate. When importing a position only one of `rate` or `vatCategory` must be used." }, "taxText": { "type": "string", "example": "Tax Text", "nullable": true, "description": "Tax Text" } } }, "price": { "type": "object", "additionalProperties": false, "properties": { "amount": { "type": "string", "format": "float" }, "currency": { "type": "string", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ] } } }, "discount": { "type": "number", "format": "float" }, "webId": { "type": "string" } } } }, "shippingAddress": { "type": "object", "additionalProperties": false, "required": [ "name", "city", "country", "zipCode", "street" ], "properties": { "type": { "type": "string", "enum": [ "mr", "mrs", "company", "other" ] }, "name": { "type": "string" }, "department": { "type": "string" }, "contactPerson": { "type": "string" }, "subDepartment": { "type": "string" }, "street": { "type": "string" }, "zipCode": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "country": { "type": "string" }, "addressSupplement": { "type": "string" }, "gln": { "type": "string" }, "email": { "type": "string", "format": "email" } } } } }, { "type": "object", "properties": { "email": { "type": "string", "format": "email" }, "conditions": { "type": "string" } } } ], "description": "Delivery information for the Sales Order", "example": { "autoShipping": true, "fastLane": true, "shippingMethod": { "id": "1" }, "shippingCosts": [ { "id": "1", "quantity": 3, "shippingCostProduct": { "id": "1" } } ], "email": "user.email@email.org", "conditions": "none" } } } }, "description": "Response data containing list of Sales Orders", "example": [ { "id": "1", "documentNumber": "SO1", "externalOrderNumber": "ES01", "transactionNumber": "transaction1", "customerOrderNumber": "customerOrder1", "externalOrderId": "10", "bodyOutroduction": "body", "date": "2024-01-01", "status": "created", "customer": { "id": "1" }, "comment": "Additional comments", "project": { "id": "1" }, "language": { "iso2": "DE" }, "log": { "createdAt": "2023-12-01 00:00:00", "createdBy": { "id": "1", "name": "User 1" } }, "financials": { "paymentMethod": { "id": "3" }, "currency": "EUR" }, "delivery": { "autoShipping": true, "fastLane": true, "shippingCosts": [ { "id": "1", "quantity": 3, "shippingCostProduct": { "id": "1" } } ], "email": "user.email@email.org", "conditions": "none" } } ] }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } }, "application/vnd.xentral.minimal.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "documentNumber": { "type": "string", "description": "Internal identification associated with a Sales Order", "example": "SO-1234" }, "date": { "type": "string", "description": "Date of creation of a Sales Order", "example": "2025-01-01" }, "status": { "type": "string", "enum": [ "completed", "created", "released", "canceled", "unknown" ], "description": "Status of the Sales Order", "example": "completed" } }, "description": "Minimal representation of a Sales Order", "example": { "id": "1", "documentNumber": "SO1", "date": "2025-01-01", "status": "completed" } }, "description": "Response data containing list with minimal information of Sales Orders", "example": [ { "id": "1", "documentNumber": "SO1", "date": "2025-01-01", "status": "completed" } ] }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/salesOrders/actions/import": { "post": { "tags": [ "Sales Order" ], "operationId": "salesOrder.import", "summary": "[EARLY ACCESS] Import sales order", "description": "Import a sales order from external marketplace", "requestBody": { "description": "Sales order import request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "date", "customer", "project", "financials", "delivery", "positions" ], "properties": { "date": { "type": "string", "format": "date" }, "externalOrderNumber": { "type": "string", "description": "Customer-facing sales order number in the originating shop system / platform (e.g. Shopify, Amazon, etc)" }, "externalOrderId": { "type": "string", "description": "technical sales order ID in the originating shop system / platform (e.g. Shopify, Amazyon, etc). This ID is used to sync status updates & tracking info back to the originating shop / platform" }, "transactionNumber": { "type": "string", "description": "transaction number typically used to identify payment transactions in the originating shop system / platforms (e.g. Shopify, Amazon, etc). This ID is typically used for financial reconciliation of payment transactions with sales orders / invoices in Xentral." }, "customerOrderNumber": { "type": "string", "description": "Purchase Order number from the customer’s purchase order system, typically used in B2B context." }, "bodyIntroduction": { "type": "string" }, "bodyOutroduction": { "type": "string" }, "internalDesignation": { "type": "string" }, "comment": { "type": "string" }, "tags": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } }, "customer": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "salesChannel": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "language": { "type": "object", "additionalProperties": false, "required": [ "iso2" ], "properties": { "iso2": { "type": "string", "description": "ISO 639-1 Code", "nullable": true } }, "description": "Language information for a Sales Order", "example": { "iso2": "DE" } }, "financials": { "type": "object", "additionalProperties": false, "required": [ "paymentMethod", "currency" ], "properties": { "paymentMethod": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "currency": { "type": "string" }, "billingAddress": { "type": "object", "additionalProperties": false, "required": [ "name", "country" ], "properties": { "type": { "type": "string", "enum": [ "mr", "mrs", "company", "other" ] }, "name": { "type": "string" }, "contactPerson": { "type": "string" }, "department": { "type": "string" }, "subDepartment": { "type": "string" }, "street": { "type": "string" }, "zipCode": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "country": { "type": "string" }, "addressSupplement": { "type": "string" }, "gln": { "type": "string" }, "email": { "type": "string", "format": "email" } } }, "tax": { "type": "object", "additionalProperties": false, "properties": { "taxation": { "type": "string", "enum": [ "domestic", "eu", "export", "taxfreedomestic" ] }, "vatId": { "type": "string" }, "taxDisplay": { "type": "string", "enum": [ "gross", "net", "auto" ] }, "noTaxInfoText": { "type": "boolean" }, "normalTaxRate": { "type": "number", "format": "float" }, "reducedTaxRate": { "type": "number", "format": "float" } } }, "paymentTerms": { "type": "object", "additionalProperties": false, "properties": { "paymentTargetDiscount": { "type": "number", "format": "float" }, "paymentTargetDays": { "type": "integer", "format": "int64" }, "paymentTargetDiscountDays": { "type": "integer", "format": "int64" } } } }, "description": "Financial information for a Sales Order", "example": { "paymentMethod": { "id": "3" }, "currency": "EUR" } }, "delivery": { "allOf": [ { "type": "object", "properties": { "autoShipping": { "type": "boolean" }, "fastLane": { "type": "boolean" }, "shippingCosts": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "shippingCostProduct", "quantity" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "quantity": { "type": "number", "format": "double" }, "comment": { "type": "string" }, "shippingCostProduct": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "description": { "type": "string" }, "freeFields": { "type": "array", "nullable": true, "items": { "type": "object", "additionalProperties": false, "required": [ "id", "value" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "value": { "type": "string" } } } }, "number": { "type": "string", "nullable": true } } }, "tax": { "type": "object", "required": [ "taxText" ], "properties": { "effectiveVatRate": { "type": "number", "format": "float", "description": "The final VAT on a position. Calculated based on other fields. Only supported on the view endpoint and is always returned" }, "vatCategory": { "type": "string", "nullable": true, "enum": [ "reduced", "normal", "exempt" ], "description": "VAT category. When importing a position only one of `rate` or `vatCategory` must be used.", "example": "reduced" }, "rate": { "type": "number", "format": "float", "example": 0.5, "nullable": true, "description": "VAT rate. When importing a position only one of `rate` or `vatCategory` must be used." }, "taxText": { "type": "string", "example": "Tax Text", "nullable": true, "description": "Tax Text" } } }, "price": { "type": "object", "additionalProperties": false, "properties": { "amount": { "type": "string", "format": "float" }, "currency": { "type": "string", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ] } } }, "discount": { "type": "number", "format": "float" }, "webId": { "type": "string" } } } }, "shippingAddress": { "type": "object", "additionalProperties": false, "required": [ "name", "city", "country", "zipCode", "street" ], "properties": { "type": { "type": "string", "enum": [ "mr", "mrs", "company", "other" ] }, "name": { "type": "string" }, "department": { "type": "string" }, "contactPerson": { "type": "string" }, "subDepartment": { "type": "string" }, "street": { "type": "string" }, "zipCode": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "country": { "type": "string" }, "addressSupplement": { "type": "string" }, "gln": { "type": "string" }, "email": { "type": "string", "format": "email" } } } } }, { "type": "object", "required": [ "shippingMethod" ], "properties": { "shippingMethod": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "deliveryTerms": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "shippingCosts": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "shippingCostProduct", "quantity" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "quantity": { "type": "number", "format": "double" }, "comment": { "type": "string" }, "shippingCostProduct": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "description": { "type": "string" }, "freeFields": { "type": "array", "nullable": true, "items": { "type": "object", "additionalProperties": false, "required": [ "id", "value" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "value": { "type": "string" } } } }, "number": { "type": "string", "nullable": true } } }, "tax": { "type": "object", "required": [ "taxText" ], "properties": { "effectiveVatRate": { "type": "number", "format": "float", "description": "The final VAT on a position. Calculated based on other fields. Only supported on the view endpoint and is always returned" }, "vatCategory": { "type": "string", "nullable": true, "enum": [ "reduced", "normal", "exempt" ], "description": "VAT category. When importing a position only one of `rate` or `vatCategory` must be used.", "example": "reduced" }, "rate": { "type": "number", "format": "float", "example": 0.5, "nullable": true, "description": "VAT rate. When importing a position only one of `rate` or `vatCategory` must be used." }, "taxText": { "type": "string", "example": "Tax Text", "nullable": true, "description": "Tax Text" } } }, "price": { "type": "object", "additionalProperties": false, "properties": { "amount": { "type": "string", "format": "float" }, "currency": { "type": "string", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ] } } }, "discount": { "type": "number", "format": "float" }, "webId": { "type": "string" } } } } } } ] }, "positions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "product", "quantity" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "quantity": { "type": "number", "format": "double" }, "comment": { "type": "string" }, "product": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "description": { "type": "string" }, "freeFields": { "type": "array", "nullable": true, "items": { "type": "object", "additionalProperties": false, "required": [ "id", "value" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "value": { "type": "string" } } } }, "number": { "type": "string", "nullable": true } } }, "tax": { "type": "object", "required": [ "taxText" ], "properties": { "effectiveVatRate": { "type": "number", "format": "float", "description": "The final VAT on a position. Calculated based on other fields. Only supported on the view endpoint and is always returned" }, "vatCategory": { "type": "string", "nullable": true, "enum": [ "reduced", "normal", "exempt" ], "description": "VAT category. When importing a position only one of `rate` or `vatCategory` must be used.", "example": "reduced" }, "rate": { "type": "number", "format": "float", "example": 0.5, "nullable": true, "description": "VAT rate. When importing a position only one of `rate` or `vatCategory` must be used." }, "taxText": { "type": "string", "example": "Tax Text", "nullable": true, "description": "Tax Text" } } }, "price": { "type": "object", "additionalProperties": false, "properties": { "amount": { "type": "string", "format": "float" }, "currency": { "type": "string", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ] } } }, "discount": { "type": "number", "format": "float" }, "webId": { "type": "string" } } } }, "discountPositions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "discountProduct", "quantity" ], "properties": { "quantity": { "type": "number", "format": "double" }, "discountProduct": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "description": { "type": "string" }, "freeFields": { "type": "array", "nullable": true, "items": { "type": "object", "additionalProperties": false, "required": [ "id", "value" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "value": { "type": "string" } } } }, "number": { "type": "string", "nullable": true } } }, "tax": { "type": "object", "required": [ "taxText" ], "properties": { "effectiveVatRate": { "type": "number", "format": "float", "description": "The final VAT on a position. Calculated based on other fields. Only supported on the view endpoint and is always returned" }, "vatCategory": { "type": "string", "nullable": true, "enum": [ "reduced", "normal", "exempt" ], "description": "VAT category. When importing a position only one of `rate` or `vatCategory` must be used.", "example": "reduced" }, "rate": { "type": "number", "format": "float", "example": 0.5, "nullable": true, "description": "VAT rate. When importing a position only one of `rate` or `vatCategory` must be used." }, "taxText": { "type": "string", "example": "Tax Text", "nullable": true, "description": "Tax Text" } } }, "value": { "type": "object", "additionalProperties": false, "properties": { "amount": { "type": "string", "format": "float" }, "currency": { "type": "string", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ] } } }, "webId": { "type": "string" } } } } } }, "examples": { "Import sales order": { "value": { "date": "2023-12-01", "externalOrderNumber": "120013", "externalOrderId": "453894034", "customer": { "id": "394" }, "project": { "id": "4" }, "salesChannel": { "id": "3" }, "language": { "iso2": "de" }, "financials": { "paymentMethod": { "id": "1" }, "currency": "EUR", "billingAddress": { "type": "mrs", "name": "Jane Doe", "street": "Musterstraße 1", "zipCode": "12345", "city": "Musterstadt", "country": "DE" }, "tax": { "taxation": "domestic", "taxDisplay": "gross" } }, "delivery": { "autoShipping": true, "fastLane": false, "shippingAddress": { "type": "mrs", "name": "Jane Doe", "street": "Musterstraße 1", "zipCode": "12345", "city": "Musterstadt", "country": "DE" }, "shippingMethod": { "id": "4" }, "shippingCosts": [ { "shippingCostProduct": { "id": "453" }, "quantity": 1 } ] }, "positions": [ { "product": { "id": "241" }, "quantity": 1, "price": { "amount": "10.00", "currency": "EUR" }, "tax": { "taxText": "19% MwSt.", "vatCategory": "normal" }, "webId": "2395028" }, { "product": { "id": "494" }, "quantity": 4, "price": { "amount": "20.00", "currency": "EUR" }, "discount": 10, "tax": { "taxText": "7% MwSt.", "vatCategory": "reduced" }, "webId": "2395029" } ] } } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." } } } }, "/api/salesOrders/{id}/actions/dispatch": { "post": { "tags": [ "Sales Order" ], "operationId": "salesOrder.actions.dispatch", "summary": "[EARLY ACCESS] Dispatch a released sales order", "description": "[EARLY ACCESS] Dispatch a released sales order, if it fulfills all requirements", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "Empty", "content": { "application/vnd.xentral.default.v1-beta": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/salesOrders/{id}/actions/cancel": { "post": { "tags": [ "Sales Order" ], "operationId": "salesOrder.actions.cancel", "summary": "Cancel a sales order", "description": "Cancels a sales order. Only sales orders in status 'created' or 'completed' can be canceled. For draft sales orders use the delete endpoint.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "Empty", "content": { "application/vnd.xentral.default.v1-beta": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "409": { "description": "Request conflict with the current state of the target resource", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "429": { "description": "Too many API calls made." } } } }, "/api/salesOrders/{id}": { "get": { "tags": [ "Sales Order" ], "operationId": "salesOrder.view", "summary": "[EARLY ACCESS] View sales order", "description": "Returns details of a sales order", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "documentNumber": { "type": "string", "description": "Internal identification associated with a Sales Order", "example": "SO-1234" }, "externalOrderNumber": { "type": "string", "description": "External identification associated with a Sales Order", "example": "ESO-1234" }, "transactionNumber": { "type": "string", "description": "Transaction number associated with a Sales Order", "example": "transaction1" }, "customerOrderNumber": { "type": "string", "description": "Customer order associated with a Sales Order", "example": "customerOrder1" }, "externalOrderId": { "type": "string", "description": "External ID associated with a Sales Order", "example": "10" }, "salesChannel": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "bodyIntroduction": { "type": "string", "description": "Initial description message for Sales Order", "example": "Initial info" }, "bodyOutroduction": { "type": "string", "description": "Ending description message for Sales Order", "example": "Additional info" }, "internalDesignation": { "type": "string", "description": "Internal designation for Sales Order", "example": "InternalSO1" }, "date": { "type": "string", "format": "date", "description": "Date of creation of a Sales Order", "example": "2025-01-01" }, "status": { "type": "string", "enum": [ "completed", "created", "released", "canceled", "unknown" ], "description": "Status of the Sales Order", "example": "completed" }, "customer": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "number": { "type": "string", "nullable": true } }, "description": "Customer linked to a Sales Order", "example": { "id": "1" } }, "comment": { "type": "string", "description": "Comment included in the Sales Order", "example": "Comment" }, "project": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "language": { "type": "object", "additionalProperties": false, "required": [ "iso2" ], "properties": { "iso2": { "type": "string", "description": "ISO 639-1 Code", "nullable": true } }, "description": "Language information for a Sales Order", "example": { "iso2": "DE" } }, "log": { "type": "object", "properties": { "createdAt": { "type": "string", "format": "date-time", "nullable": true }, "createdBy": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "email": { "type": "string", "format": "email" } } } }, "description": "Logging information for the Sales Order", "example": { "createdAt": "2023-12-01 00:00:00", "createdBy": { "id": "1", "name": "User 1" } } }, "financials": { "type": "object", "additionalProperties": false, "required": [ "paymentMethod", "currency" ], "properties": { "paymentMethod": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "currency": { "type": "string" }, "billingAddress": { "type": "object", "additionalProperties": false, "required": [ "name", "country" ], "properties": { "type": { "type": "string", "enum": [ "mr", "mrs", "company", "other" ] }, "name": { "type": "string" }, "contactPerson": { "type": "string" }, "department": { "type": "string" }, "subDepartment": { "type": "string" }, "street": { "type": "string" }, "zipCode": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "country": { "type": "string" }, "addressSupplement": { "type": "string" }, "gln": { "type": "string" }, "email": { "type": "string", "format": "email" } } }, "tax": { "type": "object", "additionalProperties": false, "properties": { "taxation": { "type": "string", "enum": [ "domestic", "eu", "export", "taxfreedomestic" ] }, "vatId": { "type": "string" }, "taxDisplay": { "type": "string", "enum": [ "gross", "net", "auto" ] }, "noTaxInfoText": { "type": "boolean" }, "normalTaxRate": { "type": "number", "format": "float" }, "reducedTaxRate": { "type": "number", "format": "float" } } }, "paymentTerms": { "type": "object", "additionalProperties": false, "properties": { "paymentTargetDiscount": { "type": "number", "format": "float" }, "paymentTargetDays": { "type": "integer", "format": "int64" }, "paymentTargetDiscountDays": { "type": "integer", "format": "int64" } } } }, "description": "Financial information for a Sales Order", "example": { "paymentMethod": { "id": "3" }, "currency": "EUR" } }, "delivery": { "allOf": [ { "type": "object", "properties": { "autoShipping": { "type": "boolean" }, "fastLane": { "type": "boolean" }, "shippingCosts": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "shippingCostProduct", "quantity" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "quantity": { "type": "number", "format": "double" }, "comment": { "type": "string" }, "shippingCostProduct": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "description": { "type": "string" }, "freeFields": { "type": "array", "nullable": true, "items": { "type": "object", "additionalProperties": false, "required": [ "id", "value" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "value": { "type": "string" } } } }, "number": { "type": "string", "nullable": true } } }, "tax": { "type": "object", "required": [ "taxText" ], "properties": { "effectiveVatRate": { "type": "number", "format": "float", "description": "The final VAT on a position. Calculated based on other fields. Only supported on the view endpoint and is always returned" }, "vatCategory": { "type": "string", "nullable": true, "enum": [ "reduced", "normal", "exempt" ], "description": "VAT category. When importing a position only one of `rate` or `vatCategory` must be used.", "example": "reduced" }, "rate": { "type": "number", "format": "float", "example": 0.5, "nullable": true, "description": "VAT rate. When importing a position only one of `rate` or `vatCategory` must be used." }, "taxText": { "type": "string", "example": "Tax Text", "nullable": true, "description": "Tax Text" } } }, "price": { "type": "object", "additionalProperties": false, "properties": { "amount": { "type": "string", "format": "float" }, "currency": { "type": "string", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ] } } }, "discount": { "type": "number", "format": "float" }, "webId": { "type": "string" } } } }, "shippingAddress": { "type": "object", "additionalProperties": false, "required": [ "name", "city", "country", "zipCode", "street" ], "properties": { "type": { "type": "string", "enum": [ "mr", "mrs", "company", "other" ] }, "name": { "type": "string" }, "department": { "type": "string" }, "contactPerson": { "type": "string" }, "subDepartment": { "type": "string" }, "street": { "type": "string" }, "zipCode": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "country": { "type": "string" }, "addressSupplement": { "type": "string" }, "gln": { "type": "string" }, "email": { "type": "string", "format": "email" } } } } }, { "type": "object", "required": [ "shippingMethod" ], "properties": { "shippingMethod": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "deliveryTerms": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "email": { "type": "string", "format": "email" }, "conditions": { "type": "string" } } } ], "description": "Delivery information for the Sales Order", "example": { "autoShipping": true, "fastLane": true, "shippingMethod": { "id": "1" }, "shippingCosts": [ { "id": "1", "quantity": 3, "shippingCostProduct": { "id": "1" } } ], "email": "user.email@email.org", "conditions": "none" } }, "tags": { "type": "array", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "type": { "type": "string", "nullable": true }, "title": { "type": "string", "nullable": true } } }, "description": "Tags associated with the Sales Order", "example": [ { "id": "1" } ] }, "positions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "quantity", "sort", "product", "hasChildren", "parent" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "quantity": { "type": "number", "format": "double" }, "sort": { "type": "integer", "example": 12 }, "hasChildren": { "type": "boolean", "description": "Whether a position has children", "example": false }, "parent": { "type": "string", "pattern": "\\d+", "nullable": true, "description": "An id reference to the parent of the current position, null when position is not a child", "example": "1430" }, "comment": { "type": "string" }, "product": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" }, "description": { "type": "string" }, "freeFields": { "type": "array", "nullable": true, "items": { "type": "object", "additionalProperties": false, "required": [ "id", "value" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "value": { "type": "string" } } } }, "number": { "type": "string", "nullable": true } } }, "tax": { "type": "object", "required": [ "taxText" ], "properties": { "effectiveVatRate": { "type": "number", "format": "float", "description": "The final VAT on a position. Calculated based on other fields. Only supported on the view endpoint and is always returned" }, "vatCategory": { "type": "string", "nullable": true, "enum": [ "reduced", "normal", "exempt" ], "description": "VAT category. When importing a position only one of `rate` or `vatCategory` must be used.", "example": "reduced" }, "rate": { "type": "number", "format": "float", "example": 0.5, "nullable": true, "description": "VAT rate. When importing a position only one of `rate` or `vatCategory` must be used." }, "taxText": { "type": "string", "example": "Tax Text", "nullable": true, "description": "Tax Text" } } }, "price": { "type": "object", "additionalProperties": false, "properties": { "amount": { "type": "string", "format": "float" }, "currency": { "type": "string", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ] } } }, "discount": { "type": "number", "format": "float" }, "webId": { "type": "string" } } }, "description": "Items included within the Sales Order" } }, "description": "Representation of a Sales Order", "example": { "id": "1", "documentNumber": "SO1", "externalOrderNumber": "ES01", "transactionNumber": "transaction1", "customerOrderNumber": "customerOrder1", "externalOrderId": "10", "salesChannel": { "id": "1" }, "bodyIntroduction": "intro", "bodyOutroduction": "outro", "internalDesignation": "interalSO1", "date": "2024-01-01", "status": "created", "customer": { "id": "1" }, "comment": "Additional comments", "project": { "id": "1" }, "language": { "iso2": "DE" }, "log": { "createdAt": "2023-12-01 00:00:00", "createdBy": { "id": "1", "name": "User 1" } }, "financials": { "paymentMethod": { "id": "3" }, "currency": "EUR" }, "delivery": { "autoShipping": true, "fastLane": true, "shippingMethod": { "id": "1" }, "shippingCosts": [ { "id": "1", "quantity": 3, "shippingCostProduct": { "id": "1" } } ], "email": "user.email@email.org", "conditions": "none" }, "tags": [ { "id": "1" } ], "positions": [ { "id": "1402", "sort": 12, "hasChildren": false, "parent": null, "product": { "id": "1" }, "quantity": 5 } ] } } } } }, "application/vnd.xentral.minimal.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "documentNumber": { "type": "string", "description": "Internal identification associated with a Sales Order", "example": "SO-1234" }, "date": { "type": "string", "description": "Date of creation of a Sales Order", "example": "2025-01-01" }, "status": { "type": "string", "enum": [ "completed", "created", "released", "canceled", "unknown" ], "description": "Status of the Sales Order", "example": "completed" } }, "description": "Minimal representation of a Sales Order", "example": { "id": "1", "documentNumber": "SO1", "date": "2025-01-01", "status": "completed" } } } } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "delete": { "tags": [ "Sales Order" ], "operationId": "salesOrder.delete", "summary": "Delete draft sales order", "description": "Deletes a sales order in draft status", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "204": { "description": "Operation completed successfully, no response body" }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "409": { "description": "Request conflict with the current state of the target resource", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "429": { "description": "Too many API calls made." } } } }, "/api/salesOrders/{id}/documents": { "post": { "tags": [ "Sales Order" ], "operationId": "salesOrder.createDocument", "summary": "[EARLY ACCESS] Create sales order document", "description": "Creates new sales order document", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "Sales order document create request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "nullable": true }, "description": { "type": "string", "nullable": true }, "keyword": { "type": "string", "enum": [ "otherFile", "coverPage", "attachment" ] }, "fileName": { "type": "string" }, "fileContent": { "type": "string", "description": "A base64 encoded document. Supported formats PDF", "format": "byte" } } }, "examples": { "Create product media": { "value": { "title": "Sales order document", "description": "Sales order document", "keyword": "otherFile", "fileName": "sample.pdf", "fileContent": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=" } } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Sales Order" ], "operationId": "salesOrder.updateMultiple", "summary": "[EARLY ACCESS] Update multiple sales order documents", "description": "Updates multiple sales order documents", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "Sales order documents update multiple request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "title": { "x-description-missing": true, "type": "string", "nullable": true }, "description": { "x-description-missing": true, "type": "string", "nullable": true }, "keyword": { "x-description-missing": true, "type": "string", "enum": [ "otherFile", "coverPage", "attachment" ] }, "sort": { "x-description-missing": true, "type": "integer", "nullable": true } } } }, "examples": { "Update multiple sales order documents": { "value": [ { "id": "52", "title": "Sales order document", "description": "Sales order document", "keyword": "attachment", "sort": 1 }, { "id": "53", "title": "Second sales order document", "description": "Second sales order document", "sort": 2 } ] } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "delete": { "tags": [ "Sales Order" ], "operationId": "salesOrder.deleteMultiple", "summary": "[EARLY ACCESS] Delete multiple sales order documents", "description": "Deletes a multiple sales order documents", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "Sales order documents delete multiple request payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } }, "examples": { "Delete multiple sales order documents": { "value": [ { "id": "52" }, { "id": "53" } ] } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "get": { "tags": [ "Sales Order" ], "operationId": "salesOrder.listDocument", "summary": "[EARLY ACCESS] View sales order document list", "description": "Returns a list of given sales order documents", "parameters": [ { "name": "filter", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "id", "currentFileVersionId", "fileName" ] }, "op": { "type": "string", "enum": [ "equals", "notEquals", "in", "notIn", "exactlyIn", "allIn", "allNotIn", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan", "is" ] }, "value": { "oneOf": [ { "type": "string", "description": "Used for the operations 'equals', 'notEquals', 'contains', 'notContains', 'startsWith', 'endsWith' and 'is'.", "title": "String" }, { "type": "array", "description": "Used for the operations 'in', 'notIn', 'exactlyIn', 'allIn' and 'allNotIn'.", "title": "Array", "items": { "type": "string" } } ] } } } } }, { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "entity": { "x-description-missing": true, "type": "string" }, "entityId": { "x-description-missing": true, "type": "integer" }, "title": { "x-description-missing": true, "type": "string", "nullable": true }, "description": { "x-description-missing": true, "type": "string", "nullable": true }, "keyword": { "x-description-missing": true, "type": "string", "nullable": true }, "sort": { "x-description-missing": true, "type": "integer" }, "currentVersion": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "version": { "type": "integer" }, "remark": { "type": "string", "nullable": true }, "filename": { "type": "string" }, "size": { "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "integer" }, "unit": { "type": "string", "enum": [ "byte" ], "description": "Currently only byte as unit allowed." } } }, "updatedAt": { "type": "string", "format": "date-time" } } }, "updatedAt": { "x-description-missing": true, "type": "string", "format": "date-time" } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/salesOrders/{id}/documents/{documentId}": { "get": { "tags": [ "Sales Order" ], "operationId": "salesOrder.viewDocument", "summary": "[EARLY ACCESS] View sales order document", "description": "Returns details of a single sales order document", "parameters": [ { "name": "documentId", "in": "path", "description": "ID of document", "required": true, "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "entity": { "x-description-missing": true, "type": "string" }, "entityId": { "x-description-missing": true, "type": "integer" }, "title": { "x-description-missing": true, "type": "string", "nullable": true }, "description": { "x-description-missing": true, "type": "string", "nullable": true }, "keyword": { "x-description-missing": true, "type": "string", "nullable": true }, "sort": { "x-description-missing": true, "type": "integer" }, "versions": { "type": "array", "items": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "version": { "type": "integer" }, "remark": { "type": "string", "nullable": true }, "filename": { "type": "string" }, "size": { "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "integer" }, "unit": { "type": "string", "enum": [ "byte" ], "description": "Currently only byte as unit allowed." } } }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "currentVersion": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "version": { "type": "integer" }, "remark": { "type": "string", "nullable": true }, "filename": { "type": "string" }, "size": { "type": "object", "additionalProperties": false, "required": [ "value", "unit" ], "properties": { "value": { "type": "integer" }, "unit": { "type": "string", "enum": [ "byte" ], "description": "Currently only byte as unit allowed." } } }, "updatedAt": { "type": "string", "format": "date-time" } } }, "updatedAt": { "x-description-missing": true, "type": "string", "format": "date-time" } } } } } }, "image/*": { "schema": { "type": "string", "format": "binary" } }, "application/pdf": { "schema": { "type": "string", "format": "binary" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/salesPrices": { "post": { "tags": [ "Sales Price" ], "operationId": "salesPrice.create", "summary": "Create sales price", "description": "Creates new sales price", "requestBody": { "description": "", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "product" ], "properties": { "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "validFrom": { "type": "string", "format": "date", "nullable": true, "description": "Sets the starting date of the sales price being valid." }, "expiresAt": { "type": "string", "format": "date", "nullable": true, "description": "Sets the expiration date of the sales price." }, "amount": { "oneOf": [ { "type": "number", "format": "float", "description": "Float or int, greater than zero" }, { "type": "string", "format": "float", "description": "Numeric value greater than zero" } ] }, "packageAmount": { "type": "number", "format": "float", "nullable": true }, "customer": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "customerGroup": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "price": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } } } }, "examples": { "Create sales price": { "value": { "product": { "id": "14" }, "validFrom": "2023-12-01", "amount": 1, "price": { "amount": "24.20", "currency": "EUR" } } }, "Create sales price with float as string for amount": { "value": { "product": { "id": "14" }, "validFrom": "2023-12-01", "amount": "10.5", "price": { "amount": "24.20", "currency": "EUR" } } }, "Create customer-specific sales price": { "value": { "product": { "id": "14" }, "customer": { "id": "35" }, "amount": 10.5, "price": { "amount": "24.20", "currency": "EUR" } } } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "get": { "tags": [ "Sales Price" ], "operationId": "salesPrice.list", "summary": "List sales prices", "description": "Returns list of a sales prices", "parameters": [ { "name": "filter", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "id", "productId", "customerId", "groupId", "currency", "amount", "isValidAt", "targetCountry" ] }, "op": { "type": "string", "enum": [ "equals", "notEquals", "in", "notIn", "exactlyIn", "allIn", "allNotIn", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan", "is" ] }, "value": { "oneOf": [ { "type": "string", "description": "Used for the operations 'equals', 'notEquals', 'contains', 'notContains', 'startsWith', 'endsWith' and 'is'.", "title": "String" }, { "type": "array", "description": "Used for the operations 'in', 'notIn', 'exactlyIn', 'allIn' and 'allNotIn'.", "title": "Array", "items": { "type": "string" } } ] } } } } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "price", "amount" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "validFrom": { "type": "string", "format": "date", "nullable": true, "description": "Shows the starting date of the sales price being valid.", "example": "2023-01-01" }, "expiresAt": { "type": "string", "format": "date", "nullable": true, "description": "Shows the expiration date of the sales price.", "example": "2023-01-01" }, "amount": { "type": "number", "format": "float", "description": "Amount of the product required for the sales price.", "example": 3 }, "packageAmount": { "x-description-missing": true, "type": "number", "format": "float", "nullable": true, "example": 3 }, "customer": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "customerGroup": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "price": { "description": "Price object with amount, amount gross, currency and tax rate", "type": "object", "additionalProperties": false, "example": { "amount": "24.20", "amountGross": "28.80", "currency": "EUR", "taxRate": { "rate": "19.00", "type": "normal", "source": "project tax rate" } }, "properties": { "amount": { "type": "string", "format": "float" }, "amountGross": { "type": "string", "format": "float", "nullable": true }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217." }, "taxRate": { "type": "object", "additionalProperties": false, "nullable": true, "properties": { "rate": { "type": "string", "format": "float" }, "type": { "type": "string" }, "source": { "type": "string" } } } } } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } }, "examples": { "Lists all sales prices": { "value": { "data": [ { "id": "1", "product": { "id": "12" }, "customer": null, "customerGroup": null, "amount": 1, "packageAmount": null, "price": { "amount": "62.00000000", "currency": "EUR", "amountGross": "73.78000000", "taxRate": { "rate": "19.00", "type": "normal", "source": "project tax rate" } }, "validFrom": null, "expiresAt": null }, { "id": "2", "product": { "id": "1" }, "customer": { "id": "7" }, "customerGroup": null, "amount": 1, "packageAmount": null, "price": { "amount": "0.16000000", "currency": "EUR", "amountGross": "0.17120000", "taxRate": { "rate": "7.00", "type": "reduced", "source": "project tax rate" } }, "validFrom": "2024-04-01", "expiresAt": "2024-04-30" } ], "extra": { "totalCount": 2, "page": { "number": 1, "size": 10 } } } } } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Sales Price" ], "operationId": "salesPrice.updateMultiple", "summary": "Update multiple sales prices", "description": "Updates multiple sales prices", "requestBody": { "description": "", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "validFrom": { "type": "string", "format": "date", "nullable": true, "example": "2023-12-01", "description": "Sets the starting date of the sales price being valid." }, "expiresAt": { "type": "string", "format": "date", "nullable": true, "example": "2023-12-01", "description": "Sets the expiration date of the sales price." }, "amount": { "oneOf": [ { "type": "number", "format": "float", "description": "Float or int, greater than zero" }, { "type": "string", "format": "float", "description": "Numeric value greater than zero" } ] }, "packageAmount": { "x-description-missing": true, "type": "number", "format": "float", "example": 3, "nullable": true }, "customer": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "customerGroup": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "price": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } } } } }, "examples": { "Update Multiple Sales Prices with different types for amount": { "value": [ { "id": "14", "validFrom": "2023-12-01", "amount": 1, "packageAmount": 6, "price": { "amount": "24.20", "currency": "EUR" } }, { "id": "16", "validFrom": "2023-12-01", "amount": 10.5, "packageAmount": 1, "price": { "amount": "19.24", "currency": "EUR" } }, { "id": "16", "validFrom": "2023-12-01", "amount": "22.5", "packageAmount": 1, "price": { "amount": "55.55", "currency": "EUR" } } ] } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/salesPrices/{id}": { "get": { "tags": [ "Sales Price" ], "operationId": "salesPrice.view", "summary": "View sales price", "description": "Returns details of a single sales price", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "x-description-missing": true, "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "product": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "validFrom": { "type": "string", "format": "date", "nullable": true, "description": "Shows the starting date of the sales price being valid.", "example": "2023-01-01" }, "expiresAt": { "type": "string", "format": "date", "nullable": true, "description": "Shows the expiration date of the sales price.", "example": "2023-01-01" }, "amount": { "type": "number", "format": "float", "description": "Amount of the product required for the sales price.", "example": 3 }, "packageAmount": { "x-description-missing": true, "type": "number", "format": "float", "nullable": true, "example": 3 }, "customer": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "customerGroup": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "price": { "description": "Price object with amount, amount gross, currency and tax rate", "type": "object", "additionalProperties": false, "example": { "amount": "24.20", "amountGross": "28.80", "currency": "EUR", "taxRate": { "rate": "19.00", "type": "normal", "source": "project tax rate" } }, "properties": { "amount": { "type": "string", "format": "float" }, "amountGross": { "type": "string", "format": "float", "nullable": true }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217." }, "taxRate": { "type": "object", "additionalProperties": false, "nullable": true, "properties": { "rate": { "type": "string", "format": "float" }, "type": { "type": "string" }, "source": { "type": "string" } } } } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } }, "examples": { "Shows a single sales price": { "value": { "data": { "id": "1", "product": { "id": "12" }, "customer": null, "customerGroup": null, "amount": 1, "packageAmount": null, "price": { "amount": "62.00000000", "currency": "EUR" }, "validFrom": null, "expiresAt": null } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Sales Price" ], "operationId": "salesPrice.update", "summary": "Update sales price", "description": "Updates details of a single sales price", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "validFrom": { "type": "string", "format": "date", "nullable": true, "description": "Sets the starting date of the sales price being valid." }, "expiresAt": { "type": "string", "format": "date", "nullable": true, "description": "Sets the expiration date of the sales price." }, "amount": { "oneOf": [ { "type": "number", "format": "float", "description": "Float or int, greater than zero" }, { "type": "string", "format": "float", "description": "Numeric value greater than zero" } ] }, "packageAmount": { "type": "number", "format": "float", "nullable": true }, "customer": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "customerGroup": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "price": { "description": "Money object with amount and currency", "example": { "amount": "13.37", "currency": "EUR" }, "type": "object", "additionalProperties": false, "properties": { "amount": { "description": "A string representing the amount", "type": "string", "format": "float" }, "currency": { "type": "string", "pattern": "[A-Z]{3}", "enum": [ "EUR", "PLN", "CHF", "USD", "GBP" ], "description": "Currency matches one of currency values as specified in ISO-4217.", "example": "PLN" } } } } }, "examples": { "Update Sales Prices": { "value": { "validFrom": "2023-12-01", "amount": 1, "price": { "amount": "24.20", "currency": "EUR" } } }, "Update Sales Prices with float as string for amount": { "value": { "validFrom": "2023-12-01", "amount": "10.5", "price": { "amount": "24.20", "currency": "EUR" } } }, "Update Sales Prices with float for amount": { "value": { "validFrom": "2023-12-01", "amount": 10.5, "price": { "amount": "24.20", "currency": "EUR" } } } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "404": { "description": "Resource was not found or not enough access privileges" }, "409": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "429": { "description": "Too many API calls made." } } }, "delete": { "tags": [ "Sales Price" ], "operationId": "salesPrice.delete", "summary": "Delete sales price", "description": "Deletes a single sales price", "requestBody": { "content": { "application/vnd.xentral.default.v1": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "204": { "description": "Operation completed successfully, no response body" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/warehouses/{warehouseId}/storageLocations/{storageLocationId}/items": { "get": { "tags": [ "Storage Item" ], "operationId": "storage_item.list", "parameters": [ { "name": "warehouseId", "in": "path", "description": "ID of warehouse", "required": true, "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "name": "storageLocationId", "in": "path", "description": "ID of storage location", "required": true, "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "summary": "[EARLY ACCESS] Storage item list", "description": "This endpoint is only available as beta version and will introduce breaking changes without further notice or versioning. Returns all storage location items for the specified warehouse / location.", "responses": { "200": { "description": "Operation completed successfully. Note (only for application/vnd.xentral.default.v2-beta+json response content): support for products where a product is both serial number tracked AND batch/best before date tracked at the same time is limited. In case serial number tracking is set to \"Generate own\" in the product master data, the qualityControlAttribute quantities will be reported (a) for the serial numbers on shelf and (b) for the batch/bestBeforeDate records on shelf, thus potentially resulting in a double count in the total across all qualityControlAttribute->quantity values. The quantity on the product->quantity level reflects the correct quantity on shelf in any case.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "description": "Representation of a list of Items in storage", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "product": { "description": "Information from the Product in storage", "required": [ "sku" ], "type": "object", "properties": { "sku": { "type": "string", "description": "SKU code of the item" } }, "example": { "sku": "ABC-12345-S-BL" } }, "quantity": { "type": "number", "description": "Quantity of the item to stock to storage location", "example": 5 }, "batches": { "type": "array", "items": { "type": "string" }, "description": "Batches of the items", "example": [ "Batch1" ] }, "bestBeforeDates": { "type": "array", "items": { "type": "string" }, "description": "Best before dates of the items", "example": [ "2023-01-01 00:00:00" ] }, "serialNumbers": { "type": "array", "items": { "type": "object", "properties": { "number": { "type": "string", "description": "The serial number of the items" } } }, "description": "The serial number list of the items", "example": [ { "number": "001" }, { "number": "002" } ] } } }, "example": [ { "id": "1", "product": { "sku": "ABC-12345-S-BL" }, "quantity": 3, "batches": [ "Batch1", "Batch2" ], "bestBeforeDates": [ "2025-01-01 00:00:00" ], "serialNumbers": [ { "number": "001" }, { "number": "002" }, { "number": "003" } ] } ] } } } }, "application/vnd.xentral.default.v2-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "description": "Representation of a list of Items in storage", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "productId": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "sku": { "type": "string", "description": "SKU code of the item", "example": "ABC-12345-S-BL" }, "quantity": { "type": "number", "description": "Quantity of the item to stock to storage location", "example": 5 }, "qualityControlAttributes": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "quantity": { "type": "number", "description": "Quantity of the item to stock to storage location" }, "batch": { "type": "string", "nullable": true, "description": "Batch of the item" }, "bestBeforeDate": { "type": "string", "nullable": true, "description": "Best before date of the item" }, "serialNumbers": { "type": "array", "items": { "type": "object", "properties": { "number": { "type": "string", "description": "The serial numbers of the item" } } } } } }, "description": "List of Product unit specific quality properties", "example": [ { "quantity": 5, "batch": "Batch1", "bestBeforeDate": "2025-01-01 00:00:00", "serialNumbers": [ { "number": "001" } ] } ] } } }, "example": [ { "productId": "1", "sku": "ABC-12345-S-BL", "quantity": 5, "qualityControlAttributes": [ { "quantity": 5, "batch": "Batch1", "bestBeforeDate": "2025-01-01 00:00:00", "serialNumbers": [ { "number": "001" } ] } ] } ] }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "post": { "tags": [ "Storage Item" ], "operationId": "warehouse.stockItem", "parameters": [ { "name": "warehouseId", "in": "path", "description": "ID of warehouse", "required": true, "schema": { "type": "number" } }, { "name": "storageLocationId", "in": "path", "description": "ID of storage location", "required": true, "schema": { "type": "number" } } ], "requestBody": { "description": "Add item to Storage Location payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "product", "quantity" ], "properties": { "product": { "required": [ "sku" ], "type": "object", "properties": { "sku": { "type": "string", "description": "SKU code of the item" } } }, "quantity": { "type": "number", "description": "Quantity of the item to stock to storage location" }, "batch": { "type": "string", "description": "Batch to assign the stock update to" }, "bestBeforeDate": { "type": "string", "format": "date", "description": "Best Before Date to assign to the stock units added" }, "serialNumbers": { "type": "array", "items": { "type": "object", "properties": { "number": { "type": "string", "description": "The serial number of the item" } } } }, "reason": { "type": "string", "description": "Reason for adding to the stock" }, "project": { "required": [ "id" ], "type": "object", "properties": { "id": { "type": "string", "pattern": "\\d+", "description": "Id of the project" } } } } }, "examples": { "Add stock to storage location": { "value": { "product": { "sku": "10840" }, "quantity": 1 } }, "Add stock to storage location (batch and best before date)": { "value": { "product": { "sku": "10038" }, "quantity": 5, "batch": "123456", "bestBeforeDate": "2027-01-01" } }, "Add stock to storage location (serial numbers)": { "value": { "product": { "sku": "10440" }, "quantity": 3, "serialNumbers": [ { "number": "2000482" }, { "number": "2000483" }, { "number": "2000484" } ] } } } } } }, "summary": "Add item to Storage Location", "description": "Adds stock for a given item to a specific Storage Location.", "responses": { "200": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Storage Item" ], "operationId": "warehouse.retrieveItem", "parameters": [ { "name": "warehouseId", "in": "path", "description": "ID of warehouse", "required": true, "schema": { "type": "number" } }, { "name": "storageLocationId", "in": "path", "description": "ID of storage location", "required": true, "schema": { "type": "number" } } ], "requestBody": { "description": "Retrieve item from Storage Location payload", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "product", "quantity" ], "properties": { "product": { "required": [ "sku" ], "type": "object", "properties": { "sku": { "type": "string", "description": "SKU code of the item" } } }, "quantity": { "type": "number", "description": "Quantity of the item to retrieve from storage location" }, "batch": { "type": "string", "description": "Batch to use" }, "bestBeforeDate": { "type": "string", "format": "date", "description": "Best Before Date to use" }, "serialNumbers": { "type": "array", "items": { "type": "object", "properties": { "number": { "type": "string", "description": "The serial number of the item" } } } }, "reason": { "type": "string", "description": "Reason for the retrieve" }, "project": { "required": [ "id" ], "type": "object", "properties": { "id": { "type": "string", "pattern": "\\d+", "description": "Id of the project" } } } } }, "examples": { "Retrieve stock from storage location": { "value": { "product": { "sku": "10840" }, "quantity": 1 } }, "Retrieve stock from storage location (batch and best before date)": { "value": { "product": { "sku": "10038" }, "quantity": 5, "batch": "123456", "bestBeforeDate": "2027-01-01" } }, "Retrieve stock from storage location (serial numbers)": { "value": { "product": { "sku": "10440" }, "quantity": 3, "serialNumbers": [ { "number": "2000482" }, { "number": "2000483" }, { "number": "2000484" } ] } } } } } }, "summary": "Retrieves item from Storage Location", "description": "Retrieves certain units of stock for a given item from a specific Storage Location.", "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/warehouses/{warehouseId}/storageLocations": { "get": { "tags": [ "Storage Location" ], "operationId": "storageLocation.list", "parameters": [ { "name": "warehouseId", "in": "path", "description": "ID of warehouse", "required": true, "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "filter", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "storageLocationId", "designation" ] }, "op": { "type": "string", "enum": [ "greaterThan", "lessThan", "equals", "notEquals", "in", "notIn" ] }, "value": { "oneOf": [ { "type": "string", "title": "String" }, { "type": "array", "description": "Used for the operations 'in', 'notIn', 'exactlyIn', 'allIn' and 'allNotIn'.", "title": "Array", "items": { "type": "string" } } ] } } } } } ], "summary": "[EARLY ACCESS] Storage location list", "description": "This endpoint is only available as beta version and will introduce breaking changes without further notice or versioning. Returns all storage locations for the specified warehouse.", "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "description": "Representation of a list of Storage Locations", "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "designation", "warehouse" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "warehouse": { "description": "Reference to another resource", "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "designation": { "type": "string", "description": "Designation of the Storage location", "example": "Main Storage Location 1" }, "description": { "type": "string", "description": "Description of the Storage location", "example": "Primary storage location" }, "project": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } } } }, "example": [ { "id": "1", "warehouse": { "id": "1" }, "designation": "StorageLocation1", "description": "Storage Location Number 1", "project": { "id": "1" } } ] }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/shippingMethods": { "get": { "tags": [ "Shipping Methods" ], "operationId": "shippingMethod.list", "summary": "List shipping methods", "description": "Lists existing shipping methods", "parameters": [ { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } } ], "responses": { "200": { "description": "Shipping method list", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data", "extra" ], "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "module", "type", "designation", "project" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "module": { "type": "string", "description": "Module used by the given Shipping Method", "example": "glsapi" }, "type": { "type": "string", "description": "Type of the given Shipping Method", "example": "gls" }, "designation": { "type": "string", "description": "Description given to a particular Shipping Method", "example": "GLS International" }, "project": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } } } }, "description": "Response data containing list of Shipping Methods", "example": [ { "id": "1", "module": "glsapi", "type": "gls", "designation": "GLS International", "project": { "id": "1" } } ] }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/accountingExport/run/{runUuid}/actions/downloadError": { "get": { "tags": [ "Accounting Export" ], "operationId": "accountingExport.downloadError.view", "summary": "Download error file", "description": "Returns details of a single Accounting Export error", "parameters": [ { "name": "runUuid", "in": "path", "required": true, "schema": { "description": "UUID identifier of the resource.", "type": "string", "pattern": "^$|^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$", "example": "a00fd11e-3a67-433b-83c0-4e815fd4a0e1" }, "description": "This is the run identifier", "example": "a00fd11e-3a67-433b-83c0-4e815fd4a0e1" } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+text": { "schema": { "type": "string" } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "429": { "description": "Too many API calls made." } } } }, "/api/accountingExport/run/{runUuid}/actions/downloadExport": { "get": { "tags": [ "Accounting Export" ], "operationId": "accountingExport.downloadExport.view", "summary": "Download export file", "description": "Returns details of a single Accounting Export file", "parameters": [ { "name": "runUuid", "in": "path", "required": true, "schema": { "description": "UUID identifier of the resource.", "type": "string", "pattern": "^$|^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$", "example": "a00fd11e-3a67-433b-83c0-4e815fd4a0e1" }, "description": "This is the run identifier", "example": "a00fd11e-3a67-433b-83c0-4e815fd4a0e1" } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+csv": { "schema": { "type": "string" } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "429": { "description": "Too many API calls made." } } } }, "/api/accountingExport/exportConfigurations/{id}": { "get": { "tags": [ "Accounting Export" ], "operationId": "accountingExport.exportConfiguration.view", "summary": "View a single Accounting Export configuration", "description": "Returns details of a single Accounting Export configuration", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data" ], "properties": { "data": { "type": "object", "additionalProperties": false, "description": "Accounting Export configuration is a configuration for one-time or recurring data exports.", "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "uuid": { "description": "UUID identifier of the resource.", "type": "string", "pattern": "^$|^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$", "example": "a00fd11e-3a67-433b-83c0-4e815fd4a0e1" }, "name": { "type": "string", "description": "The name of the configuration create by user" }, "active": { "type": "boolean", "description": "Flag that shows if an configuration is active" }, "recurringPeriod": { "type": "string", "enum": [ "monthly", "weekly", "daily", "onetime" ], "description": "The period that the export will run again" }, "executionStart": { "description": "a atom formatted date time", "type": "string", "format": "date-time", "example": "2023-08-13T14:45:36+02:00" }, "executionStop": { "description": "a yyyy-mm-dd formatted date or null value", "type": "string", "format": "date", "example": "2023-08-13", "nullable": true }, "nextRun": { "description": "a atom formatted date time or null value", "type": "string", "format": "date-time", "example": "2023-08-13T14:45:36+02:00", "nullable": true }, "inputProvider": { "type": "object", "additionalProperties": false, "description": "Accounting Export configuration reference to the provider.", "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string", "description": "The name of the provider" } } }, "outputProvider": { "type": "object", "additionalProperties": false, "description": "Accounting Export configuration reference to the provider.", "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string", "description": "The name of the provider" } } }, "outputFormat": { "type": "string", "description": "This field represents the output format and version specific to each provider" }, "transactionAccountConfiguration": { "type": "object", "additionalProperties": true, "description": "This field represents an object with configurations for the accounts" }, "additionalConfiguration": { "type": "object", "additionalProperties": true, "description": "This field represents an object with additional configurations for the output provider" }, "filterStartDate": { "description": "a yyyy-mm-dd formatted date or null value", "type": "string", "format": "date", "example": "2023-08-13", "nullable": true }, "filterEndDate": { "description": "a yyyy-mm-dd formatted date or null value", "type": "string", "format": "date", "example": "2023-08-13", "nullable": true }, "createdAt": { "description": "a atom formatted date time", "type": "string", "format": "date-time", "example": "2023-08-13T14:45:36+02:00" }, "updatedAt": { "description": "a atom formatted date time", "type": "string", "format": "date-time", "example": "2023-08-13T14:45:36+02:00" }, "deletedAt": { "description": "a atom formatted date time or null value", "type": "string", "format": "date-time", "example": "2023-08-13T14:45:36+02:00", "nullable": true } } } } } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "429": { "description": "Too many API calls made." } } } }, "/api/accountingExport/providers/{id}": { "get": { "tags": [ "Accounting Export" ], "operationId": "accountingExport.provider.view", "summary": "View a single Accounting Export provider", "description": "Returns details of a single Accounting Export provider", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data" ], "properties": { "data": { "type": "object", "additionalProperties": false, "description": "Accounting Export provider indicates where to take the the data from (input providers) and where to export the data (output providers).", "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "uuid": { "description": "UUID identifier of the resource.", "type": "string", "pattern": "^$|^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$", "example": "a00fd11e-3a67-433b-83c0-4e815fd4a0e1" }, "name": { "type": "string", "description": "The name of the provider" }, "usedFor": { "type": "string", "enum": [ "input", "output" ], "description": "The usage of the provider: input for getting data, output for putting data into the provider system" }, "vendorKey": { "type": "string", "enum": [ "paypal", "datev" ], "description": "The identifier key of the provider" }, "credentialsKey": { "type": "string", "nullable": true, "description": "The field stores the value of credentials identifier from the Vault" }, "configuration": { "type": "object", "additionalProperties": true, "description": "Provider additional configuration" }, "createdAt": { "description": "a atom formatted date time", "type": "string", "format": "date-time", "example": "2023-08-13T14:45:36+02:00" }, "updatedAt": { "description": "a atom formatted date time", "type": "string", "format": "date-time", "example": "2023-08-13T14:45:36+02:00" } } } } } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "429": { "description": "Too many API calls made." } } } }, "/api/suppliers": { "get": { "tags": [ "Supplier" ], "operationId": "supplier.list", "summary": "List suppliers", "description": "Lists existing suppliers", "parameters": [ { "name": "filter", "in": "query", "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "array", "items": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } } }, { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "search", "id", "name", "number", "country", "zip", "city", "project", "projectName", "phone", "fax", "mobile", "email", "addressNote", "department", "subdivision", "vatNumber", "taxNumber", "gln", "tag", "tagName" ] }, "op": { "type": "string", "enum": [ "equals", "notEquals", "in", "notIn", "exactlyIn", "allIn", "allNotIn", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan" ] }, "value": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] } } } } ] } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "name", "number", "country", "zip", "city", "project", "projectName", "telephone", "fax", "mobile", "email", "addressNote", "department", "subdivision", "vatNumber", "taxNumber", "gln", "tag", "tagName" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Supplier list.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data", "extra" ], "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "type", "general" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "type": { "description": "The type of the supplier", "type": "string" }, "project": { "description": "An optional object with id and name", "type": "object", "additionalProperties": false, "required": [ "id", "name" ], "nullable": true, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "type": "string" } }, "example": { "id": "1337", "name": "Diamond" } }, "general": { "description": "The general information of the supplier", "type": "object", "additionalProperties": false, "required": [ "name", "address" ], "properties": { "number": { "type": "string" }, "fax": { "type": "string", "nullable": true }, "mobile": { "type": "string", "nullable": true }, "department": { "type": "string" }, "subdivision": { "type": "string" }, "vatNumber": { "type": "string" }, "taxNumber": { "type": "string", "nullable": true }, "gln": { "type": "string" }, "employeeNumber": { "type": "string" }, "honorific": { "type": "string" }, "title": { "type": "string" }, "name": { "type": "string" }, "birthday": { "type": "string", "nullable": true, "format": "date" }, "tags": { "description": "A list of tags", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The identifier of the tag", "type": "string", "pattern": "\\d+", "example": "1337" }, "name": { "description": "The name of the tag", "type": "string", "example": "Active" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "supplierNumber": { "type": "string" }, "phone": { "type": "string", "nullable": true }, "email": { "type": "string" }, "address": { "type": "object", "additionalProperties": false, "required": [ "street", "zip", "city", "state", "country", "note" ], "properties": { "street": { "type": "string" }, "zip": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string", "nullable": true }, "country": { "type": "string" }, "note": { "type": "string" } } } } }, "tags": { "description": "A list of tags", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "description": "Either ID or name and key." }, "key": { "description": "The key of the tag", "type": "string" }, "name": { "description": "The name of the tag", "type": "string" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "freeFields": { "description": "a list of free fields and their values", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "value": { "description": "The value of the free field", "type": "string" } } } } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } }, "application/vnd.xentral.default.v1+csv": { "schema": { "type": "string" } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Supplier" ], "operationId": "supplier.updateMultiple", "summary": "Update multiple suppliers tags", "description": "Updates tags for multiple suppliers", "requestBody": { "description": "Supplier update multiple request payload", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "tags": { "description": "A list of tags", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "description": "Either ID or name and key." }, "key": { "description": "The key of the tag", "type": "string" }, "name": { "description": "The name of the tag", "type": "string" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } } } } }, "examples": { "Add existing tags to suppliers": { "value": [ { "id": "5", "tags": [ { "id": "33" }, { "id": "34" } ] }, { "id": "6", "tags": [ { "id": "39" }, { "id": "40" } ] } ] } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "429": { "description": "Too many API calls made." } } } }, "/api/suppliers/{id}": { "get": { "tags": [ "Supplier" ], "operationId": "supplier.view", "summary": "View supplier", "description": "Shows an existing supplier details", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Supplier view.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data" ], "properties": { "data": { "description": "A supplier resource", "type": "object", "additionalProperties": false, "required": [ "id", "type", "general" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "type": { "description": "The type of the supplier", "type": "string" }, "general": { "description": "The general information of the supplier", "type": "object", "additionalProperties": false, "required": [ "name", "address" ], "properties": { "honorific": { "description": "The honorific of the supplier", "type": "string" }, "title": { "description": "The title of the supplier", "type": "string" }, "name": { "description": "The name of the supplier", "type": "string" }, "birthday": { "description": "The birthday of the supplier", "type": "string", "format": "date" }, "address": { "type": "object", "additionalProperties": false, "required": [ "street", "zip", "city", "state", "country", "note" ], "properties": { "street": { "type": "string" }, "zip": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string", "nullable": true }, "country": { "type": "string" }, "note": { "type": "string" } } } } }, "tags": { "description": "A list of tags", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The identifier of the tag", "type": "string", "pattern": "\\d+", "example": "1337" }, "name": { "description": "The name of the tag", "type": "string", "example": "Active" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } } } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Supplier" ], "operationId": "supplier.update", "summary": "Update single Supplier tags", "description": "Updates tags of a single supplier", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "Supplier update request payload", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "tags": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "description": "Either ID or name and key." }, "key": { "type": "string" }, "name": { "type": "string" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } } } }, "examples": { "Add existing tags to supplier": { "value": { "tags": [ { "id": "33" }, { "id": "34" } ] } }, "Add new tag to supplier": { "value": { "tags": [ { "name": "Tier 1 supplier", "key": "tier-1-supplier", "color": "#00ff00" } ] } } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "404": { "description": "Resource was not found or not enough access privileges" }, "429": { "description": "Too many API calls made." } } }, "delete": { "tags": [ "Supplier" ], "operationId": "supplier.delete", "summary": "Delete supplier", "description": "Delete existing supplier", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "204": { "description": "Operation completed successfully, no response body" }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } } }, "/api/suppliersTags": { "get": { "tags": [ "Supplier Tag" ], "operationId": "supplierTag.list", "summary": "List suppliers tags", "description": "Returns a collection with all suppliers tags.", "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "description": "A list of tags", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The identifier of the tag", "type": "string", "pattern": "\\d+", "example": "1337" }, "name": { "description": "The name of the tag", "type": "string", "example": "Active" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/taxRates/{countryCode}": { "get": { "tags": [ "Tax Rate" ], "operationId": "taxRate.list", "summary": "List tax rates", "description": "This endpoint returns the tax rate for a given country code. The country code is a two-letter ISO 3166-1 alpha-2 code. The response is a list of applicable tax rates for the given country code.\nTo get a more granular response you can use the query parameters to filter the response, for example by product or project.\n\nThe applicable tax rate is determined in the following order:\n1. If a custom tax rate is defined for the product, it is returned.\n2. If a tax rate is defined in the taxRates module for that country, it is returned.\n3. If a tax rate is defined in the taxRates module for the project, or a generic tax Rate without country or project it is returned.\n4. If a tax rate is defined for the applicable project it is returned.\n5. If a tax rate is defined for the system it is returned.\n6. If no tax rate is defined anywhere we will return an empty list.\n\nTo see which step was used to determine the tax rate, the source field is returned in the response.", "parameters": [ { "in": "path", "name": "countryCode", "required": true, "description": "This is the country code for which the tax rates are requested", "schema": { "type": "string" }, "example": "DE" }, { "name": "filter", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "productId", "date", "type", "projectId" ] }, "op": { "type": "string", "enum": [ "equals", "notEquals", "in", "notIn", "exactlyIn", "allIn", "allNotIn", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan", "is" ] }, "value": { "oneOf": [ { "type": "string", "description": "Used for the operations 'equals', 'notEquals', 'contains', 'notContains', 'startsWith', 'endsWith' and 'is'.", "title": "String" }, { "type": "array", "description": "Used for the operations 'in', 'notIn', 'exactlyIn', 'allIn' and 'allNotIn'.", "title": "Array", "items": { "type": "string" } } ] } } } } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "rate": { "type": "string", "description": "Tax rate value in percent" }, "type": { "type": "string", "description": "Tax rate type: standard, reduced or custom" }, "date": { "type": "string", "format": "date", "description": "Requested date or current date if no date was specified" }, "name": { "type": "string", "nullable": true, "description": "Tax rate's designation" }, "product": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "project": { "description": "Nullable reference to another resource", "type": "object", "additionalProperties": false, "nullable": true, "required": [ "id" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "example": { "id": "1337" } }, "source": { "type": "string", "description": "Informs how was the tax rate determined" } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/users": { "post": { "tags": [ "User" ], "operationId": "user.create", "summary": "Create user", "description": "Creates a new user using one of the available operations", "requestBody": { "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "username", "email", "password" ], "properties": { "username": { "type": "string" }, "email": { "type": "string" }, "password": { "type": "string" }, "description": { "type": "string" }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." }, "locale": { "type": "string", "enum": [ "de_DE", "en_US" ], "pattern": "[a-z]{2}_[A-Z]{2}", "example": "de_DE", "description": "ISO 15897 locale which matches one of the available locale values." } } }, "examples": { "user create": { "value": { "username": "Test user name", "email": "test@example.com", "password": "1234", "description": "Test user description", "color": "ff0000", "locale": "de_DE" } } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "get": { "tags": [ "User" ], "operationId": "user.list", "summary": "List users", "description": "Returns a collection with all users.", "parameters": [ { "name": "filter", "in": "query", "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "properties": { "ids": { "type": "array", "items": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } }, "username": { "type": "string" }, "description": { "type": "string" }, "isActive": { "type": "boolean" }, "email": { "type": "string" } } } }, { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "order", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "field": { "type": "string", "enum": [ "id", "username", "isActive", "createdAt" ] }, "dir": { "type": "string", "enum": [ "asc", "desc" ] } } } } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data", "extra" ], "properties": { "data": { "description": "A list of users", "type": "array", "items": { "description": "User resource.", "type": "object", "additionalProperties": false, "required": [ "id", "username", "description", "createdAt" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "globalUserId": { "description": "Nullable UUID identifier of the resource.", "type": "string", "pattern": "^$|^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$", "example": "a00fd11e-3a67-433b-83c0-4e815fd4a0e1", "nullable": true }, "username": { "description": "The name of the user", "type": "string", "example": "Benedikt" }, "createdAt": { "description": "The date the user was created", "type": "string", "format": "date-time", "example": "2023-08-13T14:45:36+02:00" }, "description": { "x-description-ignore": true, "type": "string", "nullable": true, "example": "This is the user description." }, "color": { "description": "An optional hex value without the #, representing the avatar color", "type": "string", "nullable": true, "example": "ff0000" }, "isActive": { "description": "A boolean value indicating if the user is active and can log in", "type": "boolean", "example": true }, "locale": { "description": "A ISO-639-1 formatted string indicating the language the user will use", "type": "string", "example": "de_DE" }, "isAdmin": { "description": "A boolean value indicating if the user is an admin", "type": "boolean", "example": false }, "email": { "x-description-ignore": true, "type": "string", "nullable": true, "example": "example@xentral.com" }, "isFirstLogin": { "x-description-ignore": true, "type": "boolean", "example": false }, "emailVerifiedAt": { "description": "The date where the user verified his email address", "type": "string", "format": "date-time", "nullable": true, "example": "2023-08-14T14:45:36+02:00" } } } }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/users/{id}": { "get": { "tags": [ "User" ], "operationId": "user.view", "summary": "View user", "description": "Returns details of a single user", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "A single user resource.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data" ], "properties": { "data": { "description": "User resource.", "type": "object", "additionalProperties": false, "required": [ "id", "username", "description", "createdAt" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "globalUserId": { "description": "Nullable UUID identifier of the resource.", "type": "string", "pattern": "^$|^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$", "example": "a00fd11e-3a67-433b-83c0-4e815fd4a0e1", "nullable": true }, "username": { "description": "The name of the user", "type": "string", "example": "Benedikt" }, "createdAt": { "description": "The date the user was created", "type": "string", "format": "date-time", "example": "2023-08-13T14:45:36+02:00" }, "description": { "x-description-ignore": true, "type": "string", "nullable": true, "example": "This is the user description." }, "color": { "description": "An optional hex value without the #, representing the avatar color", "type": "string", "nullable": true, "example": "ff0000" }, "isActive": { "description": "A boolean value indicating if the user is active and can log in", "type": "boolean", "example": true }, "locale": { "description": "A ISO-639-1 formatted string indicating the language the user will use", "type": "string", "example": "de_DE" }, "isAdmin": { "description": "A boolean value indicating if the user is an admin", "type": "boolean", "example": false }, "email": { "x-description-ignore": true, "type": "string", "nullable": true, "example": "example@xentral.com" }, "isFirstLogin": { "x-description-ignore": true, "type": "boolean", "example": false }, "emailVerifiedAt": { "description": "The date where the user verified his email address", "type": "string", "format": "date-time", "nullable": true, "example": "2023-08-14T14:45:36+02:00" } } } } } }, "application/vnd.xentral.user-permissions.v1+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data" ], "properties": { "data": { "description": "An object containing all th eusers permissions.", "type": "object", "additionalProperties": false, "required": [ "id", "username", "description", "createdAt" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "globalUserId": { "description": "Nullable UUID identifier of the resource.", "type": "string", "pattern": "^$|^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$", "example": "a00fd11e-3a67-433b-83c0-4e815fd4a0e1", "nullable": true }, "username": { "description": "The name of the user", "type": "string" }, "createdAt": { "description": "The date the user was created", "type": "string", "format": "date-time" }, "description": { "x-description-ignore": true, "type": "string", "nullable": true }, "color": { "description": "An optional hex value without the #, representing the avatar color", "type": "string", "nullable": true }, "isActive": { "description": "A boolean value indicating if the user is active and can log in", "type": "boolean" }, "locale": { "description": "A ISO-639-1 formatted string indicating the language the user will use", "type": "string" }, "isAdmin": { "description": "A boolean value indicating if the user is an admin", "type": "boolean" }, "email": { "x-description-ignore": true, "type": "string", "nullable": true }, "modules": { "description": "List of modules with their permissions.", "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "name", "permissions" ], "properties": { "name": { "type": "string" }, "permissions": { "type": "array", "items": { "type": "string" } } } } }, "emailVerifiedAt": { "description": "The date where the user verified his email address", "type": "string", "format": "date-time", "nullable": true } } } } } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "User" ], "operationId": "user.update", "summary": "Update user", "description": "Update a set of changes of an user.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "username": { "type": "string", "example": "Benedikt" }, "password": { "type": "string", "example": "abc123ghj987!?" }, "description": { "type": "string", "example": "This is the user description." }, "color": { "type": "string", "pattern": "[a-fA-F0-9]{6}", "example": "ff0000", "description": "Hexadecimal color value in 6-digit format without the leading # character." }, "locale": { "type": "string", "enum": [ "de_DE", "en_US" ], "pattern": "[a-z]{2}_[A-Z]{2}", "example": "de_DE", "description": "ISO 15897 locale which matches one of the available locale values." }, "email": { "type": "string" } } }, "examples": { "Update user": { "value": { "username": "updated name", "email": "updated@email.com", "description": "updated description", "color": "ff00ff", "locale": "en_US" } } } }, "application/vnd.xentral.password.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "current": { "type": "string", "minLength": 1 }, "password": { "type": "string", "minLength": 1 } } }, "examples": { "change password": { "value": { "current": "1234", "password": "abc!dfg352l?" } } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "delete": { "tags": [ "User" ], "operationId": "user.delete", "summary": "Delete single user", "description": "Deletes a single user resource identified by its URI", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "204": { "description": "Operation completed successfully, no response body" }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "429": { "description": "Too many API calls made." } } } }, "/api/users/{id}/permissions": { "get": { "tags": [ "User" ], "operationId": "user.permission.view", "summary": "View user's permissions", "description": "Returns all permissions of an user.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data" ], "properties": { "data": { "description": "An object containing all permissions of a user.", "type": "object", "additionalProperties": false, "required": [ "isAdmin", "modules" ], "properties": { "isAdmin": { "description": "Indicating if the user is an admin user", "type": "boolean", "example": false }, "modules": { "description": "List of modules with their permissions.", "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "name", "permissions" ], "properties": { "name": { "type": "string" }, "permissions": { "type": "array", "items": { "type": "string" } } }, "example": { "name": "benutzer", "permissions": [ "list", "edit" ] } } } } } } } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/warehouses": { "get": { "tags": [ "Warehouse" ], "operationId": "warehouse.list", "parameters": [ { "in": "query", "name": "page", "required": false, "style": "deepObject", "schema": { "type": "object", "additionalProperties": false, "required": [ "number", "size" ], "properties": { "number": { "type": "string", "pattern": "\\d+", "description": "Page number should be an integer greater than or equal to 1" }, "size": { "type": "string", "pattern": "\\d+", "description": "Page size should usually be an integer between 10 and 50." } } } }, { "name": "filter", "in": "query", "style": "deepObject", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "enum": [ "designation", "id" ] }, "op": { "type": "string", "enum": [ "greaterThan", "lessThan", "equals", "notEquals", "in", "notIn" ] }, "value": { "oneOf": [ { "type": "string", "title": "String" }, { "type": "array", "description": "Used for the operations 'in', 'notIn', 'exactlyIn', 'allIn' and 'allNotIn'.", "title": "Array", "items": { "type": "string" } } ] } } } } } ], "summary": "[EARLY ACCESS] Warehouse list", "description": "This endpoint is only available as beta version and will introduce breaking changes without further notice or versioning. Returns a list of active warehouses.", "responses": { "200": { "description": "Operation completed successfully.", "content": { "application/vnd.xentral.default.v1-beta+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "project": { "required": [ "id" ], "description": "Information for the project used by a Warehouse", "type": "object", "nullable": true, "properties": { "id": { "type": "string", "description": "Id of project" } }, "example": { "id": "1" } }, "designation": { "type": "string", "description": "Name of the project", "example": "STANDARD" } } }, "description": "Representation of a list of Warehouses", "example": [ { "id": "1", "project": { "id": "2" }, "designation": "STANDARD" } ] }, "extra": { "type": "object", "required": [ "totalCount", "page" ], "additionalProperties": false, "x-description-ignore": true, "properties": { "totalCount": { "description": "the total count of all items", "type": "integer", "example": 1 }, "page": { "description": "The pagination object containing the current page number and size", "type": "object", "required": [ "number", "size" ], "additionalProperties": false, "properties": { "number": { "description": "The current page number", "type": "integer", "example": 1 }, "size": { "description": "The size of the pages", "type": "integer", "example": 10 } }, "example": { "number": 1, "size": 10 } } }, "example": { "totalCount": 1, "page": { "number": 1, "size": 10 } } } } }, "example": { "data": [ { "id": "9", "designation": "Returns", "project": { "id": "3" } } ], "extra": { "totalCount": 1, "page": { "number": 1, "size": 1 } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/webhooks": { "post": { "tags": [ "Webhook" ], "operationId": "webhook.create", "summary": "Create a webhook", "description": "Creates a new webhook.", "requestBody": { "description": "Webhook create request payload", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "name", "url", "signatureKey", "events" ], "properties": { "name": { "type": "string", "example": "My example application" }, "url": { "type": "string", "format": "uri", "example": "https://example.com/receive-xentral-webhook-endpoint" }, "signatureKey": { "type": "string", "example": "rf5ecjtvnWQ4mTDfzOTZXgQuuCSFfR66" }, "events": { "type": "array", "description": "The webhookEventType resource.", "items": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "description": "The unique identifier of the event type.", "type": "string", "example": "com.xentral.salesOrder.created.v1" } } }, "example": [ { "id": "com.xentral.salesOrder.created.v1" }, { "id": "com.xentral.salesOrder.updated.v1" } ] } } }, "examples": { "Create new webhook": { "value": { "name": "My example application", "url": "https://example.com/receive-xentral-webhook-endpoint", "signatureKey": "rf5ecjtvnWQ4mTDfzOTZXgQuuCSFfR66", "events": [ { "id": "com.xentral.salesOrder.created.v1" }, { "id": "com.xentral.salesOrder.updated.v1" } ] } } } } } }, "responses": { "201": { "description": "Resource successfully created response", "headers": { "Location": { "schema": { "type": "string", "example": "https://example.xentral.biz/api/users/17" }, "description": "URI of the created resource" } }, "content": { "text/html": { "schema": { "type": "string", "enum": [ "" ], "nullable": true } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "get": { "tags": [ "Webhook" ], "operationId": "webhook.list", "summary": "List webhooks", "description": "List webhooks.", "responses": { "200": { "description": "Webhook list.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data" ], "properties": { "data": { "description": "The webhook resource list.", "x-example-ignore": true, "type": "array", "items": { "description": "The webhook resource.", "example": { "id": "1234", "name": "My example application", "url": "https://example.com/receive-xentral-webhook-endpoint", "events": [ { "id": "com.xentral.salesOrder.created.v1" }, { "id": "com.xentral.salesOrder.updated.v1" } ] }, "type": "object", "additionalProperties": false, "required": [ "id", "name", "url", "events" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "description": "The name of the webhook.", "type": "string", "example": "My example application" }, "url": { "description": "The URL of the application which should receive the webhook request.", "type": "string", "format": "uri", "example": "https://example.com/receive-xentral-webhook-endpoint" }, "events": { "type": "array", "description": "The webhookEventType resource.", "items": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "description": "The unique identifier of the event type.", "type": "string", "example": "com.xentral.salesOrder.created.v1" } } }, "example": [ { "id": "com.xentral.salesOrder.created.v1" }, { "id": "com.xentral.salesOrder.updated.v1" } ] } } } } } } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } }, "/api/webhooks/{id}": { "get": { "tags": [ "Webhook" ], "operationId": "webhook.view", "summary": "View a webhook", "description": "View a webhook.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "200": { "description": "Webhook view.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data" ], "properties": { "data": { "description": "The webhook resource.", "example": { "id": "1234", "name": "My example application", "url": "https://example.com/receive-xentral-webhook-endpoint", "events": [ { "id": "com.xentral.salesOrder.created.v1" }, { "id": "com.xentral.salesOrder.updated.v1" } ] }, "type": "object", "additionalProperties": false, "required": [ "id", "name", "url", "events" ], "properties": { "id": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." }, "name": { "description": "The name of the webhook.", "type": "string", "example": "My example application" }, "url": { "description": "The URL of the application which should receive the webhook request.", "type": "string", "format": "uri", "example": "https://example.com/receive-xentral-webhook-endpoint" }, "events": { "type": "array", "description": "The webhookEventType resource.", "items": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "description": "The unique identifier of the event type.", "type": "string", "example": "com.xentral.salesOrder.created.v1" } } }, "example": [ { "id": "com.xentral.salesOrder.created.v1" }, { "id": "com.xentral.salesOrder.updated.v1" } ] } } } } } } } }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "404": { "description": "Resource was not found or not enough access privileges" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } }, "patch": { "tags": [ "Webhook" ], "operationId": "webhook.update", "summary": "Update a webhook", "description": "Update a webhook.", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "requestBody": { "description": "Webhook update request payload", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "example": "My example application" }, "url": { "type": "string", "format": "uri", "example": "https://example.com/receive-xentral-webhook-endpoint" }, "signatureKey": { "type": "string", "example": "rf5ecjtvnWQ4mTDfzOTZXgQuuCSFfR66" }, "events": { "type": "array", "description": "The webhookEventType resource", "items": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "description": "The unique identifier of the event type.", "type": "string", "example": "com.xentral.salesOrder.created.v1" } } }, "example": [ { "id": "com.xentral.salesOrder.created.v1" }, { "id": "com.xentral.salesOrder.updated.v1" } ] } } }, "examples": { "Update webhook": { "value": { "events": [ { "id": "com.xentral.salesOrder.created.v1" } ] } } } } } }, "responses": { "204": { "description": "Operation completed successfully, no response body" }, "400": { "description": "IETF RFC 7807 Problem API compliant response", "content": { "application/problem+json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "title", "violations" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/request-validation" ] }, "title": { "type": "string", "minLength": 1, "example": "Request payload validation failed." }, "violations": { "oneOf": [ { "type": "array", "items": { "type": "object", "example": { "username": [ "This value should not be blank." ], "email": [ "This value is not a valid email address." ] } }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." }, { "type": "object", "example": { "_": [ "This value should contain at most `9` elements." ] }, "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages." } ] } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/generic-validation" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "messages" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflict" ] }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } }, { "type": "object", "additionalProperties": false, "required": [ "type", "title", "items" ], "properties": { "type": { "type": "string", "enum": [ "https://api.xentral.biz/problems/conflictItems" ] }, "title": { "type": "string", "minLength": 1 }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "messages" ], "properties": { "id": { "type": "integer" }, "title": { "type": "string", "minLength": 1 }, "messages": { "type": "array", "items": { "type": "string" } } } } } } } ] } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "415": { "description": "Resource representation send in the request is not supported." }, "429": { "description": "Too many API calls made." } } }, "delete": { "tags": [ "Webhook" ], "operationId": "webhook.delete", "summary": "Delete a webhook.", "description": "Delete a webhook", "parameters": [ { "in": "path", "name": "id", "required": true, "description": "The resource's identifier.", "schema": { "type": "string", "pattern": "\\d+", "example": "17", "description": "Resource identifier." } } ], "responses": { "204": { "description": "Operation completed successfully, no response body" }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "429": { "description": "Too many API calls made." } } } }, "/api/webhookEventTypes": { "get": { "tags": [ "Webhook" ], "operationId": "webhookEventTypes.list", "summary": "List webhook event types", "description": "List webhooks event types.", "parameters": [ { "name": "xentralVersion", "in": "query", "example": "24.11.0", "schema": { "type": "string", "default": "latest" }, "description": "Xentral version to request the available event types for." } ], "responses": { "200": { "description": "Webhook event type list.", "content": { "application/vnd.xentral.default.v1+json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "data" ], "properties": { "data": { "description": "List of webhook event types.", "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "group" ], "properties": { "id": { "description": "The unique identifier of the event type.", "type": "string", "example": "com.xentral.salesOrder.created.v1" }, "group": { "description": "The group the event type belongs to.", "type": "string", "example": "salesOrder" } } }, "example": [ { "id": "com.xentral.salesOrder.created.v1", "group": "salesOrder" }, { "id": "com.xentral.product.created.v1", "group": "product" }, { "id": "com.xentral.product.propertiesCreated.v1", "group": "product" } ] } } } } } }, "401": { "description": "Unable to authenticate the client", "content": { "text/html": { "schema": { "type": "string", "example": "Unauthorized" } } } }, "403": { "description": "Unable to authorize the client" }, "406": { "description": "Requested resource representation does not exist." }, "429": { "description": "Too many API calls made." } } } } } }