Evo Voice

<back to all web services

PatchSettingsObject

Update the specified settings object

Requires Authentication
Required role:User
The following routes are available for this service:
PATCH/app/settings-objects/{id}
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Voice.Api.App;
using Voice.Api.Flows.Data;
using Voice.Api.Endpoints;

namespace Voice.Api.App
{
    ///<summary>
    ///Update the specified settings object
    ///</summary>
    [Api(Description="Update the specified settings object")]
    public partial class PatchSettingsObject
        : IPatch
    {
        ///<summary>
        ///The ID of the settings object
        ///</summary>
        [ApiMember(Description="The ID of the settings object")]
        public virtual string Id { get; set; }

        ///<summary>
        ///The data values to set
        ///</summary>
        [ApiMember(Description="The data values to set")]
        public virtual Struct Data { get; set; }
    }

    public partial class SettingsField
    {
        public SettingsField()
        {
            PossibleValues = new List<SettingsPossibleValue>{};
        }

        public virtual string Name { get; set; }
        public virtual string DisplayName { get; set; }
        public virtual ValueTypes Type { get; set; }
        public virtual Value Value { get; set; }
        public virtual bool ReadOnly { get; set; }
        public virtual List<SettingsPossibleValue> PossibleValues { get; set; }
        public virtual DataField DataField { get; set; }
    }

    public partial class SettingsObject
    {
        public SettingsObject()
        {
            Fields = new List<SettingsField>{};
        }

        public virtual string Id { get; set; }
        public virtual string Name { get; set; }
        public virtual string Description { get; set; }
        public virtual bool ReadOnly { get; set; }
        public virtual SettingsObjectTypes Type { get; set; }
        public virtual EndpointTypes? EndpointType { get; set; }
        public virtual List<SettingsField> Fields { get; set; }
    }

    public enum SettingsObjectTypes
    {
        Endpoint,
        Customer,
    }

    public partial class SettingsPossibleValue
    {
        public virtual string DisplayName { get; set; }
        public virtual Value Value { get; set; }
    }

}

namespace Voice.Api.Endpoints
{
    public enum EndpointTypes
    {
        PhoneNumber,
        User,
        FaxNumber,
        EmailAddress,
        Unused_1,
        Unused_2,
        Unused_3,
        Unused_4,
        Unused_5,
        Team,
    }

    public enum UserDataFieldModes
    {
        Hidden,
        ReadOnly,
        ReadWrite,
    }

}

namespace Voice.Api.Flows.Data
{
    public partial class DataField
    {
        public DataField()
        {
            PossibleValues = new List<string>{};
        }

        public virtual string Id { get; set; }
        public virtual string Name { get; set; }
        public virtual ValueTypes Type { get; set; }
        public virtual UIHints UIHint { get; set; }
        public virtual string UITab { get; set; }
        public virtual bool IsAsync { get; set; }
        public virtual bool DisableBinding { get; set; }
        public virtual DataType StructType { get; set; }
        public virtual DataType ListType { get; set; }
        public virtual string Description { get; set; }
        public virtual List<string> PossibleValues { get; set; }
        public virtual bool IsOutput { get; set; }
        public virtual string CustomFieldValuesUrl { get; set; }
        public virtual Value DefaultValue { get; set; }
        public virtual string TransitionNameFormat { get; set; }
        public virtual DataFieldUniqueness Uniqueness { get; set; }
        public virtual bool VoiceOnly { get; set; }
        public virtual string ConditionalVisibilityField { get; set; }
        public virtual string ConditionalVisibilityValue { get; set; }
        public virtual bool NoEvalTemplate { get; set; }
        public virtual UserDataFieldModes UserMode { get; set; }
        public virtual bool AnyValueType { get; set; }
    }

    public enum DataFieldUniqueness
    {
        NotUnique,
        Unique,
        UniqueToCustomer,
    }

    public partial class DataType
    {
        public DataType()
        {
            Fields = new List<DataField>{};
        }

        public virtual string TypeName { get; set; }
        public virtual List<DataField> Fields { get; set; }
    }

    public partial class Struct
        : Dictionary<string, Value>
    {
    }

    public enum UIHints
    {
        None,
        LargeText,
        InlineForm,
        Password,
        InlineStruct,
    }

    public partial class Value
    {
        public Value()
        {
            ListValue = new List<Struct>{};
        }

        public virtual bool? BoolValue { get; set; }
        public virtual string StringValue { get; set; }
        public virtual double? NumberValue { get; set; }
        public virtual List<Struct> ListValue { get; set; }
        public virtual Struct StructValue { get; set; }
    }

