# Clearance api not validating if in xml file buyer details is missing tag like postal code, building number

**URL:** <https://zatca1.discourse.group/t/clearance-api-not-validating-if-in-xml-file-buyer-details-is-missing-tag-like-postal-code-building-number/2171>\
**Category:** Clearance and Reporting\
**Created:** [July 30, 2024, 2:26pm UTC](https://zatca1.discourse.group/t/clearance-api-not-validating-if-in-xml-file-buyer-details-is-missing-tag-like-postal-code-building-number/2171 "2024-07-30T14:26:19Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anil\_K](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Anil\_K](https://zatca1.discourse.group/u/Anil_K)\
**Post date:** [July 30, 2024, 2:26pm UTC](https://zatca1.discourse.group/t/clearance-api-not-validating-if-in-xml-file-buyer-details-is-missing-tag-like-postal-code-building-number/2171/1 "2024-07-30T14:26:20Z")

</div>

all B2B invoice getting cleared without tag like postal code, building number. while this tag mentioned mandatory in einvoice data dictionary for B2B invoice

---

<div class="post-metadata">

**Author:** ![Malik](https://dub1.discourse-cdn.com/flex013/user_avatar/zatca1.discourse.group/malik/32/708_2.png) [@Malik](https://zatca1.discourse.group/u/Malik)\
**Post date:** [July 31, 2024, 3:34am UTC](https://zatca1.discourse.group/t/clearance-api-not-validating-if-in-xml-file-buyer-details-is-missing-tag-like-postal-code-building-number/2171/2 "2024-07-31T03:34:14Z")

</div>

Hi,  
Please share details where are getting cleared Sandbox, Simulation or PROD or SDK if SDK then version? Also sharing xml contents will provide more insite. You are getting any warnings or not so need more details. thanks

---

<div class="post-metadata">

**Author:** ![Anil\_K](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Anil\_K](https://zatca1.discourse.group/u/Anil_K)\
**Post date:** [July 31, 2024, 5:42am UTC](https://zatca1.discourse.group/t/clearance-api-not-validating-if-in-xml-file-buyer-details-is-missing-tag-like-postal-code-building-number/2171/3 "2024-07-31T05:42:51Z")

</div>

HI,  
getting cleared in production environment by using below api link and not getting any warnings

**[https://gw-fatoora.zatca.gov.sa/e-invoicing/core/invoices/clearance/single](https://gw-fatoora.zatca.gov.sa/e-invoicing/core/invoices/clearance/single)**

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/zatca1/original/1X/9950504875334a4c263df85027660026530c4725.png)

below is xml content.  
thanks

ext:UBLExtensions

ext:UBLExtension

ext:ExtensionURIurn:oasis:names:specification:ubl:dsig:enveloped:xades\</ext:ExtensionURI\>

ext:ExtensionContent

\<sig:UBLDocumentSignatures xmlns:sig=“urn:oasis:names:specification:ubl:schema:xsd:CommonSignatureComponents-2” xmlns:sac=“urn:oasis:names:specification:ubl:schema:xsd:SignatureAggregateComponents-2” xmlns:sbc=“urn:oasis:names:specification:ubl:schema:xsd:SignatureBasicComponents-2”\>

sac:SignatureInformation

cbc:IDurn:oasis:names:specification:ubl:signature:1\</cbc:ID\>

sbc:ReferencedSignatureIDurn:oasis:names:specification:ubl:signature:Invoice\</sbc:ReferencedSignatureID\>

\<ds:Signature xmlns:ds=“[XML-Signature Syntax and Processing](http://www.w3.org/2000/09/xmldsig#)” Id=“signature”\>

ds:SignedInfo

\<ds:CanonicalizationMethod Algorithm=“[Canonical XML 1.1](http://www.w3.org/2006/12/xml-c14n11)”/\>

\<ds:SignatureMethod Algorithm=“[xmldsig-more namespace](http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256)”/\>

\<ds:Reference Id=“invoiceSignedData” URI=“”\>

ds:Transforms

\<ds:Transform Algorithm=“[XML Path Language (XPath)](http://www.w3.org/TR/1999/REC-xpath-19991116)”\>

ds:XPathnot(//ancestor-or-self::ext:UBLExtensions)\</ds:XPath\>

\</ds:Transform\>

\<ds:Transform Algorithm=“[XML Path Language (XPath)](http://www.w3.org/TR/1999/REC-xpath-19991116)”\>

ds:XPathnot(//ancestor-or-self::cac:Signature)\</ds:XPath\>

\</ds:Transform\>

\<ds:Transform Algorithm=“[XML Path Language (XPath)](http://www.w3.org/TR/1999/REC-xpath-19991116)”\>

ds:XPathnot(//ancestor-or-self::cac:AdditionalDocumentReference[cbc:ID=‘QR’])\</ds:XPath\>

\</ds:Transform\>

\<ds:Transform Algorithm=“[Canonical XML 1.1](http://www.w3.org/2006/12/xml-c14n11)”/\>

\</ds:Transforms\>

\<ds:DigestMethod Algorithm=“[http://www.w3.org/2001/04/xmlenc#sha256](http://www.w3.org/2001/04/xmlenc#sha256)”/\>

ds:DigestValuexUyHDsg1xrwKzYE8oha1jXU6mBefsz2HPN2VItmnwjo=\</ds:DigestValue\>

\</ds:Reference\>

\<ds:Reference Type=“[http://www.w3.org/2000/09/xmldsig#SignatureProperties](http://www.w3.org/2000/09/xmldsig#SignatureProperties)” URI=“#xadesSignedProperties”\>

\<ds:DigestMethod Algorithm=“[http://www.w3.org/2001/04/xmlenc#sha256](http://www.w3.org/2001/04/xmlenc#sha256)”/\>

ds:DigestValueZGFmMzNmMDZiNjllNTcxM2I0YmEwOGMwYTNmOWVmYmVjNTU0YmFmZDE1NWUwNjg3MWMwZjFiYTViY2UzOTY4MQ==\</ds:DigestValue\>

\</ds:Reference\>

\</ds:SignedInfo\>

ds:SignatureValueMEUCIGMwy4MWMtkJKhdPLYOTIp8hhSCg8X/iopAYEPgttThtAiEAmU5wxzZrokGZZLclUgfLVwDZVNcptws/FW/THO10g3w=\</ds:SignatureValue\>

ds:KeyInfo

ds:X509Data

ds:X509CertificateMIICLzCCAdagAwIBAgIGAZC1xHjHMAoGCCqGSM49BAMCMBUxEzARBgNVBAMMCmVJbnZvaWNpbmcwHhcNMjQwNzE1MDk0MTA1WhcNMjkwNzE0MjEwMDAwWjBqMQswCQYDVQQGEwJTQTETMBEGA1UECwwKMzAxMTcxODg2MTEoMCYGA1UECgwfQUxRQVNSIEdMQVNTIElORFVTVFJJQUwgQ09NUEFOWTEcMBoGA1UEAwwTWkFUQ0EtQ29kZS1TaWduaW5nMTBWMBAGByqGSM49AgEGBSuBBAAKA0IABOQtvdmCbU0YOp5D/IwNqlsRIPu3pIjJwdopPWa54g1TjtMTYE4+/0LX1+IP4jVXWnHf0N4ZGWSgN3jVKVq3EZqjgb8wgbwwDAYDVR0TAQH/BAIwADCBqwYDVR0RBIGjMIGgpIGdMIGaMT4wPAYDVQQEDDUxLVBvc05hbWV8Mi1HNHwzLTRlYzg4MDdhLTQxZjMtNDk3MS05MWYwLTRjNmE4N2FiODJmNjEfMB0GCgmSJomT8ixkAQEMDzMwMTE3MTg4NjEwMDAwMzENMAsGA1UEDAwEMTEwMDEOMAwGA1UEGgwFUml5YWQxGDAWBgNVBA8MD0dsYXNzIEJ1c3NpbmVzczAKBggqhkjOPQQDAgNHADBEAiAKAaX2WlWf8wDed2WbxcVJl0PDjnWzEhqGW5FoMfFm9AIgXhiumgLAosIWUKU+tRH0h2X7hOQodAc5CxHTuqNTOlg=\</ds:X509Certificate\>

\</ds:X509Data\>

\</ds:KeyInfo\>

ds:Object

\<xades:QualifyingProperties xmlns:xades=“[Assigned ETSI XML URIs](http://uri.etsi.org/01903/v1.3.2#)” Target=“signature”\>

\<xades:SignedProperties Id=“xadesSignedProperties”\>

xades:SignedSignatureProperties

xades:SigningTime2024-07-30T18:10:41\</xades:SigningTime\>

xades:SigningCertificate

xades:Cert

xades:CertDigest

\<ds:DigestMethod Algorithm=“[http://www.w3.org/2001/04/xmlenc#sha256](http://www.w3.org/2001/04/xmlenc#sha256)”/\>

ds:DigestValueMDU3NDEzZWQ3N2U4N2JmNTZlZDM1ZjNlOTg5YWRlMmYxZTAxZTFkMmIzNWE1OWNjNGZiZjUyYjU3NzQ4MWM2ZQ==\</ds:DigestValue\>

\</xades:CertDigest\>

xades:IssuerSerial

ds:X509IssuerNameCN=eInvoicing\</ds:X509IssuerName\>

ds:X509SerialNumber1721036470471\</ds:X509SerialNumber\>

\</xades:IssuerSerial\>

\</xades:Cert\>

\</xades:SigningCertificate\>

\</xades:SignedSignatureProperties\>

\</xades:SignedProperties\>

\</xades:QualifyingProperties\>

\</ds:Object\>

\</ds:Signature\>

\</sac:SignatureInformation\>

\</sig:UBLDocumentSignatures\>

\</ext:ExtensionContent\>

\</ext:UBLExtension\>

\</ext:UBLExtensions\>

cbc:ProfileIDreporting:1.0\</cbc:ProfileID\>

cbc:IDINV2404605\</cbc:ID\>

cbc:UUID11bdadd6-0789-4798-8f3f-ecb327f1a54a\</cbc:UUID\>

cbc:IssueDate2024-07-30\</cbc:IssueDate\>

cbc:IssueTime08:30:00\</cbc:IssueTime\>

\<cbc:InvoiceTypeCode name=“0100000”\>388\</cbc:InvoiceTypeCode\>

cbc:DocumentCurrencyCodeSAR\</cbc:DocumentCurrencyCode\>

cbc:TaxCurrencyCodeSAR\</cbc:TaxCurrencyCode\>

cac:AdditionalDocumentReference

cbc:IDICV\</cbc:ID\>

cbc:UUID49\</cbc:UUID\>

\</cac:AdditionalDocumentReference\>

cac:AdditionalDocumentReference

cbc:IDPIH\</cbc:ID\>

cac:Attachment

\<cbc:EmbeddedDocumentBinaryObject mimeCode=“text/plain”\>bE5MRGVzSXZFZDVaRCtqKzZ5bmd3VnZQcFUrRTV6dDRXOFR6MWZvU3ZJZz0=\</cbc:EmbeddedDocumentBinaryObject\>

\</cac:Attachment\>

\</cac:AdditionalDocumentReference\>

cac:AdditionalDocumentReference

cbc:IDQR\</cbc:ID\>

cac:Attachment

\<cbc:EmbeddedDocumentBinaryObject mimeCode=“text/plain”\>AU/YtNix2YPYqSDYp9mE2YLYtdixINis2YTYp9izINin2YTYtdmG2KfYudmK2KkgfCBBTFFBU1IgR0xBU1MgSU5EVVNUUklBTCBDT01QQU5ZAg8zMDExNzE4ODYxMDAwMDMDEzIwMjQtMDctMzBUMDg6MzA6MDAEBTI5LjA0BQQzLjc5Bix4VXlIRHNnMXhyd0t6WUU4b2hhMWpYVTZtQmVmc3oySFBOMlZJdG1ud2pvPQdgTUVVQ0lHTXd5NE1XTXRrSktoZFBMWU9USXA4aGhTQ2c4WC9pb3BBWUVQZ3R0VGh0QWlFQW1VNXd4elpyb2tHWlpMY2xVZ2ZMVndEWlZOY3B0d3MvRlcvVEhPMTBnM3c9CFgwVjAQBgcqhkjOPQIBBgUrgQQACgNCAATkLb3Zgm1NGDqeQ/yMDapbESD7t6SIycHaKT1mueINU47TE2BOPv9C19fiD+I1V1px39DeGRlkoDd41SlatxGa\</cbc:EmbeddedDocumentBinaryObject\>

\</cac:Attachment\>

\</cac:AdditionalDocumentReference\>

cac:Signature

cbc:IDurn:oasis:names:specification:ubl:signature:Invoice\</cbc:ID\>

cbc:SignatureMethodurn:oasis:names:specification:ubl:dsig:enveloped:xades\</cbc:SignatureMethod\>

\</cac:Signature\>

cac:AccountingSupplierParty

cac:Party

cac:PartyIdentification

\<cbc:ID schemeID=“CRN”\>1010237709\</cbc:ID\>

\</cac:PartyIdentification\>

cac:PostalAddress

cbc:StreetNameالسمح بن مالك | As Samh Bin Malik\</cbc:StreetName\>

cbc:BuildingNumber6706\</cbc:BuildingNumber\>

cbc:CitySubdivisionNameالرياض | Riyadh\</cbc:CitySubdivisionName\>

cbc:CityNameالرياض | Riyadh\</cbc:CityName\>

cbc:PostalZone14315\</cbc:PostalZone\>

cac:Country

cbc:IdentificationCodeSA\</cbc:IdentificationCode\>

\</cac:Country\>

\</cac:PostalAddress\>

cac:PartyTaxScheme

cbc:CompanyID301171886100003\</cbc:CompanyID\>

cac:TaxScheme

cbc:IDVAT\</cbc:ID\>

\</cac:TaxScheme\>

\</cac:PartyTaxScheme\>

cac:PartyLegalEntity

cbc:RegistrationNameشركة القصر جلاس الصناعية | ALQASR GLASS INDUSTRIAL COMPANY\</cbc:RegistrationName\>

\</cac:PartyLegalEntity\>

\</cac:Party\>

\</cac:AccountingSupplierParty\>

cac:AccountingCustomerParty

cac:Party

cac:PostalAddress

cbc:StreetNameالرياض | الرياض\</cbc:StreetName\>

cbc:CitySubdivisionNameالرياض | RIYAD\</cbc:CitySubdivisionName\>

cbc:CityNameالرياض | RIYAD\</cbc:CityName\>

cac:Country

cbc:IdentificationCodeSA\</cbc:IdentificationCode\>

\</cac:Country\>

\</cac:PostalAddress\>

cac:PartyTaxScheme

cbc:CompanyID302187279300003\</cbc:CompanyID\>

cac:TaxScheme

cbc:IDVAT\</cbc:ID\>

\</cac:TaxScheme\>

\</cac:PartyTaxScheme\>

cac:PartyLegalEntity

cbc:RegistrationNameمؤسسة الإبداع الحديث للأبواب الأوتوماتيكية | MODREN CREATIVITY EST AUTOMATIC DOORS\</cbc:RegistrationName\>

\</cac:PartyLegalEntity\>

\</cac:Party\>

\</cac:AccountingCustomerParty\>

cac:Delivery

cbc:ActualDeliveryDate2024-07-30\</cbc:ActualDeliveryDate\>

\</cac:Delivery\>

cac:PaymentMeans

cbc:PaymentMeansCode10\</cbc:PaymentMeansCode\>

\</cac:PaymentMeans\>

cac:AllowanceCharge

cbc:ChargeIndicatorfalse\</cbc:ChargeIndicator\>

cbc:AllowanceChargeReasondiscount\</cbc:AllowanceChargeReason\>

\<cbc:Amount currencyID=“SAR”\>0.00\</cbc:Amount\>

cac:TaxCategory

\<cbc:ID schemeID=“UN/ECE 5305” schemeAgencyID=“6”\>S\</cbc:ID\>

cbc:Percent15\</cbc:Percent\>

cac:TaxScheme

\<cbc:ID schemeID=“UN/ECE 5153” schemeAgencyID=“6”\>VAT\</cbc:ID\>

\</cac:TaxScheme\>

\</cac:TaxCategory\>

\</cac:AllowanceCharge\>

cac:TaxTotal

\<cbc:TaxAmount currencyID=“SAR”\>3.79\</cbc:TaxAmount\>

\</cac:TaxTotal\>

cac:TaxTotal

\<cbc:TaxAmount currencyID=“SAR”\>3.79\</cbc:TaxAmount\>

cac:TaxSubtotal

\<cbc:TaxableAmount currencyID=“SAR”\>25.25\</cbc:TaxableAmount\>

\<cbc:TaxAmount currencyID=“SAR”\>3.79\</cbc:TaxAmount\>

cac:TaxCategory

\<cbc:ID schemeID=“UN/ECE 5305” schemeAgencyID=“6”\>S\</cbc:ID\>

cbc:Percent15\</cbc:Percent\>

cac:TaxScheme

\<cbc:ID schemeID=“UN/ECE 5153” schemeAgencyID=“6”\>VAT\</cbc:ID\>

\</cac:TaxScheme\>

\</cac:TaxCategory\>

\</cac:TaxSubtotal\>

\</cac:TaxTotal\>

cac:LegalMonetaryTotal

\<cbc:LineExtensionAmount currencyID=“SAR”\>25.25\</cbc:LineExtensionAmount\>

\<cbc:TaxExclusiveAmount currencyID=“SAR”\>25.25\</cbc:TaxExclusiveAmount\>

\<cbc:TaxInclusiveAmount currencyID=“SAR”\>29.04\</cbc:TaxInclusiveAmount\>

\<cbc:AllowanceTotalAmount currencyID=“SAR”\>0.00\</cbc:AllowanceTotalAmount\>

\<cbc:PrepaidAmount currencyID=“SAR”\>0.00\</cbc:PrepaidAmount\>

\<cbc:PayableAmount currencyID=“SAR”\>29.04\</cbc:PayableAmount\>

\</cac:LegalMonetaryTotal\>

cac:InvoiceLine

cbc:ID1\</cbc:ID\>

\<cbc:InvoicedQuantity unitCode=“PCE”\>1.01\</cbc:InvoicedQuantity\>

\<cbc:LineExtensionAmount currencyID=“SAR”\>25.25\</cbc:LineExtensionAmount\>

cac:TaxTotal

\<cbc:TaxAmount currencyID=“SAR”\>3.79\</cbc:TaxAmount\>

\<cbc:RoundingAmount currencyID=“SAR”\>29.04\</cbc:RoundingAmount\>

\</cac:TaxTotal\>

cac:Item

cbc:Name24 MM COG DOUBLE: [(LAYER 1: SINGLE COG 6MM GUR HD GRAY) + ( 12 - AIR GAP - SILICON BITE 6) + (LAYER 2: SINGLE COG 6MM CLEAR)]\</cbc:Name\>

cac:ClassifiedTaxCategory

cbc:IDS\</cbc:ID\>

cbc:Percent15\</cbc:Percent\>

cac:TaxScheme

cbc:IDVAT\</cbc:ID\>

\</cac:TaxScheme\>

\</cac:ClassifiedTaxCategory\>

\</cac:Item\>

cac:Price

\<cbc:PriceAmount currencyID=“SAR”\>25\</cbc:PriceAmount\>

cac:AllowanceCharge

cbc:ChargeIndicatortrue\</cbc:ChargeIndicator\>

cbc:AllowanceChargeReasondiscount\</cbc:AllowanceChargeReason\>

\<cbc:Amount currencyID=“SAR”\>0.00\</cbc:Amount\>

\</cac:AllowanceCharge\>

\</cac:Price\>

\</cac:InvoiceLine\>

---

<div class="post-metadata">

**Author:** ![Malik](https://dub1.discourse-cdn.com/flex013/user_avatar/zatca1.discourse.group/malik/32/708_2.png) [@Malik](https://zatca1.discourse.group/u/Malik)\
**Post date:** [July 31, 2024, 8:00am UTC](https://zatca1.discourse.group/t/clearance-api-not-validating-if-in-xml-file-buyer-details-is-missing-tag-like-postal-code-building-number/2171/4 "2024-07-31T08:00:19Z")

</div>

Please share valid XML which can open to see in browser seems shared one is not valid as giving errors of tags. thanks

> [@Anil\_K](#):
>
> \</cac:AccountingSupplierParty\>
> 
> cac:AccountingCustomerParty
> 
> cac:Party
> 
> cac:PostalAddress
> 
> cbc:StreetNameالرياض | الرياض\</cbc:StreetName\>
> 
> cbc:CitySubdivisionNameالرياض | RIYAD\</cbc:CitySubdivisionName\>
> 
> cbc:CityNameالرياض | RIYAD\</cbc:CityName\>
> 
> cac:Country
> 
> cbc:IdentificationCodeSA\</cbc:IdentificationCode\>
> 
> \</cac:Country\>
> 
> \</cac:PostalAddress\>
> 
> cac:PartyTaxScheme
> 
> cbc:CompanyID302187279300003\</cbc:CompanyID\>
> 
> cac:TaxScheme
> 
> cbc:IDVAT\</cbc:ID\>
> 
> \</cac:TaxScheme\>
> 
> \</cac:PartyTaxScheme\>
> 
> cac:PartyLegalEntity
> 
> cbc:RegistrationNameمؤسسة الإبداع الحديث للأبواب الأوتوماتيكية | MODREN CREATIVITY EST AUTOMATIC DOORS\</cbc:RegistrationName\>
> 
> \</cac:PartyLegalEntity\>
> 
> \</cac:Party\>
> 
> \</cac:AccountingCustomerParty\>

---

<div class="post-metadata">

**Author:** ![Anil\_K](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Anil\_K](https://zatca1.discourse.group/u/Anil_K)\
**Post date:** [July 31, 2024, 10:11am UTC](https://zatca1.discourse.group/t/clearance-api-not-validating-if-in-xml-file-buyer-details-is-missing-tag-like-postal-code-building-number/2171/5 "2024-07-31T10:11:13Z")

</div>

hi.

please download from below link

[xml file](https://drive.google.com/file/d/12ISheEVKKYT679PLRrRRn7m1lZdlapt1/view?usp=sharing)

thanks

---

<div class="post-metadata">

**Author:** ![Malik](https://dub1.discourse-cdn.com/flex013/user_avatar/zatca1.discourse.group/malik/32/708_2.png) [@Malik](https://zatca1.discourse.group/u/Malik)\
**Post date:** [July 31, 2024, 1:37pm UTC](https://zatca1.discourse.group/t/clearance-api-not-validating-if-in-xml-file-buyer-details-is-missing-tag-like-postal-code-building-number/2171/6 "2024-07-31T13:37:06Z")

</div>

Hi,  
Please review your code something is wrong as the response you shared is not of clearance but of compliance and API you mentioned shall have error as I did a test and here is the result. Also confirm if you are using JSON of this XML of somthing is missed. This API reponse should be like below,

{  
“invoiceHash”: “P3/QfnGR7eMON/LM8Vpiz6nCqrt5+msixDhj84Fo6Ww=”,  
“status”: “Cleared”,  
“clearedInvoice”: ‘signed invoice data’  
}

so this is not correct **[https://gw-fatoora.zatca.gov.sa/e-invoicing/core/invoices/clearance/single](https://gw-fatoora.zatca.gov.sa/e-invoicing/core/invoices/clearance/single)**

or  
the response you shared is not correct please review your code.

\*\*\*\*\*\*\*\*\*\* Welcome to ZATCA E-Invoice Java SDK 3.3.3 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
This SDK uses Java to call the SDK (jar) passing it an invoice XML file.  
It can take a Standard or Simplified XML, Credit Note, or Debit Note.  
It returns if the validation is successful or shows errors where the XML validation fails.  
It checks for syntax and content as well.  
You can use the command (fatoora -help) for more information.

* * *

2024-07-31 18:28:14,603 [INFO] ValidationProcessorImpl - [XSD] validation result : PASSED  
2024-07-31 18:28:15,365 [INFO] ValidationProcessorImpl - [EN] validation result : PASSED  
2024-07-31 18:28:15,365 [ERROR] ValidationProcessorImpl - en validation warnings :  
2024-07-31 18:28:15,366 [WARN] ValidationProcessorImpl - CODE : BR-10, MESSAGE : [BR-10]-An Invoice shall contain the Buyer postal address (BG-8).Not applicable for simplified tax invoices and associated credit notes and debit notes (KSA-2, position 1 and 2 = 02).  
2024-07-31 18:28:15,598 [INFO] ValidationProcessorImpl - [KSA] validation result : PASSED  
2024-07-31 18:28:15,599 [ERROR] ValidationProcessorImpl - ksa validation warnings :  
2024-07-31 18:28:15,599 [WARN] ValidationProcessorImpl - CODE : BR-KSA-63, MESSAGE : [BR-KSA-63]-If the buyer country code (BT-55) is “SA”, then these fields are mandatory:street name (BT-50), building number (KSA-18), postal code (BT-53), city (BT-52), District (KSA-4), country code (BT-55).For more information please access this link:[National Address | Saudi Post | SPL](https://splonline.com.sa/en/national-address-1/)  
2024-07-31 18:28:15,599 [WARN] ValidationProcessorImpl - CODE : BR-KSA-67, MESSAGE : [BR-KSA-67]-If the buyer country code (BT-55) is “SA”, then the Buyer postal code(BT-53) must be 5 digits.  
2024-07-31 18:28:15,650 [INFO] ValidationProcessorImpl - [PIH] validation result : FAILED  
2024-07-31 18:28:15,651 [ERROR] ValidationProcessorImpl - pih validation errors :  
2024-07-31 18:28:15,651 [ERROR] ValidationProcessorImpl - CODE : KSA-13, MESSAGE : PIH is inValid  
2024-07-31 18:28:15,651 [INFO] InvoiceValidationService - \*\*\* GLOBAL VALIDATION RESULT = FAILED

---

<div class="post-metadata">

**Author:** ![Anil\_K](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Anil\_K](https://zatca1.discourse.group/u/Anil_K)\
**Post date:** [August 1, 2024, 10:58am UTC](https://zatca1.discourse.group/t/clearance-api-not-validating-if-in-xml-file-buyer-details-is-missing-tag-like-postal-code-building-number/2171/7 "2024-08-01T10:58:27Z")

</div>

Hi,

As you mentioned, we are sending the same API response.

below is link and file that contain json format as you mentioned.

[json](https://drive.google.com/file/d/1AB23JRyWNF5MhMqLKDz6e4ufJhxEldV_/view?usp=sharing)

Thanks

---

<div class="post-metadata">

**Author:** ![Hadif](https://dub1.discourse-cdn.com/flex013/user_avatar/zatca1.discourse.group/hadif/32/235_2.png) [@Hadif](https://zatca1.discourse.group/u/Hadif)\
**Post date:** [August 2, 2024, 4:46pm UTC](https://zatca1.discourse.group/t/clearance-api-not-validating-if-in-xml-file-buyer-details-is-missing-tag-like-postal-code-building-number/2171/8 "2024-08-02T16:46:58Z")

</div>

I can clearly see that all mandatory tags are there, please specify the tags in xml format in order to help you

---

<div class="post-metadata">

**Author:** ![Anil\_K](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Anil\_K](https://zatca1.discourse.group/u/Anil_K)\
**Post date:** [August 3, 2024, 9:20am UTC](https://zatca1.discourse.group/t/clearance-api-not-validating-if-in-xml-file-buyer-details-is-missing-tag-like-postal-code-building-number/2171/9 "2024-08-03T09:20:18Z")

</div>

Hi

in below screen shot, building number and postal code tag are missing and as per the Einvoice Data Dictionary, this one is mandatory.

If I mention this tag, and if the postal code value is zero, it is still not giving any error.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/zatca1/original/1X/6dbde99a5851746b8531c9c4b994ce22cefee06b.png)

Thanks

---

<div class="post-metadata">

**Author:** ![Hadif](https://dub1.discourse-cdn.com/flex013/user_avatar/zatca1.discourse.group/hadif/32/235_2.png) [@Hadif](https://zatca1.discourse.group/u/Hadif)\
**Post date:** [August 3, 2024, 11:15am UTC](https://zatca1.discourse.group/t/clearance-api-not-validating-if-in-xml-file-buyer-details-is-missing-tag-like-postal-code-building-number/2171/10 "2024-08-03T11:15:40Z")

</div>

Hi,

Can you please send me the full xml file?

Regards,

---

<div class="post-metadata">

**Author:** ![Anil\_K](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Anil\_K](https://zatca1.discourse.group/u/Anil_K)\
**Post date:** [August 3, 2024, 11:41am UTC](https://zatca1.discourse.group/t/clearance-api-not-validating-if-in-xml-file-buyer-details-is-missing-tag-like-postal-code-building-number/2171/11 "2024-08-03T11:41:39Z")

</div>

Hi,

below is full xml file link

[full xml file](https://drive.google.com/file/d/1ruqxVLfsl83x1TIcKeNY0S_JOi9xzNUz/view?usp=sharing)

Thanks

---

<div class="post-metadata">

**Author:** ![Hadif](https://dub1.discourse-cdn.com/flex013/user_avatar/zatca1.discourse.group/hadif/32/235_2.png) [@Hadif](https://zatca1.discourse.group/u/Hadif)\
**Post date:** [August 3, 2024, 12:23pm UTC](https://zatca1.discourse.group/t/clearance-api-not-validating-if-in-xml-file-buyer-details-is-missing-tag-like-postal-code-building-number/2171/12 "2024-08-03T12:23:55Z")

</div>

Hi,

OK, what is the error message you’re getting when sending this xml?

Regards,

---

<div class="post-metadata">

**Author:** ![Anil\_K](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Anil\_K](https://zatca1.discourse.group/u/Anil_K)\
**Post date:** [August 3, 2024, 12:43pm UTC](https://zatca1.discourse.group/t/clearance-api-not-validating-if-in-xml-file-buyer-details-is-missing-tag-like-postal-code-building-number/2171/13 "2024-08-03T12:43:24Z")

</div>

Hi,

there is not any error message coming while calling clerance api.  
issue is below mentioned.

Clearance api not validating if in xml file buyer details is missing tag like postal code, building number

user is asking why without postal code, building number invoice getting cleared.

Thanks

---

<div class="post-metadata">

**Author:** ![Hadif](https://dub1.discourse-cdn.com/flex013/user_avatar/zatca1.discourse.group/hadif/32/235_2.png) [@Hadif](https://zatca1.discourse.group/u/Hadif)\
**Post date:** [August 3, 2024, 7:04pm UTC](https://zatca1.discourse.group/t/clearance-api-not-validating-if-in-xml-file-buyer-details-is-missing-tag-like-postal-code-building-number/2171/14 "2024-08-03T19:04:01Z")

</div>

Hi,

If you read the data dictionary you’ll find the word: Required, if populated, which means if the tag mentioned then you have to write the accurate data, otherwise not needed  
 ![image.png](https://europe1.discourse-cdn.com/flex013/uploads/zatca1/original/1X/b327b8c039cab5d153f028d554f7bc48fd57eec5.png)

Regards,

---

<div class="post-metadata">

**Author:** ![Anil\_K](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Anil\_K](https://zatca1.discourse.group/u/Anil_K)\
**Post date:** [August 5, 2024, 6:24am UTC](https://zatca1.discourse.group/t/clearance-api-not-validating-if-in-xml-file-buyer-details-is-missing-tag-like-postal-code-building-number/2171/15 "2024-08-05T06:24:18Z")

</div>

Hi,

I populated the postal code with a zero value and received no errors.  
and the same invoice I cleared twice is still not giving any errors, like clearance already done.

Thanks

---

<div class="post-metadata">

**Author:** ![eCloud](https://dub1.discourse-cdn.com/flex013/user_avatar/zatca1.discourse.group/ecloud/32/629_2.png) [@eCloud](https://zatca1.discourse.group/u/eCloud)\
**Post date:** [August 5, 2024, 8:31am UTC](https://zatca1.discourse.group/t/clearance-api-not-validating-if-in-xml-file-buyer-details-is-missing-tag-like-postal-code-building-number/2171/16 "2024-08-05T08:31:36Z")

</div>

Hi @Anil_K

I’ve tried validating your xml invoice, using the .Net SDK and through a web based validator. Your invoice should display a Warning as shown by @Malik in the previous post.

If in the Production of your invoice is approved without warning, only the admin working on the server side knows the cause.  
Maybe the production server is implementing different validation.

---

<div class="post-metadata">

**Author:** ![Anil\_K](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Anil\_K](https://zatca1.discourse.group/u/Anil_K)\
**Post date:** [August 5, 2024, 9:56am UTC](https://zatca1.discourse.group/t/clearance-api-not-validating-if-in-xml-file-buyer-details-is-missing-tag-like-postal-code-building-number/2171/17 "2024-08-05T09:56:37Z")

</div>

Hi @eCloud

may I know who admin is here so I can send my query to admin mean you have any email address?

Thanks
