Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
PUT | /support/cases/{Id} | Update a support case | Update a support case to the company of the currently logged in user, only administrators are allowed to add support cases. |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos
Namespace Global
Namespace BokaMera.API.ServiceModel.Dtos
Public Partial Class SupportCaseAreaResponse
'''<Summary>
'''The area id
'''</Summary>
<ApiMember(Description:="The area id")>
Public Overridable Property Id As Integer
'''<Summary>
'''The area name
'''</Summary>
<ApiMember(Description:="The area name")>
Public Overridable Property Name As String
'''<Summary>
'''The area description
'''</Summary>
<ApiMember(Description:="The area description")>
Public Overridable Property Description As String
End Class
Public Partial Class SupportCaseAttachmentResponse
'''<Summary>
'''The attachment id
'''</Summary>
<ApiMember(Description:="The attachment id")>
Public Overridable Property Id As Integer
'''<Summary>
'''The attachment file url
'''</Summary>
<ApiMember(Description:="The attachment file url")>
Public Overridable Property FileUrl As String
End Class
Public Partial Class SupportCaseCommentsResponse
'''<Summary>
'''The case id
'''</Summary>
<ApiMember(Description:="The case id")>
Public Overridable Property SupportCaseId As Integer
'''<Summary>
'''The comments id
'''</Summary>
<ApiMember(Description:="The comments id")>
Public Overridable Property Id As Integer
'''<Summary>
'''The case comment
'''</Summary>
<ApiMember(Description:="The case comment")>
Public Overridable Property Comment As String
'''<Summary>
'''The case comment created by
'''</Summary>
<ApiMember(Description:="The case comment created by")>
Public Overridable Property CreatedBy As String
'''<Summary>
'''The case comment created date
'''</Summary>
<ApiMember(Description:="The case comment created date")>
Public Overridable Property Created As Date
End Class
Public Partial Class SupportCaseQueryResponse
Public Sub New()
Comments = New List(Of SupportCaseCommentsResponse)
Attachments = New List(Of SupportCaseAttachmentResponse)
CaseStatusOptions = New List(Of SupportCaseStatusResponse)
CaseTypeOptions = New List(Of SupportCaseTypeResponse)
CaseAreaOptions = New List(Of SupportCaseAreaResponse)
End Sub
'''<Summary>
'''The support case id
'''</Summary>
<ApiMember(Description:="The support case id")>
Public Overridable Property Id As Integer
'''<Summary>
'''The company user id
'''</Summary>
<ApiMember(Description:="The company user id")>
Public Overridable Property CompanyUserId As Guid
'''<Summary>
'''The case title.
'''</Summary>
<ApiMember(Description:="The case title.")>
Public Overridable Property Title As String
'''<Summary>
'''The case description.
'''</Summary>
<ApiMember(Description:="The case description.")>
Public Overridable Property Description As String
'''<Summary>
'''The case status id.
'''</Summary>
<ApiMember(Description:="The case status id.")>
Public Overridable Property CaseStatusId As Integer
'''<Summary>
'''If the case type id.
'''</Summary>
<ApiMember(Description:="If the case type id.")>
Public Overridable Property CaseTypeId As Integer
'''<Summary>
'''If the case area id.
'''</Summary>
<ApiMember(Description:="If the case area id.")>
Public Overridable Property CaseAreaId As Integer
'''<Summary>
'''The case created by.
'''</Summary>
<ApiMember(Description:="The case created by.")>
Public Overridable Property CreatedBy As String
'''<Summary>
'''The case updated by.
'''</Summary>
<ApiMember(Description:="The case updated by.")>
Public Overridable Property UpdatedBy As String
'''<Summary>
'''The case solved by.
'''</Summary>
<ApiMember(Description:="The case solved by.")>
Public Overridable Property SolvedBy As String
'''<Summary>
'''If case updated date.
'''</Summary>
<ApiMember(Description:="If case updated date.")>
Public Overridable Property Updated As Date
'''<Summary>
'''If case created date.
'''</Summary>
<ApiMember(Description:="If case created date.")>
Public Overridable Property Created As Date
'''<Summary>
'''Who owns the support case.
'''</Summary>
<ApiMember(Description:="Who owns the support case.")>
Public Overridable Property CaseOwner As String
'''<Summary>
'''The case status information.
'''</Summary>
<ApiMember(Description:="The case status information.")>
Public Overridable Property CaseStatus As SupportCaseStatusResponse
'''<Summary>
'''The case type information.
'''</Summary>
<ApiMember(Description:="The case type information.")>
Public Overridable Property CaseType As SupportCaseTypeResponse
'''<Summary>
'''The case area information.
'''</Summary>
<ApiMember(Description:="The case area information.")>
Public Overridable Property CaseArea As SupportCaseAreaResponse
'''<Summary>
'''The case comments.
'''</Summary>
<ApiMember(Description:="The case comments.")>
Public Overridable Property Comments As List(Of SupportCaseCommentsResponse)
'''<Summary>
'''The case attachments.
'''</Summary>
<ApiMember(Description:="The case attachments.")>
Public Overridable Property Attachments As List(Of SupportCaseAttachmentResponse)
'''<Summary>
'''The case status options to select from.
'''</Summary>
<ApiMember(Description:="The case status options to select from.")>
Public Overridable Property CaseStatusOptions As List(Of SupportCaseStatusResponse)
'''<Summary>
'''The case type options to select from.
'''</Summary>
<ApiMember(Description:="The case type options to select from.")>
Public Overridable Property CaseTypeOptions As List(Of SupportCaseTypeResponse)
'''<Summary>
'''The case area options to select from.
'''</Summary>
<ApiMember(Description:="The case area options to select from.")>
Public Overridable Property CaseAreaOptions As List(Of SupportCaseAreaResponse)
End Class
Public Partial Class SupportCaseStatusResponse
'''<Summary>
'''The status id
'''</Summary>
<ApiMember(Description:="The status id")>
Public Overridable Property Id As Integer
'''<Summary>
'''The status name
'''</Summary>
<ApiMember(Description:="The status name")>
Public Overridable Property Name As String
'''<Summary>
'''The status description
'''</Summary>
<ApiMember(Description:="The status description")>
Public Overridable Property Description As String
'''<Summary>
'''The status icon
'''</Summary>
<ApiMember(Description:="The status icon")>
Public Overridable Property Icon As String
'''<Summary>
'''The status color
'''</Summary>
<ApiMember(Description:="The status color")>
Public Overridable Property Color As String
End Class
Public Partial Class SupportCaseTypeResponse
'''<Summary>
'''The type id
'''</Summary>
<ApiMember(Description:="The type id")>
Public Overridable Property Id As Integer
'''<Summary>
'''The type name
'''</Summary>
<ApiMember(Description:="The type name")>
Public Overridable Property Name As String
'''<Summary>
'''The type description
'''</Summary>
<ApiMember(Description:="The type description")>
Public Overridable Property Description As String
End Class
<ApiResponse(Description:="You were unauthorized to call this service", StatusCode:=401)>
<ApiResponse(Description:="You have too low privilegies to call this service", StatusCode:=403)>
<ValidateRequest(Validator:="IsAuthenticated")>
Public Partial Class UpdateSupportCase
Implements ISupportCase
'''<Summary>
'''Enter the company id, if blank company id and you are an admin, your company id will be used.
'''</Summary>
<ApiMember(Description:="Enter the company id, if blank company id and you are an admin, your company id will be used.", IsRequired:=true)>
Public Overridable Property CompanyId As Nullable(Of Guid)
'''<Summary>
'''The support case id
'''</Summary>
<ApiMember(Description:="The support case id", ParameterType:="path")>
Public Overridable Property Id As Integer
'''<Summary>
'''The case title.
'''</Summary>
<ApiMember(Description:="The case title.")>
Public Overridable Property Title As String
'''<Summary>
'''The case description.
'''</Summary>
<ApiMember(Description:="The case description.")>
Public Overridable Property Description As String
'''<Summary>
'''If the case type id.
'''</Summary>
<ApiMember(Description:="If the case type id.")>
Public Overridable Property CaseTypeId As Nullable(Of Integer)
'''<Summary>
'''If the case area id.
'''</Summary>
<ApiMember(Description:="If the case area id.")>
Public Overridable Property CaseAreaId As Nullable(Of Integer)
End Class
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /support/cases/{Id} HTTP/1.1
Host: api.bokamera.se
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"CompanyId":"00000000-0000-0000-0000-000000000000","Id":0,"Title":"String","Description":"String","CaseTypeId":0,"CaseAreaId":0}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"Id":0,"Title":"String","Description":"String","CaseStatusId":0,"CaseTypeId":0,"CaseAreaId":0,"CreatedBy":"String","UpdatedBy":"String","SolvedBy":"String","CaseOwner":"String","CaseStatus":{"Id":0,"Name":"String","Description":"String","Icon":"String","Color":"String"},"CaseType":{"Id":0,"Name":"String","Description":"String"},"CaseArea":{"Id":0,"Name":"String","Description":"String"},"Comments":[{"SupportCaseId":0,"Id":0,"Comment":"String","CreatedBy":"String"}],"Attachments":[{"Id":0,"FileUrl":"String"}],"CaseStatusOptions":[{"Id":0,"Name":"String","Description":"String","Icon":"String","Color":"String"}],"CaseTypeOptions":[{"Id":0,"Name":"String","Description":"String"}],"CaseAreaOptions":[{"Id":0,"Name":"String","Description":"String"}]}