에 POST 요청을 만들어 배치를 생성할 수 있습니다 Offer Library API, 컨테이너 ID를 제공하는 동안
다음 표에서는 컨텐츠 유형 및 수락 요청 헤더의 필드:
헤더 이름 | 값 |
---|---|
Accept | application/vnd.adobe.platform.xcore.xdm.receipt+json; version=1 |
Content-Type | application/schema-instance+json; version=1; schema="https://ns.adobe.com/experience/offer-management/offer-placement;version=0.4" |
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/offer-placement;version=0.4"' \
-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:name": "Sales Placement",
"xdm:componentType": "https://ns.adobe.com/experience/offer-management/content-component-html",
"xdm:channel": "https://ns.adobe.com/xdm/channel-types/web",
"xdm:description": "A test placement to contain offers"
}'
응답
성공적인 응답은 해당 고유 인스턴스 ID 및 배치를 포함하여 새로 생성된 배치의 세부 사항을 반환합니다 @id
. 이후 단계에서 인스턴스 ID를 사용하여 배치를 업데이트하거나 삭제할 수 있습니다. 고유한 배치를 사용할 수 있습니다 @id
나중에 자습서에서 결정, 의사 결정 규칙 및 대체 오퍼를 만들 수 있습니다.
{
"instanceId": "9aa58fd0-13d7-11eb-928b-576735ea4db8",
"@id": "xcore:offer-placement:124e0be5699743d3",
"repo:etag": 1,
"repo:createdDate": "2020-10-21T19:57:09.837456Z",
"repo:lastModifiedDate": "2020-10-21T19:57:09.837456Z",
"repo:createdBy": "{CREATED_BY}",
"repo:lastModifiedBy": "{MODIFIED_BY}",
"repo:createdByClientId": "{CREATED_CLIENT_ID}",
"repo:lastModifiedByClientId": "{MODIFIED_CLIENT_ID}"
}