put
https://{subdomain}.myshoplaza.com/openapi/2025-06/script_tags/
Updating an existing script tag in a shop's storefront.
Requireswrite_script_tagaccess 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:
- Modifying the source URL of an existing script tag
- Maintaining and managing client-side integrations
Request Parameters
Public Request Parameters
Path Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
script_tag_id | string | Yes | Unique identifier of the script tag to be updated | script_tag_123456789 |
Body Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
script_tag | object | Yes | The script tag object containing updated properties | {...} |
script_tag.src | string | Yes | URL of the script file to be injected | https://shoplazza.com/x.js |
script_tag. display_scope | string | No | Indicates where the script tag is applied (e.g., 'all', 'online_store') | index |
script_tag. event_type | string | No | Type of event that triggers the script (e.g., 'onload', 'dom_ready') | 'app' |
Response Explanation
Public Response Parameters
Successful Response
| Parameter | Type | Example | Description |
|---|---|---|---|
code | string | "200" | HTTP status code |
message | string | "Success" | Operation result message |
data.script_tag | object | - | The updated script tag object |
Script Tag Object
| Parameter | Type | Example | Description |
|---|---|---|---|
id | string | "script_tag_123456789" | Unique identifier for the script tag |
display_scope | string | "index" | Indicates where the script tag is applied |
src | string | "https://shoplazza.com/x.js" | URL of the script file |
event_type | string | "app" | The tag type, as specified during creation |
created_at | string | "2025-06-15T10:30:00Z" | Timestamp when the script tag was created (ISO 8601 format) |
updated_at | string | "2025-06-15T11:45:00Z" | Timestamp when the script tag was last updated (ISO 8601 format) |
Error Response
| Field | Type | Example | Description |
|---|---|---|---|
code | string | InvalidParameter | Error http message |
message | string | `` | Error message |
