---
sourceDocument: Yokohama API Reference
sourceDocumentLink: https://www.servicenow.com/docs/r/yokohama/api-reference

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# Service Order Open API

# Service Order Open API {#ariaid-title1}

* Release version: Yokohama
* 
* Updated January 30, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 63 minutes to read

The Service Order Open API provides endpoint that enable a standardized mechanism for placing service orders.
This API is a ServiceNow® implementation of the Open API TMForum TMF641
Service Ordering Management API specification.

To access this API, the Order Management for Telecommunications (sn_ind_tmt_orm) plugin must be activated. For more information, see [Install Order Management](https://www.servicenow.com/docs/access?context=order-mgt-install-providers&version=yokohama&pubname=yokohama-order-management&ft:locale=en-US). For information about Order Management tables, entities, and relationships, see [Order Management data model](https://www.servicenow.com/docs/access?context=order-mgt-order-data-model&version=yokohama&pubname=yokohama-order-management&ft:locale=en-US).

This API is provided within the `sn_tmf_api` namespace.

The calling user must have the sn_ind_tmt_orm.order_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 [Service Order Open API Developer Guide](https://www.servicenow.com/docs/8p0vGEeEvIXNhDW30eFIfg#service-order_dev-guide "Use the Service Order Open API to create, update, and retrieve service order information.").

## Service Order Open API -- GET /sn_tmf_api/order/serviceOrder {#ariaid-title2}

Retrieves all service orders.
This API retrieves service order information from the following related tables:

* Order \[sn_ind_tmt_orm_order\]
* Order Characteristic Value \[sn_ind_tmt_orm_order_characteristic_value\]
* Order Line Item \[sn_ind_tmt_orm_order_line_item\]
* Order Line Item Contact \[sn_ind_tmt_orm_order_line_item_contact\]
* Order Line Related Items \[sn_ind_tmt_orm_order_line_related_items\]
{#serviceorder-GET__ul_lxc_kxm_t4b}

### URL format

/api/sn_tmf_api/order/serviceOrder

### Supported request parameters

{#serviceorder-GET__table_ofr_vgy_fsb__entry__2}

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

{#serviceorder-GET__table_ofr_vgy_fsb} {#serviceorder-GET__table_pfr_vgy_fsb__entry__2}

| Name | Description |
|-|-|
| fields | List of fields to return in the response. Invalid fields are ignored. Data type: String Default: All fields returned. |
| limit | Maximum number of records to return. For requests that exceed this number of records, use the offset parameter to paginate record retrieval. Data type: Number Default: 20 Maximum: 100 |
| 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. Data type: Number Default: 0 |
| state | Filter orders by state. Only orders with a state matching the value of this parameter are returned in the response. Data type: String Default: All states returned. |
[Table 2. Query parameters]

{#serviceorder-GET__table_pfr_vgy_fsb} {#serviceorder-GET__table_xcm_cvr_nsb__entry__2}

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

{#serviceorder-GET__table_xcm_cvr_nsb}

### 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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "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.").
{#serviceorder-GET__table_kqy_wgy_fsb__entry__2}

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

{#serviceorder-GET__table_kqy_wgy_fsb} {#serviceorder-GET__table_h4r_fxr_nsb__entry__2}{#serviceorder-GET__content-range-row}{#serviceorder-GET__content-type-row}{#serviceorder-GET__links-pagination-row}{#serviceorder-GET__x-total-count-descr}

| Header | Description |
|-|-|
| Content-Range | 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 {#serviceorder-GET__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]

{#serviceorder-GET__table_h4r_fxr_nsb}

### 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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "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.").
{#serviceorder-GET__table_abf_sn5_4sb__entry__2}{#serviceorder-GET__tmf-get-status-200-p}{#serviceorder-GET__tmf-get-status-206-entry}{#serviceorder-GET__tmf-get-status-400-entry}{#serviceorder-GET__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 {#serviceorder-GET__ul_rys_1gy_fsb} |
| 404 | Record not found. No records matching the query parameters are found in the table. |
[Table 6. Status codes]

{#serviceorder-GET__table_abf_sn5_4sb}

### Response body parameters (JSON) {#serviceorder-GET__section_ilb_1qx_kqb}

{#serviceorder-GET__table_jlb_1qx_kqb__entry__2}{#serviceorder-GET__type-entry-tmf641}

| Name | Description |
|-|-|
| committedDueDate | Date and time when the action must be performed on the order. This value must be the same as or later than the committedDueDate values for each order line item. Data type: String |
| expectedCompletionDate | Date on which the order is to be completed. Data type: String |
| href | Relative link to the resource record. Data type: String Default: Blank string |
| id | Sys_id of the requested service order. Data type: String |
| note | List of additional notes made by the customer when ordering. Data type: Array "note": [ { "author": "String", "date": "String", "text": "String" } ] |
| note.author | User name of the person that authored the associated note. Data type: String |
| note.date | Date that the note was created. Data type: String |
| note.text | Additional notes/comments made by the customer while ordering. Data type: String |
| orderDate | Date and timestamp of the order. Format: YYYY-MM-DD HH:MM:SS Data type: String Default: Blank string |
| ponr | Flag that indicates whether the point of no return for the order has been reached. Valid values: * true: Point of no return for the order has been reached. The order can't be modified or canceled while fulfillment is in progress. * false: Point of no return for the order has not been reached. The order can be modified or canceled. {#serviceorder-GET__d3149e214}Data type: Boolean |
| relatedParty | List of contacts for the order. Data type: Array of Objects "relatedParty": [ { "id": "String", "name": "String", "@referredType": "String", "@type": "String" } ] |
| relatedParty.id | Sys_id or external_id of the account, customer contact, or consumer associated with the order. Located in the Account \[customer_account\], Contact \[customer_contact\] table, or Consumer \[csm_consumer\] table. Data type: String |
| relatedParty.name | Name of the account, customer, or consumer. Data type: String |
| relatedParty.@referredType | Type of customer. Possible values: * Consumer * Customer * CustomerContact {#serviceorder-GET__ul_oc5_dc2_hqb} Data type: String |
| relatedParty.@type | Part of TMF Open API standard. Annotation for order line item contact. This value is always <kbd class="ph userinput">RelatedParty</kbd>. This information is not stored. Data type: String |
| requestedCompletionDate | Delivery date requested by the customer. Data type: String |
| requestedStartDate | Order start date requested by the customer. Data type: String |
| serviceOrderItem | List of line items in the service order and their associated action. "serviceOrderItem:" [ { "action": "String", "actionReason": "String", "committedDueDate": "String", "externalProductInventory": [Array], "id": "String", "orderRelationship": [Array], "quantity": "Number", "place": {Object}, "ponr": Boolean, "relatedParty": {Object}, "service": {Object}, "state": "String", "@type": "String", "version": "String" } ] Data type: Array |
| serviceOrderItem.action | Action to perform on the service order item. Possible actions are defined on the Choice List tab in the Action Dictionary Entry field of the sn_ind_tmt_orm_order_line_item table. For details, see [Action types for customer and service orders](https://www.servicenow.com/docs/access?context=order-mgt-customer-order-types&version=yokohama&pubname=yokohama-order-management&ft:locale=en-US). Data type: String |
| serviceOrderItem.actionReason | Reason for adding the order line item. Data type: String Stored in: The action_reason field of the sn_ind_tmt_orm_order_line_item table. |
| serviceOrderItem.committedDueDate | Date and time when the action must be performed on the order line item. Data type: String |
| serviceOrderItem.externalProductInventory | List of external IDs mapped to the product inventories created for the order. Data type: Array of Objects "externalProductInventory": [ { "externalProductInventoryId": "String" } ] |
| serviceOrderItem.externalProductInventory.externalProductInventoryId | External ID mapped to the product inventory. Data type: String |
| serviceOrderItem.id | Unique identifier of the line item. Located in the sn_ind_tmt_orm_external_id field of the Order Line Item \[sn_ind_tmt_orm_order_line_item\] table. Data type: String |
| serviceOrderItem.orderRelationship | List of the relationships between order line items. Data type: Array "orderRelationship:" [ { "id": "String", "relationshipType": "String" } ] |
| serviceOrderItem.orderRelationship.id | Unique identifier of the related line item. Located in the sn_ind_tmt_orm_external_id field of the Order Line Item \[sn_ind_tmt_orm_order_line_item\] table. Data type: String |
| serviceOrderItem.orderRelationship.relationshipType | Type of relationship between the two line items. This information is used to identify the relationship hierarchy. Possible values: * HasChild * HasParent * Requires {#serviceorder-GET__ul_yqf_2ty_54b} `HasChild` and `HasParent` are used for parent/child relationships. `Requires` is used for horizontal relationships (a line item requires another line item). Data type: String |
| serviceOrderItem.quantity | Number of line items ordered. Data type: Number |
| serviceOrderItem.place | Map of the locations on which to install the service. Data type: Object "place:" { "id": "String", "@type": "String" } |
| serviceOrderItem.place.id | Sys_id of the associated location record in the Location \[cmn_location\] table. Data type: String |
| serviceOrderItem.place.@type | Part of TMF Open API standard. Annotation for order line item contact. This value is always <kbd class="ph userinput">Place</kbd>. This information is not stored. Data type: String |
| serviceOrderItem.ponr | Flag that indicates whether the point of no return for the order line item has been reached. Valid values: * true: Point of no return for the order line item has been reached. The order line item can't be modified or canceled while fulfillment is in progress. * false: Point of no return for the order line item has not been reached. The order line item can be modified or canceled. {#serviceorder-GET__ul_asm_252_gqb}Data type: Boolean |
| serviceOrderItem.relatedParty | List of contacts for line items. Data type: Array "relatedParty:" [ { "email": "String", "firstName": "String" "id": "String", "lastName": "String", "phone": "String", "@referredType": "String", "@type": "String" } ] |
| serviceOrderItem.relatedParty.email | Email address of the contact. Data type: String |
| serviceOrderItem.relatedParty.firstName | First name of the contact. Data type: String |
| serviceOrderItem.relatedParty.id | Sys_id of the line item contact associated with the order line item. Located in the Order Line Item Contact \[sn_ind_tmt_orm_order_line_item_contact\] table. Data type: String |
| serviceOrderItem.relatedParty.lastName | Last name of the contact. Data type: String |
| serviceOrderItem.relatedParty.phone | Business phone number of the contact. Data type: String |
| serviceOrderItem.relatedParty.@referredType | Required. Type of customer. Possible value: OrderLineItemContact Data type: String |
| serviceOrderItem.relatedParty.@type | Part of TMF Open API standard. Annotation for order line item contact. This value is always <kbd class="ph userinput">RelatedParty</kbd>. This information is not stored. Data type: String |
| serviceOrderItem.service | Description of the instance details of the service purchased by the customer. Data type: Object "service:" { "serviceCharacteristic": [Array], "serviceRelationship": [Array], "serviceSpecification": {Object}, "serviceType": "String", "state": "String", "@type": "String" } |
| serviceOrderItem.service.serviceCharacteristic | List that describes the characteristics of the associated service. Only service characteristics with a current value different from the previousValue are returned. Data type: Array of Objects "serviceCharacteristic:" [ { "name": "String", "previousValue": "String", "value": "String", "valueType": "String" } ] |
| serviceOrderItem.service.serviceCharacteristic.value | Characteristic option values associated with the service. For additional information on characteristic option values, see [Create product characteristics and characteristic options](https://www.servicenow.com/docs/access?context=som-product-config-add-characteristics&version=yokohama&pubname=yokohama-order-management&ft:locale=en-US). Data type: String |
| serviceOrderItem.service.serviceCharacteristic.valueType | Type of characteristic value. Data type: String |
| serviceOrderItem.service.serviceRelationship | List of product inventories related to the service. Data type: Array of Objects "serviceRelationship": [ { "id": "String", "relationshipType": "String" } ] |
| serviceOrderItem.service.serviceRelationship.id | Sys_id or sn_prd_invt_external_id of the product inventory. Data type: String Table: In the sys_id or sn_prd_invt_external_id field of the Product Inventory \[sn_prd_invt_product_inventory\] table. |
| serviceOrderItem.service.serviceRelationship.relationshipType | Type of relationship between the service and the product inventory. Possible value: Requires Data type: String |
| serviceOrderItem.service.serviceSpecification | Description of the service specification associated with the service. Data type: Object "serviceSpecification:" { "id": "String", "internalId": "String", "internalVersion": "String", "name": "String", "version": "String", "@type": "String" } |
| serviceOrderItem.service.serviceSpecification.id | Initial_version or external_id of the service specification. The initial_version is the sys_id of the first version of the specification. Located in the sys_id or external_id field of the Service Specification \[sn_prd_pm_service_specification\] table. Data type: String |
| serviceOrderItem.service.serviceSpecification.internalId | Initial version of the service specification. Data type: String Table: In the sys_id field of the Service Specification \[sn_prd_pm_service_specification\] table. |
| serviceOrderItem.service.serviceSpecification.internalVersion | Version of the service specification. Data type: String Table: Service Specification \[sn_prd_pm_service_specification\] |
| serviceOrderItem.service.serviceSpecification.name | Name of the service specification. Located in the Service Specification \[sn_prd_pm_service_specification\] table. Data type: String |
| serviceOrderItem.service.serviceSpecification.version | External_version of the service specification. Data type: String Table: Service Specification \[sn_prd_pm_service_specification\] |
| serviceOrderItem.service.serviceSpecification.@type | Part of the TMF Open API standard. This value is always <kbd class="ph userinput">ServiceSpecificationRef</kbd>. This information is not stored. Data type: String |
| serviceOrderItem.service.serviceType | Service type. Data type: String |
| serviceOrderItem.service.state | State of the sold product. For example, new. Data type: String |
| serviceOrderItem.state | State of the service order item. For example, new. Data type: String |
| serviceOrderItem.version | Service order line item version. Data type: String |
| serviceOrderItem.@type | Part of the TMF Open API standard. This value is always <kbd class="ph userinput">ServiceOrderItem</kbd>. This information is not stored. Data type: String |
| state | State of the service order. For more information, see. Data type: String |
| @type | Part of the TMF Open API standard. This value is always <kbd class="ph userinput">ServiceOrder</kbd>. This information is not stored. Data type: String |
[ ]

{#serviceorder-GET__table_jlb_1qx_kqb}  

### cURL request

This example retrieves all service orders.

    curl --location --request GET 'http://instance.service-now.com/api/sn_tmf_api/order/serviceOrder' \
    --user 'username':'password'

Response body.

    [
        {
            "id": "bd30366ec3a83010abc8b5183c40dd92",
            "ponr": "true",
            "href": "/api/sn_tmf_api/order/serviceOrder/bd30366ec3a83010abc8b5183c40dd92",
            "completionDate": "2021-06-07T21:52:12.000Z",
            "expectedCompletionDate": "2018-01-14T20:07:40.000Z",
            "orderDate": "2021-06-08T05:34:59.000Z",
            "requestedCompletionDate": "2018-01-14T20:07:40.000Z",
            "requestedStartDate": "2018-01-14T20:07:40.000Z",
            "serviceOrderItem": [
                {
                    "id": "100",
                    "ponr": "true",
                    "quantity": 1,
                    "action": "add",
                    "service": {
                        "@type": "Service",
                        "id": "4b5072aec3a83010abc8b5183c40dd42",
                        "state": "active",
                        "serviceType": "cfs",
                        "serviceCharacteristic": [
                            {
                                "name": "Firewall coverage",
                                "valueType": "choice",
                                "value": "Premium(Up to 50 sites)\n\t\t",
                                "previousValue": ""
                            },
                            {
                                "name": "Firewall Security",
                                "valueType": "choice",
                                "value": "Premium",
                                "previousValue": ""
                            },
                            {
                                "name": "CPE Type",
                                "valueType": "choice",
                                "value": "Physical",
                                "previousValue": ""
                            },
                            {
                                "name": "Administration Support",
                                "valueType": "choice",
                                "value": "Basic( Customer Managed)\n\t\t",
                                "previousValue": ""
                            }
                        ],
                        "serviceSpecification": {
                            "id": "f99546ff07266010a7955b7e0ad300a8",
                            "name": "Managed Firewall Service",
                            "version": "",
                            "internalVersion": "1",
                            "internalId": "f99546ff07266010a7955b7e0ad300a8",
                            "@type": "ServiceSpecificationRef"
                        }
                    },
                    "place": {
                        "id": "920cf6ac73d423002728660c4cf6a799",
                        "@type": "Place"
                    },
                    "state": "completed",
                    "version": "2",
                    "@type": "ServiceOrderItem"
                }
            ],
            "relatedParty": [
                {
                    "id": "ffc68911c35420105252716b7d40dd55",
                    "name": "Funco Intl",
                    "@type": "RelatedParty",
                    "@referredType": "Customer"
                },
                {
                    "id": "eaf68911c35420105252716b7d40ddde",
                    "name": "Sally Thomas",
                    "@type": "RelatedParty",
                    "@referredType": "CustomerContact"
                }
            ],
            "state": "completed",
            "version": "2",
            "@type": "ServiceOrder"
        }
    ]

## Service Order Open API -- GET /sn_tmf_api/order/serviceOrder/{id} {#ariaid-title3}

Retrieves a specified service order.
This API retrieves service order information from the following related tables:

* Order \[sn_ind_tmt_orm_order\]
* Order Line Item \[sn_ind_tmt_orm_order_line_item\]
* Order Characteristic Value \[sn_ind_tmt_orm_order_characteristic_value\]
* Order Line Item Contact \[sn_ind_tmt_orm_order_line_item_contact\]
* Order Line Related Items \[sn_ind_tmt_orm_order_line_related_items\]
{#serviceorder-GET-id__ul_lxc_kxm_t4b}

### URL format

/api/sn_tmf_api/order/serviceOrder/{id}

### Supported request parameters

{#serviceorder-GET-id__entry__2}

| Name | Description |
|-|-|
| id | Sys_id of the service order to retrieve. Data type: String Table: Order \[sn_ind_tmt_orm_order\] |
[Table 7. Path parameters]

{#serviceorder-GET-id__entry__6}

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

{#serviceorder-GET-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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "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.").
{#serviceorder-GET-id__table_ed2_jl5_4sb__entry__2}

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

{#serviceorder-GET-id__table_ed2_jl5_4sb} {#serviceorder-GET-id__table_tzy_thy_ksb__entry__2}

| Header | Description |
|-|-|
| Content-Type | Data format of the response body. Only supports application/json. |
[Table 11. Response headers]

{#serviceorder-GET-id__table_tzy_thy_ksb}

### 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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "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.").
{#serviceorder-GET-id__table_n5s_hjm_gqb__entry__2}{#serviceorder-GET-id__entry-404-status-code}

| Status code | Description |
|-|-|
| 200 | Request successfully processed. Full resource returned in response (no pagination). The response returns successful with an error message if the selected order has processing issues. * A 200 OK response happens if the order is in the Inbound Queue \[sn_tmt_core_inbound_queue\] table waiting for the scheduler to pick the record to be processed. The error message field includes details for the record. For example: { "code": 102, "reason": "Request in queue", "message": "Request in queue", "details": [ { "message": "This Order is still in the inbound queue table waiting to be processed.", "datapath": "" } ] } * A 200 OK response happens if an order creation fails and the record in the Inbound Queue \[sn_tmt_core_inbound_queue\] table is in an error state. The error message field includes details in for the inbound queue table record. For example: { "code": 23, "reason": "Missing body field", "message": "Missing body field", "details": [ { "message": "Invalid payload: orderCurrency is missing", "datapath": "/" } ] } {#serviceorder-GET-id__ul_kdw_y4w_fwb} |
| 400 | Bad request. Possible reasons: * Missing query parameter * Invalid URI {#serviceorder-GET-id__ul_o5s_hjm_gqb} |
| 404 | Not found. The requested item wasn't found. |
[Table 12. Status codes]

{#serviceorder-GET-id__table_n5s_hjm_gqb}

### Response body parameters (JSON) {#serviceorder-GET-id__section_ilb_1qx_kqb}

{#serviceorder-GET-id__table_jlb_1qx_kqb__entry__2}{#serviceorder-GET-id__type-entry-tmf641}

| Name | Description |
|-|-|
| committedDueDate | Date and time when the action must be performed on the order. This value must be the same as or later than the committedDueDate values for each order line item. Data type: String |
| expectedCompletionDate | Date on which the order is to be completed. Data type: String |
| id | Sys_id of the requested service order. Data type: String |
| href | Relative link to the resource record. Data type: String Default: Blank string |
| note | List of additional notes made by the customer when ordering. Data type: Array "note": [ { "author": "String", "date": "String", "text": "String" } ] |
| note.author | User name of the person that authored the associated note. Data type: String |
| note.date | Date that the note was created. Data type: String |
| note.text | Additional notes/comments made by the customer while ordering. Data type: String |
| orderDate | Date and timestamp of the order. Format: YYYY-MM-DD HH:MM:SS Data type: String Default: Blank string |
| ponr | Flag that indicates whether the point of no return for the order has been reached. Valid values: * true: Point of no return for the order has been reached. The order can't be modified or canceled while fulfillment is in progress. * false: Point of no return for the order has not been reached. The order can be modified or canceled. {#serviceorder-GET-id__d3149e214}Data type: Boolean |
| relatedParty | List of contacts for the order. Data type: Array of Objects "relatedParty": [ { "id": "String", "name": "String", "@referredType": "String", "@type": "String" } ] |
| relatedParty.id | Sys_id or external_id of the account, customer contact, or consumer associated with the order. Located in the Account \[customer_account\], Contact \[customer_contact\] table, or Consumer \[csm_consumer\] table. Data type: String |
| relatedParty.name | Name of the account, customer, or consumer. Data type: String |
| relatedParty.@referredType | Type of customer. Possible values: * Consumer * Customer * CustomerContact {#serviceorder-GET-id__ul_oc5_dc2_hqb} Data type: String |
| relatedParty.@type | Part of TMF Open API standard. Annotation for order line item contact. This value is always <kbd class="ph userinput">RelatedParty</kbd>. This information is not stored. Data type: String |
| requestedCompletionDate | Delivery date requested by the customer. Data type: String |
| requestedStartDate | Order start date requested by the customer. Data type: String |
| serviceOrderItem | List of line items in the service order and their associated action. Data type: Array "serviceOrderItem:" [ { "action": "String", "actionReason": "String", "committedDueDate": "String", "externalProductInventory": [Array], "id": "String", "orderRelationship": [Array], "quantity": "Number", "place": {Object}, "ponr": Boolean, "relatedParty": {Object}, "service": {Object}, "state": "String", "@type": "String", "version": "String" } ] |
| serviceOrderItem.action | Action to perform on the service order item. Possible actions are defined on the Choice List tab in the Action Dictionary Entry field of the sn_ind_tmt_orm_order_line_item table. For details, see [Action types for customer and service orders](https://www.servicenow.com/docs/access?context=order-mgt-customer-order-types&version=yokohama&pubname=yokohama-order-management&ft:locale=en-US) Data type: String |
| serviceOrderItem.actionReason | Reason for adding the order line item. Data type: String Stored in: The action_reason field of the sn_ind_tmt_orm_order_line_item table. |
| serviceOrderItem.committedDueDate | Date and time when the action must be performed on the order line item. Data type: String |
| serviceOrderItem.externalProductInventory | List of external IDs mapped to the product inventories created for the order. Data type: Array of Objects "externalProductInventory": [ { "externalProductInventoryId": "String" } ] |
| serviceOrderItem.externalProductInventory.externalProductInventoryId | External ID mapped to the product inventory. Data type: String |
| serviceOrderItem.id | Unique identifier of the line item. Located in the sn_ind_tmt_orm_external_id field of the Order Line Item \[sn_ind_tmt_orm_order_line_item\] table. Data type: String |
| serviceOrderItem.orderRelationship | List of the relationships between order line items. Data type: Array of Objects "orderRelationship:" [ { "id": "String", "relationshipType": "String" } ] |
| serviceOrderItem.orderRelationship.id | Unique identifier of the related line item. Located in the sn_ind_tmt_orm_external_id field of the Order Line Item \[sn_ind_tmt_orm_order_line_item\] table. Data type: String |
| serviceOrderItem.orderRelationship.relationshipType | Type of relationship between the two line items. This information is used to identify the relationship hierarchy. Possible values: * HasChild * HasParent * Requires {#serviceorder-GET-id__ul_yqf_2ty_54b} `HasChild` and `HasParent` are used for parent/child relationships. `Requires` is used for horizontal relationships (a line item requires another line item). Data type: String |
| serviceOrderItem.quantity | Number of line items ordered. Data type: Number |
| serviceOrderItem.place | Map of the locations on which to install the service. Data type: Object "place:" { "id": "String", "@type": "String" } |
| serviceOrderItem.place.id | Sys_id of the associated location record in the Location \[cmn_location\] table. Data type: String |
| serviceOrderItem.place.@type | Part of TMF Open API standard. Annotation for order line item contact. This value is always <kbd class="ph userinput">Place</kbd>. This information is not stored. Data type: String |
| serviceOrderItem.ponr | Flag that indicates whether the point of no return for the order line item has been reached. Valid values: * true: Point of no return for the order line item has been reached. The order line item can't be modified or canceled while fulfillment is in progress. * false: Point of no return for the order line item has not been reached. The order line item can be modified or canceled. {#serviceorder-GET-id__ul_asm_252_gqb}Data type: Boolean |
| serviceOrderItem.relatedParty | List of contacts for line items. Data type: Array "relatedParty:" { "email": "String", "firstName": "String" "id": "String", "lastName": "String", "phone": "String", "@referredType": "String", "@type": "String" } |
| serviceOrderItem.relatedParty.email | Email address of the contact. Data type: String |
| serviceOrderItem.relatedParty.firstName | First name of the contact. Data type: String |
| serviceOrderItem.relatedParty.id | Sys_id of the line item contact associated with the order line item. Located in the Order Line Item Contact \[sn_ind_tmt_orm_order_line_item_contact\] table. Data type: String |
| serviceOrderItem.relatedParty.lastName | Last name of the contact. Data type: String |
| serviceOrderItem.relatedParty.phone | Business phone number of the contact. Data type: String |
| serviceOrderItem.relatedParty.@referredType | Required. Type of customer. Possible value: OrderLineItemContact Data type: String |
| serviceOrderItem.relatedParty.@type | Part of TMF Open API standard. Annotation for order line item contact. This value is always <kbd class="ph userinput">RelatedParty</kbd>. This information is not stored. Data type: String |
| serviceOrderItem.service | Description of the instance details of the service purchased by the customer. Data type: Object "service:" { "serviceCharacteristic": [Array], "serviceRelationship": [Array], "serviceSpecification": {Object}, "serviceType": "String", "state": "String", "@type": "String" } |
| serviceOrderItem.service.serviceCharacteristic | List that describes the characteristics of the associated service. Only service characteristics with a current value different from the previousValue are returned. Data type: Array "serviceCharacteristic:" [ { "name": "String", "previousValue": "String", "value": "String", "valueType": "String" } ] |
| serviceOrderItem.service.serviceCharacteristic.value | Characteristic option values associated with the service. For additional information on characteristic option values, see [Create product characteristics and characteristic options](https://www.servicenow.com/docs/access?context=som-product-config-add-characteristics&version=yokohama&pubname=yokohama-order-management&ft:locale=en-US). Data type: String |
| serviceOrderItem.service.serviceCharacteristic.valueType | Type of characteristic value. Data type: String |
| serviceOrderItem.service.serviceRelationship | List of product inventories related to the service. Data type: Array of Objects "serviceRelationship": [ { "id": "String", "relationshipType": "String" } ] |
| serviceOrderItem.service.serviceRelationship.id | Sys_id or sn_prd_invt_external_id of the product inventory. Data type: String Table: In the sys_id or sn_prd_invt_external_id field of the Product Inventory \[sn_prd_invt_product_inventory\] table. |
| serviceOrderItem.service.serviceRelationship.relationshipType | Type of relationship between the service and the product inventory. Possible value: Requires Data type: String |
| serviceOrderItem.service.serviceSpecification | Description of the service specification associated with the service. Data type: Object "serviceSpecification:" { "id": "String", "internalId": "String", "internalVersion": "String", "name": "String", "version": "String", "@type": "String" } |
| serviceOrderItem.service.serviceSpecification.id | Initial_version or external_id of the service specification. The initial_version is the sys_id of the first version of the specification. Located in the sys_id or external_id field of the Service Specification \[sn_prd_pm_service_specification\] table. Data type: String |
| serviceOrderItem.service.serviceSpecification.internalId | Initial version of the service specification. Data type: String Table: In the sys_id field of the Service Specification \[sn_prd_pm_service_specification\] table. |
| serviceOrderItem.service.serviceSpecification.internalVersion | Version of the service specification. Data type: String Table: Service Specification \[sn_prd_pm_service_specification\] |
| serviceOrderItem.service.serviceSpecification.name | Name of the service specification. Located in the Service Specification \[sn_prd_pm_service_specification\] table. Data type: String |
| serviceOrderItem.service.serviceSpecification.version | External_version of the service specification. Data type: String Table: Service Specification \[sn_prd_pm_service_specification\] |
| serviceOrderItem.service.serviceSpecification.@type | Part of the TMF Open API standard. This value is always <kbd class="ph userinput">ServiceSpecificationRef</kbd>. This information is not stored. Data type: String |
| serviceOrderItem.service.serviceType | Service type. Data type: String |
| serviceOrderItem.service.state | State of the sold product. For example, new. Data type: String |
| serviceOrderItem.state | State of the service order item. For example, new. Data type: String |
| serviceOrderItem.version | Service order line item version. Data type: String |
| serviceOrderItem.@type | Part of the TMF Open API standard. This value is always <kbd class="ph userinput">ServiceOrderItem</kbd>. This information is not stored. Data type: String |
| state | State of the service order. For more information, see. Data type: String |
| @type | Part of the TMF Open API standard. This value is always <kbd class="ph userinput">ServiceOrder</kbd>. This information is not stored. Data type: String |
[ ]

{#serviceorder-GET-id__table_jlb_1qx_kqb}  

### cURL request

The following example retrieves a specified service order.

    curl "https://instance.service-now.com/api/sn_tmf_api/order/serviceOrder/4f2af65ac3a030106e2473ce3640ddcf" \
    --request GET \
    --user 'username':'password'

Response body.

    {
       "id": "4f2af65ac3a030106e2473ce3640ddcf",
       "ponr": "false",
       "expectedCompletionDate": "2018-01-15T09:37:40.000Z",
       "requestedCompletionDate": "2018-01-15T09:37:40.000Z",
       "requestedStartDate": "2018-01-15T09:37:40.000Z",
       "note": [
          {
             "author": "System Administrator",
             "date": "2021-06-07T14:53:04.000Z",
             "text": "This is a TMF service order illustration no 2"
          },
          {
             "author": "System Administrator",
             "date": "2021-06-07T14:53:03.000Z",
             "text": "This is a TMF service order illustration"
          }
       ],
       "serviceOrderItem": [
          {
             "id": "100",
             "ponr": "false",
             "action": "add",
             "actionReason": "adding service package OLI",
             "quantity": 1,
             "service": {
                "@type": "Service",
                "state": "",
                "serviceType": "cfs",
                "serviceCharacteristic": [
                   {
                      "name": "Firewall coverage",
                      "valueType": "choice",
                      "value": "Premium (Up to 50 sites)",
                      "previousValue": ""
                   },
                   {
                      "name": "Firewall Security",
                      "valueType": "choice",
                      "value": "Standard",
                      "previousValue": ""
                   },
                   {
                      "name": "Administration Support",
                      "valueType": "choice",
                      "value": "Basic (Customer Managed)",
                      "previousValue": ""
                   }
                ],
                "serviceRelationship": [
                   {
                      "id": "326d13f45b5620102dff5e92dc81c785",
                      "relationshipType": "Requires"
                   }
                ],
                "serviceSpecification": {
                   "id": "f99546ff07266010a7955b7e0ad300a8",
                   "name": "Managed Firewall Service",
                   "version": "v2",
                   "internalVersion": "2",
                   "internalId": "f99546ff07266010a7955b7e0ad300a8",
                   "@type": "ServiceSpecificationRef"
                }
             },
             "place": {
                "id": "920cf6ac73d423002728660c4cf6a799",
                "@type": "Place"
             },
             "relatedParty": [
                {
                   "id": "972af65ac3a030106e2473ce3640ddda",
                   "firstName": "Mike",
                   "lastName": "Hudson",
                   "email": "mike@example.com",
                   "phone": "1234567890",
                   "@type": "RelatedParty",
                   "@referredType": "OrderLineItemContact"
                }
             ],
             "state": "new",
             "version": "1",
             "@type": "ServiceOrderItem"
          }
       ],
       "relatedParty": [
            {
                "id": "eaf68911c35420105252716b7d40ddde",
                "name": "Sally Thomas",
                "@type": "RelatedParty",
                "@referredType": "CustomerContact"
            },
            {
                "id": "ffc68911c35420105252716b7d40dd55",
                "name": "Funco Intl",
                "@type": "RelatedParty",
                "@referredType": "Customer"
            },
            {
                "id": "59f16de1c3b67110ff00ed23a140dd9e",
                "name": "Funco External",
                "@type": "RelatedParty",
                "@referredType": "Consumer"
            }
        ],
       "state": "new",
       "version": "1",
       "@type": "ServiceOrder"
       "href": "/api/sn_tmf_api/order/serviceOrder/4f2af65ac3a030106e2473ce3640ddcfç",
       "orderDate": "2021-06-08T05:34:59.000Z",
    }

## Service Order Open API - PATCH /sn_tmf_api/order/serviceOrder/{id} {#ariaid-title4}

Updates the specified service order.

### URL format

Default URL: /api/sn_tmf_api/order/serviceOrder/{id}

### Supported request parameters

{#serviceorder-PATCH-serviceOrder-id__entry__2}

| Name | Description |
|-|-|
| id | Sys_id of the customer order to update. Data type: String Table: Customer Order \[sn_ind_tmt_orm_order\] |
[Table 13. Path parameters]

{#serviceorder-PATCH-serviceOrder-id__entry__6}

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

{#serviceorder-PATCH-serviceOrder-id__table_m32_1l1_hwb__entry__2}{#serviceorder-PATCH-serviceOrder-id__svcOrdItem-ph-tmf641-externalid}{#serviceorder-PATCH-serviceOrder-id__note-ph-tmf622}{#serviceorder-PATCH-serviceOrder-id__note_text-ph-tmf622}{#serviceorder-PATCH-serviceOrder-id__requestedCompletionDate-ph-tmf622}{#serviceorder-PATCH-serviceOrder-id__reqStartDate-ph-tmf622}{#serviceorder-PATCH-serviceOrder-id__svcOrdItem-ph-tmf641}{#serviceorder-PATCH-serviceOrder-id__service_id-ph-tmf641}{#serviceorder-PATCH-serviceOrder-id__svcOrderItemRel_id-ph-tmf641}{#serviceorder-PATCH-serviceOrder-id__productOrderItemRelationship_relType-row-tmf622}{#serviceorder-PATCH-serviceOrder-id__service-s-tmf641}

| Name | Description |
|-|-|
| committedDueDate | Date and time when the action must be performed on the order. This value must be the same as or later than the committedDueDate values for each order line item. If the action for order line items is <kbd class="ph userinput">suspend</kbd> or <kbd class="ph userinput">resume</kbd>, this parameter can't be updated. Data type: String Stored in: The committed_due_date field of the sn_ind_tmt_orm_order table. |
| externalId | Unique order number for the external service order. Data type: String Table/field updated: sn_ind_tmt_orm_order |
| note | List of additional notes made by the customer when ordering. Data type: Array of Objects{#serviceorder-PATCH-serviceOrder-id__note_data_type-p-tmf622} "note": [ { "text": "String" } ] {#serviceorder-PATCH-serviceOrder-id__note-codeblock-tmf622} Stored in: sn_ind_tmt_orm_order |
| note.text | Additional notes/comments made by the customer while ordering. Data type: String{#serviceorder-PATCH-serviceOrder-id__note_text_data_type-p-tmf622} Stored in: The comments field of the sn_ind_tmt_orm_order table. Default: Blank string |
| relatedParty | List of contacts for the order. Each contact is an object in the array. The request must list at least one item which contains customer account or consumer account information. Data type: Array "relatedParty": [ { "id": "String", "name": "String", "@referredType": "String", "@type": "String" } ] |
| relatedParty.id | Required. Sys_id or external_id of the account, customer contact, or consumer associated with the order. Data type: String Table: Account \[customer_account\] table, Contact \[customer_contact\] table, or Consumer \[csm_consumer\] Table updated: sn_ind_tmt_orm_order |
| relatedParty.name | Name of the account, customer, or consumer. Data type: String |
| relatedParty.@referredType | Type of customer. Possible values: * Consumer * Customer * CustomerContact {#serviceorder-PATCH-serviceOrder-id__ul_cdn_ddp_kqb} Data type: String |
| relatedParty.@type | Part of TMF Open API standard. Annotation for order line item contact. This value is always <kbd class="ph userinput">RelatedParty</kbd>. This information is not stored. Data type: String |
| requestedCompletionDate | Delivery date requested by the customer. Data type: String{#serviceorder-PATCH-serviceOrder-id__reqCompDate_data_type-p-tmf622} Stored in: The expected_end_date field of the sn_ind_tmt_orm_order table. Default: Blank string |
| requestedStartDate | Order start date requested by the customer. Data type: String{#serviceorder-PATCH-serviceOrder-id__reqStartDate_data_type-p-tmf622} Stored in: The expected_start_date field of the sn_ind_tmt_orm_order table. Default: Blank string |
| serviceOrderItem | Required. List of line items in the service order and their associated action. Data type: Array of Objects{#serviceorder-PATCH-serviceOrder-id__svcOrdItem_data_type-p-tmf641} "serviceOrderItem:" [ { "action": "String", "actionReason": "String", "committedDueDate": "String", "externalProductInventory": [Array], "id": "String", "orderRelationship": [Array], "place": {Object}, "quantity": "Number", "relatedParty": {Object}, "service": {Object}, "@type": "String", "version": "String" } ] {#serviceorder-PATCH-serviceOrder-id__svcOrdItem-codeblock-tmf641} Table/field updated: sn_ind_tmt_orm_order_line_item |
| serviceOrderItem.action | Required. Action to perform on the service order item. Possible actions are defined on the Choice List tab in the Action Dictionary Entry field of the sn_ind_tmt_orm_order_line_item table. Possible values: * add * change * delete * no-change * resume * suspend {#serviceorder-PATCH-serviceOrder-id__ul_grg_vgl_gqb}For details, see [Action types for customer and service orders](https://www.servicenow.com/docs/access?context=order-mgt-customer-order-types&version=yokohama&pubname=yokohama-order-management&ft:locale=en-US). Data type: String Table/field updated: sn_ind_tmt_orm_order_line_item/action |
| serviceOrderItem.actionReason | Optional. Description of the reason for the line item. Data type: String Table/field updated: Order Line Item \[sn_ind_tmt_orm_order_line_item\] table/action_reason. |
| serviceOrderItem.committedDueDate | Date and time when the action must be performed on the order line item. If the action for the item is <kbd class="ph userinput">suspend</kbd> or <kbd class="ph userinput">resume</kbd>, this parameter can't be updated. Data type: String Stored in: The committed_due_date field of the sn_ind_tmt_orm_order_line_item table. |
| serviceOrderItem.externalProductInventory | List of external IDs to map to the product inventories created for the order. Data type: Array of Objects "externalProductInventory": [ { "externalProductInventoryId": "String" } ] Note: Previously, when creating a PATCH order with an external product inventory ID that already existed, the operation was aborted and returned an error. With the Xanadu release, this parameter is simply ignored when an existing external product inventory ID is supplied and an error is not thrown. |
| serviceOrderItem.externalProductInventory.externalProductInventoryId | External ID to map to the product inventory. Data type: String Stored in: The external_inventory_id field of the Order Line Item \[sn_ind_tmt_orm_order_line_item\] table and the sn_prd_invt_external_id field of the sn_prd_invt_product_inventory table. |
| serviceOrderItem.id | Required. Unique identifier of the line item. Located in the sn_ind_tmt_orm_external_id field of the Order Line Item \[sn_ind_tmt_orm_order_line_item\] table. Data type: String Table/field updated: sn_ind_tmt_orm_order_line_item/external_id |
| serviceOrderItem.orderRelationship | Required. List of relationships between order line items. Data type: Array of Objects "orderRelationship:" [ { "id": "String", "relationshipType": "String" } ] {#serviceorder-PATCH-serviceOrder-id__svcOrderItemRel-codeblock} Table/field updated: sn_ind_tmt_orm_order_line_item |
| serviceOrderItem.orderRelationship.id | Required. Unique identifier of the related line item. Located in the sn_ind_tmt_orm_external_id field of the Order Line Item \[sn_ind_tmt_orm_order_line_item\] table. Data type: String Table/field updated: sn_ind_tmt_orm_order_line_item/parent_line_item or sn_ind_tmt_orm_order_line_related_items/related_order_line_item |
| serviceOrderItem.orderRelationship.relationshipType | Required. Type of relationship between the two line items. This information is used to identify the relationship hierarchy. Possible values: * HasChild * HasParent * Requires {#serviceorder-PATCH-serviceOrder-id__ul_yqf_2ty_54b} `HasChild` and `HasParent` are used for parent/child relationships. `Requires` is used for horizontal relationships (a line item requires another line item). Data type: String |
| serviceOrderItem.place | Map of the locations on which to install the service. Data type: Object "place:" { "id": "String", "@type": "String" } |
| serviceOrderItem.place.id | Required. Sys_id of the associated location record in the Location \[cmn_location\] table. Data type: String Table/field updated: sn_ind_tmt_orm_order_line_item/location |
| serviceOrderItem.place.@type | Part of TMF Open API standard. Annotation for order line item place. Data type: String |
| serviceOrderItem.quantity | Sets the number of line items to order. This property is only applicable when adding a service order; that is, the value of the action property is `add`. Data type: Number Default: Empty string Table/field updated: sn_ind_tmt_orm_order/quantity |
| serviceOrderItem.relatedParty | List of contacts for line items. Data type: Array "relatedParty:" { "email": "String", "firstName": "String", "lastName": "String", "phone": "String", "@referredType": "String", "@type": "String" } |
| serviceOrderItem.relatedParty.email | Email address of the contact. Data type: String |
| serviceOrderItem.relatedParty.firstName | First name of the contact. Data type: String |
| serviceOrderItem.relatedParty.lastName | Last name of the contact. Data type: String |
| serviceOrderItem.relatedParty.phone | Business phone number of the contact. Data type: String |
| serviceOrderItem.relatedParty.@referredType | Required. Type of customer. Possible value: OrderLineItemContact Data type: String |
| serviceOrderItem.relatedParty.@type | Part of TMF Open API standard. Annotation for order line item contact. This value is always <kbd class="ph userinput">RelatedParty</kbd>. This information is not stored. Data type: String |
| serviceOrderItem.service | Required. Description of the instance details of the service purchased by the customer. Data type: Object "service:" { "id": "String", "serviceCharacteristic": [Array], "serviceRelationship": [Array], "serviceSpecification": {Object}, "@type": "String" } {#serviceorder-PATCH-serviceOrder-id__service-codeblock-tmf641} Table/field updated: sn_ind_tmt_orm_order_line_item |
| serviceOrderItem.service.id | Unique identifier of the service sold. This value can be the sys_id or external ID in the Product Inventory \[sn_ind_tmt_orm_product_inventory\] table. This value is only used for change/disconnect orders. Data type: String |
| serviceOrderItem.service.serviceCharacteristic | List that describes the characteristics of the associated service. Only service characteristics with a current value different from the previousValue are returned. Data type: Array "serviceCharacteristic:" [ { "name": "String", "previousValue": "String", "value": "String", } ] |
| serviceOrderItem.service.serviceCharacteristic.name | Name of the characteristic record to associated with the service. Located in the Characteristic \[sn_prd_pm_characteristic\] table. Data type: String |
| serviceOrderItem.service.serviceCharacteristic.previousValue | Previous characteristic option values if the update is for change order. The request is a change order if the serviceOrderItem.action parameter is other than <kbd class="ph userinput">add</kbd>. For additional information on characteristic option values, see[Create product characteristics and characteristic options](https://www.servicenow.com/docs/access?context=som-product-config-add-characteristics&version=yokohama&pubname=yokohama-order-management&ft:locale=en-US). Data type: String |
| serviceOrderItem.service.serviceCharacteristic.value | Characteristic option values associated with the service. For additional information on characteristic option values, see [Create product characteristics and characteristic options](https://www.servicenow.com/docs/access?context=som-product-config-add-characteristics&version=yokohama&pubname=yokohama-order-management&ft:locale=en-US). Data type: String |
| serviceOrderItem.service.serviceSpecification | Required. Description of the service specification associated with the service. Note: Change orders (serviceOrderItem.action is `change`) are processed differently based on the value of the sn_ind_tmt_orm.allowSpecVersionUpdateInChangeOrder system property. * When the property is set to true (default), if the service is a different version than indicated in the order, the service is automatically upgraded to the version in the order by changing the referenced service specification. This allows the order to be successfully processed. * When the property is set to false, if the service is a different version than indicated in the order, the order fails due to the version mismatch. {#serviceorder-PATCH-serviceOrder-id__ul_zbw_sdz_dbc} Data type: Object "serviceSpecification:" { "id": "String", "name": "String", "@type": "String" } Stored in: The service_specification field of the Order Line Item \[sn_ind_tmt_orm_order_line_item\] table. |
| serviceOrderItem.service.serviceSpecification.id | Required. Initial_version or external_id of the service specification. The initial_version is the sys_id of the first version of the specification. Located in the sys_id or external_id field of the Service Specification \[sn_prd_pm_service_specification\] table. Data type: String |
| serviceOrderItem.service.serviceSpecification.name | Required. Name of the service specification. Located in the Service Specification \[sn_prd_pm_service_specification\] table. Data type: String |
| serviceOrderItem.service.serviceSpecification.@type | Part of the TMF Open API standard. This value is always <kbd class="ph userinput">ServiceSpecificationRef</kbd>. This information is not stored. Data type: String |
| serviceOrderItem.@type | Part of the TMF Open API standard. This value is always <kbd class="ph userinput">ServiceOrderItem</kbd>. This information is not stored. Data type: String |
| @type | Part of the TMF Open API standard. This value is always <kbd class="ph userinput">ServiceOrder</kbd>. This information is not stored. Data type: String |
[Table 15. Request body parameters (JSON)]

{#serviceorder-PATCH-serviceOrder-id__table_m32_1l1_hwb}

### 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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "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.").
{#serviceorder-PATCH-serviceOrder-id__table_omb_dvk_5rb__entry__2}{#serviceorder-PATCH-serviceOrder-id__accept-JSON-only-entry-RESTAPI}{#serviceorder-PATCH-serviceOrder-id__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 16. Request headers]

{#serviceorder-PATCH-serviceOrder-id__table_omb_dvk_5rb} {#serviceorder-PATCH-serviceOrder-id__table_tzy_thy_ksb__entry__2}

| Header | Description |
|-|-|
| Content-Type | Data format of the response body. Only supports application/json. |
[Table 17. Response headers]

{#serviceorder-PATCH-serviceOrder-id__table_tzy_thy_ksb}

### 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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "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.").
{#serviceorder-PATCH-serviceOrder-id__table_xfv_2vk_5rb__entry__2}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 201 | Successful. If there are any issues with the characteristics or characteristics option information, the endpoint stores the following comments in the work notes fields of the associated Customer Order Line Item record: * The following Order Item characteristics does not exist: Review specification \<specification.name\> and correct the characteristic and characteristic option in the order line item prior to approving the order. * Order Item characteristic: \<characteristic.name\> with characteristic value: \<characteristic.value\>is invalid. Correct the characteristic values before approving the order. {#serviceorder-PATCH-serviceOrder-id__ul_xtx_xym_t4b} |
| 400 | Bad Request. Could be any of the following reasons: * Invalid payload: Request body missing - Payload was not passed in the request body. * Invalid payload: serviceOrderItem is missing - Service order line item object or JSON is missing. * Invalid payload: serviceOrderItem id is missing - The id parameter is missing in the service order line item of the payload. * Invalid payload: serviceOrderItem action is missing - The action parameter is missing in the service order line item of the payload. * Invalid payload: serviceOrderItem serviceOffering is missing - The service offering object or JSON is missing from the service order line item in the payload. * Invalid payload: serviceOffering id is missing - The id parameter is missing in the service order line item of the service offering object in the payload. * Invalid payload: Service offering does not exist - The service offering in the service order line item is not valid. * Invalid payload: serviceOrderItem service is missing - The service object or JSON in the service order line item is missing from the payload. * Invalid payload: service serviceSpecification is missing - The service specification object or JSON in the service order line item is missing from the payload. * Invalid payload: serviceSpecification id is missing - The id parameter in the service order line item of the service specification object is missing from the payload. * Invalid payload: Service specification does not exist - The service specification in the service order line item is not valid. * Invalid payload: Service Inventory does not exist - In a change order (action = change), the quantity of an item is greater than what is in stock. * Invalid payload: Service inventory ID is missing - In a change order, the service.id is missing in the payload. * Invalid payload: Sold Service is inactive - In a change order, a service specified in the payload is inactive. * Invalid payload: relatedParty is missing - The related party object is missing from the payload. * Invalid payload: Customer Account or Consumer is missing - The related party customer or consumer object is missing from the payload. * Invalid payload: Customer Account does not exist - The specified related party customer does not exist in the instance. * Invalid payload: Consumer does not exist - The specified related party consumer does not exist in the instance. * Invalid payload: Order creation failed - Not able to create the requested order. * In-flight revision to order currency not supported - The orderCurrency parameter can't be updated after the order is created. * This order is yet to be created in customer order table. Please check in inbound queue for more details. -- The order ID provided is not in the customer order table. * Patch request cannot be made as the order's fulfillment type is not 'deliver. -- The patch request was made on an order which has a fulfillment type other than deliver. {#serviceorder-PATCH-serviceOrder-id__ul_g2v_rzm_t4b} |
| 404 | Not found. The requested item was not found. |
[Table 18. Status codes]

{#serviceorder-PATCH-serviceOrder-id__table_xfv_2vk_5rb}

### Response body parameters (JSON) {#serviceorder-PATCH-serviceOrder-id__section_b1v_xpk_5rb}

{#serviceorder-PATCH-serviceOrder-id__table_t5s_hm1_hwb__entry__2}

| Name | Description |
|-|-|
| committedDueDate | Date and time when the action must be performed on the order. This value must be the same as or later than the committedDueDate values for each order line item. Data type: String |
| externalId | Unique order number for the external service order. Data type: String |
| href | Relative link to the resource record. Data type: String Default: Blank string |
| id | Sys_id of the service order. Data type: String |
| note | List of additional notes made by the customer when ordering. Data type: Array "note": [ { "text": "String" } ] |
| note.text | Additional notes/comments made by the customer while ordering. Data type: String |
| orderDate | Date and timestamp of the order. Format: YYYY-MM-DD HH:MM:SS Data type: String Default: Blank string |
| relatedParty | List of contacts for the order. Data type: Array of Objects "relatedParty": [ { "id": "String", "name": "String", "@referredType": "String", "@type": "String" } ] |
| relatedParty.id | Sys_id or external_id of the account, customer or consumer contact associated with the order. Located in the Account \[customer_account\], Contact \[customer_contact\], or Consumer \[csm_consumer\] table. Data type: String |
| relatedParty.name | Name of the account, customer, or consumer. Data type: String |
| relatedParty.@referredType | Type of customer. Possible values: * Customer * CustomerContact * Consumer {#serviceorder-PATCH-serviceOrder-id__ul_vvn_12p_kqb} Data type: String |
| relatedParty.@type | Part of TMF Open API standard. Annotation for order line item contact. This value is always <kbd class="ph userinput">RelatedParty</kbd>. This information is not stored. Data type: String |
| requestedCompletionDate | Delivery date requested by the customer. Data type: String |
| requestedStartDate | Order start date requested by the customer. Data type: String |
| serviceOrderItem | List of line items in the service order and their associated action. Data type: Array "serviceOrderItem:" [ { "action": "String", "actionReason": "String", "committedDueDate": "String", "externalProductInventory": [Array], "id": "String", "orderRelationship": [Array], "place": {Object}, "quantity": "Number", "relatedParty": {Object}, "service": {Object}, "@type": "String", "version": "String" } ] |
| serviceOrderItem.action | Action to perform on the service order item. Possible actions are defined on the Choice List tab in the Action Dictionary Entry field of the sn_ind_tmt_orm_order_line_item table. Possible values: * add * change * delete {#serviceorder-PATCH-serviceOrder-id__ul_t4n_rqx_kqb}For details, see [Action types for customer and service orders](https://www.servicenow.com/docs/access?context=order-mgt-customer-order-types&version=yokohama&pubname=yokohama-order-management&ft:locale=en-US). Data type: String |
| serviceOrderItem.actionReason | Reason for adding the order line item. Data type: String Stored in: The action_reason field of the sn_ind_tmt_orm_order_line_item table. |
| serviceOrderItem.committedDueDate | Date and time when the action must be performed on the order line item. Data type: String |
| serviceOrderItem.externalProductInventory | List of external IDs to map to the product inventories created for the order. Data type: Array of Objects "externalProductInventory": [ { "externalProductInventoryId": "String" } ] Note: Previously, when creating a PATCH order with an external product inventory ID that already existed, the operation was aborted and returned an error. With the Xanadu release, this parameter is simply ignored when an existing external product inventory ID is supplied and an error is not thrown. |
| serviceOrderItem.externalProductInventory.externalProductInventoryId | External ID mapped to the product inventory. Data type: String |
| serviceOrderItem.id | Unique identifier of the line item. Located in the sn_ind_tmt_orm_external_id field of the Order Line Item \[sn_ind_tmt_orm_order_line_item\] table. Data type: String |
| serviceOrderItem.orderRelationship | List of the relationships between order line items. Data type: Array "orderRelationship:" [ { "id": "String", "relationshipType": "String" } ] |
| serviceOrderItem.orderRelationship.id | Unique identifier of the related line item. Located in the sn_ind_tmt_orm_external_id field of the Order Line Item \[sn_ind_tmt_orm_order_line_item\] table. Data type: String |
| serviceOrderItem.orderRelationship.relationshipType | Type of relationship between the two line items. This information is used to identify the relationship hierarchy. Possible values: * HasChild * HasParent * Requires {#serviceorder-PATCH-serviceOrder-id__d3148e2316} `HasChild` and `HasParent` are used for parent/child relationships. `Requires` is used for horizontal relationships (a line item requires another line item). Data type: String |
| serviceOrderItem.place | Map of the locations on which to install the service. Data type: Object "place:" { "id": "String", "@type": "String" } |
| serviceOrderItem.place.id | Sys_id of the associated location record in the Location \[cmn_location\] table. Data type: String |
| serviceOrderItem.place.@type | Part of TMF Open API standard. Annotation for order line item contact. This value is always <kbd class="ph userinput">Place</kbd>. This information is not stored. Data type: String |
| serviceOrderItem.quantity | Number of line items ordered. Data type: Number |
| serviceOrderItem.relatedParty | List of contacts for line items. Data type: Array "relatedParty:" { "email": "String", "firstName": "String", "lastName": "String", "phone": "String", "@referredType": "String", "@type": "String" } |
| serviceOrderItem.relatedParty.email | Email address of the contact. Data type: String |
| serviceOrderItem.relatedParty.firstName | First name of the contact. Data type: String |
| serviceOrderItem.relatedParty.lastName | Last name of the contact. Data type: String |
| serviceOrderItem.relatedParty.phone | Business phone number of the contact. Data type: String |
| serviceOrderItem.relatedParty.@referredType | Type of customer. Possible value: OrderLineItemContact Data type: String |
| serviceOrderItem.relatedParty.@type | Part of TMF Open API standard. Annotation for order line item contact. This value is always <kbd class="ph userinput">RelatedParty</kbd>. This information is not stored. Data type: String |
| serviceOrderItem.service | Description of the instance details of the service purchased by the customer. Data type: Object "service:" { "id": "String", "serviceCharacteristic": [Array], "serviceRelationship": [Array], "serviceSpecification": {Object}, "@type": "String" } |
| serviceOrderItem.service.id | Unique identifier of the service sold. This value can be the sys_id or external ID in the Product Inventory \[sn_ind_tmt_orm_product_inventory\] table. This value is only returned for change/disconnect orders. Data type: String |
| serviceOrderItem.service.serviceCharacteristic | List that describes the characteristics of the associated service. Only service characteristics with a current value different from the previousValue are returned. Data type: Array "serviceCharacteristic:" [ { "name": "String", "previousValue": "String", "value": "String", } ] |
| serviceOrderItem.service.serviceCharacteristic.name | Name of the characteristic record to associated with the service. Located in the Characteristic \[sn_prd_pm_characteristic\] table. Data type: String |
| serviceOrderItem.service.serviceCharacteristic.previousValue | Previous characteristic option values if the update is for change order. The request is a change order if the serviceOrderItem.action parameter is other than <kbd class="ph userinput">add</kbd>. For additional information on characteristic option values, see[Create product characteristics and characteristic options](https://www.servicenow.com/docs/access?context=som-product-config-add-characteristics&version=yokohama&pubname=yokohama-order-management&ft:locale=en-US). Data type: String |
| serviceOrderItem.service.serviceCharacteristic.value | Characteristic option values associated with the service. For additional information on characteristic option values, see [Create product characteristics and characteristic options](https://www.servicenow.com/docs/access?context=som-product-config-add-characteristics&version=yokohama&pubname=yokohama-order-management&ft:locale=en-US). Data type: String |
| serviceOrderItem.service.serviceSpecification | Description of the service specification associated with the service. Data type: Object "serviceSpecification:" { "id": "String", "name": "String", "@type": "String" } |
| serviceOrderItem.service.serviceSpecification.id | Initial_version or external_id of the service specification. The initial_version is the sys_id of the first version of the specification. Located in the sys_id or external_id field of the Service Specification \[sn_prd_pm_service_specification\] table. Data type: String |
| serviceOrderItem.service.serviceSpecification.name | Name of the service specification. Located in the Service Specification \[sn_prd_pm_service_specification\] table. Data type: String |
| serviceOrderItem.service.serviceSpecification.@type | Part of the TMF Open API standard. This value is always <kbd class="ph userinput">ServiceSpecificationRef</kbd>. This information is not stored. Data type: String |
| serviceOrderItem.@type | Part of the TMF Open API standard. This value is always <kbd class="ph userinput">ServiceOrderItem</kbd>. This information is not stored. Data type: String |
| state | State of the service order. For more information, see. Data type: String |
[ ]

{#serviceorder-PATCH-serviceOrder-id__table_t5s_hm1_hwb}  

### cURL request {#serviceorder-PATCH-serviceOrder-id__example_jsc_1dc_vrb}

This example shows how to update a service order.

    curl -X PATCH 'https://instance.service-now.com/api/sn_tmf_api/order/serviceOrder/a831e56e77602110c8b3a4d54b5a9954' \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -u "username":"password" \
    -d '{
      "externalId": "BSS748",
      "priority": "1",
      "description": "Managed Security",
      "category": "TMF resource illustration",
      "requestedStartDate": "2018-01-15T09:37:40.508Z",
      "requestedCompletionDate": "2018-01-15T09:37:40.508Z",
      "@type": "ServiceOrder",
      "note": [
        {
          "id": "1",
          "author": "Jean Pontus",
          "date": "2019-04-30T08:13:59.509Z",
          "text": "This is a TMF product order illustration"
        },
        {
          "id": "2",
          "author": "Jean Pontus1",
          "date": "2019-04-30T08:13:59.509Z",
          "text": "This is a TMF product order illustration no 2"
        }
      ],
      "serviceOrderItem": [
        {
          "id": "100",
          "action": "add",
          "actionReason":"adding service package OLI",
          "quantity": 1,
          "@type": "ServiceOrderItem",
          "service": {
            "serviceState": "active",
            "@type": "CFS",
            "serviceCharacteristic": [
              {
                "name": "CPE Type",
                "valueType": "string",
                "value": "Virtual"
              },
              {
                "name": "Administration Support",
                "valueType": "string",
                "value": "Basic( Customer Managed)"
              },
              {
                "name": "Firewall coverage",
                "valueType": "string",
                "value": "Standard(Up to 20 sites)"
              },
              {
                "name": "Firewall Security",
                "valueType": "string",
                "value": "Basic"
              }
            ],
            "serviceSpecification": {
              "id": "f99546ff07266010a7955b7e0ad300a8",
              "name": "Managed Firewall Service",
              "internalVersion": "1",
              "@type": "Managed Firewall Service"
            },
            "serviceRelationship": [
              {
                "id": "326d13f45b5620102dff5e92dc81c785",
                "relationshipType": "Requires"
              }
            ]
          },
          "place": {
            "id": "5671dd2ec3a53010188473ce3640dd81",
            "@type": "Place"
          }
        }
      ],
      "relatedParty":[
            {
                "id": "eaf68911c35420105252716b7d40ddde",
                "name": "Sally Thomas",
                "@type": "RelatedParty",
                "@referredType": "CustomerContact"
            },
            {
                "id": "ffc68911c35420105252716b7d40dd55",
                "name": "Funco Intl",
                "@type": "RelatedParty",
                "@referredType": "Customer"
            },
            {
                "id": "59f16de1c3b67110ff00ed23a140dd9e",
                "name": "Funco External",
                "@type": "RelatedParty",
                "@referredType": "Consumer"
            }
        ]
    }'

Response body.

    {
      "externalId": "BSS748",
      "priority": "1",
      "description": "Managed Security",
      "category": "TMF resource illustration",
      "requestedStartDate": "2018-01-15T09:37:40.508Z",
      "requestedCompletionDate": "2018-01-15T09:37:40.508Z",
      "@type": "ServiceOrder",
      "note": [
        {
          "id": "1",
          "author": "Jean Pontus",
          "date": "2019-04-30T08:13:59.509Z",
          "text": "This is a TMF product order illustration"
        },
        {
          "id": "2",
          "author": "Jean Pontus1",
          "date": "2019-04-30T08:13:59.509Z",
          "text": "This is a TMF product order illustration no 2"
        }
      ],
      "serviceOrderItem": [
        {
          "id": "100",
          "action": "add",
          v"actionReason": "adding service package OLI",
          "quantity": 1,
          "@type": "ServiceOrderItem",
          "service": {
            "serviceState": "active",
            "@type": "CFS",
            "serviceCharacteristic": [
              {
                "name": "CPE Type",
                "valueType": "string",
                "value": "Virtual"
              },
              {
                "name": "Administration Support",
                "valueType": "string",
                "value": "Basic(Customer Managed)"
              },
              {
                "name": "Firewall coverage",
                "valueType": "string",
                "value": "Standard(Up to 20 sites)"
              },
              {
                "name": "Firewall Security",
                "valueType": "string",
                "value": "Basic"
              }
            ],
            "serviceSpecification": {
              "id": "f99546ff07266010a7955b7e0ad300a8",
              "name": "Managed Firewall Service",
              "internalVersion": "1",
              "@type": "Managed Firewall Service",
              "sys_id": "f99546ff07266010a7955b7e0ad300a8",
              "version": "",
              "status": "published",
              "internalId": "f99546ff07266010a7955b7e0ad300a8"
            },
            "serviceRelationship": [
              {
                "id": "326d13f45b5620102dff5e92dc81c785",
                "relationshipType": "Requires"
              }
            ]
          },
          "place": {
            "id": "5671dd2ec3a53010188473ce3640dd81",
            "@type": "Place"
          }
        }
      ],
      "relatedParty": [
            {
                "id": "eaf68911c35420105252716b7d40ddde",
                "name": "Sally Thomas",
                "@type": "RelatedParty",
                "@referredType": "CustomerContact"
            },
            {
                "id": "ffc68911c35420105252716b7d40dd55",
                "name": "Funco Intl",
                "@type": "RelatedParty",
                "@referredType": "Customer"
            },
            {
                "id": "59f16de1c3b67110ff00ed23a140dd9e",
                "name": "Funco External",
                "@type": "RelatedParty",
                "@referredType": "Consumer"
            }
        ],
      "orderType": "add",
      "state": "revision_received",
      "href": "/api/sn_tmf_api/order/serviceOrder/a831e56e77602110c8b3a4d54b5a9954"
    }

## Service Order Open API - POST /sn_tmf_api/order/serviceOrder/cancelserviceorder {#ariaid-title5}

Cancels the specified service order.
Note:  
This endpoint can't be used on orders for which the point of no return has been reached. An order line item can't be canceled while fulfillment is in progress.

### URL format

Default URL: /api/sn_tmf_api/order/serviceOrder/cancelserviceorder

### Supported request parameters

{#serviceorder-POST-cancelserviceord__entry__2}

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

{#serviceorder-POST-cancelserviceord__entry__6}

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

{#serviceorder-POST-cancelserviceord__entry__10}

| Name | Description |
|-|-|
| cancellationReason | Reason for cancellation. Data type: String Default: Blank string |
| serviceOrder | Data about the service order. Data type: Object "serviceOrder": { "id": "String", "href": "String", "@referredType": "String" } |
| serviceOrder.id | Required. Sys_id of the customer order to cancel. Data type: String Table: Customer Order \[sn_ind_tmt_orm_order\] |
| serviceOrder.href | URL of the customer order to cancel. Data type: String Default: Blank string |
| serviceOrder.@referredType | Value for this parameter should be `ServiceOrder`. Data type: String Default: Blank string |
| requestedCancellationDate | Date to cancel the order. Data type: String Default: Blank string |
| @type | Value for this parameter should be `CancelServiceOrder`. Data type: String Default: Blank 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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "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.").
{#serviceorder-POST-cancelserviceord__table_omb_dvk_5rb__entry__2}{#serviceorder-POST-cancelserviceord__accept-JSON-only-entry-RESTAPI}{#serviceorder-POST-cancelserviceord__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]

{#serviceorder-POST-cancelserviceord__table_omb_dvk_5rb} {#serviceorder-POST-cancelserviceord__table_tzy_thy_ksb__entry__2}

| Header | Description |
|-|-|
| Content-Type | Data format of the response body. Only supports application/json. |
[Table 23. Response headers]

{#serviceorder-POST-cancelserviceord__table_tzy_thy_ksb}

### 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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "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.").
{#serviceorder-POST-cancelserviceord__entry__36}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. Could be any of the following reasons: * Empty payload. * Invalid payload. Mandatory field missing: \<field name\>. * Invalid order ID. * Invalid order ID: This order is yet to be created in customer order table. The cancel request was made for an order that has not been created yet. The order is in the Inbound Queue \[sn_tmt_core_inbound_queue\] table waiting for the scheduler to pick up the record. {#serviceorder-POST-cancelserviceord__ul_lg1_5vt_5rb} |
[Table 24. Status codes]

### Response body parameters (JSON)

{#serviceorder-POST-cancelserviceord__entry__42}

| Name | Description |
|-|-|
| cancellationReason | Reason for cancellation. Data type: String |
| id | Sys_id of the cancelled order. Data type: String |
| serviceOrder | Data about the service order. Data type: Object "serviceOrder": { "id": "String", "@referredType": "String" } |
| serviceOrder.id | Sys_id of the cancelled order. Data type: String |
| serviceOrder.@referredType | Value for this parameter is `ServiceOrder`. Data type: String |
| requestedCancellationDate | Date to cancel the order. Data type: String |
| state | State of the cancellation. If the cancellation request was successfully processed (201 status code), the value for this parameter is `done`. Data type: String |
| @type | Value for this parameter is `CancelServiceOrder`. Data type: String |
[ ]

### cURL request

The following code example cancels a customer order.

    curl -X POST "https://instance.servicenow.com/api/sn_tmf_api/cancelserviceorder" \
    -H "Content-Type: application/json" \
    -u "username":"password" \
    -d {
      "cancellationReason": "Duplicate order",
      "requestedCancellationDate": "2023-01-24T11:56:21.931Z",
      "serviceOrder": {
        "id": "5f4f5e5377a311101fa5a4d54b5a99fd",
        "@referredType": "ServiceOrder"
      },
      "@type": "CancelServiceOrder"
    }

    {
      "id": "5f4f5e5377a311101fa5a4d54b5a99fd",
      "cancellationReason": "Duplicate order",
      "requestedCancellationDate": "2023-01-24T11:56:21.931Z",
      "@type": "CancelServiceOrder",
      "serviceOrder": {
        "id": "5f4f5e5377a311101fa5a4d54b5a99fd",
        "@referredType": "ServiceOrder"
      },
      "state": "done"
    }

## Service Order Open API -- POST /sn_tmf_api/order/serviceOrder {#ariaid-title6}

Creates, updates, or deletes a service order or line item.
When an add action is received and accepted, a new record is created in the following tables:

* Order \[sn_ind_tmt_orm_order\]
* Order Characteristic Value \[sn_ind_tmt_orm_order_characteristic_value\]
* Order Line Item \[sn_ind_tmt_orm_order_line_item\]
* Order Line Item Contact \[sn_ind_tmt_orm_order_line_item_contact\]
* Order Line Related Items \[sn_ind_tmt_orm_order_line_related_items\]
{#serviceorder-POST-order__ul_lxc_kxm_t4b}

### URL format

/api/sn_tmf_api/order/serviceOrder

### Supported request parameters

{#serviceorder-POST-order__entry__2}

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

{#serviceorder-POST-order__entry__6}

| Name | Description |
|-|-|
| mode | Enables asynchronous order processing.​ That is, the order is added to the Inbound Queue \[sn_tmt_core_inbound_queue\] table to be created. If not included, the order is processed synchronously. Valid value: async Data type: String |
[Table 26. Query parameters]

{#serviceorder-POST-order__entry__10}{#serviceorder-POST-order__svcOrdItem-ph-tmf641-externalid}{#serviceorder-POST-order__note-ph-tmf622}{#serviceorder-POST-order__note_text-ph-tmf622}{#serviceorder-POST-order__requestedCompletionDate-ph-tmf622}{#serviceorder-POST-order__reqStartDate-ph-tmf622}{#serviceorder-POST-order__svcOrdItem-ph-tmf641}{#serviceorder-POST-order__service_id-ph-tmf641}{#serviceorder-POST-order__svcOrderItemRel_id-ph-tmf641}{#serviceorder-POST-order__productOrderItemRelationship_relType-row-tmf622}{#serviceorder-POST-order__service-s-tmf641}

| Name | Description |
|-|-|
| committedDueDate | Date and time when the action must be performed on the order. This value must be the same as or later than the committedDueDate values for each order line item. Data type: String Stored in: The committed_due_date field of the sn_ind_tmt_orm_order table. |
| externalId | Unique order number for the external service order. Data type: String Table/field updated: sn_ind_tmt_orm_order |
| href | Relative link to the resource record. Data type: String Default: Blank string |
| note | List of additional notes made by the customer when ordering. Data type: Array of Objects{#serviceorder-POST-order__note_data_type-p-tmf622} "note": [ { "text": "String" } ] {#serviceorder-POST-order__note-codeblock-tmf622} Stored in: sn_ind_tmt_orm_order |
| note.text | Additional notes/comments made by the customer while ordering. Data type: String{#serviceorder-POST-order__note_text_data_type-p-tmf622} Stored in: The comments field of the sn_ind_tmt_orm_order table. Default: Blank string |
| orderDate | Date and timestamp of the order. Format: YYYY-MM-DD HH:MM:SS Data type: String Default: Blank string |
| relatedParty | List of contacts for the order. Each contact is an object in the array. The request must list at least one item which contains customer account or consumer account information. Data type: Array "relatedParty": [ { "id": "String", "name": "String", "@referredType": "String", "@type": "String" } ] |
| relatedParty.id | Required. Sys_id or external_id of the account, customer contact, or consumer associated with the order. Data type: String Table: Account \[customer_account\] table, Contact \[customer_contact\] table, or Consumer \[csm_consumer\] Table updated: sn_ind_tmt_orm_order |
| relatedParty.name | Name of the account, customer, or consumer. Data type: String |
| relatedParty.@referredType | Type of customer. Possible values: * Customer * CustomerContact * Consumer {#serviceorder-POST-order__ul_cdn_ddp_kqb} Data type: String |
| relatedParty.@type | Part of TMF Open API standard. Annotation for order line item contact. This value is always <kbd class="ph userinput">RelatedParty</kbd>. This information is not stored. Data type: String |
| requestedCompletionDate | Delivery date requested by the customer. Data type: String{#serviceorder-POST-order__reqCompDate_data_type-p-tmf622} Stored in: The expected_end_date field of the sn_ind_tmt_orm_order table. Default: Blank string |
| requestedStartDate | Order start date requested by the customer. Data type: String{#serviceorder-POST-order__reqStartDate_data_type-p-tmf622} Stored in: The expected_start_date field of the sn_ind_tmt_orm_order table. Default: Blank string |
| serviceOrderItem | Required. List of line items in the service order and their associated action. Data type: Array of Objects{#serviceorder-POST-order__svcOrdItem_data_type-p-tmf641} "serviceOrderItem:" [ { "action": "String", "actionReason": "String", "committedDueDate": "String", "externalProductInventory": [Array], "id": "String", "orderRelationship": [Array], "place": {Object}, "quantity": "Number", "relatedParty": {Object}, "service": {Object}, "@type": "String", "version": "String" } ] {#serviceorder-POST-order__svcOrdItem-codeblock-tmf641} Table/field updated: sn_ind_tmt_orm_order_line_item |
| serviceOrderItem.action | Required. Action to perform on the service order item. Possible actions are defined on the Choice List tab in the Action Dictionary Entry field of the sn_ind_tmt_orm_order_line_item table. Possible values: * add * change * delete * no-change * resume * suspend {#serviceorder-POST-order__ul_grg_vgl_gqb}For details, see [Action types for customer and service orders](https://www.servicenow.com/docs/access?context=order-mgt-customer-order-types&version=yokohama&pubname=yokohama-order-management&ft:locale=en-US). Data type: String Table/field updated: sn_ind_tmt_orm_order_line_item/action Default: add |
| ServiceOrderItem.actionReason | Optional. Description of the reason for the line item. Data type: String Table/field updated: Order Line Item \[sn_ind_tmt_orm_order_line_item\] table/action_reason. |
| serviceOrderItem.committedDueDate | Date and time when the action must be performed on the order line item. Data type: String Stored in: The committed_due_date field of the Order Line Item \[sn_ind_tmt_orm_order_line_item\] table. |
| serviceOrderItem.externalProductInventory | External IDs to map to the product inventories created for the order. Data type: Array of Objects "externalProductInventory": [ { "externalProductInventoryId": "String" } ] |
| serviceOrderItem.externalProductInventory.externalProductInventoryId | External ID to map to the product inventory. Data type: String Stored in: The external_inventory_id field of the sn_ind_tmt_orm_order_line_item table and the sn_prd_invt_external_id field of the sn_prd_invt_product_inventory table. |
| serviceOrderItem.id | Required. Unique identifier of the line item. Located in the sn_ind_tmt_orm_external_id field of the Order Line Item \[sn_ind_tmt_orm_order_line_item\] table. Data type: String Table/field updated: sn_ind_tmt_orm_order_line_item/external_id |
| serviceOrderItem.orderRelationship | Required. List of relationships between order line items. Data type: Array of Objects "orderRelationship:" [ { "id": "String", "relationshipType": "String" } ] {#serviceorder-POST-order__svcOrderItemRel-codeblock} Table/field updated: sn_ind_tmt_orm_order_line_item |
| serviceOrderItem.orderRelationship.id | Required. Unique identifier of the related line item. Located in the sn_ind_tmt_orm_external_id field of the Order Line Item \[sn_ind_tmt_orm_order_line_item\] table. Data type: String Table/field updated: sn_ind_tmt_orm_order_line_item/parent_line_item or sn_ind_tmt_orm_order_line_related_items/related_order_line_item |
| serviceOrderItem.orderRelationship.relationshipType | Required. Type of relationship between the two line items. This information is used to identify the relationship hierarchy. Possible values: * HasChild * HasParent * Requires {#serviceorder-POST-order__ul_yqf_2ty_54b} `HasChild` and `HasParent` are used for parent/child relationships. `Requires` is used for horizontal relationships (a line item requires another line item). Data type: String |
| serviceOrderItem.place | Map of the locations on which to install the service. Data type: Object "place:" { "id": "String", "@type": "String" } |
| serviceOrderItem.place.id | Required. Sys_id of the associated location record in the Location \[cmn_location\] table. Data type: String Table/field updated: sn_ind_tmt_orm_order_line_item/location Default: Blank string |
| serviceOrderItem.place.@type | Part of TMF Open API standard. Annotation for order line item place. Data type: String |
| serviceOrderItem.quantity | Sets the number of line items to order. This property is only applicable when adding a service order; that is, the value of the action property is `add`. Data type: Number Default: Empty string Table/field updated: sn_ind_tmt_orm_order/quantity |
| serviceOrderItem.relatedParty | List of contacts for line items. Data type: Array "relatedParty:" { "email": "String", "firstName": "String", "lastName": "String", "phone": "String", "@referredType": "String", "@type": "String" } |
| serviceOrderItem.relatedParty.email | Email address of the contact. Data type: String |
| serviceOrderItem.relatedParty.firstName | First name of the contact. Data type: String |
| serviceOrderItem.relatedParty.lastName | Last name of the contact. Data type: String |
| serviceOrderItem.relatedParty.phone | Business phone number of the contact. Data type: String |
| serviceOrderItem.relatedParty.@referredType | Required. Type of customer. Possible value: OrderLineItemContact Data type: String |
| serviceOrderItem.relatedParty.@type | Part of TMF Open API standard. Annotation for order line item contact. This value is always <kbd class="ph userinput">RelatedParty</kbd>. This information is not stored. Data type: String |
| serviceOrderItem.service | Required. Description of the instance details of the service purchased by the customer. Data type: Object "service:" { "id": "String", "serviceCharacteristic": [Array], "serviceRelationship": [Array], "serviceSpecification": {Object}, "@type": "String" } {#serviceorder-POST-order__service-codeblock-tmf641} Table/field updated: sn_ind_tmt_orm_order_line_item |
| serviceOrderItem.service.id | Unique identifier of the service sold. This value can be the sys_id or external ID in the Product Inventory \[sn_ind_tmt_orm_product_inventory\] table. This value is only used for change/disconnect orders. Data type: String |
| serviceOrderItem.service.serviceCharacteristic | List that describes the characteristics of the associated service. Only service characteristics with a current value different from the previousValue are returned. Data type: Array "serviceCharacteristic:" [ { "name": "String", "previousValue": "String", "value": "String", } ] |
| serviceOrderItem.service.serviceCharacteristic.name | Name of the characteristic record to associated with the service. Located in the Characteristic \[sn_prd_pm_characteristic\] table. Data type: String |
| serviceOrderItem.service.serviceCharacteristic.previousValue | Previous characteristic option values if the update is for change order. The request is a change order if the serviceOrderItem.action parameter is other than <kbd class="ph userinput">add</kbd>. For additional information on characteristic option values, see[Create product characteristics and characteristic options](https://www.servicenow.com/docs/access?context=som-product-config-add-characteristics&version=yokohama&pubname=yokohama-order-management&ft:locale=en-US). Data type: String |
| serviceOrderItem.service.serviceCharacteristic.value | Characteristic option values associated with the service. For additional information on characteristic option values, see [Create product characteristics and characteristic options](https://www.servicenow.com/docs/access?context=som-product-config-add-characteristics&version=yokohama&pubname=yokohama-order-management&ft:locale=en-US). Data type: String |
| serviceOrderItem.service.serviceRelationship | List of product inventories related to the service. Data type: Array of Objects "serviceRelationship": [ { "id": "String", "relationshipType": "String" } ] |
| serviceOrderItem.service.serviceRelationship.id | Sys_id or sn_prd_invt_external_id of the product inventory. Data type: String Table: In the sys_id or sn_prd_invt_external_id field of the Product Inventory \[sn_prd_invt_product_inventory\] table. |
| serviceOrderItem.service.serviceRelationship.relationshipType | Type of relationship between the service and the product inventory. Possible value: Requires Data type: String |
| serviceOrderItem.service.serviceSpecification | Required. Description of the service specification associated with the service. Note: Change orders (serviceOrderItem.action is `change`) are processed differently based on the value of the sn_ind_tmt_orm.allowSpecVersionUpdateInChangeOrder system property. * When the property is set to true (default), if the service is a different version than indicated in the order, the service is automatically upgraded to the version in the order by changing the referenced service specification. This allows the order to be successfully processed. * When the property is set to false, if the service is a different version than indicated in the order, the order fails due to the version mismatch. {#serviceorder-POST-order__ul_zbw_sdz_dbc} Data type: Object "serviceSpecification:" { "id": "String", "internalVersion": "String", "name": "String", "version": "String", "@type": "String" } Stored in: The service_specification field of the Order Line Item \[sn_ind_tmt_orm_order_line_item\] table. |
| serviceOrderItem.service.serviceSpecification.id | Required. Initial_version or external_id of the service specification. The initial_version is the sys_id of the first version of the specification. Located in the sys_id or external_id field of the Service Specification \[sn_prd_pm_service_specification\] table. Data type: String |
| serviceOrderItem.service.serviceSpecification.internalVersion | Version of the service specification. Data type: String Table: Service Specification \[sn_prd_pm_service_specification\] |
| serviceOrderItem.service.serviceSpecification.name | Required. Name of the service specification. Located in the Service Specification \[sn_prd_pm_service_specification\] table. Data type: String |
| serviceOrderItem.service.serviceSpecification.version | External_version of the service specification. Data type: String Table: Service Specification \[sn_prd_pm_service_specification\] |
| serviceOrderItem.service.serviceSpecification.@type | Part of the TMF Open API standard. This value is always <kbd class="ph userinput">ServiceSpecificationRef</kbd>. This information is not stored. Data type: String |
| serviceOrderItem.@type | Part of the TMF Open API standard. This value is always <kbd class="ph userinput">ServiceOrderItem</kbd>. This information is not stored. Data type: String |
| @type | Part of the TMF Open API standard. This value is always <kbd class="ph userinput">ServiceOrder</kbd>. This information is not stored. Data type: String |
[Table 27. 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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "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.").
{#serviceorder-POST-order__entry__114}{#serviceorder-POST-order__accept-JSON-only-entry-RESTAPI}

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

{#serviceorder-POST-order__table_tzy_thy_ksb__entry__2}

| Header | Description |
|-|-|
| Content-Type | Data format of the response body. Only supports application/json. |
[Table 29. Response headers]

{#serviceorder-POST-order__table_tzy_thy_ksb}

### 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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "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.").
{#serviceorder-POST-order__table_kmf_3jm_gqb__entry__2}{#serviceorder-POST-order__entry-200-status-code}{#serviceorder-POST-order__entry-404-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 201 | Successful. If there are any issues with the characteristics or characteristics option information, the endpoint stores the following comments in the work notes fields of the associated Customer Order Line Item record: * The following Order Item characteristics does not exist: Review specification \<specification.name\> and correct the characteristic and characteristic option in the order line item prior to approving the order. * Order Item characteristic: \<characteristic.name\> with characteristic value: \<characteristic.value\> is invalid. Correct the characteristic values before approving the order. {#serviceorder-POST-order__ul_r1r_jhm_gqb} |
| 202 | Accepted. Successful request for an order in asynchronous mode. That is, the request was made with the mode parameter set to `async` and the record is scheduled to be processed in the Inbound Queue \[sn_tmt_core_inbound_queue\] table. |
| 400 | Bad Request. Could be any of the following reasons: * Invalid payload: Request body missing. - Payload was not passed in the request body. * Invalid payload: serviceOrderItem missing. - Service order line item object or JSON is missing. * Invalid payload: serviceOrderItem ID is missing. -- The ID is missing from the service order line item. * Invalid payload: serviceOrderItem action is missing. -- The service object or JSON is missing from the payload. * Invalid payload: serviceOrderItem service is missing. -- The service property is missing from the service order line item. * Invalid payload: serviceSpecification is missing. - The service specification object or JSON in the service order line item is missing from the payload. * Invalid payload: serviceSpecification ID is missing. - The id parameter in the service order line item of the service specification object is missing from the payload. * Invalid payload: Service specification does not exist. - The service specification in the service order line item is not valid. * Invalid payload: Product Inventory does not exist. - In a change or delete order (i.e., action = change or delete), the sold service sent is not present in the system. * Invalid payload: Product inventory ID is missing. -- In a change or delete order, the Sold Product ID is missing from the payload. * Invalid payload: Customer Account or Consumer is missing - The related party customer or consumer object is missing from the payload. * Invalid payload: Sold Product is inactive. -- In a change or delete order, the Sold Product sent in the payload is not in active state. * Invalid payload: Consumer does not exist - The specified related party consumer does not exist in the instance. * Invalid payload: Customer Account does not exist. -- The related party customer provided in payload is not present in the system. * Invalid payload: Order creation failed. - Not able to create the requested order. {#serviceorder-POST-order__ul_v1r_jhm_gqb} |
| 404 | Not found. The requested item wasn't found. |
[Table 30. Status codes]

{#serviceorder-POST-order__table_kmf_3jm_gqb}

### Response body parameters (JSON)

{#serviceorder-POST-order__entry__134}{#serviceorder-POST-order__type-entry-tmf641}

| Name | Description |
|-|-|
| committedDueDate | Date and time when the action must be performed on the order. This value must be the same as or later than the committedDueDate values for each order line item. Data type: String |
| externalId | Unique order number for the external service order. Data type: String |
| href | Relative link to the resource record. Data type: String Default: Blank string |
| id | Sys_id of the service order. Data type: String |
| note | List of additional notes made by the customer when ordering. Data type: Array "note": [ { "text": "String" } ] |
| note.text | Additional notes/comments made by the customer while ordering. Data type: String |
| orderDate | Date and timestamp of the order. Format: YYYY-MM-DD HH:MM:SS Data type: String Default: Blank string |
| orderId | Sys_id of the order to be created. Upon succussful request, the order is added to the Inbound Queue \[sn_tmt_core_inbound_queue\] table on a schedule to be processed. Note: This value is the only result if the order is created asynchronously using the mode query parameter. { "orderId": "b0fc877ac3ab5110856d73ce3640dde0" } Data type: String |
| relatedParty | List of contacts for the order. Data type: Array of Objects "relatedParty": [ { "id": "String", "name": "String", "@referredType": "String", "@type": "String" } ] |
| relatedParty.id | Sys_id or external_id of the account, customer or consumer contact associated with the order. Located in the Account \[customer_account\], Contact \[customer_contact\], or Consumer \[csm_consumer\] table. Data type: String |
| relatedParty.name | Name of the account, customer, or consumer. Data type: String |
| relatedParty.@referredType | Type of customer. Possible values: * Customer * CustomerContact * Consumer {#serviceorder-POST-order__ul_vvn_12p_kqb} Data type: String |
| relatedParty.@type | Part of TMF Open API standard. Annotation for order line item contact. This value is always <kbd class="ph userinput">RelatedParty</kbd>. This information is not stored. Data type: String |
| requestedCompletionDate | Delivery date requested by the customer. Data type: String |
| requestedStartDate | Order start date requested by the customer. Data type: String |
| serviceOrderItem | List of line items in the service order and their associated action. Data type: Array "serviceOrderItem:" [ { "action": "String", "actionReason": "String", "committedDueDate": "String", "externalProductInventory": [Array], "id": "String", "orderRelationship": [Array], "place": {Object}, "quantity": "Number", "relatedParty": {Object}, "service": {Object}, "@type": "String", "version": "String" } ] |
| serviceOrderItem.action | Action to perform on the service order item. Possible actions are defined on the Choice List tab in the Action Dictionary Entry field of the sn_ind_tmt_orm_order_line_item table. Possible values: * add * change * delete * no-change * resume * suspend {#serviceorder-POST-order__ul_t4n_rqx_kqb}For details, see [Action types for customer and service orders](https://www.servicenow.com/docs/access?context=order-mgt-customer-order-types&version=yokohama&pubname=yokohama-order-management&ft:locale=en-US). Data type: String |
| ServiceOrderItem.actionReason | Description of the reason for adding the line item. Data type: String Table: Order Line Item \[sn_ind_tmt_orm_order_line_item\] |
| serviceOrderItem.committedDueDate | Date and time when the action must be performed on the order line item. Data type: String |
| serviceOrderItem.externalProductInventory | List of external IDs mapped to the product inventories created for the order. Data type: Array of Objects "externalProductInventory": [ { "externalProductInventoryId": "String" } ] |
| serviceOrderItem.externalProductInventory.externalProductInventoryId | External ID mapped to the product inventory. Data type: String |
| serviceOrderItem.id | Unique identifier of the line item. Located in the sn_ind_tmt_orm_external_id field of the Order Line Item \[sn_ind_tmt_orm_order_line_item\] table. Data type: String |
| serviceOrderItem.orderRelationship | List of the relationships between order line items. Data type: Array "orderRelationship:" [ { "id": "String", "relationshipType": "String" } ] |
| serviceOrderItem.orderRelationship.id | Unique identifier of the related line item. Located in the sn_ind_tmt_orm_external_id field of the Order Line Item \[sn_ind_tmt_orm_order_line_item\] table. Data type: String |
| serviceOrderItem.orderRelationship.relationshipType | Type of relationship between the two line items. This information is used to identify the relationship hierarchy. Possible values: * HasChild * HasParent * Requires {#serviceorder-POST-order__d3148e2316} `HasChild` and `HasParent` are used for parent/child relationships. `Requires` is used for horizontal relationships (a line item requires another line item). Data type: String |
| serviceOrderItem.place | Map of the locations on which to install the service. Data type: Object "place:" { "id": "String", "@type": "String" } |
| serviceOrderItem.place.id | Sys_id of the associated location record in the Location \[cmn_location\] table. Data type: String |
| serviceOrderItem.place.@type | Part of TMF Open API standard. Annotation for order line item contact. This value is always <kbd class="ph userinput">Place</kbd>. This information is not stored. Data type: String |
| serviceOrderItem.quantity | Number of line items ordered. Data type: Number |
| serviceOrderItem.relatedParty | List of contacts for line items. Data type: Array "relatedParty:" { "email": "String", "firstName": "String", "lastName": "String", "phone": "String", "@referredType": "String", "@type": "String" } |
| serviceOrderItem.relatedParty.email | Email address of the contact. Data type: String |
| serviceOrderItem.relatedParty.firstName | First name of the contact. Data type: String |
| serviceOrderItem.relatedParty.lastName | Last name of the contact. Data type: String |
| serviceOrderItem.relatedParty.phone | Business phone number of the contact. Data type: String |
| serviceOrderItem.relatedParty.@referredType | Required. Type of customer. Possible value: OrderLineItemContact Data type: String |
| serviceOrderItem.relatedParty.@type | Part of TMF Open API standard. Annotation for order line item contact. This value is always <kbd class="ph userinput">RelatedParty</kbd>. This information is not stored. Data type: String |
| serviceOrderItem.service | Description of the instance details of the service purchased by the customer. Data type: Object "service:" { "id": "String", "serviceCharacteristic": [Array], "serviceRelationship": [Array], "serviceSpecification": {Object}, "@type": "String" } |
| serviceOrderItem.service.id | Unique identifier of the service sold. This value can be the sys_id or external ID in the Product Inventory \[sn_ind_tmt_orm_product_inventory\] table. This value is only returned for change/disconnect orders. Data type: String |
| serviceOrderItem.service.serviceCharacteristic | List that describes the characteristics of the associated service. Only service characteristics with a current value different from the previousValue are returned. Data type: Array "serviceCharacteristic:" [ { "name": "String", "previousValue": "String", "value": "String", } ] |
| serviceOrderItem.service.serviceCharacteristic.name | Name of the characteristic record to associated with the service. Located in the Characteristic \[sn_prd_pm_characteristic\] table. Data type: String |
| serviceOrderItem.service.serviceCharacteristic.previousValue | Previous characteristic option values if the update is for change order. The request is a change order if the serviceOrderItem.action parameter is other than <kbd class="ph userinput">add</kbd>. For additional information on characteristic option values, see[Create product characteristics and characteristic options](https://www.servicenow.com/docs/access?context=som-product-config-add-characteristics&version=yokohama&pubname=yokohama-order-management&ft:locale=en-US). Data type: String |
| serviceOrderItem.service.serviceCharacteristic.value | Characteristic option values associated with the service. For additional information on characteristic option values, see [Create product characteristics and characteristic options](https://www.servicenow.com/docs/access?context=som-product-config-add-characteristics&version=yokohama&pubname=yokohama-order-management&ft:locale=en-US). Data type: String |
| serviceOrderItem.service.serviceRelationship | List of product inventories related to the service. Data type: Array of Objects "serviceRelationship": [ { "id": "String", "relationshipType": "String" } ] |
| serviceOrderItem.service.serviceRelationship.id | Sys_id or sn_prd_invt_external_id of the product inventory. Data type: String Table: In the sys_id or sn_prd_invt_external_id field of the Product Inventory \[sn_prd_invt_product_inventory\] table. |
| serviceOrderItem.service.serviceRelationship.relationshipType | Type of relationship between the service and the product inventory. Possible value: Requires Data type: String |
| serviceOrderItem.service.serviceSpecification | Description of the service specification associated with the service. Data type: Object "serviceSpecification:" { "id": "String", "internalId": "String", "internalVersion": "String", "name": "String", "version": "String", "@type": "String" } |
| serviceOrderItem.service.serviceSpecification.id | Initial_version or external_id of the service specification. The initial_version is the sys_id of the first version of the specification. Located in the sys_id or external_id field of the Service Specification \[sn_prd_pm_service_specification\] table. Data type: String |
| serviceOrderItem.service.serviceSpecification.internalId | Initial version of the service specification. Data type: String Table: In the sys_id field of the Service Specification \[sn_prd_pm_service_specification\] table. |
| serviceOrderItem.service.serviceSpecification.internalVersion | Version of the service specification. Data type: String Table: Service Specification \[sn_prd_pm_service_specification\] |
| serviceOrderItem.service.serviceSpecification.name | Name of the service specification. Located in the Service Specification \[sn_prd_pm_service_specification\] table. Data type: String |
| serviceOrderItem.service.serviceSpecification.version | External_version of the service specification. Data type: String Table: Service Specification \[sn_prd_pm_service_specification\] |
| serviceOrderItem.service.serviceSpecification.@type | Part of the TMF Open API standard. This value is always <kbd class="ph userinput">ServiceSpecificationRef</kbd>. This information is not stored. Data type: String |
| serviceOrderItem.state | State of the service order item. For example, new. Data type: String |
| serviceOrderItem.@type | Part of the TMF Open API standard. This value is always <kbd class="ph userinput">ServiceOrderItem</kbd>. This information is not stored. Data type: String |
| state | State of the service order. For more information, see. Data type: String |
| @type | Part of the TMF Open API standard. This value is always <kbd class="ph userinput">ServiceOrder</kbd>. This information is not stored. Data type: String |
[ ]

### Processing asynchronously {#serviceorder-POST-order__example_ynv_vhx_fwb}

This example shows how to use the mode query parameter to create an
order asynchronously. The order is added to the Inbound Queue \[sn_tmt_core_inbound_queue\]
table on a schedule to be created.

    curl -X POST 'https://instance.service-now.com/api/sn_tmf_api/serviceorder?mode=async' \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -u "username":"password" \
    -d '{
      "externalId": "BSS748",
      "priority": "1",
      "description": "Managed Security",
      "category": "TMF resource illustration",
      "requestedStartDate": "2018-01-15T09:37:40.508Z",
      "requestedCompletionDate": "2018-01-15T09:37:40.508Z",
      "@type": "ServiceOrder",
      "note": [
        {
          "id": "1",
          "author": "Jean Pontus",
          "date": "2019-04-30T08:13:59.509Z",
          "text": "This is a TMF product order illustration"
        },
        {
          "id": "2",
          "author": "Jean Pontus1",
          "date": "2019-04-30T08:13:59.509Z",
          "text": "This is a TMF product order illustration no 2"
        }
      ],
      "serviceOrderItem": [
        {
          "id": "100",
          "action": "add",
          "actionReason":"adding service package OLI",
          "quantity": 1,
          "@type": "ServiceOrderItem",
          "service": {
            "serviceState": "active",
            "@type": "CFS",
            "serviceCharacteristic": [
              {
                "name": "CPE Type",
                "valueType": "string",
                "value": "Virtual"
              },
              {
                "name": "Administration Support",
                "valueType": "string",
                "value": "Basic( Customer Managed)"
              },
              {
                "name": "Firewall coverage",
                "valueType": "string",
                "value": "Standard(Up to 20 sites)"
              },
              {
                "name": "Firewall Security",
                "valueType": "string",
                "value": "Basic"
              }
            ],
            "serviceSpecification": {
              "id": "f99546ff07266010a7955b7e0ad300a8",
              "name": "Managed Firewall Service",
              "internalVersion": "1",
              "@type": "Managed Firewall Service"
            },
            "serviceRelationship": [
              {
                "id": "326d13f45b5620102dff5e92dc81c785",
                "relationshipType": "Requires"
              }
            ]
          },
          "place": {
            "id": "5671dd2ec3a53010188473ce3640dd81",
            "@type": "Place"
          }
        }
      ],
      "relatedParty": [
            {
                "id": "eaf68911c35420105252716b7d40ddde",
                "name": "Sally Thomas",
                "@type": "RelatedParty",
                "@referredType": "CustomerContact"
            },
            {
                "id": "ffc68911c35420105252716b7d40dd55",
                "name": "Funco Intl",
                "@type": "RelatedParty",
                "@referredType": "Customer"
            },
            {
                "id": "59f16de1c3b67110ff00ed23a140dd9e",
                "name": "Funco External",
                "@type": "RelatedParty",
                "@referredType": "Consumer"
            }
        ]
    }'

Response body.

    {
      "orderId": "304e877ac3ab5110856d73ce3640dde5"
    }

### Processing synchronously (default)

The following example shows how to create a service order by setting the
serviceOrderItem.action property to <kbd class="ph userinput">add</kbd>.

    curl "https://instance.service-now.com/api/sn_tmf_api/serviceorder" \
    --request POST \
    --header "Accept:application/json" \
    --header "Content-Type:application/json" \
    --data "{
       "externalId": "BSS748",
       "requestedStartDate": "2018-01-15T09:37:40.508Z",
       "requestedCompletionDate": "2018-01-15T09:37:40.508Z",
       "@type": "ServiceOrder",
       "note": [
          {
             "text": "This is a TMF service order illustration"
          },
          {
             "text": "This is a TMF service order illustration no 2"
          }
       ],
       "serviceOrderItem": [
          {
             "id": "100",
             "action": "add",
             "actionReason":"adding service package OLI",
             "quantity": 1,
             "@type": "ServiceOrderItem",
             "service": {
                "@type": "CFS",
                "serviceCharacteristic": [
                   {
                      "name": "Firewall Security",
                      "value": "Standard"
                   },
                   {
                      "name": "Firewall coverage",
                      "value": "Premium (Up to 50 sites)"
                   },
                   {
                      "name": "Administration Support",
                      "value": "Basic (Customer Managed)"
                   }
                ],
                "serviceRelationship": [
                   {
                      "id": "326d13f45b5620102dff5e92dc81c785",
                      "relationshipType": "Requires"
                   }
                ],
                "serviceSpecification": {
                   "id": "f99546ff07266010a7955b7e0ad300a8",
                   "name": "Managed Firewall Service",
                   "@type": "Managed Firewall Service"
                }
             },
             "relatedParty": [
                {
                   "firstName": "Mike",
                   "lastName": "Hudson",
                   "email": "mike@example.com",
                   "phone": "1234567890",
                   "@type": "RelatedParty",
                   "@referredType": "OrderLineItemContact"
                }
             ],
             "place": {
                "id": "920cf6ac73d423002728660c4cf6a799",
                "@type": "Place"
             }
          }
       ],
       "relatedParty": [
            {
                "id": "eaf68911c35420105252716b7d40ddde",
                "name": "Sally Thomas",
                "@type": "RelatedParty",
                "@referredType": "CustomerContact"
            },
            {
                "id": "ffc68911c35420105252716b7d40dd55",
                "name": "Funco Intl",
                "@type": "RelatedParty",
                "@referredType": "Customer"
            },
            {
                "id": "59f16de1c3b67110ff00ed23a140dd9e",
                "name": "Funco External",
                "@type": "RelatedParty",
                "@referredType": "Consumer"
            }
        ]
    }" \
    --user 'username':'password'

Response body:

    {
       "externalId": "BSS748",
       "requestedStartDate": "2018-01-15T09:37:40.508Z",
       "requestedCompletionDate": "2018-01-15T09:37:40.508Z",
       "@type": "ServiceOrder",
       "note": [
          {
             "text": "This is a TMF service order illustration"
          },
          {
             "text": "This is a TMF service order illustration no 2"
          }
       ],
       "serviceOrderItem": [
          {
             "id": "100",
             "action": "add",
             "actionReason":"adding service package OLI",
             "quantity": 1,
             "@type": "ServiceOrderItem",
             "service": {
                "@type": "CFS",
                "serviceCharacteristic": [
                   {
                      "name": "Firewall Security",
                      "value": "Standard"
                   },
                   {
                      "name": "Firewall coverage",
                      "value": "Premium (Up to 50 sites)"
                   },
                   {
                      "name": "Administration Support",
                      "value": "Basic (Customer Managed)"
                   }
                ],
                "serviceRelationship": [
                   {
                      "id": "326d13f45b5620102dff5e92dc81c785",
                      "relationshipType": "Requires"
                   }
                ],
                "serviceSpecification": {
                   "id": "f99546ff07266010a7955b7e0ad300a8",
                   "name": "Managed Firewall Service",
                   "@type": "Managed Firewall Service",
                   "internalVersion": "2",
                   "version": "v2",
                   "internalId": "f99546ff07266010a7955b7e0ad300a8"
                }
             },
             "relatedParty": [
                {
                   "firstName": "Mike",
                   "lastName": "Hudson",
                   "email": "mike@example.com",
                   "phone": "1234567890",
                   "@type": "RelatedParty",
                   "@referredType": "OrderLineItemContact"
                }
             ],
             "place": {
                "id": "920cf6ac73d423002728660c4cf6a799",
                "@type": "Place"
             },
             "state": "new"
          }
       ],
       "relatedParty": [
            {
                "id": "eaf68911c35420105252716b7d40ddde",
                "name": "Sally Thomas",
                "@type": "RelatedParty",
                "@referredType": "CustomerContact"
            },
            {
                "id": "ffc68911c35420105252716b7d40dd55",
                "name": "Funco Intl",
                "@type": "RelatedParty",
                "@referredType": "Customer"
            },
            {
                "id": "59f16de1c3b67110ff00ed23a140dd9e",
                "name": "Funco External",
                "@type": "RelatedParty",
                "@referredType": "Consumer"
            }
        ],
       "id": "4f2af65ac3a030106e2473ce3640ddcf",
       "href": "/api/sn_tmf_api/order/serviceOrder/4f2af65ac3a030106e2473ce3640ddcf",
       "orderDate": "2024-06-20T10:38:55.000Z",
       "state": "new"
    }

### cURL request {#serviceorder-POST-order__example_vrq_jgm_gqb}

The following example updates a service order by setting the
serviceOrderItem.action property to
<kbd class="ph userinput">change</kbd>.

    curl "https://instance.service-now.com/api/sn_tmf_api/serviceorder" \
    --request POST \
    --header "Accept:application/json" \
    --header "Content-Type:application/json" \
    --data "{
       "externalId": "BSS748",
       "requestedStartDate": "2018-01-15T09:37:40.508Z",
       "requestedCompletionDate": "2018-01-15T09:37:40.508Z",
       "@type": "ServiceOrder",
       "note": [
          {
             "text": "This is a TMF service order illustration"
          },
          {
             "text": "This is a TMF service order illustration no 2"
          }
       ],
       "serviceOrderItem": [
          {
             "id": "100",
             "action": "change",
             "actionReason":"change service package OLI",
             "@type": "ServiceOrderItem",
             "service": {
                "@type": "CFS",
                "serviceCharacteristic": [
                   {
                      "name": "Firewall Security",
                      "value": "Premium",
                      "previousValue": "Standard"
                   }
                ],
                "id": "4b5072aec3a83010abc8b5183c40dd42"
             },
             "relatedParty": [
                {
                   "firstName": "Mike",
                   "lastName": "Hudson",
                   "email": "mike@example.com",
                   "phone": "1234567890",
                   "@type": "RelatedParty",
                   "@referredType": "OrderLineItemContact"
                }
             ],
             "place": {
                "id": "920cf6ac73d423002728660c4cf6a799",
                "@type": "Place"
             }
          }
       ],
       "relatedParty": [
            {
                "id": "eaf68911c35420105252716b7d40ddde",
                "name": "Sally Thomas",
                "@type": "RelatedParty",
                "@referredType": "CustomerContact"
            },
            {
                "id": "ffc68911c35420105252716b7d40dd55",
                "name": "Funco Intl",
                "@type": "RelatedParty",
                "@referredType": "Customer"
            },
            {
                "id": "59f16de1c3b67110ff00ed23a140dd9e",
                "name": "Funco External",
                "@type": "RelatedParty",
                "@referredType": "Consumer"
            }
        ]
    }" \
    --user 'username':'password'

Response body.

    {
       "externalId": "BSS748",
       "requestedStartDate": "2018-01-15T09:37:40.508Z",
       "requestedCompletionDate": "2018-01-15T09:37:40.508Z",
       "@type": "ServiceOrder",
       "note": [
          {
             "text": "This is a TMF service order illustration"
          },
          {
             "text": "This is a TMF service order illustration no 2"
          }
       ],
       "serviceOrderItem": [
          {
             "id": "100",
             "action": "change",
             "actionReason":"change service package OLI",
             "@type": "ServiceOrderItem",
             "service": {
                "@type": "CFS",
                "serviceCharacteristic": [
                   {
                      "name": "Firewall Security",
                      "value": "Premium",
                      "previousValue": "Standard"
                   }
                ],
                "id": "4b5072aec3a83010abc8b5183c40dd42"
             },
             "relatedParty": [
                {
                   "firstName": "Mike",
                   "lastName": "Hudson",
                   "email": "mike@example.com",
                   "phone": "1234567890",
                   "@type": "RelatedParty",
                   "@referredType": "OrderLineItemContact"
                }
             ],
             "place": {
                "id": "920cf6ac73d423002728660c4cf6a799",
                "@type": "Place"
             },
             "state": "new"
          }
       ],
       "relatedParty": [
            {
                "id": "eaf68911c35420105252716b7d40ddde",
                "name": "Sally Thomas",
                "@type": "RelatedParty",
                "@referredType": "CustomerContact"
            },
            {
                "id": "ffc68911c35420105252716b7d40dd55",
                "name": "Funco Intl",
                "@type": "RelatedParty",
                "@referredType": "Customer"
            },
            {
                "id": "59f16de1c3b67110ff00ed23a140dd9e",
                "name": "Funco External",
                "@type": "RelatedParty",
                "@referredType": "Consumer"
            }
        ],
       "id": "4f2af65ac3a030106e2473ce3640ddcf",
       "href": "/api/sn_tmf_api/order/serviceOrder/4f2af65ac3a030106e2473ce3640ddcf",
       "orderDate": "2024-06-20T10:38:55.000Z",
       "state": "new"
    }

### cURL request {#serviceorder-POST-order__example_f5w_jgm_gqb}

The following example deletes a service order line item by setting the
serviceOrderItem.action property to
<kbd class="ph userinput">delete</kbd>.

    curl "https://instance.service-now.com/api/sn_tmf_api/serviceorder" \
    --request POST \
    --header "Accept:application/json" \
    --header "Content-Type:application/json" \
    --data "{
       "externalId": "BSS748",
       "requestedStartDate": "2018-01-15T09:37:40.508Z",
       "requestedCompletionDate": "2018-01-15T09:37:40.508Z",
       "@type": "ServiceOrder",
       "note": [
          {
             "text": "This is a TMF service order illustration"
          },
          {
             "text": "This is a TMF service order illustration no 2"
          }
       ],
       "serviceOrderItem": [
          {
             "id": "100",
             "action": "delete",
             "actionReason":"delete service package OLI",
             "@type": "ServiceOrderItem",
             "service": {
                "@type": "CFS",
                "serviceCharacteristic": [
                   {
                      "name": "Firewall Security",
                      "value": "Premium",
                      "previousValue": "Standard"
                   }
                ],
                "id": "4b5072aec3a83010abc8b5183c40dd42"
             },
             "relatedParty": [
                {
                   "firstName": "Mike",
                   "lastName": "Hudson",
                   "email": "mike@example.com",
                   "phone": "1234567890",
                   "@type": "RelatedParty",
                   "@referredType": "OrderLineItemContact"
                }
             ],
             "place": {
                "id": "920cf6ac73d423002728660c4cf6a799",
                "@type": "Place"
             }
          }
       ],
       "relatedParty": [
            {
                "id": "eaf68911c35420105252716b7d40ddde",
                "name": "Sally Thomas",
                "@type": "RelatedParty",
                "@referredType": "CustomerContact"
            },
            {
                "id": "ffc68911c35420105252716b7d40dd55",
                "name": "Funco Intl",
                "@type": "RelatedParty",
                "@referredType": "Customer"
            },
            {
                "id": "59f16de1c3b67110ff00ed23a140dd9e",
                "name": "Funco External",
                "@type": "RelatedParty",
                "@referredType": "Consumer"
            }
        ]
    }" \
    --user 'username':'password'

Response body.

    {
       "externalId": "BSS748",
       "requestedStartDate": "2018-01-15T09:37:40.508Z",
       "requestedCompletionDate": "2018-01-15T09:37:40.508Z",
       "@type": "ServiceOrder",
       "note": [
          {
             "text": "This is a TMF service order illustration"
          },
          {
             "text": "This is a TMF service order illustration no 2"
          }
       ],
       "serviceOrderItem": [
          {
             "id": "100",
             "action": "delete",
             "actionReason":"delete service package OLI",
             "@type": "ServiceOrderItem",
             "service": {
                "@type": "CFS",
                "serviceCharacteristic": [
                   {
                      "name": "Firewall Security",
                      "value": "Premium",
                      "previousValue": "Standard"
                   }
                ],
                "id": "4b5072aec3a83010abc8b5183c40dd42"
             },
             "relatedParty": [
                {
                   "firstName": "Mike",
                   "lastName": "Hudson",
                   "email": "mike@example.com",
                   "phone": "1234567890",
                   "@type": "RelatedParty",
                   "@referredType": "OrderLineItemContact"
                }
             ],
             "place": {
                "id": "920cf6ac73d423002728660c4cf6a799",
                "@type": "Place"
             },
             "state": "new"
          }
       ],
       "relatedParty": [
            {
                "id": "eaf68911c35420105252716b7d40ddde",
                "name": "Sally Thomas",
                "@type": "RelatedParty",
                "@referredType": "CustomerContact"
            },
            {
                "id": "ffc68911c35420105252716b7d40dd55",
                "name": "Funco Intl",
                "@type": "RelatedParty",
                "@referredType": "Customer"
            },
            {
                "id": "59f16de1c3b67110ff00ed23a140dd9e",
                "name": "Funco External",
                "@type": "RelatedParty",
                "@referredType": "Consumer"
            }
        ],
       "id": "4f2af65ac3a030106e2473ce3640ddcf",
       "href": "/api/sn_tmf_api/order/serviceOrder/4f2af65ac3a030106e2473ce3640ddcf",
       "orderDate": "2024-06-20T10:38:55.000Z",
       "state": "new"
    }

## Service Order Open API -- POST /sn_tmf_api/order/serviceOrder/outboundresponse {#ariaid-title7}

Updates the fulfillment state for the specified domain order records in the Outbound Request \[sn_tmt_core_outbound_request\] table.
To use this method, the Outbound Request table must contain the specified domain order record. Also, the method validation throws an error if the records or states specified in the request body are not located in the existing
outbound record.  
Note:  
You can't create new records in this table using this endpoint. For additional information on domain orders, see [Order Management data model](https://www.servicenow.com/docs/access?context=order-mgt-order-data-model&version=yokohama&pubname=yokohama-order-management&ft:locale=en-US).

### URL format

/api/sn_tmf_api/order/serviceOrder/outboundresponse

### Supported request parameters

{#serviceorder-POST-outboundresponse__entry__2}

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

{#serviceorder-POST-outboundresponse__entry__6}

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

{#serviceorder-POST-outboundresponse__entry__10}

| Name | Description |
|-|-|
| externalId | Required. Outbound request identifier of the domain orders record sent for fulfillment. Data type: String Table: In the request_id field in the Outbound Request \[sn_tmt_core_outbound_request\] table. |
| ServiceOrderItem | Required. List of domain orders whose external fulfillment state needs to be updated. Data type: Array of Objects "ServiceOrderItem": [ { "id": "String", "state": "String" } ] |
| ServiceOrderItem.id | Required. Sys_id of a domain order record for which to update the external fulfillment state. Data type: String Table: Domain Order \[sn_ind_tmt_orm_domain_order\] |
| ServiceOrderItem.state | Required. External fulfillment state of the domain order. Valid values: * error * fulfilled * pending Data type: String |
[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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "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.").
{#serviceorder-POST-outboundresponse__entry__20}{#serviceorder-POST-outboundresponse__accept-JSON-only-entry-RESTAPI}{#serviceorder-POST-outboundresponse__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]

{#serviceorder-POST-outboundresponse__entry__26}

| 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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "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.").
{#serviceorder-POST-outboundresponse__entry__30}{#serviceorder-POST-outboundresponse__entry-500-status-code}

| Status code | Description |
|-|-|
| 201 | Successful. The request was successfully processed. |
| 400 | Bad Request. Could be any of the following reasons: * Invalid payload: externalId is missing: Indicates that the external ID (externalId) was not passed. * Invalid payload: serviceOrderItem state is missing: Indicates that the external fulfillment state (ServiceOrderItem.state) was not passed in one or more domain orders. * Invalid external id. Please pass the correct external id: Indicates that the passed external ID (externalId) is not present in system. * Invalid domain order id. Please pass the correct domain order id: Indicates that the passed domain order ID (ServiceOrderItem.id) is not present in the system. * Domain order id passed is not associated with external id: Indicates that the external ID (externalId) is not associated with any domain orders. The system only updates domain orders that are associated with an external ID passed in the payload. * Invalid fulfilment state: Please provide correct fulfilment state: Indicates that the passed fulfilment state (ServiceOrderItem.state) for one or more domain orders is not valid. {#serviceorder-POST-outboundresponse__ul_b4t_bqy_wxb} |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 36. Status codes]

### Response body parameters (JSON)

{#serviceorder-POST-outboundresponse__table_y44_214_21c__entry__2}

| Name | Description |
|-|-|
| externalId | Outbound request identifier of the domain orders record sent for fulfillment. Data type: String Table: In the request_id field in the Outbound Request \[sn_tmt_core_outbound_request\] table. |
| href | Relative link to the resource record. Data type: String Default: Blank string |
| orderDate | Date and timestamp of the order. Format: YYYY-MM-DD HH:MM:SS Data type: String Default: Blank string |
| ServiceOrderItem | List of domain orders whose external fulfillment state needs to be updated. Data type: Array of Objects "ServiceOrderItem": [ { "id": "String", "state": "String" } ] |
| ServiceOrderItem.id | Sys_id of a domain order record for which to update the external fulfillment state. Data type: String Table: Domain Order \[sn_ind_tmt_orm_domain_order\] |
| ServiceOrderItem.state | External fulfillment state of the domain order. Possible values: * error * fulfilled * pending {#serviceorder-POST-outboundresponse__ul_z44_214_21c} Data type: String |
[ ]

{#serviceorder-POST-outboundresponse__table_y44_214_21c}  

### cURL request

The following code example shows how to call this endpoint.

    curl "http://instance.servicenow.com/api/sn_tmf_api/serviceorder/outboundresponse" \ 
    --request POST \
    --header "Accept:application/json" \
    --data "{ 
      "externalId": "607017d243322110461f99612bb8f25c",
      "serviceOrderItem": [
        {
          "id": "19913c3577b301108e191e599a5a9988",
          "state": "error"
        }
      ]
    }"
    --user 'username':'password'

Response:

    {
      "externalId": "607017d243322110461f99612bb8f25c",
      "serviceOrderItem": [
        {
          "id": "19913c3577b301108e191e599a5a9988",
          "state": "error"
        }
      ]
    }


