Upload HTML template
This API allows you to import HTML templates created outside the environment of Yottly directly into the template store in your Yottly account.
POST
https://api.yottly.com/shop/yottly-id/upload-html-template
header: 'X-Api-Key: your-api-key'
body: {name: "template-name", kind: "kind", recommender: "recommender", template-body: "html-file"}
yottly-id
– Yottly ID of your eshopyour-api-key
– Yottly API key for your eshop (Please ask us for the API key via email)template-name
– the name of the template in Yottly. Existing template will be overwritten.html-file
– a valid *.html filekind, recommender
– one of the following combination according to the type of your email template (see details here)
Template type | kind | recommender |
Static | standard |
staticRecommender |
Personalised | standard |
productsRecommenderNoCategories |
Abandoned Cart Trigger | cart |
cart |
Shopping Intention Trigger | zsv |
zsv |
Right Before Consumption Trigger | fmcg |
fmcg |
Response
{ status: success | failure, message: string, //optional details: [ { line: int, column: int, message: string } ] //optional }
Example
jq -c -s -R '{name: "TEMPLATE_NAME", kind: "standard",
recommender: "staticRecommender", "template-body": .}' < TEMPLATE.html | \
curl -H 'X-Api-Key: YOUR_API_KEY' -d @-
https://api.yottly.com/shop/123456789/upload-html-template