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. |
---|
export class SupportCaseStatusResponse
{
/** @description The status id */
// @ApiMember(Description="The status id")
public Id: number;
/** @description The status name */
// @ApiMember(Description="The status name")
public Name: string;
/** @description The status description */
// @ApiMember(Description="The status description")
public Description: string;
/** @description The status icon */
// @ApiMember(Description="The status icon")
public Icon: string;
/** @description The status color */
// @ApiMember(Description="The status color")
public Color: string;
public constructor(init?: Partial<SupportCaseStatusResponse>) { (Object as any).assign(this, init); }
}
export class SupportCaseTypeResponse
{
/** @description The type id */
// @ApiMember(Description="The type id")
public Id: number;
/** @description The type name */
// @ApiMember(Description="The type name")
public Name: string;
/** @description The type description */
// @ApiMember(Description="The type description")
public Description: string;
public constructor(init?: Partial<SupportCaseTypeResponse>) { (Object as any).assign(this, init); }
}
export class SupportCaseAreaResponse
{
/** @description The area id */
// @ApiMember(Description="The area id")
public Id: number;
/** @description The area name */
// @ApiMember(Description="The area name")
public Name: string;
/** @description The area description */
// @ApiMember(Description="The area description")
public Description: string;
public constructor(init?: Partial<SupportCaseAreaResponse>) { (Object as any).assign(this, init); }
}
export class SupportCaseCommentsResponse
{
/** @description The case id */
// @ApiMember(Description="The case id")
public SupportCaseId: number;
/** @description The comments id */
// @ApiMember(Description="The comments id")
public Id: number;
/** @description The case comment */
// @ApiMember(Description="The case comment")
public Comment: string;
/** @description The case comment created by */
// @ApiMember(Description="The case comment created by")
public CreatedBy: string;
/** @description The case comment created date */
// @ApiMember(Description="The case comment created date")
public Created: string;
public constructor(init?: Partial<SupportCaseCommentsResponse>) { (Object as any).assign(this, init); }
}
export class SupportCaseAttachmentResponse
{
/** @description The attachment id */
// @ApiMember(Description="The attachment id")
public Id: number;
/** @description The attachment file url */
// @ApiMember(Description="The attachment file url")
public FileUrl: string;
public constructor(init?: Partial<SupportCaseAttachmentResponse>) { (Object as any).assign(this, init); }
}
export class SupportCaseQueryResponse
{
/** @description The support case id */
// @ApiMember(Description="The support case id")
public Id: number;
/** @description The company user id */
// @ApiMember(Description="The company user id")
public CompanyUserId: string;
/** @description The case title. */
// @ApiMember(Description="The case title.")
public Title: string;
/** @description The case description. */
// @ApiMember(Description="The case description.")
public Description: string;
/** @description The case status id. */
// @ApiMember(Description="The case status id.")
public CaseStatusId: number;
/** @description If the case type id. */
// @ApiMember(Description="If the case type id.")
public CaseTypeId: number;
/** @description If the case area id. */
// @ApiMember(Description="If the case area id.")
public CaseAreaId: number;
/** @description The case created by. */
// @ApiMember(Description="The case created by.")
public CreatedBy: string;
/** @description The case updated by. */
// @ApiMember(Description="The case updated by.")
public UpdatedBy: string;
/** @description The case solved by. */
// @ApiMember(Description="The case solved by.")
public SolvedBy: string;
/** @description If case updated date. */
// @ApiMember(Description="If case updated date.")
public Updated: string;
/** @description If case created date. */
// @ApiMember(Description="If case created date.")
public Created: string;
/** @description Who owns the support case. */
// @ApiMember(Description="Who owns the support case.")
public CaseOwner: string;
/** @description The case status information. */
// @ApiMember(Description="The case status information.")
public CaseStatus: SupportCaseStatusResponse;
/** @description The case type information. */
// @ApiMember(Description="The case type information.")
public CaseType: SupportCaseTypeResponse;
/** @description The case area information. */
// @ApiMember(Description="The case area information.")
public CaseArea: SupportCaseAreaResponse;
/** @description The case comments. */
// @ApiMember(Description="The case comments.")
public Comments: SupportCaseCommentsResponse[];
/** @description The case attachments. */
// @ApiMember(Description="The case attachments.")
public Attachments: SupportCaseAttachmentResponse[];
/** @description The case status options to select from. */
// @ApiMember(Description="The case status options to select from.")
public CaseStatusOptions: SupportCaseStatusResponse[];
/** @description The case type options to select from. */
// @ApiMember(Description="The case type options to select from.")
public CaseTypeOptions: SupportCaseTypeResponse[];
/** @description The case area options to select from. */
// @ApiMember(Description="The case area options to select from.")
public CaseAreaOptions: SupportCaseAreaResponse[];
public constructor(init?: Partial<SupportCaseQueryResponse>) { (Object as any).assign(this, init); }
}
// @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")
export class SuperAdminUpdateSupportCase implements ISupportCase
{
/** @description 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 CompanyId: string;
/** @description The support case id */
// @ApiMember(Description="The support case id", ParameterType="path")
public Id: number;
/** @description The case title. */
// @ApiMember(Description="The case title.")
public Title: string;
/** @description The case description. */
// @ApiMember(Description="The case description.")
public Description: string;
/** @description If the case type id. */
// @ApiMember(Description="If the case type id.")
public CaseTypeId?: number;
/** @description If the case area id. */
// @ApiMember(Description="If the case area id.")
public CaseAreaId?: number;
public constructor(init?: Partial<SuperAdminUpdateSupportCase>) { (Object as any).assign(this, init); }
}
TypeScript SuperAdminUpdateSupportCase DTOs
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 /superadmin/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"}]}