需要 write_marketing_event 权限点。
更多权限点使用信息,请参考:
POST https://{handle}.myshopline.com/admin/openapi/v20250601/sales/marketing_activity_extension/:marketing_activity_id.json
handle :店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com 的店铺,其 handleopen001
更新营销拓展活动
路径参数
  • marketing_activity_id string required
    营销拓展活动id
请求头
  • Content-Type required
    字段值固定为application/json; charset=utf-8
  • Authorization string required
    资源的访问令牌。请参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入
    Example:
    Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
请求体
  • marketing_activityobject
    营销拓展活动
  • ended_at string
    结束时间
    Example: 2022-12-15T09:00:00+08:00
  • form_data string
    JSON的表单数据序列化为字符串
    Example: {\"budget\":{\"frequency\":\"DAILY\",\"currency\":\"TWD\"},\"time\":{\"startTime\":1671275280000,\"endTime\":1671361680000}}
  • marketing_activity_title string
    营销拓展活动标题
    Example: This is marketing activity title
  • remote_id string
    【App】数据的唯一id
    Example: c219fd95-3f9f-4c96-b995-e3b40f87d321
  • started_at string
    开始时间
    Example: 2022-12-15T09:00:00+08:00
  • status string
    营销活动之前的状态,draft:草稿,failed:失败,active:生效,inactive:已完成,scheduled:已安排,paused:已暂停,deleted_externally:已在外部删除
    Example: draft
  • target_status string
    营销活动要更换的目标状态,draft:草稿,failed:失败,active:生效,inactive:已完成,scheduled:已安排,paused:已暂停,deleted_externally:已在外部删除
    Example: active
  • utm_campaign string
    标识具体广告标识
    Example: google
  • utm_content string
    区分同一广告内的不同链接
    Example: googleAds
  • utm_medium string
    标识来源类型(电子邮件,文章)
    Example: email
  • utm_source string
    标识广告客户、广告网站
    Example: www.shopline.com
  • utm_term string
    标识搜索关键字
    Example: this is utm term name
响应
更多状态码信息请参考 HTTP 状态码

响应头
  • traceId
    traceId
响应体
  • marketing_activityobject
    营销拓展活动
  • ended_at string
    结束时间
    Example: 2022-12-15T09:00:00+08:00
  • form_data string
    JSON的表单数据序列化为字符串
    Example: {\"budget\":{\"frequency\":\"DAILY\",\"currency\":\"TWD\"},\"time\":{\"startTime\":1671275280000,\"endTime\":1671361680000}}
  • marketing_activity_id string
    营销拓展活动ID
    Example: MA_5797003750150774786
  • marketing_activity_title string
    营销活动的标题
    Example: This is marketing activity title
  • remote_id string
    【App】数据的唯一id
    Example: c219fd95-3f9f-4c96-b995-e3b40f87d321
  • started_at string
    开始时间
    Example: 2022-12-15T09:00:00+08:00
  • status string
    营销活动之前的状态,draft:草稿,failed:失败,active:生效,inactive:已完成,scheduled:已安排,paused:已暂停,deleted_externally:已在外部删除
    Example: draft
  • target_status string
    营销活动要更换的目标状态,draft:草稿,failed:失败,active:生效,inactive:已完成,scheduled:已安排,paused:已暂停,deleted_externally:已在外部删除
    Example: active
  • utm_campaign string
    标识具体广告标识
    Example: google
  • utm_content string
    区分同一广告内的不同链接
    Example: googleAds
  • utm_medium string
    标识来源类型(电子邮件,文章)
    Example: email
  • utm_source string
    标识广告客户、广告网站
    Example: www.shopline.com
  • utm_term string
    标识搜索关键字
    Example: this is utm term name
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20250601

ParamOptions

path required
header required

Body

required
{
  "marketing_activity": {
    "ended_at": "2022-12-15T09:00:00+08:00",
    "form_data": "{\\\"budget\\\":{\\\"frequency\\\":\\\"DAILY\\\",\\\"currency\\\":\\\"TWD\\\"},\\\"time\\\":{\\\"startTime\\\":1671275280000,\\\"endTime\\\":1671361680000}}",
    "marketing_activity_title": "This is marketing activity title",
    "remote_id": "c219fd95-3f9f-4c96-b995-e3b40f87d321",
    "started_at": "2022-12-15T09:00:00+08:00",
    "status": "draft",
    "target_status": "active",
    "utm_campaign": "google",
    "utm_content": "googleAds",
    "utm_medium": "email",
    "utm_source": "www.shopline.com",
    "utm_term": "this is utm term name"
  }
}

Language

curl --request POST \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20250601/sales/marketing_activity_extension/marketing_activity_id.json \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json' \
--data '
{
"marketing_activity": {
"ended_at": "2022-12-15T09:00:00+08:00",
"form_data": "{\\\"budget\\\":{\\\"frequency\\\":\\\"DAILY\\\",\\\"currency\\\":\\\"TWD\\\"},\\\"time\\\":{\\\"startTime\\\":1671275280000,\\\"endTime\\\":1671361680000}}",
"marketing_activity_title": "This is marketing activity title",
"remote_id": "c219fd95-3f9f-4c96-b995-e3b40f87d321",
"started_at": "2022-12-15T09:00:00+08:00",
"status": "draft",
"target_status": "active",
"utm_campaign": "google",
"utm_content": "googleAds",
"utm_medium": "email",
"utm_source": "www.shopline.com",
"utm_term": "this is utm term name"
}
}
'
Examples
编辑一个不存在的营销扩展活动
Request
{
"marketing_activity": {
"ended_at": "2024-12-15T09:00:00+08:00",
"form_data": "{\\\"budget\\\":{\\\"frequency\\\":\\\"DAILY\\\",\\\"currency\\\":\\\"TWD\\\"},\\\"time\\\":{\\\"startTime\\\":1671275280000,\\\"endTime\\\":1671361680000}}",
"marketing_activity_title": "This is marketing activity title",
"remote_id": "c219fd95-3f9f-4c96-b995-e3b40f87d321",
"started_at": "2022-12-15T09:00:00+08:00",
"status": "draft",
"target_status": "active",
"utm_campaign": "google",
"utm_content": "googleAds",
"utm_medium": "email",
"utm_source": "www.shopline.com",
"utm_term": "this is utm term name"
}
}
Response
{}
这篇文章对你有帮助吗?