营销操作端点

在Adobe Experience Platform数据管理上下文中,营销操作是一个 Experience Platform 数据使用者需要使用,为此,需要检查是否存在违反数据使用策略的情况。

您可以使用管理组织的营销活动 /marketingActions 策略服务API中的端点。

快速入门

本指南中使用的API端点是 Policy Service API. 在继续之前,请查看 快速入门指南 有关相关文档的链接、阅读本文档中的示例API调用的指南,以及有关成功调用任何组件所需的所需标头的重要信息 Experience Platform API。

检索营销操作列表 list

您可以通过向以下对象发出GET请求,检索核心或自定义营销操作的列表: /marketingActions/core/marketingActions/custom、ID名称和ID名称等。

API格式

GET /marketingActions/core
GET /marketingActions/custom

请求

以下请求检索由您的组织维护的自定义营销操作列表。

curl -X GET \
  https://platform.adobe.io/data/foundation/dulepolicy/marketingActions/custom \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'x-api-key: {API_KEY}' \
  -H 'x-gw-ims-org-id: {ORG_ID}' \
  -H 'x-sandbox-name: {SANDBOX_NAME}'

响应

成功的响应将返回每个检索到的营销操作的详细信息,包括其 namehref. 此 href 值用于标识以下情况下的营销操作 创建数据使用策略.

{
    "_page": {
        "count": 2
    },
    "_links": {
        "page": {
            "href": "https://platform.adobe.io/marketingActions/custom?{?limit,start,property}",
            "templated": true
        }
    },
    "children": [
        {
            "name": "sampleMarketingAction",
            "description": "Marketing Action description.",
            "imsOrg": "{ORG_ID}",
            "created": 1550714012088,
            "createdClient": "string",
            "createdUser": "string",
            "updated": 1550714012088,
            "updatedClient": "string",
            "updatedUser": "string",
            "_links": {
                "self": {
                    "href": "https://platform.adobe.io/data/foundation/dulepolicy/marketingActions/custom/sampleMarketingAction"
                }
            }
        },
        {
            "name": "newMarketingAction",
            "description": "Another marketing action.",
            "imsOrg": "{ORG_ID}",
            "created": 1550793833224,
            "createdClient": "string",
            "createdUser": "string",
            "updated": 1550793833224,
            "updatedClient": "string",
            "updatedUser": "string",
            "_links": {
                "self": {
                    "href": "https://platform.adobe.io/data/foundation/dulepolicy/marketingActions/custom/newMarketingAction"
                }
            }
        }
    ]
}
属性
描述
_page.count
返回的营销操作总数。
children
包含检索到的营销操作详细信息的对象数组。
name
营销操作的名称,在下列情况下用作其唯一标识符 查找特定营销操作.
_links.self.href
营销活动的URI引用,可用于完成 marketingActionsRefs 数组 创建数据使用策略.

查找特定营销操作 lookup

通过包含营销操作的,您可以查找特定营销操作的详细信息 name 属性添加到GET请求的路径中。

API格式

GET /marketingActions/core/{MARKETING_ACTION_NAME}
GET /marketingActions/custom/{MARKETING_ACTION_NAME}
参数
描述
{MARKETING_ACTION_NAME}
name 要查找的营销操作的属性。

请求

以下请求检索名为的自定义营销操作 combineData.

curl -X GET \
  https://platform.adobe.io/data/foundation/dulepolicy/marketingActions/custom/combineData \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'x-api-key: {API_KEY}' \
  -H 'x-gw-ims-org-id: {ORG_ID}' \
  -H 'x-sandbox-name: {SANDBOX_NAME}'

响应

响应对象包含营销操作的详细信息,包括路径(_links.self.href)需要在以下情况下引用营销操作 定义数据使用策略 (marketingActionsRefs)。

{
    "name": "combineData",
    "description": "Combine multiple data sources together.",
    "imsOrg": "{ORG_ID}",
    "created": 1550793805590,
    "createdClient": "string",
    "createdUser": "string",
    "updated": 1550793805590,
    "updatedClient": "string",
    "updatedUser": "string",
    "_links": {
        "self": {
            "href": "https://platform.adobe.io/data/foundation/dulepolicy/marketingActions/custom/combineData"
        }
    }
}

创建或更新自定义营销操作 create-update

您可以通过在PUT请求路径中包含营销操作的现有名称或预期名称,创建新的自定义营销操作或更新现有营销操作。

API格式

PUT /marketingActions/custom/{MARKETING_ACTION_NAME}
参数
描述
{MARKETING_ACTION_NAME}
要创建或更新的营销操作的名称。 如果系统中已存在具有所提供名称的营销操作,则会更新该营销操作。 如果不存在,则会为提供的名称创建新的营销操作。

请求

以下请求创建一个名为的新营销操作 crossSiteTargeting,前提是系统中不存在同名的营销操作。 如果 crossSiteTargeting 营销操作确实存在,此调用会根据有效负载中提供的属性更新该营销操作。

curl -X PUT \
  https://platform.adobe.io/data/foundation/dulepolicy/marketingActions/custom/crossSiteTargeting \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'x-api-key: {API_KEY}' \
  -H 'x-gw-ims-org-id: {ORG_ID}' \
  -H 'x-sandbox-name: {SANDBOX_NAME}' \
  -H 'Content-Type: application/json' \
  -d '{
        "name": "crossSiteTargeting",
        "description": "Perform targeting on information obtained across multiple web sites."
      }'
属性
描述
name
要创建或更新的营销操作的名称。

重要:此属性必须匹配 {MARKETING_ACTION_NAME} 路径中,否则将发生HTTP 400(错误请求)错误。 换言之,一旦创建了营销操作,其 name 属性无法更改。
description
可选描述,为营销操作提供进一步的上下文。

响应

成功的响应将返回营销操作的详细信息。 如果更新了现有营销操作,则响应会返回HTTP状态200(确定)。 如果创建了新的营销操作,则响应会返回HTTP状态201(已创建)。

{
    "name": "crossSiteTargeting",
    "description": "Perform targeting on information obtained across multiple web sites.",
    "imsOrg": "{ORG_ID}",
    "created": 1550713341915,
    "createdClient": "string",
    "createdUser": "string",
    "updated": 1550713856390,
    "updatedClient": "string",
    "updatedUser": "string",
    "_links": {
        "self": {
            "href": "https://platform.adobe.io/data/foundation/dulepolicy/marketingActions/custom/crossSiteTargeting"
        }
    }
}

删除自定义营销操作 delete

您可以通过在DELETE请求的路径中包含自定义营销操作的名称来删除该营销操作。

NOTE
无法删除现有策略所引用的营销操作。 尝试删除其中一个营销操作将导致HTTP 400(错误请求)错误以及包含引用营销操作的所有策略ID的消息。

API格式

DELETE /marketingActions/custom/{MARKETING_ACTION_NAME}
参数
描述
{MARKETING_ACTION_NAME}
要删除的营销操作的名称。

请求

curl -X DELETE \
  https://platform.adobe.io/data/foundation/dulepolicy/marketingActions/custom/crossSiteTargeting \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'x-api-key: {API_KEY}' \
  -H 'x-gw-ims-org-id: {ORG_ID}' \
  -H 'x-sandbox-name: {SANDBOX_NAME}'

响应

成功的响应返回带有空白响应正文的HTTP状态200 (确定)。

您可以通过尝试确认删除 查找营销操作. 如果从系统中删除了营销操作,您应会收到HTTP 404(未找到)错误。

recommendation-more-help
834e0cae-2761-454a-be4d-62f0fd4b4456