列出个性化产物建议 list-personalized-offers
个性化优惠是基于资格规则和约束的可自定义营销消息。
您可以通过对Offer Library API执行单个GET请求来查看所有个性化优惠的列表。
础笔滨格式
GET /{ENDPOINT_PATH}/offers?offer-type=personalized&{QUERY_PARAMS}
参数
描述
示例
{ENDPOINT_PATH}
持久性础笔滨的端点路径。
https://platform.adobe.io/data/core/dps
{QUERY_PARAMS}
用于筛选结果的可选查询参数。
limit=2
请求
curl -X GET 'https://platform.adobe.io/data/core/dps/offers?offer-type=personalized&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}'
使用查询参数 using-query-parameters
在列出资源时,您可以使用查询参数来分页并筛选结果。
分页 paging
分页最常见的查询参数包括:
参数
描述
示例
property
可选的属性过滤器:
- 这些属性按础狈顿操作进行分组。
- 参数可以重复,如:属性=调笔搁翱笔贰搁罢驰冲贰齿笔搁皑摆虫26;属性=调笔搁翱笔贰搁罢驰冲贰齿笔搁2皑…闭或属性=调笔搁翱笔贰搁罢驰冲贰齿笔搁1皑摆,调笔搁翱笔贰搁罢驰冲贰齿笔搁2皑…闭
- 属性表达式的格式为
[ !]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
limit
限制返回的投放位置数。
limit=5
响应
成功的响应将返回一个个性化优惠列表,这些优惠与您有权访问的那些优惠一起存在。
{
"results": [
{
"created": "2023-05-15T14:35:16.781+00:00",
"modified": "2023-05-15T14:38:26.691+00:00",
"etag": 2,
"schemas": [
"https://ns.adobe.com/experience/offer-management/personalized-offer;version=0.15"
],
"createdBy": "{CREATED_BY}",
"lastModifiedBy": "{MODIFIED_BY}",
"id": "personalizedOffer1234",
"name": "Test personalized offer with frequency constraint",
"status": "draft",
"representations": [
{
"channel": "https://ns.adobe.com/xdm/channel-types/web",
"placement": "offerPlacement1234",
"components": [
{
"type": "html",
"format": "text/html",
"language": [
"en-us"
],
"content": "Hello You qualify for our Discount of 60%"
}
]
}
],
"selectionConstraint": {
"startDate": "2022-07-27T05:00:00.000+00:00",
"endDate": "2023-07-29T05:00:00.000+00:00",
"profileConstraintType": "none"
},
"rank": {
"priority": 0
},
"cappingConstraint": {},
"frequencyCappingConstraints": [
{
"enabled": false,
"limit": 1,
"startDate": "2023-05-15T14:25:49.622+00:00",
"endDate": "2023-05-25T14:25:49.622+00:00",
"scope": "global",
"entity": "offer",
"repeat": {
"enabled": false,
"unit": "month",
"unitCount": 1
}
}
]
}
],
"count": 1,
"total": 1,
"_links": {
"self": {
"href": "/offers?offer-type=personalized&href={SELF_href}",
"type": "application/json"
}
}
}
如果响应中缺少多个个性化优惠,则执行分页。
响应
{
"results": [...],
"count": 2,
"total": 43,
"_links": {
"self": {
"href": "/offers?orderby=-modified&limit=2&offer-type=PERSONALIZED",
"type": "application/json"
},
"next": {
"href": "/offers?orderby=-modified&limit=2&start={TIMESTAMP}&offer-type=PERSONALIZED",
"type": "application/json"
}
}
}
量度
描述
total
个性化优惠的数量。
count
此响应中返回的选件数。
从_links.next.href
(如/offers?orderby=-modified&limit=2&start={TIMESTAMP}&offer-type=PERSONALIZED
)检索终结点并将其附加到础笔滨。
础笔滨格式
GET /{ENDPOINT_PATH}/offers?orderby=-modified&limit=2&start={TIMESTAMP}&offer-type=PERSONALIZED
{
"results": [...],
"count": 2,
"total": 43,
"_links": {
"self": {...},
"next": {
"href": "/offers?orderby=-modified&limit=2&start={TIMESTAMP}&offer-type=PERSONALIZED",
"type": "application/json"
}
}
}
同样,如果您不在首页,并且需要检索上一页的个性化优惠,请使用_links.prev
中的href
值。 向URL发出请求以获取上一组结果,如下面的示例所示。
响应
{
"results": [...],
"count": 2,
"total": 43,
"_links": {
"self": {...},
"next": {...},
"prev": {
"href": "/offers?orderby=-modified&limit=2&start={TIMESTAMP}&offer-type=PERSONALIZED",
"type": "application/json"
}
}
}
recommendation-more-help
b22c9c5d-9208-48f4-b874-1cefb8df4d76