Sign PDF API Base 64 Encoded
This API will accept base 64 encoded string as input and return the digitally signed pdf.
Request Method
POST
Request URL
{{BASE_URL}}/einv/pdf/sign/binaryRequest Headers
x-cleartax-auth-token
String
Cannot be empty
Mandatory. User auth token.
gstin
String
NA
Mandatory. This is the GSTIN of the business, as registered on ClearTax.
Request Path Params
There are no path parameters for this API.
Request Query Params
x
Integer
Number
Optional. X coordinate on pdf from top left Ex. 100 Default: 350
y
Integer
Number
Optional. Y coordinate on pdf from top left Ex. 50 Default: 750
pageList
NA
Enum - ALL
Optional. Parameter to denote if all signature needs to be placed on all pages. Ex. โALLโ Default: Signature is added on the last page of the document.
pageNumberList
String
String (comma-separated numbers)
Optional. If signature is required on specific pages, this parameter can be used. Ex. โ1,3,5โ
Request Body
base64String
String
Should be a valid base64 encoded string.
Mandatory. Base 64 encoded string of pdf file.
Response Status Codes
200
For a successful retrieval
400
If there some invalid/incorrect content in the request.
401
If the user is not authenticated for the operation
403
If the user is not authorized for the operation
Response Schema
Returns sign pdf
Sample Request & Response
Request
Response (Success)
HTTP Status Code - 200
Response (Error)
HTTP Status Code - 200
Response Body - If dsc is not enabled.
API Validations
The base 64 string in the request body should be a PDF file.
Size limit of the file is 1MB.
API Constraints
This API needs to be authenticated with a valid user authentication token. If the auth token is not present or is invalid, the API will return HTTP Status Code 401.
If the auth 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".
Users should add the dsc setting on the UI. Also only admin or super admin user can sign dsc
Max input file size supported is 1MB.
X,Y Signature coordinates depend on the resolution of the PDF. If the signature exceeds the actual page size, the signature wonโt be visible on the output PDF.
Last updated
Was this helpful?