Skip to content

QR Invoice REST API (2.0)

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

  • Please note, that you can retrieve JSON example documents in the «00 Example Data» section using the respective Endpoints. E.g.: https://rest.qr-invoice.cloud/v2/examples/qr-invoice/with-qr-reference
  • Handle error responses correctly by checking HTTP status and read detailed error/validation message from response body
  • Check all parameters
  • Check out length limitation
  • Consult official standards / specification if you need more detailed information regarding QR-Bill specification

Standards / Specifications

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

QR Invoice Layers


QR Invoice Model



Product Version: 1.21-SNAPSHOT

Download OpenAPI description
Languages
Servers
Generated server url

https://rest.qr-invoice.cloud/

00 Example Data

Various example data that can be used as example input to other services

Operations

10 QR Invoice Documents including Payment Part & Receipt (QR Bill)

Operations

11 Payment Part & Receipt (QR Bill)

Operations
Operations
Operations
Operations
Operations
Operations

23 Country Codes

According to ISO 3166-1 alpha-2

Operations
Operations

Request

Security
X-API-Key or api_key
Bodyapplication/jsonrequired
billInformationTypestring

A unique identifier of the current BillInformation Subtype

Example: "SwicoS1v12"
invoiceReferencestring

See Tag 10 of Swico Syntax Definition S1 v1.2 - http://swiss-qr-invoice.org/

Example: "10201409"
invoiceDatestring(date)

See Tag 11 of Swico Syntax Definition S1 v1.2 - http://swiss-qr-invoice.org/

Example: "2019-05-12"
customerReferencestring

See Tag 20 of Swico Syntax Definition S1 v1.2 - http://swiss-qr-invoice.org/

Example: "1400.000-53"
uidNumberstring

See Tag 30 of Swico Syntax Definition S1 v1.2 - http://swiss-qr-invoice.org/

Example: "106017086"
vatDateStartstring(date)

See Tag 31 of Swico Syntax Definition S1 v1.2 - http://swiss-qr-invoice.org/

Example: "2018-05-08"
vatDateEndstring(date)

See Tag 31 of Swico Syntax Definition S1 v1.2 - http://swiss-qr-invoice.org/

Example: "2018-05-10"
vatDetailsArray of objects(SwicoS1v12VatDetails)
importTaxesArray of objects(SwicoS1v12ImportTaxPosition)
paymentConditionsArray of objects(SwicoS1v12PaymentCondition)
curl -i -X POST \
  https://rest.qr-invoice.cloud/v2/bill-information/swicos1v12/validate \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "billInformationType": "SwicoS1v12",
    "invoiceReference": "10201409",
    "invoiceDate": "2019-05-12",
    "customerReference": "1400.000-53",
    "uidNumber": "106017086",
    "vatDateStart": "2018-05-08",
    "vatDateEnd": "2018-05-10",
    "vatDetails": [
      {
        "taxPercentage": 7.7,
        "taxedNetAmount": 185.65
      }
    ],
    "importTaxes": [
      {
        "taxPercentage": 7.7,
        "taxAmount": 1000
      }
    ],
    "paymentConditions": [
      {
        "eligiblePaymentPeriodDays": 10,
        "cashDiscountPercentage": 2
      }
    ]
  }'

Responses

Valid Swico S1 v1.2 data

Parse Bill Information as SwicoS1v12

Request

Security
X-API-Key or api_key
Bodytext/plainrequired
string

Bill Information

curl -i -X POST \
  https://rest.qr-invoice.cloud/v2/bill-information/swicos1v12/parse \
  -H 'Content-Type: text/plain' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d string

Responses

The parsed Bill Information

Bodyapplication/json
billInformationTypestring

A unique identifier of the current BillInformation Subtype

Example: "SwicoS1v12"
invoiceReferencestring

See Tag 10 of Swico Syntax Definition S1 v1.2 - http://swiss-qr-invoice.org/

Example: "10201409"
invoiceDatestring(date)

See Tag 11 of Swico Syntax Definition S1 v1.2 - http://swiss-qr-invoice.org/

Example: "2019-05-12"
customerReferencestring

See Tag 20 of Swico Syntax Definition S1 v1.2 - http://swiss-qr-invoice.org/

Example: "1400.000-53"
uidNumberstring

See Tag 30 of Swico Syntax Definition S1 v1.2 - http://swiss-qr-invoice.org/

