대체 오퍼 만들기 create-fallback-offer
컨테이너 ID를 제공하는 동안 Offer Library API에 대한 POST 요청을 수행하여 대체 오퍼를 만들 수 있습니다.
Accept 및 Content-Type 헤더 accept-and-content-type-headers
다음 표는 요청 헤더의 Content-Type 및 Accept 필드를 구성하는 올바른 값을 보여 줍니다.
헤더 이름
값
수락
application/vnd.adobe.platform.xcore.xdm.receipt+json; version=1Content-Type
application/schema-instance+json; version=1; schema="https://ns.adobe.com/experience/offer-management/fallback-offer;version=0.1"API 형식
POST /{ENDPOINT_PATH}/{CONTAINER_ID}/instances
매개변수
설명
예
{ENDPOINT_PATH}저장소 API의 끝점 경로입니다.
https://platform.adobe.io/data/core/xcore/{CONTAINER_ID}대체 오퍼가 있는 컨테이너입니다.
e0bd8463-0913-4ca1-bd84-6309134ca1f6요청
curl -X POST \
'https://platform.adobe.io/data/core/xcore/e0bd8463-0913-4ca1-bd84-6309134ca1f6/instances' \
-H 'Accept: application/vnd.adobe.platform.xcore.xdm.receipt+json; version=1' \
-H 'Content-Type: application/schema-instance+json; version=1; schema="https://ns.adobe.com/experience/offer-management/fallback-offer;version=0.1"' \
-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 '{
"xdm:status": "approved",
"xdm:name": "Fallback for sales",
"xdm:representations": [
{
"xdm:components": [
{
"dc:language": [
"en"
],
"@type": "https://ns.adobe.com/experience/offer-management/content-component-html",
"dc:format": "text/html"
}
],
"xdm:channel": "https://ns.adobe.com/xdm/channel-types/web",
"xdm:placement": "xcore:offer-placement:124e0be5699743d3"
}
]
}'
응답
성공적인 응답이 고유 인스턴스 ID 및 배치 @id을(를) 포함하여 새로 만든 대체 오퍼에 대한 정보를 반환합니다. 이후 단계에서 인스턴스 ID를 사용하여 대체 오퍼를 업데이트하거나 삭제할 수 있습니다. 이후 자습서에서 고유한 대체 오퍼 @id을(를) 사용하여 결정을 만들 수 있습니다.
{
"instanceId": "b3966680-13ec-11eb-9c20-8323709cfc65",
"@id": "xcore:fallback-offer:124e2e764b1ac1b9",
"repo:etag": 1,
"repo:createdDate": "2023-10-21T22:28:11.111732Z",
"repo:lastModifiedDate": "2023-10-21T22:28:11.111732Z",
"repo:createdBy": "{CREATED_BY}",
"repo:lastModifiedBy": "{MODIFIED_BY}",
"repo:createdByClientId": "{CREATED_CLIENT_ID}",
"repo:lastModifiedByClientId": "{MODIFIED_CLIENT_ID}"
}
recommendation-more-help
b22c9c5d-9208-48f4-b874-1cefb8df4d76