# Print B2C Invoice

You can print a B2C invoice by sending a **`POST`** request to B2C QR code API with the following request headers.

### Request Method

POST

### **Request URL**

```
{{HOST}}/einv/v1/b2c/download-pdf
```

### Request Headers

<table><thead><tr><th>Parameter</th><th width="174.66668701171875">Data Type</th><th>Field Validations</th><th>Description</th></tr></thead><tbody><tr><td>X-Cleartax-Auth-Token</td><td>String</td><td>NA</td><td>Mandatory. The auth token generated from ClearTax user id and password. </td></tr><tr><td>Content-Type</td><td>String</td><td>NA</td><td>Mandatory. This will always be <br>"application/json" for JSON</td></tr><tr><td>Gstin</td><td>String</td><td>NA</td><td>Mandatory. GSTIN number for the user.</td></tr></tbody></table>

### Request Path Params <a href="#request-path-params" id="request-path-params"></a>

There are no path parameters for this API.

### Request Query Params <a href="#request-query-params" id="request-query-params"></a>

| Parameter | Data Type | Field Validations | Description           |
| --------- | --------- | ----------------- | --------------------- |
| template  | String    | NA                | Desired Template Id.  |

### Request Body

| Parameter       | Data Type | Field Validations | Description                                                                          |
| --------------- | --------- | ----------------- | ------------------------------------------------------------------------------------ |
| transaction\_id | String    | NA                | Mandatory. Value of transaction\_id received from Generate B2C QR Code API response. |

### 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&#x20;

You will receive PDF in the response from this API.&#x20;

### Sample Request and Response <a href="#sample-request-and-response" id="sample-request-and-response"></a>

#### **Request**

```json
[
    "29AAFCD5862R000_B2CTest1_INV_2025"
]
```

#### Response (Success)

**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%2FgpnCm7ridIjKNXvjjVr2%2Fresponse.pdf?alt=media&token=39e5cec5-ffb6-4bac-b360-9339f86d14e6" %}

#### Response (Failure)

**HTTP Status Code: 500**

```json
{
    "error_code": "300102",
    "error_message": "You don't have any data present for the selected Document Details",
    "error_source": "CLEARTAX"
}
```

### API Validations <a href="#api-validations" id="api-validations"></a>

Currently there are no known validations for this API.

### API Constraints <a href="#api-constraints" id="api-constraints"></a>

Record for the provided transaction id needs to be present in Clear database.
