使用Schema Registry API创建架构
Schema Registry用于访问Adobe Experience Platform中的Schema Library。 Schema Library包含按Adobe、Experience Platform合作伙伴以及您使用其应用程序的供应商提供的资源。 注册表提供了一个用户界面和RESTful API,所有可用的库资源都可通过该用户界面和API访问。
本教程使用Schema Registry API引导您完成使用标准类构建架构的步骤。 如果您希望在Experience Platform中使用用户界面,架构编辑器教程提供了在架构编辑器中执行类似操作的分步说明。
快速入门
本指南要求您对 Adobe Experience Platform 的以下组件有一定了解:
- Experience Data Model (XDM) System: Experience Platform用于组织客户体验数据的标准化框架。
- 架构组合的基础知识:了解XDM架构的基本构建块,包括架构组合中的关键原则和最佳实践。
- Real-Time Customer Profile:根据来自多个源的汇总数据,提供统一的实时使用者个人资料。
- Sandboxes: Experience Platform提供了将单个Platform实例划分为多个单独的虚拟环境的虚拟沙箱,以帮助开发和改进数字体验应用程序。
在开始本教程之前,请查看开发人员指南以了解成功调用Schema Registry API所需了解的重要信息。 这包括您的{TENANT_ID}
、“容器”的概念以及发出请求所需的标头(请特别注意Accept
标头及其可能的值)。
本教程将介绍构建忠诚度成员架构的步骤,该架构描述与零售忠诚度计划成员相关的数据。 开始之前,您可能希望预览附录中的完整忠诚度会员架构。
使用标准类构建架构
架构可被视为您要摄取到Experience Platform的数据的Blueprint。 每个架构由一个类和零个或多个架构字段组组成。 换言之,不必添加字段组即可定义架构,但在大多数情况下至少使用一个字段组。
分配类
架构组合过程从选择类开始。 类定义数据的关键行为方面(记录与时间序列),以及描述将摄取的数据所需的最小字段。
您在本教程中创建的架构使用XDM Individual Profile类。 XDM Individual Profile是Adobe提供的用于定义记录行为的标准类。 有关行为的详细信息,请参阅架构组合的基础知识。
要分配类,需进行API调用以在租户容器中创建(POST)新架构。 此调用包含架构将实现的类。 每个架构只能实现一个类。
API格式
POST /tenant/schemas
请求
该请求必须包含引用类的$id
的allOf
特性。 此属性定义架构将实施的“基类”。 在此示例中,基类是XDM Individual Profile类。 XDM Individual Profile类的$id
用作下面allOf
数组中$ref
字段的值。
curl -X POST \
https://platform.adobe.io/data/foundation/schemaregistry/tenant/schemas \
-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 '{
"type": "object",
"title": "Loyalty Members",
"description": "Information for all members of the loyalty program",
"allOf": [
{
"$ref": "https://ns.adobe.com/xdm/context/profile"
}
]
}'
响应
成功的请求返回HTTP响应状态201 (已创建),其响应正文包含新创建架构的详细信息,包括$id
、meta:altIt
和version
。 这些值是只读的,由Schema Registry分配。
{
"$id": "https://ns.adobe.com/tenantId/schemas/ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:altId": "_tenantId.schemas.ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:resourceType": "schemas",
"version": "1.0",
"title": "Loyalty Members",
"type": "object",
"description": "Information for all members of the loyalty program",
"allOf": [
{
"$ref": "https://ns.adobe.com/xdm/context/profile",
"type": "object",
"meta:xdmType": "object"
}
],
"refs": [
"https://ns.adobe.com/xdm/context/profile"
],
"imsOrg": "{ORG_ID}",
"meta:extensible": false,
"meta:abstract": false,
"meta:extends": [
"https://ns.adobe.com/xdm/common/auditable",
"https://ns.adobe.com/xdm/data/record",
"https://ns.adobe.com/xdm/context/profile"
],
"meta:xdmType": "object",
"meta:registryMetadata": {
"repo:createdDate": 1673310304048,
"repo:lastModifiedDate": 1673310304048,
"xdm:createdClientId": "{CLIENT_ID}",
"xdm:lastModifiedClientId": "{CLIENT_ID}",
"xdm:createdUserId": "{USER_ID}",
"xdm:lastModifiedUserId": "{USER_ID}",
"eTag": "6d2ed8acd9c3b768a44de29e069fc6f71329d2550f708381d22fa8bf8c192366",
"meta:globalLibVersion": "1.38.2"
},
"meta:class": "https://ns.adobe.com/xdm/context/profile",
"meta:containerId": "tenant",
"meta:sandboxId": "28e74200-e3de-11e9-8f5d-7f27416c5f0d",
"meta:sandboxType": "production",
"meta:tenantNamespace": "_tenantId"
}
查找架构
要查看新创建的架构,请使用架构的meta:altId
或URL编码的$id
URI执行查找(GET)请求。
API格式
GET /tenant/schemas/{SCHEMA_ID}
{SCHEMA_ID}
meta:altId
或URL编码的$id
。请求
curl -X GET \
https://platform.adobe.io/data/foundation/schemaregistry/tenant/schemas/https%3A%2F%2Fns.adobe.com%2F{TENANT_ID}%2Fschemas%2F533ca5da28087c44344810891b0f03d9\
-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 'Accept: application/vnd.adobe.xed+json; version=1'
响应
响应格式取决于随请求发送的Accept
标头。 请尝试使用不同的Accept
标头进行实验,以查看哪个标头最符合您的需求。
{
"$id": "https://ns.adobe.com/{TENANT_ID}/schemas/ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:altId": "_{TENANT_ID}.schemas.ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:resourceType": "schemas",
"version": "1.0",
"title": "Loyalty Members",
"type": "object",
"description": "Information for all members of the loyalty program",
"allOf": [
{
"$ref": "https://ns.adobe.com/xdm/context/profile",
"type": "object",
"meta:xdmType": "object"
}
],
"imsOrg": "{ORG_ID}",
"meta:extensible": false,
"meta:abstract": false,
"meta:extends": [
"https://ns.adobe.com/xdm/common/auditable",
"https://ns.adobe.com/xdm/data/record",
"https://ns.adobe.com/xdm/context/profile"
],
"meta:xdmType": "object",
"meta:registryMetadata": {
"repo:createdDate": 1673310304048,
"repo:lastModifiedDate": 1673310304048,
"xdm:createdClientId": "{CLIENT_ID}",
"xdm:lastModifiedClientId": "{CLIENT_ID}",
"xdm:createdUserId": "{USER_ID}",
"xdm:lastModifiedUserId": "{USER_ID}",
"eTag": "6d2ed8acd9c3b768a44de29e069fc6f71329d2550f708381d22fa8bf8c192366",
"meta:globalLibVersion": "1.38.2"
},
"meta:class": "https://ns.adobe.com/xdm/context/profile",
"meta:containerId": "tenant",
"meta:sandboxId": "28e74200-e3de-11e9-8f5d-7f27416c5f0d",
"meta:sandboxType": "production",
"meta:tenantNamespace": "_{TENANT_ID}",
"meta:allFieldAccess": true
}
添加字段组 add-a-field-group
现在已创建并确认忠诚度会员模式,可向其中添加字段组。
根据所选架构的类,有不同的标准字段组可供使用。 每个字段组都包含一个intendedToExtend
字段,该字段定义了与该字段组兼容的类。
字段组定义概念(如“name”或“address”),这些概念可在需要捕获相同信息的任何架构中重用。
API格式
PATCH /tenant/schemas/{SCHEMA_ID}
{SCHEMA_ID}
meta:altId
或URL编码的$id
。请求
此请求更新忠诚度会员架构以包含人口统计详细信息字段组 (profile-person-details
)中的字段。
通过添加profile-person-details
字段组,忠诚度会员架构现在可捕获忠诚度计划会员的人口统计信息,如其名字、姓氏和生日。
curl -X PATCH \
https://platform.adobe.io/data/foundation/schemaregistry/tenant/schemas/_{TENANT_ID}.schemas.533ca5da28087c44344810891b0f03d9 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d '[
{ "op": "add", "path": "/allOf/-", "value": {"$ref": "https://ns.adobe.com/xdm/context/profile-person-details"}}
]'
响应
响应显示meta:extends
数组中新添加的字段组,并包含allOf
属性中字段组的$ref
。
{
"$id": "https://ns.adobe.com/{TENANT_ID}/schemas/ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:altId": "_{TENANT_ID}.schemas.ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:resourceType": "schemas",
"version": "1.1",
"title": "Loyalty Members",
"type": "object",
"description": "Information for all members of the loyalty program",
"allOf": [
{
"$ref": "https://ns.adobe.com/xdm/context/profile",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/xdm/context/profile-person-details",
"type": "object",
"meta:xdmType": "object"
}
],
"refs": [
"https://ns.adobe.com/xdm/context/profile-person-details",
"https://ns.adobe.com/xdm/context/profile"
],
"imsOrg": "{ORG_ID}",
"meta:extensible": false,
"meta:abstract": false,
"meta:extends": [
"https://ns.adobe.com/xdm/context/profile-person-details",
"https://ns.adobe.com/xdm/common/auditable",
"https://ns.adobe.com/xdm/data/record",
"https://ns.adobe.com/xdm/context/profile"
],
"meta:xdmType": "object",
"meta:registryMetadata": {
"repo:createdDate": 1673310304048,
"repo:lastModifiedDate": 1673310912096,
"xdm:createdClientId": "{CLIENT_ID}",
"xdm:lastModifiedClientId": "{CLIENT_ID}",
"xdm:createdUserId": "{USER_ID}",
"xdm:lastModifiedUserId": "{USER_ID}",
"eTag": "b480f28a35f356b237fc129e796074a3f33a7a67df273f6a8beaee1ec6465540",
"meta:globalLibVersion": "1.38.2"
},
"meta:class": "https://ns.adobe.com/xdm/context/profile",
"meta:containerId": "tenant",
"meta:sandboxId": "28e74200-e3de-11e9-8f5d-7f27416c5f0d",
"meta:sandboxType": "production",
"meta:tenantNamespace": "_{TENANT_ID}",
"meta:descriptorStatus": {
"result": []
}
}
添加更多字段组
忠诚度成员架构需要两个额外的标准字段组,您可以使用另一个字段组重复这些步骤来添加它们。
$id
:code language-http |
---|
|
API格式
PATCH /tenant/schemas/{SCHEMA_ID}
{SCHEMA_ID}
meta:altId
或URL编码的$id
。请求
此请求会更新忠诚度成员架构,以包含以下标准字段组中的字段:
curl -X PATCH \
https://platform.adobe.io/data/foundation/schemaregistry/tenant/schemas/_{TENANT_ID}.schemas.533ca5da28087c44344810891b0f03d9 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d '[
{ "op": "add", "path": "/allOf/-", "value": {"$ref": "https://ns.adobe.com/xdm/context/profile-personal-details"}},
{ "op": "add", "path": "/allOf/-", "value": {"$ref": "https://ns.adobe.com/xdm/mixins/profile/profile-loyalty-details"}}
]'
响应
响应显示meta:extends
数组中新添加的字段组,并包含allOf
属性中字段组的$ref
。
忠诚度成员架构现在应在allOf
数组中包含四个$ref
值: profile
、profile-person-details
、profile-personal-details
和profile-loyalty-details
,如下所示。
{
"$id": "https://ns.adobe.com/{TENANT_ID}/schemas/ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:altId": "_{TENANT_ID}.schemas.ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:resourceType": "schemas",
"version": "1.2",
"title": "Loyalty Members",
"type": "object",
"description": "Information for all members of the loyalty program",
"allOf": [
{
"$ref": "https://ns.adobe.com/xdm/context/profile",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/xdm/context/profile-person-details",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/xdm/context/profile-personal-details",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/xdm/mixins/profile/profile-loyalty-details",
"type": "object",
"meta:xdmType": "object"
}
],
"refs": [
"https://ns.adobe.com/xdm/context/profile-person-details",
"https://ns.adobe.com/xdm/mixins/profile/profile-loyalty-details",
"https://ns.adobe.com/xdm/context/profile-personal-details",
"https://ns.adobe.com/xdm/context/profile"
],
"imsOrg": "{ORG_ID}",
"meta:extensible": false,
"meta:abstract": false,
"meta:extends": [
"https://ns.adobe.com/xdm/context/profile-person-details",
"https://ns.adobe.com/xdm/mixins/profile/profile-loyalty-details",
"https://ns.adobe.com/xdm/context/profile-personal-details",
"https://ns.adobe.com/xdm/common/auditable",
"https://ns.adobe.com/xdm/data/record",
"https://ns.adobe.com/xdm/context/profile"
],
"meta:xdmType": "object",
"meta:registryMetadata": {
"repo:createdDate": 1673310304048,
"repo:lastModifiedDate": 1673311559934,
"xdm:createdClientId": "{CLIENT_ID}",
"xdm:lastModifiedClientId": "{CLIENT_ID}",
"xdm:createdUserId": "{USER_ID}",
"xdm:lastModifiedUserId": "{USER_ID}",
"eTag": "1de5ed1a07e3478719952f0a8c94d5e5390d5a9a998761adb4cf1989137fd6ea",
"meta:globalLibVersion": "1.38.2"
},
"meta:class": "https://ns.adobe.com/xdm/context/profile",
"meta:containerId": "tenant",
"meta:sandboxId": "28e74200-e3de-11e9-8f5d-7f27416c5f0d",
"meta:sandboxType": "production",
"meta:tenantNamespace": "_{TENANT_ID}",
"meta:descriptorStatus": {
"result": []
}
}
定义新的字段组
虽然标准忠诚度详细信息字段组为架构提供了有用的忠诚度相关字段,但还有其他忠诚度字段未包含在任何标准字段组中。
要添加这些字段,您可以在tenant
容器中定义自己的自定义字段组。 这些字段组是您的组织所独有的,组织外的任何人不可见或编辑。
为了创建(POST)新的字段组,您的请求必须包含一个meta:intendedToExtend
字段,该字段包含与该字段组兼容的基类的$id
以及该字段组将包含的属性。
任何自定义属性都必须嵌套在TENANT_ID
下,以避免与其他字段组或字段发生冲突。
API格式
POST /tenant/fieldgroups
请求
此请求创建一个新字段组,该字段组具有包含四个字段的loyaltyTier
对象,这些字段特定于公司的特定忠诚度计划:id
、effectiveDate
、currentThreshold
和nextThreshold
。
curl -X POST\
https://platform.adobe.io/data/foundation/schemaregistry/tenant/fieldgroups\
-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 '{
"type": "object",
"title": "Loyalty Tier",
"meta:intendedToExtend": [
"https://ns.adobe.com/xdm/context/profile"
],
"description": "Captures info about the current loyalty tier of a customer.",
"definitions": {
"loyaltyTier": {
"properties": {
"_{TENANT_ID}": {
"type": "object",
"properties": {
"loyaltyTier": {
"type": "object",
"properties": {
"id": {
"title": "Loyalty Tier Identifier",
"type": "string",
"description": "Loyalty Tier Identifier."
},
"effectiveDate": {
"title": "Effective Date",
"type": "string",
"format": "date-time",
"description": "Date the member joined their current loyalty tier."
},
"currentThreshold": {
"title": "Current Point Threshold",
"type": "integer",
"description": "The minimum number of loyalty points the member must maintain to remain in the current tier."
},
"nextThreshold": {
"title": "Next Point Threshold",
"type": "integer",
"description": "The number of loyalty points the member must accrue to graduate to the next tier."
}
}
}
}
}
}
}
},
"allOf": [
{
"$ref": "#/definitions/loyaltyTier"
}
]
}'
响应
成功的请求返回HTTP响应状态201 (已创建),其响应正文包含新创建的字段组的详细信息,包括$id
、meta:altIt
和version
。 这些值是只读的,由Schema Registry分配。
{
"$id": "https://ns.adobe.com/{TENANT_ID}/mixins/9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691",
"meta:altId": "_{TENANT_ID}.mixins.9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691",
"meta:resourceType": "mixins",
"version": "1.0",
"title": "Loyalty Tier",
"type": "object",
"description": "Captures info about the current loyalty tier of a customer.",
"definitions": {
"loyaltyTier": {
"properties": {
"_{TENANT_ID}": {
"type": "object",
"properties": {
"loyaltyTier": {
"type": "object",
"properties": {
"id": {
"title": "Loyalty Tier Identifier",
"type": "string",
"description": "Loyalty Tier Identifier.",
"meta:xdmType": "string"
},
"effectiveDate": {
"title": "Effective Date",
"type": "string",
"format": "date-time",
"description": "Date the member joined their current loyalty tier.",
"meta:xdmType": "date-time"
},
"currentThreshold": {
"title": "Current Point Threshold",
"type": "integer",
"description": "The minimum number of loyalty points the member must maintain to remain in the current tier.",
"meta:xdmType": "int"
},
"nextThreshold": {
"title": "Next Point Threshold",
"type": "integer",
"description": "The number of loyalty points the member must accrue to graduate to the next tier.",
"meta:xdmType": "int"
}
},
"meta:xdmType": "object"
}
},
"meta:xdmType": "object"
}
}
}
},
"allOf": [
{
"$ref": "#/definitions/loyaltyTier",
"type": "object",
"meta:xdmType": "object"
}
],
"refs": [],
"imsOrg": "{ORG_ID}",
"meta:extensible": true,
"meta:abstract": true,
"meta:intendedToExtend": [
"https://ns.adobe.com/xdm/context/profile"
],
"meta:xdmType": "object",
"meta:registryMetadata": {
"repo:createdDate": 1673313004645,
"repo:lastModifiedDate": 1673313004645,
"xdm:createdClientId": "{CLIENT_ID}",
"xdm:lastModifiedClientId": "{CLIENT_ID}",
"xdm:createdUserId": "{USER_ID}",
"xdm:lastModifiedUserId": "{USER_ID}",
"eTag": "98e5d48808f5a4d9655493777389568a2581cfce013351ab9e1595d82f698dd6",
"meta:globalLibVersion": "1.38.2"
},
"meta:containerId": "tenant",
"meta:sandboxId": "28e74200-e3de-11e9-8f5d-7f27416c5f0d",
"meta:sandboxType": "production",
"meta:tenantNamespace": "_{TENANT_ID}"
}
将自定义字段组添加到架构
现在,您可以按照与添加标准字段组相同的步骤,将此新创建的字段组添加到您的架构中。
API格式
PATCH /tenant/schemas/{SCHEMA_ID}
{SCHEMA_ID}
meta:altId
或URL编码的$id
。请求
此请求更新(PATCH)忠诚度成员架构,以包含新“忠诚度级别”字段组中的字段。
curl -X PATCH \
https://platform.adobe.io/data/foundation/schemaregistry/tenant/schemas/_{TENANT_ID}.schemas.533ca5da28087c44344810891b0f03d9 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d '[
{ "op": "add", "path": "/allOf/-", "value": {"$ref": "https://ns.adobe.com/{TENANT_ID}/mixins/9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691"}}
]'
响应
您会看到已成功添加字段组,因为响应现在显示meta:extends
数组中新添加的字段组,并包含allOf
属性中字段组的$ref
。
{
"$id": "https://ns.adobe.com/{TENANT_ID}/schemas/ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:altId": "_{TENANT_ID}.schemas.ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:resourceType": "schemas",
"version": "1.3",
"title": "Loyalty Members",
"type": "object",
"description": "Information for all members of the loyalty program",
"allOf": [
{
"$ref": "https://ns.adobe.com/xdm/context/profile",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/xdm/context/profile-person-details",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/xdm/context/profile-personal-details",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/xdm/mixins/profile/profile-loyalty-details",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/{TENANT_ID}/mixins/9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691",
"type": "object",
"meta:xdmType": "object"
}
],
"refs": [
"https://ns.adobe.com/xdm/context/profile-person-details",
"https://ns.adobe.com/xdm/mixins/profile/profile-loyalty-details",
"https://ns.adobe.com/xdm/context/profile-personal-details",
"https://ns.adobe.com/xdm/context/profile",
"https://ns.adobe.com/{TENANT_ID}/mixins/9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691"
],
"imsOrg": "{ORG_ID}",
"meta:extensible": false,
"meta:abstract": false,
"meta:extends": [
"https://ns.adobe.com/xdm/context/profile-person-details",
"https://ns.adobe.com/xdm/mixins/profile/profile-loyalty-details",
"https://ns.adobe.com/xdm/context/profile-personal-details",
"https://ns.adobe.com/xdm/common/auditable",
"https://ns.adobe.com/xdm/data/record",
"https://ns.adobe.com/xdm/context/profile",
"https://ns.adobe.com/{TENANT_ID}/mixins/9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691"
],
"meta:xdmType": "object",
"meta:registryMetadata": {
"repo:createdDate": 1673310304048,
"repo:lastModifiedDate": 1673313118938,
"xdm:createdClientId": "{CLIENT_ID}",
"xdm:lastModifiedClientId": "{CLIENT_ID}",
"xdm:createdUserId": "{USER_ID}",
"xdm:lastModifiedUserId": "{USER_ID}",
"eTag": "6559b197a04bb3fda5bc80bf383a260cfbe32539d528f0139c5750711eebfba2",
"meta:globalLibVersion": "1.38.2"
},
"meta:class": "https://ns.adobe.com/xdm/context/profile",
"meta:containerId": "tenant",
"meta:sandboxId": "28e74200-e3de-11e9-8f5d-7f27416c5f0d",
"meta:sandboxType": "production",
"meta:tenantNamespace": "_{TENANT_ID}",
"meta:descriptorStatus": {
"result": []
}
}
查看当前架构
您现在可以执行GET请求以查看当前架构,并查看添加的字段组对架构整体结构的贡献。
API格式
GET /tenant/schemas/{SCHEMA_ID}
{SCHEMA_ID}
meta:altId
或URL编码的$id
。请求
curl -X GET \
https://platform.adobe.io/data/foundation/schemaregistry/tenant/schemas/_{TENANT_ID}.schemas.ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3 \
-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 'Accept: application/vnd.adobe.xed-full+json; version=1'
响应
通过使用application/vnd.adobe.xed-full+json; version=1
Accept
标头,您可以看到显示所有属性的完整架构。 这些属性是用来构建架构的类和字段组贡献的字段。 在下面的示例响应中,仅显示最近添加的字段以留出空间。 您可以在此文档末尾的附录中查看完整架构,包括所有属性及其属性。
在"properties"
下,您可以看到添加自定义字段组时创建的_{TENANT_ID}
命名空间。 在该命名空间内是loyaltyTier
对象以及在创建字段组时定义的字段。
{
"$id": "https://ns.adobe.com/{TENANT_ID}/mixins/9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691",
"meta:altId": "_{TENANT_ID}.mixins.9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691",
"meta:resourceType": "mixins",
"version": "1.0",
"title": "Loyalty Tier",
"type": "object",
"description": "Captures info about the current loyalty tier of a customer.",
"definitions": {
"loyaltyTier": {
"properties": {
"_{TENANT_ID}": {
"type": "object",
"properties": {
"loyaltyTier": {
"type": "object",
"properties": {
"id": {
"title": "Loyalty Tier Identifier",
"type": "string",
"description": "Loyalty Tier Identifier.",
"meta:xdmType": "string"
},
"effectiveDate": {
"title": "Effective Date",
"type": "string",
"format": "date-time",
"description": "Date the member joined their current loyalty tier.",
"meta:xdmType": "date-time"
},
"currentThreshold": {
"title": "Current Point Threshold",
"type": "integer",
"description": "The minimum number of loyalty points the member must maintain to remain in the current tier.",
"meta:xdmType": "int"
},
"nextThreshold": {
"title": "Next Point Threshold",
"type": "integer",
"description": "The number of loyalty points the member must accrue to graduate to the next tier.",
"meta:xdmType": "int"
}
},
"meta:xdmType": "object"
}
},
"meta:xdmType": "object"
}
}
}
},
"allOf": [
{
"$ref": "#/definitions/loyaltyTier",
"type": "object",
"meta:xdmType": "object"
}
],
"refs": [],
"imsOrg": "{ORG_ID}",
"meta:extensible": true,
"meta:abstract": true,
"meta:intendedToExtend": [
"https://ns.adobe.com/xdm/context/profile"
],
"meta:xdmType": "object",
"meta:registryMetadata": {
"repo:createdDate": 1673313004645,
"repo:lastModifiedDate": 1673313004645,
"xdm:createdClientId": "{CLIENT_ID}",
"xdm:lastModifiedClientId": "{CLIENT_ID}",
"xdm:createdUserId": "{USER_ID}",
"xdm:lastModifiedUserId": "{USER_ID}",
"eTag": "98e5d48808f5a4d9655493777389568a2581cfce013351ab9e1595d82f698dd6",
"meta:globalLibVersion": "1.38.2"
},
"meta:containerId": "tenant",
"meta:sandboxId": "28e74200-e3de-11e9-8f5d-7f27416c5f0d",
"meta:sandboxType": "production",
"meta:tenantNamespace": "_{TENANT_ID}"
}
创建数据类型
您创建的忠诚度级别字段组包含可能在其他架构中有用的特定属性。 例如,数据可能会作为体验事件的一部分摄取,或者由实现其他类的架构使用。 在这种情况下,有必要将对象层次结构另存为数据类型,以便更容易在其他位置重复使用该定义。
数据类型允许您定义对象层次结构一次,并在字段中引用它,就像任何其他标量类型一样。
换言之,数据类型允许一致地使用多字段结构,比字段组具有更大的灵活性,因为它们可以通过添加为字段的“类型”而包含在架构中的任意位置。
API格式
POST /tenant/datatypes
请求
定义数据类型不需要meta:extends
或meta:intendedToExtend
字段,并且字段不需要嵌套在租户ID下以避免冲突。
curl -X POST \
https://platform.adobe.io/data/foundation/schemaregistry/tenant/datatypes \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d '{
"title": "Loyalty Tier",
"type": "object",
"description": "Loyalty Tier data type",
"definitions": {
"loyaltyTier": {
"type": "object",
"properties": {
"id": {
"title": "Loyalty Tier Identifier",
"type": "string",
"description": "Loyalty Tier Identifier."
},
"effectiveDate": {
"title": "Effective Date",
"type": "string",
"format": "date-time",
"description": "Date the member joined their current loyalty tier."
},
"currentThreshold": {
"title": "Current Point Threshold",
"type": "integer",
"description": "The minimum number of loyalty points the member must maintain to remain in the current tier."
},
"nextThreshold": {
"title": "Next Point Threshold",
"type": "integer",
"description": "The number of loyalty points the member must accrue to graduate to the next tier."
}
}
}
},
"allOf": [
{
"$ref": "#/definitions/loyaltyTier"
}
]
}'
响应
成功的请求返回HTTP响应状态201(已创建),其响应正文包含新创建的数据类型的详细信息,包括$id
、meta:altIt
和version
。 这些值是只读的,由Schema Registry分配。
{
"$id": "https://ns.adobe.com/{TENANT_ID}/datatypes/c069d13ebfaaa5980d988e7694d794b37b1784fe11d754cb",
"meta:altId": "_{TENANT_ID}.datatypes.c069d13ebfaaa5980d988e7694d794b37b1784fe11d754cb",
"meta:resourceType": "datatypes",
"version": "1.0",
"title": "Loyalty Tier",
"type": "object",
"description": "Loyalty Tier data type",
"definitions": {
"loyaltyTier": {
"type": "object",
"properties": {
"id": {
"title": "Loyalty Tier Identifier",
"type": "string",
"description": "Loyalty Tier Identifier.",
"meta:xdmType": "string"
},
"effectiveDate": {
"title": "Effective Date",
"type": "string",
"format": "date-time",
"description": "Date the member joined their current loyalty tier.",
"meta:xdmType": "date-time"
},
"currentThreshold": {
"title": "Current Point Threshold",
"type": "integer",
"description": "The minimum number of loyalty points the member must maintain to remain in the current tier.",
"meta:xdmType": "int"
},
"nextThreshold": {
"title": "Next Point Threshold",
"type": "integer",
"description": "The number of loyalty points the member must accrue to graduate to the next tier.",
"meta:xdmType": "int"
}
},
"meta:xdmType": "object"
}
},
"allOf": [
{
"$ref": "#/definitions/loyaltyTier",
"type": "object",
"meta:xdmType": "object"
}
],
"refs": [],
"imsOrg": "{ORG_ID}",
"meta:extensible": true,
"meta:abstract": true,
"meta:xdmType": "object",
"meta:registryMetadata": {
"repo:createdDate": 1673378256699,
"repo:lastModifiedDate": 1673378256699,
"xdm:createdClientId": "{CLIENT_ID}",
"xdm:lastModifiedClientId": "{CLIENT_ID}",
"xdm:createdUserId": "{USER_ID}",
"xdm:lastModifiedUserId": "{USER_ID}",
"eTag": "8afba84c0c9a68126a7a1389f8523a1112bdf4405badc6dcddbbb4a0e18f5cdb",
"meta:globalLibVersion": "1.38.2"
},
"meta:containerId": "tenant",
"meta:sandboxId": "28e74200-e3de-11e9-8f5d-7f27416c5f0d",
"meta:sandboxType": "production",
"meta:tenantNamespace": "_{TENANT_ID}"
}
您可以使用编码的URL $id
URI执行查找(GET)请求,以直接查看新数据类型。 请确保在查找请求的Accept
标头中包含version
。
在架构中使用数据类型
现在已创建了忠诚度层数据类型,您可以更新(PATCH)您创建的字段组中的loyaltyTier
字段以引用数据类型,而不是以前存在的字段。
API格式
PATCH /tenant/fieldgroups/{FIELD_GROUP_ID}
{FIELD_GROUP_ID}
meta:altId
或URL编码$id
。请求
curl -X PATCH \
https://platform.adobe.io/data/foundation/schemaregistry/tenant/fieldgroups/_{TENANT_ID}.mixins.9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d '[
{
"op": "replace",
"path": "/definitions/loyaltyTier/properties/_{TENANT_ID}/properties",
"value": {
"loyaltyTier": {
"title": "Loyalty Tier",
"$ref": "https://ns.adobe.com/{TENANT_ID}/datatypes/c069d13ebfaaa5980d988e7694d794b37b1784fe11d754cb",
"description": "Loyalty tier info"
}
}
}
]'
响应
响应现在包含对loyaltyTier
对象中数据类型的引用($ref
),而不是以前定义的字段。
{
"$id": "https://ns.adobe.com/{TENANT_ID}/mixins/9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691",
"meta:altId": "_{TENANT_ID}.mixins.9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691",
"meta:resourceType": "mixins",
"version": "1.1",
"title": "Loyalty Tier",
"type": "object",
"description": "Captures info about the current loyalty tier of a customer.",
"definitions": {
"loyaltyTier": {
"properties": {
"_{TENANT_ID}": {
"type": "object",
"properties": {
"loyaltyTier": {
"title": "Loyalty Tier",
"$ref": "https://ns.adobe.com/{TENANT_ID}/datatypes/c069d13ebfaaa5980d988e7694d794b37b1784fe11d754cb",
"description": "Loyalty tier info",
"type": "object",
"meta:xdmType": "object"
}
},
"meta:xdmType": "object"
}
}
}
},
"allOf": [
{
"$ref": "#/definitions/loyaltyTier",
"type": "object",
"meta:xdmType": "object"
}
],
"refs": [
"https://ns.adobe.com/{TENANT_ID}/datatypes/c069d13ebfaaa5980d988e7694d794b37b1784fe11d754cb"
],
"imsOrg": "{ORG_ID}",
"meta:extensible": true,
"meta:abstract": true,
"meta:intendedToExtend": [
"https://ns.adobe.com/xdm/context/profile"
],
"meta:xdmType": "object",
"meta:registryMetadata": {
"repo:createdDate": 1673313004645,
"repo:lastModifiedDate": 1673378970276,
"xdm:createdClientId": "{CLIENT_ID}",
"xdm:lastModifiedClientId": "{CLIENT_ID}",
"xdm:createdUserId": "{USER_ID}",
"xdm:lastModifiedUserId": "{USER_ID}",
"eTag": "4df8fa56d00991590364606bb2e219e1ea8f5717a51c0e6ae57ca956830b6a27",
"meta:globalLibVersion": "1.38.2"
},
"meta:containerId": "tenant",
"meta:sandboxId": "28e74200-e3de-11e9-8f5d-7f27416c5f0d",
"meta:sandboxType": "production",
"meta:tenantNamespace": "_{TENANT_ID}",
"meta:descriptorStatus": {
"result": []
}
}
如果现在执行GET请求以查找架构,loyaltyTier
属性将显示meta:referencedFrom
下数据类型的引用:
"_{TENANT_ID}": {
"type": "object",
"meta:xdmType": "object",
"properties": {
"loyaltyTier": {
"title": "Loyalty Tier",
"description": "Loyalty tier info",
"type": "object",
"meta:xdmType": "object",
"properties": {
"id": {
"title": "Loyalty Tier Identifier",
"type": "string",
"description": "Loyalty Tier Identifier.",
"meta:xdmType": "string"
},
"effectiveDate": {
"title": "Effective Date",
"type": "string",
"format": "date-time",
"description": "Date the member joined their current loyalty tier.",
"meta:xdmType": "date-time"
},
"currentThreshold": {
"title": "Current Point Threshold",
"type": "integer",
"description": "The minimum number of loyalty points the member must maintain to remain in the current tier.",
"meta:xdmType": "int"
},
"nextThreshold": {
"title": "Next Point Threshold",
"type": "integer",
"description": "The number of loyalty points the member must accrue to graduate to the next tier.",
"meta:xdmType": "int"
}
},
"meta:referencedFrom": "https://ns.adobe.com/{TENANT_ID}/datatypes/c069d13ebfaaa5980d988e7694d794b37b1784fe11d754cb"
}
}
}
定义标识描述符
架构用于将数据摄取到Experience Platform。 此数据最终跨多个服务使用,以创建个人的单个统一视图。 为了帮助完成此过程,可以将关键字段标记为“身份”,并在摄取数据时,将这些字段中的数据插入该个人的“身份图”中。 然后,Real-Time Customer Profile和其他Experience Platform服务可以访问图形数据,以提供每个客户的拼合视图。
通常标记为“标识”的字段包括:电子邮件地址、电话号码、Experience Cloud ID (ECID)、CRM ID或其他唯一ID字段。 请考虑特定于贵组织的任何唯一标识符,因为它们可能是良好的标识字段。
身份描述符指示sourceSchema
的sourceProperty
是应被视为身份的唯一标识符。
有关使用描述符的详细信息,请参阅架构注册开发人员指南。
API格式
POST /tenant/descriptors
请求
以下请求在personalEmail.address
字段中为忠诚度成员架构定义标识描述符。 这告知Experience Platform使用忠诚度会员的电子邮件地址作为标识符,以帮助拼合有关个人的信息。 通过将xdm:isPrimary
设置为true
,此调用还将此字段设置为架构的主要标识,这是启用架构以在实时客户个人资料中使用的要求。
curl -X POST \
https://platform.adobe.io/data/foundation/schemaregistry/tenant/descriptors \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d '{
"@type": "xdm:descriptorIdentity",
"xdm:sourceSchema": "https://ns.adobe.com/{TENANT_ID}/schemas/533ca5da28087c44344810891b0f03d9",
"xdm:sourceVersion": 1,
"xdm:sourceProperty": "/_{TENANT_ID}/loyalty/loyaltyId",
"xdm:namespace": "Email",
"xdm:property": "xdm:code",
"xdm:isPrimary": false
}'
响应
成功的响应返回HTTP状态201 (已创建),响应正文包含新创建的描述符的详细信息,包括其@id
。 @id
是由Schema Registry分配的只读字段,用于引用API中的描述符。
{
"@id": "719a4391897c097786efbaa6d4262bb928a1cd88540344c6",
"@type": "xdm:descriptorIdentity",
"xdm:sourceSchema": "https://ns.adobe.com/{TENANT_ID}/schemas/ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"xdm:sourceVersion": 1,
"xdm:sourceProperty": "/personalEmail/address",
"imsOrg": "{ORG_ID}",
"version": "1",
"xdm:namespace": "Email",
"xdm:property": "xdm:code",
"xdm:isPrimary": true,
"meta:containerId": "tenant",
"meta:sandboxId": "28e74200-e3de-11e9-8f5d-7f27416c5f0d",
"meta:sandboxType": "production"
}
启用架构以便在Real-Time Customer Profile中使用 profile
在架构应用了主标识描述符后,您可以通过向meta:immutableTags
属性添加union
标记来启用忠诚度成员架构以供Real-Time Customer Profile使用。
添加union
标记
为了将架构包含在合并合并视图中,必须将union
标记添加到架构的meta:immutableTags
属性。 这是通过PATCH请求完成的,该请求用于更新架构并添加值为union
的meta:immutableTags
数组。
API格式
PATCH /tenant/schemas/{SCHEMA_ID}
{SCHEMA_ID}
meta:altId
或URL编码的$id
。请求
curl -X PATCH \
https://platform.adobe.io/data/foundation/schemaregistry/tenant/schemas/_{TENANT_ID}.schemas.533ca5da28087c44344810891b0f03d9 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d '[
{ "op": "add", "path": "/meta:immutableTags", "value": ["union"]}
]'
响应
响应显示操作已成功执行,架构现在包含顶级属性meta:immutableTags
,它是一个包含值“union”的数组。
{
"$id": "https://ns.adobe.com/{TENANT_ID}/schemas/ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:altId": "_{TENANT_ID}.schemas.ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:resourceType": "schemas",
"version": "1.4",
"title": "Loyalty Members",
"type": "object",
"description": "Information for all members of the loyalty program",
"allOf": [
{
"$ref": "https://ns.adobe.com/xdm/context/profile",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/xdm/context/profile-person-details",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/xdm/context/profile-personal-details",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/xdm/mixins/profile/profile-loyalty-details",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/{TENANT_ID}/mixins/9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691",
"type": "object",
"meta:xdmType": "object"
}
],
"refs": [
"https://ns.adobe.com/xdm/context/profile-person-details",
"https://ns.adobe.com/xdm/mixins/profile/profile-loyalty-details",
"https://ns.adobe.com/xdm/context/profile-personal-details",
"https://ns.adobe.com/xdm/context/profile",
"https://ns.adobe.com/{TENANT_ID}/mixins/9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691"
],
"imsOrg": "{ORG_ID}",
"meta:extensible": false,
"meta:abstract": false,
"meta:extends": [
"https://ns.adobe.com/xdm/context/profile-person-details",
"https://ns.adobe.com/xdm/mixins/profile/profile-loyalty-details",
"https://ns.adobe.com/xdm/context/profile-personal-details",
"https://ns.adobe.com/xdm/common/auditable",
"https://ns.adobe.com/xdm/data/record",
"https://ns.adobe.com/xdm/context/profile",
"https://ns.adobe.com/{TENANT_ID}/mixins/9068fd4ea2abf813f4fd2fc9c8b413ae453ff0efc7636691"
],
"meta:xdmType": "object",
"meta:registryMetadata": {
"repo:createdDate": 1673310304048,
"repo:lastModifiedDate": 1673380280074,
"xdm:createdClientId": "{CLIENT_ID}",
"xdm:lastModifiedClientId": "{CLIENT_ID}",
"xdm:createdUserId": "{USER_ID}",
"xdm:lastModifiedUserId": "{USER_ID}",
"eTag": "c590ccc7a293040d85c2b7d93276480ef4b4aa9a4fcd6991f50fbb47f58bced2",
"meta:globalLibVersion": "1.38.2"
},
"meta:class": "https://ns.adobe.com/xdm/context/profile",
"meta:containerId": "tenant",
"meta:sandboxId": "28e74200-e3de-11e9-8f5d-7f27416c5f0d",
"meta:sandboxType": "production",
"meta:tenantNamespace": "_{TENANT_ID}",
"meta:immutableTags": [
"union"
],
"meta:descriptorStatus": {
"result": []
}
}
在合并中列出架构
您现在已成功将架构添加到XDM Individual Profile联合。 要查看属于同一合并的所有架构的列表,您可以使用查询参数执行GET请求以筛选响应。
使用property
查询参数,您可以指定只返回包含meta:immutableTags
字段的架构,该字段的meta:class
等于XDM Individual Profile类的$id
。
API格式
GET /tenant/schemas?property=meta:immutableTags==union&property=meta:class=={CLASS_ID}
请求
下面的示例请求返回属于XDM Individual Profile并集的所有架构。
curl -X GET \
'https://platform.adobe.io/data/foundation/schemaregistry/tenant/schemas?property=meta:immutableTags==union&property=meta:class==https://ns.adobe.com/xdm/context/profile' \
-H 'Accept: application/vnd.adobe.xed-id+json' \
-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}'
响应
响应是一个经过过滤的架构列表,仅包含同时满足这两个要求的架构。 请记住,使用多个查询参数时,假定使用AND关系。 列表响应的格式取决于请求中发送的Accept
标头。
{
"results": [
{
"$id": "https://ns.adobe.com/{TENANT_ID}/schemas/d29a200b5deb6cfb55d3b865ef627f33",
"meta:altId": "_{TENANT_ID}.schemas.d29a200b5deb6cfb55d3b865ef627f33",
"version": "1.2",
"title": "Profile Schema"
},
{
"$id": "https://ns.adobe.com/{TENANT_ID}/schemas/5d70026f5522fc60b3c81f6523b83c86",
"meta:altId": "_{TENANT_ID}.schemas.5d70026f5522fc60b3c81f6523b83c86",
"version": "1.3",
"title": "CRM Onboarding"
},
{
"$id": "https://ns.adobe.com/{TENANT_ID}/schemas/653e53eb04341d09453c9b6a5fb43d1b4ca9526ec274856d",
"meta:altId": "_{TENANT_ID}.schemas.653e53eb04341d09453c9b6a5fb43d1b4ca9526ec274856d",
"version": "1.1",
"title": "Profile consents"
},
{
"$id": "https://ns.adobe.com/{TENANT_ID}/schemas/ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"meta:altId": "_{TENANT_ID}.schemas.ee56b80adc7e03b8214e135a28538fe83c7f85bf87f565b3",
"version": "1.4",
"title": "Loyalty Members"
}
],
"_page": {
"orderby": "updated",
"next": null,
"count": 4
},
"_links": {
"next": null,
"global_schemas": {
"href": "https://platform.adobe.io/data/foundation/schemaregistry/global/schemas?property=meta:immutableTags==union&property=meta:class==https://ns.adobe.com/xdm/context/profile"
}
}
}
后续步骤
通过遵循本教程,您已使用标准字段组和您定义的字段组成功编写了架构。 您现在可以使用此架构创建数据集并将记录数据摄取到Adobe Experience Platform。
在本教程中创建的完整忠诚度成员架构在以下附录中提供。 查看架构时,您可以看到字段组对整体结构的贡献以及哪些字段可用于数据摄取。
创建多个架构后,可通过使用关系描述符定义它们之间的关系。 有关详细信息,请参阅的教程,以定义两个架构之间的关系。 有关如何执行注册表中的所有操作(GET、POST、PUT、PATCH和DELETE)的详细示例,在使用API时请参阅架构注册表开发人员指南。
附录 appendix
以下信息补充了API教程。
完整忠诚度成员架构 complete-schema
在本教程中,将构成一个模式来描述零售忠诚度计划的成员。
架构实现XDM Individual Profile类并合并多个字段组。 它使用标准Demographic Details、个人联系人详细信息和忠诚度详细信息字段组,以及通过教程中定义的自定义忠诚度级别字段组捕获有关忠诚度成员的信息。
以下显示以JSON格式表示的已完成的忠诚度成员架构:
code language-json |
---|
|