# Generate/Regenerate Consolidated EWB

You can generate a consolidated EWB by sending a **`POST`** request to E-Invoicing API with the following request headers.

### Request Method

POST

### Request URL

```
{{HOST}}/einv/v1/consolidate-ewaybill/generate?action={{action}}
```

### Request Headers

<table><thead><tr><th width="190.33331298828125">Parameter</th><th>Data Type</th><th>Field Validations</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

<table><thead><tr><th>Parameter</th><th width="185.6666259765625">Data Type</th><th>Field Validations</th><th>Description</th></tr></thead><tbody><tr><td>action</td><td>String</td><td>NA</td><td>Mandatory = GENERATE_CONSOLIDATED_EWB/REGENERATE_CONSOLIDATED_EWB</td></tr></tbody></table>

### Request Body

| Parameter  | Data Type | Field Validations                                                                                                                        | Description                                                                                                                                                  |
| ---------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| VehNo      | Number    | 15 Digits                                                                                                                                | <p>Conditional. </p><p>Vehicle Number. </p><p>Only when the Mode of Transport is Road. </p>                                                                  |
| FromPlace  | String    | 12 Characters                                                                                                                            | <p>Mandatory. </p><p>From Place</p>                                                                                                                          |
| FromState  | Number    | 2 Digits                                                                                                                                 | <p>Mandatory. </p><p>From State Code</p>                                                                                                                     |
| TransDocNo | String    | 15 Characters                                                                                                                            | Conditional. Transport Document Number                                                                                                                       |
| TransDocDt | String    | dd/mm/yyyy                                                                                                                               | <p>Optional. </p><p>Transport Document Date</p>                                                                                                              |
| TransMode  | Enum      | <p>\[ROAD</p><p>RAIL</p><p>AIR</p><p>SHIP</p><p>IN\_TRANSIT]</p><p><br></p>                                                              | <p>Mandatory. </p><p>Transport Mode</p>                                                                                                                      |
| EwbNumbers | List      | NA                                                                                                                                       | <p>Mandatory.</p><p>Consolidate E-Way Bills</p>                                                                                                              |
| ReasonCode | String    | <p>1- Due to Break Down</p><p>2 - Due to Transshipment </p><p>3 - Others (Pls. Specify) </p><p>4 - First Time</p><p><br> </p><p><br></p> | <p>Conditional. </p><p>Reason code for <strong>Regeneration</strong> of Consolidated E-Way Bill. Required only for regenerating Consolidated E-Waybill. </p> |

### Response Status Codes

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

### Response Schema

| Parameter             | Data Type | Field Validations | Description                                      |
| --------------------- | --------- | ----------------- | ------------------------------------------------ |
| ConsolidatedEwbNumber | Number    | 12 Digits         | Consolidated E-Way Bill number                   |
| EwbNumbers            | List      | NA                | List of EWB which has been consolidated          |
| ConsolidateEwbDate    | String    | NA                | Date and time at which the EWB was consolidated. |

#### 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

{% tabs %}
{% tab title="Consolidate E-Waybill" %}

```json
{
    "VehNo": "KA12AB123",
    "FromPlace": "BANGALORE SOUTH",
    "FromState": 29,
    "TransDocNo": "1234",
    "TransDocDt": "12/08/2025",
    "TransMode": "AIR",
    "EwbNumbers": [
        181009088610,
        171009088617
    ]
}
```

{% endtab %}

{% tab title="Re-Consolidate E-Waybill" %}

```json
{
    "VehNo": "MP09AB8989",
    "FromPlace": "KARNATAKA",
    "FromState": "29",
    "TransDocNo": "1234",
    "TransDocDt": "12/08/2025",
    "TransMode": "ROAD",
    "ConsolidatedEwbNumber": "1810009735",
    "ReasonCode": 1,
    "ReasonRemarks": "Flood"
}
```

{% endtab %}
{% endtabs %}

#### Response - Success:&#x20;

**HTTP Status Code - 200**

```json
{
    "EwbNumbers": [
        181011777706,
        151011777707
    ],
    "ConsolidatedEwbNumber": 1510009736,
    "ConsolidateEwbDate": "03/09/2025 05:40:00 PM"
}
```

#### Response - Failure:&#x20;

**HTTP Status Code - 200**

```json
{
    "errors": {
        "error_code": "7001",
        "error_message": "Invalid Vehicle Number, Vehicle number length should be between 7 and 15 ",
        "error_source": "CLEARTAX"
    }
}
```

### API Validations

Currently there are no known validations for this API.

### API Constraints

1. EWB can be added to the CEWB if the generator of CEWB is a generator or the assigned transporter of the e-way bill.
2. EWB can be added to the CEWB only if the e-way bill is active and within the validity, that is, EWB is not cancelled or not expired.
