BokaMera.API.Host

<back to all web services

SuperAdminCreateSupportCase

Requires Authentication
Requires the role:superadmin
The following routes are available for this service:
POST/superadmin/support/casesAdd a new support caseAdd a new support case to the company of the currently logged in user, only administrators are allowed to add support cases.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using BokaMera.API.ServiceModel.Dtos;

namespace BokaMera.API.ServiceModel.Dtos
{
    [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("IsAuthenticated")]
    public partial class SuperAdminCreateSupportCase
        : ICompany
    {
        ///<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 virtual Guid? CompanyId { get; set; }

        ///<summary>
        ///The case title.
        ///</summary>
        [ApiMember(Description="The case title.")]
        public virtual string Title { get; set; }

        ///<summary>
        ///The case description.
        ///</summary>
        [ApiMember(Description="The case description.")]
        public virtual string Description { get; set; }

        ///<summary>
        ///If the case type id.
        ///</summary>
        [ApiMember(Description="If the case type id.")]
        public virtual int CaseTypeId { get; set; }

        ///<summary>
        ///If the case area id.
        ///</summary>
        [ApiMember(Description="If the case area id.")]
        public virtual int CaseAreaId { get; set; }
    }

    public partial class SupportCaseAreaResponse
    {
        ///<summary>
        ///The area id
        ///</summary>
        [ApiMember(Description="The area id")]
        public virtual int Id { get; set; }

        ///<summary>
        ///The area name
        ///</summary>
        [ApiMember(Description="The area name")]
        public virtual string Name { get; set; }

        ///<summary>
        ///The area description
        ///</summary>
        [ApiMember(Description="The area description")]
        public virtual string Description { get; set; }
    }

    public partial class SupportCaseAttachmentResponse
    {
        ///<summary>
        ///The attachment id
        ///</summary>
        [ApiMember(Description="The attachment id")]
        public virtual int Id { get; set; }

        ///<summary>
        ///The attachment file url
        ///</summary>
        [ApiMember(Description="The attachment file url")]
        public virtual string FileUrl { get; set; }
    }

    public partial class SupportCaseCommentsResponse
    {
        ///<summary>
        ///The case id
        ///</summary>
        [ApiMember(Description="The case id")]
        public virtual int SupportCaseId { get; set; }

        ///<summary>
        ///The comments id
        ///</summary>
        [ApiMember(Description="The comments id")]
        public virtual int Id { get; set; }

        ///<summary>
        ///The case comment
        ///</summary>
        [ApiMember(Description="The case comment")]
        public virtual string Comment { get; set; }

        ///<summary>
        ///The case comment created by
        ///</summary>
        [ApiMember(Description="The case comment created by")]
        public virtual string CreatedBy { get; set; }

        ///<summary>
        ///The case comment created date
        ///</summary>
        [ApiMember(Description="The case comment created date")]
        public virtual DateTime Created { get; set; }
    }

    public partial class SupportCaseQueryResponse
    {
        public SupportCaseQueryResponse()
        {
            Comments = new List<SupportCaseCommentsResponse>{};
            Attachments = new List<SupportCaseAttachmentResponse>{};
            CaseStatusOptions = new List<SupportCaseStatusResponse>{};
            CaseTypeOptions = new List<SupportCaseTypeResponse>{};
            CaseAreaOptions = new List<SupportCaseAreaResponse>{};
        }

        ///<summary>
        ///The support case id
        ///</summary>
        [ApiMember(Description="The support case id")]
        public virtual int Id { get; set; }

        ///<summary>
        ///The company user id
        ///</summary>
        [ApiMember(Description="The company user id")]
        public virtual Guid CompanyUserId { get; set; }

        ///<summary>
        ///The case title.
        ///</summary>
        [ApiMember(Description="The case title.")]
        public virtual string Title { get; set; }

        ///<summary>
        ///The case description.
        ///</summary>
        [ApiMember(Description="The case description.")]
        public virtual string Description { get; set; }

        ///<summary>
        ///The case status id.
        ///</summary>
        [ApiMember(Description="The case status id.")]
        public virtual int CaseStatusId { get; set; }

        ///<summary>
        ///If the case type id.
        ///</summary>
        [ApiMember(Description="If the case type id.")]
        public virtual int CaseTypeId { get; set; }

        ///<summary>
        ///If the case area id.
        ///</summary>
        [ApiMember(Description="If the case area id.")]
        public virtual int CaseAreaId { get; set; }

        ///<summary>
        ///The case created by.
        ///</summary>
        [ApiMember(Description="The case created by.")]
        public virtual string CreatedBy { get; set; }

        ///<summary>
        ///The case updated by.
        ///</summary>
        [ApiMember(Description="The case updated by.")]
        public virtual string UpdatedBy { get; set; }

        ///<summary>
        ///The case solved by.
        ///</summary>
        [ApiMember(Description="The case solved by.")]
        public virtual string SolvedBy { get; set; }

        ///<summary>
        ///If case updated date.
        ///</summary>
        [ApiMember(Description="If case updated date.")]
        public virtual DateTime Updated { get; set; }

        ///<summary>
        ///If case created date.
        ///</summary>
        [ApiMember(Description="If case created date.")]
        public virtual DateTime Created { get; set; }

        ///<summary>
        ///Who owns the support case.
        ///</summary>
        [ApiMember(Description="Who owns the support case.")]
        public virtual string CaseOwner { get; set; }

        ///<summary>
        ///The case status information.
        ///</summary>
        [ApiMember(Description="The case status information.")]
        public virtual SupportCaseStatusResponse CaseStatus { get; set; }

