Skip to content

Inserting and editing codes

Request

This adds new or changes the current (if exists) HTML code. It is possible to enter 1-3 changes at a time (typically

3 possible locations). If the value already exists, it is simply overwritten. The limit for HTML code is 8192 characters. In case that any

of the requirements fail, the detailed information is returned in theerrors field.

Security
shoptetAccessToken or shoptetPrivateApiToken
Headers
Content-Typestringrequired
Default:"application/json"
Bodyapplication/json
dataobjectrequired
curl -i -X POST \
  https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/template-include \
  -H 'Content-Type: application/json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "snippets": [
        {
          "location": "common-header",
          "html": "<p>My custom HTML</p>"
        }
      ]
    }
  }'

Responses

OK

Bodyapplication/json
dataobjectrequired
errorsArray of objects or null(Errors)required
metadataobject(Metadata)required
Response
{ "data": { "snippets": [] }, "errors": [ {} ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }