# Template Details Get details about a template by `id`. Details include: - Basic template information (name, author, etc) - Roles - All fields with values - All tokens with values - Pricing information (pricing tables, products, quotes) - Template metadata - Template tags - Content placeholders - Modification timestamps. Note that `date_modified` means any changes associated with the template roles, while `content_date_modified` logs any changes in the template content. Get details about a template by `id`. Details include: * Basic template information (name, author, etc) * Roles * All fields with values * All tokens with values * Pricing information (pricing tables, products, quotes) * Template metadata * Template tags * Content placeholders * Modification timestamps. Note that `date_modified` means any changes associated with the template roles, while `content_date_modified` logs any changes in the template content. # OpenAPI definition ```json { "openapi": "3.0.3", "info": { "title": "PandaDoc Public API", "description": "PandaDoc API spans a broad range of functionality to help you build incredible documents automation experiences inside your product.\n\nPandaDoc API is organized around REST. Our API has predictable resource-oriented URLs and uses standard HTTP response codes, authentication, and verbs.\n\n## Getting started\n\nYou can start testing PandaDoc API with a sandbox key on our [Enterprise](https://www.pandadoc.com/pricing/) plan, either active or in trial.\n\nGenerate your [sandbox key](https://developers.pandadoc.com/reference/sandbox-key) on the Developer Dashboard with predefined [rate limits](https://developers.pandadoc.com/reference/limits). Or contact our solutions expert if you work with high-transaction volumes.\n\n## Guides\n\nIf you’re just getting started with PandaDoc, you may want to jump straight into one of our [getting started guides](https://developers.pandadoc.com/docs/getting-started) for the feature you’re most interested in, whether that’s:\n\n- [Create from template](https://developers.pandadoc.com/docs/create-send-document),\n- [Upload and send a local PDF](https://developers.pandadoc.com/docs/upload-and-send-a-local-pdf),\n- or [Listening for changes in document status](https://developers.pandadoc.com/docs/listen-document-status-changes).\n\nWe also recommend you to discover our dynamic content generation on a fly: [Create from a template with content placeholder](https://developers.pandadoc.com/docs/create-with-content-placeholders-from-template).\n", "termsOfService": "https://www.pandadoc.com/master-services-agreement/", "contact": { "name": "PandaDoc API Support", "url": "https://developers.pandadoc.com/", "email": "api-track@pandadoc.com" }, "license": { "name": "MIT", "url": "https://github.com/PandaDoc/pandadoc-openapi-specification/blob/main/LICENSE" }, "version": "7.18.2" }, "servers": [ { "url": "https://api.pandadoc.com", "description": "Public API" } ], "security": [ { "apiKey": [] }, { "oauth2": [] } ], "tags": [ { "name": "Templates", "description": "Operations for managing templates, including listing, creating, and deleting templates." } ], "paths": { "/public/v1/templates/{id}/details": { "get": { "summary": "Template Details", "description": "Get details about a template by `id`. Details include:\n\n- Basic template information (name, author, etc)\n- Roles\n- All fields with values\n- All tokens with values\n- Pricing information (pricing tables, products, quotes)\n- Template metadata\n- Template tags\n- Content placeholders\n- Modification timestamps. Note that `date_modified` means any changes associated with the template roles, while `content_date_modified` logs any changes in the template content.\n", "operationId": "detailsTemplate", "tags": [ "Templates" ], "parameters": [ { "examples": { "Template Details": { "value": "vibuun3DXG8QDDLfXm27Ne" }, "Default": { "value": "iMymdDd9XFD3HyxP5VD67Q" } }, "name": "id", "description": "Template ID", "in": "path", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplateDetailsResponse" }, "examples": { "Template Details": { "value": { "id": "vibuun3DXG8QDDLfXm27Ne", "name": "New template", "date_created": "2024-07-15T17:44:07.524617Z", "date_modified": "2024-07-15T17:44:07.613821Z", "content_date_modified": "2024-07-15T17:44:08.685118Z", "created_by": { "id": "FA5QAu8UGA3oVDQZuPL75B", "email": "siarhei.soroka@pandadoc.com", "first_name": "Siarhei", "last_name": "Soroka", "avatar": null, "membership_id": "RyMNXBjBPRppw56TfYBrXi" }, "metadata": {}, "tokens": [], "fields": [], "pricing": {}, "tags": [], "roles": [ { "id": "UDhBsFhy4857fsdBJ11FuL", "name": "Client", "signing_order": null, "preassigned_person": { "email": "john@example.com", "first_name": "John", "last_name": "Doe", "type": "preassigned contact", "placeholder_name": null, "placeholder_source": null } }, { "id": "2mN5HBcG8JdKpQwXrLfYvT", "name": "Manager", "signing_order": "1", "preassigned_person": { "email": null, "type": "preassigned contact group", "placeholder_name": null, "placeholder_source": null, "members": [ { "email": "alice@example.com", "first_name": "Alice", "last_name": "Johnson" }, { "email": "bob@example.com", "first_name": "Bob", "last_name": "Smith" } ] } } ], "version": "2", "content_placeholders": [], "tables": [ { "name": "Table_1" } ], "images": [] } } } } } }, "401": { "$ref": "#/components/responses/401" }, "403": { "$ref": "#/components/responses/403" }, "404": { "$ref": "#/components/responses/404" }, "429": { "$ref": "#/components/responses/429" } } } } }, "components": { "securitySchemes": { "apiKey": { "type": "apiKey", "name": "Authorization", "in": "header", "description": "The `Authorization` header must contain the API key. The value should be prefixed with `API-Key` followed by a space and the actual API key.\n", "x-default": "API-Key 3039ba033eb1410caa0a2227158d63c9d6502cd8" }, "oauth2": { "type": "oauth2", "flows": { "authorizationCode": { "authorizationUrl": "https://app.pandadoc.com/oauth2/authorize", "tokenUrl": "https://api.pandadoc.com/oauth2/access_token", "refreshUrl": "https://api.pandadoc.com/oauth2/access_token", "scopes": { "read+write": "Use `read+write` to create, send, delete, and download documents, and `read` to view templates and document details." } } }, "description": "Send the authenticating user to the PandaDoc OAuth2 request URL. We recommend a button or a link titled\n\"Connect to PandaDoc\" if you are connecting users from a custom application. Users will see the \"Authorize Application\" screen.\nWhen the user clicks \"Authorize\", PandaDoc redirects the user back to your site with an authorization code inside the URL.\n\nhttps://app.pandadoc.com/oauth2/authorize?client_id={client_id}&redirect_uri={redirect_uri}&scope=read+write&response_type=code\n\n`client_id` and `redirect_uri` values should match your application settings.\n" } }, "schemas": { "PricingTableResponse": { "type": "object", "properties": { "name": { "type": "string", "example": "Pricing Table" }, "id": { "type": "string", "example": "065c5cbc-a065-4843-ba17-028e63779605" }, "total": { "type": "string", "example": "11500" }, "is_included_in_total": { "type": "boolean" }, "summary": { "type": "object", "nullable": true, "properties": { "subtotal": { "type": "string", "example": "11500", "nullable": true }, "total": { "type": "string", "example": "11500", "nullable": true }, "discount": { "type": "string", "example": "0", "nullable": true }, "tax": { "type": "string", "example": "0", "nullable": true }, "fee": { "type": "string", "example": "0", "nullable": true } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "nullable": true }, "sku": { "type": "string", "nullable": true }, "qty": { "type": "string", "nullable": true, "example": "10" }, "name": { "type": "string", "nullable": true, "example": "Annual license" }, "cost": { "type": "string", "nullable": true }, "price": { "type": "string", "nullable": true, "example": "100" }, "description": { "type": "string", "nullable": true, "example": "1 year subscription" }, "custom_fields": { "type": "object", "nullable": true, "example": {} }, "custom_columns": { "type": "object", "nullable": true, "example": { "Images": "", "Cost": "", "Subtotal": "" } }, "discount": { "type": "object", "nullable": true, "properties": { "value": { "type": "string", "nullable": true }, "type": { "type": "string", "nullable": true } } }, "tax_first": { "type": "object", "nullable": true, "properties": { "value": { "type": "string", "nullable": true }, "type": { "type": "string", "nullable": true } } }, "tax_second": { "type": "object", "nullable": true, "properties": { "value": { "type": "string", "nullable": true }, "type": { "type": "string", "nullable": true } } }, "subtotal": { "type": "string", "nullable": true, "example": "10000" }, "options": { "type": "object", "nullable": true, "example": {}, "properties": { "optional": { "type": "boolean", "nullable": true }, "optional_selected": { "type": "boolean", "nullable": true }, "multichoice_enabled": { "type": "boolean", "nullable": true }, "multichoice_selected": { "type": "boolean", "nullable": true } } }, "sale_price": { "type": "string", "nullable": true, "example": "1000" }, "taxes": { "type": "object", "nullable": true, "example": {} }, "discounts": { "type": "object", "nullable": true, "example": {} }, "fees": { "type": "object", "nullable": true, "example": {} }, "merged_data": { "type": "object", "nullable": true, "description": "Contains all fields in a flat structure with external field names defined in the template.", "example": { "custom_name": "SomeName", "custom_description": "SomeCustomDescription", "custom_price": "10.99", "custom_qty": "1.00", "custom_sku": "Test", "custom_tax": { "value": "10", "type": "percent" }, "custom_fee": { "value": "10", "type": "percent" }, "custom_discount": { "value": "10", "type": "percent" }, "custom_text": "Some other", "Cost": null, "Subtotal": "26.38", "fluffiness": "Fluffiness", "Other_field": "SomeText" } } } } }, "currency": { "type": "string", "example": "USD" } } }, "QuoteSectionSettings": { "type": "object", "properties": { "optional": { "type": "boolean" }, "selected": { "type": "boolean" }, "selection_type": { "type": "string", "enum": [ "custom", "single", "multiple" ] } } }, "QuoteResponse": { "type": "object", "properties": { "id": { "type": "string", "example": "4b011d86-286b-4f86-b697-90a6ad3f1489" }, "currency": { "type": "string", "example": "USD" }, "total": { "type": "string", "example": "900" }, "summary": { "type": "object", "title": "QuoteResponseSummary", "properties": { "total": { "type": "string", "example": "900" }, "subtotal": { "type": "string", "example": "1000", "nullable": true }, "one_time_subtotal": { "type": "string", "example": "500", "nullable": true }, "recurring_subtotal": { "type": "array", "items": { "type": "object", "properties": { "billing_cycle": { "type": "string", "example": "monthly" }, "value": { "type": "string", "example": "500" } } }, "nullable": true }, "total_qty": { "type": "string", "nullable": true }, "discounts": { "type": "object", "nullable": true, "additionalProperties": { "type": "object", "properties": { "type": { "type": "string", "nullable": true }, "value": { "type": "string", "nullable": true } } } }, "taxes": { "type": "object", "nullable": true }, "fees": { "type": "object", "nullable": true }, "custom_fields": { "type": "object", "nullable": true, "additionalProperties": { "type": "string" } }, "total_discount": { "type": "string", "example": "100", "nullable": true }, "total_tax": { "type": "string", "nullable": true }, "total_fee": { "type": "string", "nullable": true }, "total_savings": { "type": "string", "nullable": true }, "total_contract_value": { "type": "string", "example": "1900", "nullable": true } } }, "sections": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "summary": { "type": "object", "title": "QuoteResponseSectionSummary", "properties": { "total": { "type": "string", "example": "1000" }, "subtotal": { "type": "string", "example": "1000", "nullable": true }, "one_time_subtotal": { "type": "string", "example": "500", "nullable": true }, "recurring_subtotal": { "type": "array", "items": { "type": "object", "properties": { "billing_cycle": { "type": "string", "example": "monthly" }, "value": { "type": "string", "example": "500" } } }, "nullable": true }, "total_qty": { "type": "string", "nullable": true }, "discounts": { "type": "object", "nullable": true }, "taxes": { "type": "object", "nullable": true }, "fees": { "type": "object", "nullable": true }, "custom_fields": { "type": "object", "nullable": true, "additionalProperties": { "type": "string" } }, "total_section_value": { "type": "string", "example": "1900", "nullable": true } } }, "columns": { "type": "array", "items": { "type": "object", "title": "QuoteResponseSectionColumn", "properties": { "header": { "type": "string", "nullable": true }, "name": { "type": "string" }, "merge_name": { "type": "string", "nullable": true }, "hidden": { "type": "string" } } } }, "items": { "type": "array", "items": { "type": "object", "title": "QuoteResponseSectionItem", "properties": { "id": { "type": "string", "nullable": true }, "sku": { "type": "string", "nullable": true }, "name": { "type": "string", "nullable": true }, "description": { "type": "string", "nullable": true }, "qty": { "type": "string", "nullable": true, "example": "1" }, "price": { "type": "string", "nullable": true, "example": "500" }, "cost": { "type": "string", "nullable": true }, "billing_frequency": { "type": "string", "nullable": true }, "contract_term": { "type": "string", "nullable": true }, "pricing_method": { "type": "string", "nullable": true }, "type": { "type": "string", "nullable": true }, "reference_type": { "type": "string", "nullable": true }, "options": { "type": "object", "nullable": true, "properties": { "selected": { "type": "boolean", "nullable": true }, "qty_editable": { "type": "boolean", "nullable": true } } }, "custom_columns": { "type": "object", "nullable": true, "additionalProperties": { "type": "string" } }, "external_columns": { "type": "object", "nullable": false, "additionalProperties": { "type": "string" } }, "discounts": { "type": "object", "nullable": true, "additionalProperties": { "type": "object", "properties": { "type": { "type": "string", "nullable": true }, "value": { "type": "string", "nullable": true } } } }, "taxes": { "type": "object", "nullable": true, "additionalProperties": { "type": "object", "properties": { "type": { "type": "string", "nullable": true }, "value": { "type": "string", "nullable": true } } } }, "fees": { "type": "object", "nullable": true, "additionalProperties": { "type": "object", "properties": { "type": { "type": "string", "nullable": true }, "value": { "type": "string", "nullable": true } } } }, "multipliers": { "type": "object", "nullable": true, "additionalProperties": { "type": "string" } }, "total": { "type": "string", "nullable": true }, "overall_total": { "type": "string", "example": "1000", "nullable": true } } }, "nullable": true }, "total": { "type": "string", "example": "1000" }, "settings": { "$ref": "#/components/schemas/QuoteSectionSettings" } }, "nullable": true } }, "merge_rules": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "enabled": { "type": "boolean" }, "action": { "type": "object", "properties": { "type": { "type": "string" }, "section_id": { "type": "string" } } }, "condition": { "type": "object", "properties": { "field_name": { "type": "string" }, "type": { "type": "string" }, "comparison": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string" }, "value": { "type": "string" } } } } } } } } }, "settings": { "type": "object", "properties": { "selection_type": { "type": "string", "enum": [ "custom", "single", "multiple" ] } } } } }, "PricingResponse": { "type": "object", "properties": { "tables": { "type": "array", "items": { "$ref": "#/components/schemas/PricingTableResponse" } }, "quotes": { "type": "array", "items": { "$ref": "#/components/schemas/QuoteResponse" } }, "total": { "type": "string", "example": "11500" } } }, "TemplateDetailsResponse": { "type": "object", "properties": { "id": { "type": "string", "example": "SkXXMTBsLB5TLPagPTm5yC" }, "name": { "type": "string", "example": "API Sample Document from PandaDoc Template" }, "folder_uuid": { "type": "string", "example": "b6RGTSGwJw838L2KZqckpD" }, "date_created": { "type": "string", "example": "2021-03-10T07:28:47.440256Z" }, "date_modified": { "type": "string", "example": "2021-03-10T07:28:47.442256Z" }, "content_date_modified": { "type": "string", "example": "2021-10-23T21:07:04.147345Z" }, "created_by": { "type": "object", "properties": { "id": { "type": "string", "example": "b6RGTSGwJw838L2KZqckpD" }, "email": { "type": "string", "example": "jane@example.com" }, "first_name": { "type": "string", "example": "Jane" }, "last_name": { "type": "string", "example": "Roe" }, "avatar": { "type": "string", "nullable": true, "example": "https://pd-live-media.s3.amazonaws.com/users/000GTSGwJw000L2KZqc000/avatar.jpg" } } }, "metadata": { "type": "object", "example": { "public_template": true } }, "tokens": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "example": "Document.Value" }, "value": { "type": "string" } } } }, "fields": { "type": "array", "items": { "type": "object" }, "example": [ { "uuid": "74bcb05d-e4cd-458d-bc1d-671c2be8b221", "name": "Favorite.Color", "title": "", "placeholder": "Favorite Color", "value": "", "assigned_to": { "id": "HHaFsYvJCqMvdAtXwGcyL", "name": "user", "preassigned_person": { "email": "test@panddoc.com", "type": "preassigned contact" }, "type": "role" }, "merge_field": "Favorite.Color", "field_id": "text1", "type": "text" } ] }, "pricing": { "$ref": "#/components/schemas/PricingResponse" }, "tags": { "type": "array", "items": { "type": "string" }, "example": [ "tpl-tag-one", "tpl-tag-two" ] }, "roles": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "example": "HHaFsYvJCqMvdAtXwGcyLn" }, "name": { "type": "string", "example": "Sender" }, "signing_order": { "type": "string", "nullable": true }, "preassigned_person": { "type": "object", "nullable": true, "properties": { "email": { "type": "string", "nullable": true, "example": "jane@example.com" }, "first_name": { "type": "string", "nullable": true, "example": "Jane" }, "last_name": { "type": "string", "nullable": true, "example": "Doe" }, "type": { "type": "string", "example": "preassigned contact" }, "placeholder_name": { "type": "string", "nullable": true, "example": "Employee" }, "placeholder_source": { "type": "string", "nullable": true, "example": "bamboohr" }, "members": { "type": "array", "description": "List of contacts in the group. Only present for type \"preassigned contact group\".", "items": { "type": "object", "properties": { "email": { "type": "string", "nullable": true, "example": "alice@example.com" }, "first_name": { "type": "string", "nullable": true, "example": "Alice" }, "last_name": { "type": "string", "nullable": true, "example": "Johnson" } } } } } } } } }, "version": { "type": "string", "example": "2" }, "content_placeholders": { "type": "array", "items": { "type": "object", "properties": { "uuid": { "type": "string", "example": "305eca46-f5be-435b-bbb4-f4dacf3896f5" }, "block_id": { "type": "string", "example": "Content Placeholder" }, "description": { "type": "string", "example": "lick here to add content library items" } } } }, "tables": { "type": "array", "description": "Document tables.", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "Table name." } } } }, "images": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "nullable": true, "example": "image" }, "block_uuid": { "type": "string", "example": "c0096462-7899-4ae8-b92e-a5643e6a0223" }, "urls": { "type": "array", "items": { "type": "string", "example": "https://api.pandadoc.com/images/Pf7QMxFzcCkMSVXnCZfwcJ/2e6131b32d6949e4a093c36bafccd194" } } } } } } } }, "responses": { "401": { "description": "Authentication error", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "example": "authentication_error" }, "detail": { "type": "string", "example": "Authentication credentials were not provided." } } } } } }, "403": { "description": "Permission error", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "example": "permission_error" }, "detail": { "type": "string", "example": "You do not have permission to perform this action." }, "info_message": { "type": "string", "description": "Human-readable explanation of the permission error.", "example": "You are not allowed to send documents outside of your organization" }, "links": { "type": "array", "description": "Optional links related to the error (e.g. a status endpoint).", "items": { "type": "object", "properties": { "rel": { "type": "string", "example": "status" }, "href": { "type": "string", "example": "https://api.pandadoc.com/public/v1/documents/RsXrKarV524iCpjci9CMGa" }, "type": { "type": "string", "example": "POST" } } } } } } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "example": "request_error" }, "detail": { "type": "string", "example": "Not found" } } } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "example": "throttled" }, "detail": { "type": "string", "example": "Request was throttled." } } } } } } } } } ```