> 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-ksa-api/e-invoicing-ftp-magnet.md).

# E-Invoicing KSA FTP Magnet

![](/files/-M2YrcdBxKcuuYZP7rBK)

FTP Magnet is a middleware application between your FTP server and ClearTax E-Invoicing KSA application. You can export data from your ERP to your own FTP server. As a part of on-boarding, ClearTax configures it’s FTP Magnet to connect to your FTP server. The FTP Magnet reads the input files from your FTP server and uploads them to ClearTax E-Invoicing KSA application. Once the uploaded files are processed, it writes the response back to your FTP server.

## Downloads

**Specification document and a typical project plan**:

{% file src="/files/XRSL2JH4JRMhDcnfv0nU" %}

### Sample templates for various actions

{% hint style="info" %}
For files in INPUT/INIT, to download a ClearTax template for reference, go to your ClearTax account and click on the “Import” tab.\
Files in INPUT/UPLOAD\_ERROR will have the same template as above with a new column named- "Error" added at the end of the file.
{% endhint %}

#### GENERATE\_EINV

<table><thead><tr><th>Directory</th><th>Standard template name</th><th data-type="files">Sample template</th></tr></thead><tbody><tr><td>INPUT/INIT</td><td>E-INVOICE-GCC-Standard</td><td><a href="/files/AXuwFocKQn7JbQDES4eb">/files/AXuwFocKQn7JbQDES4eb</a></td></tr><tr><td>OUTPUT/UPLOAD_ERROR</td><td>E-INVOICE-GCC-Standard</td><td><a href="/files/V7SftOlQ5NonPIEjGZQY">/files/V7SftOlQ5NonPIEjGZQY</a></td></tr><tr><td>OUTPUT/GENERATION_ERROR</td><td>E-INVOICE-GCC-Standard</td><td><a href="/files/O7LxpHkIsjnATA0AcatE">/files/O7LxpHkIsjnATA0AcatE</a></td></tr><tr><td>OUTPUT/SUCCESS</td><td>E-INVOICE-GCC-Standard</td><td><a href="/files/OVBAhU2B2eK3JcYwStYf">/files/OVBAhU2B2eK3JcYwStYf</a></td></tr></tbody></table>

{% hint style="warning" %}
**Note**: These template names and samples are applicable only if you are using our standard templates available in the product. In case you have created custom templates, then the template names and headers might vary based on your customizations.
{% endhint %}

{% hint style="info" %}
The success and error file templates are subject to change. Both the headers and the order of columns may change. We recommend you map the output with flexible options to add or change the headers in the future.
{% endhint %}

## **Security**

The incoming requests from ClearTax to your FTP server will be sent from the below IPs:

Sandbox: `150.230.54.220`

Production:&#x20;`144.24.210.78`&#x20;
