PATCH Update Templates
Base URLs
Demo URL: https://demoapi.openletterconnect.com/api/v1
Production URL: https://api.openletterconnect.com/api/v1
{{base_url}}/templates/14
Description
This endpoint is used to update an existing template in the system. By providing the template ID and the updated details such as the template title, paths for the template and thumbnail, and any necessary fields, users can modify an existing template. The response will include a confirmation message indicating that the template was updated successfully, along with the details of the updated template.
AUTHORIZATION
Bearer Token
- Token:
{{jwt_token}}
Bode raw
{
"title": "My Template 511",
"templatePath": "s3/openletterconnect/org-1/user-1/templates/upload/json/1701792981367-template.json",
"thumbnailPath": "s3/openletterconnect/org-1/user-1/templates/upload/thumbnail/1701775937282-logo.png",
"backThumbnailPath": "s3/openletterconnect/org-1/user-1/templates/upload/thumbnail/1701775937282-logo.png",
"fields": [
{
"key": "{{CONTACTS.FIRST_NAME}}",
"value": "First Name",
"strict": false,
"defaultValue": ""
}
]
}
Example Request
curl --location -g --request PATCH '{{base_url}}/templates/9' \
--data '{
"title": "My Template 5",
"templatePath": "s3/openletterconnect/org-1/user-1/templates/upload/json/1701792981367-template.json",
"thumbnailPath": "s3/openletterconnect/org-1/user-1/templates/upload/thumbnail/1701775937282-logo.png",
"fields": [
{
"key": "{{CONTACTS.FIRST_NAME}}",
"value": "First Name",
"strict": false,
"defaultValue": ""
}
]
}'
Example Response
{
"message": "Template Updated Successfully",
"data": {
"id": "9",
"title": "My Template 5",
"templateUrl": "https://api.openletterconnect.com/api/v1/s3/openletterconnect/org-1/user-1/templates/upload/json/1701792981367-template.json",
"templateType": "json",
"thumbnailUrl": "https://api.openletterconnect.com/api/v1/s3/openletterconnect/org-1/user-1/templates/upload/thumbnail/1701775937282-logo.png",
"creator": {
"id": "2",
"fullName": "Usman Iqbal"
},
"product": {
"id": "3",
"paperType": "60# Statement",
"paperSize": "8.5x11",
"deliveryType": "First Class",
"productType": "Professional letters",
"envelopeType": "#10 Grey",
"postageType": "Live",
"name": "Professional Letters, First Class",
"meta": null
}
}
}