# Update E-Waybill Transporter ID



You can use this API to update the Transporter ID of an E-Way bill.

### Request Method

POST

### Request URL

```
{{HOST}}/einv/v1/ewaybill/update?action={{action}}
```

### Request Headers

<table><thead><tr><th width="238">PARAMETER</th><th>PARAM TYPE</th><th width="158">TYPE</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td>X-Cleartax-Auth-Token</td><td>Header</td><td>String</td><td>Mandatory. The auth token generated from ClearTax user id and password. <a href="https://docs.cleartax.in/cleartax-for-developers/e-invoicing-api/e-invoicing-api-reference/authentication-token">Know how.</a></td></tr><tr><td>gstin</td><td>Header</td><td>String</td><td>Mandatory. GSTIN number for the user</td></tr></tbody></table>

### Request Path Params

There are no path parameters for this API.

### Request Query Params

| Parameter | Data Type | Field Validations | Description                                         |
| --------- | --------- | ----------------- | --------------------------------------------------- |
| action    | String    | NA                | <p>Mandatory.</p><p>Enum= UPDATE_TRANSPORTER_ID</p> |

### Request Body

| Parameter     | Data Type | Field Validations | Description                  |
| ------------- | --------- | ----------------- | ---------------------------- |
| EwbNumber     | Number    | 12 Digits         | Mandatory. E-Way Bill Number |
| TransporterId | String    | 15 Digits         | Mandatory. Transporter GSTIN |

### Response Status Codes

| HTTP Status Code | Description                                                                  |
| ---------------- | ---------------------------------------------------------------------------- |
| 200              | For a successfully processed request (may be a success or validation error). |
| 400              | Bad Request. Invalid JSON.                                                   |
| 401              | If the user is not authenticated for the operation.                          |
| 403              | If the user is not authorized for the operation.                             |
| 500              | If there are any unhandled exceptions on the Clear side.                     |

### Response Schema

| Parameter   | Data Type     | Field Validations | Description                                                     |
| ----------- | ------------- | ----------------- | --------------------------------------------------------------- |
| EwbNumber   | Number        | 12 Digits         | E-Way Bill number                                               |
| UpdatedDate | String        | NA                | Date and time of update. This will be null in case of failure.  |
| ValidUpto   | <p><br>NA</p> | <p>NA<br></p>     | null                                                            |
| errors      | List          | NA                | This will be null if there will be no error.                    |

#### Errors Object

| Parameter      | Data Type | Field Validations | Description                                                                |
| -------------- | --------- | ----------------- | -------------------------------------------------------------------------- |
| error\_code    | Number    | NA                | Error Code. If there is no error, then this field will not be present.     |
| error\_message | String    | NA                | Error message. If there is no error, then this field will not be present.  |
| error\_source  | String    | NA                | Error Source. If there is no error, then this field will not be present.   |

### Sample Request and Response

#### Request

```json
{
"EwbNumber": 111009343844,
"TransporterId": "29AAFCD5862R000"
}
```

#### Response - Success

**HTTP Status Code - 200**

```json
{
    "EwbNumber": 711008839111,
    "UpdatedDate": "14/11/2023 06:00:00 PM",
    "ValidUpto": null,
    "errors": null
}
```

#### Response - Failure

**HTTP Status Code - 200**

```json
{
    "EwbNumber": 71100883911,
    "UpdatedDate": null,
    "ValidUpto": null,
    "errors": [
        {
            "error_code": "357",
            "error_message": "Could not retrieve detail. This E-Way Bill Number doesn't belong to your GSTIN or isn't assigned to you for transport.",
            "error_source": "GOVT"
        }
    ]
}
```

### API Validations

Currently there are no known validations for this API.

### API Constraints

1. The transporter can be updated for the e-way bill only by the current transporter. If transporter is not assigned, then the generator can update
2. Transporter ID should be valid a GSTIN.&#x20;
3. Transporter ID can be updated only if the e-way bill is active, that is, not cancelled
4. Transporter ID can be updated only if the e-way bill is within the validity period, that is, validity is not expired.
