BokaMera.API.Host

<back to all web services

SuperAdminUpdateSupportCase

Requires Authentication
Requires the role:superadmin
The following routes are available for this service:
PUT/superadmin/support/cases/{Id}Update a support caseUpdate a support case to the company of the currently logged in user, only administrators are allowed to add support cases.
import Foundation
import ServiceStack

// @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 class SuperAdminUpdateSupportCase : ISupportCase, Codable
{
    /**
    * Enter the company id, if blank company id and you are an admin, your company id will be used.
    */
    // @ApiMember(Description="Enter the company id, if blank company id and you are an admin, your company id will be used.", IsRequired=true)
    public var companyId:String?

    /**
    * The support case id
    */
    // @ApiMember(Description="The support case id", ParameterType="path")
    public var id:Int

    /**
    * The case title.
    */
    // @ApiMember(Description="The case title.")
    public var title:String

    /**
    * The case description.
    */
    // @ApiMember(Description="The case description.")
    public var Description:String

    /**
    * If the case type id.
    */
    // @ApiMember(Description="If the case type id.")
    public var caseTypeId:Int?

    /**
    * If the case area id.
    */
    // @ApiMember(Description="If the case area id.")
    public var caseAreaId:Int?

    required public init(){}
}

public class SupportCaseQueryResponse : Codable
{
    /**
    * The support case id
    */
    // @ApiMember(Description="The support case id")
    public var id:Int

    /**
    * The company user id
    */
    // @ApiMember(Description="The company user id")
    public var companyUserId:String

    /**
    * The case title.
    */
    // @ApiMember(Description="The case title.")
    public var title:String

    /**
    * The case description.
    */
    // @ApiMember(Description="The case description.")
    public var Description:String

    /**
    * The case status id.
    */
    // @ApiMember(Description="The case status id.")
    public var caseStatusId:Int

    /**
    * If the case type id.
    */
    // @ApiMember(Description="If the case type id.")
    public var caseTypeId:Int

    /**
    * If the case area id.
    */
    // @ApiMember(Description="If the case area id.")
    public var caseAreaId:Int

    /**
    * The case created by.
    */
    // @ApiMember(Description="The case created by.")
    public var createdBy:String

    /**
    * The case updated by.
    */
    // @ApiMember(Description="The case updated by.")
    public var updatedBy:String

    /**
    * The case solved by.
    */
    // @ApiMember(Description="The case solved by.")
    public var solvedBy:String

    /**
    * If case updated date.
    */
    // @ApiMember(Description="If case updated date.")
    public var updated:Date

    /**
    * If case created date.
    */
    // @ApiMember(Description="If case created date.")
    public var created:Date

    /**
    * Who owns the support case.
    */
    // @ApiMember(Description="Who owns the support case.")
    public var caseOwner:String

    /**
    * The case status information.
    */
    // @ApiMember(Description="The case status information.")
    public var caseStatus:SupportCaseStatusResponse

    /**
    * The case type information.
    */
    // @ApiMember(Description="The case type information.")
    public var caseType:SupportCaseTypeResponse

    /**
    * The case area information.
    */
    // @ApiMember(Description="The case area information.")
    public var caseArea:SupportCaseAreaResponse

    /**
    * The case comments.
    */
    // @ApiMember(Description="The case comments.")
    public var comments:[SupportCaseCommentsResponse] = []

    /**
    * The case attachments.
    */
    // @ApiMember(Description="The case attachments.")
    public var attachments:[SupportCaseAttachmentResponse] = []

    /**
    * The case status options to select from.
    */
    // @ApiMember(Description="The case status options to select from.")
    public var caseStatusOptions:[SupportCaseStatusResponse] = []

    /**
    * The case type  options to select from.
    */
    // @ApiMember(Description="The case type  options to select from.")
    public var caseTypeOptions:[SupportCaseTypeResponse] = []

    /**
    * The case area  options to select from.
    */
    // @ApiMember(Description="The case area  options to select from.")
    public var caseAreaOptions:[SupportCaseAreaResponse] = []

    required public init(){}
}

public class SupportCaseStatusResponse : Codable
{
    /**
    * The status id
    */
    // @ApiMember(Description="The status id")
    public var id:Int

    /**
    * The status name
    */
    // @ApiMember(Description="The status name")
    public var name:String

    /**
    * The status description
    */
    // @ApiMember(Description="The status description")
    public var Description:String

    /**
    * The status icon
    */
    // @ApiMember(Description="The status icon")
    public var icon:String

    /**
    * The status color
    */
    // @ApiMember(Description="The status color")
    public var color:String

    required public init(){}
}

public class SupportCaseTypeResponse : Codable
{
    /**
    * The type id
    */
    // @ApiMember(Description="The type id")
    public var id:Int

    /**
    * The type name
    */
    // @ApiMember(Description="The type name")
    public var name:String

    /**
    * The type description
    */
    // @ApiMember(Description="The type description")
    public var Description:String

    required public init(){}
}

public class SupportCaseAreaResponse : Codable
{
    /**
    * The area id
    */
    // @ApiMember(Description="The area id")
    public var id:Int

    /**
    * The area name
    */
    // @ApiMember(Description="The area name")
    public var name:String

    /**
    * The area description
    */
    // @ApiMember(Description="The area description")
    public var Description:String

    required public init(){}
}

public class SupportCaseCommentsResponse : Codable
{
    /**
    * The case id
    */
    // @ApiMember(Description="The case id")
    public var supportCaseId:Int

    /**
    * The comments id
    */
    // @ApiMember(Description="The comments id")
    public var id:Int

    /**
    * The case comment
    */
    // @ApiMember(Description="The case comment")
    public var comment:String

    /**
    * The case comment created by
    */
    // @ApiMember(Description="The case comment created by")
    public var createdBy:String

    /**
    * The case comment created date
    */
    // @ApiMember(Description="The case comment created date")
    public var created:Date

    required public init(){}
}

public class SupportCaseAttachmentResponse : Codable
{
    /**
    * The attachment id
    */
    // @ApiMember(Description="The attachment id")
    public var id:Int

    /**
    * The attachment file url
    */
    // @ApiMember(Description="The attachment file url")
    public var fileUrl:String

    required public init(){}
}


Swift SuperAdminUpdateSupportCase 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.

PUT /superadmin/support/cases/{Id} HTTP/1.1 
Host: api.bokamera.se 
Accept: text/jsv
Content-Type: text/jsv
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/jsv
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
		}
	]
}