GET Get All Templates
Base URLs
Demo URL: https://demoapi.openletterconnect.com/api/v1
Production URL: https://api.openletterconnect.com/api/v1
{{base_url}}/templates?page=0&search=1&productTypes=Professional Letters,Personal Letters&creator=&pageSize=10&isShared=true&meta.account_id=aed-b3234-2234354524-2342424324
Description
This endpoint is used to retrieve a list of templates available in the system. The response will include details about each template, such as its ID, title, associated product type, and creator information. Users can filter the templates based on various parameters, including pagination, search terms, product types, and shared status. This information is useful for users looking to manage and utilize different templates for their needs.
AUTHORIZATION
Bearer Token
- Token:
{{jwt_token}}
Params
Name | Data Type | Required | Description | Value |
---|---|---|---|---|
page | integer | Yes | The current page number for pagination | 0 |
search | integer | Yes | A flag to enable search functionality | 1 |
productTypes | string | Yes | The types of products included in the query | Professional Letters, Personal Letters |
creator | string (optional) | No | The creator of the content (if applicable) | |
pageSize | integer | Yes | The number of items per page | 10 |
isShared | boolean | Yes | Indicates if the resource is shared | true |
meta.account_id | string | Yes | A unique identifier for the account | aed-b3234-2234354524-2342424324 |
Example Request
curl --location -g '{{base_url}}/templates?page=0&pageSize=10'
Example Response
{
"message": "Success",
"data": {
"count": 3,
"rows": [
{
"id": "10",
"title": "My Template 6",
"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
}
},
{
"id": "8",
"title": "My Template 3",
"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
}
},
{
"id": "6",
"title": "My Template 1",
"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
}
}
]
}
}