# Sample API

### Base URL

```
{{HOST}}/ewb-gsp/v1.03
```

### Authentication

All requests require the user authentication token in the request header.

```
X-CT-Auth-Token: <YOUR-AUTH-TOKEN-HERE>
```

To generate authentication token, please contact [ClearTax GST Sales](mailto:gst-sales@cleartax.in).

{% hint style="info" %}
For all new users, you DO NOT have to add `client-id` and `client-secret` to the request headers.

For customers migrating from Karvy, please contact <integrations-support@cleartax.in> for your updated `karvyclientid` and `karvyclient_secret`.
{% endhint %}

### Sample Request&#xD;

```bash
curl --location --request POST 'https://api-sandbox.clear.in/ewb-gsp/v1.03/auth' \
--header 'Gstin: 07AAFCD5862R1ZX' \
--header 'X-CT-Auth-Token: 3c469428-5708-479e-a116-294fd57fe052' \
--header 'Content-Type: application/json' \
--data-raw '{
"Data":"Hy/UBN8CqAG1kJhunyVFTpd80IYyB+e2fQmnxC8ZaUaCpPN1Kcv9kCbi+u4Ste9OodeQjepBsjhfpkgZ4fevuaSBo2sFVKZgNXWxzRZsVbjny2fRH3bxFguqlcP1nDpwCdtoL1fMLHr6bHMxRysz+FaXEJWybNulaRdhsQIlxvYgdlfHPmZ9qQvGPjvOjlDZxgMYzvzJKoPvu2ETmzcrQeza2UtED6CQs2AV8Z4VYFjiOqovB3s8W1KegCiLpggmDCabzj7ethsdugJHXecTHJ5MH13UY1jWtcmI4WUamJn/aEu+cdnnxMh8c03uwpU+xLcOXpG8GijEUqhETqoaQ=="
}'
```

For further information on different endpoints like generate, cancel, extend, etc, please refer to the NIC documentation at <https://docs.ewaybillgst.gov.in/apidocs/index.html>

### Error Codes

In case you have received an error code from NIC, you can check the description of the code here: <https://docs.ewaybillgst.gov.in/apidocs/api-error-codes-list.html>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cleartax.in/cleartax-docs/e-waybill-gsp-api/e-waybill-gsp-api-reference/sample-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
