---
title: "Query marketing events list"

doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-rest-api/marketing/marketing-events/query-marketing-events-list'
  md: 'https://developer.shopline.com/docs/admin-rest-api/marketing/marketing-events/query-marketing-events-list.md'
---
# Query marketing events list

- **Base URL:** `https://{handle}.myshopline.com/admin/openapi`
- **Required Scopes:** `read_marketing_event`
- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** RESTful

## Endpoint

```http
GET /sales/marketing_events.json
```

## Base URL

* `https://{handle}.myshopline.com/admin/openapi`

  * `{handle}`: `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` .

## Required Permissions

* `read_marketing_event`

## Request

### Query Parameters

* `limit`

  integer (optional)

  The number of listings for return is 50 by default , which needs to be less than 250

* `offset`

  integer (optional)

  The marketing event that skips

### 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](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. 

## Response

### Status Codes

* `200`

  For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).

* `401`

  

* `429`

  

### 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

#### 200

* `marketing_events`

  array<object>

  Marketing events

  * `utm_content`

    string

    Distinguish between the same ad and different links

  * `utm_medium`

    string

    Identification source type

  * `event_type`

    string

    ●ad : advertising ● post : push ( fb post-chinese ) ● message : sms ● retargeting : dynamic redirect advertising ● transactional : ● affiliate : distribution / kol / red people ●Loyalty : gift card ● newsletter : subscription mail ● abandoned_cart : discard ● live : live broadcast

  * `marketing_channel`

    string

    Marketing event select channels ● search ● display ● social ● email ● referral ● sms

  * `ended_at`

    string

    End time

  * `preview_url`

    string

    Url to preview

  * `manage_url`

    string

    Managed links

  * `id`

    string

    Id for marketing events

  * `description`

    string

    Marketing campaign description

  * `marketing_event_id`

    string

    Yingxiao id for marketing events

  * `utm_term`

    string

    Key words for identification search

  * `started_at`

    string

    Start time

  * `remote_id`

    string

    Resources id

  * `utm_source`

    string

    Advertising customers , advertising websites

  * `utm_campaign`

    string

    Identify specific advertising

  * `referring_domain`

    string

    Domain name for marketing events , if marketing_channel is search and social , specify is needed


#### 401

* `errors`

  string

  Error message. 


#### 429

* `errors`

  string

  Error message. 


## OpenAPI Definition

