プレースメントは、オファーの表示に使用するコンテナです。プレースメントを使用すると、メッセージ内の適切な場所に適切なオファーコンテンツが表示されます。オファーにコンテンツを追加すると、そのコンテンツを表示できるプレースメントを選択するように求められます。
Offer Library API に対して単一の GET リクエストを実行することで、コンテナ内のすべてのプレースメントのリストを表示できます。
API 形式
GET /{ENDPOINT_PATH}/{CONTAINER_ID}/queries/core/search?schema={SCHEMA_PLACEMENT}&{QUERY_PARAMS}
パラメーター | 説明 | 例 |
---|---|---|
{ENDPOINT_PATH} |
リポジトリ API のエンドポイントパス。 | https://platform.adobe.io/data/core/xcore/ |
{CONTAINER_ID} |
プレースメントが配置されているコンテナ。 | e0bd8463-0913-4ca1-bd84-6309134ca1f6 |
SCHEMA_PLACEMENT} |
プレースメントに関連付けられたスキーマを定義します。 | https://ns.adobe.com/experience/offer-management/offer-placement;version=0.4 |
{QUERY_PARAMS} |
結果をフィルターするオプションのクエリパラメーター。 | limit=2 |
リソースのリストを表示する際に、クエリパラメーターを使用してページを作成し、結果をフィルターできます。
ページングに最も一般的なクエリパラメーターは次のとおりです。
パラメーター | 説明 | 例 |
---|---|---|
q |
選択したフィールドで検索するオプションのクエリ文字列。クエリ文字列は小文字にする必要があり、二重引用符で囲むことで、トークン化を防ぎ、特殊文字をエスケープできます。次の文字 `+ - = && | |
qop |
「q」クエリ文字列パラメーターの値に AND または OR 演算子を適用します。 | AND または OR |
field |
検索を制限するフィールドのリスト(オプション)。このパラメーターは、field=field1[,field=field2,…] のように繰り返すことができます(パス式は「_instance.xdm:name」などのドット区切りパスの形式です)。 | _instance.xdm:name |
orderBy |
特定のプロパティで結果を並べ替えます。タイトルの前に - を追加すると(orderby=-title )、アイテムがタイトルの降順(Z-A)に並べ替えられます。 |
-repo:createdDate |
limit |
返されるプレースメントの数を制限します。 | limit=5 |
リクエスト
curl -X GET \
'https://platform.adobe.io/data/core/xcore/e0bd8463-0913-4ca1-bd84-6309134ca1f6/queries/core/search?schema=https://ns.adobe.com/experience/offer-management/offer-placement;version=0.4&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}'
応答
正常な応答では、アクセス可能なコンテナ内に存在するプレースメントのリストが返されます。
{
"containerId": "e0bd8463-0913-4ca1-bd84-6309134ca1f6",
"schemaNs": "https://ns.adobe.com/experience/offer-management/offer-placement;version=0.4",
"requestTime": "2020-10-21T19:48:51.843067Z",
"_embedded": {
"results": [
{
"instanceId": "0feb6a80-0f32-11eb-8110-e17787c335b5",
"schemas": [
"https://ns.adobe.com/experience/offer-management/offer-placement;version=0.4"
],
"productContexts": [
"acp"
],
"repo:etag": 2,
"repo:createdDate": "2020-10-15T22:02:05.480449Z",
"repo:lastModifiedDate": "2020-10-15T22:13:00.278175Z",
"repo:createdBy": "{CREATED_BY}",
"repo:lastModifiedBy": "{MODIFIED_BY}",
"repo:createdByClientId": "{CREATED_CLIENT_ID}",
"repo:lastModifiedByClientId": "{MODIFIED_CLIENT_ID}",
"_instance": {
"xdm:name": "New placement name",
"xdm:componentType": "https://ns.adobe.com/experience/offer-management/content-component-html",
"xdm:channel": "https://ns.adobe.com/xdm/channel-types/web",
"xdm:description": "Updated placement description",
"@id": "xcore:offer-placement:12466ef35fc5baa0"
},
"_links": {
"self": {
"name": "https://ns.adobe.com/experience/offer-management/offer-placement;version=0.4#0feb6a80-0f32-11eb-8110-e17787c335b5",
"href": "/e0bd8463-0913-4ca1-bd84-6309134ca1f6/instances/0feb6a80-0f32-11eb-8110-e17787c335b5",
"@type": "https://ns.adobe.com/experience/offer-management/offer-placement;version=0.4"
}
}
},
{
"instanceId": "269192b0-f8f2-11ea-8723-916b9fbadc53",
"schemas": [
"https://ns.adobe.com/experience/offer-management/offer-placement;version=0.4"
],
"productContexts": [
"acp"
],
"repo:etag": 1,
"repo:createdDate": "2020-09-17T14:29:10.107121Z",
"repo:lastModifiedDate": "2020-09-17T14:29:10.107121Z",
"repo:createdBy": "{CREATED_BY}",
"repo:lastModifiedBy": "{MODIFIED_BY}",
"repo:createdByClientId": "{CREATED_CLIENT_ID}",
"repo:lastModifiedByClientId": "{MODIFIED_CLIENT_ID}",
"_instance": {
"xdm:componentType": "https://ns.adobe.com/experience/offer-management/content-component-html",
"xdm:name": "demo placement",
"xdm:channel": "https://ns.adobe.com/xdm/channel-types/web",
"@id": "xcore:offer-placement:1221fac4e7340521"
},
"_links": {
"self": {
"name": "https://ns.adobe.com/experience/offer-management/offer-placement;version=0.4#269192b0-f8f2-11ea-8723-916b9fbadc53",
"href": "/e0bd8463-0913-4ca1-bd84-6309134ca1f6/instances/269192b0-f8f2-11ea-8723-916b9fbadc53",
"@type": "https://ns.adobe.com/experience/offer-management/offer-placement;version=0.4"
}
},
"sandboxName": "ode-prod-va7-edge-testing"
}
],
"total": 17,
"count": 2
},
"_links": {
"self": {
"href": "/e0bd8463-0913-4ca1-bd84-6309134ca1f6/queries/core/search?schema=https://ns.adobe.com/experience/offer-management/offer-placement;version=0.4&limit=2",
"@type": "https://ns.adobe.com/experience/xcore/hal/results"
},
"next": {
"href": "/e0bd8463-0913-4ca1-bd84-6309134ca1f6/queries/core/search?start=269192b0-f8f2-11ea-8723-916b9fbadc53&orderby=instanceId&schema=https://ns.adobe.com/experience/offer-management/offer-placement;version=0.4&limit=2",
"@type": "https://ns.adobe.com/experience/xcore/hal/results"
}
}
}