Update Script Tag

Updating an existing script tag in a shop's storefront.

🔒

Requires write_script_tag access scope. More access scope

This Update Script Tag API endpoint allows developers to update an existing script tag in a Shoplazza store's storefront.

This API is especially useful for:

  1. Modifying the source URL of an existing script tag
  2. Maintaining and managing client-side integrations

Request Parameters

Public Request Parameters

📘

Path Parameters

ParameterTypeRequiredDescriptionExample
script_tag_idstringYesUnique identifier of the script tag to be updatedscript_tag_123456789

Body Parameters

ParameterTypeRequiredDescriptionExample
script_tagobjectYesThe script tag object containing updated properties{...}
script_tag.srcstringYesURL of the script file to be injectedhttps://shoplazza.com/x.js
script_tag. display_scopestringNoIndicates where the script tag is applied (e.g., 'all', 'online_store')index
script_tag. event_typestringNoType of event that triggers the script (e.g., 'onload', 'dom_ready')'app'

Response Explanation

Public Response Parameters

📘

Successful Response

ParameterTypeExampleDescription
codestring"200"HTTP status code
messagestring"Success"Operation result message
data.script_tagobject-The updated script tag object

Script Tag Object

ParameterTypeExampleDescription
idstring"script_tag_123456789"Unique identifier for the script tag
display_scopestring"index"Indicates where the script tag is applied
srcstring"https://shoplazza.com/x.js"URL of the script file
event_typestring"app"The tag type, as specified during creation
created_atstring"2025-06-15T10:30:00Z"Timestamp when the script tag was created (ISO 8601 format)
updated_atstring"2025-06-15T11:45:00Z"Timestamp when the script tag was last updated (ISO 8601 format)

Error Response

FieldTypeExampleDescription
codestringInvalidParameterError http message
messagestring``Error message
Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!