需要 write_marketing_event 权限点。
更多权限点使用信息,请参考:
POST https://{handle}.myshopline.com/admin/openapi/v20250601/sales/marketing_events/sync_data.json
handle :店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com 的店铺,其 handleopen001
批量同步营销事件统计数据(创建营销参与)
请求头
  • Content-Type required
    字段值固定为application/json; charset=utf-8
  • Authorization string required
    资源的访问令牌。请参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入
    Example:
    Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
请求体
  • marketing_activity_datasobject[]
    营销事件数据,统计数据为全量数据
  • add_cart_sum long
    加购数
    Example: 100
  • benefit_amount long
    优惠金额
    Example: 100
  • bounced_num long
    弹回数
    Example: 100
  • check_out_sum long
    结账数
    Example: 100
  • click_num long
    点击数
    Example: 100
  • custom_activity_engagement_listobject[]
    自定义拓展-活动参与度,最多5个
  • name string
    数据名称,最长20个字符
    Example: FackbookOrderConversionRate
  • tool_tips string
    提示语,最长30个字符
    Example: Fackboo order conversion rate
  • type integer
    数据类型,1-金额;2-百分比;3-数值
    Example: 2
  • value string
    数据值
    Example: 0.09
  • custom_sale_data_listobject[]
    自定义拓展-销售数据,最多5个
  • name string
    数据名称,最长20个字符
    Example: FackbookOrderCount
  • tool_tips string
    提示语,最长30个字符
    Example: Order from Fackbook count
  • type integer
    数据类型,1-金额;2-百分比;3-数值
    Example: 3
  • value string
    数据值
    Example: 100
  • get_unit_cost long
    获得单位成本
    Example: 100
  • has_delivery_num long
    送达数
    Example: 100
  • has_send_num long
    发送数
    Example: 100
  • impression_num long
    曝光数,指展示次数
    Example: 100
  • marketing_event_id string
    营销事件的唯一id
    Example: MA_12323312324
  • new_buyer_sum long
    新客数
    Example: 100
  • occurred_on long
    发生时间,标准13位时间戳
    Example: 1672246800000
  • old_buyer_sum long
    老客数
    Example: 1001672246800000
  • open_sum long
    打开数
    Example: 100
  • order_amount long
    销售额
    Example: 100
  • order_num long
    订单数
    Example: 100
  • order_product_sum long
    订单商品总数
    Example: 100
  • order_visitor_amount long
    下单用户数
    Example: 100
  • product_sale_listobject[]
    商品销量-排行榜,最多10个
  • count long
    销量
    Example: 100
  • product_id string
    商品id
    Example: 16062938070772167548642145
  • purchase_num long
    购买数
    Example: 100
  • regional_visit_listobject[]
    地区访问量-排行榜,最多5个
  • count long
    访问量
    Example: 100
  • name string
    名称,最长200个字符
    Example: ua
  • reported_as_spam_num long
    报告为垃圾邮件数
    Example: 100
  • spend_cost long
    营销成本
    Example: 100
  • unsubscribed_num long
    取消订阅数
    Example: 100
  • visitor_amount long
    访客数
    Example: 100
响应
更多状态码信息请参考 HTTP 状态码

响应头
  • traceId
    traceId
响应体
  • sucess_count integer
    成功总数
    Example: 1
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20250601

ParamOptions

header required

Body

required
{
  "marketing_activity_datas": [
    {
      "add_cart_sum": 100,
      "benefit_amount": 100,
      "bounced_num": 100,
      "check_out_sum": 100,
      "click_num": 100,
      "custom_activity_engagement_list": [
        {
          "name": "FackbookOrderConversionRate",
          "tool_tips": "Fackboo order conversion rate",
          "type": 2,
          "value": "0.09"
        }
      ],
      "custom_sale_data_list": [
        {
          "name": "FackbookOrderCount",
          "tool_tips": "Order from Fackbook count",
          "type": 3,
          "value": "100"
        }
      ],
      "get_unit_cost": 100,
      "has_delivery_num": 100,
      "has_send_num": 100,
      "impression_num": 100,
      "marketing_event_id": "MA_12323312324",
      "new_buyer_sum": 100,
      "occurred_on": 1672246800000,
      "old_buyer_sum": 1001672246800000,
      "open_sum": 100,
      "order_amount": 100,
      "order_num": 100,
      "order_product_sum": 100,
      "order_visitor_amount": 100,
      "product_sale_list": [
        {
          "count": 100,
          "product_id": "16062938070772167548642145"
        }
      ],
      "purchase_num": 100,
      "regional_visit_list": [
        {
          "count": 100,
          "name": "ua"
        }
      ],
      "reported_as_spam_num": 100,
      "spend_cost": 100,
      "unsubscribed_num": 100,
      "visitor_amount": 100
    }
  ]
}

Language

curl --request POST \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20250601/sales/marketing_events/sync_data.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_datas": [
{
"add_cart_sum": 100,
"benefit_amount": 100,
"bounced_num": 100,
"check_out_sum": 100,
"click_num": 100,
"custom_activity_engagement_list": [
{
"name": "FackbookOrderConversionRate",
"tool_tips": "Fackboo order conversion rate",
"type": 2,
"value": "0.09"
}
],
"custom_sale_data_list": [
{
"name": "FackbookOrderCount",
"tool_tips": "Order from Fackbook count",
"type": 3,
"value": "100"
}
],
"get_unit_cost": 100,
"has_delivery_num": 100,
"has_send_num": 100,
"impression_num": 100,
"marketing_event_id": "MA_12323312324",
"new_buyer_sum": 100,
"occurred_on": 1672246800000,
"old_buyer_sum": 1001672246800000,
"open_sum": 100,
"order_amount": 100,
"order_num": 100,
"order_product_sum": 100,
"order_visitor_amount": 100,
"product_sale_list": [
{
"count": 100,
"product_id": "16062938070772167548642145"
}
],
"purchase_num": 100,
"regional_visit_list": [
{
"count": 100,
"name": "ua"
}
],
"reported_as_spam_num": 100,
"spend_cost": 100,
"unsubscribed_num": 100,
"visitor_amount": 100
}
]
}
'
这篇文章对你有帮助吗?

Error loading component.

Error loading component.