列出收藏集 list-collections
集合是基于营销人员定义的预定义条件的优惠的子集,如优惠的类别。
您可以通过对执行单个GET请求来查看所有收藏集的列表 Offer Library API。
API格式
GET /{ENDPOINT_PATH}/offer-collections?{QUERY_PARAMS}
参数
描述
示例
{ENDPOINT_PATH}
持久性API的端点路径。
https://platform.adobe.io/data/core/dps
{QUERY_PARAMS}
用于筛选结果的可选查询参数。
limit=2
请求
curl -X GET 'https://platform.adobe.io/data/core/dps/offer-collections?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
可选的属性过滤器:
- 这些属性按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
limit
限制返回的实体数。
limit=5
响应
成功的响应将返回收藏集列表,这些收藏集位于您有权访问的容器中。
{
"results": [
{
"created": "2022-09-16T18:59:23.063+00:00",
"modified": "2022-09-16T18:59:23.063+00:00",
"etag": 1,
"schemas": [
"https://ns.adobe.com/experience/offer-management/offer-filter;version=0.4"
],
"createdBy": "{CREATED_BY}",
"lastModifiedBy": "{MODIFIED_BY}",
"id": "offerCollection1234",
"name": "Test Collection with tags",
"filterType": "any-tags",
"ids": [
"tag1234"
],
"labels": [
"core/C5",
"custom/myLabel"
]
},
{
"created": "2023-05-15T12:50:49.887+00:00",
"modified": "2023-05-15T12:50:49.887+00:00",
"etag": 1,
"schemas": [
"https://ns.adobe.com/experience/offer-management/offer-filter;version=0.4"
],
"createdBy": "{CREATED_BY}",
"lastModifiedBy": "{MODIFIED_BY}",
"id": "offerCollection5678",
"name": "Test Collection with offers",
"filterType": "offers",
"ids": [
"personalizedOffer1234",
"personalizedOffer5678"
]
}
],
"count": 2,
"total": 9,
"_links": {
"self": {
"href": "/offer-collections?href={SELF_HREF}&limit=2",
"type": "application/json"
},
"next": {
"href": "/offer-collections?href={NEXT_HREF}&limit=2",
"type": "application/json"
}
}
}
recommendation-more-help
b22c9c5d-9208-48f4-b874-1cefb8df4d76