Get Script Tag

🔒

Requires read_script_tags access scope.More access scope

The Get Script Tag API retrieves details about a specific script tag by its unique ID. This API allows developers to fetch information about an existing script tag in a shop's storefront, such as its source URL, display scope, and other metadata.

This API is especially useful for:

  1. Verifying details of an existing script tag.
  2. Debugging or troubleshooting specific script tag implementations.
  3. Managing and reviewing script tags in use.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Path Parameters

ParameterTypeRequiredDescriptionExample
idstringYesUnique identifier of the script tag.f50950fa-40ec-441f-b98d-e1869050bdf2

Response Explanation

Public Response Parameters

📘

Public Response Parameters

Success Response

FieldTypeDescriptionExample
idstringUnique identifier of the script tag.f50950fa-40ec-441f-b98d-e1869050bdf2
display_scopestringWhere the script tag is applied in the storefront.index
srcstringURL of the script file.https://shoplazza.com/x.js
event_typestringTag type, typically used to identify its purpose.app
created_atstringTimestamp indicating when the script tag was created.2024-04-29T03:22:50Z
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
404Not foundScript's ID is empty or not provided"record not found"

API Structure Overview

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