Templates are pre-built extraction schemas provided by the Exelensia platform. Unlike user-created schemas, templates are read-only — you cannot create, update, or delete them. Use templates as a starting point or apply them directly when submitting documents for processing.
Returns a paginated list of all available extraction templates.
Parameter Type Required Default Description pagenumber No 1 Page number (min: 1) limitnumber No 20 Items per page (min: 1, max: 100) sort_bystring No — Field to sort by (e.g. name) sort_orderstring No descSort direction: asc or desc searchstring No — Filter by template name created_afterstring No — ISO 8601 date — return templates created after this date created_beforestring No — ISO 8601 date — return templates created before this date fieldsstring No — Comma-separated list of fields to return includestring No — Related resources to include
curl -H "x-api-key: your_api_key_here" \
"https://api.exelensia.com/v1/templates?page=1&limit=20"
{
"data" : [
{
"id" : "019760a0-0010-7000-8000-000000000010" ,
"name" : "Standard Invoice" ,
"description" : "Extract common invoice fields: number, date, vendor, total, and line items" ,
"schema" : {
"fields" : [
{ "key" : "invoice_number" , "type" : "string" , "label" : "Invoice Number" },
{ "key" : "invoice_date" , "type" : "date" , "label" : "Invoice Date" },
{ "key" : "due_date" , "type" : "date" , "label" : "Due Date" },
{ "key" : "vendor_name" , "type" : "string" , "label" : "Vendor Name" },
{ "key" : "vendor_address" , "type" : "string" , "label" : "Vendor Address" },
{ "key" : "subtotal" , "type" : "number" , "label" : "Subtotal" },
{ "key" : "tax" , "type" : "number" , "label" : "Tax Amount" },
{ "key" : "total" , "type" : "number" , "label" : "Total Amount" }
]
},
"createdAt" : "2024-01-01T00:00:00.000Z" ,
"updatedAt" : "2024-01-01T00:00:00.000Z"
},
{
"id" : "019760a0-0011-7000-8000-000000000011" ,
"name" : "Purchase Order" ,
"description" : "Extract PO number, supplier details, line items, and total" ,
"schema" : {
"fields" : [
{ "key" : "po_number" , "type" : "string" , "label" : "PO Number" },
{ "key" : "po_date" , "type" : "date" , "label" : "PO Date" },
{ "key" : "supplier_name" , "type" : "string" , "label" : "Supplier Name" },
{ "key" : "delivery_date" , "type" : "date" , "label" : "Delivery Date" },
{ "key" : "total_amount" , "type" : "number" , "label" : "Total Amount" }
]
},
"createdAt" : "2024-01-01T00:00:00.000Z" ,
"updatedAt" : "2024-01-01T00:00:00.000Z"
}
],
"meta" : {
"page" : 1 ,
"limit" : 20 ,
"total" : 2 ,
"totalPages" : 1
}
}
Status Description 200Success 401Missing or invalid authentication
Returns a single template by ID.
Parameter Type Required Description idstring Yes Template UUID
curl -H "x-api-key: your_api_key_here" \
"https://api.exelensia.com/v1/templates/019760a0-0010-7000-8000-000000000010"
{
"id" : "019760a0-0010-7000-8000-000000000010" ,
"name" : "Standard Invoice" ,
"description" : "Extract common invoice fields: number, date, vendor, total, and line items" ,
"schema" : {
"fields" : [
{ "key" : "invoice_number" , "type" : "string" , "label" : "Invoice Number" },
{ "key" : "invoice_date" , "type" : "date" , "label" : "Invoice Date" },
{ "key" : "due_date" , "type" : "date" , "label" : "Due Date" },
{ "key" : "vendor_name" , "type" : "string" , "label" : "Vendor Name" },
{ "key" : "vendor_address" , "type" : "string" , "label" : "Vendor Address" },
{ "key" : "subtotal" , "type" : "number" , "label" : "Subtotal" },
{ "key" : "tax" , "type" : "number" , "label" : "Tax Amount" },
{ "key" : "total" , "type" : "number" , "label" : "Total Amount" }
]
},
"createdAt" : "2024-01-01T00:00:00.000Z" ,
"updatedAt" : "2024-01-01T00:00:00.000Z"
}
Status Description 200Success 401Missing or invalid authentication 404Template not found