# QR Invoice REST API The QR Invoice REST API provides various services for creation and processing of Swiss QR Invoices. This API is available as a Cloud Service but is also available as a self-hosted solution.

Product Website

www.qr-invoice.ch

API Key

This API requires an API Key for authorization on the Cloud. You may use the following Demo API Key or request a trial API on our website: QrInvoice - Order Trial Key
582c9ea9-741a-4bb6-acae-cf92f8805864

Important: Use of Demo API Key comes with a few restrictions!

Hints


Standards / Specifications

Overview of official specs www.qr-invoice.ch/dokumentation/standards-merkblaetter/

QR Invoice Layers


QR Invoice Model



Product Version: 1.21-SNAPSHOT Version: 2.0 License: Commercial license ## Servers Generated server url ``` https://rest.qr-invoice.cloud ``` ## Security ### X-API-Key API Key via Header Type: apiKey In: header Name: X-API-Key ### api_key API Key via Parameter Type: apiKey In: query Name: api_key ## Download OpenAPI description [QR Invoice REST API](https://apis.codeblock.ch/_spec/QR-Invoice/api-docs.yaml) ## 00 Example Data Various example data that can be used as example input to other services ### Swiss Payments Code - Example without Reference Number - [GET /v2/examples/swiss-payments-code/without-reference](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/nonreference.md) ### Swiss Payments Code - Example without Amount - [GET /v2/examples/swiss-payments-code/without-amount](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/withoutamount.md) ### Swiss Payments Code - Example with QR Reference - [GET /v2/examples/swiss-payments-code/with-qr-reference](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/qrreference.md) ### Swiss Payments Code - Example with Creditor Reference - [GET /v2/examples/swiss-payments-code/with-creditor-reference](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/creditorreference.md) ### Swiss Payments Code - Example without Amount and Debtor (blank) - [GET /v2/examples/swiss-payments-code/blank](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/blank.md) ### Swico S1 v1.2 - [GET /v2/examples/swicos1v12](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/swicos1v12.md) ### QR Reference - [GET /v2/examples/qr-reference](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/qrreference_1.md) ### QrInvoice - Example without Reference Number - [GET /v2/examples/qr-invoice/without-reference](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/nonreference_1.md) ### QrInvoice - Example without Amount - [GET /v2/examples/qr-invoice/without-amount](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/withoutamount_1.md) ### QrInvoice - Example with QR Reference - [GET /v2/examples/qr-invoice/with-qr-reference](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/qrreference_2.md) ### QrInvoice - Example with Creditor Reference - [GET /v2/examples/qr-invoice/with-creditor-reference](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/creditorreference_1.md) ### QrInvoice - Example Excel (XLSX) file that is used as input for bulk operation - [GET /v2/examples/qr-invoice/bulk/xlsx](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/xlsx.md) ### QrInvoice - Example with a list of QR invoices - [GET /v2/examples/qr-invoice/bulk/list](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/list.md) ### QrInvoice - Example CSV file that is used as input for bulk operation - [GET /v2/examples/qr-invoice/bulk/csv](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/csv.md) ### QrInvoice - Example without Amount and Debtor (blank) - [GET /v2/examples/qr-invoice/blank](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/blank_1.md) ### QR-IBAN - [GET /v2/examples/qr-iban](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/qriban.md) ### Invoice Document - Example with QR Reference - [GET /v2/examples/invoice-document/mixed-vat](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/mixedvat.md) ### Invoice Document - Example with QR Reference - [GET /v2/examples/invoice-document/gtin](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/gtin.md) ### Invoice Document - Example with QR Reference - [GET /v2/examples/invoice-document/discounts](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/discounts.md) ### IBAN - [GET /v2/examples/iban](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/iban.md) ### Creditor Reference - [GET /v2/examples/creditor-reference](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/creditorreference_2.md) ### Valid Characters IG 2.0 - 2.2 - [GET /v2/examples/charset/lteV2_2](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/charsetltev2_2.md): Valid characters according to specification 2.0 - 2.2 (Implementation Guidelines for the QR-bill) ### Valid Characters IG 2.3 - [GET /v2/examples/charset/gteV2_3](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/charsetgtev2_3.md): Valid characters according to specification 2.3 (Implementation Guidelines for the QR-bill). Newly added characters be used after 21.11.2025 ### Added Characters in IG 2.3 - [GET /v2/examples/charset/addedInV2_3](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/addedcharsv2_3.md): Added characters to allowed set of characters in specification 2.3 (Implementation Guidelines for the QR-bill). Newly added characters be used after 21.11.2025 ### QrInvoice - Example with combined address (deprecated) - [GET /v2/examples/qr-invoice/combined-address](https://apis.codeblock.ch/qr-invoice/api-docs/00-example-data/qrreferencecombinedaddress.md) ## 10 QR Invoice Documents including Payment Part & Receipt (QR Bill) ### Create a QR Invoice Document (QR Bill) - [POST /v2/invoice-document](https://apis.codeblock.ch/qr-invoice/api-docs/10-qr-invoice-documents-including-payment-part-and-receipt-(qr-bill)/createinvoicedocument.md) ### Create an InvoiceDocument xml template model - [POST /v2/invoice-document/xml-template-model](https://apis.codeblock.ch/qr-invoice/api-docs/10-qr-invoice-documents-including-payment-part-and-receipt-(qr-bill)/createinvoicedocumenttemplatemodel.md) ### Add new customer resource - [POST /v2/invoice-document/resources/{filename}](https://apis.codeblock.ch/qr-invoice/api-docs/10-qr-invoice-documents-including-payment-part-and-receipt-(qr-bill)/addcustomerresource.md) ### List Available Invoice Document Templates - [GET /v2/invoice-document/templates](https://apis.codeblock.ch/qr-invoice/api-docs/10-qr-invoice-documents-including-payment-part-and-receipt-(qr-bill)/listtemplates.md) ### List customer resources - [GET /v2/invoice-document/resources](https://apis.codeblock.ch/qr-invoice/api-docs/10-qr-invoice-documents-including-payment-part-and-receipt-(qr-bill)/listcustomerresources.md) ## 11 Payment Part & Receipt (QR Bill) ### Create Payment Part & Receipt - Prefer POST endpoint if possible - [GET /v2/payment-part-receipt](https://apis.codeblock.ch/qr-invoice/api-docs/11-payment-part-and-receipt-(qr-bill)/createpaymentpartreceipt_1.md) ### Create Payment Part & Receipt - [POST /v2/payment-part-receipt](https://apis.codeblock.ch/qr-invoice/api-docs/11-payment-part-and-receipt-(qr-bill)/createpaymentpartreceipt.md) ### Create Payment Part & Receipt and merge it with a PDF - [POST /v2/payment-part-receipt/merge](https://apis.codeblock.ch/qr-invoice/api-docs/11-payment-part-and-receipt-(qr-bill)/createandmergepaymentpartreceipt.md) ### Clones / recreates a given Payment Part & Receipt based on an existing Swiss QR Code of a given document - [POST /v2/payment-part-receipt/clone](https://apis.codeblock.ch/qr-invoice/api-docs/11-payment-part-and-receipt-(qr-bill)/createandappendpaymentpartreceipt.md) ### Create Payment Part & Receipts for a list of QrInvoices - [POST /v2/payment-part-receipt/bulk/list](https://apis.codeblock.ch/qr-invoice/api-docs/11-payment-part-and-receipt-(qr-bill)/createpaymentpartreceipts.md) ### Create Payment Part & Receipts as a bulk operation based on a given input file (CSV or XLSX). Result is either a multi page PDF file or a ZIP file containing files for each list entry. - [POST /v2/payment-part-receipt/bulk/file](https://apis.codeblock.ch/qr-invoice/api-docs/11-payment-part-and-receipt-(qr-bill)/bulk.md) ### Create Payment Part & Receipt and append it to a PDF on a new page - [POST /v2/payment-part-receipt/append](https://apis.codeblock.ch/qr-invoice/api-docs/11-payment-part-and-receipt-(qr-bill)/createandappendpaymentpartreceipt_1.md) ## 12 Swiss QR Code ### Create Swiss QR Code - Prefer POST endpoint if possible - [GET /v2/swiss-qr-code](https://apis.codeblock.ch/qr-invoice/api-docs/12-swiss-qr-code/create_4.md) ### Create Swiss QR Code - [POST /v2/swiss-qr-code](https://apis.codeblock.ch/qr-invoice/api-docs/12-swiss-qr-code/create.md) ### Validate file containing a single Swiss QR Code - [POST /v2/swiss-qr-code/validate](https://apis.codeblock.ch/qr-invoice/api-docs/12-swiss-qr-code/validate.md) ### Parse / extract Swiss QR Code from document (Returns first code if multiple present) - [POST /v2/swiss-qr-code/parse](https://apis.codeblock.ch/qr-invoice/api-docs/12-swiss-qr-code/parse.md) ### Parse / extract all Swiss QR Code from document in an array - [POST /v2/swiss-qr-code/parseAll](https://apis.codeblock.ch/qr-invoice/api-docs/12-swiss-qr-code/parseall.md) ## 13 Swiss Payments Code ### Create Swiss Payments Code - [POST /v2/swiss-payments-code](https://apis.codeblock.ch/qr-invoice/api-docs/13-swiss-payments-code/create_1.md) ### Validates the given Swiss Payments Code - [POST /v2/swiss-payments-code/validate](https://apis.codeblock.ch/qr-invoice/api-docs/13-swiss-payments-code/validate_1.md) ### Parse Swiss Payments Code - [POST /v2/swiss-payments-code/parse](https://apis.codeblock.ch/qr-invoice/api-docs/13-swiss-payments-code/parse_1.md) ## 20 IBAN ### Validate a QR IBAN. QR IBANs are regular IBANs. The only special thing is that the IID (institutional identification) is in the QR-IID range. QR-IIDs consist exclusively of numbers from 30000 to 31999. - [POST /v2/qr-iban/validate](https://apis.codeblock.ch/qr-invoice/api-docs/20-iban/validateqriban.md) ### Validate an IBAN - [POST /v2/iban/validate](https://apis.codeblock.ch/qr-invoice/api-docs/20-iban/validateiban.md) ### Normalize an IBAN. Works for QR-IBAN too. - [POST /v2/iban/normalize](https://apis.codeblock.ch/qr-invoice/api-docs/20-iban/normalize_1.md) ### Format an IBAN. Works for QR-IBAN too. - [POST /v2/iban/format](https://apis.codeblock.ch/qr-invoice/api-docs/20-iban/format_1.md) ## 21 QR Reference (QRR) ### Validate a QR reference - [POST /v2/qr-reference/validate](https://apis.codeblock.ch/qr-invoice/api-docs/21-qr-reference-(qrr)/validate_2.md) ### Normalize a QR reference - [POST /v2/qr-reference/normalize](https://apis.codeblock.ch/qr-invoice/api-docs/21-qr-reference-(qrr)/normalize.md) ### Calculate Check Digit by Modulo 10 recursive - [POST /v2/qr-reference/modulo10recursive](https://apis.codeblock.ch/qr-invoice/api-docs/21-qr-reference-(qrr)/modulo10recursive.md) ### Format a QR reference - [POST /v2/qr-reference/format](https://apis.codeblock.ch/qr-invoice/api-docs/21-qr-reference-(qrr)/format.md) ### Extract the actual reference number from a QR Reference - [POST /v2/qr-reference/extract](https://apis.codeblock.ch/qr-invoice/api-docs/21-qr-reference-(qrr)/extract.md) ### Create a QR reference with an optional customer ID. If the passed QR reference is missing checksum, it is calculated and appended. - [POST /v2/qr-reference/create](https://apis.codeblock.ch/qr-invoice/api-docs/21-qr-reference-(qrr)/create_2.md) ## 22 Creditor Reference (SCOR) ### Validate a creditor reference number - [POST /v2/creditor-reference/validate](https://apis.codeblock.ch/qr-invoice/api-docs/22-creditor-reference-(scor)/validate_3.md) ### Normalize a Creditor Reference - [POST /v2/creditor-reference/normalize](https://apis.codeblock.ch/qr-invoice/api-docs/22-creditor-reference-(scor)/normalize_2.md) ### Calculate Check Digits using Modulo 97 if the given input would be added to creditor reference RF[checkdigits][input] - [POST /v2/creditor-reference/modulo97](https://apis.codeblock.ch/qr-invoice/api-docs/22-creditor-reference-(scor)/modulo97.md) ### Format a Creditor Reference - [POST /v2/creditor-reference/format](https://apis.codeblock.ch/qr-invoice/api-docs/22-creditor-reference-(scor)/format_2.md) ### Extract the actual reference number from a Creditor Reference - [POST /v2/creditor-reference/extract](https://apis.codeblock.ch/qr-invoice/api-docs/22-creditor-reference-(scor)/extract_1.md) ### Create a creditor reference. If the passed creditor reference is missing prefix and checksum, it is calculated and appended. - [POST /v2/creditor-reference/create](https://apis.codeblock.ch/qr-invoice/api-docs/22-creditor-reference-(scor)/create_3.md) ## 23 Country Codes According to ISO 3166-1 alpha-2 ### Validate a Country Code against list of ISO 3166-1 alpha-2 - [POST /v2/country/validate](https://apis.codeblock.ch/qr-invoice/api-docs/23-country-codes/validate_4.md) ### List Countries - [GET /v2/country](https://apis.codeblock.ch/qr-invoice/api-docs/23-country-codes/list_1.md) ### List Country Codes - [GET /v2/country/codes](https://apis.codeblock.ch/qr-invoice/api-docs/23-country-codes/listcodes.md) ## 30 Bill Information ### Validate a SwicoS1v12 object - [POST /v2/bill-information/swicos1v12/validate](https://apis.codeblock.ch/qr-invoice/api-docs/30-bill-information/validate_5.md) ### Parse Bill Information as SwicoS1v12 - [POST /v2/bill-information/swicos1v12/parse](https://apis.codeblock.ch/qr-invoice/api-docs/30-bill-information/parseswicos1v12.md) ### Serialize a SwicoS1v12 into Bill Information string - [POST /v2/bill-information/swicos1v12/create](https://apis.codeblock.ch/qr-invoice/api-docs/30-bill-information/createbillinformation.md) ### Parse Bill Information including optional Swico information - [POST /v2/bill-information/parse](https://apis.codeblock.ch/qr-invoice/api-docs/30-bill-information/parsebillinformation.md) ### Parse Raw Bill Information - [POST /v2/bill-information/parse/raw](https://apis.codeblock.ch/qr-invoice/api-docs/30-bill-information/parserawbillinformation.md) ## 31 Alternative Schemes ### Parse Alternative Schema including - [POST /v2/alternative-schemas/parse](https://apis.codeblock.ch/qr-invoice/api-docs/31-alternative-schemes/parsealternativescheme.md) ### Parse Raw Alternative Schema - [POST /v2/alternative-schemas/parse/raw](https://apis.codeblock.ch/qr-invoice/api-docs/31-alternative-schemes/parserawaltpmt.md) ### Validate a EBill object - [POST /v2/alternative-schemas/ebill/validate](https://apis.codeblock.ch/qr-invoice/api-docs/31-alternative-schemes/validate_6.md) ### Parse Alternative Scheme as EBill - [POST /v2/alternative-schemas/ebill/parse](https://apis.codeblock.ch/qr-invoice/api-docs/31-alternative-schemes/parseebill.md) ### Serialize a EBill into Alternative Scheme string - [POST /v2/alternative-schemas/ebill/create](https://apis.codeblock.ch/qr-invoice/api-docs/31-alternative-schemes/createalternativeschemeparameter.md) ## 90 PDF ### Merge - [POST /v2/pdf/merge](https://apis.codeblock.ch/qr-invoice/api-docs/90-pdf/merge.md) ### Append - [POST /v2/pdf/append](https://apis.codeblock.ch/qr-invoice/api-docs/90-pdf/append.md) ## 99 Authentication ### Check if API key is valid - [HEAD /apikey](https://apis.codeblock.ch/qr-invoice/api-docs/99-authentication/checkapikey.md) ## XX Deprecated QR Invoice Operations v1 Version 1 of QR Invoice REST API ### Create the Swiss QR Code from the given parameters (deprecated) - [POST /qr-invoice/swiss-qr-code](https://apis.codeblock.ch/qr-invoice/api-docs/xx-deprecated-qr-invoice-operations-v1/swissqrcode.md) ### Create the Swiss Payments Code from the given parameters (deprecated) - [POST /qr-invoice/swiss-payments-code](https://apis.codeblock.ch/qr-invoice/api-docs/xx-deprecated-qr-invoice-operations-v1/swisspaymentscode.md) ### Create the Payment Part & Receipt from the given parameters (deprecated) - [POST /qr-invoice/payment-part](https://apis.codeblock.ch/qr-invoice/api-docs/xx-deprecated-qr-invoice-operations-v1/paymentpartreceipt.md)