ERP - Receive Download Package Ready Notifications

API needs to be exposed by ERP and allows ERP system to receive notification when receipt package is ready for download.

Get Receipt Package Full eReceipt API list

Overview

As additional convenience to enable more event driven integration architectures for information exchange related to package download processing in tax authority eInvoicing supports delivery of events to systems. This API describes delivery of receipt package notification to taxpayer system that has been configured to receive them.

Type of notification delivered is ReceiptPackageDownloadReady. If it gets delivered, it contains ID of the package that is to be downloaded from the system. To download any package, ERP systems can use the received Packages Ids from this API to download the packages using download API.

Signature

The signature to be supported by the ERP system to be able to receive notification is:

PUT /notifications/receiptpackages (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. 84676
type String Notification type or type of batched notification being delivered. For this notification, the type is ReceiptPackageDownloadReady representing notification that contains only receipt package ready information. ReceiptPackageDownloadReady
count Number Count of notifications in a single call to API 1
message Receipt Package Download Notification Message[] In case of receipt package ready notification the message element contains 1 notification See structure.

Receipt Package Download Notification Message

Input parameter Type Description Value example
type String Notification type being delivered. For this notification batch can be receipt-package-ready receipt-package-ready.
PackageId String Unique package Id for the package that is ready to be downloaded using the download API. 10242

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.