Requires write_marketing_event access scope.
For more info, refer to:
POST https://{handle}.myshopline.com/admin/openapi/v20260301/sales/marketing_activity_extension/:marketing_activity_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 .
Path Parameters
  • marketing_activity_id string required
    Marketing expansion campaign id
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_activityobject
    Marketing expansion
  • utm_medium string
    Source type of logo ( email , article )
    Example: email
  • marketing_activity_title string
    Marketing expansion campaign title
    Example: This is marketing activity title
  • status string
    Status before marketing campaign , draft
    ,failed
    ,active
    ,inactive
    ,scheduled
    ,paused
    ,deleted_externally
    on the outside
    Example: draft
  • utm_content string
    Distinguish between different links within the same ad
    Example: googleAds
  • form_data string
    Json's form data is serialized as a string
    Example: {\"budget\":{\"frequency\":\"DAILY\",\"currency\":\"TWD\"},\"time\":{\"startTime\":1671275280000,\"endTime\":1671361680000}}
  • started_at string
    Start time
    Example: 2022-12-15T09:00:00+08:00
  • target_status string
    Target status to be replaced by marketing campaign , draft
    ,failed
    ,active
    ,inactive
    ,scheduled
    ,paused
    ,deleted_externally
    on the outside
    Example: active
  • utm_campaign string
    Logo specific advertising
    Example: google
  • utm_source string
    Identity advertising customers , advertising websites
    Example: www.shopline.com
  • utm_term string
    Signature search keyword
    Example: this is utm term name
  • ended_at string
    End time
    Example: 2022-12-15T09:00:00+08:00
  • remote_id string
    unique id for [App] data
    Example: c219fd95-3f9f-4c96-b995-e3b40f87d321
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
  • marketing_activityobject
    Marketing expansion
  • started_at string
    Start time
    Example: 2022-12-15T09:00:00+08:00
  • utm_medium string
    Source type of logo ( email , article )
    Example: email
  • marketing_activity_title string
    Title of marketing
    Example: Black five activity
  • status string
    Status before marketing campaign , draft
    ,failed
    ,active
    ,inactive
    ,scheduled
    ,paused
    ,deleted_externally
    on the outside
    Example: draft
  • target_status string
    Target status to be replaced by marketing campaign , draft
    ,failed
    ,active
    ,inactive
    ,scheduled
    ,paused
    ,deleted_externally
    on the outside
    Example: active
  • utm_content string
    Distinguish between different links within the same ad
    Example: googleAds
  • marketing_activity_id string
    Marketing expansion campaign id
    Example: MA_5797003750150774786
  • remote_id string
    unique id for [App] data
    Example: 123
  • utm_campaign string
    Logo specific advertising
    Example: google
  • utm_source string
    Identity advertising customers , advertising websites
    Example: www.shopline.com
  • utm_term string
    Signature search keyword
    Example: this is utm term name
  • ended_at string
    End time
    Example: 2022-12-15T09:00:00+08:00
  • form_data string
    Json's form data is serialized as a string
    Example: {\"budget\":{\"frequency\":\"DAILY\",\"currency\":\"TWD\"},\"time\":{\"startTime\":1671275280000,\"endTime\":1671361680000}}
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301

ParamOptions

path required
header required

Body

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

Language

curl --request POST \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301/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'
Examples
Edit a marketing expansion activity that doesn ' t exist
Request
{
"marketing_activity": {
"target_status": "active",
"utm_campaign": "google",
"form_data": "{\\\"budget\\\":{\\\"frequency\\\":\\\"DAILY\\\",\\\"currency\\\":\\\"TWD\\\"},\\\"time\\\":{\\\"startTime\\\":1671275280000,\\\"endTime\\\":1671361680000}}",
"utm_medium": "email",
"ended_at": "2024-12-15T09:00:00+08:00",
"remote_id": "c219fd95-3f9f-4c96-b995-e3b40f87d321",
"started_at": "2022-12-15T09:00:00+08:00",
"utm_source": "www.shopline.com",
"utm_content": "googleAds",
"utm_term": "this is utm term name",
"marketing_activity_title": "This is marketing activity title",
"status": "draft"
}
}
Response
{}
Was this article helpful to you?