Example: "106017086"
vatDateStartstring(date)

See Tag 31 of Swico Syntax Definition S1 v1.2 - http://swiss-qr-invoice.org/

Example: "2018-05-08"
vatDateEndstring(date)

See Tag 31 of Swico Syntax Definition S1 v1.2 - http://swiss-qr-invoice.org/

Example: "2018-05-10"
vatDetailsArray of objects(SwicoS1v12VatDetails)
importTaxesArray of objects(SwicoS1v12ImportTaxPosition)
paymentConditionsArray of objects(SwicoS1v12PaymentCondition)
Response
application/json
{ "billInformationType": "SwicoS1v12", "invoiceReference": "10201409", "invoiceDate": "2019-05-12", "customerReference": "1400.000-53", "uidNumber": "106017086", "vatDateStart": "2018-05-08", "vatDateEnd": "2018-05-10", "vatDetails": [ {} ], "importTaxes": [ {} ], "paymentConditions": [ {} ] }

Serialize a SwicoS1v12 into Bill Information string

Request

Security
X-API-Key or api_key
Bodyapplication/jsonrequired
billInformationTypestring

A unique identifier of the current BillInformation Subtype

Example: "SwicoS1v12"
invoiceReferencestring

See Tag 10 of Swico Syntax Definition S1 v1.2 - http://swiss-qr-invoice.org/

Example: "10201409"
invoiceDatestring(date)

See Tag 11 of Swico Syntax Definition S1 v1.2 - http://swiss-qr-invoice.org/

Example: "2019-05-12"
customerReferencestring

See Tag 20 of Swico Syntax Definition S1 v1.2 - http://swiss-qr-invoice.org/

Example: "1400.000-53"
uidNumberstring

See Tag 30 of Swico Syntax Definition S1 v1.2 - http://swiss-qr-invoice.org/

Example: "106017086"
vatDateStartstring(date)

See Tag 31 of Swico Syntax Definition S1 v1.2 - http://swiss-qr-invoice.org/

Example: "2018-05-08"
vatDateEndstring(date)

See Tag 31 of Swico Syntax Definition S1 v1.2 - http://swiss-qr-invoice.org/

Example: "2018-05-10"
vatDetailsArray of objects(SwicoS1v12VatDetails)
importTaxesArray of objects(SwicoS1v12ImportTaxPosition)
paymentConditionsArray of objects(SwicoS1v12PaymentCondition)
curl -i -X POST \
  https://rest.qr-invoice.cloud/v2/bill-information/swicos1v12/create \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "billInformationType": "SwicoS1v12",
    "invoiceReference": "10201409",
    "invoiceDate": "2019-05-12",
    "customerReference": "1400.000-53",
    "uidNumber": "106017086",
    "vatDateStart": "2018-05-08",
    "vatDateEnd": "2018-05-10",
    "vatDetails": [
      {
        "taxPercentage": 7.7,
        "taxedNetAmount": 185.65
      }
    ],
    "importTaxes": [
      {
        "taxPercentage": 7.7,
        "taxAmount": 1000
      }
    ],
    "paymentConditions": [
      {
        "eligiblePaymentPeriodDays": 10,
        "cashDiscountPercentage": 2
      }
    ]
  }'

Responses

The Bill Information string

Bodytext/plain
string

Parse Bill Information including optional Swico information

Request

Security
X-API-Key or api_key
Bodytext/plainrequired
string

Bill Information

curl -i -X POST \
  https://rest.qr-invoice.cloud/v2/bill-information/parse \
  -H 'Content-Type: text/plain' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d string

Responses

The parsed Bill Information

Bodyapplication/json
object(BillInformation)

Interface type, see SwicoS1v12 or RawBillInformation

Response
application/json
{}

Request

Security
X-API-Key or api_key
Bodytext/plainrequired
string

Bill Information

curl -i -X POST \
  https://rest.qr-invoice.cloud/v2/bill-information/parse/raw \
  -H 'Content-Type: text/plain' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d string

Responses

The parsed Bill Information

Bodyapplication/json
object(BillInformation)

Interface type, see SwicoS1v12 or RawBillInformation

Response
application/json
{}
Operations
Operations
Operations

XX Deprecated QR Invoice Operations v1

Version 1 of QR Invoice REST API

Operations