POST api/Tickets/UpdateCustomForm

Updates ticket's custom form fields. You can send one or more ticket custom form field values to update. If you need to get the custom form definition first, use GET api/CustomForms/GetCustomFormsForTicket/{id}.

Request Information

URI Parameters

None.

Body Parameters

UpdateCustomFormPost
NameDescriptionTypeAdditional information
TicketId

(Required) The ticket Id.

integer

None.

CustomFormId

(Required) The custom form Id.

integer

None.

ServiceId

(Required) The Service id must be filled or category item id.

integer

None.

CategoryItemId

(Required) The Service id must be filled or category item id.

integer

None.

CustomFormFieldsData

(Required) The data. If you don't send the custom form field record at all, the field won't be edited.

Collection of CustomFormFieldData

None.

Request Formats

application/json, text/json

Sample:
{
  "TicketId": 1,
  "CustomFormId": 0,
  "ServiceId": null,
  "CategoryItemId": null,
  "CustomFormFieldsData": [
    {
      "CustomFormFieldId": 1,
      "TextBoxValue": "The text value",
      "DecimalValue": null,
      "IntegerValue": null,
      "CheckBoxValue": null,
      "DateValue": null,
      "SelectedCustomFormFieldItemId": null,
      "CustomFormFieldItems": null
    }
  ]
}

application/xml, text/xml

Sample:
<UpdateCustomFormPost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.Posts">
  <CategoryItemId i:nil="true" />
  <CustomFormFieldsData>
    <UpdateCustomFormPost.CustomFormFieldData>
      <CheckBoxValue i:nil="true" />
      <CustomFormFieldId>1</CustomFormFieldId>
      <CustomFormFieldItems i:nil="true" />
      <DateValue i:nil="true" />
      <DecimalValue i:nil="true" />
      <IntegerValue i:nil="true" />
      <SelectedCustomFormFieldItemId i:nil="true" />
      <TextBoxValue>The text value</TextBoxValue>
    </UpdateCustomFormPost.CustomFormFieldData>
  </CustomFormFieldsData>
  <CustomFormId>0</CustomFormId>
  <ServiceId i:nil="true" />
  <TicketId>1</TicketId>
</UpdateCustomFormPost>

Response Information

Resource Description

IHttpActionResult

None.