回應

成功的回應會傳回您主張的資訊,包括其唯一的xdm:propositionId

{
  "xdm:propositionId": "5d0ffb5e-dfc6-4280-99b6-0bf3131cb8b8",
  "xdm:propositions": [
    {
      "xdm:activity": {
        "xdm:id": "dps:activity:ffed0123",
        "repo:etag": 4
      },
      "xdm:placement": {
        "xdm:id": "dps:placement:ffed0456",
        "repo:etag": 1
      },
      "xdm:options": [
        {
          "xdm:id": "dps:personalized-option:ccc0111",
          "repo:etag": 3,
          "@type": "https://ns.adobe.com/experience/decisioning/content-component-html-template",
          "xdm:content": "<html>some html</html>"
        },
        {
          "xdm:id": "dps:personalized-option:ccc0222",
          "repo:etag": 5,
          "@type": "https://ns.adobe.com/experience/decisioning/content-component-html-template",
          "xdm:content": "<html>hello, world</html>",
          "xdm:score": 45.65
        }
      ]
    },
    {
      "xdm:activity": {
        "xdm:id": "dps:activity:ffed0123",
        "repo:etag": 4
      },
      "xdm:placement": {
        "xdm:id": "dps:placement:ffed0789",
        "repo:etag": 2
      },
      "xdm:fallback": {
        "xdm:id": "dps:fallback:ccc0222",
        "repo:etag": 5,
        "@type": "https://ns.adobe.com/experience/decisioning/content-component-imagelink",
        "dc:format": "image/png",
        "xdm:deliveryURL": "https://cdn.adobe.com/content/1445323-1134331.png",
        "xdm:content": "https://www.adobe.com/index2.html"
      }
    }
  ],
  "ode:createDate": 1566497582038
}
屬性說明範例
xdm:propositionId與XDM DecisionEvent相關聯之主張實體的唯一識別碼。"xdm:propositionId": "5d0ffb5e-dfc6-4280-99b6-0bf3131cb8b8"
xdm:propositions此物件包含單一決定主張。 可針對決定傳回多個選項。 如果找不到選項,則會傳回決定的遞補優惠。 單一決定主張一律包含options屬性或fallback屬性。 當出現時,options屬性不能是空的。
xdm:propositions.xdm:activity此物件包含決定的唯一識別碼。"xdm:id": "dps:activity:ffed0123"
xdm:propositions.xdm:placement此物件包含優惠方案位置的唯一識別碼。"xdm:id": "dps:placement:ffed0456"
xdm:propositions.xdm:options此物件包含單一選項,包括其唯一識別碼。 如果存在,此物件不得為空白。xdm:id": "dps:personalized-option:ccc0111
xdm:propositions.xdm:options.@type定義元件的型別。 @type充當使用者端的處理合約。 組裝體驗時,撰寫器會尋找具有特定型別的元件。https://ns.adobe.com/experience/offer-management/content-component-imagelink
xdm:propositions.xdm:content回應內容的格式。回應內容可以是: texthtml blockimage link
xdm:score選項的得分,計算方式為與選項或決定相關聯的排名函式。 如果排名功能涉及在排名期間決定優惠方案的分數,API會傳回此欄位。"xdm:score": 45.65
xdm:propositions.xdm:fallback此物件包含單一遞補優惠,包括其唯一識別碼。"xdm:id": "dps:fallback:ccc0222"
xdm:propositions.xdm:fallback.dc:format資源的實體或數位表現形式。 通常,格式應包括資源的媒體型別。 格式可用於決定顯示或操作資源所需的軟體、硬體或其他裝置。 建議從受控制的辭彙中選取值,例如,定義電腦媒體格式的網際網路媒體型別清單。"dc:format": "image/png""image/jpeg"
xdm:propositions.xdm:fallback.xdm:deliveryURL用於從內容傳遞網路或服務端點讀取資產的選用URL。 此URL可用來從使用者代理程式公開存取資產。https://d37yhxrr0p3l3l.cloudfront.net/0fd0f090-a148-11ea-89e3-f1f2ad52f7e8/urn:aaid:sc:US:a68c86a6-9295-4940-a083-11916b665500/0/40d78a12-f8b6-3f07-8e67-7cb8ae2cc7ec
ode:createDate決定回應訊息的建立時間。 以紀元時間表示。"ode:createDate": 1566497582038

回應代碼

下表列出回應中可傳回的所有程式碼:

程式碼說明
200成功。 已針對特定活動做出決定
400無效的請求引數。 由於語法錯誤,伺服器無法理解該請求。
403已禁止,許可權不足。
422無法處理的實體。 要求語法正確,但由於語意錯誤而無法處理。
429太多請求。 使用者在指定時間內已傳送過多請求。
500內部伺服器錯誤。 伺服器發生非預期的情況,導致它無法完成要求。
503由於伺服器超載,服務無法使用。 伺服器目前無法處理要求,因為暫時超載。

後續步驟

依照此API指南,您已使用Decisions API建立和傳遞優惠方案。 如需詳細資訊,請參閱決策管理🔗的概觀。

recommendation-more-help