Get Template by ID
This service allows you to retrieve the complete details of a specific template using its id.
It is useful for querying the configuration, fields, signature profiles, and metadata of a template before using it in signature processes or modifications.
GET /template?id={templateId}
Authentication
Include your public key in the Authorization header.
Authorization: puk_xxx...
Request Parameters
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Required | Unique template identifier |
Request Examples
- curl
- Python
- Node.js
curl -X GET "https://dev.auco.ai/v1.5/ext/template?id=template_id" \
-H "Authorization: your_public_key"
import requests
def get_template(template_id):
"""
Retrieves the details of a specific template
Args:
template_id (str): ID of the template to retrieve
"""
url = "https://dev.auco.ai/v1.5/ext/template"
params = {
"id": template_id
}
headers = {
"Authorization": "your_public_key"
}
try:
response = requests.get(url, params=params, headers=headers)
response.raise_for_status()
data = response.json()
print(f"Template retrieved: {data['name']}")
print(f"Status: {data['status']}")
print(f"Fields: {len(data['config'])}")
return data
except requests.exceptions.RequestException as error:
detail = (
error.response.json()
if hasattr(error, "response") and error.response is not None
else error
)
print(f"Error retrieving template: {detail}")
if __name__ == "__main__":
# Replace with your template_id
get_template("template_id")
const axios = require('axios');
/**
* Retrieves the details of a specific template
* @param {string} templateId - ID of the template to retrieve
*/
async function getTemplate(templateId) {
try {
const response = await axios.get(
'https://dev.auco.ai/v1.5/ext/template',
{
params: {
id: templateId,
},
headers: {
Authorization: 'your_public_key',
},
}
);
const data = response.data;
console.log(`Template retrieved: ${data.name}`);
console.log(`Status: ${data.status}`);
console.log(`Fields: ${data.config.length}`);
return data;
} catch (error) {
console.error(
'Error retrieving template:',
error.response?.data || error.message
);
}
}
// Replace with your template_id
getTemplate('template_id');
Response Example
{
"id": "template_id",
"name": "Test document variable modification",
"created_at": "2025-11-26T20:48:00.000Z",
"updated_at": "2025-11-26T20:48:00.000Z",
"status": "active",
"config": [
{
"name": "name_cliente",
"type": "name",
"description": "Enter the customer name"
},
{
"description": "Select the document type for the customer",
"name": "document_type_cliente",
"type": "clausula",
"value": "cc",
"options": [
{
"name": "Citizenship Card",
"value": "cc"
},
{
"name": "Foreign ID Card",
"value": "ce"
}
]
},
{
"description": "Enter the citizenship card number for the customer",
"name": "cedula_cliente",
"type": "number",
"prereq": [
{
"k": "document_type_cliente",
"v": "cc"
}
]
},
{
"description": "Enter the foreign ID card number for the customer",
"name": "cedulae_cliente",
"type": "number",
"prereq": [
{
"k": "document_type_cliente",
"v": "ce"
}
]
},
{
"name": "email_cliente",
"type": "email",
"description": "Enter the customer email"
},
{
"name": "phone_cliente",
"type": "phone",
"description": "Enter the customer phone number"
}
],
"sign": [
"name_cliente",
"cedula_cliente",
"cedulae_cliente",
"email_cliente",
"phone_cliente"
],
"signatureProfile": [
{
"email": "email_cliente",
"phone": "phone_cliente",
"identification": "cedula_cliente|cedulae_cliente",
"name": "name_cliente",
"type": "cliente"
}
],
"preBuild": false
}
Response Properties
| Property | Type | Description |
|---|---|---|
id | string | Unique template identifier |
name | string | Template name |
status | string | Template status (active, inactive) |
created_at | string (ISO 8601) | Creation date |
updated_at | string (ISO 8601) | Last update date |
config | array | Array of template questions/fields |
config[].name | string | Unique field identifier |
config[].type | string | Question type (text, name, email, etc.) |
config[].description | string | Text displayed to the user |
config[].value | string | Default value (optional) |
config[].options | array | Available options for clausula/select fields |
config[].prereq | array | Conditions to display the field (optional) |
sign | array | Names of required questions |
signatureProfile | array | Signer configuration |
signatureProfile[].name | string | Field with the signer's name |
signatureProfile[].identification | string | Identification field(s) (separated by |) |
signatureProfile[].email | string | Field with the signer's email |
signatureProfile[].phone | string | Field with the signer's phone |
signatureProfile[].type | string | Signature identifier (e.g.: cliente, vendedor) |
preBuild | boolean | Whether the template includes automatic pre-filling |
Error Codes
| Code | Description |
|---|---|
400 | Invalid request (missing id parameter) |
401 | Unauthorized (invalid or missing key) |
404 | Template not found |
500 | Internal server error |