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.

Headers

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

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
Click Try It! to start a request and see the response here!