建立專案集合 create-decision-items
您可以透過向優惠資料庫API發出POST要求來建立專案集合。
API格式
POST /{ENDPOINT_PATH}/item-collections
參數
說明
範例
{ENDPOINT_PATH}
持續性API的端點路徑。
https://platform.adobe.io/data/core/dps
要求
curl -X POST 'https://platform.adobe.io/data/core/dps/item-collections' \
-H 'Content-Type: 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}' \
-d '{
"name": "Item collection One",
"description": "Item collection",
"constraints": [
{
"itemCatalogId": "itemCatalog1234",
"uiModel": "{\"operator\":\"equals\",\"value\":{\"left\":\"_experience.decisioning.decisionitem.itemName\",\"right\":\"Some offer item\"}}"
}
]
}'
回應
成功的回應會傳回新建立的決定專案的詳細資料,包括ID。 您可在後續步驟中使用ID來更新或刪除您的決定專案。
{
"etag": 1,
"createdBy": "{CREATED_BY}",
"lastModifiedBy": "{MODIFIED_BY}",
"id": "{ID}",
"sandboxId": "{SANDBOX_ID}",
"createdDate": "2023-05-31T15:09:11.771Z",
"lastModifiedDate": "2023-05-31T15:09:11.771Z",
"createdByClientId": "{CREATED_CLIENT_ID}",
"lastModifiedByClientId": "{MODIFIED_CLIENT_ID}"
}
recommendation-more-help
b22c9c5d-9208-48f4-b874-1cefb8df4d76