Hello every one
if report Standard Invoice (BTB) because clearance-status disabled,
Can I cleared invoice after reporting it ?
Hello every one
if report Standard Invoice (BTB) because clearance-status disabled,
Can I cleared invoice after reporting it ?
Dear @moalnatour ,
Please note that you can not Report a standard invoice as you will get “400 bad request error” with error message “XML Submitted using reporting API is not a simplified document” and the invoice will not get reported.
You should always use the Reporting API for simplified (B2C) invoices and Clearance API for standard (B2B) invoices
Hello @lalomar ,
if i use clearance API with standard invoice (B2B) and get response code 303 with message : "
“message”: “Clearance is deactiviated. Please use the /invoices/reporting/single endpoint instead.”
shall i use reporting API or use clearance API again ??
In case you receive 303 error you can use reporting API for standard invoices. But may I know when you received this error?
I suspect it’s a problem with the http header when send the invoice, maybe need to check this part
_httpClient.DefaultRequestHeaders.Add(“Clearance-Status”, “0”);
{
"RequestType": "Invoice Clearance",
"RequestUri": "https://gw-fatoora.zatca.gov.sa/e-invoicing/developer-portal/invoices/clearance/single"
"HttpCode": "303 -SeeOther",
"message": "Clearance is deactivated. Please use the /invoices/reporting/single endpoint instead.",
}
_httpClient.DefaultRequestHeaders.Add(“Clearance-Status”, “1”);
{
"requestType": "Invoice Clearance",
"requestUri": "https://gw-fatoora.zatca.gov.sa/e-invoicing/developer-portal/invoices/clearance/single",
"statusCode": "200 -OK",
"clearanceStatus": "CLEARED",
"validationResults": {
"errorMessages": [
],
"infoMessages": [
{
"category": "XSD validation",
"code": "XSD_ZATCA_VALID",
"message": "Complied with UBL 2.1 standards in line with ZATCA specifications",
"status": "PASS",
"type": "INFO"
}
],
"status": "PASS",
"warningMessages": [
]
}
"clearedInvoice ": "................................................",
}