    public enum ValueTypes
    {
        NotSpecified,
        String,
        Boolean,
        Number,
        List,
        Struct,
        Transition,
        Custom,
        Date,
        AudioFile,
        TimeZoneId,
        PhoneNumber,
        User,
        Endpoint,
        Time,
        File,
        FaxNumber,
        EmailAccount,
        Customer,
        Flow,
        Team,
        FlowReference,
        Integration,
    }

}

C# PatchSettingsObject DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PATCH /app/settings-objects/{id} HTTP/1.1 
Host: evovoice.io 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	id: String,
	data: 
	{
		String: 
		{
			boolValue: False,
			stringValue: String,
			numberValue: 0,
			listValue: 
			[
				{
					String: 
					{
						boolValue: False,
						stringValue: String,
						numberValue: 0,
						listValue: 
						[
							{
								String: 
								{
									boolValue: False,
									stringValue: String,
									numberValue: 0,
									listValue: 
									[
										null
									]
								}
							}
						],
						structValue: 
						{
							String: 
							{
								boolValue: False,
								stringValue: String,
								numberValue: 0,
								listValue: 
								[
									null
								]
							}
						}
					}
				}
			],
			structValue: 
			{
				String: 
				{
					boolValue: False,
					stringValue: String,
					numberValue: 0,
					listValue: 
					[
						{
							String: 
							{
								boolValue: False,
								stringValue: String,
								numberValue: 0,
								listValue: 
								[
									null
								]
							}
						}
					],
					structValue: 
					{
						String: 
						{
							boolValue: False,
							stringValue: String,
							numberValue: 0,
							listValue: 
							[
								null
							]
						}
					}
				}
			}
		}
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	id: String,
	name: String,
	description: String,
	readOnly: False,
	type: Endpoint,
	endpointType: PhoneNumber,
	fields: 
	[
		{
			name: String,
			displayName: String,
			type: NotSpecified,
			value: 
			{
				boolValue: False,
				stringValue: String,
				numberValue: 0,
				listValue: 
				[
					{
						String: 
						{
							boolValue: False,
							stringValue: String,
							numberValue: 0,
							listValue: 
							[
								{
									String: 
									{
										boolValue: False,
										stringValue: String,
										numberValue: 0,
										listValue: 
										[
											{
												
											}
										],
										structValue: {}
									}
								}
							],
							structValue: 
							{
								String: 
								{
									boolValue: False,
									stringValue: String,
									numberValue: 0,
									listValue: 
									[
										{
											
										}
									],
									structValue: {}
								}
							}
						}
					}
				],
				structValue: 
				{
					String: 
					{
						boolValue: False,
						stringValue: String,
						numberValue: 0,
						listValue: 
						[
							{
								String: 
								{
									boolValue: False,
									stringValue: String,
									numberValue: 0,
									listValue: 
									[
										{
											
										}
									],
									structValue: {}
								}
							}
						],
						structValue: 
						{
							String: 
							{
								boolValue: False,
								stringValue: String,
								numberValue: 0,
								listValue: 
								[
									{
										
									}
								],
								structValue: {}
							}
						}
					}
				}
			},
			readOnly: False,
			possibleValues: 
			[
				{
					displayName: String,
					value: 
					{
						boolValue: False,
						stringValue: String,
						numberValue: 0,
						listValue: 
						[
							{
								String: 
								{
									boolValue: False,
									stringValue: String,
									numberValue: 0,
									listValue: 
									[
										{
											String: 
											{
												boolValue: False,
												stringValue: String,
												numberValue: 0,
												listValue: 
												[
													{
														
													}
												],
												structValue: {}
											}
										}
									],
									structValue: 
									{
										String: 
										{
											boolValue: False,
											stringValue: String,
											numberValue: 0,
											listValue: 
											[
												{
													
												}
											],
											structValue: {}
										}
									}
								}
							}
						],
						structValue: 
						{
							String: 
							{
								boolValue: False,
								stringValue: String,
								numberValue: 0,
								listValue: 
								[
									{
										String: 
										{
											boolValue: False,
											stringValue: String,
											numberValue: 0,
											listValue: 
											[
												{
													
												}
											],
											structValue: {}
										}
									}
								],
								structValue: 
								{
									String: 
									{
										boolValue: False,
										stringValue: String,
										numberValue: 0,
										listValue: 
										[
											{
												
											}
										],
										structValue: {}
									}
								}
							}
						}
					}
				}
			],
			dataField: 
			{
				id: String,
				name: String,
				type: NotSpecified,
				uiHint: None,
				uiTab: String,
				isAsync: False,
				disableBinding: False,
				structType: 
				{
					typeName: String,
					fields: 
					[
						{
							id: String,
							name: String,
							type: NotSpecified,
							uiHint: None,
							uiTab: String,
							isAsync: False,
							disableBinding: False,
							structType: 
							{
								typeName: String,
								fields: 
								[
									{
										id: String,
										name: String,
										type: NotSpecified,
										uiHint: None,
										uiTab: String,
										isAsync: False,
										disableBinding: False,
										structType: 
										{
											typeName: String,
											fields: 
											[
												{
													
												}
											]
										},
										listType: 
										{
											typeName: String,
											fields: 
											[
												{
													
												}
											]
										},
										description: String,
										possibleValues: 
										[
											String
										],
										isOutput: False,
										customFieldValuesUrl: String,
										defaultValue: 
										{
											boolValue: False,
											stringValue: String,
											numberValue: 0,
											listValue: 
											[
												{
													String: 
													{
														boolValue: False,
														stringValue: String,
														numberValue: 0,
														listValue: 
														[
															{
																String: 
																{
																	boolValue: False,
																	stringValue: String,
																	numberValue: 0,
																	listValue: 
																	[
																		{
																			
																		}
																	],
																	structValue: {}
																}
															}
														],
														structValue: 
														{
															String: 
															{
																boolValue: False,
																stringValue: String,
																numberValue: 0,
																listValue: 
																[
																	{
																		
																	}
																],
																structValue: {}
															}
														}
													}
												}
											],
											structValue: 
											{
												String: 
												{
													boolValue: False,
													stringValue: String,
													numberValue: 0,
													listValue: 
													[
														{
															String: 
															{
																boolValue: False,
																stringValue: String,
																numberValue: 0,
																listValue: 
																[
																	{
																		
																	}
																],
																structValue: {}
															}
														}
													],
													structValue: 
													{
														String: 
														{
															boolValue: False,
															stringValue: String,
															numberValue: 0,
															listValue: 
															[
																{
																	
																}
															],
															structValue: {}
														}
													}
												}
											}
										},
										transitionNameFormat: String,
										uniqueness: NotUnique,
										voiceOnly: False,
										conditionalVisibilityField: String,
										conditionalVisibilityValue: String,
										noEvalTemplate: False,
										userMode: Hidden,
										anyValueType: False
									}
								]
							},
							listType: 
							{
								typeName: String,
								fields: 
								[
									{
										id: String,
										name: String,
										type: NotSpecified,
										uiHint: None,
										uiTab: String,
										isAsync: False,
										disableBinding: False,
										structType: 
										{
											typeName: String,
											fields: 
											[
												{
													
												}
											]
										},
										listType: 
										{
											typeName: String,
											fields: 
											[
												{
													
												}
											]
										},
										description: String,
										possibleValues: 
										[
											String
										],
										isOutput: False,
										customFieldValuesUrl: String,
										defaultValue: 
										{
											boolValue: False,
											stringValue: String,
											numberValue: 0,
											listValue: 
											[
												{
													String: 
													{
														boolValue: False,
														stringValue: String,
														numberValue: 0,
														listValue: 
														[
															{
																String: 
																{
																	boolValue: False,
																	stringValue: String,
																	numberValue: 0,
																	listValue: 
																	[
																		{
																			
																		}
																	],
																	structValue: {}
																}
															}
														],
														structValue: 
														{
															String: 
															{
																boolValue: False,
																stringValue: String,
																numberValue: 0,
																listValue: 
																[
																	{
																		
																	}
																],
																structValue: {}
															}
														}
													}
												}
											],
											structValue: 
											{
												String: 
												{
													boolValue: False,
													stringValue: String,
													numberValue: 0,
													listValue: 
													[
														{
															String: 
															{
																boolValue: False,
																stringValue: String,
																numberValue: 0,
																listValue: 
																[
																	{
																		
																	}
																],
																structValue: {}
															}
														}
													],
													structValue: 
													{
														String: 
														{
															boolValue: False,
															stringValue: String,
															numberValue: 0,
															listValue: 
															[
																{
																	
																}
															],
															structValue: {}
														}
													}
												}
											}
										},
										transitionNameFormat: String,
										uniqueness: NotUnique,
										voiceOnly: False,
										conditionalVisibilityField: String,
										conditionalVisibilityValue: String,
										noEvalTemplate: False,
										userMode: Hidden,
										anyValueType: False
									}
								]
							},
							description: String,
							possibleValues: 
							[
								String
							],
							isOutput: False,
							customFieldValuesUrl: String,
							defaultValue: 
							{
								boolValue: False,
								stringValue: String,
								numberValue: 0,
								listValue: 
								[
									{
										String: 
										{
											boolValue: False,
											stringValue: String,
											numberValue: 0,
											listValue: 
											[
												{
													String: 
													{
														boolValue: False,
														stringValue: String,
														numberValue: 0,
														listValue: 
														[
															{
																
															}
														],
														structValue: {}
													}
												}
											],
											structValue: 
											{
												String: 
												{
													boolValue: False,
													stringValue: String,
													numberValue: 0,
													listValue: 
													[
														{
															
														}
													],
													structValue: {}
												}
											}
										}
									}
								],
								structValue: 
								{
									String: 
									{
										boolValue: False,
										stringValue: String,
										numberValue: 0,
										listValue: 
										[
											{
												String: 
												{
													boolValue: False,
													stringValue: String,
													numberValue: 0,
													listValue: 
													[
														{
															
														}
													],
													structValue: {}
												}
											}
										],
										structValue: 
										{
											String: 
											{
												boolValue: False,
												stringValue: String,
												numberValue: 0,
												listValue: 
												[
													{
														
													}
												],
												structValue: {}
											}
										}
									}
								}
							},
							transitionNameFormat: String,
							uniqueness: NotUnique,
							voiceOnly: False,
							conditionalVisibilityField: String,
							conditionalVisibilityValue: String,
							noEvalTemplate: False,
							userMode: Hidden,
							anyValueType: False
						}
					]
				},
				listType: 
				{
					typeName: String,
					fields: 
					[
						{
							id: String,
							name: String,
							type: NotSpecified,
							uiHint: None,
							uiTab: String,
							isAsync: False,
							disableBinding: False,
							structType: 
							{
								typeName: String,
								fields: 
								[
									{
										id: String,
										name: String,
										type: NotSpecified,
										uiHint: None,
										uiTab: String,
										isAsync: False,
										disableBinding: False,
										structType: 
										{
											typeName: String,
											fields: 
											[
												{
													
												}
											]
										},
										listType: 
										{
											typeName: String,
											fields: 
											[
												{
													
												}
											]
										},
										description: String,
										possibleValues: 
										[
											String
										],
										isOutput: False,
										customFieldValuesUrl: String,
										defaultValue: 
										{
											boolValue: False,
											stringValue: String,
											numberValue: 0,
											listValue: 
											[
												{
													String: 
													{
														boolValue: False,
														stringValue: String,
														numberValue: 0,
														listValue: 
														[
															{
																String: 
																{
																	boolValue: False,
																	stringValue: String,
																	numberValue: 0,
																	listValue: 
																	[
																		{
																			
																		}
																	],
																	structValue: {}
																}
															}
														],
														structValue: 
														{
															String: 
															{
																boolValue: False,
																stringValue: String,
																numberValue: 0,
																listValue: 
																[
																	{
																		
																	}
																],
																structValue: {}
															}
														}
													}
												}
											],
											structValue: 
											{
												String: 
												{
													boolValue: False,
													stringValue: String,
													numberValue: 0,
													listValue: 
													[
														{
															String: 
															{
																boolValue: False,
																stringValue: String,
																numberValue: 0,
																listValue: 
																[
																	{
																		
																	}
																],
																structValue: {}
															}
														}
													],
													structValue: 
													{
														String: 
														{
															boolValue: False,
															stringValue: String,
															numberValue: 0,
															listValue: 
															[
																{
																	
																}
															],
															structValue: {}
														}
													}
												}
											}
										},
										transitionNameFormat: String,
										uniqueness: NotUnique,
										voiceOnly: False,
										conditionalVisibilityField: String,
										conditionalVisibilityValue: String,
										noEvalTemplate: False,
										userMode: Hidden,
										anyValueType: False
									}
								]
							},
							listType: 
							{
								typeName: String,
								fields: 
								[
									{
										id: String,
										name: String,
										type: NotSpecified,
										uiHint: None,
										uiTab: String,
										isAsync: False,
										disableBinding: False,
										structType: 
										{
											typeName: String,
											fields: 
											[
												{
													
												}
											]
										},
										listType: 
										{
											typeName: String,
											fields: 
											[
												{
													
												}
											]
										},
										description: String,
										possibleValues: 
										[
											String
										],
										isOutput: False,
										customFieldValuesUrl: String,
										defaultValue: 
										{
											boolValue: False,
											stringValue: String,
											numberValue: 0,
											listValue: 
											[
												{
													String: 
													{
														boolValue: False,
														stringValue: String,
														numberValue: 0,
														listValue: 
														[
															{
																String: 
																{
																	boolValue: False,
																	stringValue: String,
																	numberValue: 0,
																	listValue: 
																	[
																		{
																			
																		}
																	],
																	structValue: {}
																}
															}
														],
														structValue: 
														{
															String: 
															{
																boolValue: False,
																stringValue: String,
																numberValue: 0,
																listValue: 
																[
																	{
																		
																	}
																],
																structValue: {}
															}
														}
													}
												}
											],
											structValue: 
											{
												String: 
												{
													boolValue: False,
													stringValue: String,
													numberValue: 0,
													listValue: 
													[
														{
															String: 
															{
																boolValue: False,
																stringValue: String,
																numberValue: 0,
																listValue: 
																[
																	{
																		
																	}
																],
																structValue: {}
															}
														}
													],
													structValue: 
													{
														String: 
														{
															boolValue: False,
															stringValue: String,
															numberValue: 0,
															listValue: 
															[
																{
																	
																}
															],
															structValue: {}
														}
													}
												}
											}
										},
										transitionNameFormat: String,
										uniqueness: NotUnique,
										voiceOnly: False,
										conditionalVisibilityField: String,
										conditionalVisibilityValue: String,
										noEvalTemplate: False,
										userMode: Hidden,
										anyValueType: False
									}
								]
							},
							description: String,
							possibleValues: 
							[
								String
							],
							isOutput: False,
							customFieldValuesUrl: String,
							defaultValue: 
							{
								boolValue: False,
								stringValue: String,
								numberValue: 0,
								listValue: 
								[
									{
										String: 
										{
											boolValue: False,
											stringValue: String,
											numberValue: 0,
											listValue: 
											[
												{
													String: 
													{
														boolValue: False,
														stringValue: String,
														numberValue: 0,
														listValue: 
														[
															{
																
															}
														],
														structValue: {}
													}
												}
											],
											structValue: 
											{
												String: 
												{
													boolValue: False,
													stringValue: String,
													numberValue: 0,
													listValue: 
													[
														{
															
														}
													],
													structValue: {}
												}
											}
										}
									}
								],
								structValue: 
								{
									String: 
									{
										boolValue: False,
										stringValue: String,
										numberValue: 0,
										listValue: 
										[
											{
												String: 
												{
													boolValue: False,
													stringValue: String,
													numberValue: 0,
													listValue: 
													[
														{
															
														}
													],
													structValue: {}
												}
											}
										],
										structValue: 
										{
											String: 
											{
												boolValue: False,
												stringValue: String,
												numberValue: 0,
												listValue: 
												[
													{
														
													}
												],
												structValue: {}
											}
										}
									}
								}
							},
							transitionNameFormat: String,
							uniqueness: NotUnique,
							voiceOnly: False,
							conditionalVisibilityField: String,
							conditionalVisibilityValue: String,
							noEvalTemplate: False,
							userMode: Hidden,
							anyValueType: False
						}
					]
				},
				description: String,
				possibleValues: 
				[
					String
				],
				isOutput: False,
				customFieldValuesUrl: String,
				defaultValue: 
				{
					boolValue: False,
					stringValue: String,
					numberValue: 0,
					listValue: 
					[
						{
							String: 
							{
								boolValue: False,
								stringValue: String,
								numberValue: 0,
								listValue: 
								[
									{
										String: 
										{
											boolValue: False,
											stringValue: String,
											numberValue: 0,
											listValue: 
											[
												{
													
												}
											],
											structValue: {}
										}
									}
								],
								structValue: 
								{
									String: 
									{
										boolValue: False,
										stringValue: String,
										numberValue: 0,
										listValue: 
										[
											{
												
											}
										],
										structValue: {}
									}
								}
							}
						}
					],
					structValue: 
					{
						String: 
						{
							boolValue: False,
							stringValue: String,
							numberValue: 0,
							listValue: 
							[
								{
									String: 
									{
										boolValue: False,
										stringValue: String,
										numberValue: 0,
										listValue: 
										[
											{
												
											}
										],
										structValue: {}
									}
								}
							],
							structValue: 
							{
								String: 
								{
									boolValue: False,
									stringValue: String,
									numberValue: 0,
									listValue: 
									[
										{
											
										}
									],
									structValue: {}
								}
							}
						}
					}
				},
				transitionNameFormat: String,
				uniqueness: NotUnique,
				voiceOnly: False,
				conditionalVisibilityField: String,
				conditionalVisibilityValue: String,
				noEvalTemplate: False,
				userMode: Hidden,
				anyValueType: False
			}
		}
	]
}