--- title: "Field" slug: "server-api-ticketing-field" updated: 2022-06-16T07:27:47Z published: 2022-06-16T07:27:47Z canonical: "developer.comm100.com/server-api-ticketing-field" --- > ## Documentation Index > Fetch the complete documentation index at: https://developer.comm100.com/llms.txt > Use this file to discover all available pages before exploring further. # Field ## Field Field of ticket. - `Fields` - Fields Manage - `GET ticketing/fields` - [Get the list of Fields](/docs/server-api-ticketing-field#get-the-list-of-fields) - `GET ticketing/fields/{id}` - [Get a single Field](/docs/server-api-ticketing-field#get-a-single-field) - `POST ticketing/fields` - [Create a new Field](/docs/server-api-ticketing-field#create-a-new-field) - `PUT ticketing/fields/{id}` - [Update the Field](/docs/server-api-ticketing-field#update-the-field) - `DELETE ticketing/fields/{id}` - [Remove the Field](/docs/server-api-ticketing-field#remove-the-field) ### Field JSON Format Field is represented as simple flat JSON objects with the following keys: | Name | Type | Description | | --- | --- | --- | | `isSystem` | bool | Whether the field is a system field or not. | | `isRequired` | bool | Whether the field value is required or not. | | `type` | string | Type of the field. Allowed values are "text", "textArea", "email", "url", "date", "integer", "float", "agent", "radioButton", "checkBox", "dropdownList", "checkboxList", "link", "department", "phone", "channelAccount", "channel", "tag". | | `name` | string | Name of the field. | | `systemName` | string | Field name for system. | | `length` | integer | Field length. | | `helpText` | string | Description of the field. | | `defaultValue` | string | Default value of the field. | | `linkURL` | string | URL of the field. Only the field with link type will have such value. | | `id` | guid | Id of the field. | | `order` | integer | | | `fieldOptions` | [fieldOptions[]](/docs/server-api-ticketing-field#field-option-json-format) | Reference to Field Option. | ### Field Option JSON Format: | Name | Type | Description | | --- | --- | --- | | `id` | guid | Id of the field option. | | `fieldId` | guid | Id of the field which the option belongs to. | | `value` | string | Value of the option. | | `order` | integer | Order of the option. | | `displayText` | string | Display text of the option. | ### Get the list of Fields `GET ticketing/fields` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `keywords` | string | query | no | Filter by field name. | | `include` | string | query | no | Allowed values are "ticketingFieldOption", "ticketingFieldMapping". | - #### Response: An array of [Field](/docs/server-api-ticketing-field#field-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/fields \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` [ { "isSystem": false, "isRequired": false, "type": "dropdownList", "name": "My Select", "systemName": "", "length": 256, "helpText": "My custom select.", "defaultValue": "op1", "linkURL": "", "id": "110499d0-5a3e-469f-b8de-9a34e99092b0", "order": 1, "fieldOptions": [ { "id": "8bf39eb8-be1e-48b7-b324-85e152f42432", "fieldId": "110499d0-5a3e-469f-b8de-9a34e99092b0", "value": "op1", "order": 1, "displayText": "op1" } ] } ] ``` ### Get a single Field `GET ticketing/fields/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `include` | string | query | no | Allowed values are "ticketingFieldOption", "ticketingFieldMapping". | - #### Response: [Field](/docs/server-api-ticketing-field#field-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/fields/110499d0-5a3e-469f-b8de-9a34e99092b0 \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "isSystem": false, "isRequired": false, "type": "dropdownList", "name": "My Select", "systemName": "", "length": 256, "helpText": "My custom select.", "defaultValue": "op1", "linkURL": "", "id": "110499d0-5a3e-469f-b8de-9a34e99092b0", "order": 1, "fieldOptions": [ { "id": "8bf39eb8-be1e-48b7-b324-85e152f42432", "fieldId": "110499d0-5a3e-469f-b8de-9a34e99092b0", "value": "op1", "order": 1, "displayText": "op1" } ] } ``` ### Create a new Field `POST ticketing/fields` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `isSystem` | bool | body | no | Whether the field is a system field or not. | | `isRequired` | bool | body | no | Whether the field value is required or not. | | `type` | string | body | no | Type of the field. Allowed values are "text", "textArea", "email", "url", "date", "integer", "float", "agent", "radioButton", "checkBox", "dropdownList", "checkboxList", "link", "department", "phone", "channelAccount", "channel", "tag". | | `name` | string | body | yes | Name of the field. | | `systemName` | string | body | no | Field name for system. | | `length` | integer | body | no | Field length. | | `helpText` | string | body | no | Description of the field. | | `defaultValue` | string | body | no | Default value of the field. | | `linkURL` | string | body | yes | URL of the field. Only the field with link type will have such value. | | `order` | integer | body | no | | | `fieldOptions` | [fieldOptions[]](/docs/server-api-ticketing-field#field-option-json-format) | body | no | Option in ticket field. | | `fieldMapping` | [fieldMapping](/docs/ticketingfieldmapping) | body | no | Mapping in ticket field mapping. | - #### Response: [Field](/docs/server-api-ticketing-field#field-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/fields \ -X 'POST' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"isSystem":false,"isRequired":false,"type":"dropdownList","name":"My Select","systemName":"","length":256,"helpText":"My custom select.","defaultValue":"op1","linkURL":"","order":1,"fieldOptions":[{"value":"op1","order":1,"displayText":"op1"}],"fieldMapping":{"mappedChatField":"{!Visitor.Current Page URL}","mappedOfflineMessageField":"{!Visitor.Email}"}}' ``` Response: HTTP/1.1 201 Created ``` { "isSystem": false, "isRequired": false, "type": "dropdownList", "name": "My Select", "systemName": "", "length": 256, "helpText": "My custom select.", "defaultValue": "op1", "linkURL": "", "id": "110499d0-5a3e-469f-b8de-9a34e99092b0", "order": 1, "fieldOptions": [ { "id": "8bf39eb8-be1e-48b7-b324-85e152f42432", "fieldId": "110499d0-5a3e-469f-b8de-9a34e99092b0", "value": "op1", "order": 1, "displayText": "op1" } ] } ``` ### Update the Field `PUT ticketing/fields/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `isSystem` | bool | body | no | Whether the field is a system field or not. | | `isRequired` | bool | body | no | Whether the field value is required or not. | | `type` | string | body | no | Type of the field. Allowed values are "text", "textArea", "email", "url", "date", "integer", "float", "agent", "radioButton", "checkBox", "dropdownList", "checkboxList", "link", "department", "phone", "channelAccount", "channel", "tag". | | `name` | string | body | yes | Name of the field. | | `systemName` | string | body | no | Field name for system. | | `length` | integer | body | no | Field length. | | `helpText` | string | body | no | Description of the field. | | `defaultValue` | string | body | no | Default value of the field. | | `linkURL` | string | body | yes | URL of the field. Only the field with link type will have such value. | | `order` | integer | body | no | | | `fieldOptions` | [fieldOptions[]](/docs/server-api-ticketing-field#field-option-json-format) | body | no | Option in ticket field. | | `fieldMapping` | [fieldMapping](/docs/ticketingfieldmapping) | body | no | Mapping in ticket field mapping. | - #### Response: [Field](/docs/server-api-ticketing-field#field-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/fields/110499d0-5a3e-469f-b8de-9a34e99092b0 \ -X 'PUT' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"isSystem":false,"isRequired":false,"type":"dropdownList","name":"My Select","systemName":"","length":256,"helpText":"My custom select.","defaultValue":"op1","linkURL":"","order":1,"fieldOptions":[{"value":"op1","order":1,"displayText":"op1"}],"fieldMapping":{"mappedChatField":"{!Visitor.Current Page URL}","mappedOfflineMessageField":"{!Visitor.Email}"}}' ``` Response: HTTP/1.1 200 OK ``` { "isSystem": false, "isRequired": false, "type": "dropdownList", "name": "My Select", "systemName": "", "length": 256, "helpText": "My custom select.", "defaultValue": "op1", "linkURL": "", "id": "110499d0-5a3e-469f-b8de-9a34e99092b0", "order": 1, "fieldOptions": [ { "id": "8bf39eb8-be1e-48b7-b324-85e152f42432", "fieldId": "110499d0-5a3e-469f-b8de-9a34e99092b0", "value": "op1", "order": 1, "displayText": "op1" } ] } ``` ### Remove the Field `DELETE ticketing/fields/{id}` - #### Parameters: No Parameters - #### Response: No Content - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/fields/110499d0-5a3e-469f-b8de-9a34e99092b0 \ -X 'DELETE' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 204 No Content