Upload HTML template

This API allows you to import HTML templates created outside the environment of Samba directly into the template store in your Samba account.
 

POST
https://api.samba.com/shop/samba-id/upload-html-template
header: 'X-Api-Key: your-api-key'
body: {name: "template-name", kind: "kind", recommender: "recommender", template-body: "html-file"}

  • samba-id – Samba ID of your eshop
  • your-api-key – Samba API key for your eshop (Please ask us for the API key via email)
  • template-name – the name of the template in Samba. Existing template will be overwritten.
  • html-file – a valid *.html file
  • kindrecommender – 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.samba.com/shop/123456789/upload-html-template

 

Based on your account it might be required to use “https://api.yottly.com” as an endpoint. For further info please contact our support.

This post is also available in: Čeština (Czech)

Updated on August 10, 2020

Was this article helpful?

Related Articles