How to get templates for a dealer
This endpoint allows you to retrieve all templates of a specific type (EMAIL or TEXT) for a dealer.
To use this endpoint, you first need your credentials. If you don't already have one, please head over to the Authentication and Authorization page to see how you can request for credentials from us.
Request
HTTP request
GET https://api.mykaarma.com/leads/followup/dealer/{dealerUUID}/templatetype/{templateType}/list
Parameters
Required path parameters:
| Parameter Name | Value | Description |
|---|---|---|
dealerUUID | string | Unique identifier for the dealer for which the templates need to be retrieved |
templateType | string | Template type that needs to be fetched. Only TEXT or EMAIL are supported |
Authorization
This request requires authorization. Include your credentials in the authorization header.
Sample Request
curl --location --request GET 'https://api.mykaarma.com/leads/followup/dealer/{dealerUUID}/templatetype/EMAIL/list' \
--header 'accept: application/json' \
--header 'authorization: <your-credentials>' \
--header 'Content-Type: application/json'
Response
{
"statusCode": 200,
"error": null,
"warnings": null,
"templateTypeList": [
{
"uuid": "template-uuid-1",
"dealerUUID": "dealer-uuid",
"taskTypeUUID": "task-type-uuid",
"type": "EMAIL",
"isDefault": true,
"multi": false,
"title": "Follow-up for Declined Service",
"message": "Dear ${customerName}, we noticed you declined some service recommendations.",
"locale": "en-us",
"isFreemarkerTemplate": true
},
{
"uuid": "template-uuid-2",
"dealerUUID": "dealer-uuid",
"taskTypeUUID": "task-type-uuid-2",
"type": "EMAIL",
"isDefault": false,
"multi": false,
"title": "No Show Follow-up",
"message": "We missed you at your appointment. Please reschedule.",
"locale": "en-us",
"isFreemarkerTemplate": false
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
statusCode | integer | HTTP status code (200 for success) |
error | object | Error details if the request failed |
warnings | array | Warning messages if any |
templateTypeList | array | List of template objects |
Template Object Fields
| Field | Type | Description |
|---|---|---|
uuid | string | Unique identifier of the template (required for updating templates) |
dealerUUID | string | Unique identifier of the dealer |
taskTypeUUID | string | Unique identifier of the task type |
type | string | Type of template: EMAIL or TEXT |
isDefault | boolean | Whether this is the default template for the task type |
multi | boolean | Always false |
title | string | Title of the template |
message | string | Main body of the template |
locale | string | Locale of the template (en-us or fr-ca) |
isFreemarkerTemplate | boolean | Whether the template uses Freemarker syntax |