Create a new treatment definition
Creates a new treatment definition based on the provided content
1{2 "name": "My Treatment Definition",3 "checkout": false,4 "locked": false,5 "sourceRevisionUri": "/treatmentDefinitions/definitions/6b53e248-1afb-4147-b17a-13e75b8c759b/revisions/0340f630-3ee6-4058-ad36-744619c141d5",6 "copyTimeStamp": "2020-06-17T13:37:01.750Z",7 "attributes": [8 {9 "name": "Discount",10 "valueConstraints": {11 "dataType": "number",12 "format": "decimal"13 },14 "defaultValue": 3015 },16 {17 "name": "Product",18 "valueConstraints": {19 "dataType": "string",20 "enum": [21 "iPhone",22 "Samsung"23 ]24 },25 "defaultValue": "iPhone"26 },27 {28 "name": "Offertext",29 "valueConstraints": {30 "dataType": "string"31 },32 "defaultValue": "Get a new iPhone now and get 30% off iPad"33 },34 {35 "name": "Budget",36 "valueConstraints": {37 "dataType": "number",38 "format": "decimal",39 "readOnly": true40 },41 "defaultValue": 50042 },43 {44 "name": "Goal",45 "valueConstraints": {46 "dataType": "string",47 "format": "date"48 },49 "defaultValue": "2018-07-13"50 },51 {52 "name": "TimesClicked",53 "valueConstraints": {54 "dataType": "number",55 "format": "integer"56 }57 }58 ]59}
Name | Type | Required | Description |
---|---|---|---|
parentFolderUri | string</folders/folders/{parentFolderId}> | false | Folder in which the new treatment definition is placed |
fromRevisionUri | string</treatmentDefinitions/definitions/{definitionId}/revisions/{revisionId}> | false | This value specifies the URI of the treatment definition revision from which the new treatment definition is being created. This property enables you to trace the lineage of a treatment definition. |
Treatment details that need to be created.
The representation of a treatment definition.
Name | Type | Required | Description |
---|---|---|---|
id | string | false | The system-assigned unique ID for this object. |
name | string | true | The treatment definition name. |
description | string | false | The treatment definition description. |
createdBy | string | false | The user who created the treatment definition. |
creationTimeStamp | string<date-time> | false | The date and time that the treatment definition was created. |
modifiedBy | string | false | The user ID of the authenticated user who last updated the treatment definition. |
modifiedTimeStamp | string<date-time> | false | The date and time that the treatment definition was last modified. |
majorRevision | integer | false | Major version number of the revision being viewed of the treatment definition. This value is assigned by the service, the user only has control on whether the major number or minor number is incremented when creating a new revision. |
minorRevision | integer | false | Minor version number of the current revision of the treatment definition. This value is assigned by the service, the user only has control on whether the major number or minor number is incremented when creating a new revision. |
checkout | boolean | false | Flag that indicates that the treatment definition is a user's working copy of another treatment definition. |
locked | boolean | false | Flag that indicates whether the content of the revision being viewed is locked or editable. |
status | string<enumeration> | false | The status of the treatment definition. Allowed values: validerror |
eligibility | Treatment Definition Eligibility | false | Represents the eligibility details for a treatment definition. This does not represent any of the top-level media types. |
attributes | array [Treatment Definition Attribute] | false | An array of treatment definition attributes. |
folderType | string | false | Indicates the type of folder where the treatment definition is stored. |
sourceRevisionUri | string | false | The URI of the treatment definition revision that the treatment definition is being created from. |
copyTimeStamp | string<date-time> | false | The time stamp when the treatment definition revision was copied. |
links | array [Link] | false | Zero or more links to related resources or operations. |
version | integer | false | This media type's schema version number. This representation is version 4. |
Status | Meaning | Description | ||
---|---|---|---|---|
201 | Created | A treatment definition was created. | Headers | Schema |
400 | Bad Request | The request was invalid. | Headers | Schema |