Overview
As additional convenience to enable more event driven integration architectures for information exchange related to receipts registered in tax authority eInvoicing supports delivery of events to systems. This API describes delivery of receipt event notifications to taxpayer system that has been configured to receive them.
Types of notifications delivered are:
- receipt validated (validation complete and receipt is marked valid or invalid)
- receipt received
- receipt cancelled
Note that to receive notifications, ERP system needs to expose an API defined in this page that is “visible” to ETA system over the Internet and can be called over HTTPS that is protected using one of the globally valid Root CA issued certificates. “Visibility” is checked during registration by calling Ping API exposed by ERP system.
Signature
The signature to be supported by the ERP system to be able to receive notification is:
PUT /notifications/receipts
(this relative path is attached to base URL shared by customer when registering system to receive notifications)
Note that the API should be idempotent - it is possible that due to network issues the same method with the same parameters get called more than once to deliver notifications.
Inputs
This API should accept these headers supplied by eInvoicing:
Header parameter | Type | Description | Value example |
---|---|---|---|
Accept-Language | String | Will contain ar or en based on the notification preferences of the taxpayer |
ar |
Content type | String (70) | Defines the type of the message. JSON based content. | application/json |
Authorization | String (100) | Pre-shared key registered by taxpayer when registering system callback is used so that ERP can authenticate eInvoicing | ApiKey <Key value> |
Body of the request contains a single object that contains these fields:
Input parameter | Type | Description | Value example |
---|---|---|---|
deliveryId | String | Unique identifier of the notification delivery, can be used to deduplicate if called multiple times. | 838847HS2 |
type | String | Notification type or type of batched notification being delivered. For this notification type is Receipt representing batched notification that contains only receipts |
Receipt |
count | Number | Count of notifications in the batch if multiple ones are delivered in a single call to API | 39 |
message | Receipt Notification Message[] | In case of receipt notification message the message element contains list of notifications batched together | See structure. |
Receipt Notification Message
Input parameter | Type | Description | Value example |
---|---|---|---|
type | String | Notification type being delivered. For this notification batch can be Validated , Received , Cancelled |
Validated |
uuid | UUID | Unique receipt UUID that was created and submitted by the issuer | 9d74ecc5a844354864c762c0d413ee42336561f555862bd6083c6acabf8bc3dc |
submissionUUID | String (30) | Unique ID of the submission tht receipt was part of | BC6J9M86WWVP567DEYGFTD8G10 |
longId | String (200) | Unique long Id that was created by the system | LIJAF97HJJKH 8298KHADH0990 8570FDKK9S2LSIU HB377373 |
internalId | String (50) | Internal ID used in submission for the receipt | PZ-234-A |
status | String (250) | Current status of the receipt at the moment of sending out notification. For messages of type Validated will be Invalid or Valid that should allow submitter to identify the receipts that didn’t pass the validations at the tax authority and that need some action. Other possible statuses: Cancelled |
Valid |
Outputs
On a successful submission ERP API must return 200
status code.
If 4xx
or 5xx
codes are returned the eInvoicing solution will retry calling the ERP pre-configured amount of retries.
Additional considerations
This API is called by eInvoicing only over protected HTTPS channel.