POST api/Tickets/NewTicket

Creates a new Ticket.

Request Information

URI Parameters

None.

Body Parameters

NewTicketPost
NameDescriptionTypeAdditional information
Type

Ticket type to create.

TicketTypeEnum

None.

ServiceId

Service Id, optional for TIC, required for other types (INC, REQ, PRO, CHG).

integer

None.

Subject

(Required) Subject.

string

None.

Message

(Required) Description details.

string

None.

Html

True if the Message is in html format.

boolean

None.

IsMobileDevice

If true, the ticket has been sent from a mobile device (phone, tablet).

boolean

None.

Attachments

(Optional) Attachments

Collection of NewAttachment

None.

CustomFormFields

(Optional) The Custom Forms data.

Collection of CustomFormFieldData

None.

Priorities

The prority value id.

Collection of PriorityData

None.

CustomerId

(Optional) Bind the ticket with Customer.

integer

None.

ServiceMailboxId

(Optional) Bind the ticket with service mailbox. If binded, the ticket will behave as it has came into the system by e-mail. That primarily means the email replies will be send instead of email notifications if the service mailbox is set as shielded from the Requestor.

integer

None.

SubmitterUserProviderKey

(Optional) If specified, a client (requester) of the ticket will be set (to someone else than to the authorized in user).

string

None.

SolverUserProviderKey

(Optional) If specified, a solver of the ticket will be set. The Operator role is required.

string

None.

CloseImmediately

If true, the ticket will be closed immediately. The Operator role is required.

boolean

None.

CategoryItemsIds

(Optional) The category items id.

Collection of integer

None.

ProductItemsIds

(Optional) The product items id.

Collection of integer

None.

SendViaOutboundEmail

If true, the ticket will be created and sent to the requester by email.

boolean

None.

SendViaOutboundEmailFrom

The From field Email address when the email for requester is created. It has to correspond to the email address of the selected mailbox (ServiceMailboxId). If SendViaOutboundEmail is true, this is required.

string

None.

SendViaOutboundEmailTo

Email recipient (= ticket requester). If SendViaOutboundEmail is true, this is required.

string

None.

SendViaOutboundEmailCc

(Optional) CC (carbon copy) emails.

Collection of string

None.

SendViaOutboundEmailBcc

(Optional) BCC (blind carbon copy) emails.

Collection of string

None.

Request Formats

application/json, text/json

Sample:
{
  "Type": 1,
  "ServiceId": null,
  "Subject": "I cannot access to the net printer",
  "Message": "I don't know why, it was operating yesterday.",
  "Html": false,
  "IsMobileDevice": false,
  "Attachments": [
    {
      "FileName": "sample.txt",
      "ContentType": "text/plain",
      "ContentLength": 5,
      "Data": "aGVsbG8="
    }
  ],
  "CustomFormFields": [
    {
      "CustomFormFieldId": 14,
      "TextBoxValue": "Typed text"
    },
    {
      "CustomFormFieldId": 15,
      "IntegerValue": 11
    },
    {
      "CustomFormFieldId": 16,
      "SelectedCustomFormFieldItemId": 68
    },
    {
      "CustomFormFieldId": 17,
      "CheckBoxValue": true
    },
    {
      "CustomFormFieldId": 18,
      "CustomFormFieldItems": [
        {
          "CustomFormFieldItemId": 200,
          "CheckBoxValue": false
        },
        {
          "CustomFormFieldItemId": 201,
          "CheckBoxValue": true
        }
      ]
    }
  ],
  "CustomerId": null,
  "ServiceMailboxId": 2,
  "SubmitterUserProviderKey": null,
  "SolverUserProviderKey": null,
  "CloseImmediately": false,
  "CategoryItemsIds": null,
  "ProductItemsIds": null,
  "SendViaOutboundEmail": true,
  "SendViaOutboundEmailFrom": "company@domain.com",
  "SendViaOutboundEmailTo": "john.doe@domain.com",
  "SendViaOutboundEmailCc": [
    "jane.doe@domain.com",
    "jack.more@domain.com"
  ],
  "SendViaOutboundEmailBcc": null
}

application/xml, text/xml

Sample:
<NewTicketPost xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <Attachments xmlns:d2p1="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.DataStructures">
    <d2p1:NewAttachment>
      <d2p1:ContentLength>5</d2p1:ContentLength>
      <d2p1:ContentType>text/plain</d2p1:ContentType>
      <d2p1:Data>aGVsbG8=</d2p1:Data>
      <d2p1:FileName>sample.txt</d2p1:FileName>
    </d2p1:NewAttachment>
  </Attachments>
  <CategoryItemsIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
  <CloseImmediately>false</CloseImmediately>
  <CustomFormFields>
    <CustomFormFieldData>
      <CustomFormFieldId>14</CustomFormFieldId>
      <TextBoxValue>Typed text</TextBoxValue>
    </CustomFormFieldData>
    <CustomFormFieldData>
      <CustomFormFieldId>15</CustomFormFieldId>
      <IntegerValue>11</IntegerValue>
    </CustomFormFieldData>
    <CustomFormFieldData>
      <CustomFormFieldId>16</CustomFormFieldId>
      <SelectedCustomFormFieldItemId>68</SelectedCustomFormFieldItemId>
    </CustomFormFieldData>
    <CustomFormFieldData>
      <CheckBoxValue>true</CheckBoxValue>
      <CustomFormFieldId>17</CustomFormFieldId>
    </CustomFormFieldData>
    <CustomFormFieldData>
      <CustomFormFieldId>18</CustomFormFieldId>
      <CustomFormFieldItems>
        <CustomFormFieldItemData>
          <CheckBoxValue>false</CheckBoxValue>
          <CustomFormFieldItemId>200</CustomFormFieldItemId>
        </CustomFormFieldItemData>
        <CustomFormFieldItemData>
          <CheckBoxValue>true</CheckBoxValue>
          <CustomFormFieldItemId>201</CustomFormFieldItemId>
        </CustomFormFieldItemData>
      </CustomFormFieldItems>
    </CustomFormFieldData>
  </CustomFormFields>
  <CustomerId i:nil="true" />
  <Html>false</Html>
  <IsMobileDevice>false</IsMobileDevice>
  <Message>I don't know why, it was operating yesterday.</Message>
  <ProductItemsIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
  <SendViaOutboundEmail>true</SendViaOutboundEmail>
  <SendViaOutboundEmailBcc xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
  <SendViaOutboundEmailCc xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>jane.doe@domain.com</d2p1:string>
    <d2p1:string>jack.more@domain.com</d2p1:string>
  </SendViaOutboundEmailCc>
  <SendViaOutboundEmailFrom>company@domain.com</SendViaOutboundEmailFrom>
  <SendViaOutboundEmailTo>john.doe@domain.com</SendViaOutboundEmailTo>
  <ServiceId i:nil="true" />
  <ServiceMailboxId>2</ServiceMailboxId>
  <SolverUserProviderKey i:nil="true" />
  <Subject>I cannot access to the net printer</Subject>
  <SubmitterUserProviderKey i:nil="true" />
  <Type>EndUserTicket</Type>
</NewTicketPost>

Response Information

Resource Description

Returns ticket REF

NewTicketResult
NameDescriptionTypeAdditional information
TicketREF

Reference ID of the newly created Ticket

string

None.

TicketId

The unique identifier of the newly created Ticket

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "TicketREF": "TIC-000023",
  "TicketId": 123
}

application/xml, text/xml

Sample:
<NewTicketResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.Results">
  <TicketId>123</TicketId>
  <TicketREF>TIC-000023</TicketREF>
</NewTicketResult>