# Get E-Waybills

You can use this API to get the complete details of the E-way bill from our database. Also, details of E-way bills generated by 3rd party can also be fetched from our database by-passing the right parameters.

### Request Method

GET

### Request URL

```
{{HOST}}/einv/ewaybills
```

### Request Headers

| Parameter             | Data Type | Field Validation | Description                               |
| --------------------- | --------- | ---------------- | ----------------------------------------- |
| x-cleartax-auth-token | String    | NA               | <p>Mandatory. </p><p>User auth token.</p> |
| gstin                 | String    | NA               | Mandatory. GSTIN number for the user      |

### Request Path Params

There are no path parameters for this API.

### Request Query Params

<table><thead><tr><th width="233.76190476190476">PARAMETER</th><th width="150">Data Type</th><th>Field Validations</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td>pullFilterType</td><td>String</td><td>NA</td><td>EWB_BY_ME, EWB_FOR_MY_GSTIN, EWB_FOR_TRANSPORTATION</td></tr><tr><td>start_date</td><td>String</td><td><p>NA</p><p>Accepted format: YY-MM-DD </p></td><td>Start date by which you need to filter</td></tr><tr><td>end_date</td><td>String</td><td><p>NA</p><p>Accepted format: YY-MM-DD </p></td><td>End date by which you need to filter</td></tr><tr><td>start</td><td>String</td><td>NA</td><td>Default: 0 /used for pagination</td></tr><tr><td>limit</td><td>String</td><td>NA</td><td>Default: 100 / number of invoices to limit in the response</td></tr><tr><td>seller_gstin</td><td>String</td><td>NA</td><td>Seller GSTIN number</td></tr><tr><td>buyer_gstin</td><td>String</td><td>NA</td><td>Buyer GSTIN number</td></tr><tr><td>ewb_numbers</td><td>String</td><td>NA</td><td>E-Way Bill number</td></tr><tr><td>ewb_status</td><td>String</td><td>NA</td><td>PENDING, PART_A, GENERATED, CANCELLED</td></tr><tr><td>document_numbers</td><td>String</td><td>NA</td><td>Document Number</td></tr><tr><td>document_type</td><td>String</td><td>NA</td><td>Document Type</td></tr><tr><td>document_date</td><td>String</td><td>NA</td><td>Document Date</td></tr><tr><td>transporter_gstins</td><td>String</td><td>NA</td><td>Transporter GSTIN</td></tr><tr><td>vehicleNumbers</td><td>String</td><td>NA</td><td>Vehicle number</td></tr><tr><td>min_distance</td><td>String</td><td>NA</td><td>Minimum distance</td></tr><tr><td>max_distance</td><td>String</td><td>NA</td><td>Maximum distance</td></tr></tbody></table>

### Request Body

There will be no request body for this API.&#x20;

### 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 authorized for the operation.                             |
| 500              | If there are any unhandled exceptions on Clear side.                         |

### Response Schema

| Parameter               | Data Type | Field Validations | Description                                 |
| ----------------------- | --------- | ----------------- | ------------------------------------------- |
| ewb\_number             | Number    | 12 Characters     | E-Way bill number                           |
| ewb\_generated\_date    | String    | NA                | Date and time of generation of E-Way bill.  |
| ewb\_valid\_from\_date  | String    | NA                | Validity start date and time.               |
| ewb\_due\_date          | String    | NA                | Validity date of the E-Way bill.            |
| ewb\_govt\_sync\_status | String    | COMPLETE          | Syncing status between ClearTax and Govt.   |
| ewb\_status             | String    | GENERATED         | Status of the E-Way bill.                   |

### Sample Request and Response

#### Request

There will be no request body for this API.&#x20;

#### Response - Success:

**HTTP Status Code - 200 OK**

