Skip to main content

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 NameValueDescription
dealerUUIDstringUnique identifier for the dealer for which the templates need to be retrieved
templateTypestringTemplate 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

FieldTypeDescription
statusCodeintegerHTTP status code (200 for success)
errorobjectError details if the request failed
warningsarrayWarning messages if any
templateTypeListarrayList of template objects

Template Object Fields

FieldTypeDescription
uuidstringUnique identifier of the template (required for updating templates)
dealerUUIDstringUnique identifier of the dealer
taskTypeUUIDstringUnique identifier of the task type
typestringType of template: EMAIL or TEXT
isDefaultbooleanWhether this is the default template for the task type
multibooleanAlways false
titlestringTitle of the template
messagestringMain body of the template
localestringLocale of the template (en-us or fr-ca)
isFreemarkerTemplatebooleanWhether the template uses Freemarker syntax