# Proforma invoice from order creation Creating proforma invoice from existing order. Endpoint: POST /api_orders_{code}_proforma-invoice.yaml 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 proforma invoices per order (allows multiple proforma invoices per order) Example: true ## Header parameters: - `Content-Type` (string, required) ## Request fields (application/json): - `data` (object, required) - `data.proformaInvoiceCode` (string) Proforma invoice code. Optional, generated by eshop settings if not set. - `data.varSymbol` (integer) Variable symbol. Optional, generated by eshop settings if not set. - `data.creationTime` (string,null) Proforma invoice date time creation, in ISO 8601 format. - `data.dueDate` (string,null) Due date. Optional, generated by eshop settings if not set. - `data.constSymbol` (string,null) Const symbol. Only numbers are allowed (max length 4). - `data.specSymbol` (integer,null) Specific 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. ## Response 201 fields (application/json): - `data` (object, required) - `data.proformaInvoice` (object, required) - `data.proformaInvoice.code` (string, required) proforma invoice number. Caution! This does not have to be just a number, it can also contain letters, a dash, etc. - `data.proformaInvoice.isValid` (boolean, required) is the proforma invoice valid? - `data.proformaInvoice.paid` (boolean,null, required) is the proforma invoice paid? - `data.proformaInvoice.orderCode` (string,null, required) purchase order number (can be null). Caution! This does not have to be just a number, it can also contain letters, a dash, etc. - `data.proformaInvoice.creationTime` (string,null, required) date of issue, in ISO 8601 format - `data.proformaInvoice.changeTime` (string,null, required) date of last change, in ISO 8601 format - `data.proformaInvoice.dueDate` (string,null, required) due date, in ISO 8601 format - `data.proformaInvoice.varSymbol` (number, required) variable symbol - `data.proformaInvoice.constSymbol` (string,null, required) constant symbol - `data.proformaInvoice.specSymbol` (number,null, required) specific symbol - `data.proformaInvoice.weight` (string,null, required) weight in kg, unpacked. 3 decimal places. - `data.proformaInvoice.completePackageWeight` (string,null, required) total weight of package in kg. 3 decimal places. - `data.proformaInvoice.billingMethod` (any, required) information about the method of payment. - `data.proformaInvoice.billingAddress` (object, required) invoicing address - `data.proformaInvoice.billingAddress.company` (string,null, required) name of purchaser''s company (or null) - `data.proformaInvoice.billingAddress.fullName` (string,null, required) name of purchaser (or null) - `data.proformaInvoice.billingAddress.street` (string,null, required) street of purchaser (or null) - `data.proformaInvoice.billingAddress.houseNumber` (string,null, required) street number (or null) - `data.proformaInvoice.billingAddress.city` (string,null, required) city/town (village) (or null) - `data.proformaInvoice.billingAddress.district` (string,null, required) county (or null) - `data.proformaInvoice.billingAddress.additional` (string,null, required) additional address information (or null) - `data.proformaInvoice.billingAddress.zip` (string,null, required) ZIP or postal code (or null) - `data.proformaInvoice.billingAddress.countryCode` (string,null, required) tree-character ISO country code (ISO 4217) - `data.proformaInvoice.billingAddress.regionName` (string,null, required) region name (or null) - `data.proformaInvoice.billingAddress.regionShortcut` (string,null, required) region abbreviation (or null) - `data.proformaInvoice.billingAddress.companyId` (string,null, required) Company registration number. (can be null) - `data.proformaInvoice.billingAddress.vatId` (string,null, required) VAT identification number. (can be null) - `data.proformaInvoice.billingAddress.vatIdValidationStatus` (any) Info, whether VAT ID has been verified, enum [unverified, verified, waiting] Enum: "unverified", "verified", "waiting", null - `data.proformaInvoice.billingAddress.taxId` (string,null, required) TAX identification number. For Czech address, taxId is same as vatId. (can be null) - `data.proformaInvoice.deliveryAddress` (object,null, required) - `data.proformaInvoice.addressesEqual` (boolean, required) are the billing and delivery addresses the same? - `data.proformaInvoice.price` (object, required) price information - `data.proformaInvoice.price.vat` (string,null, required) VAT value, two decimal places - `data.proformaInvoice.price.toPay` (string,null, required) total price to pay - `data.proformaInvoice.price.currencyCode` (string, required) Currency code. List of available currencies within the e-shop can be found in endpoint GET /api/eshop. - `data.proformaInvoice.price.withoutVat` (string,null, required) price excluding tax - `data.proformaInvoice.price.withVat` (string,null, required) price including tax - `data.proformaInvoice.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.proformaInvoice.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.proformaInvoice.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.proformaInvoice.price.partialPaymentType` (string) 'percents' = partial payment as percentage from total price | 'absolute' = exact expression of partial payment in money - `data.proformaInvoice.customer` (object, required) - `data.proformaInvoice.customer.guid` (any, required) customer identifier (can be null) - `data.proformaInvoice.customer.phone` (string,null, required) customer phone (can be null) - `data.proformaInvoice.customer.email` (string,null, required) customer e-mail (can be null) - `data.proformaInvoice.customer.remark` (string,null, required) remark for the customer (can be null) - `data.proformaInvoice.eshop` (object, required) - `data.proformaInvoice.eshop.bankAccount` (string,null, required) e-shop bank account (can be null) - `data.proformaInvoice.eshop.iban` (string,null, required) e-shop IBAN (can be null) - `data.proformaInvoice.eshop.bic` (string,null, required) bank code - SWIFT (can be null) - `data.proformaInvoice.eshop.vatPayer` (boolean, required) VAT payer (can be null) - `data.proformaInvoice.items` (array, required) content of the proforma invoice - `data.proformaInvoice.items.productGuid` (any, required) global unique permanent product identifier (can be null) - `data.proformaInvoice.items.code` (string,null, required) variant code (product) (can be null) - `data.proformaInvoice.items.itemType` (string, required) item type - `data.proformaInvoice.items.name` (string,null, required) product name (can be null) - `data.proformaInvoice.items.variantName` (string,null, required) variant name (can be null) - `data.proformaInvoice.items.brand` (string,null, required) brand name (can be null) - `data.proformaInvoice.items.amount` (string,null, required) quantity - `data.proformaInvoice.items.amountUnit` (string,null, required) unit of quantity (can be null) - `data.proformaInvoice.items.remark` (string,null, required) remark (can be null) - `data.proformaInvoice.items.priceRatio` (string, required) discount - 0.7800 = discount 22%; 1.0000 = no discount - `data.proformaInvoice.items.weight` (any, required) - `data.proformaInvoice.items.additionalField` (string,null, required) additional info (can be null) - `data.proformaInvoice.items.itemPrice` (object, required) item price - `data.proformaInvoice.items.itemPrice.vatRate` (string, required) VAT rate - `data.proformaInvoice.items.unitPrice` (object, required) unit price - `data.proformaInvoice.items.purchasePrice` (any, required) purchase price of the part, can be null. - `data.proformaInvoice.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.proformaInvoice.items.itemId` (number, required) item identifier for manipulation with this item - `data.proformaInvoice.items.surchargeParameters` (array) - `data.proformaInvoice.items.surchargeParameters.parameterName` (object) surcharge parameter name's information - `data.proformaInvoice.items.surchargeParameters.parameterName.code` (string,null) parameters name code, can be null if already deleted - `data.proformaInvoice.items.surchargeParameters.parameterName.name` (string) parameters name - `data.proformaInvoice.items.surchargeParameters.parameterName.subscription` (boolean,null) indicates whether this surcharge parameter is a subscription (recurring payment) - `data.proformaInvoice.items.surchargeParameters.parameterValue` (object) surcharge parameter value's information - `data.proformaInvoice.items.surchargeParameters.parameterValue.valueIndex` (string,null) parameters value code, can be null if already deleted - `data.proformaInvoice.items.surchargeParameters.parameterValue.description` (string) parameters value name - `data.proformaInvoice.items.surchargeParameters.parameterValue.price` (string,null) parameters value additional price - `data.proformaInvoice.items.specificSurchargeParameters` (array) - `data.proformaInvoice.items.specificSurchargeParameters.relationId` (string, required) id which identifies relation between item and surcharge. Can be used to delete surcharge parameter related to item. - `data.proformaInvoice.items.specificSurchargeParameters.name` (string, required) full name of surcharge parameter. - `data.proformaInvoice.items.specificSurchargeParameters.price` (string,null, required) price of surcharge parameter - `data.proformaInvoice.items.itemPriceVatBreakdown` (array,null) Detailed VAT list displaying tax amounts for each VAT rate used in the document. Applied for non product items. - `data.proformaInvoice.items.buyPrice` (any, required) buy price of the part, can be null. - `data.proformaInvoice.documentRemark` (string,null, required) remark for the document - `data.proformaInvoice.vatPayer` (boolean, required) was the tradesman a VAT payer, when the receipt was issued? - `data.proformaInvoice.vatMode` (string,null) VAT mode, can be null, for possible values see [VAT modes](#section/code-lists/vat-modes) code list - `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 404 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 ## Response 409 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 ## 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