Requires read_script_tags access scope.
For more info, refer to:
GET https://{handle}.myshopline.com/admin/openapi/v20261201/store/:script_tag_id.json
handle : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is open001.myshopline.com , the store handle is open001 .
Query a single script tag
Path Parameters
  • script_tag_id string required
    Script id
    Example: 61a75c4e9f8c201e6e9473e0
Request Headers
  • Content-Type string required
    The field must be set to the fixed value application/json; charset=utf-8.
  • Authorization string required
    The access token for the API resource. Refer to App authorization to obtain the access token, and then pass the obtained token in the Bearer format.
    Example:
    Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA
Status Codes
For the complete list of codes and messages, see Http status code.

Response Headers
  • traceId
    A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise.
Response Body
  • script_tagobject
    object
  • updated_at string
    Date and time the script tag last updated (ISO 8601)
    Example: 2022-08-03T10:45:00+08:00
  • cache boolean
    Cache ID
  • created_at string
    Date and time the script tag created (ISO 8601)
    Example: 2022-08-03T10:45:00+08:00
  • display_scope string
    Show range , online stores should include script pages . rms : online_store ( including home page , list page , detail page , shopping cart page , search page , 404 pages , custom page , blog collection , blog ) ;Checkout ( settlement page , including settlement three steps and status page ) ; all : ( script is included on the online storefront and order status page , including the upper two ranges )
    Example: all
  • event string
    DOM event that triggers script loading. Valid values: onload
    Example: onload
  • id string
    Identify script tag's ID
    Example: 61a75c4e9f8c201e6e9473e0
  • src string
    URL of the remote script
    Example: https://djavaskripped.org/fancy.js
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20261201

ParamOptions

path required
header required

Language

curl --request GET \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20261201/store/script_tag_id.json \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json'
Examples
Query specify script tag
Response
{
"script_tag": {
"event": "onload",
"id": "64fecde8baa12e20b784ab2a",
"src": "https://js.example.com/example.js",
"updated_at": "2023-09-11T16:42:38+08:00",
"cache": false,
"created_at": "2023-09-11T16:20:56+08:00",
"display_scope": "all"
}
}
Was this article helpful to you?