Rejected invoices
When a BusinessRegistryConfiguration entity is configured on the A-Cube platform but the supplier_invoice_enabled
flag is disabled, the supplier invoices received from SDI are rejected, so that the SDI will notify the supplier about the failed delivery.
It can happen that the supplier_invoice_enabled
has not been properly configured, or it has been changed by mistake. That is why the A-Cube platform can be instructed to keep a copy of such invoices in a temporary storage for 60 days, allowing to easily correct the mistake and recover the missing supplier invoices.
Activation
Write to business@a-cube.io to activate the "rejected invoices" functionality.
Rejected invoices count
Once the supplier_invoice_enabled
has been (re-)enabled for a BusinessRegistryConfiguration entity, it is possible to check how many invoices have been rejected and temporarily stored during a specific period. The API call is GET /rejected-invoices/{fiscalId}/count?from_date=YYYY-MM-DD&to_date=YYYY-MM-DD
.
You must provide the fiscal ID in the URL path and the date interval (inclusive) in the query string. The response will contain the number of rejected invoices that can be recovered and the number that are currently being processed for recovery.
An expample resonse:
{
"count": <recoverable invoices>,
"pending": <invoices being processed for recovery>
}
Recover rejected invoices
If any recoverable invoice is found, the recovery process can be started with POST /rejected-invoices/{fiscalId}/recover
.
You must provide the fiscal ID in the URL path and the date interval (inclusive) in the request body:
{
"from_date": "YYYY-MM-DD",
"to_date": "YYYY-MM-DD"
}
The response will contain a job UUID, which can be ignored, and the number of rejected invoices queued for recovery:
{
"uuid": "job-uuid",
"count": <invoices being queued for recovery>
}
If there are no invoices available for recovery in the specified time period a 404 response will be returned instead.
Note: the recovery process is asynchronous and it could take some time to process all the invoices.