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
Operations

Parse Alternative Schema including

Request

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

Alternative Scheme

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

Responses

The parsed Alternative Scheme

Bodyapplication/json
object(AlternativeSchemeParameter)

Interface type, see EBill

Response
application/json
{}

Request

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

Alternative Schema

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

Responses

The parsed Alternative Schema

Bodyapplication/json
object(AlternativeSchemeParameter)

Interface type, see EBill

Response
application/json
{}

Request

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

The identifier of the business case type

Enum"BILL""REMINDER"
Example: "BILL"
recipientEmailAddressstring

E-mail address of the invoice recipient

Example: "john.doe@example.com"
recipientIdstring

Unique identification of the invoice recipient (e.g. PID)

Example: "41010560425610173"
recipientEnterpriseIdentificationNumberstring

Enterprise identification number (UID) for companies as invoice recipients (in the eBill for Business context).

Example: "CHE123456789"
referencedBillstring

invoice number of the referenced business case: This sub-element is optional. It only has to be filled for reminders and rolled over invoices in order to identify the original invoice.

Example: "2018-123456-22"
curl -i -X POST \
  https://rest.qr-invoice.cloud/v2/alternative-schemas/ebill/validate \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "type": "BILL",
    "recipientEmailAddress": "john.doe@example.com",
    "recipientId": "41010560425610173",
    "recipientEnterpriseIdentificationNumber": "CHE123456789",
    "referencedBill": "2018-123456-22"
  }'

Responses

Valid EBill data

Request

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

Alternative Scheme

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

Responses

The parsed Alternative Scheme

Bodyapplication/json
typestring

The identifier of the business case type

Enum"BILL""REMINDER"
Example: "BILL"
recipientEmailAddressstring

E-mail address of the invoice recipient

Example: "john.doe@example.com"
recipientIdstring

Unique identification of the invoice recipient (e.g. PID)

Example: "41010560425610173"
recipientEnterpriseIdentificationNumberstring

Enterprise identification number (UID) for companies as invoice recipients (in the eBill for Business context).

Example: "CHE123456789"
referencedBillstring

invoice number of the referenced business case: This sub-element is optional. It only has to be filled for reminders and rolled over invoices in order to identify the original invoice.

Example: "2018-123456-22"
Response
application/json
{ "type": "BILL", "recipientEmailAddress": "john.doe@example.com", "recipientId": "41010560425610173", "recipientEnterpriseIdentificationNumber": "CHE123456789", "referencedBill": "2018-123456-22" }

Serialize a EBill into Alternative Scheme string

Request

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

The identifier of the business case type

Enum"BILL""REMINDER"
Example: "BILL"
recipientEmailAddressstring

E-mail address of the invoice recipient

Example: "john.doe@example.com"
recipientIdstring

Unique identification of the invoice recipient (e.g. PID)

Example: "41010560425610173"
recipientEnterpriseIdentificationNumberstring

Enterprise identification number (UID) for companies as invoice recipients (in the eBill for Business context).

Example: "CHE123456789"
referencedBillstring

invoice number of the referenced business case: This sub-element is optional. It only has to be filled for reminders and rolled over invoices in order to identify the original invoice.

Example: "2018-123456-22"
curl -i -X POST \
  https://rest.qr-invoice.cloud/v2/alternative-schemas/ebill/create \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "type": "BILL",
    "recipientEmailAddress": "john.doe@example.com",
    "recipientId": "41010560425610173",
    "recipientEnterpriseIdentificationNumber": "CHE123456789",
    "referencedBill": "2018-123456-22"
  }'

Responses

The Alternative Scheme string

Bodytext/plain
string
Operations
Operations

XX Deprecated QR Invoice Operations v1

Version 1 of QR Invoice REST API

Operations