Get Signed PDF
This API will accept any PDF as input and return the digitally signed pdf.
Request Method
POST
Request URL
Request Headers
Parameter | Data Type | Field Validations | Description |
---|---|---|---|
x-cleartax-auth-token | String | Cannot be empty | Mandatory. User auth token. |
gstin | String | Mandatory. This is the GSTIN of the business, as registered on ClearTax. |
Request Path Parameters
There are no path parameters for this API.
Request Query Parameters
There are no query parameters for this API.
Request Body
Parameter | Data Type | Field Validations | Description |
---|---|---|---|
file | form-data | Content type: application/pdf | Mandatory. PDF file to be signed. |
x | form-data | number | Optional. X coordinate on pdf from top left Ex. 100 |
y | form-data | number | Optional. Y coordinate on pdf from top left Ex. 50 |
pageList | form-data | Enum - ALL | Optional. Parameter to denote if all signature needs to be placed on all pages. Ex. “ALL” |
pageNumberList | form-data | String (comma-separated numbers) | Optional. If signature is required on specific pages, this parameter can be used. Ex. “1,3,5” |
Sample Request
Sample Input File-
Response Status Codes
HTTP Status Code | Description |
---|---|
200 | For a successful retrieval |
401 | If the user is not authenticated for the operation |
403 | If the user is not authorized for the operation |
Response Schema
Returns signed pdf.
Sample Response (Success)
HTTP Status Code: 200
Response Body (Succeeded state): Signed pdf
Sample Output File-
Sample Response (Error)
HTTP Status Code: 200
Response Body:
If DSC is not enabled-
Authorization error-
API Validations
The file in the request should be a PDF file.
Size limit of the file should be less than 1MB.
API Constraints
This API needs to be authenticated with a valid user authentication token. If the authentication token is not present or is invalid, the API will return HTTP Status Code 401.
If the authentication token is valid, but the user does not have the authorization to download invoice with given search parameters, then the API will return an error "You don't have any data present for the selected Document Details".
You should first enable DSC setting on Clear E-Invoice Portal. Also only admin or super admin user can sign DSC.
X,Y Signature coordinates depend on the resolution of the PDF. If signature exceeds the actual page size, signature won’t be visible on the output PDF.
For landscape pdf we can use x and y as <=500 ,anything above 500 will be set to default value.
Last updated