清單位置 list-placements

版位是用來展示優惠方案的容器。 版位有助於確保正確的選件內容顯示在訊息的正確位置。 將內容新增至優惠方案時,系統會要求您選取可顯示該內容的版位。

您可以對Offer Library API執行單一GET要求,以檢視所有刊登版位的清單。

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}[&屬性={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