查詢決定規則 lookup-decision-rule

您可以透過向以下網址發出GET要求,查詢特定的決策規則: Offer Library 包含決定規則的API id 在請求路徑中。

API格式

GET /{ENDPOINT_PATH}/offer-rules/{ID}
參數
說明
範例
{ENDPOINT_PATH}
持續性API的端點路徑。
https://platform.adobe.io/data/core/dps/
{ID}
您要查閱之實體的ID。
offerRule1234

要求

curl -X GET 'https://platform.adobe.io/data/core/dps/offer-rules/offerRule1234' \
-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}'

回應

成功的回應會傳回您查詢的特定決定規則的詳細資料,包括其唯一決定規則的相關資訊 id.

  {
    "created": "2022-09-16T18:59:53.651+00:00",
    "modified": "2022-09-16T18:59:53.651+00:00",
    "etag": 1,
    "schemas": [
        "https://ns.adobe.com/experience/offer-management/eligibility-rule;version=0.3"
    ],
    "createdBy": "{CREATED_BY}",
    "lastModifiedBy": "{MODIFIED_BY}",
    "id": "offerRule1234",
    "name": "Californians with one or more purchases greater than $1000",
    "condition": {
        "type": "PQL",
        "format": "pql/text",
        "value": "homeAddress.stateProvince.equals(\"CA\", false) and (select var1 from xEvent where var1.eventType.equals(\"purchase\", true) and (var1.commerce.order.priceTotal = 1000.0 and var1.commerce.order.currencyCode.equals(\"USD\", false)))"
            }
}
recommendation-more-help
b22c9c5d-9208-48f4-b874-1cefb8df4d76