# What is the “Clearance API”?

**URL:** <https://zatca1.discourse.group/t/what-is-the-clearance-api/315>\
**Category:** Clearance and Reporting\
**Created:** [July 15, 2023, 11:39pm UTC](https://zatca1.discourse.group/t/what-is-the-clearance-api/315 "2023-07-15T23:39:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ehab](https://avatars.discourse-cdn.com/v4/letter/e/e36b37/32.png) [@Ehab](https://zatca1.discourse.group/u/Ehab)\
**Post date:** [July 15, 2023, 11:39pm UTC](https://zatca1.discourse.group/t/what-is-the-clearance-api/315/1 "2023-07-15T23:39:56Z")

</div>

What is the “Clearance API”?

---

<div class="post-metadata">

**Author:** ![Ehab](https://avatars.discourse-cdn.com/v4/letter/e/e36b37/32.png) [@Ehab](https://zatca1.discourse.group/u/Ehab)\
**Post date:** [July 15, 2023, 11:40pm UTC](https://zatca1.discourse.group/t/what-is-the-clearance-api/315/2 "2023-07-15T23:40:54Z")

</div>

The “Clearance API” clears a single standard invoice, credit note, or debit note. Specifically, it accepts standard invoice, credit note, or debit note encoded in base64 and validates it to ensure:

1. Compliance to the UBL2 XSD.
2. EN 16931 Rules subset.
3. KSA Specific Rules set. KSA Rules set will override EN 16931 Rules set in case the same rule exists in both sets.

On successful validation, the api then applies a cryptographic stamp from ZATCA side and generates a QR Code string. After that the XML is returned back.
