Get Script Tag List

🔒

Requires read_script_tags access scope.More access scope

The Get Script Tag List API retrieves a paginated list of all script tags in a shop's storefront. This API allows developers to view and manage all script tags applied to their store.

This API is especially useful for:

  1. Listing all existing script tags.
  2. Filtering script tags by specific attributes like event type.
  3. Debugging and reviewing script tag configurations.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Query Parameters

ParameterTypeRequiredDescriptionExample
pageint32NoPage number (defaults to 1).1
limitint32NoNumber of records per page (defaults to 50).50
event_typestringNoFilter by event type.myapp

Response Explanation

Public Response Parameters

📘

Public Response Parameters

Success Response

FieldTypeDescriptionExample
script_tagsarray of object
script_tags[].idstringUnique identifier of the script tag.f50950fa-40ec-441f-b98d-e1869050bdf2
script_tags[].display_scopestringWhere the script tag is applied in the storefront.index
script_tags[].srcstringURL of the script file.https://shoplazza.com/x.js
script_tags[].event_typestringTag type, typically used to identify its purpose.app
script_tags[].created_atstringTimestamp indicating when the script tag was created.2024-04-29T03:22:50Z
script_tags[].updated_atstringTimestamp indicating when the script tag was last updated.2024-04-29T03:22:50Z

Error Response

Error responses in the API can be represented using two different fields: errors and error. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.

FieldTypeExampleDescription
errorString "page not found"Indicates an error encountered during the process

Error Detail

Status CodeMessagePossible ReasonExample Response
400Bad RequestInvalid input format or request structure (e.g., missing required fields or incorrect data types).Bad Request
UnauthorizedThe request is missing valid authentication credentials or the credentials provided are invalid.Unauthorized

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!