Add JS code

Allows adding JavaScript code without hosting any external files. Technically is the same as adding JS code to the "Ecwid Control Panel > Website > Custom JavaScript code" section. The request will replace the existing JS code in the section.

Headers

NameTypeDescription
AuthorizationstringoAuth token with mandatory Bearer before it. Example: Bearer e***s0, where e***s0 should be replaced with your oAuth token.

📘

Access scope required: update_store_profile

Request

A JSON object with the following fields:

CustomCode

FieldTypeDescription
customBodyScriptCodestringCustom script code. Requires HTML script tags. Example: <script>alert(\"added from APIs\")</script>

Response

A JSON object of type 'storeID' with the following fields:

FieldTypeDescription
idnumberstore ID
Language
Authorization
Query