Template API

Current version: v1.1 Release Candidate

List shop snippet

GET
/template/js.json
						
[
  {
    "content": "(function(d, s, id) {
                var js, fjs = d.getElementsByTagName(s)[0];
                if (d.getElementById(id)) return;
                js = d.createElement(s); js.id = id;
                js.src = \"//connect.facebook.net/it_IT/sdk.js#xfbml=1&version=v2.5\";
                fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));",
    "name": "Facebook Like Loader",
    "id": "56d7093d16f46a7f5a9bd2a3"
  }
]
						
					

Create new shop snippet

POST
/template/js.json
PARAMETERS LIST
name required (string) Name of your asset
content required (string) Your script content, will be surrounded with "script" tag
embed (int) Surround script with script tag (0) or not (1)
						
{
  "script_id": "56d7093d16f46a7f5a9bd2a3"
}
						
					

Remove shop snippet

DELETE
/template/js.json
PARAMETERS LIST
id required (StoredenId) Your snippet id.
This action delete permanently the snippet and is not possible to recover data.
						
{
	"ok": 1,
	"err": null
}