Template Updated (templates.updated)¶
Description¶
This event is triggered when an existing template is updated in the system. Updates may include modifications to the template's content, design, or associated metadata.
Trigger Conditions¶
This webhook is triggered whenever an existing template is updated in the system.
Purpose¶
Keeps external systems and users informed about changes to templates, ensuring that they have access to the most up-to-date versions and enabling synchronization or updates in template management systems.
Use Case¶
- Template management systems can fetch updated templates to ensure users have access to the latest versions.
- Synchronize with external tools or services that rely on template data for automated workflows.
Example Payload¶
{
"event": "templates.updated",
"data": {
"id": "22",
"title": "Updated Invoice Template",
"templateUrl": "http://lapi.openletterconnect.com/api/v1/download/s3/openletterconnect/org-1/user-3/templates/upload/html/1702895166930-template.json",
"backTemplateUrl": "http://api.openletterconnect.com/api/v1/download/s3/openletterconnect/org-2/user-3/templates/upload/backHtml/1702379710452-back-template.json",
"thumbnailUrl": "http://api.openletterconnect.com/api/v1/download/s3/openletterconnect/org-1/user-1/templates/upload/thumbnail/1701775937282-logo.png",
"metaData": {
"account_id": "123-1234-12342355-12323534634"
},
"templatePath": "s3/openletterconnect/org-1/user-3/templates/upload/html/1702895166930-template.json",
"backTemplatePath": "s3/openletterconnect/org-1/user-3/templates/upload/html/1702895166930-template.json",
"thumbnailPath": "s3/openletterconnect/org-1/user-3/templates/upload/html/1702895166930-template.png",
"backThumbnailPath": "s3/openletterconnect/org-1/user-3/templates/upload/html/1702895166930-template.png",
"productId": 1,
"envelopeType": null,
"fields": [],
"createdAt": "2024-01-10T15:06:29.204Z",
"updatedAt": "2024-01-10T15:06:29.204Z"
},
"token": "YOUR_WEBHOOK_SECRET_KEY"
}
Parameters:¶
event
(String): The type of event that triggered the webhook.-
data
(Object): Contains information about the updated template.id
(String): Unique identifier for the template.title
(String): The title of the template, providing a descriptive name for easy identification.templateUrl
(String): URL for accessing the HTML version of the template.backTemplateUrl
(String): URL for accessing the back version of the template.thumbnailUrl
(String): URL for the thumbnail image representing the template.metaData
(Object): Metadata associated with the template, containing additional details relevant to its usage.account_id
(String): Unique identifier for the account associated with this template.templatePath
(String): Storage path for the HTML file of the template in an S3 bucket or similar storage system.backTemplatePath
(String): Storage path for the back version of the template in an S3 bucket or similar storage system.thumbnailPath
(String): Storage path for the thumbnail image in an S3 bucket or similar storage system.backThumbnailPath
(String): Storage path for a thumbnail image of the back version of the template in an S3 bucket or similar storage system.productId
(Integer): Identifier for the product associated with this template.envelopeType
(String or null):Type of envelope associated with this template, if applicable. If not relevant, it may be set to null.fields
(Array):An array that can hold various dynamic fields related to this template. Currently empty, indicating no dynamic fields are defined.createdAt
(Timestamp): Date and time when the order was created.updatedAt
(Timestamp): Date and time when the order was last updated.
-
token
(String): Your secret webhook token.
Conclusion¶
The templates.updated webhook provides vital information about changes made to existing templates within Open Letter Connect, allowing external systems to respond effectively. By following best practices regarding security, error handling, and testing, you can ensure a smooth integration experience.