個人化優惠是根據適用性規則和限制的可自訂行銷訊息。
您可以透過對以下執行單一GET請求,檢視所有個人化優惠的清單: Offer Library API。
API格式
GET /{ENDPOINT_PATH}/offers?offer-type=personalized&{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/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}'
您可以在列出資源時,使用查詢引數來頁面和篩選結果。
分頁最常見的查詢引數包括:
參數 | 說明 | 範例 |
---|---|---|
property |
選用的屬性篩選器:
|
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"
}
}
}