> 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-waybill-api/e-waybill-api-reference/e-waybill-api/creating-or-updating-documents.md).

# (Deprecated) Creating or Updating Documents

All files containing documents are sent by submitting a POST request to the Upload File API with the following request headers.

{% hint style="danger" %}
This API is deprecated. Please use the [E-Waybill APIs from the unified set available here](/cleartax-docs/e-invoicing-api/introduction-to-e-invoicing-api.md).
{% endhint %}

## Upload Documents to ClearTax E-Waybill&#x20;

<mark style="color:green;">`POST`</mark> `https://ewb.cleartax.in/api/v0.2/taxable_entities/{taxable_entity_id}/transactions/upload`

This endpoint allows you to upload document on ClearTax E- Waybill portal.\
{taxable\_entity\_id} : taxable entity ID associated to the GSTIN.  \
\
Sample request\
`https://ewb.cleartax.in/api/v0.2/taxable_entities/c5cc664c-d473-4ec5-9301-acf43349b7c4/transactions/upload?data_type=EWAY_BILLS&branch_id=5d2f7742-1484-4bb4-9a5b-b3b8c3586b40`

#### Query Parameters

| Name               | Type   | Description                                                                                                                                                                                                                                                       |
| ------------------ | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| custom\_mapper\_id | string | custom  mapper id of the template which has been already mapped into the business account on ClearTax E-Waybill portal.                                                                                                                                           |
| branch\_id         | string | Cleartax E-Waybill Branch\_id of that location for which data in the file belongs                                                                                                                                                                                 |
| data\_type         | string | <p>EWAY\_BILLS will be the value <br>Ex. <code>data\_type:EWAY\_BILLS</code></p>                                                                                                                                                                                  |
| excelFile          | object | <p>File which contains documents either in ClearTax template, Govt template or Custom template.<br><strong><code>The file should be sent as form-data</code></strong><br><strong><code>Here the parameter type of excelFile will be FILE.</code></strong><br></p> |

#### Headers

| Name                                        | Type   | Description                                          |
| ------------------------------------------- | ------ | ---------------------------------------------------- |
| X-Cleartax-Auth-Token: \<USER\_AUTH\_TOKEN> | string | Auth token will be generated and given upon request. |

{% tabs %}
{% tab title="200 If the request completed successfully then only API will give status code 200 and response message.

activity\_id : activity\_id is the unique ID associated with this upload activity. To fetch upload activity status or details, you will have to send this ID along with consequent corresponding API calls.
status : Based on traffic on server, you may get status from given list.
'INIT', 'UPLOADED', 'QUEUED', 'PROCESSING', 'PROCESSED', 'ABORTED'

queued\_count: No. of documents already in the current processing queue." %}

```javascript
{
    "activity_id": "c11e2e14-4060-4ecb-b801-2cc22d7e727a",
    "error_response": null,
    "group_id": null,
    "other_activity_ids": null,
    "status": "UPLOADED",
    "queued_count": 0
}
```

{% endtab %}

{% tab title="400 In case provided parameter are incorrect." %}

```javascript
{
    "errors": {
        "err_1": {
            "code": "400",
            "message": "HTTP 400 Bad Request",
            "error_group_code": 0,
            "error_id": 0
        }
    }
}
```

{% endtab %}

{% tab title="500 When request is made using some invalid parameters." %}

```
{
    "errors": {
        "err_1": {
            "code": "500",
            "error_group_code": 0,
            "error_id": 0
        }
    }
}
```

{% endtab %}
{% endtabs %}
