---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# Trouble Ticket Open API

# Trouble Ticket Open API {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 47 minutes to read

The Trouble Ticket Open API provides endpoints to create, update,
and retrieve data from the Case \[sn_customerservice_case\] and Incident \[incident\]
tables.
Use this API to manage ticket information between external ticketing systems and the
ServiceNow AI Platform.

This API is included in the [Telecommunications Assurance Workflows](https://store.servicenow.com/sn_appstore_store.do#!/store/application/9e07323d5b2110100206cb837b81c773)
application, which is available on the ServiceNow Store. The Customer Service (com.sn_customerservice) and Customer Service
Install Base Management (com.snc.install_base) applications are required to use this
API with the Case \[sn_customerservice_case\] table.

This API is provided within the `sn_ind_tsm_sdwan` namespace.

The calling user must have the ticket_integrator role.

This API can be extended to make customizations around required parameters, request body validation, additional REST operations, and field mappings. For more information, see the [Trouble Ticket Open API
Developer Guide](https://servicenow-prod.fluidtopics.net/JZ5FV1GWPoM3EYKpysMkiA#trouble-ticket_dev-guide "Use the Trouble Ticket Open API to manage ticket information between external ticketing systems and the ServiceNow AI Platform. This API creates, updates, and retrieves data from the Case [sn_customerservice_case] and Incident [incident] tables.").

The Trouble Ticket Open API is a ServiceNow®
implementation of the TM Forum Trouble Ticket Management API REST specification.
This implementation is based on the [TMF621 Trouble Ticket Management API REST
Specification Release 19](https://www.tmforum.org/resources/specification/tmf621-trouble-ticket-management-api-rest-specification-r19-0-0/), June 2019. The Trouble Ticket Open API is conformance certified by TM Forum.

## Trouble Ticket - GET /sn_ind_tsm_sdwan/ticket/troubleTicket  {#ariaid-title2}

Retrieves a list of all trouble ticket records from the Case \[sn_customerservice_case\]
and Incident \[incident\] tables.

### URL format

Default URL: /api/sn_ind_tsm_sdwan/ticket/troubleTicket

### Supported request parameters

{#trouble-ticket-GET-ticket-tt__entry__2}

| Name | Description |
|-|-|
| None |   |
[Table 1. Path parameters]

{#trouble-ticket-GET-ticket-tt__entry__6}

| Name | Description |
|-|-|
| fields | List of fields to return in the response. Invalid fields are ignored. Valid fields: * channel * creationDate * description * href * id * lastUpdate * name * note * relatedEntity * relatedParty * severity * status * ticketType * @type {#trouble-ticket-GET-ticket-tt__ul_n1h_htz_54b} Default: Returns all fields. Data type: String |
| id | Filter trouble tickets by sys_id. Only tickets with the specified sys_id are returned in the response. Data type: String |
| limit | Maximum number of records to return. For requests that exceed this number of records, use the offset parameter to paginate record retrieval. Default: 25 Maximum: 100 You can change the default and maximum values by updating the sn_ind_tsm_sdwan.pagination.set_limit and sn_ind_tsm_sdwan.pagination.max_limit system properties. Data type: Number |
| offset | Starting index at which to begin retrieving records. Use this value to paginate record retrieval. This functionality enables the retrieval of all records, regardless of the number of records, in small manageable chunks. Default: 0 Data type: Number |
| severity | Filter trouble tickets by severity. Only tickets with the specified severity are returned in the response. Data type: String |
| status | Filter trouble tickets by status. Only tickets with the specified status are returned in the response. Data type: String |
| ticketType | Filter trouble tickets by ticket type. Only tickets of the specified type are returned in the response. Valid values: * Case * Incident {#trouble-ticket-GET-ticket-tt__ul_pb5_lk3_ktb} Data type: String |
[Table 2. Query parameters]

{#trouble-ticket-GET-ticket-tt__entry__22}

| Name | Description |
|-|-|
| None |   |
[Table 3. Request body parameters (JSON)]

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#trouble-ticket-GET-ticket-tt__entry__26}

| Header | Description |
|-|-|
| None |   |
[Table 4. Request headers]

{#trouble-ticket-GET-ticket-tt__table_c2r_4gm_lsb__entry__2}{#trouble-ticket-GET-ticket-tt__content-range-row}{#trouble-ticket-GET-ticket-tt__content-type-row}{#trouble-ticket-GET-ticket-tt__links-pagination-row}{#trouble-ticket-GET-ticket-tt__x-total-count-descr}

| Header | Description |
|-|-|
| Content-Range | Specifies the range of content returned in a paginated call. For example, if `offset=2` and `limit=3`, the value of the Content-Range header is `items 3-5`. |
| Content-Type | Data format of the response body. Only supports application/json. |
| Link | Contains the following links to navigate through query results. * first * last * next * previous {#trouble-ticket-GET-ticket-tt__ul_zzk_sdm_lsb} |
| X-Total-Count | For paginated queries, this header specifies the total number of records available on the server. |
[Table 5. Response headers]

{#trouble-ticket-GET-ticket-tt__table_c2r_4gm_lsb}

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#trouble-ticket-GET-ticket-tt__table_qbg_4cm_lsb__entry__2}{#trouble-ticket-GET-ticket-tt__tmf-get-status-200-p}{#trouble-ticket-GET-ticket-tt__tmf-get-status-206-entry}{#trouble-ticket-GET-ticket-tt__tmf-get-status-400-entry}{#trouble-ticket-GET-ticket-tt__tmf-get-status-404-entry}

| Status code | Description |
|-|-|
| 200 | Request successfully processed. Full resource returned in response (no pagination). |
| 206 | Partial resource returned in response (with pagination). |
| 400 | Bad request. Possible reasons: * Invalid path parameter * Invalid URI {#trouble-ticket-GET-ticket-tt__ul_rys_1gy_fsb} |
| 404 | Record not found. No records matching the query parameters are found in the table. |
[Table 6. Status codes]

{#trouble-ticket-GET-ticket-tt__table_qbg_4cm_lsb}

### Response body parameters (JSON) {#trouble-ticket-GET-ticket-tt__section_mgj_t43_ktb}

{#trouble-ticket-GET-ticket-tt__table_n4d_yvm_5pb__entry__2}

| Name | Description |
|-|-|
| channel | The method of contact that the ticket was created through. Data type: Object "channel":{ "name": "String" } |
| channel.name | The name of the contact method. Maps to the Channel \[contact_type\] field for cases and the Contact type \[contact_type\] field for incidents. Data type: String |
| creationDate | The date that the case or incident record was created. Maps to the Created field. Data type: String |
| description | The description of the issue from the ticket. Maps to the Description field. Data type: String |
| href | Relative link to the case or incident record. Data type: String |
| id | The sys_id of the case or incident record. Data type: String |
| lastUpdate | The date the record was last updated. Maps to the Updated field. Data type: String |
| name | The name of the trouble ticket, typically a short description of the issue. Maps to the Short description field. Data type: String |
| note | A list of all comments on the ticket. This list does not include work notes. Data type: Array "note":[ { "author": "String", "date": "String", "text": "String", "@type": "String" } ] |
| note.@type | The type of note. Only comments are returned (not work notes) so this value is always `comments`. Data type: String |
| note.author | The name of the ServiceNow integration user who made the POST or PATCH request that created the comment. Data type: String |
| note.date | The date the comment was created in the ServiceNow instance. Data type: String |
| note.text | The comment text. Data type: String |
| relatedEntity | List of impacted assets, products, sold products (product inventory), configuration items, or services. Data type: Array "relatedEntity": [ { "id": "String", "href": "String", "name": "String", "role": "String", "@referredType": "String", "@type": "String" } ] |
| relatedEntity.id | Sys_id of the impacted item or service. For cases, this value is from one of the following tables: * Asset \[alm_asset\] * Product Model \[cmdb_model\] * Sold Product \[sn_install_base_sold_product\] * Product Inventory \[sn_prd_invt_product_inventory\], which extends the Sold Product \[sn_install_base_sold_product\] table {#trouble-ticket-GET-ticket-tt__ul_en1_3jc_hwb}For incidents, this value is from one of the following tables: <!-- --> * Configuration Item \[cmdb_ci\] * Service \[cmdb_ci_service\] {#trouble-ticket-GET-ticket-tt__ul_fn1_3jc_hwb} Data type: String |
| relatedEntity.href | Returns an empty string. Data type: String |
| relatedEntity.name | Name of the impacted item or service. Data type: String |
| relatedEntity.role | Description of the impacted item or service. Data type: String |
| relatedEntity.@referredType | The type of item or service. Valid values for case tickets: * asset * product * product_inventory {#trouble-ticket-GET-ticket-tt__ul_zrm_5jp_mtb} Valid values for incident tickets: * cmdb_ci * cmdb_ci_service {#trouble-ticket-GET-ticket-tt__ul_asm_5jp_mtb} Data type: String |
| relatedEntity.@type | This value is always `relatedEntity`. Data type: String |
| relatedParty | Details about contacts for the ticket. Data type: Array "relatedParty": [ { "id": "String", "name": "String", "@referredType": "String" } ] |
| relatedParty.id | Sys_id of the related party. The sys_id can be from the following tables depending on the ticket type and the related party type. Case: * Account \[customer_account\] - Related party type is <kbd class="ph userinput">customer</kbd> * Contact \[customer_contact\] - Related party type is <kbd class="ph userinput">customer_contact</kbd> {#trouble-ticket-GET-ticket-tt__ul_vf5_n3g_4tb} Incident: * Company \[core_company\] - Related party type is <kbd class="ph userinput">customer</kbd> * User \[sys_user\] - Related party type is <kbd class="ph userinput">customer_contact</kbd> {#trouble-ticket-GET-ticket-tt__ul_ll2_p3g_4tb} Case or incident: * Group \[sys_user_group\] - Related party type is <kbd class="ph userinput">assignment_group</kbd> * User \[sys_user\] - Related party type is <kbd class="ph userinput">assigned_to</kbd> {#trouble-ticket-GET-ticket-tt__ul_umf_r3g_4tb} Data type: String |
| relatedParty.name | Name of the related party. Data type: String |
| relatedParty.@referredType | The type of related party. Possible values: * <kbd class="ph userinput">assigned_to</kbd>: The user assigned to work on the ticket. * <kbd class="ph userinput">assignment_group</kbd>: The group assigned to work on the ticket. * <kbd class="ph userinput">customer</kbd>: The company or account for the ticket. * <kbd class="ph userinput">customer_contact</kbd>: The caller or contact for the ticket. {#trouble-ticket-GET-ticket-tt__ul_bxv_jgg_4tb} Data type: String |
| severity | The severity of the issue described by the trouble ticket. Maps to the Priority field. Data type: String |
| status | The current status of the trouble ticket. Maps to the State field. Data type: String |
| ticketType | The type of ticket. Possible values: * Case * Incident {#trouble-ticket-GET-ticket-tt__ul_czp_2mc_ktb} Data type: String |
| @type | This value is always `TroubleTicket`. Data type: String |
[ ]

{#trouble-ticket-GET-ticket-tt__table_n4d_yvm_5pb}  

### cURL request

This example returns specified fields for the first five trouble ticket case records.

    curl "https://instance.servicenow.com/api/sn_ind_tsm_sdwan/ticket/troubleTicket?limit=5&fields=id%2Cname%2Cdescription%2Cstatus%2Cseverity%2CticketType&ticketType=case" \
    --request GET \
    --user 'username':'password'

Response body.

    [
       {
          "id": "0004609eb9830110f877b3758cd21d37",
          "name": "Compliant Over 2796",
          "description": "checkNo2796",
          "status": "New",
          "severity": "3 - Moderate",
          "ticketType": "Case"
       },
       {
          "id": "000560d2b9c30110f877b3758cd21d36",
          "name": "Compliant Over 4696",
          "description": "checkNo4696",
          "status": "New",
          "severity": "3 - Moderate",
          "ticketType": "Case"
       },
       {
          "id": "0007ac5eb9c30110f877b3758cd21d34",
          "name": "Compliant Over 8817",
          "description": "checkNo8817",
          "status": "New",
          "severity": "3 - Moderate",
          "ticketType": "Case"
       },
       {
          "id": "0007ac5eb9c30110f877b3758cd21d39",
          "name": "Compliant Over 8819",
          "description": "checkNo8819",
          "status": "New",
          "severity": "3 - Moderate",
          "ticketType": "Case"
       },
       {
          "id": "0007ac5eb9c30110f877b3758cd21d3e",
          "name": "Compliant Over 8821",
          "description": "checkNo8821",
          "status": "New",
          "severity": "3 - Moderate",
          "ticketType": "Case"
       }
    ]

## Trouble Ticket - GET /sn_ind_tsm_sdwan/ticket/troubleTicket/{id} {#ariaid-title3}

Retrieves a specified record from the Case \[sn_customerservice_case\] or Incident
\[incident\] table.

### URL format {#trouble-ticket-GET-ticket-tt-id__section_fcs_wqm_5pb}

Default URL:
/api/sn_ind_tsm_sdwan/ticket/troubleTicket/{id}

### Supported request parameters

{#trouble-ticket-GET-ticket-tt-id__table_ufw_yqm_5pb__entry__2}

| Name | Description |
|-|-|
| id | Sys_id of the case or incident record to retrieve. Located in the Case \[sn_customerservice_case\] or Incident \[incident\] table. Data type: String |
[Table 7. Path parameters]

{#trouble-ticket-GET-ticket-tt-id__table_ufw_yqm_5pb} {#trouble-ticket-GET-ticket-tt-id__table_cn5_zqm_5pb__entry__2}

| Name | Description |
|-|-|
| fields | List of fields to return in the response. Invalid fields are ignored. Valid values: * channel * creationDate * description * href * id * lastUpdate * name * note * relatedEntity * relatedParty * severity * status * ticketType * @type {#trouble-ticket-GET-ticket-tt-id__ul_n1h_htz_54b} Default: Returns all fields. Data type: String |
[Table 8. Query parameters]

{#trouble-ticket-GET-ticket-tt-id__table_cn5_zqm_5pb} {#trouble-ticket-GET-ticket-tt-id__entry__10}

| Name | Description |
|-|-|
| None |   |
[Table 9. Request body parameters (JSON)]

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#trouble-ticket-GET-ticket-tt-id__entry__14}{#trouble-ticket-GET-ticket-tt-id__accept-JSON-only-entry-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Only supports application/json. |
[Table 10. Request headers]

{#trouble-ticket-GET-ticket-tt-id__entry__18}

| Header | Description |
|-|-|
| None |   |
[Table 11. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#trouble-ticket-GET-ticket-tt-id__entry__22}{#trouble-ticket-GET-ticket-tt-id__entry-200-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected for one or more of the following reasons. * Invalid path parameter. * Invalid URI. {#trouble-ticket-GET-ticket-tt-id__ul_rjf_fqw_rpb} |
| 404 | Record not found. A record associated with the ID is not found in the Case \[sn_customerservice_case\] or Incident \[incident\] table. |
[Table 12. Status codes]

### Response body parameters (JSON)

{#trouble-ticket-GET-ticket-tt-id__table_n4d_yvm_5pb__entry__2}

| Name | Description |
|-|-|
| channel | The method of contact that the ticket was created through. Data type: Object "channel":{ "name": "String" } |
| channel.name | The name of the contact method. Maps to the Channel \[contact_type\] field for cases and the Contact type \[contact_type\] field for incidents. Data type: String |
| creationDate | The date that the case or incident record was created. Maps to the Created field. Data type: String |
| description | The description of the issue from the ticket. Maps to the Description field. Data type: String |
| href | Relative link to the case or incident record. Data type: String |
| id | The sys_id of the case or incident record. Data type: String |
| lastUpdate | The date the record was last updated. Maps to the Updated field. Data type: String |
| name | The name of the trouble ticket, typically a short description of the issue. Maps to the Short description field. Data type: String |
| note | A list of all comments on the ticket. This list does not include work notes. Data type: Array "note":[ { "author": "String", "date": "String", "text": "String", "@type": "String" } ] |
| note.@type | The type of note. Only comments are returned (not work notes) so this value is always `comments`. Data type: String |
| note.author | The name of the user who wrote the comment. Data type: String |
| note.date | The date the comment was created in the ServiceNow instance. Data type: String |
| note.text | The comment text. Data type: String |
| relatedEntity | List of impacted assets, products, sold products (product inventory), configuration items, or services. Data type: Array "relatedEntity": [ { "id": "String", "href": "String", "name": "String", "role": "String", "@referredType": "String", "@type": "String" } ] |
| relatedEntity.id | Sys_id of the impacted item or service. For cases, this value is from one of the following tables: * Asset \[alm_asset\] * Product Model \[cmdb_model\] * Sold Product \[sn_install_base_sold_product\] * Product Inventory \[sn_prd_invt_product_inventory\], which extends the Sold Product \[sn_install_base_sold_product\] table {#trouble-ticket-GET-ticket-tt-id__ul_en1_3jc_hwb}For incidents, this value is from one of the following tables: <!-- --> * Configuration Item \[cmdb_ci\] * Service \[cmdb_ci_service\] {#trouble-ticket-GET-ticket-tt-id__ul_fn1_3jc_hwb} Data type: String |
| relatedEntity.href | Returns an empty string. Data type: String |
| relatedEntity.name | Name of the impacted item or service. Data type: String |
| relatedEntity.role | Description of the impacted item or service. Data type: String |
| relatedEntity.@referredType | The type of item or service. Valid values for case tickets: * asset * product * product_inventory {#trouble-ticket-GET-ticket-tt-id__ul_zrm_5jp_mtb} Valid values for incident tickets: * cmdb_ci * cmdb_ci_service {#trouble-ticket-GET-ticket-tt-id__ul_asm_5jp_mtb} Data type: String |
| relatedEntity.@type | This value is always `relatedEntity`. Data type: String |
| relatedParty | Details about contacts for the ticket. Data type: Array "relatedParty": [ { "id": "String", "name": "String", "@referredType": "String" } ] |
| relatedParty.id | Sys_id of the related party. The sys_id can be from the following tables depending on the ticket type and the related party type. Case: * Account \[customer_account\] - Related party type is <kbd class="ph userinput">customer</kbd> * Contact \[customer_contact\] - Related party type is <kbd class="ph userinput">customer_contact</kbd> {#trouble-ticket-GET-ticket-tt-id__ul_vf5_n3g_4tb} Incident: * Company \[core_company\] - Related party type is <kbd class="ph userinput">customer</kbd> * User \[sys_user\] - Related party type is <kbd class="ph userinput">customer_contact</kbd> {#trouble-ticket-GET-ticket-tt-id__ul_ll2_p3g_4tb} Case or incident: * Group \[sys_user_group\] - Related party type is <kbd class="ph userinput">assignment_group</kbd> * User \[sys_user\] - Related party type is <kbd class="ph userinput">assigned_to</kbd> {#trouble-ticket-GET-ticket-tt-id__ul_umf_r3g_4tb} Data type: String |
| relatedParty.name | Name of the related party. Data type: String |
| relatedParty.@referredType | The type of related party. Possible values: * <kbd class="ph userinput">assigned_to</kbd>: The user assigned to work on the ticket. * <kbd class="ph userinput">assignment_group</kbd>: The group assigned to work on the ticket. * <kbd class="ph userinput">customer</kbd>: The company or account for the ticket. * <kbd class="ph userinput">customer_contact</kbd>: The caller or contact for the ticket. {#trouble-ticket-GET-ticket-tt-id__ul_bxv_jgg_4tb} Data type: String |
| severity | The severity of the issue described by the trouble ticket. Maps to the Priority field. Data type: String |
| status | The current status of the trouble ticket. Maps to the State field. Data type: String |
| ticketType | The type of ticket. Possible values: * Case * Incident {#trouble-ticket-GET-ticket-tt-id__ul_czp_2mc_ktb} Data type: String |
| @type | This value is always `TroubleTicket`. Data type: String |
[ ]

{#trouble-ticket-GET-ticket-tt-id__table_n4d_yvm_5pb}  

### cURL request

This example retrieves a trouble ticket record from the Case \[sn_customerservice_case\]
table.

    curl "https://instance.servicenow.com/api/sn_ind_tsm_sdwan/ticket/troubleTicket/6467508d47e345508761b955d36d43f6" \
    --request GET \
    --header "Accept:application/json" \
    --user 'username':'password'

Response body.

    {
        "id": "370415f03c20e910f8772f1bc332b31b",
        "href": "/api/sn_ind_tsm_sdwan/ticket/troubleTicket/370415f03c20e910f8772f1bc332b31b",
        "creationDate": "2023-01-19 22:39:28",
        "lastUpdate": "2023-01-19 22:41:39",
        "description": "Router is not working, my devices cannot detect any signals from the router. First button from the left is flashing red, all others are black. Resetting the router does not solve the problem, I need urgent assistance.",
        "severity": "2 - High",
        "ticketType": "Case",
        "name": "My router is not working properly",
        "status": "Open",
        "channel": {
            "name": "e_bonding"
        },
        "relatedParty": [
            {
                "id": "ffc68911c35420105252716b7d40dd55",
                "name": "Funco Intl",
                "@referredType": "customer"
            },
            {
                "id": "eaf68911c35420105252716b7d40ddde",
                "name": "Sally Thomas",
                "@referredType": "customer_contact"
            },
            {
                "id": "",
                "name": "",
                "@referredType": "assignment_group"
            },
            {
                "id": "",
                "name": "",
                "@referredType": "assigned_to"
            }
        ],
        "relatedEntity": [
            {
                "id": "b7fa12c7532520103b6bddeeff7b123b",
                "href": "",
                "name": "Deduplication and Compression PRD00001965",
                "role": "This is the product associated with the case.",
                "@type": "relatedEntity",
                "@referredType": "product"
            },
            {
                "id": "71e73d87c3e23010ff00ed23a140dde8",
                "href": "",
                "name": "",
                "role": "This is the asset associated with the case.",
                "@type": "relatedEntity",
                "@referredType": "asset"
            },
            {
                "id": "a1913c3577b301108e191e599a5a99e8",
                "href": "",
                "name": "Deduplication and Compression PI0000037",
                "role": "This is the product inventory associated with the case.",
                "@type": "relatedEntity",
                "@referredType": "product_inventory"
            }
        ],
        "note": [
            {
                "text": "This is a testing comment<script>gs.info('Hello World')</script>",
                "date": "2023-01-19 14:41:39",
                "author": "System Administrator",
                "@type": "comments"
            },
            {
                "text": "This is a testing comment<script>gs.info('Hello World')</script>",
                "date": "2023-01-19 14:39:28",
                "author": "System Administrator",
                "@type": "comments"
            }
        ],
        "@type": "TroubleTicket"
    }

## Trouble Ticket - GET /sn_ind_tsm_sdwan/troubleticket/{ticketType}/{id} {#ariaid-title4}

Retrieves a specified record from the Case \[sn_customerservice_case\] or Incident
\[incident\] table.
Important:  
Starting with the Tokyo release, this endpoint is deprecated. The new version of this endpoint is [Trouble Ticket - GET /sn_ind_tsm_sdwan/ticket/troubleTicket/{id}](https://servicenow-prod.fluidtopics.net/Ca28OB4CEuUq5KWTZaJtJg#trouble-ticket-GET-ticket-tt-id "Retrieves a specified record from the Case [sn_customerservice_case] or Incident [incident] table.").

### URL format {#trouble-ticket-GET-trouble_ticket__section_fcs_wqm_5pb}

Default URL:
/api/sn_ind_tsm_sdwan/troubleticket/{ticketType}/{id}

### Supported request parameters

{#trouble-ticket-GET-trouble_ticket__table_ufw_yqm_5pb__entry__2}

| Name | Description |
|-|-|
| ticketType | The type of ticket. This value determines whether a record is retrieved from the Case \[sn_customerservice_case\] or Incident \[incident\] table. Valid values: * case * incident {#trouble-ticket-GET-trouble_ticket__ul_k1m_qvs_qpb} Data type: String |
| id | Sys_id of the case or incident record to retrieve. Data type: String |
[Table 13. Path parameters]

{#trouble-ticket-GET-trouble_ticket__table_ufw_yqm_5pb} {#trouble-ticket-GET-trouble_ticket__table_cn5_zqm_5pb__entry__2}

| Name | Description |
|-|-|
| fields | Comma-separated list of fields to return in the response. Invalid fields are ignored. If this value is not passed in, all fields are returned. Valid fields: * channel * creationDate * description * id * lastUpdate * name * note * relatedEntity * relatedParty * severity * status * ticketType * @type {#trouble-ticket-GET-trouble_ticket__ul_n1h_htz_54b} Data type: String |
[Table 14. Query parameters]

{#trouble-ticket-GET-trouble_ticket__table_cn5_zqm_5pb} {#trouble-ticket-GET-trouble_ticket__entry__12}

| Name | Description |
|-|-|
| None |   |
[Table 15. Request body parameters (XML or JSON)]

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#trouble-ticket-GET-trouble_ticket__entry__16}{#trouble-ticket-GET-trouble_ticket__accept-JSON-only-entry-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Only supports application/json. |
[Table 16. Request headers]

{#trouble-ticket-GET-trouble_ticket__entry__20}

| Header | Description |
|-|-|
| None |   |
[Table 17. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#trouble-ticket-GET-trouble_ticket__entry__24}{#trouble-ticket-GET-trouble_ticket__entry-200-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected for one or more of the following reasons. * Invalid path parameter. * Invalid URI. {#trouble-ticket-GET-trouble_ticket__ul_rjf_fqw_rpb} |
| 404 | Record not found. A record associated with the ID is not found in the Case \[sn_customerservice_case\] or Incident \[incident\] table. |
[Table 18. Status codes]

### Response body parameters (JSON or XML)

{#trouble-ticket-GET-trouble_ticket__table_n4d_yvm_5pb__entry__2}

| Name | Description |
|-|-|
| @type | This value is always `TroubleTicket`. Data type: String |
| channel | The method of contact that the ticket was created through. Data type: Object "channel":{ "name": "String" } |
| channel.name | The name of the contact method. Maps to the Channel \[contact_type\] field for cases and the Contact type \[contact_type\] field for incidents. Data type: String |
| creationDate | The date that the case or incident record was created. Maps to the Created field. Data type: String |
| description | The description of the issue from the ticket. Maps to the Description field. Data type: String |
| id | The sys_id of the case or incident record. Data type: String |
| lastUpdate | The date the record was last updated. Maps to the Updated field. Data type: String |
| name | The name of the trouble ticket, typically a short description of the issue. Maps to the Short description field. Data type: String |
| note | A list of all comments on the ticket. This list does not include work notes. Data type: Array "note":[ { "author": "String", "date": "String", "text": "String", "@type": "String" } ] |
| note.@type | The type of note. Only comments are returned (not work notes) so this value is always `comments`. Data type: String |
| note.author | The name of the ServiceNow integration user who made the POST or PATCH request that created the comment. Data type: String |
| note.date | The date the comment was created in the ServiceNow instance. Data type: String |
| note.text | The comment text. Data type: String |
| relatedEntity | List of impacted assets, products, sold products (product inventory), configuration items, or services. Data type: Array "relatedEntity": [ { "id": "String", "href": "String", "name": "String", "role": "String", "@referredType": "String", "@type": "String" } ] |
| relatedEntity.id | Sys_id of the impacted item or service. For cases, this value is from one of the following tables: * Asset \[alm_asset\] * Product Model \[cmdb_model\] * Sold Product \[sn_install_base_sold_product\] * Product Inventory \[sn_prd_invt_product_inventory\], which extends the Sold Product \[sn_install_base_sold_product\] table {#trouble-ticket-GET-trouble_ticket__ul_en1_3jc_hwb}For incidents, this value is from one of the following tables: <!-- --> * Configuration Item \[cmdb_ci\] * Service \[cmdb_ci_service\] {#trouble-ticket-GET-trouble_ticket__ul_fn1_3jc_hwb} Data type: String |
| relatedEntity.href | Returns an empty string. Data type: String |
| relatedEntity.name | Name of the impacted item or service. Data type: String |
| relatedEntity.role | Description of the impacted item or service. Data type: String |
| relatedEntity.@referredType | The type of item or service. Valid values for case tickets: * asset * product * product_inventory {#trouble-ticket-GET-trouble_ticket__ul_zrm_5jp_mtb} Valid values for incident tickets: * cmdb_ci * cmdb_ci_service {#trouble-ticket-GET-trouble_ticket__ul_asm_5jp_mtb} Data type: String |
| relatedEntity.@type | This value is always `relatedEntity`. Data type: String |
| relatedParty | Details about the companies and contacts associated with the ticket. Data type: Array "relatedParty": [ { "id": "String", "name": "String", "@referredType": "String" } ] |
| relatedParty.@referredType | The type of related party. Valid values: * customer: The company or account for the ticket. * customer_contact: The caller or contact for the ticket. {#trouble-ticket-GET-trouble_ticket__ul_sfh_g3j_5pb} Data type: String |
| relatedParty.id | Sys_id of the related party. For cases, the sys_id is from the Contact \[customer_contact\] or Account \[customer_account\] tables. For incidents, the sys_id is from the User \[sys_user\] or Company \[core_company\] tables. If you provide a contact or a user (caller), their account or company is automatically populated on the ticket. Data type: String |
| relatedParty.name | The name of the related party. For cases, maps to the Contact or Account field. For incidents, maps to the Caller or Company field. Data type: String |
| severity | The severity of the issue described by the trouble ticket. Maps to the Priority field. Data type: String |
| status | The current status of the trouble ticket. Maps to the State field. Data type: String |
| ticketType | The type of ticket (case or incident). Data type: String |
[ ]

{#trouble-ticket-GET-trouble_ticket__table_n4d_yvm_5pb}  

### cURL request

This example gets the name, description, severity, and status of a case.

    curl "https://instance.servicenow.com/api/sn_ind_tsm_sdwan/troubleticket/case/a78e2c8cdb68b41015364c9b0b96193e?fields=name%2Cdescription%2Cseverity%2Cstatus" \
    --request GET \
    --header "Accept:application/json" \
    --user 'username':'password'

Response body.

    {
      "name": "Short description of issue",
      "description": "Example description of an issue",
      "severity": "2 - High",
      "status": "Open"
    }

## Trouble Ticket - PATCH /sn_ind_tsm_sdwan/ticket/troubleTicket/{id} {#ariaid-title5}

Updates a specified record in the Case \[sn_customerservice_case\] or Incident \[incident\]
table.

### URL format

Default URL:
/api/sn_ind_tsm_sdwan/ticket/troubleTicket/{id}

### Supported request parameters

{#trouble-ticket-PATCH-ticket-tt__entry__2}

| Name | Description |
|-|-|
| id | Sys_id of the case or incident record to update. Located in the Case \[sn_customerservice_case\] or Incident \[incident\] table. Data type: String |
[Table 19. Path parameters]

{#trouble-ticket-PATCH-ticket-tt__entry__6}

| Name | Description |
|-|-|
| None |   |
[Table 20. Query parameters]

{#trouble-ticket-PATCH-ticket-tt__entry__10}

| Name | Description |
|-|-|
| channel | The method of contact that the ticket was created through. Data type: Object "channel":{ "name": "String" } |
| channel.name | The name of the contact method. Maps to the Channel \[contact_type\] field for cases and the Contact type \[contact_type\] field for incidents. Valid values are the choices for the contact_type field. You can provide the choice label or value. For example, `Virtual Agent` or `virtual_agent`. Data type: String |
| description | A description of the issue. Maps to the Description field. Data type: String |
| name | The name of the trouble ticket, typically a short description of the issue. Maps to the Short description field. Data type: String |
| note | A list of work notes and comments to add to the ticket. Data type: Array "note":[ { "text": "String", "@type": "String" } ] |
| note.@type | The type of note. This value determines whether the note is recorded in the Work notes or Additional comments field. Valid values: * work_notes * comments {#trouble-ticket-PATCH-ticket-tt__ul_vtx_hmz_rpb} Data type: String |
| note.text | The note text. Maps to the Work notes or Additional comments field. Data type: String |
| relatedEntity | List of impacted assets, products, sold products (product inventory), configuration items, or services. Data type: Array "relatedEntity": [ { "id": "String", "@referredType": "String" } ] |
| relatedEntity.id | Sys_id of the impacted item or service. For cases, this value is from one of the following tables: * Asset \[alm_asset\] * Product Model \[cmdb_model\] * Sold Product \[sn_install_base_sold_product\] * Product Inventory \[sn_prd_invt_product_inventory\], which extends the Sold Product \[sn_install_base_sold_product\] table {#trouble-ticket-PATCH-ticket-tt__ul_vl4_13c_hwb}For incidents, this value is from one of the following tables: <!-- --> * Configuration Item \[cmdb_ci\] * Service \[cmdb_ci_service\] {#trouble-ticket-PATCH-ticket-tt__ul_lbg_b3c_hwb} Data type: String |
| relatedEntity.@referredType | The type of item or service. Valid values for case tickets: * asset * product * product_inventory {#trouble-ticket-PATCH-ticket-tt__ul_bjm_lfy_wsb} Valid values for incident tickets: * cmdb_ci * cmdb_ci_service {#trouble-ticket-PATCH-ticket-tt__ul_sfh_g3j_5pa} Data type: String |
| relatedParty | Details about contacts for the ticket. For cases, this parameter populates the Contact or Account field. For incidents, this parameter populates the Caller or Company field. Data type: Array "relatedParty": [ { "id": "String", "@referredType": "String" } ] |
| relatedParty.id | Sys_id of the related party. For cases, the sys_id is from the Contact \[customer_contact\] or Account \[customer_account\] tables. For incidents, the sys_id is from the User \[sys_user\] or Company \[core_company\] tables. If you provide a contact or a user (caller), their account or company is automatically populated on the ticket. Data type: String |
| relatedParty.@referredType | The type of related party. Valid values: * customer: The company or account for the ticket. * customer_contact: The caller or contact for the ticket. {#trouble-ticket-PATCH-ticket-tt__ul_sfh_g3j_5pb} Data type: String |
| severity | The severity of the issue described by the trouble ticket. Maps to the Priority field. Valid values: * 1: Critical. * 2: High. * 3: Moderate. * 4: Low. * 5: Planning. Incident only. {#trouble-ticket-PATCH-ticket-tt__ul_xhd_24p_rpb}Valid values are the choices for the Priority field. You must provide the choice value only. For example, `1`. If an invalid value is provided, the severity is set to Low. Data type: String |
| status | The current status of the trouble ticket. Maps to the State field. Valid values are the choices for the State field. You can provide the choice label or value. For example, `New` or `1`. Data type: String |
[Table 21. Request body parameters (JSON)]

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#trouble-ticket-PATCH-ticket-tt__entry__42}{#trouble-ticket-PATCH-ticket-tt__accept-JSON-only-entry-RESTAPI}{#trouble-ticket-PATCH-ticket-tt__content_type-JSON-only-entry-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Only supports application/json. |
| Content-Type | Data format of the request body. Only supports application/json. |
[Table 22. Request headers]

{#trouble-ticket-PATCH-ticket-tt__entry__48}

| Header | Description |
|-|-|
| None |   |
[Table 23. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#trouble-ticket-PATCH-ticket-tt__entry__52}{#trouble-ticket-PATCH-ticket-tt__entry-200-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected for one or more of the following reasons. * Invalid path parameter. * Invalid URI. {#trouble-ticket-PATCH-ticket-tt__ul_rjf_fqw_rpb} |
| 404 | Record not found. A record associated with the ID is not found in the Case \[sn_customerservice_case\] or Incident \[incident\] table. |
[Table 24. Status codes]

### Response body parameters (JSON)

{#trouble-ticket-PATCH-ticket-tt__entry__60}

| Name | Description |
|-|-|
| channel | The method of contact that the ticket was created through. Data type: Object "channel":{ "name": "String" } |
| channel.name | The name of the contact method. Data type: String |
| creationDate | The date the record was created. Data type: String |
| description | The description of the issue from the ticket. Data type: String |
| href | Relative link to the case or incident record. Data type: String |
| id | The sys_id of the case or incident record. Data type: String |
| lastUpdate | The date the record was last updated. Data type: String |
| name | The name of the trouble ticket, typically a short description of the issue. Data type: String |
| note | A list of all comments on the ticket. This list does not include work notes. Data type: Array "note":[ { "author": "String", "date": "String", "text": "String", "@type": "String" } ] |
| note.@type | The type of note. Only comments are returned (not work notes) so this value is always `comments`. Data type: String |
| note.author | The name of the user who wrote the comment. Data type: String |
| note.date | The date the comment was created in the ServiceNow instance. Data type: String |
| note.text | The comment text. Data type: String |
| relatedEntity | List of impacted assets, products, sold products (product inventory), configuration items, or services. Data type: Array "relatedEntity": [ { "id": "String", "href": "String", "name": "String", "role": "String", "@referredType": "String", "@type": "String" } ] |
| relatedEntity.id | Sys_id of the impacted item or service. For cases, this value is from one of the following tables: * Asset \[alm_asset\] * Product Model \[cmdb_model\] * Sold Product \[sn_install_base_sold_product\] * Product Inventory \[sn_prd_invt_product_inventory\], which extends the Sold Product \[sn_install_base_sold_product\] table {#trouble-ticket-PATCH-ticket-tt__ul_en1_3jc_hwb}For incidents, this value is from one of the following tables: <!-- --> * Configuration Item \[cmdb_ci\] * Service \[cmdb_ci_service\] {#trouble-ticket-PATCH-ticket-tt__ul_fn1_3jc_hwb} Data type: String |
| relatedEntity.href | Returns an empty string. Data type: String |
| relatedEntity.name | Name of the impacted item or service. Data type: String |
| relatedEntity.role | Description of the impacted item or service. Data type: String |
| relatedEntity.@referredType | The type of item or service. Valid values for case tickets: * asset * product * product_inventory {#trouble-ticket-PATCH-ticket-tt__ul_zrm_5jp_mtb} Valid values for incident tickets: * cmdb_ci * cmdb_ci_service {#trouble-ticket-PATCH-ticket-tt__ul_asm_5jp_mtb} Data type: String |
| relatedEntity.@type | This value is always `relatedEntity`. Data type: String |
| relatedParty | Details about contacts for the ticket. Data type: Array "relatedParty": [ { "id": "String", "name": "String", "@referredType": "String" } ] |
| relatedParty.id | Sys_id of the related party. The sys_id can be from the following tables depending on the ticket type and the related party type. Case: * Account \[customer_account\] - Related party type is <kbd class="ph userinput">customer</kbd> * Contact \[customer_contact\] - Related party type is <kbd class="ph userinput">customer_contact</kbd> {#trouble-ticket-PATCH-ticket-tt__ul_vf5_n3g_4tb} Incident: * Company \[core_company\] - Related party type is <kbd class="ph userinput">customer</kbd> * User \[sys_user\] - Related party type is <kbd class="ph userinput">customer_contact</kbd> {#trouble-ticket-PATCH-ticket-tt__ul_ll2_p3g_4tb} Case or incident: * Group \[sys_user_group\] - Related party type is <kbd class="ph userinput">assignment_group</kbd> * User \[sys_user\] - Related party type is <kbd class="ph userinput">assigned_to</kbd> {#trouble-ticket-PATCH-ticket-tt__ul_umf_r3g_4tb} Data type: String |
| relatedParty.name | Name of the related party. Data type: String |
| relatedParty.@referredType | The type of related party. Possible values: * <kbd class="ph userinput">assigned_to</kbd>: The user assigned to work on the ticket. * <kbd class="ph userinput">assignment_group</kbd>: The group assigned to work on the ticket. * <kbd class="ph userinput">customer</kbd>: The company or account for the ticket. * <kbd class="ph userinput">customer_contact</kbd>: The caller or contact for the ticket. {#trouble-ticket-PATCH-ticket-tt__ul_bxv_jgg_4tb} Data type: String |
| severity | The severity of the issue described by the trouble ticket. Data type: String |
| status | The current status of the trouble ticket. Data type: String |
| ticketType | The type of ticket. Possible values: * Case * Incident {#trouble-ticket-PATCH-ticket-tt__ul_czp_2mc_ktb} Data type: String |
| @type | This value is always `TroubleTicket`. Data type: String |
[ ]

### cURL request

This example updates a case record.

    curl "https://instance.servicenow.com/api/sn_ind_tsm_sdwan/ticket/troubleTicket/6467508d47e345508761b955d36d43f6" \
    --request PATCH \
    --header "Accept:application/json" \
    --header "Content-Type:application/json" \
    --data "{
       description: "Updated description",
       "note": [
          {
             "text": "Adding another comment",
             "@type": "comments"
          }
       ]
    }" \
    --user 'username':'password'

Response body.

    {
       "id": "6467508d47e345508761b955d36d43f6",
       "href": "/api/sn_ind_tsm_sdwan/ticket/troubleTicket/6467508d47e345508761b955d36d43f6",
       "creationDate": "2022-05-16 23:38:55",
       "lastUpdate": "2022-05-16 23:48:42",
       "description": "Updated description",
       "severity": "2 - High",
       "ticketType": "Case",
       "name": "Laptop problem",
       "status": "New",
       "channel": {
          "name": "web"
       },
       "relatedParty": [
          {
             "id": "",
             "name": "",
             "@referredType": "customer"
          },
          {
             "id": "62826bf03710200044e0bfc8bcbe5df1",
             "name": "",
             "@referredType": "customer_contact"
          },
          {
             "id": "",
             "name": "",
             "@referredType": "assignment_group"
          },
          {
             "id": "",
             "name": "",
             "@referredType": "assigned_to"
          }
       ],
       "relatedEntity": [
          {
             "id": "",
             "href": "",
             "name": "",
             "role": "This is the product associated with the case",
             "@type": "relatedEntity",
             "@referredType": "product"
          },
          {
             "id": "74a9ec0d3790200044e0bfc8bcbe5d7f",
             "href": "",
             "name": "P1000597 - Apple MacBook Pro 15\"",
             "role": "This is the asset associated with the case",
             "@type": "relatedEntity",
             "@referredType": "asset"
          }
          {
             "id": "a1913c3577b301108e191e599a5a99e8",
             "href": "",
             "name": "Deduplication and Compression PI0000037",
             "role": "This is the product inventory associated with the case.",
             "@type": "relatedEntity",
             "@referredType": "product_inventory"
          }
       ],
       "note": [
          {
             "text": "Adding another comment",
             "date": "2022-05-16 16:48:42",
             "author": "admin",
             "@type": "comments"
          },
          {
             "text": "Comment about this case",
             "date": "2022-05-16 16:38:55",
             "author": "admin",
             "@type": "comments"
          }
       ],
       "@type": "TroubleTicket"
    }

## Trouble Ticket - PATCH /sn_ind_tsm_sdwan/troubleticket/{ticketType}/{id} {#ariaid-title6}

Updates a record in the Case \[sn_customerservice_case\] or Incident \[incident\]
table.
Important:  
Starting with the Tokyo release, this endpoint is deprecated. The new version of this endpoint is [Trouble Ticket - PATCH /sn_ind_tsm_sdwan/ticket/troubleTicket/{id}](https://servicenow-prod.fluidtopics.net/Ca28OB4CEuUq5KWTZaJtJg#trouble-ticket-PATCH-ticket-tt "Updates a specified record in the Case [sn_customerservice_case] or Incident [incident] table.").

### URL format

Default URL:
/api/sn_ind_tsm_sdwan/troubleticket/{ticketType}/{id}

### Supported request parameters

{#trouble-ticket-PATCH-trouble_ticket__entry__2}

| Name | Description |
|-|-|
| ticketType | The type of ticket. This value determines whether a record is updated in the Case \[sn_customerservice_case\] or Incident \[incident\] table. Valid values: * case * incident {#trouble-ticket-PATCH-trouble_ticket__ul_k1m_qvs_qpb} Data type: String |
| id | The sys_id of the case or incident record to update. Data type: String |
[Table 25. Path parameters]

{#trouble-ticket-PATCH-trouble_ticket__entry__8}

| Name | Description |
|-|-|
| None |   |
[Table 26. Query parameters]

{#trouble-ticket-PATCH-trouble_ticket__entry__12}

| Name | Description |
|-|-|
| channel | The method of contact that the ticket was created through. Data type: Object "channel":{ "name": "String" } |
| channel.name | The name of the contact method. Maps to the Channel \[contact_type\] field for cases and the Contact type \[contact_type\] field for incidents. Valid values are the choices for the contact_type field. You can provide the choice label or value. For example, `Virtual Agent` or `virtual_agent`. Data type: String |
| description | A description of the issue. Maps to the Description field. Data type: String |
| name | The name of the trouble ticket, typically a short description of the issue. Maps to the Short description field. Data type: String |
| note | A list of work notes and comments to add to the ticket. Data type: Array "note":[ { "text": "String", "@type": "String" } ] |
| note.@type | The type of note. This value determines whether the note is recorded in the Work notes or Additional comments field. Valid values: * work_notes * comments {#trouble-ticket-PATCH-trouble_ticket__ul_vtx_hmz_rpb} Data type: String |
| note.text | The note text. Maps to the Work notes or Additional comments field. Data type: String |
| relatedEntity | List of impacted assets, products, sold products (product inventory), configuration items, or services. Data type: Array "relatedEntity": [ { "id": "String", "@referredType": "String" } ] |
| relatedEntity.id | Sys_id of the impacted item or service. For cases, this value is from one of the following tables: * Asset \[alm_asset\] * Product Model \[cmdb_model\] * Sold Product \[sn_install_base_sold_product\] * Product Inventory \[sn_prd_invt_product_inventory\], which extends the Sold Product \[sn_install_base_sold_product\] table {#trouble-ticket-PATCH-trouble_ticket__ul_vl4_13c_hwb}For incidents, this value is from one of the following tables: <!-- --> * Configuration Item \[cmdb_ci\] * Service \[cmdb_ci_service\] {#trouble-ticket-PATCH-trouble_ticket__ul_lbg_b3c_hwb} Data type: String |
| relatedEntity.@referredType | The type of item or service. Valid values for case tickets: * asset * product * product_inventory {#trouble-ticket-PATCH-trouble_ticket__ul_bjm_lfy_wsb} Valid values for incident tickets: * cmdb_ci * cmdb_ci_service {#trouble-ticket-PATCH-trouble_ticket__ul_sfh_g3j_5pa} Data type: String |
| relatedParty | Details about contacts for the ticket. For cases, this parameter populates the Contact or Account field. For incidents, this parameter populates the Caller or Company field. Data type: Array "relatedParty": [ { "id": "String", "@referredType": "String" } ] |
| relatedParty.@referredType | The type of related party. Valid values: * customer: The company or account for the ticket. * customer_contact: The caller or contact for the ticket. {#trouble-ticket-PATCH-trouble_ticket__ul_sfh_g3j_5pb} Data type: String |
| relatedParty.id | Sys_id of the related party. For cases, the sys_id is from the Contact \[customer_contact\] or Account \[customer_account\] tables. For incidents, the sys_id is from the User \[sys_user\] or Company \[core_company\] tables. If you provide a contact or a user (caller), their account or company is automatically populated on the ticket. Data type: String |
| severity | The severity of the issue described by the trouble ticket. Maps to the Priority field. Valid values: * 1: Critical. * 2: High. * 3: Moderate. * 4: Low. * 5: Planning. Incident only. {#trouble-ticket-PATCH-trouble_ticket__ul_xhd_24p_rpb}Valid values are the choices for the Priority field. You must provide the choice value only. For example, `1`. If an invalid value is provided, the severity is set to Low. Data type: String |
| status | The current status of the trouble ticket. Maps to the State field. Valid values are the choices for the State field. You can provide the choice label or value. For example, `New` or `1`. Data type: String |
[Table 27. Request body parameters (XML or JSON)]

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#trouble-ticket-PATCH-trouble_ticket__entry__44}{#trouble-ticket-PATCH-trouble_ticket__accept-JSON-only-entry-RESTAPI}{#trouble-ticket-PATCH-trouble_ticket__content_type-JSON-only-entry-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Only supports application/json. |
| Content-Type | Data format of the request body. Only supports application/json. |
[Table 28. Request headers]

{#trouble-ticket-PATCH-trouble_ticket__entry__50}

| Header | Description |
|-|-|
| None |   |
[Table 29. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#trouble-ticket-PATCH-trouble_ticket__entry__54}{#trouble-ticket-PATCH-trouble_ticket__entry-200-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected for one or more of the following reasons. * Invalid path parameter. * Invalid URI. {#trouble-ticket-PATCH-trouble_ticket__ul_rjf_fqw_rpb} |
| 404 | Record not found. A record associated with the ID is not found in the Case \[sn_customerservice_case\] or Incident \[incident\] table. |
[Table 30. Status codes]

### Response body parameters (JSON or XML)

{#trouble-ticket-PATCH-trouble_ticket__entry__62}

| Name | Description |
|-|-|
| @type | This value is always `TroubleTicket`. Data type: String |
| channel | The method of contact that the ticket was created through. Data type: Object "channel":{ "name": "String" } |
| channel.name | The name of the contact method. Data type: String |
| creationDate | The date the record was created. Data type: String |
| description | The description of the issue from the ticket. Data type: String |
| id | The sys_id of the case or incident record. Data type: String |
| lastUpdate | The date the record was last updated. Data type: String |
| name | The name of the trouble ticket, typically a short description of the issue. Data type: String |
| note | A list of all comments on the ticket. This list does not include work notes. Data type: Array "note":[ { "author": "String", "date": "String", "text": "String", "@type": "String" } ] |
| note.@type | The type of note. Only comments are returned (not work notes) so this value is always `comments`. Data type: String |
| note.author | The name of the ServiceNow integration user who made the POST or PATCH request that created the comment. Data type: String |
| note.date | The date the comment was created in the ServiceNow instance. Data type: String |
| note.text | The comment text. Data type: String |
| relatedEntity | List of impacted assets, products, sold products (product inventory), configuration items, or services. Data type: Array "relatedEntity": [ { "id": "String", "href": "String", "name": "String", "role": "String", "@referredType": "String", "@type": "String" } ] |
| relatedEntity.id | Sys_id of the impacted item or service. For cases, this value is from one of the following tables: * Asset \[alm_asset\] * Product Model \[cmdb_model\] * Sold Product \[sn_install_base_sold_product\] * Product Inventory \[sn_prd_invt_product_inventory\], which extends the Sold Product \[sn_install_base_sold_product\] table {#trouble-ticket-PATCH-trouble_ticket__ul_en1_3jc_hwb}For incidents, this value is from one of the following tables: <!-- --> * Configuration Item \[cmdb_ci\] * Service \[cmdb_ci_service\] {#trouble-ticket-PATCH-trouble_ticket__ul_fn1_3jc_hwb} Data type: String |
| relatedEntity.href | Returns an empty string. Data type: String |
| relatedEntity.name | Name of the impacted item or service. Data type: String |
| relatedEntity.role | Description of the impacted item or service. Data type: String |
| relatedEntity.@referredType | The type of item or service. Valid values for case tickets: * asset * product * product_inventory {#trouble-ticket-PATCH-trouble_ticket__ul_zrm_5jp_mtb} Valid values for incident tickets: * cmdb_ci * cmdb_ci_service {#trouble-ticket-PATCH-trouble_ticket__ul_asm_5jp_mtb} Data type: String |
| relatedEntity.@type | This value is always `relatedEntity`. Data type: String |
| relatedParty | Details about the companies and contacts associated with the ticket. Data type: Array "relatedParty": [ { "id": "String", "name": "String", "@referredType": "String" } ] |
| relatedParty.@referredType | The type of related party. Valid values: * customer: The company or account for the ticket. * customer_contact: The caller or contact for the ticket. {#trouble-ticket-PATCH-trouble_ticket__d4552e330} Data type: String |
| relatedParty.id | Sys_id of the related party. For cases, the sys_id is from the Contact \[customer_contact\] or Account \[customer_account\] tables. For incidents, the sys_id is from the User \[sys_user\] or Company \[core_company\] tables. If you provide a contact or a user (caller), their account or company is automatically populated on the ticket. Data type: String |
| relatedParty.name | The name of the related party. Data type: String |
| severity | The severity of the issue described by the trouble ticket. Data type: String |
| status | The current status of the trouble ticket. Data type: String |
| ticketType | The type of ticket (case or incident). Data type: String |
[ ]

### cURL request

This example updates a case record.

    curl "https://instance.servicenow.com/api/sn_ind_tsm_sdwan/troubleticket/case/370415f03c20e910f8772f1bc332b31b" \
    --request PATCH \
    --header "Accept:application/json" \
    --header "Content-Type:application/json" \
    --data "{
        \"description\":\"Router is not working, my devices cannot detect any signals from the router. First button from the left is flashing red, all others are black. Resetting the router does not solve the problem, I need urgent assistance.\",
        \"name\":\"My router is not working properly\",
        \"severity\":\"2\",
        \"status\":\"10\",
        \"ticketType\":\"Case\",
        \"channel\":{
            \"id\":\"8774\",
            \"name\":\"eBonding\",
            \"@type\":\"Channel\"
        },
        \"note\":[
            {
                \"id\":\"77456\",
                \"author\":\"Jack Smith\",
                \"date\":\"2019-05-31T07:34:45.968Z\",
                \"text\":\"This is a testing work note<html>hello world</html> and <h1>title</h1>\",
                \"@type\":\"Worknotes\"
            },
            {
                \"id\":\"77457\",
                \"author\":\"Jack Smith\",
                \"date\":\"2019-05-31T07:35:45.968Z\",
                \"text\":\"This is a testing comment<script>gs.info('Hello World')</script>\",
                \"@type\":\"Comment\"
            }
        ],
        \"relatedParty\":[
            {
                \"id\":\"eaf68911c35420105252716b7d40ddde\",
                \"href\":\"https://mycsp.com:8080/tmf-api/partyManagement/v1/individual/9866\",
                \"name\":\"Sally Thomas\",
                \"role\":\"customer\",
                \"@referredType\":\"customer_contact\"
            },
            {
                \"id\":\"ffc68911c35420105252716b7d40dd55\",
                \"href\":\"https://mycsp.com:8080/tmf-api/partyManagement/v4/customer/9176\",
                \"name\":\"Funco Intl\",
                \"role\":\"customer\",
                \"@referredType\":\"customer\"
            }
        ],
        \"relatedEntity\": [
            {
                \"id\": \"b7fa12c7532520103b6bddeeff7b123b\",
                \"href\": \"www.google.com\",
                \"name\": \"Some random name\",
                \"role\": \"I dont know what this is\",
                \"@type\": \"relatedEntity\",
                \"@referredType\": \"product\"
            },
            {
                \"id\": \"71e73d87c3e23010ff00ed23a140dde8\",
                \"href\": \"www.google.com\",
                \"name\": \"Some random name\",
                \"role\": \"I dont know what this is\",
                \"@type\": \"relatedEntity\",
                \"@referredType\": \"asset\"
            },
            {
                \"id\": \"a1913c3577b301108e191e599a5a99e8\",
                \"href\": \"www.google.com\",
                \"name\": \"Some random name\",
                \"role\": \"I dont know what this is\",
                \"@type\": \"relatedEntity\",
                \"@referredType\": \"product_inventory\"
            }
        ]
    }" \
    --user 'username':'password'

Response body.

    {
      "id": "370415f03c20e910f8772f1bc332b31b",
      "href": "/api/sn_ind_tsm_sdwan/ticket/troubleTicket/370415f03c20e910f8772f1bc332b31b",
      "creationDate": "2023-01-19 22:39:28",
      "lastUpdate": "2023-01-19 22:41:39",
      "description": "Router is not working, my devices cannot detect any signals from the router. First button from the left is flashing red, all others are black. Resetting the router does not solve the problem, I need urgent assistance.",
      "severity": "2 - High",
      "ticketType": "Case",
      "name": "My router is not working properly",
      "status": "Open",
      "channel": {
        "name": "e_bonding"
      },
      "relatedParty": [
        {
          "id": "ffc68911c35420105252716b7d40dd55",
          "name": "Funco Intl",
          "@referredType": "customer"
        },
        {
          "id": "eaf68911c35420105252716b7d40ddde",
          "name": "Sally Thomas",
          "@referredType": "customer_contact"
        },
        {
          "id": "",
          "name": "",
          "@referredType": "assignment_group"
        },
        {
          "id": "",
          "name": "",
          "@referredType": "assigned_to"
        }
      ],
      "relatedEntity": [
        {
          "id": "b7fa12c7532520103b6bddeeff7b123b",
          "href": "",
          "name": "Deduplication and Compression PRD00001965",
          "role": "This is the product associated with the case.",
          "@type": "relatedEntity",
          "@referredType": "product"
        },
        {
          "id": "71e73d87c3e23010ff00ed23a140dde8",
          "href": "",
          "name": "",
          "role": "This is the asset associated with the case.",
          "@type": "relatedEntity",
          "@referredType": "asset"
        },
        {
          "id": "a1913c3577b301108e191e599a5a99e8",
          "href": "",
          "name": "Deduplication and Compression PI0000037",
          "role": "This is the product inventory associated with the case.",
          "@type": "relatedEntity",
          "@referredType": "product_inventory"
        }
      ],
      "note": [
        {
          "text": "This is a testing comment<script>gs.info('Hello World')</script>",
          "date": "2023-01-19 14:41:39",
          "author": "System Administrator",
          "@type": "comments"
        },
        {
          "text": "This is a testing comment<script>gs.info('Hello World')</script>",
          "date": "2023-01-19 14:39:28",
          "author": "System Administrator",
          "@type": "comments"
        }
      ],
      "@type": "TroubleTicket"
    }

## Trouble Ticket - POST /sn_ind_tsm_sdwan/ticket/troubleTicket  {#ariaid-title7}

Creates a record in the Case \[sn_customerservice_case\] or Incident \[incident\]
table.

### URL format

Default URL:
/api/sn_ind_tsm_sdwan/ticket/troubleTicket

### Supported request parameters

{#trouble-ticket-POST-ticket-tt__entry__2}

| Name | Description |
|-|-|
| None |   |
[Table 31. Path parameters]

{#trouble-ticket-POST-ticket-tt__entry__6}

| Name | Description |
|-|-|
| None |   |
[Table 32. Query parameters]

{#trouble-ticket-POST-ticket-tt__entry__10}

| Name | Description |
|-|-|
| channel | The method of contact that the ticket was created through. Data type: Object "channel":{ "name": "String" } |
| channel.name | The name of the contact method. Maps to the Channel \[contact_type\] field for cases and the Contact type \[contact_type\] field for incidents. Valid values are the choices for the contact_type field. You can provide the choice label or value. For example, `Virtual Agent` or `virtual_agent`. Data type: String |
| description | Required. A description of the issue. Maps to the Description field. Data type: String |
| name | The name of the trouble ticket, typically a short description of the issue. Maps to the Short description field. Data type: String |
| note | A list of work notes and comments to add to the ticket. Data type: Array "note":[ { "text": "String", "@type": "String" } ] |
| note.@type | The type of note. This value determines whether the note is recorded in the Work notes or Additional comments field. Valid values: * work_notes * comments {#trouble-ticket-POST-ticket-tt__ul_vtx_hmz_rpb} Data type: String |
| note.text | The note text. Maps to the Work notes or Additional comments field. Data type: String |
| relatedEntity | List of impacted assets, products, sold products (product inventory), configuration items, or services. Data type: Array "relatedEntity": [ { "id": "String", "@referredType": "String" } ] |
| relatedEntity.id | Sys_id of the impacted item or service. For cases, this value is from one of the following tables: * Asset \[alm_asset\] * Product Model \[cmdb_model\] * Sold Product \[sn_install_base_sold_product\] * Product Inventory \[sn_prd_invt_product_inventory\], which extends the Sold Product \[sn_install_base_sold_product\] table {#trouble-ticket-POST-ticket-tt__ul_vl4_13c_hwb}For incidents, this value is from one of the following tables: <!-- --> * Configuration Item \[cmdb_ci\] * Service \[cmdb_ci_service\] {#trouble-ticket-POST-ticket-tt__ul_lbg_b3c_hwb} Data type: String |
| relatedEntity.@referredType | The type of item or service. Valid values for case tickets: * asset * product * product_inventory {#trouble-ticket-POST-ticket-tt__ul_bjm_lfy_wsb} Valid values for incident tickets: * cmdb_ci * cmdb_ci_service {#trouble-ticket-POST-ticket-tt__ul_sfh_g3j_5pa} Data type: String |
| relatedParty | Details about contacts for the ticket. For cases, this parameter populates the Contact or Account field. For incidents, this parameter populates the Caller or Company field. Data type: Array "relatedParty": [ { "id": "String", "@referredType": "String" } ] |
| relatedParty.id | Sys_id of the related party. For cases, the sys_id is from the Contact \[customer_contact\] or Account \[customer_account\] tables. For incidents, the sys_id is from the User \[sys_user\] or Company \[core_company\] tables. If you provide a contact or a user (caller), their account or company is automatically populated on the ticket. Data type: String |
| relatedParty.@referredType | The type of related party. Valid values: * customer: The company or account for the ticket. * customer_contact: The caller or contact for the ticket. {#trouble-ticket-POST-ticket-tt__ul_sfh_g3j_5pb} Data type: String |
| severity | Required. The severity of the issue described by the trouble ticket. Maps to the Priority field. Valid values: * 1: Critical. * 2: High. * 3: Moderate. * 4: Low. * 5: Planning. Incident only. {#trouble-ticket-POST-ticket-tt__ul_xhd_24p_rpb}Valid values are the choices for the Priority field. You must provide the choice value only. For example, `1`. If an invalid value is provided, the severity is set to Low. Data type: String |
| status | Required. The current status of the trouble ticket. Maps to the State field. Valid values are the choices for the State field. You can provide the choice label or value. For example, `New` or `1`. If you provide an invalid value, the status is set to New. Data type: String |
| ticketType | The type of ticket. This value determines whether the record is created in the Case \[sn_customerservice_case\] or Incident \[incident\] table. Valid values: * Case * Incident {#trouble-ticket-POST-ticket-tt__ul_p44_tjp_rpb} Data type: String Default: Incident |
[Table 33. Request body parameters (JSON)]

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#trouble-ticket-POST-ticket-tt__entry__44}{#trouble-ticket-POST-ticket-tt__accept-JSON-only-entry-RESTAPI}{#trouble-ticket-POST-ticket-tt__content_type-JSON-only-entry-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Only supports application/json. |
| Content-Type | Data format of the request body. Only supports application/json. |
[Table 34. Request headers]

{#trouble-ticket-POST-ticket-tt__entry__50}

| Header | Description |
|-|-|
| None |   |
[Table 35. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#trouble-ticket-POST-ticket-tt__entry__54}

| Status code | Description |
|-|-|
| 201 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected for one or more of the following reasons. * Empty payload. * Invalid payload. Mandatory field missing. * Invalid ticketType. {#trouble-ticket-POST-ticket-tt__ul_rjf_fqw_rpb} |
[Table 36. Status codes]

### Response body parameters (JSON)

{#trouble-ticket-POST-ticket-tt__entry__60}

| Name | Description |
|-|-|
| @type | This value is always `TroubleTicket`. Data type: String |
| channel | The method of contact that the ticket was created through. Data type: Object "channel":{ "name": "String" } |
| channel.name | The name of the contact method. Data type: String |
| creationDate | The date that the case or incident record was created. Data type: String |
| description | The description of the issue from the ticket. Data type: String |
| href | Relative link to the case or incident record. Data type: String |
| id | The sys_id of the case or incident record that was created. Data type: String |
| lastUpdate | The date that the case or incident record was last updated. Data type: String |
| name | The name of the trouble ticket, typically a short description of the issue. Data type: String |
| note | A list of all comments on the ticket. This list does not include work notes. Data type: Array "note":[ { "author": "String", "date": "String", "text": "String", "@type": "String" } ] |
| note.@type | The type of note. Only comments are returned (not work notes) so this value is always `comments`. Data type: String |
| note.author | The name of the user who wrote the comment. Data type: String |
| note.date | The date the comment was created in the ServiceNow instance. Data type: String |
| note.text | The comment text. Data type: String |
| relatedEntity | List of impacted assets, products, sold products (product inventory), configuration items, or services. Data type: Array "relatedEntity": [ { "id": "String", "href": "String", "name": "String", "role": "String", "@referredType": "String", "@type": "String" } ] |
| relatedEntity.id | Sys_id of the impacted item or service. For cases, this value is from one of the following tables: * Asset \[alm_asset\] * Product Model \[cmdb_model\] * Sold Product \[sn_install_base_sold_product\] * Product Inventory \[sn_prd_invt_product_inventory\], which extends the Sold Product \[sn_install_base_sold_product\] table {#trouble-ticket-POST-ticket-tt__ul_en1_3jc_hwb}For incidents, this value is from one of the following tables: <!-- --> * Configuration Item \[cmdb_ci\] * Service \[cmdb_ci_service\] {#trouble-ticket-POST-ticket-tt__ul_fn1_3jc_hwb} Data type: String |
| relatedEntity.href | Returns an empty string. Data type: String |
| relatedEntity.name | Name of the impacted item or service. Data type: String |
| relatedEntity.role | Description of the impacted item or service. Data type: String |
| relatedEntity.@referredType | The type of item or service. Valid values for case tickets: * asset * product * product_inventory {#trouble-ticket-POST-ticket-tt__ul_zrm_5jp_mtb} Valid values for incident tickets: * cmdb_ci * cmdb_ci_service {#trouble-ticket-POST-ticket-tt__ul_asm_5jp_mtb} Data type: String |
| relatedEntity.@type | This value is always `relatedEntity`. Data type: String |
| relatedParty | Details about contacts for the ticket. Data type: Array "relatedParty": [ { "id": "String", "name": "String", "@referredType": "String" } ] |
| relatedParty.id | Sys_id of the related party. The sys_id can be from the following tables depending on the ticket type and the related party type. Case: * Account \[customer_account\] - Related party type is <kbd class="ph userinput">customer</kbd> * Contact \[customer_contact\] - Related party type is <kbd class="ph userinput">customer_contact</kbd> {#trouble-ticket-POST-ticket-tt__ul_vf5_n3g_4tb} Incident: * Company \[core_company\] - Related party type is <kbd class="ph userinput">customer</kbd> * User \[sys_user\] - Related party type is <kbd class="ph userinput">customer_contact</kbd> {#trouble-ticket-POST-ticket-tt__ul_ll2_p3g_4tb} Case or incident: * Group \[sys_user_group\] - Related party type is <kbd class="ph userinput">assignment_group</kbd> * User \[sys_user\] - Related party type is <kbd class="ph userinput">assigned_to</kbd> {#trouble-ticket-POST-ticket-tt__ul_umf_r3g_4tb} Data type: String |
| relatedParty.name | Name of the related party. Data type: String |
| relatedParty.@referredType | The type of related party. Possible values: * <kbd class="ph userinput">assigned_to</kbd>: The user assigned to work on the ticket. * <kbd class="ph userinput">assignment_group</kbd>: The group assigned to work on the ticket. * <kbd class="ph userinput">customer</kbd>: The company or account for the ticket. * <kbd class="ph userinput">customer_contact</kbd>: The caller or contact for the ticket. {#trouble-ticket-POST-ticket-tt__ul_bxv_jgg_4tb} Data type: String |
| severity | The severity of the issue described by the trouble ticket. Data type: String |
| status | The current status of the trouble ticket. Data type: String |
| ticketType | The type of ticket. Possible values: * Case * Incident {#trouble-ticket-POST-ticket-tt__ul_czp_2mc_ktb} Data type: String |
[ ]

### cURL request

This example creates a trouble ticket case record.

    curl "https://instance.servicenow.com/api/sn_ind_tsm_sdwan/ticket/troubleTicket" \
    --request POST \
    --header "Accept:application/json" \
    --header "Content-Type:application/json" \
    --data "{
       "name": "Laptop problem",
       "description": "Laptop keeps shutting off unexpectedly",
       "severity": "2",
       "status": "New",
       "ticketType": "Case",
       "channel": {
          "name": "Web"
       },
       "note": [
          {
             "text": "Work note about this case",
             "@type": "work_notes"
          },
          {
             "text": "Comment about this case",
             "@type": "comments"
          }
       ],
       "relatedEntity": [
          {
             "id": "74a9ec0d3790200044e0bfc8bcbe5d7f",
             "@referredType": "asset"
          }
       ],
       "relatedParty": [
          {
             "id": "62826bf03710200044e0bfc8bcbe5df1",
             "@referredType": "customer_contact"
          }
       ]
    }" \
    --user 'username':'password'

Response body.

    {
       "id": "6467508d47e345508761b955d36d43f6",
       "href": "/api/sn_ind_tsm_sdwan/ticket/troubleTicket/6467508d47e345508761b955d36d43f6",
       "creationDate": "2022-05-16 23:38:55",
       "lastUpdate": "2022-05-16 23:38:55",
       "description": "Laptop keeps shutting off unexpectedly",
       "severity": "2 - High",
       "ticketType": "Case",
       "name": "Laptop problem",
       "status": "New",
       "channel": {
          "name": "web"
       },
       "relatedParty": [
          {
             "id": "",
             "name": "",
             "@referredType": "customer"
          },
          {
             "id": "62826bf03710200044e0bfc8bcbe5df1",
             "name": "",
             "@referredType": "customer_contact"
          },
          {
             "id": "",
             "name": "",
             "@referredType": "assignment_group"
          },
          {
             "id": "",
             "name": "",
             "@referredType": "assigned_to"
          }
       ],
       "relatedEntity": [
          {
             "id": "",
             "href": "",
             "name": "",
             "role": "This is the product associated with the case.",
             "@type": "relatedEntity",
             "@referredType": "product"
          },
          {
             "id": "74a9ec0d3790200044e0bfc8bcbe5d7f",
             "href": "",
             "name": "P1000597 - Apple MacBook Pro 15\"",
             "role": "This is the asset associated with the case.",
             "@type": "relatedEntity",
             "@referredType": "asset"
          }
          {
             "id": "a1913c3577b301108e191e599a5a99e8",
             "href": "",
             "name": "Deduplication and Compression PI0000037",
             "role": "This is the product inventory associated with the case.",
             "@type": "relatedEntity",
             "@referredType": "product_inventory"
          }
       ],
       "note": [
          {
             "text": "Comment about this case",
             "date": "2022-05-16 16:38:55",
             "author": "admin",
             "@type": "comments"
          }
       ],
       "@type": "TroubleTicket"
    }

## Trouble Ticket - POST /sn_ind_tsm_sdwan/troubleticket/{ticketType} {#ariaid-title8}

Creates a record in the Case
\[sn_customerservice_case\]
or Incident \[incident\] table.
Important:  
Starting with the Tokyo release, this endpoint is deprecated. The new version of this endpoint is [Trouble Ticket - POST /sn_ind_tsm_sdwan/ticket/troubleTicket ](https://servicenow-prod.fluidtopics.net/Ca28OB4CEuUq5KWTZaJtJg#trouble-ticket-POST-ticket-tt "Creates a record in the Case [sn_customerservice_case] or Incident [incident] table.").

### URL format

Default URL:
/api/sn_ind_tsm_sdwan/troubleticket/{ticketType}

### Supported request parameters

{#trouble-ticket-POST-trouble_ticket__entry__2}

| Name | Description |
|-|-|
| ticketType | The type of ticket. This value determines whether the record is created in the Case \[sn_customerservice_case\] or Incident \[incident\] table. Valid values: * case * incident {#trouble-ticket-POST-trouble_ticket__ul_k1m_qvs_qpb} Data type: String |
[Table 37. Path parameters]

{#trouble-ticket-POST-trouble_ticket__entry__6}

| Name | Description |
|-|-|
| None |   |
[Table 38. Query parameters]

{#trouble-ticket-POST-trouble_ticket__entry__10}

| Name | Description |
|-|-|
| channel | The method of contact that the ticket was created through. Data type: Object "channel":{ "name": "String" } |
| channel.name | The name of the contact method. Maps to the Channel \[contact_type\] field for cases and the Contact type \[contact_type\] field for incidents. Valid values are the choices for the contact_type field. You can provide the choice label or value. For example, `Virtual Agent` or `virtual_agent`. Data type: String |
| description | Required. A description of the issue. Maps to the Description field. Data type: String |
| name | The name of the trouble ticket, typically a short description of the issue. Maps to the Short description field. Data type: String |
| note | A list of work notes and comments to add to the ticket. Data type: Array "note":[ { "text": "String", "@type": "String" } ] |
| note.@type | The type of note. This value determines whether the note is recorded in the Work notes or Additional comments field. Valid values: * work_notes * comments {#trouble-ticket-POST-trouble_ticket__ul_vtx_hmz_rpb} Data type: String |
| note.text | The note text. Maps to the Work notes or Additional comments field. Data type: String |
| relatedEntity | List of impacted assets, products, sold products (product inventory), configuration items, or services. Data type: Array "relatedEntity": [ { "id": "String", "@referredType": "String" } ] |
| relatedEntity.id | Sys_id of the impacted item or service. For cases, this value is from one of the following tables: * Asset \[alm_asset\] * Product Model \[cmdb_model\] * Sold Product \[sn_install_base_sold_product\] * Product Inventory \[sn_prd_invt_product_inventory\], which extends the Sold Product \[sn_install_base_sold_product\] table {#trouble-ticket-POST-trouble_ticket__ul_vl4_13c_hwb}For incidents, this value is from one of the following tables: <!-- --> * Configuration Item \[cmdb_ci\] * Service \[cmdb_ci_service\] {#trouble-ticket-POST-trouble_ticket__ul_lbg_b3c_hwb} Data type: String |
| relatedEntity.@referredType | The type of item or service. Valid values for case tickets: * asset * product * product_inventory {#trouble-ticket-POST-trouble_ticket__ul_bjm_lfy_wsb} Valid values for incident tickets: * cmdb_ci * cmdb_ci_service {#trouble-ticket-POST-trouble_ticket__ul_sfh_g3j_5pa} Data type: String |
| relatedParty | Details about contacts for the ticket. For cases, this parameter populates the Contact or Account field. For incidents, this parameter populates the Caller or Company field. Data type: Array "relatedParty": [ { "id": "String", "@referredType": "String" } ] |
| relatedParty.@referredType | The type of related party. Valid values: * customer: The company or account for the ticket. * customer_contact: The caller or contact for the ticket. {#trouble-ticket-POST-trouble_ticket__ul_sfh_g3j_5pb} Data type: String |
| relatedParty.id | Sys_id of the related party. For cases, the sys_id is from the Contact \[customer_contact\] or Account \[customer_account\] tables. For incidents, the sys_id is from the User \[sys_user\] or Company \[core_company\] tables. If you provide a contact or a user (caller), their account or company is automatically populated on the ticket. Data type: String |
| severity | Required. The severity of the issue described by the trouble ticket. Maps to the Priority field. Valid values: * 1: Critical. * 2: High. * 3: Moderate. * 4: Low. * 5: Planning. Incident only. {#trouble-ticket-POST-trouble_ticket__ul_xhd_24p_rpb}Valid values are the choices for the Priority field. You must provide the choice value only. For example, `1`. If an invalid value is provided, the severity is set to Low. Data type: String |
| status | The current status of the trouble ticket. Maps to the State field. Valid values are the choices for the State field. You can provide the choice label or value. For example, `New` or `1`. Data type: String Default: New |
| ticketType | Required. The type of ticket. This value determines whether the record is created in the Case \[sn_customerservice_case\] or Incident \[incident\] table. Valid values: * case * incident {#trouble-ticket-POST-trouble_ticket__ul_p44_tjp_rpb} Data type: String |
[Table 39. Request body parameters (XML or JSON)]

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#trouble-ticket-POST-trouble_ticket__entry__44}{#trouble-ticket-POST-trouble_ticket__accept-JSON-only-entry-RESTAPI}{#trouble-ticket-POST-trouble_ticket__content_type-JSON-only-entry-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Only supports application/json. |
| Content-Type | Data format of the request body. Only supports application/json. |
[Table 40. Request headers]

{#trouble-ticket-POST-trouble_ticket__entry__50}

| Header | Description |
|-|-|
| None |   |
[Table 41. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#trouble-ticket-POST-trouble_ticket__entry__54}

| Status code | Description |
|-|-|
| 201 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected for one or more of the following reasons. * Empty payload. * Invalid payload. Mandatory field missing. * Invalid ticketType or ticketType does not match path parameter ticketType. For example, ticketType is `case` but path parameter is `incident`. {#trouble-ticket-POST-trouble_ticket__ul_rjf_fqw_rpb} |
[Table 42. Status codes]

### Response body parameters (JSON or XML)

{#trouble-ticket-POST-trouble_ticket__entry__60}

| Name | Description |
|-|-|
| @type | This value is always `TroubleTicket`. Data type: String |
| channel | The method of contact that the ticket was created through. Data type: Object "channel":{ "name": "String" } |
| channel.name | The name of the contact method. Data type: String |
| creationDate | The date that the case or incident record was created. Data type: String |
| description | The description of the issue from the ticket. Data type: String |
| id | The sys_id of the case or incident record that was created. Data type: String |
| lastUpdate | The date that the case or incident record was last updated. Data type: String |
| name | The name of the trouble ticket, typically a short description of the issue. Data type: String |
| note | A list of the comments and work notes that were added to the ticket by the POST request. Data type: Array "note":[ { "author": "String", "date": "String", "text": "String", "@type": "String" } ] |
| note.@type | The type of note. Valid values: * work_notes * comments {#trouble-ticket-POST-trouble_ticket__ul_zmv_ybd_5pb} Data type: String |
| note.author | The name of the ServiceNow integration user who made the POST request that created the note. Data type: String |
| note.date | The date the note was created in the ServiceNow instance. Data type: String |
| note.text | The note text. Data type: String |
| relatedEntity | List of impacted assets, products, sold products (product inventory), configuration items, or services. Data type: Array "relatedEntity": [ { "id": "String", "href": "String", "name": "String", "role": "String", "@referredType": "String", "@type": "String" } ] |
| relatedEntity.id | Sys_id of the impacted item or service. For cases, this value is from one of the following tables: * Asset \[alm_asset\] * Product Model \[cmdb_model\] * Sold Product \[sn_install_base_sold_product\] * Product Inventory \[sn_prd_invt_product_inventory\], which extends the Sold Product \[sn_install_base_sold_product\] table {#trouble-ticket-POST-trouble_ticket__ul_en1_3jc_hwb}For incidents, this value is from one of the following tables: <!-- --> * Configuration Item \[cmdb_ci\] * Service \[cmdb_ci_service\] {#trouble-ticket-POST-trouble_ticket__ul_fn1_3jc_hwb} Data type: String |
| relatedEntity.href | Returns an empty string. Data type: String |
| relatedEntity.name | Name of the impacted item or service. Data type: String |
| relatedEntity.role | Description of the impacted item or service. Data type: String |
| relatedEntity.@referredType | The type of item or service. Valid values for case tickets: * asset * product * product_inventory {#trouble-ticket-POST-trouble_ticket__ul_zrm_5jp_mtb} Valid values for incident tickets: * cmdb_ci * cmdb_ci_service {#trouble-ticket-POST-trouble_ticket__ul_asm_5jp_mtb} Data type: String |
| relatedEntity.@type | This value is always `relatedEntity`. Data type: String |
| relatedParty | Details about the companies and contacts associated with the ticket. Data type: Array "relatedParty": [ { "id": "String", "@referredType": "String" } ] |
| relatedParty.id | Sys_id of the related party. For cases, the sys_id is from the Contact \[customer_contact\] or Account \[customer_account\] tables. For incidents, the sys_id is from the User \[sys_user\] or Company \[core_company\] tables. If you provide a contact or a user (caller), their account or company is automatically populated on the ticket. Data type: String |
| relatedParty.referredType | The type of related party. Valid values: * customer: The company or account for the ticket. * customer_contact: The caller or contact for the ticket. {#trouble-ticket-POST-trouble_ticket__d4552e330} Data type: String |
| severity | The severity of the issue described by the trouble ticket. Data type: String |
| status | The current status of the trouble ticket. Data type: String |
| ticketType | The type of ticket (case or incident). Data type: String |
[ ]

### cURL request

This example creates a case with high priority and open state.

    ccurl "https://instance.servicenow.com/api/sn_ind_tsm_sdwan/troubleticket/case" \
    --request POST \
    --header "Accept:application/json" \
    --header "Content-Type:application/json" \
    --data "{
        \"description\":\"Router is not working, my devices cannot detect any signals from the router. First button from the left is flashing red, all others are black. Resetting the router does not solve the problem, I need urgent assistance.\",
        \"name\":\"My router is not working properly\",
        \"severity\":\"2\",
        \"status\":\"10\",
        \"ticketType\":\"Case\",
        \"channel\":{
            \"id\":\"8774\",
            \"name\":\"eBonding\",
            \"@type\":\"Channel\"
        },
        \"note\":[
            {
                \"id\":\"77456\",
                \"author\":\"Jack Smith\",
                \"date\":\"2019-05-31T07:34:45.968Z\",
                \"text\":\"This is a testing work note<html>hello world</html> and <h1>title</h1>\",
                \"@type\":\"Worknotes\"
            },
            {
                \"id\":\"77457\",
                \"author\":\"Jack Smith\",
                \"date\":\"2019-05-31T07:35:45.968Z\",
                \"text\":\"This is a testing comment<script>gs.info('Hello World')</script>\",
                \"@type\":\"Comment\"
            }
        ],
        \"relatedParty\":[
            {
                \"id\":\"eaf68911c35420105252716b7d40ddde\",
                \"href\":\"https://mycsp.com:8080/tmf-api/partyManagement/v1/individual/9866\",
                \"name\":\"Sally Thomas\",
                \"role\":\"customer\",
                \"@referredType\":\"customer_contact\"
            },
            {
                \"id\":\"ffc68911c35420105252716b7d40dd55\",
                \"href\":\"https://mycsp.com:8080/tmf-api/partyManagement/v4/customer/9176\",
                \"name\":\"Funco Intl\",
                \"role\":\"customer\",
                \"@referredType\":\"customer\"
            }
        ],
        \"relatedEntity\": [
            {
                \"id\": \"b7fa12c7532520103b6bddeeff7b123b\",
                \"href\": \"www.google.com\",
                \"name\": \"Some random name\",
                \"role\": \"I dont know what this is\",
                \"@type\": \"relatedEntity\",
                \"@referredType\": \"product\"
            },
            {
                \"id\": \"71e73d87c3e23010ff00ed23a140dde8\",
                \"href\": \"www.google.com\",
                \"name\": \"Some random name\",
                \"role\": \"I dont know what this is\",
                \"@type\": \"relatedEntity\",
                \"@referredType\": \"asset\"
            },
            {
                \"id\": \"a1913c3577b301108e191e599a5a99e8\",
                \"href\": \"www.google.com\",
                \"name\": \"Some random name\",
                \"role\": \"I dont know what this is\",
                \"@type\": \"relatedEntity\",
                \"@referredType\": \"product_inventory\"
            }
        ]
    }" \
    --user 'username':'password'

Response body.

    {
      "id": "5bbb5cbc3c2ca910f8772f1bc332b34d",
      "href": "/api/sn_ind_tsm_sdwan/ticket/troubleTicket/5bbb5cbc3c2ca910f8772f1bc332b34d",
      "creationDate": "2023-01-19 18:33:24",
      "lastUpdate": "2023-01-19 18:33:24",
      "description": "Router is not working, my devices cannot detect any signals from the router. First button from the left is flashing red, all others are black. Resetting the router does not solve the problem, I need urgent assistance.",
      "severity": "2 - High",
      "ticketType": "Case",
      "name": "My router is not working properly",
      "status": "Open",
      "channel": {
        "name": "e_bonding"
      },
      "relatedParty": [
        {
          "id": "ffc68911c35420105252716b7d40dd55",
          "name": "Funco Intl",
          "@referredType": "customer"
        },
        {
          "id": "eaf68911c35420105252716b7d40ddde",
          "name": "Sally Thomas",
          "@referredType": "customer_contact"
        },
        {
          "id": "",
          "name": "",
          "@referredType": "assignment_group"
        },
        {
          "id": "",
          "name": "",
          "@referredType": "assigned_to"
        }
      ],
      "relatedEntity": [
        {
          "id": "b7fa12c7532520103b6bddeeff7b123b",
          "href": "",
          "name": "Deduplication and Compression PRD00001965",
          "role": "This is the product associated with the case.",
          "@type": "relatedEntity",
          "@referredType": "product"
        },
        {
          "id": "71e73d87c3e23010ff00ed23a140dde8",
          "href": "",
          "name": "",
          "role": "This is the asset associated with the case.",
          "@type": "relatedEntity",
          "@referredType": "asset"
        },
        {
          "id": "a1913c3577b301108e191e599a5a99e8",
          "href": "",
          "name": "Deduplication and Compression PI0000037",
          "role": "This is the product inventory associated with the case.",
          "@type": "relatedEntity",
          "@referredType": "product_inventory"
        }
      ],
      "note": [
        {
          "text": "This is a testing comment<script>gs.info('Hello World')</script>",
          "date": "2023-01-19 10:33:24",
          "author": "System Administrator",
          "@type": "comments"
        }
      ],
      "@type": "TroubleTicket"
    }


