Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
PersonalizeCloud Portal
Sitecore Personalize developer documentation
  • Developing with Sitecore Personalize
    • Base URL
    • Response codes
        • Create a decision model variant
        • Retrieve a decision model variant
        • Update a decision model variant
        • Retrieve revisions
        • Retrieve a revision
  1. REST API Decision model variant
  1. Sitecore Personalize developer documentation
  2. REST APIs

Update a decision model variant

GET /v2/decisionModelVariants/<decisionModelVariantRef>

Updates a decision model variant.

AttributeTypeDescriptionExample
decisionModelVariantRefstringThe reference of the decision model variant.

If you do not know the decision model variant reference, first retrieve decision model variants.
c682b6b6-934b-415b-bc46-ce6184809156

At a minimum, you must provide the following required attributes in the request body:

AttributeTypeDescriptionExample
namestringThe name of the decision model."Determine Ancillary Upsell Variant 2"
definitionstringThe definition of the decision model variant that belongs to the decision canvas."mys3cr3tstr1ingforauth1!x"
curl -X PUT '<baseURL>/v2/decisionModelVariants/c682b6b6-934b-415b-bc46-ce6184809156' \
-H 'Authorization: Bearer <accessToken>' \
-H 'Accept: application/json' \
--raw-data '
{
    "name": "Determine Ancillary Upsell Variant 2",
    "definition": "Control"
}'
{
    "clientKey": "pqsPERS3lw12v5a9rrHPW1c4hET73GxQ",
    "href": "<baseURL>/v2/decisionModelVariants/c682b6b6-934b-415b-bc46-ce6184809156",
    "ref": "c682b6b6-934b-415b-bc46-ce6184809156",
    "name": "Determine Ancillary Upsell Variant 2",
    "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",
    "transpiledDefinition": "Control",
    "revisions": {
        "href": "<baseURL>/v2/decisionModelVariants/c682b6b6-934b-415b-bc46-ce6184809156/revisions"
    },
    "offers": []
}
If you have suggestions for improving this article, let us know!

© Copyright , Sitecore A/S or a Sitecore affiliated company.
All rights reserved.

Privacy policySitecore Trust CenterTerms of use
PersonalizeCloud Portal