[舊版]{class="badge informative"}
查詢遞補優惠 look-up-fallback-offers
TIP
Adobe Journey Optimizer 的新決策功能「決策」現在可透過程式碼型體驗和電子郵件管道使用!了解更多
您可以向Offer Library API發出GET要求,並在要求路徑中包含遞補優惠@id或遞補優惠的名稱,以查詢特定的遞補優惠。
API格式
GET /{ENDPOINT_PATH}/{CONTAINER_ID}/queries/core/search?schema={SCHEMA_FALLBACK_OFFER}&{QUERY_PARAMS}
參數
說明
範例
{ENDPOINT_PATH}存放庫API的端點路徑。
https://platform.adobe.io/data/core/xcore/{CONTAINER_ID}遞補優惠所在的容器。
e0bd8463-0913-4ca1-bd84-6309134ca1f6{SCHEMA_FALLBACK_OFFER}定義與遞補優惠方案關聯的結構描述。
https://ns.adobe.com/experience/offer-management/fallback-offer;version=0.1id用於比對實體
@id屬性的字串。 字串完全相符。 引數id和name不能一起使用。xcore:fallback-offer:122206064e0d98dfname用於比對實體的xdm:name屬性的字串。 字串以大寫完全相符,但可使用萬用字元。 引數
id和name不能一起使用F1: Web fallback要求
curl -X GET \
'https://platform.adobe.io/data/core/xcore/e0bd8463-0913-4ca1-bd84-6309134ca1f6/instances?schema=https://ns.adobe.com/experience/offer-management/fallback-offer;version=0.1&id=xcore:fallback-offer:122206064e0d98df' \
-H 'Accept: *,application/vnd.adobe.platform.xcore.hal+json; schema="https://ns.adobe.com/experience/xcore/hal/results"' \
-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}'
回應
成功的回應會傳回位置的詳細資料,包括容器ID、執行個體ID和唯一遞補優惠@id的相關資訊。
{
"containerId": "e0bd8463-0913-4ca1-bd84-6309134ca1f6",
"schemaNs": "https://ns.adobe.com/experience/offer-management/fallback-offer;version=0.1",
"requestTime": "2023-10-21T22:21:50.658080Z",
"_embedded": {
"results": [
{
"instanceId": "053bc610-f8f9-11ea-ad6e-775ad2c9b1a1",
"schemas": [
"https://ns.adobe.com/experience/offer-management/fallback-offer;version=0.5"
],
"productContexts": [
"acp"
],
"repo:etag": 3,
"repo:createdDate": "2023-09-17T15:18:20.657299Z",
"repo:lastModifiedDate": "2023-10-02T02:34:48.034583Z",
"repo:createdBy": "712B3670554A7AF17F000101@AdobeID",
"repo:lastModifiedBy": "68D9EA8559BC2D810A495CC2@AdobeID",
"repo:createdByClientId": "exc_app",
"repo:lastModifiedByClientId": "exc_app",
"_score": 0,
"_instance": {
"xdm:name": "F1: Web fallback ",
"xdm:representations": [
{
"xdm:components": [
{
"xdm:content": "aaa",
"@type": "https://ns.adobe.com/experience/offer-management/content-component-json",
"dc:format": "application/json",
"repo:name": "aa"
}
],
"xdm:channel": "https://ns.adobe.com/xdm/channel-types/web",
"xdm:placement": "xcore:offer-placement:122201b2150d98c2"
},
{
"xdm:components": [
{
"xdm:content": "bb",
"@type": "https://ns.adobe.com/experience/offer-management/content-component-html",
"dc:format": "text/html",
"repo:name": "bb"
}
],
"xdm:channel": "https://ns.adobe.com/xdm/channel-types/web",
"xdm:placement": "xcore:offer-placement:122201c34354a2b4"
},
{
"xdm:components": [
{
"xdm:deliveryURL": "https://mysite.com",
"@type": "https://ns.adobe.com/experience/offer-management/content-component-imagelink",
"dc:format": "image/png",
"repo:name": "ll"
}
],
"xdm:channel": "https://ns.adobe.com/xdm/channel-types/web",
"xdm:placement": "xcore:offer-placement:122207eddb05205a"
}
],
"xdm:status": "approved",
"xdm:tags": [],
"@id": "xcore:fallback-offer:122206064e0d98df"
},
"_links": {
"self": {
"name": "https://ns.adobe.com/experience/offer-management/fallback-offer;version=0.5#053bc610-f8f9-11ea-ad6e-775ad2c9b1a1",
"href": "/e0bd8463-0913-4ca1-bd84-6309134ca1f6/instances/053bc610-f8f9-11ea-ad6e-775ad2c9b1a1",
"@type": "https://ns.adobe.com/experience/offer-management/fallback-offer;version=0.5"
}
},
"sandboxName": "ode-prod-va7-edge-testing"
}
],
"total": 1,
"count": 1
},
"_links": {
"self": {
"href": "/e0bd8463-0913-4ca1-bd84-6309134ca1f6/instances?schema=https://ns.adobe.com/experience/offer-management/fallback-offer;version=0.1&id=xcore:fallback-offer:122206064e0d98df",
"@type": "https://ns.adobe.com/experience/xcore/hal/results"
}
}
}
recommendation-more-help
b22c9c5d-9208-48f4-b874-1cefb8df4d76