```json
[
    {
        "ignored_warnings": null,
        "owner": null,
        "id": "141009551909",
        "transaction_date": "02/02/2022",
        "return_period": null,
        "source": "USER",
        "total_taxable_val": 67796.61,
        "total_cgst_val": 0.0,
        "total_sgst_val": 0.0,
        "total_igst_val": 12203.39,
        "total_cess_val": 0.0,
        "discount_type": null,
        "total_val": 80000.0,
        "tags": null,
        "gst_status": null,
        "gst_validation_errors": null,
        "place_of_supply": "GUJARAT",
        "updated_at": null,
        "user_updated_at": null,
        "is_canceled": false,
        "created_at": null,
        "cancel_reason": null,
        "cancel_remarks": null,
        "seller_contact_id": null,
        "consignee_contact_id": null,
        "receiver_contact_id": null,
        "bank_details": null,
        "custom_fields": null,
        "branch_id": null,
        "document_number": "testotherewb3",
        "type": "SALE",
        "seller": {
            "name": null,
            "gstin": "29AAFCD5862R000",
            "address1": "TEST TEST",
            "address2": "TEST TEST TEST",
            "city": "560007",
            "state": "KARNATAKA",
            "zip_code": "560007",
            "country": null,
            "phone_number": null
        },
        "receiver": {
            "name": "sana kumari",
            "gstin": "24AAFCD5862R005",
            "address1": null,
            "address2": null,
            "city": null,
            "state": "GUJARAT",
            "zip_code": null,
            "country": null,
            "phone_number": null
        },
        "consignee": {
            "name": "sana kumari",
            "gstin": "24AAFCD5862R005",
            "address1": "Z-5, raja garden,uttam nagar",
            "address2": "NA",
            "city": "Delhi",
            "state": "GUJARAT",
            "zip_code": "360001",
            "country": null,
            "phone_number": null
        },
        "ewb_number": "141009551909",
        "irn": null,
        "ewb_generated_date": "02-02-2022 20:19:00",
        "ewb_valid_from_date": "02-02-2022 20:19:00",
        "ewb_due_date": "11-02-2022 23:59:00",
        "ewb_govt_sync_status": "COMPLETE",
        "other_val": 0.0,
        "total_cess_non_advol_val": 0.0,
        "is_multi_vehicle": false,
        "schedule_date": null,
        "transporter_history_dtos": null,
        "ewb_status": "GENERATED",
        "document_type": "INV",
        "transport_mode": "ROAD",
        "transporter_gstin": "29AAFCD5862R000",
        "transporter_name": "XYZ EXPORTS",
        "transporter_from_place": "560007",
        "transporter_from_state": "KARNATAKA",
        "transport_doc_number": "DOC01",
        "transport_date": "02/02/2022",
        "vehicle_number": "KA123456",
        "vehicle_type": "REGULAR",
        "update_reason": null,
        "update_remarks": null,
        "extend_validity_reason": null,
        "extend_validity_remarks": null,
        "sub_supply": "SUPPLY",
        "ewb_errors": null,
        "cewb_number": "0",
        "distance": 1687,
        "remaining_distance": null,
        "extended_date": null,
        "dispatch_from_state": "KARNATAKA",
        "nic_ewb_status": "ACTIVE",
        "export_type": null,
        "generation_interaction_type": "API",
        "sub_supply_desc": null,
        "transaction_type": "Regular",
        "from_pincode": "560007",
        "consignment_status": null,
        "transit_type": null,
        "line_items": [
            {
                "item_code": null,
                "gst_code": "85167200",
                "gst_type": "GOODS",
                "description": null,
                "notes": null,
                "unit_price": null,
                "unit_price_including_tax": null,
                "unit_of_measurement": "PCS",
                "item_id": "0",
                "serial_number": 1,
                "quantity": 1.000,
                "discount_rate": null,
                "discount": null,
                "taxable_val": 67796.61,
                "cgst_rate": 0.00,
                "cgst_val": null,
                "sgst_rate": 0.00,
                "sgst_val": null,
                "igst_rate": 18.00,
                "igst_val": null,
                "cess_rate": 0.00,
                "cess_val": null,
                "total_val": null,
                "tags": null,
                "cess_non_advol_rate": null,
                "cess_non_advol_val": 0.0,
                "tcs_val": null
            }
        ],
        "transporter_code": null,
        "owned_by": null,
        "owner_gstin": null,
        "branch_name": null,
        "active": true,
        "version_num": null
    }
]
```

#### Response - Failure:

**HTTP Status Code 200 OK**

```json
[]
```

### API Validations

Currently there are no known validations.

### API Constraints

The user should have the E-Way Bill present in the Clear database.&#x20;
