列出投放位置 list-placements
投放位置是用于展示优惠的容器。 版面有助于确保正确的选件内容显示在消息的正确位置。 向选件添加内容时,将要求您选择可以显示该内容的版面。
您可以通过对执行单个GET请求来查看所有投放的列表 Offer Library API。
API格式
GET /{ENDPOINT_PATH}/placements?{QUERY_PARAMS}
参数
描述
示例
{ENDPOINT_PATH}
存储库API的端点路径。
https://platform.adobe.io/data/core/dps
使用查询参数 using-query-parameters
在列出资源时,您可以使用查询参数来分页并筛选结果。
分页 paging
分页最常见的查询参数包括:
参数
描述
示例
property
可选的属性过滤器:
- 这些属性按AND操作进行分组。
- 参数可以重复,如下所示:属性={PROPERTY_EXPR}[属性(&P)={PROPERTY_EXPR2}…] 或属性={PROPERTY_EXPR1}[,{PROPERTY_EXPR2}…]
- 属性表达式采用格式
[ !]field[op]value
,替换为op
在[==,!=,<=,>=,<,>,~]
,支持正则表达式。
property=name!=abc&property=id~.*1234.*&property=description equivalent with property=name!=abc,id~.*1234.*,description.
orderBy
按特定属性对结果进行排序。 在名称前添加 — (orderby=-name)将按名称以降序对项目排序(Z-A)。 路径表达式采用点分隔路径的形式。 此参数可重复,如下所示:
orderby=field1[,-fields2,field3,...]
orderby=id
,-name
请求
curl -X GET 'https://platform.adobe.io/data/core/dps/placements?limit=2' \
-H 'Accept: *,application/json' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {IMS_ORG}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'
响应
成功的响应将返回一个投放位置列表,其中包含存在的投放位置和您有权访问的投放位置。
{
"results": [
{
"created": "2023-05-15T11:22:50.031+00:00",
"modified": "2023-05-15T11:22:50.031+00:00",
"etag": 1,
"schemas": [
"https://ns.adobe.com/experience/offer-management/offer-placement;version=0.5"
],
"createdBy": "{CREATED_BY}",
"lastModifiedBy": "{MODIFIED_BY}",
"id": "offerPlacement5678",
"name": "Placement one",
"description": "Placement description",
"componentType": "html",
"channel": "https://ns.adobe.com/xdm/channel-types/web",
"itemCount": 1,
"allowDuplicatePlacements": false,
"returnContent": false,
"returnMetaData": {
"decisionName": true,
"offerName": true,
"offerAttributes": true,
"offerPriority": true,
"placementName": true,
"channelType": true,
"contentType": true
}
},
{
"created": "2023-05-19T08:29:15.875+00:00",
"modified": "2023-05-19T08:29:15.875+00:00",
"etag": 1,
"schemas": [
"https://ns.adobe.com/experience/offer-management/offer-placement;version=0.5"
],
"createdBy": "{CREATED_BY}",
"lastModifiedBy": "{MODIFIED_BY}",
"id": "offerPlacement1234",
"name": "Placement two",
"description": "Placement description",
"componentType": "html",
"channel": "https://ns.adobe.com/xdm/channel-types/email",
"itemCount": 1,
"allowDuplicatePlacements": false,
"returnContent": false,
"returnMetaData": {
"decisionName": true,
"offerName": true,
"offerAttributes": true,
"offerPriority": true,
"placementName": true,
"channelType": true,
"contentType": true
}
}
],
"count": 2,
"total": 4,
"_links": {
"self": {
"href": "/placements?href={SELF_HREF}&limit=2",
"type": "application/json"
},
"next": {
"href": "/placements?href={NEXT_HREF}&limit=2",
"type": "application/json"
}
}
}
recommendation-more-help
b22c9c5d-9208-48f4-b874-1cefb8df4d76