---
sourceDocument: Australia API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/de-DE/api-reference

 Release :

    - australia

ft:locale :

    - de-DE

ft:publication_title :

    - Australia API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# Wrap Up API

# Wrap Up API {#ariaid-title1}

* Freigeben Version: Australia
* 
* Aktualisiert 12. März 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 31 Minuten Lesedauer

The Wrap Up API provides endpoints for managing wrap-up functionality for external Contact Center as a Service (CCaaS) systems or ServiceNow AI Platform workspaces.
This API requires the Interactions Management (com.glide.interaction) plugin. To call this API, you must have the interaction_integration_user role.

When agents close an interaction, the wrap-up feature enables them to enter closing details and wrap-up codes for future reference. For more information about wrap-up functionality, see [Wrap up overview](https://www.servicenow.com/docs/access?context=wrap-up-overview&version=australia&pubname=australia-conversational-interfaces&ft:locale=en-US).

To use the Wrap Up API for segmented wrap-up of interactions from external systems, you must implement the InteractionSegment scripted extension point to create and retrieve segment records in your chosen table. If
you're using [OpenFrame](https://www.servicenow.com/docs/access?context=c_OpenFrameOverview&version=australia&pubname=australia-customer-service-management&ft:locale=en-US), the extension point has an existing implementation to create and retrieve segment records in the Phone Log \[sn_openframe_phone_log\] table.

## Wrap Up - GET /now/wrapup/code/{code_id} {#ariaid-title2}

Retrieves details for a specified wrap-up code.

### URL format

Versioned URL: /api/now/{api_version}/wrapup/code/{code_id}

Default URL: /api/now/wrapup/code/{code_id}

### Supported request parameters

{#wrap-up-GET-code__entry__2}{#wrap-up-GET-code__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
| code_id | Sys_id of the wrap-up code. Data type: String Table: Interaction Wrap Up Code \[interaction_wrap_up_code\] |
[Tabelle : 1. Path parameters]

{#wrap-up-GET-code__entry__8}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 2. Query parameters]

{#wrap-up-GET-code__entry__12}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 3. 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/8lFZRln4AVFM64buP1Dvmg "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.").
{#wrap-up-GET-code__entry__16}{#wrap-up-GET-code__accept-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/xml. Default: application/json |
[Tabelle : 4. Request headers]

{#wrap-up-GET-code__entry__20}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 5. 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/8lFZRln4AVFM64buP1Dvmg "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.").
{#wrap-up-GET-code__table_ky1_xy2_42c__entry__2}{#wrap-up-GET-code__entry-200-status-code}{#wrap-up-GET-code__entry-400-status-code}{#wrap-up-GET-code__entry-401-status-code}{#wrap-up-GET-code__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Tabelle : 6. Status codes]

{#wrap-up-GET-code__table_ky1_xy2_42c}

### Response body parameters (JSON or XML)

{#wrap-up-GET-code__entry__34}{#wrap-up-GET-code__message}{#wrap-up-GET-code__codes-code-desc-ph}{#wrap-up-GET-code__success}

| Name | Description |
|-|-|
| result | Object containing information about the API request and the wrap-up code. Data type: Object "result": { "message": "String", "resultMap": {Object}, "success": Boolean } |
| result.message | Message that describes the outcome of the API request. Data type: String |
| result.result_map | Object containing the wrap-up code. Data type: Object "result_map": { "wrap_up_code": {Object} } |
| result.result_map.wrap_up_code | Object with details about the wrap-up code. Data type: Object "wrap_up_code": { "active": Boolean, "code": "String", "description": "String", "external": Boolean, "sys_id": "String", "translated_code": "String", "translated_description": "String" } |
| result.result_map.wrap_up_code.active | Flag that indicates whether the wrap-up code is active. Valid values: * true: The wrap-up code is active. * false: The wrap-up code isn't active. {#wrap-up-GET-code__ul_gfl_mbf_m2c} Data type: Boolean Default: true |
| result.result_map.wrap_up_code.code | Label of the wrap-up code. Data type: String |
| result.result_map.wrap_up_code.description | Description of the wrap-up code. Data type: String |
| result.result_map.wrap_up_code.external | Flag that indicates whether the wrap-up code is from an external system. Valid values: * true: The wrap-up code is from an external system. * false: The wrap-up code is internal. {#wrap-up-GET-code__ul_hh5_pwl_3} Data type: Boolean |
| result.result_map.wrap_up_code.sys_id | Sys_id of the wrap-up code. Data type: String Table: Interaction Wrap Up Code \[interaction_wrap_up_code\] |
| result.result_map.wrap_up_code.translated_code | A translation of the wrap-up code label. Data type: String |
| result.result_map.wrap_up_code.translated_description | A translation of the wrap-up code description. Data type: String |
| result.success | Flag that indicates whether the API request was successfully processed. Valid values: * true: The API request was successful. * false: The API request failed. {#wrap-up-GET-code__ul_mdm_tff_m2c} Data type: Boolean |
[ ]

### cURL request

This example retrieves details for a specified wrap-up code.

    curl "https://instance.service-now.com/api/now/v1/wrapup/code/49c27b679f201210c89656effa0a1cd7" \
    --request GET \
    --header "Accept:application/json" \
    --user 'username':'password'

Response body.

    {
      "result": {
        "message": "Wrap up code found.",
        "result_map": {
          "wrap_up_code": {
            "code": "Billing Issue",
            "description": "A code for billing issues",
            "active": true,
            "external": true,
            "sys_id": "49c27b679f201210c89656effa0a1cd7",
            "translated_code": "Abrechnungsproblem",
            "translated_description": "Ein code für Abrechnungsprobleme"
          }
        },
        "success": true
      }
    }

## Wrap Up - GET /now/wrapup/segment/{segment_id} {#ariaid-title3}

Retrieves details for a specified wrap-up segment.

### URL format

Versioned URL: /api/now/{api_version}/wrapup/segment/{segment_id}

Default URL: /api/now/wrapup/segment/{segment_id}

### Supported request parameters

{#wrap-up-GET-segment__entry__2}{#wrap-up-GET-segment__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
| segment_id | Sys_id of the wrap-up segment in the Interaction Wrap Up Segment \[interaction_wrap_up_segment\] table, or identifier representing the interaction segment on the external system. Data type: String |
[Tabelle : 7. Path parameters]

{#wrap-up-GET-segment__entry__8}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 8. Query parameters]

{#wrap-up-GET-segment__entry__12}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 9. 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/8lFZRln4AVFM64buP1Dvmg "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.").
{#wrap-up-GET-segment__entry__16}{#wrap-up-GET-segment__accept-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/xml. Default: application/json |
[Tabelle : 10. Request headers]

{#wrap-up-GET-segment__entry__20}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 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/8lFZRln4AVFM64buP1Dvmg "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.").
{#wrap-up-GET-segment__table_n5n_sy2_42c__entry__2}{#wrap-up-GET-segment__entry-200-status-code}{#wrap-up-GET-segment__entry-400-status-code}{#wrap-up-GET-segment__entry-401-status-code}{#wrap-up-GET-segment__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Tabelle : 12. Status codes]

{#wrap-up-GET-segment__table_n5n_sy2_42c}

### Response body parameters (JSON or XML)

{#wrap-up-GET-segment__table_xpr_b42_42c__entry__2}{#wrap-up-GET-segment__segment-agent}{#wrap-up-GET-segment__interaction-id}{#wrap-up-GET-segment__codes-code-desc-ph}{#wrap-up-GET-segment__d4398e94}

| Name | Description |
|-|-|
| message | Message that describes the outcome of the API request. Data type: String |
| segment | Object containing data about the interaction and wrap-up segment. Data type: Object "segment": { "agent": "String", "awaiting_confirmation": Boolean, "confirmed_on": "String", "external": Boolean, "interaction": "String", "opened_on": "String", "segmented": Boolean, "segment_id": "String", "segment_table": "String", "state": "String", "submitted_on": "String", "sys_id": "String", "wrap_up_configuration": {Object} } |
| segment.agent | Sys_id of the agent assigned to the interaction. Data type: String Table: User \[sys_user\] |
| segment.awaiting_confirmation | Flag that indicates whether the wrap-up segment submitted by the agent is awaiting confirmation that it was processed by the external CCaaS system. Valid values: * true: The wrap-up segment is awaiting confirmation. * false: The wrap-up segment was processed by the external system. {#wrap-up-GET-segment__ul_jvz_fr2_42c} Data type: Boolean |
| segment.confirmed_on | Date and time the submitted wrap-up segment is processed in the external CCaaS system. Data type: String |
| segment.external | Flag that indicates whether the interaction segment is from an external system. Valid values: * true: The interaction segment is from an external system. * false: The interaction segment is internal. {#wrap-up-GET-segment__ul_hh5_pwl_m2c} Data type: Boolean Default: false |
| segment.interaction | Sys_id of the interaction. Data type: String Table: Interaction \[interaction\] |
| segment.opened_on | The start date and time of the wrap-up period according to the external system. Data type: String |
| segment.segmented | Flag that indicates whether the wrap-up is segmented. Valid values: * true: The wrap-up is segmented into multiple parts. * false: The wrap-up is one complete segment. {#wrap-up-GET-segment__ul_hpy_wxl_m2c} Data type: Boolean Default: false |
| segment.segment_id | Sys_id of the interaction segment. Data type: String |
| segment.segment_table | Name of the table containing the interaction segment. Data type: String |
| segment.state | State of the interaction segment. Data type: String |
| segment.submitted_on | Date and time the agent submitted the wrap-up segment. Data type: String |
| segment.sys_id | Sys_id of the wrap-up segment. Data type: String Table: Interaction Wrap Up Segment \[interaction_wrap_up_segment\] |
| segment.wrap_up_configuration | Object containing details about the wrap-up configuration used for the wrap-up segment. Data type: Object "wrap_up_configuration": { "allowed_codes": [Array], "default_code": {Object}, "enable_codes": Boolean } |
| segment.wrap_up_configuration.allowed_codes | Array of objects each representing a wrap-up code the agent is allowed to use. Data type: Array "allowed_codes": [ { "active": Boolean, "code": "String", "description": "String", "external": Boolean, "sys_id": "String", "translated_code": "String", "translated_description": "String" } ] |
| segment.wrap_up_configuration.allowed_codes.active | Flag that indicates whether the wrap-up code is active. Valid values: * true: The wrap-up code is active. * false: The wrap-up code isn't active. {#wrap-up-GET-segment__ul_gfl_mbf_m2c} Data type: Boolean Default: true |
| segment.wrap_up_configuration.allowed_codes.code | Label of the wrap-up code. Data type: String |
| segment.wrap_up_configuration.allowed_codes.description | Description of the wrap-up code. Data type: String |
| segment.wrap_up_configuration.allowed_codes.external | Flag that indicates whether the wrap-up code is from an external system. Valid values: * true: The wrap-up code is from an external system. * false: The wrap-up code is internal. {#wrap-up-GET-segment__ul_hh5_pwl_3} Data type: Boolean |
| segment.wrap_up_configuration.allowed_codes.sys_id | Sys_id of the wrap-up code. Data type: String Table: Interaction Wrap Up Code \[interaction_wrap_up_code\] |
| segment.wrap_up_configuration.allowed_codes.translated_code | A translation of the wrap-up code label. Data type: String |
| segment.wrap_up_configuration.allowed_codes.translated_description | A translation of the wrap-up code description. Data type: String |
| segment.wrap_up_configuration.default_code | Object containing the wrap-up code to use as the default. Data type: Object "default_code": { "active": Boolean, "code": "String", "description": "String", "external": Boolean, "sys_id": "String", "translated_code": "String", "translated_description": "String" } |
| segment.wrap_up_configuration.default_code.active | Flag that indicates whether the wrap-up code is active. Valid values: * true: The wrap-up code is active. * false: The wrap-up code isn't active. {#wrap-up-GET-segment__d4398e74} Data type: Boolean Default: true |
| segment.wrap_up_configuration.default_code.code | Label of the wrap-up code. Data type: String |
| segment.wrap_up_configuration.default_code.description | Description of the wrap-up code. Data type: String |
| segment.wrap_up_configuration.default_code.external | Flag that indicates whether the wrap-up code is from an external system. Valid values: * true: The wrap-up code is from an external system. * false: The wrap-up code is internal. {#wrap-up-GET-segment__d4398e286} Data type: Boolean |
| segment.wrap_up_configuration.default_code.sys_id | Sys_id of the wrap-up code. Data type: String Table: Interaction Wrap Up Code \[interaction_wrap_up_code\] |
| segment.wrap_up_configuration.default_code.translated_code | A translation of the wrap-up code label. Data type: String |
| segment.wrap_up_configuration.default_code.translated_description | A translation of the wrap-up code description. Data type: String |
| segment.wrap_up_configuration.enable_codes | Flag that indicates whether the agent must select a wrap-up code. Valid values: * true: Agent must select a wrap-up code. * false: Agent isn't required to select a wrap-up code. {#wrap-up-GET-segment__ul_s3z_45r_m2c} Data type: Boolean Default: false |
| segment_id | Sys_id of the wrap-up segment. Data type: String Table: Interaction Wrap Up Segment \[interaction_wrap_up_segment\] |
| success | Flag that indicates whether the API request was successfully processed. Valid values: * true: The API request was successful. * false: The API request failed. {#wrap-up-GET-segment__ul_mdm_tff_m2c} Data type: Boolean |
[ ]

{#wrap-up-GET-segment__table_xpr_b42_42c}  

### cURL request

This example retrieves details for a specified wrap-up segment.

    curl "https://instance.service-now.com/api/now/v1/wrapup/segment/dgajbcef12345678defdbxef123435678" \
    --request GET \
    --header "Accept:application/json" \
    --user 'username':'password'

Response body.

    {
      "success": true,
      "message": "Wrap up segment retrieved successfully.",
      "segment_id": "dgajbcef12345678defdbxef123435678",
      "segment": {
        "agent": "123412345678567890ab90abcdefcdef",
        "segment_table": "sn_openframe_phone_log",
        "segment_id": "dgajbcef12345678defdbxef123435678",
        "external": true,
        "interaction": "213412345678567890ab90abcdefcdef",
        "state": "closed",
        "wrap_up_configuration": {
          "enable_codes": true,
          "allowed_codes": [
            {
              "code": "Billing Issue",
              "description": "",
              "active": true,
              "external": true,
              "sys_id": "49c27b679f201210c89656effa0a1cd7",
              "translated_code": "Abrechnungsproblem",
              "translated_description": ""
            },
            {
              "code": "Store Issue",
              "description": "",
              "active": true,
              "external": true,
              "sys_id": "54327b679f201210c89656effa0a1cd7",
              "translated_code": " Einkaufsproblem",
              "translated_description": ""
            }
          ],
          "default_code": {
            "code": "Billing Issue",
            "description": "",
            "active": true,
            "external": true,
            "sys_id": "49c27b679f201210c89656effa0a1cd7",
            "translated_code": "Abrechnungsproblem",
            "translated_description": ""
          }
        },
        "segmented": true,
        "sys_id": "dgajbcef12345678defdbxef123435678",
        "opened_on": "2024-09-16 17:52:01",
        "submitted_on": "2024-09-16 18:51:59",
        "confirmed_on": "2024-09-16 18:52:01",
        "awaiting_confirmation": false
      }
    }

## Wrap Up - GET /now/wrapup/segment/agent/{agent_id}/interaction/{interaction_id} {#ariaid-title4}

Retrieves details for a wrap-up segment based on a specified agent and interaction.

### URL format

Versioned URL: /api/now/{api_version}/wrapup/segment/agent/{agent_id}/interaction/{interaction_id}

Default URL: /api/now/wrapup/segment/agent/{agent_id}/interaction/{interaction_id}

### Supported request parameters

{#wrap-up-GET-segment-agent-int__entry__2}{#wrap-up-GET-segment-agent-int__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
| agent_id | Sys_id of the agent assigned to the interaction. Data type: String Table: User \[sys_user\] |
| interaction_id | Sys_id of the interaction. Data type: String Table: Interaction \[interaction\] |
[Tabelle : 13. Path parameters]

{#wrap-up-GET-segment-agent-int__entry__10}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 14. Query parameters]

{#wrap-up-GET-segment-agent-int__entry__14}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 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/8lFZRln4AVFM64buP1Dvmg "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.").
{#wrap-up-GET-segment-agent-int__entry__18}{#wrap-up-GET-segment-agent-int__accept-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/xml. Default: application/json |
[Tabelle : 16. Request headers]

{#wrap-up-GET-segment-agent-int__entry__22}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 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/8lFZRln4AVFM64buP1Dvmg "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.").
{#wrap-up-GET-segment-agent-int__entry__26}{#wrap-up-GET-segment-agent-int__entry-200-status-code}{#wrap-up-GET-segment-agent-int__entry-400-status-code}{#wrap-up-GET-segment-agent-int__entry-401-status-code}{#wrap-up-GET-segment-agent-int__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Tabelle : 18. Status codes]

### Response body parameters (JSON or XML)

{#wrap-up-GET-segment-agent-int__table_xpr_b42_42c__entry__2}{#wrap-up-GET-segment-agent-int__segment-agent}{#wrap-up-GET-segment-agent-int__interaction-id}{#wrap-up-GET-segment-agent-int__codes-code-desc-ph}{#wrap-up-GET-segment-agent-int__d4398e94}

| Name | Description |
|-|-|
| message | Message that describes the outcome of the API request. Data type: String |
| segment | Object containing data about the interaction and wrap-up segment. Data type: Object "segment": { "agent": "String", "awaiting_confirmation": Boolean, "confirmed_on": "String", "external": Boolean, "interaction": "String", "opened_on": "String", "segmented": Boolean, "segment_id": "String", "segment_table": "String", "state": "String", "submitted_on": "String", "sys_id": "String", "wrap_up_configuration": {Object} } |
| segment.agent | Sys_id of the agent assigned to the interaction. Data type: String Table: User \[sys_user\] |
| segment.awaiting_confirmation | Flag that indicates whether the wrap-up segment submitted by the agent is awaiting confirmation that it was processed by the external CCaaS system. Valid values: * true: The wrap-up segment is awaiting confirmation. * false: The wrap-up segment was processed by the external system. {#wrap-up-GET-segment-agent-int__ul_jvz_fr2_42c} Data type: Boolean |
| segment.confirmed_on | Date and time the submitted wrap-up segment is processed in the external CCaaS system. Data type: String |
| segment.external | Flag that indicates whether the interaction segment is from an external system. Valid values: * true: The interaction segment is from an external system. * false: The interaction segment is internal. {#wrap-up-GET-segment-agent-int__ul_hh5_pwl_m2c} Data type: Boolean Default: false |
| segment.interaction | Sys_id of the interaction. Data type: String Table: Interaction \[interaction\] |
| segment.opened_on | The start date and time of the wrap-up period according to the external system. Data type: String |
| segment.segmented | Flag that indicates whether the wrap-up is segmented. Valid values: * true: The wrap-up is segmented into multiple parts. * false: The wrap-up is one complete segment. {#wrap-up-GET-segment-agent-int__ul_hpy_wxl_m2c} Data type: Boolean Default: false |
| segment.segment_id | Sys_id of the interaction segment. Data type: String |
| segment.segment_table | Name of the table containing the interaction segment. Data type: String |
| segment.state | State of the interaction segment. Data type: String |
| segment.submitted_on | Date and time the agent submitted the wrap-up segment. Data type: String |
| segment.sys_id | Sys_id of the wrap-up segment. Data type: String Table: Interaction Wrap Up Segment \[interaction_wrap_up_segment\] |
| segment.wrap_up_configuration | Object containing details about the wrap-up configuration used for the wrap-up segment. Data type: Object "wrap_up_configuration": { "allowed_codes": [Array], "default_code": {Object}, "enable_codes": Boolean } |
| segment.wrap_up_configuration.allowed_codes | Array of objects each representing a wrap-up code the agent is allowed to use. Data type: Array "allowed_codes": [ { "active": Boolean, "code": "String", "description": "String", "external": Boolean, "sys_id": "String", "translated_code": "String", "translated_description": "String" } ] |
| segment.wrap_up_configuration.allowed_codes.active | Flag that indicates whether the wrap-up code is active. Valid values: * true: The wrap-up code is active. * false: The wrap-up code isn't active. {#wrap-up-GET-segment-agent-int__ul_gfl_mbf_m2c} Data type: Boolean Default: true |
| segment.wrap_up_configuration.allowed_codes.code | Label of the wrap-up code. Data type: String |
| segment.wrap_up_configuration.allowed_codes.description | Description of the wrap-up code. Data type: String |
| segment.wrap_up_configuration.allowed_codes.external | Flag that indicates whether the wrap-up code is from an external system. Valid values: * true: The wrap-up code is from an external system. * false: The wrap-up code is internal. {#wrap-up-GET-segment-agent-int__ul_hh5_pwl_3} Data type: Boolean |
| segment.wrap_up_configuration.allowed_codes.sys_id | Sys_id of the wrap-up code. Data type: String Table: Interaction Wrap Up Code \[interaction_wrap_up_code\] |
| segment.wrap_up_configuration.allowed_codes.translated_code | A translation of the wrap-up code label. Data type: String |
| segment.wrap_up_configuration.allowed_codes.translated_description | A translation of the wrap-up code description. Data type: String |
| segment.wrap_up_configuration.default_code | Object containing the wrap-up code to use as the default. Data type: Object "default_code": { "active": Boolean, "code": "String", "description": "String", "external": Boolean, "sys_id": "String", "translated_code": "String", "translated_description": "String" } |
| segment.wrap_up_configuration.default_code.active | Flag that indicates whether the wrap-up code is active. Valid values: * true: The wrap-up code is active. * false: The wrap-up code isn't active. {#wrap-up-GET-segment-agent-int__d4398e74} Data type: Boolean Default: true |
| segment.wrap_up_configuration.default_code.code | Label of the wrap-up code. Data type: String |
| segment.wrap_up_configuration.default_code.description | Description of the wrap-up code. Data type: String |
| segment.wrap_up_configuration.default_code.external | Flag that indicates whether the wrap-up code is from an external system. Valid values: * true: The wrap-up code is from an external system. * false: The wrap-up code is internal. {#wrap-up-GET-segment-agent-int__d4398e286} Data type: Boolean |
| segment.wrap_up_configuration.default_code.sys_id | Sys_id of the wrap-up code. Data type: String Table: Interaction Wrap Up Code \[interaction_wrap_up_code\] |
| segment.wrap_up_configuration.default_code.translated_code | A translation of the wrap-up code label. Data type: String |
| segment.wrap_up_configuration.default_code.translated_description | A translation of the wrap-up code description. Data type: String |
| segment.wrap_up_configuration.enable_codes | Flag that indicates whether the agent must select a wrap-up code. Valid values: * true: Agent must select a wrap-up code. * false: Agent isn't required to select a wrap-up code. {#wrap-up-GET-segment-agent-int__ul_s3z_45r_m2c} Data type: Boolean Default: false |
| segment_id | Sys_id of the wrap-up segment. Data type: String Table: Interaction Wrap Up Segment \[interaction_wrap_up_segment\] |
| success | Flag that indicates whether the API request was successfully processed. Valid values: * true: The API request was successful. * false: The API request failed. {#wrap-up-GET-segment-agent-int__ul_mdm_tff_m2c} Data type: Boolean |
[ ]

{#wrap-up-GET-segment-agent-int__table_xpr_b42_42c}  

### cURL request

This example retrieves details for a wrap-up segment based on a specified agent and interaction.

    curl "https://instance.service-now.com/api/now/v1/wrapup/segment/agent/123412345678567890ab90abcdefcdef/interaction/213412345678567890ab90abcdefcdef" \
    --request GET \
    --header "Accept:application/json" \
    --user 'username':'password'

Response body.

    {
      "success": true,
      "message": "Wrap up segment retrieved successfully.",
      "segment_id": "dgajbcef12345678defdbxef123435678",
      "segment": {
        "agent": "123412345678567890ab90abcdefcdef",
        "segment_table": "sn_openframe_phone_log",
        "segment_id": "dgajbcef12345678defdbxef123435678",
        "external": true,
        "interaction": "213412345678567890ab90abcdefcdef",
        "state": "closed",
        "wrap_up_configuration": {
          "enable_codes": true,
          "allowed_codes": [
            {
              "code": "Billing Issue",
              "description": "",
              "active": true,
              "external": true,
              "sys_id": "49c27b679f201210c89656effa0a1cd7",
              "translated_code": "Abrechnungsproblem",
              "translated_description": ""
            },
            {
              "code": "Store Issue",
              "description": "",
              "active": true,
              "external": true,
              "sys_id": "54327b679f201210c89656effa0a1cd7",
              "translated_code": " Einkaufsproblem",
              "translated_description": ""
            }
          ],
          "default_code": {
            "code": "Billing Issue",
            "description": "",
            "active": true,
            "external": true,
            "sys_id": "49c27b679f201210c89656effa0a1cd7",
            "translated_code": "Abrechnungsproblem",
            "translated_description": ""
          }
        },
        "segmented": true,
        "sys_id": "dgajbcef12345678defdbxef123435678",
        "opened_on": "2024-09-16 17:52:01",
        "submitted_on": "2024-09-16 18:51:59",
        "confirmed_on": "2024-09-16 18:52:01",
        "awaiting_confirmation": false
      }
    }

## Wrap Up - POST /now/wrapup/code {#ariaid-title5}

Creates or updates wrap-up codes.
Wrap-up codes are created in the Interaction Wrap Up Code \[interaction_wrap_up_code\] table.

### URL format

Versioned URL: /api/now/{api_version}/wrapup/code

Default URL: /api/now/wrapup/code

### Supported request parameters

{#wrap-up-POST-code__entry__2}{#wrap-up-POST-code__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
[Tabelle : 19. Path parameters]

{#wrap-up-POST-code__entry__6}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 20. Query parameters]

{#wrap-up-POST-code__entry__10}

| Name | Description |
|-|-|
| codes | Required. Array of objects each representing a wrap-up code. Data type: Array "codes": [ { "active": Boolean, "code": "String", "description": "String", "translations": [Array] } ] |
| codes.active | Flag that indicates whether the wrap-up code is active. Valid values: * true: The wrap-up code is active. * false: The wrap-up code isn't active. {#wrap-up-POST-code__ul_gfl_mbf_m2c} Data type: Boolean Default: true |
| codes.code | Required. Label of the wrap-up code. Data type: String |
| codes.description | Description of the wrap-up code. Data type: String |
| codes.translations | Array of objects each representing a translation of the wrap-up code. Data type: Array "translations": [ { "code": "Abrechnungsproblem", "description": "Ein code für Abrechnungsprobleme", "language": "de" } ] |
| codes.translations.code | A translation of the wrap-up code label (codes.code). Required if using the codes.translations parameter. Data type: String |
| codes.translations.description | A translation of the wrap-up code description (codes.description). Required if using the codes.translations parameter and a value was provided for codes.description. Data type: String |
| codes.translations.language | Two-letter code for the language used in the translation. Required if using the codes.translations parameter. Data type: String |
[Tabelle : 21. 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/8lFZRln4AVFM64buP1Dvmg "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.").
{#wrap-up-POST-code__entry__28}{#wrap-up-POST-code__accept-RESTAPI}{#wrap-up-POST-code__content_type-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/xml. Default: application/json |
| Content-Type | Data format of the request body. Supported types: application/json or application/xml. Default: application/json |
[Tabelle : 22. Request headers]

{#wrap-up-POST-code__entry__34}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 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/8lFZRln4AVFM64buP1Dvmg "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.").
{#wrap-up-POST-code__table_szp_xy2_42c__entry__2}{#wrap-up-POST-code__entry-200-status-code}{#wrap-up-POST-code__entry-400-status-code}{#wrap-up-POST-code__entry-401-status-code}{#wrap-up-POST-code__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 207 | Successful. Some wrap-up codes created successfully. Validation errors occurred while creating others. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Tabelle : 24. Status codes]

{#wrap-up-POST-code__table_szp_xy2_42c}

### Response body parameters (JSON or XML)

{#wrap-up-POST-code__entry__50}{#wrap-up-POST-code__message}{#wrap-up-POST-code__codes-code-desc-ph}{#wrap-up-POST-code__success}

| Name | Description |
|-|-|
| result | Object containing information about the API request and the created wrap-up codes. Data type: Object "result": { "message": "String", "resultMap": {Object}, "success": Boolean } |
| result.message | Message that describes the outcome of the API request. Data type: String |
| result.result_map | Object containing an array of created wrap-up codes. Data type: Object "result_map": { "created_wrap_up_codes": [Array] } |
| result.result_map.created_wrap_up_codes | Array of objects each representing a created wrap-up code. Data type: Array "created_wrap_up_codes": [ { "active": Boolean, "code": "String", "description": "String", "external": Boolean, "sys_id": "String", "translated_code": "String", "translated_description": "String" } ] |
| result.result_map.created_wrap_up_codes.active | Flag that indicates whether the wrap-up code is active. Valid values: * true: The wrap-up code is active. * false: The wrap-up code isn't active. {#wrap-up-POST-code__d4398e74} Data type: Boolean Default: true |
| result.result_map.created_wrap_up_codes.code | Label of the wrap-up code. Data type: String |
| result.result_map.created_wrap_up_codes.description | Description of the wrap-up code. Data type: String |
| result.result_map.created_wrap_up_codes.external | Flag that indicates whether the wrap-up code is from an external system. Valid values: * true: The wrap-up code is from an external system. * false: The wrap-up code is internal. {#wrap-up-POST-code__ul_hh5_pwl_3} Data type: Boolean |
| result.result_map.created_wrap_up_codes.sys_id | Sys_id of the wrap-up code. Data type: String Table: Interaction Wrap Up Code \[interaction_wrap_up_code\] |
| result.result_map.created_wrap_up_codes.translated_code | A translation of the wrap-up code label. Data type: String |
| result.result_map.created_wrap_up_codes.translated_description | A translation of the wrap-up code description. Data type: String |
| result.success | Flag that indicates whether the API request was successfully processed. Valid values: * true: The API request was successful. * false: The API request failed. {#wrap-up-POST-code__ul_mdm_tff_m2c} Data type: Boolean |
[ ]

### cURL request

This example creates a wrap-up code for billing issues with a translation in German.

    curl "https://instance.service-now.com/api/now/v1/wrapup/code" \
    --request POST \
    --header "Accept:application/json" \
    --header "Content-Type:application/json" \
    --data "{
      \"codes\": [
        {
          \"code\": \"Billing Issue\",
          \"description\": \"A code for billing issues\",
          \"translations\": [
            {
              \"language\": \"de\",
              \"code\": \"Abrechnungsproblem\",
              \"description\": \"Ein code für Abrechnungsprobleme\"
            }
          ]
        }
      ]
    }" \
    --user 'username':'password'

Response body.

    {
      "result": {
        "message": "All wrap up codes created successfully.",
        "result_map": {
          "created_wrap_up_codes": [
            {
              "code": "Billing Issue",
              "description": "A code for billing issues",
              "active": true,
              "external": true,
              "sys_id": "49c27b679f201210c89656effa0a1cd7",
              "translated_code": "Abrechnungsproblem",
              "translated_description": "Ein code für Abrechnungsprobleme"
            }
          ]
        },
        "success": true
      }
    }

## Wrap Up - POST /now/wrapup/segment/create {#ariaid-title6}

Opens a wrap-up segment for an interaction.
Wrap-ups are created in the Interaction Wrap Up Segment \[interaction_wrap_up_segment\] table.

### URL format

Versioned URL: /api/now/{api_version}/wrapup/segment/create

Default URL: /api/now/wrapup/segment/create

### Supported request parameters

{#wrap-up-POST-segment-create__entry__2}{#wrap-up-POST-segment-create__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
[Tabelle : 25. Path parameters]

{#wrap-up-POST-segment-create__entry__6}

| Name | Description |
|-|-|
| None |   |
[Tabelle : 26. Query parameters]

{#wrap-up-POST-segment-create__entry__10}{#wrap-up-POST-segment-create__external-seg}

| Name | Description |
|-|-|
| agent_sys_id | Required. Sys_id of the agent assigned to the interaction. Data type: String Table: User \[sys_user\] |
| configuration | Object containing the code and duration details for an external wrap-up. Required if external is `true`. Data type: Object "configuration": { "allowed_codes": [Array], "default_code": "String", "duration": "String", "enable_codes": Boolean, "show_timer": Boolean } |
| configuration.allowed_codes | Array of objects each representing a wrap-up code the agent is allowed to use. Required if external and configuration.enable_codes are both `true`. Data type: Array "allowed_codes": [ { "code": "String", "translation": {Object} } ] |
| configuration.allowed_codes.code | Label of the wrap-up code. Required if using the configuration.allowed_codes parameter. Data type: String |
| configuration.allowed_codes.translation | A translation of the wrap-up code. Data type: Object "translation": { "code": "String", "language": "String" } |
| configuration.allowed_codes.translation.code | A translation of the wrap-up code label. Data type: String |
| configuration.allowed_codes.translation.language | Two-letter code for the language used in the translation. Data type: String |
| configuration.default_code | Label of the wrap-up code to use as the default. Required if external and configuration.enable_codes are both `true`. Data type: String Table: Interaction Wrap Up Code \[interaction_wrap_up_code\] Field: Code |
| configuration.duration | Maximum allowed wrap-up duration. Must be used with show_timer. Data type: String Unit: Seconds Default: Empty string (No time limit). |
| configuration.enable_codes | Flag that indicates whether the agent must select a wrap-up code. Valid values: * true: Agent must select a wrap-up code. * false: Agent isn't required to select a wrap-up code. {#wrap-up-POST-segment-create__d4398e120} Data type: Boolean Default: false |
| configuration.show_timer | Required when using the duration property. Flag that indicates whether the timer displays. Valid values: * true: Timer displays in the UI. * false: Timer does not display in the UI. {#wrap-up-POST-segment-create__ul_s3z_45r_m2c} Data type: Boolean Default: false |
| external | Flag that indicates whether the interaction segment is from an external system. Valid values: * true: The interaction segment is from an external system. * false: The interaction segment is internal. {#wrap-up-POST-segment-create__ul_hh5_pwl_m2c} Data type: Boolean Default: false |
| external_segment_id | Identifier representing the interaction segment on the external system. Required if external is `true`. Data type: String |
| interaction_sys_id | Required. Sys_id of the interaction. Data type: String Table: Interaction \[interaction\] |
| opened_on | The start date and time of the wrap-up period according to the external system. Required if using the configuration.duration parameter. Data type: String |
| segmented | Flag that indicates whether the wrap-up is segmented. Valid values: * true: The wrap-up is segmented into multiple parts. * false: The wrap-up is one complete segment. {#wrap-up-POST-segment-create__ul_hpy_wxl_m2c} Data type: Boolean Default: false |
| segment_id | Sys_id of the interaction segment. Required if external and segmented are both `true`. Hinweis: You must implement the InteractionSegment scripted extension point to create and retrieve segment records in your chosen table or use the [OpenFrame](https://www.servicenow.com/docs/access?context=c_OpenFrameOverview&version=australia&pubname=australia-customer-service-management&ft:locale=en-US) implementation to create and retrieve segment records in the Phone Log \[sn_openframe_phone_log\] table. Data type: String |
| segment_table | Name of the table containing the interaction segment. Required if external and segmented are both `true`. Data type: String |
| wrap_up_configuration_sys_id | Sys_id of the wrap-up configuration to use. Required if external is `false`. Data type: String Table: Interaction Wrap Up Configuration \[interaction_wrap_up_configuration\] |
[Tabelle : 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/8lFZRln4AVFM64buP1Dvmg "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.").
{#wrap-up-POST-segment-create__table_r5j_h1f_42c__entry__2}{#wrap-up-POST-segment-create__accept-RESTAPI}{#wrap-up-POST-segment-create__content_type-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/xml. Default: application/json |
| Content-Type | Data format of the request body. Supported types: application/json or application/xml. Default: application/json |
[Tabelle : 28. Request headers]

{#wrap-up-POST-segment-create__table_r5j_h1f_42c} {#wrap-up-POST-segment-create__entry__56}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 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/8lFZRln4AVFM64buP1Dvmg "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.").
{#wrap-up-POST-segment-create__table_sft_vy2_42c__entry__2}{#wrap-up-POST-segment-create__entry-200-status-code}{#wrap-up-POST-segment-create__entry-400-status-code}{#wrap-up-POST-segment-create__entry-401-status-code}{#wrap-up-POST-segment-create__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Tabelle : 30. Status codes]

{#wrap-up-POST-segment-create__table_sft_vy2_42c}

### Response body parameters (JSON or XML)

{#wrap-up-POST-segment-create__entry__70}{#wrap-up-POST-segment-create__codes-code-desc-ph}{#wrap-up-POST-segment-create__d4398e94}

| Name | Description |
|-|-|
| message | Message that describes the outcome of the API request. Data type: String |
| segment | Object containing data about the interaction and wrap-up segment. Data type: Object "segment": { "agent": "String", "external": Boolean, "interaction": "String", "opened_on": "String", "segmented": Boolean, "segment_id": "String", "segment_table": "String", "state": "String", "sys_id": "String", "wrap_up_configuration": {Object} } |
| segment.agent | Sys_id of the agent assigned to the interaction segment. Data type: String Table: User \[sys_user\] |
| segment.external | Flag that indicates whether the interaction segment is from an external system. Valid values: * true: The interaction segment is from an external system. * false: The interaction segment is internal. {#wrap-up-POST-segment-create__d4398e143} Data type: Boolean Default: false |
| segment.interaction | Sys_id of the interaction. Data type: String Table: Interaction \[interaction\] |
| segment.opened_on | The start date and time of the wrap-up period according to the external system. Data type: String |
| segment.segmented | Flag that indicates whether the wrap-up is segmented. Valid values: * true: The wrap-up is segmented into multiple parts. * false: The wrap-up is one complete segment. {#wrap-up-POST-segment-create__d4398e188} Data type: Boolean Default: false |
| segment.segment_id | Sys_id of the interaction segment. Data type: String |
| segment.segment_table | Name of the table containing the interaction segment. Data type: String |
| segment.state | State of the interaction segment. Interaction segments that the Wrap Up API creates successfully are in the open state. Data type: String |
| segment.sys_id | Sys_id of the wrap-up segment. Data type: String Table: Interaction Wrap Up Segment \[interaction_wrap_up_segment\] |
| segment.wrap_up_configuration | Object containing details about the wrap-up configuration used for the wrap-up segment. Data type: Object "wrap_up_configuration": { "allowed_codes": [Array], "default_code": {Object}, "enable_codes": Boolean } |
| segment.wrap_up_configuration.allowed_codes | Array of objects each representing a wrap-up code the agent is allowed to use. Data type: Array "allowed_codes": [ { "active": Boolean, "code": "String", "description": "String", "external": Boolean, "sys_id": "String", "translated_code": "String", "translated_description": "String" } ] |
| segment.wrap_up_configuration.allowed_codes.active | Flag that indicates whether the wrap-up code is active. Valid values: * true: The wrap-up code is active. * false: The wrap-up code isn't active. {#wrap-up-POST-segment-create__ul_gfl_mbf_m2c} Data type: Boolean Default: true |
| segment.wrap_up_configuration.allowed_codes.code | Label of the wrap-up code. Data type: String |
| segment.wrap_up_configuration.allowed_codes.description | Description of the wrap-up code. Data type: String |
| segment.wrap_up_configuration.allowed_codes.external | Flag that indicates whether the wrap-up code is from an external system. Valid values: * true: The wrap-up code is from an external system. * false: The wrap-up code is internal. {#wrap-up-POST-segment-create__ul_hh5_pwl_3} Data type: Boolean |
| segment.wrap_up_configuration.allowed_codes.sys_id | Sys_id of the wrap-up code. Data type: String Table: Interaction Wrap Up Code \[interaction_wrap_up_code\] |
| segment.wrap_up_configuration.allowed_codes.translated_code | A translation of the wrap-up code label. Data type: String |
| segment.wrap_up_configuration.allowed_codes.translated_description | A translation of the wrap-up code description. Data type: String |
| segment.wrap_up_configuration.default_code | Object containing the wrap-up code to use as the default. Data type: Object "default_code": { "active": Boolean, "code": "String", "description": "String", "external": Boolean, "sys_id": "String", "translated_code": "String", "translated_description": "String" } |
| segment.wrap_up_configuration.default_code.active | Flag that indicates whether the wrap-up code is active. Valid values: * true: The wrap-up code is active. * false: The wrap-up code isn't active. {#wrap-up-POST-segment-create__d4398e74} Data type: Boolean Default: true |
| segment.wrap_up_configuration.default_code.code | Label of the wrap-up code. Data type: String |
| segment.wrap_up_configuration.default_code.description | Description of the wrap-up code. Data type: String |
| segment.wrap_up_configuration.default_code.external | Flag that indicates whether the wrap-up code is from an external system. Valid values: * true: The wrap-up code is from an external system. * false: The wrap-up code is internal. {#wrap-up-POST-segment-create__d4398e286} Data type: Boolean |
| segment.wrap_up_configuration.default_code.sys_id | Sys_id of the wrap-up code. Data type: String Table: Interaction Wrap Up Code \[interaction_wrap_up_code\] |
| segment.wrap_up_configuration.default_code.translated_code | A translation of the wrap-up code label. Data type: String |
| segment.wrap_up_configuration.default_code.translated_description | A translation of the wrap-up code description. Data type: String |
| segment.wrap_up_configuration.enable_codes | Flag that indicates whether the agent must select a wrap-up code. Valid values: * true: Agent must select a wrap-up code. * false: Agent isn't required to select a wrap-up code. {#wrap-up-POST-segment-create__d4398e120} Data type: Boolean Default: false |
| success | Flag that indicates whether the API request was successfully processed. Valid values: * true: The API request was successful. * false: The API request failed. {#wrap-up-POST-segment-create__ul_mdm_tff_m2c} Data type: Boolean |
| sys_id | Sys_id of the wrap-up segment. Data type: String Table: Interaction Wrap Up Segment \[interaction_wrap_up_segment\] |
[ ]

### cURL request

This example opens a wrap-up segment for an interaction.

    curl "https://instance.service-now.com/api/now/v1/wrapup/segment/create" \
    --request POST \
    --header "Accept:application/json" \
    --header "Content-Type:application/json" \
    --data "{
      \"agent_sys_id\": \"123412345678567890ab90abcdefcdef\",
      \"interaction_sys_id\": \"213412345678567890ab90abcdefcdef\",
      \"external\": \"true\",
      \"segmented\": \"true\",
      \"segment_table\": \"sn_openframe_phone_log\",
      \"segment_id\": \"dgajbcef12345678defdbxef123435678\",
      \"external_segment_id\": \"PL_402548\",
      \"configuration\": {
        \"enable_codes\": true,
        \"allowed_codes\": [
          {
            \"code\": \"Billing Issue\",
            \"translation\": {
              \"language\": \"de\",
              \"code\": \"Abrechnungsproblem\"
            }
          },
          {
            \"code\": \"Store Issue\",
            \"translation\": {
              \"language\": \"de\",
              \"code\": \"Einkaufsproblem\"
            }
          }
        ],
        \"default_code\": \"Billing Issue\",
        \"duration\": \"30\",
        \"show_timer\": true
      },
      \"opened_on\": \"2024-09-16 17:52:01\"
    }" \
    --user 'username':'password'

Response body.

    {
      "success": true,
      "message": "Open wrap-up segment successfully created.",
      "sys_id": "98769876543254321fed1fedcba0cba0",
      "segment": {
        "agent": "123412345678567890ab90abcdefcdef",
        "segment_table": "sn_openframe_phone_log",
        "segment_id": "dgajbcef12345678defdbxef123435678",
        "external": true,
        "interaction": "213412345678567890ab90abcdefcdef",
        "state": "open",
        "wrap_up_configuration": {
          "enable_codes": true,
          "allowed_codes": [
            {
              "code": "Billing Issue",
              "description": "",
              "active": true,
              "external": true,
              "sys_id": "49c27b679f201210c89656effa0a1cd7",
              "translated_code": "Abrechnungsproblem",
              "translated_description": ""
            },
            {
              "code": "Store Issue",
              "description": "",
              "active": true,
              "external": true,
              "sys_id": "54327b679f201210c89656effa0a1cd7",
              "translated_code": " Einkaufsproblem",
              "translated_description": ""
            }
          ],
          "default_code": {
            "code": "Billing Issue",
            "description": "",
            "active": true,
            "external": true,
            "sys_id": "49c27b679f201210c89656effa0a1cd7",
            "translated_code": "Abrechnungsproblem",
            "translated_description": ""
          }
        },
        "segmented": true,
        "sys_id": "98769876543254321fed1fedcba0cba0",
        "opened_on": "2024-09-16 17:52:01"
      }
    }

## Wrap Up - PUT /now/wrapup/segment/update {#ariaid-title7}

Updates and closes a wrap-up segment for an interaction.

### URL format

Versioned URL: /api/now/{api_version}/wrapup/segment/update

Default URL: /api/now/wrapup/segment/update

### Supported request parameters

{#wrap-up-PUT-segment-update__entry__2}{#wrap-up-PUT-segment-update__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
[Tabelle : 31. Path parameters]

{#wrap-up-PUT-segment-update__entry__6}

| Name | Description |
|-|-|
| agent_sys_id | Sys_id of the agent assigned to the interaction. Required along with interaction_sys_id if neither segment_sys_id nor external_segment_id are provided. Data type: String Table: User \[sys_user\] |
| external_segment_id | Identifier representing the interaction segment on the external system. Used to identify the wrap-up segment to update if segment_sys_id isn't provided. |
| interaction_sys_id | Sys_id of the interaction. Required along with agent_sys_id if neither segment_sys_id nor external_segment_id are provided. Data type: String Table: Interaction \[interaction\] |
| segment_sys_id | Sys_id of the wrap-up segment. Data type: String Table: Interaction Wrap Up Segment \[interaction_wrap_up_segment\] |
[Tabelle : 32. Query parameters]

{#wrap-up-PUT-segment-update__entry__16}

| Name | Description |
|-|-|
| confirmed_on | The end date and time of the wrap-up period according to the external system. Data type: String |
| notes | Additional notes added to the wrap-up by the agent. Data type: String |
| wrap_up_code | Label of the wrap-up code selected by the agent. If the agent doesn't select a code, the configured default code is used. Data type: String Table: Interaction Wrap Up Code \[interaction_wrap_up_code\] Field: Code |
[Tabelle : 33. 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/8lFZRln4AVFM64buP1Dvmg "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.").
{#wrap-up-PUT-segment-update__table_ubl_j1f_42c__entry__2}{#wrap-up-PUT-segment-update__accept-RESTAPI}{#wrap-up-PUT-segment-update__content_type-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/xml. Default: application/json |
| Content-Type | Data format of the request body. Supported types: application/json or application/xml. Default: application/json |
[Tabelle : 34. Request headers]

{#wrap-up-PUT-segment-update__table_ubl_j1f_42c} {#wrap-up-PUT-segment-update__entry__30}

| Header | Description |
|-|-|
| None |   |
[Tabelle : 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/8lFZRln4AVFM64buP1Dvmg "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.").
{#wrap-up-PUT-segment-update__table_ktx_5y2_42c__entry__2}{#wrap-up-PUT-segment-update__entry-200-status-code}{#wrap-up-PUT-segment-update__entry-400-status-code}{#wrap-up-PUT-segment-update__entry-401-status-code}{#wrap-up-PUT-segment-update__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Tabelle : 36. Status codes]

{#wrap-up-PUT-segment-update__table_ktx_5y2_42c}

### Response body parameters (JSON or XML)

{#wrap-up-PUT-segment-update__table_xpr_b42_42c__entry__2}{#wrap-up-PUT-segment-update__segment-agent}{#wrap-up-PUT-segment-update__codes-code-desc-ph}{#wrap-up-PUT-segment-update__interaction-id}{#wrap-up-PUT-segment-update__d4398e94}{#wrap-up-PUT-segment-update__d4398e94}

| Name | Description |
|-|-|
| message | Message that describes the outcome of the API request. Data type: String |
| segment | Object containing data about the interaction and wrap-up segment. Data type: Object "segment": { "agent": "String", "awaiting_confirmation": Boolean, "code": {Object}, "confirmed_on": "String", "external": Boolean, "interaction": "String", "notes": "String", "opened_on": "String", "segmented": Boolean, "segment_id": "String", "segment_table": "String", "state": "String", "submitted_on": "String", "sys_id": "String", "wrap_up_configuration": {Object} } |
| segment.agent | Sys_id of the agent assigned to the interaction. Data type: String Table: User \[sys_user\] |
| segment.awaiting_confirmation | Flag that indicates whether the wrap-up segment submitted by the agent is awaiting confirmation that it was processed by the external CCaaS system. Valid values: * true: The wrap-up segment is awaiting confirmation. * false: The wrap-up segment was processed by the external system. {#wrap-up-PUT-segment-update__ul_jvz_fr2_42c} Data type: Boolean |
| segment.code | Object containing the wrap-up code selected by the agent. Data type: Object "code": { "active": Boolean, "code": "String", "description": "String", "external": Boolean, "sys_id": "String", "translated_code": "String", "translated_description": "String" } |
| segment.code.active | Flag that indicates whether the wrap-up code is active. Valid values: * true: The wrap-up code is active. * false: The wrap-up code isn't active. {#wrap-up-PUT-segment-update__ul_gfl_mbf_m2c} Data type: Boolean Default: true |
| segment.code.code | Label of the wrap-up code. Data type: String |
| segment.code.description | Description of the wrap-up code. Data type: String |
| segment.code.external | Flag that indicates whether the wrap-up code is from an external system. Valid values: * true: The wrap-up code is from an external system. * false: The wrap-up code is internal. {#wrap-up-PUT-segment-update__ul_hh5_pwl_3} Data type: Boolean |
| segment.code.sys_id | Sys_id of the wrap-up code. Data type: String Table: Interaction Wrap Up Code \[interaction_wrap_up_code\] |
| segment.code.translated_code | A translation of the wrap-up code label. Data type: String |
| segment.code.translated_description | A translation of the wrap-up code description. Data type: String |
| segment.confirmed_on | Date and time the submitted wrap-up segment is processed in the external CCaaS system. Data type: String |
| segment.external | Flag that indicates whether the interaction segment is from an external system. Valid values: * true: The interaction segment is from an external system. * false: The interaction segment is internal. {#wrap-up-PUT-segment-update__ul_hh5_pwl_m2c} Data type: Boolean Default: false |
| segment.interaction | Sys_id of the interaction. Data type: String Table: Interaction \[interaction\] |
| segment.notes | Additional notes added to the wrap-up by the agent. Data type: String |
| segment.opened_on | The start date and time of the wrap-up period according to the external system. Data type: String |
| segment.segmented | Flag that indicates whether the wrap-up is segmented. Valid values: * true: The wrap-up is segmented into multiple parts. * false: The wrap-up is one complete segment. {#wrap-up-PUT-segment-update__ul_hpy_wxl_m2c} Data type: Boolean Default: false |
| segment.segment_id | Sys_id of the interaction segment. Data type: String |
| segment.segment_table | Name of the table containing the interaction segment. Data type: String |
| segment.state | State of the interaction segment. Interaction segments that this endpoint updates successfully are in the closed state. Data type: String |
| segment.submitted_on | Date and time the agent submitted the wrap-up segment. Data type: String |
| segment.sys_id | Sys_id of the wrap-up segment. Data type: String Table: Interaction Wrap Up Segment \[interaction_wrap_up_segment\] |
| segment.wrap_up_configuration | Object containing details about the wrap-up configuration used for the wrap-up segment. Data type: Object "wrap_up_configuration": { "allowed_codes": [Array], "default_code": {Object}, "enable_codes": Boolean } |
| segment.wrap_up_configuration.allowed_codes | Array of objects each representing a wrap-up code the agent is allowed to use. Data type: Array "allowed_codes": [ { "active": Boolean, "code": "String", "description": "String", "external": Boolean, "sys_id": "String", "translated_code": "String", "translated_description": "String" } ] |
| segment.wrap_up_configuration.allowed_codes.active | Flag that indicates whether the wrap-up code is active. Valid values: * true: The wrap-up code is active. * false: The wrap-up code isn't active. {#wrap-up-PUT-segment-update__d4398e74} Data type: Boolean Default: true |
| segment.wrap_up_configuration.allowed_codes.code | Label of the wrap-up code. Data type: String |
| segment.wrap_up_configuration.allowed_codes.description | Description of the wrap-up code. Data type: String |
| segment.wrap_up_configuration.allowed_codes.external | Flag that indicates whether the wrap-up code is from an external system. Valid values: * true: The wrap-up code is from an external system. * false: The wrap-up code is internal. {#wrap-up-PUT-segment-update__d4398e286} Data type: Boolean |
| segment.wrap_up_configuration.allowed_codes.sys_id | Sys_id of the wrap-up code. Data type: String Table: Interaction Wrap Up Code \[interaction_wrap_up_code\] |
| segment.wrap_up_configuration.allowed_codes.translated_code | A translation of the wrap-up code label. Data type: String |
| segment.wrap_up_configuration.allowed_codes.translated_description | A translation of the wrap-up code description. Data type: String |
| segment.wrap_up_configuration.default_code | Object containing the wrap-up code to use as the default. Data type: Object "default_code": { "active": Boolean, "code": "String", "description": "String", "external": Boolean, "sys_id": "String", "translated_code": "String", "translated_description": "String" } |
| segment.wrap_up_configuration.default_code.active | Flag that indicates whether the wrap-up code is active. Valid values: * true: The wrap-up code is active. * false: The wrap-up code isn't active. {#wrap-up-PUT-segment-update__d4398e74} Data type: Boolean Default: true |
| segment.wrap_up_configuration.default_code.code | Label of the wrap-up code. Data type: String |
| segment.wrap_up_configuration.default_code.description | Description of the wrap-up code. Data type: String |
| segment.wrap_up_configuration.default_code.external | Flag that indicates whether the wrap-up code is from an external system. Valid values: * true: The wrap-up code is from an external system. * false: The wrap-up code is internal. {#wrap-up-PUT-segment-update__d4398e286} Data type: Boolean |
| segment.wrap_up_configuration.default_code.sys_id | Sys_id of the wrap-up code. Data type: String Table: Interaction Wrap Up Code \[interaction_wrap_up_code\] |
| segment.wrap_up_configuration.default_code.translated_code | A translation of the wrap-up code label. Data type: String |
| segment.wrap_up_configuration.default_code.translated_description | A translation of the wrap-up code description. Data type: String |
| segment.wrap_up_configuration.enable_codes | Flag that indicates whether the agent must select a wrap-up code. Valid values: * true: Agent must select a wrap-up code. * false: Agent isn't required to select a wrap-up code. {#wrap-up-PUT-segment-update__ul_s3z_45r_m2c} Data type: Boolean Default: false |
| success | Flag that indicates whether the API request was successfully processed. Valid values: * true: The API request was successful. * false: The API request failed. {#wrap-up-PUT-segment-update__ul_mdm_tff_m2c} Data type: Boolean |
| sys_id | Sys_id of the wrap-up segment. Data type: String Table: Interaction Wrap Up Segment \[interaction_wrap_up_segment\] |
[ ]

{#wrap-up-PUT-segment-update__table_xpr_b42_42c}  

### cURL request

This example updates and closes a wrap-up segment for an interaction.

    curl "https://instance.service-now.com/api/now/v1/wrapup/segment/update?segment_sys_id=98769876543254321fed1fedcba0cba0&agent_sys_id=123412345678567890ab90abcdefcdef&interaction_sys_id=213412345678567890ab90abcdefcde" \
    --request PUT \
    --header "Accept:application/json" \
    --header "Content-Type:application/json" \
    --data "{
      \"wrap_up_code\": \"Billing Issue\",
      \"notes\": \"Customer's credit card expired. Had to switch to another one.\",
      \"confirmed_on\": \"2024-09-16 18:52:01\"
    }" \
    --user 'username':'password'

Response body.

    {
      "success": true,
      "message": "Wrap-up segment updated successfully.",
      "sys_id": "98769876543254321fed1fedcba0cba0",
      "segment": {
        "agent": "123412345678567890ab90abcdefcdef",
        "segment_table": "sn_openframe_phone_log",
        "segment_id": "dgajbcef12345678defdbxef123435678",
        "external": true,
        "interaction": "213412345678567890ab90abcdefcdef",
        "state": "closed",
        "wrap_up_configuration": {
          "enable_codes": true,
          "allowed_codes": [
            {
              "code": "Billing Issue",
              "description": "",
              "active": true,
              "external": true,
              "sys_id": "49c27b679f201210c89656effa0a1cd7",
              "translated_code": "Abrechnungsproblem",
              "translated_description": ""
            },
            {
              "code": "Store Issue",
              "description": "",
              "active": true,
              "external": true,
              "sys_id": "54327b679f201210c89656effa0a1cd7",
              "translated_code": " Einkaufsproblem",
              "translated_description": ""
            }
          ],
          "default_code": {
            "code": "Billing Issue",
            "description": "",
            "active": true,
            "external": true,
            "sys_id": "49c27b679f201210c89656effa0a1cd7",
            "translated_code": "Abrechnungsproblem",
            "translated_description": ""
          }
        },
        "code": {
          "code": "Billing Issue",
          "description": "",
          "active": true,
          "external": true,
          "sys_id": "49c27b679f201210c89656effa0a1cd7",
          "translated_code": "Abrechnungsproblem",
          "translated_description": ""
        },
        "notes": "Customer's credit card expired. Had to switch to another one.",
        "segmented": true,
        "sys_id": "dgajbcef12345678defdbxef123435678",
        "opened_on": "2024-09-16 17:52:01",
        "submitted_on": "2024-09-16 18:51:59",
        "confirmed_on": "2024-09-16 18:52:01",
        "awaiting_confirmation": false
      }
    }


