Sie können eine bestimmte Entscheidungsregel nachschlagen, indem Sie eine GET-Anfrage an die Offer Library API, die die Entscheidungsregel enthält id
im Anfragepfad.
API-Format
GET /{ENDPOINT_PATH}/offer-rules/{ID}
Parameter | Beschreibung | Beispiel |
---|---|---|
{ENDPOINT_PATH} |
Der Endpunktpfad für Persistenz-APIs. | https://platform.adobe.io/data/core/dps/ |
{ID} |
Die ID der Entität, die Sie nachschlagen möchten. | offerRule1234 |
Anfrage
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}'
Antwort
Eine erfolgreiche Antwort gibt die Details der jeweiligen Entscheidungsregel zurück, die Sie nachgeschlagen haben, einschließlich Informationen zur eindeutigen Entscheidungsregel 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)))"
}
}