# E-Invoicing API Reference

For information on environments, host name, IP, port, TLS certificates, refer to:

{% content-ref url="/pages/ZVvR8S3TgQy6o8n9twSE" %}
[CFC API Reference](/cleartax-docs/clear-finance-cloud/cfc-api-reference.md)
{% endcontent-ref %}

## Different sets of E-Invoicing API&#x20;

ClearTax E-Invoicing provides 2 kinds of APIs:

1. Government Compatible APIs
2. ClearTax E-Invoicing APIs

These are synchronous APIs that cater to basic e-invoicing functionalities and the schema is compatible with the schema provided by the government.

* Generate IRN
* Cancel IRN
* Get Invoice by IRN

These APIs are available for consumption in the staging environment.

{% content-ref url="/pages/-M2IGr\_r5wHnh0tY1aty" %}
[Clear Schema](/cleartax-docs/e-invoicing-api/e-invoicing-api-reference/cleartax-e-invoicing-apis-xml-schema.md)
{% endcontent-ref %}

{% content-ref url="/pages/-Lz0wdqxA\_zN7AEiI5Ea" %}
[Government Schema](/cleartax-docs/e-invoicing-api/e-invoicing-api-reference/govt-compatible-apis.md)
{% endcontent-ref %}

### Difference between ClearTax API and Government Compatible API

\| **Actions**&#x20;                                                  \| Government Compatible API&#x20;\| <p>

</p><p>ClearTax API</p> |
| ------------------------------------------------------------------ | ------------------------------ | ---------------------------- |
| **Generating IRN**                                                 | Y                              | Y                            |
| **Ability to send Custom fields**                                  | N                              | Y                            |
| **Retry IRN Generation (for invoices failed due to IRP failures)** | N                              | Y                            |
| **Invoice Validation**                                             | Y                              | Y                            |
| **Generating IRN (Bulk)**                                          | N                              | Y                            |
| **Canceling IRN**                                                  | Y                              | Y                            |
| **Getting IRN details**                                            | Y                              | Y                            |
| **Printing E-invoice**                                             | Y                              | Y                            |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cleartax.in/cleartax-docs/e-invoicing-api/e-invoicing-api-reference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
