Requires the role: | superadmin |
PUT | /superadmin/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. |
---|
"use strict";
export class SupportCaseStatusResponse {
/** @param {{Id?:number,Name?:string,Description?:string,Icon?:string,Color?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The status id */
Id;
/**
* @type {string}
* @description The status name */
Name;
/**
* @type {string}
* @description The status description */
Description;
/**
* @type {string}
* @description The status icon */
Icon;
/**
* @type {string}
* @description The status color */
Color;
}
export class SupportCaseTypeResponse {
/** @param {{Id?:number,Name?:string,Description?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The type id */
Id;
/**
* @type {string}
* @description The type name */
Name;
/**
* @type {string}
* @description The type description */
Description;
}
export class SupportCaseAreaResponse {
/** @param {{Id?:number,Name?:string,Description?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The area id */
Id;
/**
* @type {string}
* @description The area name */
Name;
/**
* @type {string}
* @description The area description */
Description;
}
export class SupportCaseCommentsResponse {
/** @param {{SupportCaseId?:number,Id?:number,Comment?:string,CreatedBy?:string,Created?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The case id */
SupportCaseId;
/**
* @type {number}
* @description The comments id */
Id;
/**
* @type {string}
* @description The case comment */
Comment;
/**
* @type {string}
* @description The case comment created by */
CreatedBy;
/**
* @type {string}
* @description The case comment created date */
Created;
}
export class SupportCaseAttachmentResponse {
/** @param {{Id?:number,FileUrl?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The attachment id */
Id;
/**
* @type {string}
* @description The attachment file url */
FileUrl;
}
export class SupportCaseQueryResponse {
/** @param {{Id?:number,CompanyUserId?:string,Title?:string,Description?:string,CaseStatusId?:number,CaseTypeId?:number,CaseAreaId?:number,CreatedBy?:string,UpdatedBy?:string,SolvedBy?:string,Updated?:string,Created?:string,CaseOwner?:string,CaseStatus?:SupportCaseStatusResponse,CaseType?:SupportCaseTypeResponse,CaseArea?:SupportCaseAreaResponse,Comments?:SupportCaseCommentsResponse[],Attachments?:SupportCaseAttachmentResponse[],CaseStatusOptions?:SupportCaseStatusResponse[],CaseTypeOptions?:SupportCaseTypeResponse[],CaseAreaOptions?:SupportCaseAreaResponse[]}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The support case id */
Id;
/**
* @type {string}
* @description The company user id */
CompanyUserId;
/**
* @type {string}
* @description The case title. */
Title;
/**
* @type {string}
* @description The case description. */
Description;
/**
* @type {number}
* @description The case status id. */
CaseStatusId;
/**
* @type {number}
* @description If the case type id. */
CaseTypeId;
/**
* @type {number}
* @description If the case area id. */
CaseAreaId;
/**
* @type {string}
* @description The case created by. */
CreatedBy;
/**
* @type {string}
* @description The case updated by. */
UpdatedBy;
/**
* @type {string}
* @description The case solved by. */
SolvedBy;
/**
* @type {string}
* @description If case updated date. */
Updated;
/**
* @type {string}
* @description If case created date. */
Created;
/**
* @type {string}
* @description Who owns the support case. */
CaseOwner;
/**
* @type {SupportCaseStatusResponse}
* @description The case status information. */
CaseStatus;
/**
* @type {SupportCaseTypeResponse}
* @description The case type information. */
CaseType;
/**
* @type {SupportCaseAreaResponse}
* @description The case area information. */
CaseArea;
/**
* @type {SupportCaseCommentsResponse[]}
* @description The case comments. */
Comments;
/**
* @type {SupportCaseAttachmentResponse[]}
* @description The case attachments. */
Attachments;
/**
* @type {SupportCaseStatusResponse[]}
* @description The case status options to select from. */
CaseStatusOptions;
/**
* @type {SupportCaseTypeResponse[]}
* @description The case type options to select from. */
CaseTypeOptions;
/**
* @type {SupportCaseAreaResponse[]}
* @description The case area options to select from. */
CaseAreaOptions;
}
export class SuperAdminUpdateSupportCase {
/** @param {{CompanyId?:string,Id?:number,Title?:string,Description?:string,CaseTypeId?:number,CaseAreaId?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Enter the company id, if blank company id and you are an admin, your company id will be used. */
CompanyId;
/**
* @type {number}
* @description The support case id */
Id;
/**
* @type {string}
* @description The case title. */
Title;
/**
* @type {string}
* @description The case description. */
Description;
/**
* @type {?number}
* @description If the case type id. */
CaseTypeId;
/**
* @type {?number}
* @description If the case area id. */
CaseAreaId;
}
JavaScript SuperAdminUpdateSupportCase DTOs
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.
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 } ] }