Creare un posizionamento create-placement

Per creare un posizionamento, devi effettuare una richiesta POST al Offer Library API.

Intestazioni Accept e Content-Type accept-and-content-type-headers

La tabella seguente mostra i valori validi che compongono Content-Type nell’intestazione della richiesta:

Nome intestazione
Valore
Content-Type
application/json

Formato API

POST /{ENDPOINT_PATH}/placements
Parametro
Descrizione
Esempio
{ENDPOINT_PATH}
Percorso endpoint per le API di persistenza.
https://platform.adobe.io/data/core/dps/

Richiesta

curl -X POST 'https://platform.adobe.io/data/core/dps/placements' \
-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": "New placement",
    "description": "Placement description",
    "componentType": "html",
    "channel": "https://ns.adobe.com/xdm/channel-types/email",
    "itemCount": 1,
    "allowDuplicatePlacements": false,
    "returnContent": true,
    "returnMetaData": {
        "decisionName": false,
        "offerName": false,
        "offerAttributes": false,
        "offerPriority": false,
        "placementName": false,
        "channelType": false,
        "contentType": false
    }
}'

Risposta

In caso di esito positivo, la risposta restituisce i dettagli del posizionamento e del posizionamento appena creati id. Puoi utilizzare i passaggi it successivi per aggiornare o eliminare il posizionamento. Puoi utilizzare il tuo posizionamento univoco id nelle esercitazioni successive per creare decisioni, regole di decisione e offerte di fallback.

{
    "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