A decision contains the logic that informs the selection of an offer.
You can view a list of all decisions by performing a single GET request to the Offer Library API.
API format
GET /{ENDPOINT_PATH}/offer-decisions?{QUERY_PARAMS}
Parameter | Description | Example |
---|---|---|
{ENDPOINT_PATH} |
The endpoint path for persistence APIs. | https://platform.adobe.io/data/core/dps |
{QUERY_PARAMS} |
Optional query parameters to filter results by. | limit=2 |
Request
curl -X GET 'https://platform.adobe.io/data/core/dps/offer-decisions?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}'
You can use query parameters to page and filter results when listing resources.
The most common query parameters for paging include:
Parameter | Description | Example |
---|---|---|
property |
An optional property filter:
|
property=name!=abc&property=id~.*1234.*&property=description equivalent with property=name!=abc,id~.*1234.*,description. |
orderBy |
Sort results by a specific property. Adding a - before name (orderby=-name) will sort items by name in descending order (Z-A). Path expressions are in the form of dot separated paths. This parameter can be repeated like so: orderby=field1[,-fields2,field3,...] |
orderby=id ,-name |
limit |
Limit the number of entities returned. | limit=5 |
Response
A successful response returns a list of decisions you have access to.
{
"results": [
{
"created": "2022-07-05T09:02:02.835+00:00",
"modified": "2022-08-16T21:40:58.573+00:00",
"etag": 12,
"schemas": [
"https://ns.adobe.com/experience/offer-management/offer-activity;version=0.8"
],
"createdBy": "{CREATED_BY}",
"lastModifiedBy": "{MODIFIED_BY}",
"id": "offerDecision1234",
"name": "Test Decision One",
"status": "live",
"startDate": "2022-05-18T00:09:57.706+00:00",
"endDate": "2032-08-13T21:40:58.235+00:00",
"fallback": "fallbackOffer1234",
"criteria": [
{
"placements": [
"offerPlacement1234",
"offerPlacement5678"
],
"rank": {
"priority": 0,
"order": {
"orderEvaluationType": "ranking-strategy",
"rankingStrategy": "123456789123"
}
},
"profileConstraint": {
"profileConstraintType": "none"
},
"optionSelection": {
"filter": "offerCollection1234"
}
}
]
},
{
"created": "2022-09-05T14:12:13.773+00:00",
"modified": "2022-09-05T14:12:13.773+00:00",
"etag": 1,
"schemas": [
"https://ns.adobe.com/experience/offer-management/offer-activity;version=0.8"
],
"createdBy": "{CREATED_BY}",
"lastModifiedBy": "{MODIFIED_BY}",
"id": "offerDecision5678",
"name": "Test Decision Two",
"status": "live",
"startDate": "2022-08-31T21:00:00.000+00:00",
"endDate": "2023-02-03T22:00:00.000+00:00",
"fallback": "fallbackOffer5678",
"criteria": [
{
"placements": [
"offerPlacement1234"
],
"rank": {
"priority": 2
},
"optionSelection": {
"filter": "offerCollection5678"
}
},
{
"placements": [
"offerPlacement5678"
],
"rank": {
"priority": 1
},
"optionSelection": {
"filter": "offerCollection1234"
}
}
]
}
],
"count": 2,
"total": 21,
"_links": {
"self": {
"href": "/offer-decisions?href={SELF_HREF}&limit=2",
"type": "application/json"
},
"next": {
"href": "/offer-decisions?href={NEXT_HREF}&limit=2",
"type": "application/json"
}
}
}