```json
{
  "externalDocs": {
    "description": "Permission point used by the interface is `read_marketing_event` , For more information about the use of permission points, see",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=en",
    "errorTableDescription": ""
  },
  "operationId": "xso5jLvo",
  "parameters": [
    {
      "name": "limit",
      "in": "query",
      "description": "The number of listings for return is 50 by default , which needs to be less than 250",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "limit",
        "description": "The number of listings for return is 50 by default , which needs to be less than 250",
        "type": "integer",
        "example": 10
      },
      "example": 10,
      "examples": {
        "Paging query marketing events": {
          "value": "10"
        }
      }
    },
    {
      "name": "offset",
      "in": "query",
      "description": "The marketing event that skips",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "offset",
        "description": "The marketing event that skips",
        "type": "integer",
        "example": 0
      },
      "example": 0,
      "examples": {
        "Paging query marketing events": {
          "value": "0"
        }
      }
    },
    {
      "name": "Content-Type",
      "in": "header",
      "description": "The field must be set to the fixed value `application/json; charset=utf-8`.",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Content-Type",
        "type": "string",
        "example": "application/json; charset=utf-8"
      }
    },
    {
      "name": "Authorization",
      "in": "header",
      "description": " The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. ",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Authorization",
        "description": " The access token for the API. Please refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then put the obtained access token into the API request header in Bearer Token.",
        "type": "string",
        "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
      },
      "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
    }
  ],
  "responses": {
    "200": {
      "description": "For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).",
      "headers": {
        "traceId": {
          "description": "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."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "marketing_events": {
                "name": "marketing_events",
                "description": "Marketing events",
                "type": "array",
                "items": {
                  "name": "marketing_events",
                  "description": "Marketing events",
                  "type": "object",
                  "properties": {
                    "utm_content": {
                      "name": "utm_content",
                      "description": "Distinguish between the same ad and different links",
                      "type": "string",
                      "example": "googleAds"
                    },
                    "utm_medium": {
                      "name": "utm_medium",
                      "description": "Identification source type",
                      "type": "string",
                      "example": "email"
                    },
                    "event_type": {
                      "name": "event_type",
                      "description": "●ad : advertising ● post : push ( fb post-chinese ) ● message : sms ● retargeting : dynamic redirect advertising ● transactional : ● affiliate : distribution / kol / red people ●Loyalty : gift card ● newsletter : subscription mail ● abandoned_cart : discard ● live : live broadcast",
                      "type": "string",
                      "example": "ad"
                    },
                    "marketing_channel": {
                      "name": "marketing_channel",
                      "description": "Marketing event select channels ● search ● display ● social ● email ● referral ● sms",
                      "type": "string",
                      "example": "search"
                    },
                    "ended_at": {
                      "name": "ended_at",
                      "description": "End time",
                      "type": "string",
                      "example": "2023-12-15T09:00:00+08:00"
                    },
                    "preview_url": {
                      "name": "preview_url",
                      "description": "Url to preview",
                      "type": "string",
                      "example": "www.shopline.com/preview/mobile.com"
                    },
                    "manage_url": {
                      "name": "manage_url",
                      "description": "Managed links",
                      "type": "string",
                      "example": "www.shopline.com"
                    },
                    "id": {
                      "name": "id",
                      "description": "Id for marketing events",
                      "type": "string",
                      "example": "MA_6062143268514178052"
                    },
                    "description": {
                      "name": "description",
                      "description": "Marketing campaign description",
                      "type": "string",
                      "example": "This is description for marketing event"
                    },
                    "marketing_event_id": {
                      "name": "marketing_event_id",
                      "description": "Yingxiao id for marketing events",
                      "type": "string",
                      "example": "MA_6062143268514178052"
                    },
                    "utm_term": {
                      "name": "utm_term",
                      "description": "Key words for identification search",
                      "type": "string",
                      "example": "This is search word for utm item"
                    },
                    "started_at": {
                      "name": "started_at",
                      "description": "Start time",
                      "type": "string",
                      "example": "2022-12-15T09:00:00+08:00"
                    },
                    "remote_id": {
                      "name": "remote_id",
                      "description": "Resources id",
                      "type": "string",
                      "example": "6019932248291157288"
                    },
                    "utm_source": {
                      "name": "utm_source",
                      "description": "Advertising customers , advertising websites",
                      "type": "string",
                      "example": "www.shopline.com"
                    },
                    "utm_campaign": {
                      "name": "utm_campaign",
                      "description": "Identify specific advertising",
                      "type": "string",
                      "example": "google"
                    },
                    "referring_domain": {
                      "name": "referring_domain",
                      "description": "Domain name for marketing events , if marketing_channel is search and social , specify is needed",
                      "type": "string",
                      "example": "www.shopline.com"
                    }
                  },
                  "example": {
                    "utm_source": "www.shopline.com",
                    "utm_medium": "email",
                    "marketing_event_id": "MA_6062143268514178052",
                    "manage_url": "www.shopline.com",
                    "preview_url": "www.shopline.com/preview/mobile.com",
                    "ended_at": "2023-12-15T09:00:00+08:00",
                    "referring_domain": "www.shopline.com",
                    "utm_term": "This is search word for utm item",
                    "description": "This is description for marketing event",
                    "started_at": "2022-12-15T09:00:00+08:00",
                    "id": "MA_6062143268514178052",
                    "marketing_channel": "search",
                    "utm_campaign": "google",
                    "event_type": "ad",
                    "remote_id": "6019932248291157288",
                    "utm_content": "googleAds"
                  }
                },
                "example": [
                  {
                    "utm_medium": "email",
                    "id": "MA_6062143268514178052",
                    "started_at": "2022-12-15T09:00:00+08:00",
                    "utm_term": "This is search word for utm item",
                    "marketing_channel": "search",
                    "remote_id": "6019932248291157288",
                    "marketing_event_id": "MA_6062143268514178052",
                    "utm_content": "googleAds",
                    "event_type": "ad",
                    "referring_domain": "www.shopline.com",
                    "ended_at": "2023-12-15T09:00:00+08:00",
                    "utm_campaign": "google",
                    "utm_source": "www.shopline.com",
                    "preview_url": "www.shopline.com/preview/mobile.com",
                    "description": "This is description for marketing event",
                    "manage_url": "www.shopline.com"
                  }
                ]
              }
            },
            "example": {
              "marketing_events": [
                {
                  "referring_domain": "www.shopline.com",
                  "started_at": "2022-12-15T09:00:00+08:00",
                  "manage_url": "www.shopline.com",
                  "marketing_event_id": "MA_6062143268514178052",
                  "utm_medium": "email",
                  "id": "MA_6062143268514178052",
                  "utm_source": "www.shopline.com",
                  "description": "This is description for marketing event",
                  "event_type": "ad",
                  "remote_id": "6019932248291157288",
                  "ended_at": "2023-12-15T09:00:00+08:00",
                  "utm_content": "googleAds",
                  "preview_url": "www.shopline.com/preview/mobile.com",
                  "utm_campaign": "google",
                  "marketing_channel": "search",
                  "utm_term": "This is search word for utm item"
                }
              ]
            }
          },
          "examples": {
            "Paging query marketing events": {
              "value": {
                "marketing_events": [
                  {
                    "utm_campaign": "google",
                    "utm_content": "googleAds",
                    "utm_source": "manong.myshopline.com",
                    "utm_term": "This is search word for utm item",
                    "marketing_event_id": "MA_6062143268514178052",
                    "referring_domain": "manong.myshopline.com",
                    "preview_url": "https://manong.myshopline.com/",
                    "event_type": "ad",
                    "description": "This is description for marketing event",
                    "marketing_channel": "search",
                    "ended_at": "2023-12-15T09:00:00+08:00",
                    "utm_medium": "email",
                    "id": 4355,
                    "manage_url": "https://manong.myshopline.com/admin/",
                    "remote_id": "6019932248291157288",
                    "started_at": "2022-12-15T09:00:00+08:00"
                  },
                  {
                    "utm_source": "www.shopline.com",
                    "started_at": "2022-12-15T09:00:00+08:00",
                    "marketing_channel": "search",
                    "event_type": "ad",
                    "id": 4073,
                    "utm_content": "googleAds",
                    "referring_domain": "www.shopline.com",
                    "marketing_event_id": "MA_6019937483067761963",
                    "utm_term": "This is utm term name",
                    "utm_medium": "email",
                    "manage_url": "www.shopline.com/admin/1.html",
                    "ended_at": "2023-12-15T09:00:00+08:00",
                    "remote_id": "32ff8e60-9027-4d9c-8286-9f6059aaf97a",
                    "description": "This is description of marketing event",
                    "utm_campaign": "google",
                    "preview_url": "www.shopline.com/preview/mobile.com"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "401": {
      "headers": {
        "traceId": {
          "description": "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."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    },
    "429": {
      "headers": {
        "traceId": {
          "description": "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."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "method": "get",
  "path": "/sales/marketing_events.json",
  "servers": [
    {
      "url": "https://{handle}.myshopline.com/admin/openapi",
      "variables": {
        "handle": {
          "default": "openapiceshidianpu",
          "description": "`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` ."
        }
      }
    }
  ],
  "info": {
    "title": "Query marketing events list",
    "version": "v20270301"
  },
  "authIndexes": [
    "read_marketing_event"
  ]
}
```