プレースメントのリスト 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={PROPERTY_EXPR}[&property={PROPERTY_EXPR2}…] または property={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