POST /api/v2/sign/by-template — Sign by Template V2
Sign a document generated from a template. The template pre-defines signature fields and positions, streamlining the signing process for standardized documents.
Authentication
SadqAuthorize
Request Headers
- Authorization (required)
- Bearer {token}
- Content-Type (required)
- application/json
Request Body
Content-Type: application/json
- templateId (GUID, required)
- Template Id return from Sadq
- Signres (array, required)
- An array of objects representing the customer information for signing.
- templateFields (array, optional)
- Template Fields Return From Sadq
- Password (string, optional)
- Password For File
- ReferenceNumber (string, optional)
- Optional. Your own reference number. If omitted, the system generates one.
{
"templateId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"signres": [
{
"firstNameArabic": "xx",
"firstNameEnglish": "xxx",
"secondNameArabic": "xx",
"secondNameEnglish": "xx",
"familyNameArabic": "xx",
"familyNameEnglish": "xxx",
"nationalId": "1111111111",
"mobileNumber": "+962700000020",
"emailAddress": "a.@gmail.sa"
}
],
"templateFields": [
{
"fieldName": "contractDate",
"value": "2024-01-15"
}
],
"ReferenceNumber ": "sig-uuid-1234-5678-90ab",
"Password": "112233"
}Responses
HTTP 200 — Template document signed
{
"data": null,
"errorCode": 0,
"message": "Success",
"returnUrl": "/dashboard",
"stateValidationErrors": null,
"signature": ""
}HTTP 200 — Fill Data
{
"errorCode": 209,
"message": "Template With Id [ 94b22fdc-4132-4169-a4f3-5630e80755fa ] has data that needs to be filled by the recipient, so it can't be used in this model.",
"returnUrl": "/dashboard",
"stateValidationErrors": null,
"signature": ""
}