# Get E-Waybill PDF

You can use this endpoint to get a PDF version of an E-Waybill.&#x20;

### Request Method

POST

### Request URL

```
{{HOST}}/einv/v2/eInvoice/ewaybill/print
```

### Request Headers

<table><thead><tr><th width="236">PARAMTER</th><th>PARAM TYPE</th><th width="150">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. </td></tr><tr><td>gstin</td><td>Header</td><td>String</td><td>Mandatory. User GSTIN</td></tr></tbody></table>

### Request Path Params

There are no path parameters for this API.&#x20;

### Request Query Params

| Parameter | Data Type | Field Validations | Description                                            |
| --------- | --------- | ----------------- | ------------------------------------------------------ |
| format    | String    | NA                | <p>Available values: PDF, ZIP. </p><p>Default: zip</p> |

### Request Body

<table><thead><tr><th>Parameter</th><th>Data Type</th><th width="150">TYPE</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td>ewb_numbers</td><td>Array</td><td>NA</td><td>E-WayBill Number</td></tr><tr><td>print_type</td><td>String</td><td>NA</td><td>Enum: BASIC, DETAILED</td></tr></tbody></table>

### Response Status Codes

<table><thead><tr><th width="322.6666259765625">HTTP Status Code</th><th>Description</th></tr></thead><tbody><tr><td>200</td><td>For a successfully processed request (may be a success or validation error).</td></tr><tr><td>401</td><td>If the user is not authenticated for the operation.</td></tr><tr><td>403</td><td>If the user is not authorized for the operation.</td></tr><tr><td>500</td><td>If there are any unhandled exceptions on the Clear side.</td></tr></tbody></table>

### Response Schema

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

### Sample Request and Response

#### Request

```json
{
  "ewb_numbers": [
    151011726811
  ],
  "print_type": "DETAILED"
}
```

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

**HTTP Status Code: 200 OK**

{% file src="<https://2888774781-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZ9fXxeBEm3pJiVldcu%2Fuploads%2FlcDb2S4gNls5gJcu8CLB%2Fbasic.pdf?alt=media&token=6d55cd89-6e83-4a48-8a9a-01c0b076979d>" %}
Basic E-Waybill Print Sample
{% endfile %}

{% file src="<https://2888774781-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZ9fXxeBEm3pJiVldcu%2Fuploads%2FsUXFG9LfswuMJdaJTobR%2Fdetailed.pdf?alt=media&token=11b810d1-f0fa-49fe-9ba9-3b2773c69738>" %}
Detailed E-Waybill Print Sample
{% endfile %}

### How to save the response as PDF in Postman.

![Please use the "save to file" option under save response to view the file as PDF.](https://2888774781-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LZ9fXxeBEm3pJiVldcu%2F-MT_6Z1CQIX6GfBPY10y%2F-MT_xjM-WdutCRQ6STYO%2Fimage.png?alt=media\&token=1a1bde6a-aa6a-42ae-989c-cef065bb4509)

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

**HTTP Status Code: 200 OK**

```json
{
    "error_code": "102",
    "error_message": "No documents with the selected Input are present in the Database;",
    "error_source": "CLEARTAX"
}
```

### API Validations

Currently there are no known validations for this API.

### API Constraints&#x20;

1. Maximum up to 10 E-waybill numbers can be sent in one request.
2. EWB details should be present in ClearTax database
