Requires any of the roles: | SystemAdministrator, Manager, Customer |
PATCH | /customers/{customerId} |
---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Voice.Api.Customers
Imports Voice.Api.Flows.Data
Imports Voice.Api.Scheduling
Imports Voice.Api.Accounts
Imports Voice.Api
Imports Voice.Api.Settings
Imports Voice.Api.Integrations
Namespace Global
Namespace Voice.Api
Public Partial Class EntityInfo
'''<Summary>
'''The ID of the object
'''</Summary>
<ApiMember(Description:="The ID of the object")>
Public Overridable Property Id As String
'''<Summary>
'''The date the object was created
'''</Summary>
<ApiMember(Description:="The date the object was created")>
Public Overridable Property DateCreated As String
'''<Summary>
'''The date the object was last modified
'''</Summary>
<ApiMember(Description:="The date the object was last modified")>
Public Overridable Property DateLastModified As String
'''<Summary>
'''The user that created this object
'''</Summary>
<ApiMember(Description:="The user that created this object")>
Public Overridable Property CreatedBy As String
'''<Summary>
'''The user that last modified this object
'''</Summary>
<ApiMember(Description:="The user that last modified this object")>
Public Overridable Property LastModifiedBy As String
End Class
End Namespace
Namespace Voice.Api.Accounts
Public Partial Class BillingItem
Public Overridable Property BaseCost As Double
Public Overridable Property RawUnitMultiplier As Double
Public Overridable Property UnitCost As Double
Public Overridable Property Allowance As Integer
End Class
Public Partial Class BillingSettings
Public Overridable Property Base As BillingItem
Public Overridable Property LocalNumbers As BillingItem
Public Overridable Property TollFreeNumbers As BillingItem
Public Overridable Property InboundVoiceCalls As BillingItem
Public Overridable Property OutboundVoiceCalls As BillingItem
Public Overridable Property InboundFaxes As BillingItem
Public Overridable Property OutboundFaxes As BillingItem
Public Overridable Property InboundSmsMessages As BillingItem
Public Overridable Property OutboundSmsMessages As BillingItem
Public Overridable Property AIInsights As BillingItem
Public Overridable Property AILiveMinutes As BillingItem
End Class
End Namespace
Namespace Voice.Api.Customers
Public Partial Class AppSettings
Public Overridable Property EnablePhoneNumberManagement As Boolean
Public Overridable Property EnableDeviceManagement As Boolean
Public Overridable Property EnableDialer As Boolean
Public Overridable Property EnableCallHistory As Boolean
Public Overridable Property EnableAssistants As Boolean
Public Overridable Property ShowFileNameInMessageCenter As Boolean
Public Overridable Property ChakraTheme As String
Public Overridable Property CustomCss As String
Public Overridable Property PageTitle As String
Public Overridable Property StringMappings As String
Public Overridable Property LogoutUrl As String
Public Overridable Property PortMyNumberUrl As String
End Class
Public Partial Class CustomerBreadcrumb
Public Overridable Property Id As String
Public Overridable Property Name As String
End Class
Public Partial Class CustomerInfo
Inherits EntityInfo
'''<Summary>
'''The ID of the account associated with this customer
'''</Summary>
<ApiMember(Description:="The ID of the account associated with this customer")>
Public Overridable Property AccountId As String
'''<Summary>
'''The parent customer ID for this customer
'''</Summary>
<ApiMember(Description:="The parent customer ID for this customer")>
Public Overridable Property ParentCustomerId As String
'''<Summary>
'''The breadcrumb to this customer
'''</Summary>
<ApiMember(Description:="The breadcrumb to this customer")>
Public Overridable Property Breadcrumb As List(Of CustomerBreadcrumb)
'''<Summary>
'''The name of the account associated with this customer
'''</Summary>
<ApiMember(Description:="The name of the account associated with this customer")>
Public Overridable Property AccountName As String
'''<Summary>
'''Is this customer staging or production?
'''</Summary>
<ApiMember(Description:="Is this customer staging or production?")>
Public Overridable Property IsStaging As Boolean
'''<Summary>
'''The name of the company
'''</Summary>
<ApiMember(Description:="The name of the company")>
Public Overridable Property Name As String
'''<Summary>
'''The reference ID for this company
'''</Summary>
<ApiMember(Description:="The reference ID for this company")>
Public Overridable Property ReferenceId As String
'''<Summary>
'''This customer's data values
'''</Summary>
<ApiMember(Description:="This customer's data values")>
Public Overridable Property Data As Struct
'''<Summary>
'''The list of tags for this customer
'''</Summary>
<ApiMember(Description:="The list of tags for this customer")>
Public Overridable Property Tags As List(Of Tag)
'''<Summary>
'''This customer's schedule
'''</Summary>
<ApiMember(Description:="This customer's schedule")>
Public Overridable Property Schedule As Schedule
'''<Summary>
'''Integration data for this customer
'''</Summary>
<ApiMember(Description:="Integration data for this customer")>
Public Overridable Property IntegrationData As EntityIntegrationData
'''<Summary>
'''Override this customer's billing settings? Otherwise inherits from parent
'''</Summary>
<ApiMember(Description:="Override this customer's billing settings? Otherwise inherits from parent")>
Public Overridable Property OverrideBillingSettings As Boolean
'''<Summary>
'''Billing settings for this customer
'''</Summary>
<ApiMember(Description:="Billing settings for this customer")>
Public Overridable Property BillingSettings As BillingSettings
'''<Summary>
'''Should this customer override the parent customer's app settings
'''</Summary>
<ApiMember(Description:="Should this customer override the parent customer's app settings")>
Public Overridable Property OverrideAppSettings As Boolean
'''<Summary>
'''App / Portal settings for this customer
'''</Summary>
<ApiMember(Description:="App / Portal settings for this customer")>
Public Overridable Property AppSettings As AppSettings
End Class
'''<Summary>
'''Update a specific customer
'''</Summary>
<Api(Description:="Update a specific customer")>
Public Partial Class PatchCustomer
Implements IPatch
'''<Summary>
'''The ID of the customer you want to update
'''</Summary>
<ApiMember(Description:="The ID of the customer you want to update")>
Public Overridable Property CustomerId As String
'''<Summary>
'''The name for the customer
'''</Summary>
<ApiMember(Description:="The name for the customer")>
Public Overridable Property Name As String
'''<Summary>
'''The parent customer for this customer
'''</Summary>
<ApiMember(Description:="The parent customer for this customer")>
Public Overridable Property ParentCustomerId As String
'''<Summary>
'''The reference ID for this customer (e.g. in a third party system)
'''</Summary>
<ApiMember(Description:="The reference ID for this customer (e.g. in a third party system)")>
Public Overridable Property ReferenceId As String
'''<Summary>
'''Data values for this customer
'''</Summary>
<ApiMember(Description:="Data values for this customer")>
Public Overridable Property Data As Struct
'''<Summary>
'''The list of tag IDs for this customer
'''</Summary>
<ApiMember(Description:="The list of tag IDs for this customer")>
Public Overridable Property TagIds As List(Of String)
'''<Summary>
'''This customer's schedule
'''</Summary>
<ApiMember(Description:="This customer's schedule")>
Public Overridable Property Schedule As Schedule
'''<Summary>
'''Override this customer's billing settings? Otherwise inherits from parent
'''</Summary>
<ApiMember(Description:="Override this customer's billing settings? Otherwise inherits from parent")>
Public Overridable Property OverrideBillingSettings As Boolean?
'''<Summary>
'''Updated billing settings for this customer
'''</Summary>
<ApiMember(Description:="Updated billing settings for this customer")>
Public Overridable Property BillingSettings As BillingSettings
'''<Summary>
'''Should this customer override the parent customer's app settings
'''</Summary>
<ApiMember(Description:="Should this customer override the parent customer's app settings")>
Public Overridable Property OverrideAppSettings As Boolean?
'''<Summary>
'''App / Portal settings for this customer
'''</Summary>
<ApiMember(Description:="App / Portal settings for this customer")>
Public Overridable Property AppSettings As AppSettings
End Class
End Namespace
Namespace Voice.Api.Flows.Data
Public Partial Class Struct
Inherits Dictionary(Of String, Value)
End Class
Public Partial Class Value
Public Overridable Property BoolValue As Boolean?
Public Overridable Property StringValue As String
Public Overridable Property NumberValue As Double?
Public Overridable Property ListValue As List(Of Struct)
Public Overridable Property StructValue As Struct
End Class
End Namespace
Namespace Voice.Api.Integrations
Public Partial Class EntityIntegrationData
Inherits Dictionary(Of String, IntegrationData)
End Class
Public Partial Class IntegrationData
Public Overridable Property ThirdPartyId As String
End Class
End Namespace
Namespace Voice.Api.Scheduling
Public Partial Class Schedule
Public Overridable Property TimeZoneId As String
Public Overridable Property Inherit As Boolean
Public Overridable Property ForceClosed As Boolean
Public Overridable Property Rules As List(Of SchedulingRule)
Public Overridable Property DefaultState As String
End Class
Public Partial Class ScheduleDay
Public Overridable Property Offset As Integer
Public Overridable Property DayOfWeek As DayOfWeek
End Class
Public Partial Class SchedulingRule
Public Overridable Property Id As String
Public Overridable Property Name As String
Public Overridable Property Priority As Integer
Public Overridable Property State As String
Public Overridable Property Source As String
Public Overridable Property Condition As String
Public Overridable Property SimpleRuleType As SimpleSchedulingRuleTypes
Public Overridable Property CustomerState As String
Public Overridable Property FlowId As String
Public Overridable Property FlowParams As Struct
Public Overridable Property IsAllDay As Boolean
Public Overridable Property StartDate As String
Public Overridable Property StartTime As String
Public Overridable Property EndTime As String
Public Overridable Property BySetPosition As List(Of Integer)
Public Overridable Property ByMonth As List(Of Integer)
Public Overridable Property ByWeekNo As List(Of Integer)
Public Overridable Property ByYearDay As List(Of Integer)
Public Overridable Property ByMonthDay As List(Of Integer)
Public Overridable Property ByDay As List(Of ScheduleDay)
Public Overridable Property ByHour As List(Of Integer)
Public Overridable Property ByMinute As List(Of Integer)
Public Overridable Property Interval As Integer
Public Overridable Property Count As Integer
Public Overridable Property UntilDate As String
Public Overridable Property Frequency As SchedulingRuleFrequency
End Class
Public Enum SchedulingRuleFrequency
None
Secondly
Minutely
Hourly
Daily
Weekly
Monthly
Yearly
End Enum
Public Enum SimpleSchedulingRuleTypes
Always
CustomerState
Time
End Enum
End Namespace
Namespace Voice.Api.Settings
Public Partial Class Tag
Public Overridable Property Id As String
Public Overridable Property Name As String
Public Overridable Property Color As TagColors
End Class
Public Enum TagColors
Magenta
Red
Volcano
Orange
Gold
Lime
Green
Cyan
Blue
GeekBlue
Purple
End Enum
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PATCH /customers/{customerId} HTTP/1.1
Host: team.evovoice.io
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
customerId: String,
name: String,
parentCustomerId: String,
referenceId: String,
tagIds:
[
String
],
schedule:
{
timeZoneId: String,
inherit: False,
forceClosed: False,
rules:
[
{
id: String,
name: String,
priority: 0,
state: String,
source: String,
condition: String,
simpleRuleType: Always,
customerState: String,
flowId: String,
isAllDay: False,
startDate: String,
startTime: String,
endTime: String,
bySetPosition:
[
0
],
byMonth:
[
0
],
byWeekNo:
[
0
],
byYearDay:
[
0
],
byMonthDay:
[
0
],
byDay:
[
{
offset: 0,
dayOfWeek: Sunday
}
],
byHour:
[
0
],
byMinute:
[
0
],
interval: 0,
count: 0,
untilDate: String,
frequency: None
}
],
defaultState: String
},
overrideBillingSettings: False,
billingSettings:
{
base:
{
baseCost: 0,
rawUnitMultiplier: 0,
unitCost: 0,
allowance: 0
},
localNumbers:
{
baseCost: 0,
rawUnitMultiplier: 0,
unitCost: 0,
allowance: 0
},
tollFreeNumbers:
{
baseCost: 0,
rawUnitMultiplier: 0,
unitCost: 0,
allowance: 0
},
inboundVoiceCalls:
{
baseCost: 0,
rawUnitMultiplier: 0,
unitCost: 0,
allowance: 0
},
outboundVoiceCalls:
{
baseCost: 0,
rawUnitMultiplier: 0,
unitCost: 0,
allowance: 0
},
inboundFaxes:
{
baseCost: 0,
rawUnitMultiplier: 0,
unitCost: 0,
allowance: 0
},
outboundFaxes:
{
baseCost: 0,
rawUnitMultiplier: 0,
unitCost: 0,
allowance: 0
},
inboundSmsMessages:
{
baseCost: 0,
rawUnitMultiplier: 0,
unitCost: 0,
allowance: 0
},
outboundSmsMessages:
{
baseCost: 0,
rawUnitMultiplier: 0,
unitCost: 0,
allowance: 0
},
aiInsights:
{
baseCost: 0,
rawUnitMultiplier: 0,
unitCost: 0,
allowance: 0
},
aiLiveMinutes:
{
baseCost: 0,
rawUnitMultiplier: 0,
unitCost: 0,
allowance: 0
}
},
overrideAppSettings: False,
appSettings:
{
enablePhoneNumberManagement: False,
enableDeviceManagement: False,
enableDialer: False,
enableCallHistory: False,
enableAssistants: False,
showFileNameInMessageCenter: False,
chakraTheme: String,
customCss: String,
pageTitle: String,
stringMappings: String,
logoutUrl: String,
portMyNumberUrl: String
}
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { accountId: String, parentCustomerId: String, breadcrumb: [ { id: String, name: String } ], accountName: String, isStaging: False, name: String, referenceId: String, tags: [ { id: String, name: String, color: Magenta } ], schedule: { timeZoneId: String, inherit: False, forceClosed: False, rules: [ { id: String, name: String, priority: 0, state: String, source: String, condition: String, simpleRuleType: Always, customerState: String, flowId: String, isAllDay: False, startDate: String, startTime: String, endTime: String, bySetPosition: [ 0 ], byMonth: [ 0 ], byWeekNo: [ 0 ], byYearDay: [ 0 ], byMonthDay: [ 0 ], byDay: [ { offset: 0, dayOfWeek: Sunday } ], byHour: [ 0 ], byMinute: [ 0 ], interval: 0, count: 0, untilDate: String, frequency: None } ], defaultState: String }, integrationData: { String: { thirdPartyId: String } }, overrideBillingSettings: False, billingSettings: { base: { baseCost: 0, rawUnitMultiplier: 0, unitCost: 0, allowance: 0 }, localNumbers: { baseCost: 0, rawUnitMultiplier: 0, unitCost: 0, allowance: 0 }, tollFreeNumbers: { baseCost: 0, rawUnitMultiplier: 0, unitCost: 0, allowance: 0 }, inboundVoiceCalls: { baseCost: 0, rawUnitMultiplier: 0, unitCost: 0, allowance: 0 }, outboundVoiceCalls: { baseCost: 0, rawUnitMultiplier: 0, unitCost: 0, allowance: 0 }, inboundFaxes: { baseCost: 0, rawUnitMultiplier: 0, unitCost: 0, allowance: 0 }, outboundFaxes: { baseCost: 0, rawUnitMultiplier: 0, unitCost: 0, allowance: 0 }, inboundSmsMessages: { baseCost: 0, rawUnitMultiplier: 0, unitCost: 0, allowance: 0 }, outboundSmsMessages: { baseCost: 0, rawUnitMultiplier: 0, unitCost: 0, allowance: 0 }, aiInsights: { baseCost: 0, rawUnitMultiplier: 0, unitCost: 0, allowance: 0 }, aiLiveMinutes: { baseCost: 0, rawUnitMultiplier: 0, unitCost: 0, allowance: 0 } }, overrideAppSettings: False, appSettings: { enablePhoneNumberManagement: False, enableDeviceManagement: False, enableDialer: False, enableCallHistory: False, enableAssistants: False, showFileNameInMessageCenter: False, chakraTheme: String, customCss: String, pageTitle: String, stringMappings: String, logoutUrl: String, portMyNumberUrl: String }, id: String, dateCreated: String, dateLastModified: String, createdBy: String, lastModifiedBy: String }