        ///<summary>
        ///The case type information.
        ///</summary>
        [ApiMember(Description="The case type information.")]
        public virtual SupportCaseTypeResponse CaseType { get; set; }

        ///<summary>
        ///The case area information.
        ///</summary>
        [ApiMember(Description="The case area information.")]
        public virtual SupportCaseAreaResponse CaseArea { get; set; }

        ///<summary>
        ///The case comments.
        ///</summary>
        [ApiMember(Description="The case comments.")]
        public virtual List<SupportCaseCommentsResponse> Comments { get; set; }

        ///<summary>
        ///The case attachments.
        ///</summary>
        [ApiMember(Description="The case attachments.")]
        public virtual List<SupportCaseAttachmentResponse> Attachments { get; set; }

        ///<summary>
        ///The case status options to select from.
        ///</summary>
        [ApiMember(Description="The case status options to select from.")]
        public virtual List<SupportCaseStatusResponse> CaseStatusOptions { get; set; }

        ///<summary>
        ///The case type  options to select from.
        ///</summary>
        [ApiMember(Description="The case type  options to select from.")]
        public virtual List<SupportCaseTypeResponse> CaseTypeOptions { get; set; }

        ///<summary>
        ///The case area  options to select from.
        ///</summary>
        [ApiMember(Description="The case area  options to select from.")]
        public virtual List<SupportCaseAreaResponse> CaseAreaOptions { get; set; }
    }

    public partial class SupportCaseStatusResponse
    {
        ///<summary>
        ///The status id
        ///</summary>
        [ApiMember(Description="The status id")]
        public virtual int Id { get; set; }

        ///<summary>
        ///The status name
        ///</summary>
        [ApiMember(Description="The status name")]
        public virtual string Name { get; set; }

        ///<summary>
        ///The status description
        ///</summary>
        [ApiMember(Description="The status description")]
        public virtual string Description { get; set; }

        ///<summary>
        ///The status icon
        ///</summary>
        [ApiMember(Description="The status icon")]
        public virtual string Icon { get; set; }

        ///<summary>
        ///The status color
        ///</summary>
        [ApiMember(Description="The status color")]
        public virtual string Color { get; set; }
    }

    public partial class SupportCaseTypeResponse
    {
        ///<summary>
        ///The type id
        ///</summary>
        [ApiMember(Description="The type id")]
        public virtual int Id { get; set; }

        ///<summary>
        ///The type name
        ///</summary>
        [ApiMember(Description="The type name")]
        public virtual string Name { get; set; }

        ///<summary>
        ///The type description
        ///</summary>
        [ApiMember(Description="The type description")]
        public virtual string Description { get; set; }
    }

}

C# SuperAdminCreateSupportCase DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /superadmin/support/cases HTTP/1.1 
Host: api.bokamera.se 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<SuperAdminCreateSupportCase xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <CaseAreaId>0</CaseAreaId>
  <CaseTypeId>0</CaseTypeId>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <Description>String</Description>
  <Title>String</Title>
</SuperAdminCreateSupportCase>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<SupportCaseQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <Attachments>
    <SupportCaseAttachmentResponse>
      <FileUrl>String</FileUrl>
      <Id>0</Id>
    </SupportCaseAttachmentResponse>
  </Attachments>
  <CaseArea>
    <Description>String</Description>
    <Id>0</Id>
    <Name>String</Name>
  </CaseArea>
  <CaseAreaId>0</CaseAreaId>
  <CaseAreaOptions>
    <SupportCaseAreaResponse>
      <Description>String</Description>
      <Id>0</Id>
      <Name>String</Name>
    </SupportCaseAreaResponse>
  </CaseAreaOptions>
  <CaseOwner>String</CaseOwner>
  <CaseStatus>
    <Color>String</Color>
    <Description>String</Description>
    <Icon>String</Icon>
    <Id>0</Id>
    <Name>String</Name>
  </CaseStatus>
  <CaseStatusId>0</CaseStatusId>
  <CaseStatusOptions>
    <SupportCaseStatusResponse>
      <Color>String</Color>
      <Description>String</Description>
      <Icon>String</Icon>
      <Id>0</Id>
      <Name>String</Name>
    </SupportCaseStatusResponse>
  </CaseStatusOptions>
  <CaseType>
    <Description>String</Description>
    <Id>0</Id>
    <Name>String</Name>
  </CaseType>
  <CaseTypeId>0</CaseTypeId>
  <CaseTypeOptions>
    <SupportCaseTypeResponse>
      <Description>String</Description>
      <Id>0</Id>
      <Name>String</Name>
    </SupportCaseTypeResponse>
  </CaseTypeOptions>
  <Comments>
    <SupportCaseCommentsResponse>
      <Comment>String</Comment>
      <Created>0001-01-01T00:00:00</Created>
      <CreatedBy>String</CreatedBy>
      <Id>0</Id>
      <SupportCaseId>0</SupportCaseId>
    </SupportCaseCommentsResponse>
  </Comments>
  <CompanyUserId>00000000-0000-0000-0000-000000000000</CompanyUserId>
  <Created>0001-01-01T00:00:00</Created>
  <CreatedBy>String</CreatedBy>
  <Description>String</Description>
  <Id>0</Id>
  <SolvedBy>String</SolvedBy>
  <Title>String</Title>
  <Updated>0001-01-01T00:00:00</Updated>
  <UpdatedBy>String</UpdatedBy>
</SupportCaseQueryResponse>