> For the complete documentation index, see [llms.txt](https://docs.cleartax.in/cleartax-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cleartax.in/cleartax-docs/e-invoicing-api/e-invoicing-api-reference.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
