Requires write_marketing_event access scope.
For more info, refer to:
POST https://{handle}.myshopline.com/admin/openapi/v20260301/sales/marketing_events/sync_data.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 .
Bulk sync marketing event statistics (Create marketing engagement)
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 eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
Request Body
  • marketing_activity_datasobject[]
    Marketing event data, statistical data is full data
  • order_num long
    Order qty
    Example: 100
  • visitor_amount long
    Number of visitors
    Example: 100
  • order_amount long
    Sales
    Example: 100
  • occurred_on long
    Time to happen , standard 13- digit stamp
    Example: 1672246800000
  • impression_num long
    Exposure number , refers to the number of displays
    Example: 100
  • new_buyer_sum long
    New guest number
    Example: 100
  • product_sale_listobject[]
    Product sale ranking
  • product_id string
    Product id
    Example: 16062938070772167548642145
  • count long
    Product sale
    Example: 100
  • unsubscribed_num long
    Unsubscribed num
    Example: 100
  • check_out_sum long
    Checkout number
    Example: 100
  • click_num long
    Click count
    Example: 100
  • custom_activity_engagement_listobject[]
    Custom activity engagement, max size =5
  • name string
    Name, maximum 20 characters
    Example: FackbookOrderConversionRate
  • tool_tips string
    Tool tips, maximum 30 characters
    Example: Fackboo order conversion rate
  • type integer
    Value type, 1-amount; 2-percent; 3-numerical
    Example: 2
  • value string
    Value
    Example: 0.09
  • old_buyer_sum long
    Number of old buyer
    Example: 1001672246800000
  • regional_visit_listobject[]
    Regional visit ranking, max size=5
  • count long
    Regional visit
    Example: 100
  • name string
    Regional name, maximum 200 characters
    Example: ua
  • benefit_amount long
    Discount amount
    Example: 100
  • has_delivery_num long
    Number of deliveries
    Example: 100
  • marketing_event_id string
    Id for marketing events
    Example: MA_12323312324
  • open_sum long
    Number of open
    Example: 100
  • reported_as_spam_num long
    Reported as spam num
    Example: 100
  • add_cart_sum long
    Additional purchase number
    Example: 100
  • custom_sale_data_listobject[]
    custom sale data, max size =5
  • value string
    Value
    Example: 100
  • name string
    Name, maximum 20 characters
    Example: FackbookOrderCount
  • tool_tips string
    Tool tips, maximum 30 characters
    Example: Order from Fackbook count
  • type integer
    Value type, 1-amount; 2-percent; 3-numerical
    Example: 3
  • spend_cost long
    Marketing cost
    Example: 100
  • has_send_num long
    Number of send
    Example: 100
  • order_product_sum long
    Order Product total number
    Example: 100
  • bounced_num long
    Bounced num
    Example: 100
  • order_visitor_amount long
    Number of users ordered
    Example: 100
  • purchase_num long
    Number of purchases
    Example: 100
  • get_unit_cost long
    Get unit cost
    Example: 100
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
  • sucess_count integer
    Success total number
    Example: 1
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301

ParamOptions

header required

Body

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

Language

curl --request POST \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301/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'
Was this article helpful to you?