版本:202201
创建Script Tag
POST/openapi/2022-01/script_tags_new
请求
- application/json
- 请求体
- 示例
请求体
srcstring必填
Script file url, for example: https://www.shoplazza.com/x.js
display_scopestring必填
Display scope, for example: index
event_typestring
Tag type, for example: myapp
默认值:
app{
"src": "string",
"display_scope": "string",
"event_type": "app"
}
响应
- 200
- 422
200
- application/json
- 数据结构
- 示例
- Result
数据结构
script_tag object
idstring
示例:
f50950fa-40ec-441f-b98d-e1869050dbf2display_scopestring
示例:
allevent_typestring
示例:
appsrcstring
示例:
https://shoplazza.com/x.jscreated_atstring
示例:
2024-04-29T03:22:50Zupdated_atstring
示例:
2024-04-29T03:22:50Z{
"script_tag": {
"id": "f50950fa-40ec-441f-b98d-e1869050dbf2",
"display_scope": "all",
"event_type": "app",
"src": "https://shoplazza.com/x.js",
"created_at": "2024-04-29T03:22:50Z",
"updated_at": "2024-04-29T03:22:50Z"
}
}
{
"script_tag": {
"id": "f50950fa-40ec-441f-b98d-e1869050dbf2",
"display_scope": "all",
"event_type": "app",
"src": "https://shoplazza.com/x.js",
"created_at": "2024-04-29T03:22:50Z",
"updated_at": "2024-04-29T03:22:50Z"
}
}
422
- application/json
- 数据结构
- 示例
- Result
数据结构
errorsstring[]
{
"errors": [
"display_scope can't contain [all|checkout|thank_you]"
]
}
{
"errors": [
"display_scope can't contain [all|checkout|thank_you]"
]
}