# Invoice from order creation Creating invoice from existing order. Endpoint: POST /api/orders/{code}/invoice Version: 1.0.0 Security: shoptetAccessToken, shoptetPrivateApiToken ## Path parameters: - `code` (string, required) Code of order Example: "2018000053" ## Query parameters: - `suppressExistenceCheck` (boolean) suppress checking of existing invoices per order (allows multiple invoices per order) Example: true ## Header parameters: - `Content-Type` (string, required) ## Request fields (application/json): - `data` (object, required) - `data.invoiceCode` (string) Invoice code. Optional, generated by eshop settings if not set. - `data.varSymbol` (number) Variable symbol. Optional, generated by eshop settings if not set. - `data.dueDate` (string,null) Due date. Optional, generated by eshop settings if not set. - `data.taxDate` (string,null) Date of taxation. Default is today. - `data.constSymbol` (string) Const symbol. Only numbers are allowed (max length 4). - `data.specSymbol` (number) Spec symbol. - `data.billingMethodId` (number,null) Billing method identifier - see also [Invoice billing methods](#section/code-lists/invoice-billing-methods) code list. Defaults to order's. - `data.proformaInvoiceCode` (string) Code of proforma invoice. Must exist if set. - `data.proofPaymentCodes` (array) List of linked proof payments. ## Response 201 fields (application/json): - `data` (object, required) - `data.invoice` (object, required) - `data.invoice.code` (string, required) variant code (product) - `data.invoice.isValid` (boolean, required) is the invoice valid? - `data.invoice.proformaInvoiceCodes` (array) List of linked proforma invoices - `data.invoice.orderCode` (string,null, required) purchase order number. Caution! This does not have to be just a number, it can also contain letters, a dash, etc. - `data.invoice.creationTime` (string,null, required) date of issue, in ISO 8601 format - `data.invoice.changeTime` (string,null, required) date of change, in ISO 8601 format - `data.invoice.dueDate` (string,null, required) due date in ISO 8601 format - `data.invoice.taxDate` (string,null, required) taxation date in ISO 8601 format - `data.invoice.varSymbol` (number, required) variable symbol - `data.invoice.constSymbol` (string,null, required) constant symbol - `data.invoice.specSymbol` (number,null, required) specific symbol - `data.invoice.weight` (string,null, required) weight in kg, unpacked. 3 decimal places. - `data.invoice.completePackageWeight` (string,null, required) total weight of package in kg. 3 decimal places. - `data.invoice.billingMethod` (any, required) information about the method of payment - `data.invoice.billingAddress` (object, required) invoicing address - `data.invoice.billingAddress.company` (string,null, required) name of purchaser''s company (or ) - `data.invoice.billingAddress.fullName` (string,null, required) name of purchaser (or ) - `data.invoice.billingAddress.street` (string,null, required) street of purchaser (or ) - `data.invoice.billingAddress.houseNumber` (string,null, required) street number (or ) - `data.invoice.billingAddress.city` (string,null, required) city/town (village) (or ) - `data.invoice.billingAddress.district` (string,null, required) county (or ) - `data.invoice.billingAddress.additional` (string,null, required) additional address information (or ) - `data.invoice.billingAddress.zip` (string,null, required) ZIP or postal code (or ) - `data.invoice.billingAddress.countryCode` (string,null, required) tree-character ISO country code (ISO 4217) - `data.invoice.billingAddress.regionName` (string,null, required) region name (or ) - `data.invoice.billingAddress.regionShortcut` (string,null, required) region abbreviation (or ) - `data.invoice.billingAddress.companyId` (string,null, required) Company registration number. (can be ) - `data.invoice.billingAddress.vatId` (string,null, required) VAT identification number. (can be ) - `data.invoice.billingAddress.vatIdValidationStatus` (any) Info, whether VAT ID has been verified, enum [, , ] Enum: "unverified", "verified", "waiting", null - `data.invoice.billingAddress.taxId` (string,null, required) TAX identification number. For Czech address, taxId is same as vatId. (can be ) - `data.invoice.deliveryAddress` (object,null, required) - `data.invoice.addressesEqual` (boolean, required) are the billing and delivery addresses the same? - `data.invoice.price` (object, required) - `data.invoice.price.vat` (string,null, required) VAT value, two decimal places - `data.invoice.price.toPay` (string,null, required) total price to pay - `data.invoice.price.currencyCode` (string, required) currency code. List of available currencies within the e-shop can be found in endpoint . - `data.invoice.price.withoutVat` (string,null, required) price excluding tax - `data.invoice.price.withVat` (string,null, required) price including tax - `data.invoice.price.exchangeRate` (string, required) currency rate of the receipt for the default currency of the shop. This value is saved together with the price and reflects the historical value valid in the instant of the order creation. If the shop changes the default currency, the value still refers to the original currency! - `data.invoice.price.invoicingExchangeRate` (string) currency rate of the receipt for the default currency of the shop. This value is saved together with the price and reflects the historical value valid in the instant of the order creation. If the shop changes the default currency, the value still refers to the original currency! - `data.invoice.price.partialPaymentAmount` (string,null) can be value expressed in percents or as exact money value expression (with up to two decimal places) - depends on partialPaymentType value - `data.invoice.price.partialPaymentType` (string) 'percents' = partial payment as percentage from total price | 'absolute' = exact expression of partial payment in money - `data.invoice.customer` (object, required) - `data.invoice.customer.guid` (any, required) customer identifier (can be ) - `data.invoice.customer.phone` (string,null, required) customer phone (can be ) - `data.invoice.customer.email` (string,null, required) customer e-mail (can be ) - `data.invoice.customer.remark` (string,null, required) remark for the customer (can be ) - `data.invoice.eshop` (object, required) - `data.invoice.eshop.bankAccount` (string,null, required) e-shop bank account (can be ) - `data.invoice.eshop.iban` (string,null, required) e-shop IBAN (can be ) - `data.invoice.eshop.bic` (string,null, required) bank code - SWIFT (can be ) - `data.invoice.eshop.vatPayer` (boolean, required) VAT payer (can be ) - `data.invoice.items` (array, required) content of the invoice - `data.invoice.items.productGuid` (any, required) global unique permanent product identifier. - `data.invoice.items.itemId` (number, required) item identifier for manipulation with this item - `data.invoice.items.itemType` (string, required) item type - `data.invoice.items.name` (string,null, required) product name - `data.invoice.items.variantName` (string,null, required) variant name - `data.invoice.items.brand` (string,null, required) brand (or manufacturer, possibly) - `data.invoice.items.amount` (string,null, required) quantity - `data.invoice.items.amountUnit` (string,null, required) unit of quantity - `data.invoice.items.remark` (string,null, required) remark - `data.invoice.items.priceRatio` (string, required) discount - 0.7800 = discount 22%; 1.0000 = no discount - `data.invoice.items.weight` (any, required) - `data.invoice.items.additionalField` (string,null, required) additional info - `data.invoice.items.itemPrice` (object, required) item price - `data.invoice.items.itemPrice.vatRate` (string, required) VAT rate - `data.invoice.items.purchasePrice` (any, required) purchase price of the part, can be . - `data.invoice.items.displayPrices` (array) in some cases, one item is displayed as multiple lines in the administration or a printout. This array contains one or more rows representing the printout version of the item. - `data.invoice.items.recyclingFee` (object,null) recycling fee including category and price (or possibly ) - `data.invoice.items.recyclingFee.category` (string, required) Recycling fee category name. - `data.invoice.items.recyclingFee.fee` (string,null, required) Recycling fee. - `data.invoice.items.recyclingFee.unit` (any) Recycling fee unit. Enum: "pcs", "kg" - `data.invoice.items.surchargeParameters` (array) items surcharge parameters, filled in item creation. Cannot be edited. - `data.invoice.items.surchargeParameters.parameterName` (object) surcharge parameter name's information - `data.invoice.items.surchargeParameters.parameterName.code` (string,null) parameters name code, can be null if already deleted - `data.invoice.items.surchargeParameters.parameterName.name` (string) parameters name - `data.invoice.items.surchargeParameters.parameterValue` (object) surcharge parameter value's information - `data.invoice.items.surchargeParameters.parameterValue.valueIndex` (string,null) parameters value code, can be null if already deleted - `data.invoice.items.surchargeParameters.parameterValue.description` (string) parameters value name - `data.invoice.items.surchargeParameters.parameterValue.price` (string,null) parameters value additional price - `data.invoice.items.specificSurchargeParameters` (array) List of specific surcharge parameters for item detail. - `data.invoice.items.specificSurchargeParameters.relationId` (string, required) id which identifies relation between item and surcharge. Can be used to delete surcharge parameter related to item. - `data.invoice.items.specificSurchargeParameters.name` (string, required) full name of surcharge parameter. - `data.invoice.items.specificSurchargeParameters.price` (string,null, required) price of surcharge parameter - `data.invoice.items.consumptionTax` (object,null, required) consumption tax of invoice item - `data.invoice.items.consumptionTax.currency` (string, required) currency code. List of available currencies within the e-shop can be found in endpoint . - `data.invoice.items.consumptionTax.price` (string,null, required) consumption tax value - `data.invoice.items.buyPrice` (any, required) buy price of the part, can be . - `data.invoice.documentRemark` (string,null, required) remark for the document - `data.invoice.vatPayer` (boolean, required) is the e-shop a VAT payer? - `data.invoice.vatMode` (string,null) VAT mode, can be null, possible values: , , , , - `data.invoice.proofPayments` (array) List of linked proof payments - `data.invoice.proofPayments.code` (string, required) proof payments identifier. Caution! This does not have to be just a number, it can also contain letters, a dash, etc. - `data.invoice.proofPayments.vatBreakdown` (object,null, required) breakdown of VAT (can be ) - `data.invoice.proofPayments.vatBreakdown.items` (array, required) breakdown of VAT items - `data.invoice.proofPayments.vatBreakdown.items.priceWithVat` (string,null, required) price with VAT - `data.invoice.proofPayments.vatBreakdown.items.priceWithoutVat` (string,null, required) price without VAT - `data.invoice.proofPayments.vatBreakdown.items.vat` (string,null, required) VAT value - `data.invoice.proofPayments.vatBreakdown.summary` (object, required) summary of VAT breakdown - `data.invoice.proofPayments.vatBreakdown.summary.withVat` (string,null, required) Total price with VAT - `data.invoice.proofPayments.vatBreakdown.summary.withoutVat` (string,null, required) Total price without VAT - `data.invoice.proofPayments.vatBreakdown.summary.vat` (string,null, required) Total VAT value - `data.invoice.proformaInvoiceCode` (string,null, required) DEPRECATED - proforma invoice number. Caution! This does not have to be just a number, it can also contain letters, a dash, etc. - `errors` (array,null, required) - `errors.errorCode` (string, required) Short text error identification - `errors.message` (string, required) Descriptive error message - `errors.instance` (string, required) Identification of the entity referenced ## Response 422 fields (application/json): - `data` (object,null) - `errors` (array,null) - `errors.errorCode` (string, required) Short text error identification - `errors.message` (string, required) Descriptive error message - `errors.instance` (string, required) Identification of the entity referenced