フォールバックオファーを作成 create-fallback-offer
Offer Library API に対して POST リクエストを実行することで、フォールバックオファーを作成できます。
Accept ヘッダーと Content-Type ヘッダー accept-and-content-type-headers
次の表に、リクエストヘッダーの「Content-Type」フィールドを構成する有効な値を示します。
ヘッダー名
値
Content-Type
application/json
API 形式
POST /{ENDPOINT_PATH}/offers/{ID}?offer-type=fallback
パラメーター
説明
例
{ENDPOINT_PATH}
永続性 API のエンドポイントパス。
https://platform.adobe.io/data/core/dps/
リクエスト
curl -X POST 'https://platform.adobe.io/data/core/dps/offers?offer-type=fallback' \
-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": "Test Fallback Offer DPS",
"description": "Fallback Offer description",
"status": "approved",
"selectionConstraint": {
"startDate": "2022-06-10T00:30:00.000+00:00",
"endDate": "2032-06-06T23:29:21.402+00:00",
"profileConstraintType": "none"
},
"representations": [
{
"components": [
{
"deliveryURL": "https://mysite.com",
"type": "imagelink",
"format": "image/png"
}
],
"channel": "https://ns.adobe.com/xdm/channel-types/web",
"placement": "offerPlacement1234"
}
],
"rank": {
"priority": 1
}
}'
応答
正常な応答の場合は、一意のフォールバックオファー id
など、新しく作成されたフォールバックオファーに関する情報が返されます。後の手順で id
を使用して、フォールバックオファーを更新または削除したり、後のチュートリアルで決定を作成したりできます。
{
"etag": 2,
"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