Skip to main content

Use the update decision model variant function in Sitecore CDP REST API

Abstract

How to update a decision model variant in Sitecore CDP (Data model 2.1).

You can use the Decision Model Variant REST API to perform the update a decision model variant function to update a decision model variant. To do this, you must have the decisionModelVariantRef attribute returned when retrieving the decision model variant reference.

To update a decision model variant in Sitecore CDP, use the following:

PUT: https://apiEndpoint/v2/decisionModelVariants/decisionModelVariantRef

Attribute

Description

Type

decisionModelVariantRef

The reference of the decision model variant.

string

{
    "name": "Control",
    "modifiedByUserRef": "f58e3f5a-dc4a-4dde-acf9-998580eb1975",
    "modifiedAt": "2018-03-10T18:28:46.269Z",
    "revision": 1,
    "archived": false,
    "decisionModelDefinitionRef": "6d009415-294a-4981-9341-bfa0d4867c50",
    "definition": "Control",
    "revisions": {
        "href": "https://{apiEndpoint}/v2/decisionModelVariants/d10eb511-8ac7-44eb-a304-bdb141069084/revisions"
    },
    "decisionModelDefinition": {
        "href": "https://{apiEndpoint}/v2/decisionModelDefinitions/6d009415-294a-4981-9341-bfa0d4867c50"
    },
    "offers": [],
    "inProduction": false
}

The following is a 200 response:

{
    "clientKey": "pqsPERS3lw12v5a9rrHPW1c4hET73GxQ",
    "href": "https://{apiEndpoint}/v2/decisionModelVariants/d10eb511-8ac7-44eb-a304-bdb141069084",
    "ref": "d10eb511-8ac7-44eb-a304-bdb141069084",
    "name": "Control",
    "modifiedByUserRef": "25f46901-bc51-45e8-b587-148aecf1e48f",
    "modifiedAt": "2018-10-12T13:13:53.454Z",
    "revision": 5,
    "archived": false,
    "decisionModelDefinitionRef": "6d009415-294a-4981-9341-bfa0d4867c50",
    "definition": "Control",
    "revisions": {
        "href": "https://{apiEndpoint}/v2/decisionModelVariants/d10eb511-8ac7-44eb-a304-bdb141069084/revisions"
    },
    "offers": []
}