Download OpenAPI specification:Download
The application programming interface for software partners (Software Partner API) allows communication with an eBill Network Partner. The eBill service comprises of electronic bills, reminders, credit notes and advices which are summarized under the term "business case". Business cases are delivered from software partners via network partners to the SIX eBill infrastructure and can be received online by bill recipients.
Documentation and Open API licence of the Software Partner API can be found on https://ebill-swp.org
Examples and extra information - https://github.com/billte-engineering/ebill-swp-redoc.
Examples include:
These APIs are based on the work of the Working Group eBill-SWP-API. Biller is a member of the group and an active contributer.
This documentation has been compiled with the greatest care, but may nevertheless contain errors or inaccuracies. Working Group eBill-SWP-API cannot assume any legal responsibility or any liability for erroneous information or its consequences.
If you notice any errors in this documentation or have any suggestions for improvements, we would be grateful to receive your feedback; please open an issue on our website : https://github.com/billte-engineering/ebill-swp-redoc.
baseUrl
: https://guard-api.ebill.billte.chbaseUrl
: https://guard-api-xp.ebill.billte.chbaseUrl
: https://guard-api-xe.ebill.billte.chAll operations that are associated with a biller are located within the biller resource, including the creation of business cases.
Returns an authentication token for the biller to be used in other APIs.
billerPid required | string = 17 characters ([0=9])* Biller PiD provided by the system |
billerSecret required | string = 36 characters Biller secret key provided by the system |
{- "billerPid": "41NN00BBBBBBBBBPP",
- "billerSecret": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
{- "billerPid": "41NN00BBBBBBBBBPP",
- "expiresIn": "3600",
- "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...",
- "type": "BILLER"
}
Returns a list of one or more bill recipients.
The response will only list a bill recipient if he allows bills in his online banking to be posted by the biller or allows bills to be posted in general. It will always return the billRecipientId and optionally any other provided parameter.
The call will return an empty list if no matching bill recipient is found or the biller is not allowed to send bills to the bill recipient.
Authorization required | string Access-Token with the prefix "Bearer". |
Parameters for the search, at least one of the parameters is required in addition to the mandatory "billerPid". It is recommended to use "billRecipientId" since it is a permenant id of each recipient in the SIX infrastructure.
billRecipientId | string [ 1 .. 17 ] characters ([0-9])* id of the bill recipient |
billerPid required | string = 17 characters ([0=9])* Biller PiD provided by the system |
emailAddress | string <email> [ 1 .. 256 ] characters email address of the bill recipient |
enterpriseIdentificationNumber | string <= 12 characters CHE[0-9]{9} Swiss enterprise identification number (UID) without dashes, dots or extension. Note that this has to contain the swiss enterprise identification number (UID) from the commercial register (Handelsregister) which may be different from the VAT UID (Mehrwertsteuer UID). |
{- "billRecipientId": "41010560425610173",
- "billerPid": "41NN00BBBBBBBBBPP",
- "emailAddress": "peter@muster.ch",
- "enterpriseIdentificationNumber": "CHE123456789"
}
{- "billRecipientId": "41010560425610173",
- "emailAddress": "peter@muster.ch",
- "enterpriseIdentificationNumber": "CHE123456789",
- "submissionStatus": "ALLOWED"
}
Depending on the accept header, this operation either returns a JSON business case object or the original PDF. The returned JSON object contains one of the business case subtypes - Bill, InstalmentBill, Reminder, CreditNote or Advice.
billerPid required | string <= 17 characters 41[0-9]{15} biller PID Maximal length: '17' Example: '"41NN00BBBBBBBBBPP"' Pattern: '41[0-9]{15}' |
businessCaseId required | string <= 39 characters NWPBCID[0-9A-Z]{32} business case id Maximal length: '39' Example: '"NWPBCID0FB909852BBC4D06AD8336AAE87D7FC9"' Pattern: 'NWPBCID[0-9A-Z]{32}' |
Authorization required | string Access-Token with the prefix "Bearer". |
{- "id": "NWPBCID0FB909852BBC4D06AD8336AAE87D7FC9",
- "status": "NWP_PENDING"
}
The creation of a business case in PDF/A-3b format works with a simple POST request where the PDF is the binary payload of the request. Note that only one PDF can be submitted at a time.
Validation of the submitted data will take place immediately and the response either confirms the successful creation of the business case on the NWP or contains the error details of the validation.
Authorization required | string Access-Token with the prefix "Bearer". |
Request body for the creation of business case. Required objects depend on type of business case.
required | object (BillRecipient) |
required | object (Biller) |
businessCaseDate required | string Date of the business case in TZ format. At time of submission, cannot be older than |
businessCaseType required | string (BusinessCaseType) Enum: "Bill" "Reminder" "CreditNote" "Advice" "InstalmentBill" |
content required | string Business Case PDF file encoded in base64 String |
fileIdentifier required | string Name for the Business Case PDF file. |
Array of objects (PaymentByInstalments) Possibility to offer payment of the invoice in instalments. Instalment invoices can be submitted as multi-group-invoices or single-group-invoices. Multi-Groups - Invoices with several instalment groups to choose from. The invoice recipient can decide with which instalment option the invoice will be paid. One of the instalments groups can contain a total instalment to be used for the payment of the entire invoice (isTotalPaymentOption, can only be set to | |
referenceNumber | string Reference number of the referenced business case. If the referenced invoice is found, it will be substituted with the new credit note, notification, or invoice. In case of a reminder, the referenced invoice will not be substituted; at time of approval, the invoice recipient decides whether to pay the original invoice or the reminder. If the referenced invoice is not found, a new business case is created. |
object (ReferenceBill) | |
object (SinglePayment) | |
required | object (TotalAmount) |
object (WorkFlow) |
{- "id": "NWPBCID0FB909852BBC4D06AD8336AAE87D7FC9"
}
Notification Events The event resource allows the software partner to retrieve changes for the event type 'Subscription status changes'.
This event is triggered after any billerPid registered with the requesting SWP has submitted a business case with an outdated, so called historically available email address. It notifies about the changed email address of a bill recipient, which has been adjusted in eBill. An email address is considered to be historically available if it was present up to 15 months prior to the submission time. The billers are able to submit business cases with historically available email addresses of a bill recipient. However, latest 15 months after the email address changed, the billers are required to submit the business cases with the currently valid email address of the bill recipient.
lastEventId | string <= 39 characters NWPEVID[0-9A-Z]{32} Id of the last received event. If omitted, the result starts with the oldest available event. Example: '"NWPEVID82A65938766547EBBBA39BA6F7B07F24"' Maximal length: '39' Pattern: '"NWPEVID[0-9A-Z]{32}"' |
limit | integer <= 10000 Default: 1000 Maximum number of events one wants to receive (technical maximum is 10000, no more will be returned at once and you have to fetch again to check if there are more) |
Authorization required | string Access-Token with the prefix "Bearer". |
[- {
- "eventId": "NWPEVID82A65938766547EBBBA39BA6F7B07F24",
- "timestamp": "2019-01-01T10:00:00.000Z",
- "newEmailAddress": "peter_new@muster.ch",
- "oldEmailAddress": "peter@muster.ch",
- "triggeredBy": {
- "billerPid": "41100012345678901",
- "businessCaseId": "NWPBCID0FB909852BBC4D06AD8336AAE87D7FC9"
}
}
]
Events for status changes on bill recipient subscriptions to any billerPid registered with the requesting SWP, regardless if subscriptions have been done without registration form (event from infrastructure) or with registration form (no event from infrastructure).
lastEventId | string <= 39 characters NWPEVID[0-9A-Z]{32} Id of the last received event. If omitted, the result starts with the oldest available event. Example: '"NWPEVID82A65938766547EBBBA39BA6F7B07F24"' Maximal length: '39' Pattern: '"NWPEVID[0-9A-Z]{32}"' |
limit | integer <= 10000 Default: 1000 Maximum number of events one wants to receive (technical maximum is 10000, no more will be returned at once and you have to fetch again to check if there are more) |
Authorization required | string Access-Token with the prefix "Bearer". |
[- {
- "eventId": "NWPEVID82A65938766547EBBBA39BA6F7B07F24",
- "timestamp": "2019-01-01T10:00:00.000Z",
- "accountNumber": "string",
- "billRecipient": {
- "address": {
- "structuredAddress": {
- "buildingNumber": "20a",
- "city": "Neudorf",
- "countryCode": "CH",
- "postalCode": "6025",
- "street": "Neustadtstrasse"
}, - "unstructuredAddress": {
- "addressLine1": "string",
- "addressLine2": "string",
- "countryCode": "string"
}
}, - "billRecipientId": "string",
- "emailAddress": "user@example.com",
- "enterpriseIdentificationNumber": "CHE123456789",
- "name": "for private bill recipient: Muster, for company name: Muster AG",
- "type": "PRIVATE"
}, - "billerPid": "41100012345678901",
- "referenceStructured": "123456123456789012345678901",
- "newStatus": "INACTIVE"
}
]
Events for status changes of bills, advices, credit notes and reminders which belong to any billerPid registered with the requesting SWP.
lastEventId | string <= 39 characters NWPEVID[0-9A-Z]{32} Id of the last received event. If omitted, the result starts with the oldest available event. Example: '"NWPEVID82A65938766547EBBBA39BA6F7B07F24"' Maximal length: '39' Pattern: '"NWPEVID[0-9A-Z]{32}"' |
limit | integer <= 10000 Default: 1000 Maximum number of events one wants to receive (technical maximum is 10000, no more will be returned at once and you have to fetch again to check if there are more) |
Authorization required | string Access-Token with the prefix "Bearer". |
[- {
- "eventId": "NWPEVID82A65938766547EBBBA39BA6F7B07F24",
- "timestamp": "2019-01-01T10:00:00.000Z",
- "approvedAmount": {
- "currencyCode": "CHF",
- "value": 99.99
}, - "billerPid": "41100012345678901",
- "businessCaseId": "NWPBCID0FB909852BBC4D06AD8336AAE87D7FC9",
- "newStatus": "NWP_PENDING"
}
]
Events for status changes of instalment bills only which belong to any billerPid registered with the requesting SWP.
lastEventId | string <= 39 characters NWPEVID[0-9A-Z]{32} Id of the last received event. If omitted, the result starts with the oldest available event. Example: '"NWPEVID82A65938766547EBBBA39BA6F7B07F24"' Maximal length: '39' Pattern: '"NWPEVID[0-9A-Z]{32}"' |
limit | integer <= 10000 Default: 1000 Maximum number of events one wants to receive (technical maximum is 10000, no more will be returned at once and you have to fetch again to check if there are more) |
Authorization required | string Access-Token with the prefix "Bearer". |
[- {
- "eventId": "NWPEVID82A65938766547EBBBA39BA6F7B07F24",
- "timestamp": "2019-01-01T10:00:00.000Z",
- "approvedAmount": {
- "currencyCode": "CHF",
- "value": 99.99
}, - "billerPid": "41100012345678901",
- "businessCaseId": "NWPBCID0FB909852BBC4D06AD8336AAE87D7FC9",
- "externalInstalmentId": "298031-2999-ACX01",
- "externalPaymentByInstalmentsId": "298031-2999",
- "newStatus": "NWP_PENDING"
}
]
Industry Sector Industry sectors are valid system wide. Each biller will reference one or several industry sectors.
Get the industry sector list of the eBill infrastructure. The sectors are more or less static and can therefore be cached.
Authorization required | string Access-Token with the prefix "Bearer". |
[- {
- "id": "SCID0000000000",
- "localizedData": {
- "eng": {
- "name": "Transport"
}, - "fre": {
- "name": "Transport"
}, - "ger": {
- "name": "Transport"
}, - "ita": {
- "name": "Transport"
}
}
}
]
System Healthcheck This allows to check the basic state of the system (can it be reached, does authentication and auhorization work, does it respond). As some infrastructures block certain HTTP methods by default, the healthcheck allows to test if all required methods (GET, POST) work across all layers.
Returns a status message of the system.
Authorization required | string Access-Token with the prefix "Bearer". |
{- "apiVersion": "1.0.23",
- "applicationVersion": "1.4.3.0-desire-20180927091004161-71-5e3ca91",
- "environmentStage": "XE",
- "message": "The healthcheck GET resp. POST request was successfully received and processed",
- "receivedHeaders": [
- {
- "headerName": "X-CORRELATION-ID",
- "headerValue": "9bcd4351-4b7b-4017-9b63-9613414c6ff1"
}
], - "requestDateTime": "2018-10-03T16:03:09.101+02:00"
}
Returns the request body. This operation will not modify the system.
Authorization required | string Access-Token with the prefix "Bearer". |
Any message which is expected in the response
message required | string [ 1 .. 100 ] characters expected response message from health check |
{- "message": "any String"
}
{- "apiVersion": "1.0.23",
- "applicationVersion": "1.4.3.0-desire-20180927091004161-71-5e3ca91",
- "environmentStage": "XE",
- "message": "The healthcheck GET resp. POST request was successfully received and processed",
- "receivedHeaders": [
- {
- "headerName": "X-CORRELATION-ID",
- "headerValue": "9bcd4351-4b7b-4017-9b63-9613414c6ff1"
}
], - "requestDateTime": "2018-10-03T16:03:09.101+02:00"
}