Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Service Order Open API

The Service Order Open API provides endpoints that enable a standardized mechanism for placing service orders.

This API is a ServiceNow® implementation of the TM Forum Service Ordering Management API specification. This implementation is based on the TMF641 Service Ordering Management API User Guide v4.1.1, March 2021. The Service Order Open API is conformance certified by TM Forum

Image omitted: tmf-conformance.png
TMF conformance logo

To access this API, the Order Management for Telecommunications (sn_ind_tmt_orm) plugin must be activated. For more information, see Install Order Management. For information about Order Management tables and roles, see Components installed with Order Management.

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.

Parent Topic:REST API reference

Service Order Open API – GET /sn_tmf_api/order/serviceOrder

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]

URL format

/api/sn_tmf_api/order/serviceOrder

Supported request parameters

NameDescription
None 
NameDescription
fieldsList 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

offsetStarting 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
stateFilter 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.
NameDescription
None 

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.

HeaderDescription
None 
HeaderDescription
Content-RangeRange 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-TypeData format of the response body. Only supports application/json.
X-Total-CountFor paginated queries, this header specifies the total number of records available on the server.

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.

Status codeDescription
200Request successfully processed. Full resource returned in response \(no pagination\).
206Partial resource returned in response \(with pagination\).
400Bad request. Possible reasons: - Invalid path parameter - Invalid URI
404Record not found. No records matching the query parameters are found in the table.

Response body parameters (JSON)

NameDescription
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

expectedCompletionDateDate on which the order is to be completed.Data type: String
hrefRelative link to the resource record.Data type: String Default: Blank string
idSys\_id of the requested service order.Data type: String
noteOptional. List of additional notes made by the customer when ordering. Data type: Array
"note": [
  {
    "author": "String",
    "date": "String",
    "text": "String"
 }
]
note.authorUser name of the person that authored the associated note.Data type: String
note.dateDate that the note was created.Data type: String
note.textAdditional notes/comments made by the customer while ordering. Data type: String
orderDateDate and timestamp of the order.Format: YYYY-MM-DD HH:MM:SS Data type: String Default: Blank string
ponrFlag 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. Data type: Boolean
relatedPartyOptional. List of contacts for the order.Data type: Array of Objects
"relatedParty": [
  {
    "id": "String",
    "name": "String",
    "@referredType": "String",
    "@type": "String"
  }
]
relatedParty.idSys\_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.nameName of the account, customer, or consumer. Data type: String
relatedParty.@referredTypeType of customer. Possible values: - Consumer - Customer - CustomerContact Data type: String
relatedParty.@typePart of TMF Open API standard. Annotation for order line item contact. This value is always `RelatedParty`. This information is not stored. Data type: String
requestedCompletionDateOptional. Delivery date requested by the customer. Data type: String
requestedStartDateOptional. Order start date requested by the customer. Data type: String
serviceOrderItemRequired. 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",
    "serviceOrderItemRelationship": [Array],
    "quantity": "Number",
    "place": {Object},   
    "ponr": Boolean,
    "relatedParty": {Object},   
    "service": {Object},
    "state": "String",
    "@type": "String",
    "version": "String"
  }
]
serviceOrderItem.actionRequired. 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. Data type: String
serviceOrderItem.actionReasonReason 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.committedDueDateOptional. Optional. Date and time when the action must be performed on the order line item. Data type: String
serviceOrderItem.externalProductInventory

Conditional. List of external IDs mapped to the product inventories created for the order. If supplied, each entry requires externalProductInventoryId.Data type: Array of Objects

"externalProductInventory": [
  {
    "externalProductInventoryId": "String"
  }
]
serviceOrderItem.externalProductInventory.externalProductInventoryIdExternal ID mapped to the product inventory.Data type: String
serviceOrderItem.idRequired. 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.serviceOrderItemRelationship

Conditional. Item-level relationships. If supplied, each entry requires an id and relationshipType. Data type: Array

"serviceOrderItemRelationship:" [
  {
    "id": "String",
    "relationshipType": "String"
  }
]
serviceOrderItem.serviceOrderItemRelationship.idRequired. 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.serviceOrderItemRelationship.relationshipTypeRequired. Type of relationship between the two line items. This information is used to identify the relationship hierarchy. Possible values: - HasChild - HasParent - Requires `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.quantityNumber of line items ordered.Data type: Number
serviceOrderItem.place

Optional. Map of the locations on which to install the service. Requires serviceOrderItem.place.id if present.Data type: Object

"place:" {
  "id": "String",
  "@type": "String"
}
serviceOrderItem.place.idOptional. Sys_id of the associated location record in the Location [cmn_location] table. When employing the change action on a product order item (via theproductOrderItem.action parameter), updating the request with a new place sys_id creates a move order, where the order is not changed but is fulfilled in a new location. Data type: String
serviceOrderItem.place.@typePart of TMF Open API standard. Annotation for order line item contact. This value is always `Place`. This information is not stored. Data type: String
serviceOrderItem.ponrFlag 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. Data type: Boolean
serviceOrderItem.relatedPartyOptional. List of contacts for line items. Data type: Array ``` "relatedParty:" [ { "email": "String", "firstName": "String" "id": "String", "lastName": "String", "phone": "String", "@referredType": "String", "@type": "String" } ]
</td></tr><tr><td>

serviceOrderItem.relatedParty.email

</td><td>

Email address of the contact. Data type: String

</td></tr><tr><td>

serviceOrderItem.relatedParty.firstName

</td><td>

First name of the contact. Data type: String

</td></tr><tr><td>

serviceOrderItem.relatedParty.id

</td><td>

Required. 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

</td></tr><tr><td>

serviceOrderItem.relatedParty.lastName

</td><td>

Last name of the contact. Data type: String

</td></tr><tr><td>

serviceOrderItem.relatedParty.phone

</td><td>

Business phone number of the contact. Data type: String

</td></tr><tr><td>

serviceOrderItem.relatedParty.@referredType

</td><td>

Required. Type of customer. Possible value: OrderLineItemContact

 Data type: String

</td></tr><tr><td>

serviceOrderItem.relatedParty.@type

</td><td>

Part of TMF Open API standard. Annotation for order line item contact. This value is always `RelatedParty`. This information is not stored. Data type: String

</td></tr><tr><td>

serviceOrderItem.service

</td><td>

Required. Required. 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

Conditional. If supplied, each entry requires 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.valueCharacteristic option values associated with the service. For additional information on characteristic option values, see Create product characteristics and characteristic options. Data type: String
serviceOrderItem.service.serviceCharacteristic.valueTypeType of characteristic value.Possible values: - Array.Date - Array.Datetime - Array.Decimal - Array.Integer - Array.Object - Array.Single Line Test - Checkbox - Choice - Date, Address - Email - Integer, Date/Time - Object - Single Line Text - Yes/No Data type: String
serviceOrderItem.service.serviceRelationshipList of product inventories related to the service.Data type: Array of Objects
"serviceRelationship": [ 
  { 
    "id": "String", 
    "relationshipType": "String" 
  } 
] 
serviceOrderItem.service.serviceRelationship.idSys\_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.relationshipTypeType of relationship between the service and the product inventory. Possible value: Requires Data type: String
serviceOrderItem.service.serviceSpecification

Conditional. When supplied, serviceSpecification.id is required. 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.idRequired when serviceSpecification is present. 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.internalIdInitial 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.internalVersionVersion of the service specification.Data type: String Table: Service Specification \[sn\_prd\_pm\_service\_specification\]
serviceOrderItem.service.serviceSpecification.nameName of the service specification. Located in the Service Specification \[sn\_prd\_pm\_service\_specification\] table. Data type: String
serviceOrderItem.service.serviceSpecification.versionExternal\_version of the service specification.Data type: String Table: Service Specification \[sn\_prd\_pm\_service\_specification\]
serviceOrderItem.service.serviceSpecification.@typePart of the TMF Open API standard. This value is always `ServiceSpecificationRef`. This information is not stored. Data type: String
serviceOrderItem.service.serviceTypeService type.Data type: String
serviceOrderItem.service.stateState of the sold product. For example, new.Data type: String
serviceOrderItem.stateState of the service order item. For example, new.Data type: String
serviceOrderItem.versionService order line item version.Data type: String
serviceOrderItem.@typePart of the TMF Open API standard. This value is always `ServiceOrderItem`. This information is not stored.Data type: String
stateState of the service order. For more information, seeService order states.Data type: String
@typePart of the TMF Open API standard. This value is always `ServiceOrder`. This information is not stored.Data type: String

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}

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]

URL format

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

Supported request parameters

NameDescription
idSys\_id of the service order to retrieve.Data type: String Table: Order \[sn\_ind\_tmt\_orm\_order\]
NameDescription
None 
NameDescription
None 

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.

HeaderDescription
None 
HeaderDescription
Content-TypeData format of the response body. Only supports application/json.

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.

Status codeDescription
200Request 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": "/" } ] } ```
400Bad request. Possible reasons:- Missing query parameter - Invalid URI
404Not found. The requested item wasn't found.

Response body parameters (JSON)

NameDescription
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

expectedCompletionDateDate on which the order is to be completed.Data type: String
idSys\_id of the requested service order.Data type: String
hrefRelative link to the resource record.Data type: String Default: Blank string
noteOptional. List of additional notes made by the customer when ordering. Data type: Array
"note": [
  {
   "author": "String",
   "date": "String",
   "text": "String"
 }
]
note.authorUser name of the person that authored the associated note.Data type: String
note.dateDate that the note was created.Data type: String
note.textAdditional notes/comments made by the customer while ordering. Data type: String
orderDateDate and timestamp of the order.Format: YYYY-MM-DD HH:MM:SS Data type: String Default: Blank string
ponrFlag 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. Data type: Boolean
relatedPartyOptional. List of contacts for the order.Data type: Array of Objects
"relatedParty": [
  {
    "id": "String",
    "name": "String",
    "@referredType": "String",
    "@type": "String"
  }
]
relatedParty.idRequired. 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.nameName of the account, customer, or consumer. Data type: String
relatedParty.@referredTypeRequired. Type of customer. Possible values: - Consumer - Customer - CustomerContact Data type: String
relatedParty.@typePart of TMF Open API standard. Annotation for order line item contact. This value is always `RelatedParty`. This information is not stored. Data type: String
requestedCompletionDateOptional. Delivery date requested by the customer. Data type: String
requestedStartDateOptional. Order start date requested by the customer. Data type: String
reRequired. 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",
    "serviceOrderItemRelationship": [Array],
    "quantity": "Number",
    "place": {Object},   
    "ponr": Boolean,
    "relatedParty": {Object},   
    "service": {Object},
    "state": "String",
    "@type": "String",
    "version": "String"
  }
]
serviceOrderItem.actionRequired. 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 Data type: String
serviceOrderItem.actionReasonReason 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.committedDueDateOptional. Optional. Date and time when the action must be performed on the order line item. Data type: String
serviceOrderItem.externalProductInventory

Conditional. List of external IDs mapped to the product inventories created for the order. If supplied, each entry requires externalProductInventoryId.Data type: Array of Objects

"externalProductInventory": [
  {
    "externalProductInventoryId": "String"
  }
]
serviceOrderItem.externalProductInventory.externalProductInventoryIdExternal ID mapped to the product inventory.Data type: String
serviceOrderItem.idRequired. 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.serviceOrderItemRelationship

Conditional. Item-level relationships. If supplied, each entry requires an id and relationshipType. Data type: Array of Objects

"serviceOrderItemRelationship:" [
  {
    "id": "String",
    "relationshipType": "String"
  }
]
serviceOrderItem.serviceOrderItemRelationship.idRequired. 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.serviceOrderItemRelationship.relationshipTypeRequired. Type of relationship between the two line items. This information is used to identify the relationship hierarchy. Possible values: - HasChild - HasParent - Requires `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.quantityNumber of line items ordered.Data type: Number
serviceOrderItem.place

Optional. Map of the locations on which to install the service. Requires serviceOrderItem.place.id if present.Data type: Object

"place:" {
  "id": "String",
  "@type": "String"
}
serviceOrderItem.place.idSys_id of the associated location record in the Location [cmn_location] table. When employing the change action on a product order item (via theproductOrderItem.action parameter), updating the request with a new place sys_id creates a move order, where the order is not changed but is fulfilled in a new location. Data type: String
serviceOrderItem.place.@typePart of TMF Open API standard. Annotation for order line item contact. This value is always `Place`. This information is not stored. Data type: String
serviceOrderItem.ponrFlag 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. Data type: Boolean
serviceOrderItem.relatedPartyOptional. 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.emailEmail address of the contact. Data type: String
serviceOrderItem.relatedParty.firstNameFirst name of the contact. Data type: String
serviceOrderItem.relatedParty.idRequired. 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.lastNameLast name of the contact. Data type: String
serviceOrderItem.relatedParty.phoneBusiness phone number of the contact. Data type: String
serviceOrderItem.relatedParty.@referredTypeRequired. Type of customer. Possible value: OrderLineItemContact Data type: String
serviceOrderItem.relatedParty.@typePart of TMF Open API standard. Annotation for order line item contact. This value is always `RelatedParty`. This information is not stored. Data type: String
serviceOrderItem.serviceRequired. 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

Conditional. If supplied, each entry requires 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.nameRequired for each characteristic entry. Name of the characteristic record to associated with the service. Located in the Characteristic \[sn\_prd\_pm\_characteristic\] table. Data type: String Table/field updated: sn\_ind\_tmt\_orm\_order\_characteristic\_value/characteristics
serviceOrderItem.service.serviceCharacteristic.previousValuePrevious characteristic option values if the update is for change order. The request is a change order if the serviceOrderItem.action parameter is other than add. For additional information on characteristic option values, see Create product characteristics and characteristic options. Data type: String
serviceOrderItem.service.serviceCharacteristic.valueCharacteristic option values associated with the service. For additional information on characteristic option values, see Create product characteristics and characteristic options. Data type: String
serviceOrderItem.service.serviceCharacteristic.valueTypeType of characteristic value.Possible values: - Array.Date - Array.Datetime - Array.Decimal - Array.Integer - Array.Object - Array.Single Line Test - Checkbox - Choice - Date, Address - Email - Integer, Date/Time - Object - Single Line Text - Yes/No Data type: String
serviceOrderItem.service.serviceRelationshipList of product inventories related to the service.Data type: Array of Objects
"serviceRelationship": [ 
  { 
    "id": "String", 
    "relationshipType": "String" 
  } 
] 
serviceOrderItem.service.serviceRelationship.idSys\_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.relationshipTypeType of relationship between the service and the product inventory. Possible value: Requires Data type: String
serviceOrderItem.service.serviceSpecification

Conditional. When supplied, serviceSpecification.id is required. 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.idRequired when serviceSpecification is present. 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.internalIdInitial 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.internalVersionVersion of the service specification.Data type: String Table: Service Specification \[sn\_prd\_pm\_service\_specification\]
serviceOrderItem.service.serviceSpecification.nameName of the service specification. Located in the Service Specification \[sn\_prd\_pm\_service\_specification\] table. Data type: String
serviceOrderItem.service.serviceSpecification.versionExternal\_version of the service specification.Data type: String Table: Service Specification \[sn\_prd\_pm\_service\_specification\]
serviceOrderItem.service.serviceSpecification.@typePart of the TMF Open API standard. This value is always `ServiceSpecificationRef`. This information is not stored. Data type: String
serviceOrderItem.service.serviceTypeService type.Data type: String
serviceOrderItem.service.stateState of the sold product. For example, new.Data type: String
serviceOrderItem.stateState of the service order item. For example, new.Data type: String
serviceOrderItem.versionService order line item version.Data type: String
serviceOrderItem.@typePart of the TMF Open API standard. This value is always `ServiceOrderItem`. This information is not stored.Data type: String
stateState of the service order. For more information, seeService order states.Data type: String
@typePart of the TMF Open API standard. This value is always `ServiceOrder`. This information is not stored.Data type: String

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}

Updates the specified service order.

URL format

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

Supported request parameters

NameDescription
idSys\_id of the customer order to update.Data type: String Table: Customer Order \[sn\_ind\_tmt\_orm\_order\]
NameDescription
None 
NameDescription
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 suspend or resume, this parameter can't be updated.

Data type: String

Stored in: The committed_due_date field of the sn_ind_tmt_orm_order table.

descriptionOptional. Brief details about the given service order.Data type: String
externalIdOptional. Unique order number for the external service order. Data type: String Table/field updated: sn\_ind\_tmt\_orm\_order
noteOptional. List of additional notes made by the customer when ordering. Data type: Array of Objects
"note": [
  {
    "text": "String"
  }
]
Stored in: sn\_ind\_tmt\_orm\_order
note.textAdditional notes/comments made by the customer while ordering. Data type: String Stored in: The comments field of the sn\_ind\_tmt\_orm\_order table. Default: Blank string
relatedPartyList 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.idRequired. 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.nameName of the account, customer, or consumer. Data type: String
relatedParty.@referredTypeRequired. Type of customer. Possible values: - Consumer - Customer - CustomerContact Data type: String
relatedParty.@typePart of TMF Open API standard. Annotation for order line item contact. This value is always `RelatedParty`. This information is not stored. Data type: String
requestedCompletionDateOptional. Delivery date requested by the customer. Data type: String Stored in: The expected\_end\_date field of the sn\_ind\_tmt\_orm\_order table. Default: Blank string
requestedStartDateOptional. Order start date requested by the customer. Data type: String Stored in: The expected\_start\_date field of the sn\_ind\_tmt\_orm\_order table. Default: Blank string
serviceOrderItemRequired. List of line items in the service order and their associated action. Data type: Array of Objects
"serviceOrderItem:" [
  {
    "action": "String",
    "actionReason": "String",
    "committedDueDate": "String",
    "externalProductInventory": [Array],
    "id": "String",
    "serviceOrderItemRelationship": [Array],
    "place": {Object},
    "quantity": "Number",
    "relatedParty": {Object},
    "service": {Object},
    "@type": "String",
    "version": "String"
  }
]
Table/field updated: sn\_ind\_tmt\_orm\_order\_line\_item
serviceOrderItem.actionRequired. 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 For details, see Action types for customer and service orders. Data type: String Table/field updated: sn\_ind\_tmt\_orm\_order\_line\_item/action
serviceOrderItem.actionReasonOptional. 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.committedDueDateDate and time when the action must be performed on the order line item.If the action for the item is `suspend` or `resume`, 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

Conditional. If supplied, each entry requires externalProductInventoryId. 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.externalProductInventoryIdExternal 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.idRequired. 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.serviceOrderItemRelationship

Conditional. Item-level relationships. If supplied, each entry requires an id and relationshipType.Data type: Array of Objects

"serviceOrderItemRelationship:" [
  {
    "id": "String",
    "relationshipType": "String"
  }
]

Table/field updated: sn_ind_tmt_orm_order_line_item

serviceOrderItem.serviceOrderItemRelationship.idRequired. 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.serviceOrderItemRelationship.relationshipTypeRequired. Required. Type of relationship between the two line items. This information is used to identify the relationship hierarchy. Possible values: - HasChild - HasParent - Requires `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

Optional. Map of the locations on which to install the service. Requires serviceOrderItem.place.id if present.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. When employing the change action on a product order item (via theproductOrderItem.action parameter), updating the request with a new place sys_id creates a move order, where the order is not changed but is fulfilled in a new location. Data type: String

Table/field updated: sn_ind_tmt_orm_order_line_item/location

serviceOrderItem.place.@typePart 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.relatedPartyOptional. List of contacts for line items. Data type: Array
"relatedParty:" {
  "email": "String",
  "firstName": "String",
  "lastName": "String",
  "phone": "String",
  "@referredType": "String",
  "@type": "String"
}
serviceOrderItem.relatedParty.emailEmail address of the contact. Data type: String
serviceOrderItem.relatedParty.firstNameFirst name of the contact. Data type: String
serviceOrderItem.relatedParty.lastNameLast name of the contact. Data type: String
serviceOrderItem.relatedParty.phoneBusiness phone number of the contact. Data type: String
serviceOrderItem.relatedParty.@referredTypeRequired. Type of customer. Possible value: OrderLineItemContact Data type: String
serviceOrderItem.relatedParty.@typePart of TMF Open API standard. Annotation for order line item contact. This value is always `RelatedParty`. This information is not stored. Data type: String
serviceOrderItem.serviceRequired. 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"
}
Table/field updated: sn\_ind\_tmt\_orm\_order\_line\_item
serviceOrderItem.service.idUnique 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

Conditional. If supplied, each entry requires 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.nameRequired for each characteristic entry. 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.previousValuePrevious characteristic option values if the update is for change order. The request is a change order if the serviceOrderItem.action parameter is other than add. For additional information on characteristic option values, see Create product characteristics and characteristic options. Data type: String
serviceOrderItem.service.serviceCharacteristic.valueCharacteristic option values associated with the service. For additional information on characteristic option values, see Create product characteristics and characteristic options. Data type: String
serviceOrderItem.service.serviceCharacteristic.valueTypeType of characteristic value.Possible values: - Array.Date - Array.Datetime - Array.Decimal - Array.Integer - Array.Object - Array.Single Line Test - Checkbox - Choice - Date, Address - Email - Integer, Date/Time - Object - Single Line Text - Yes/No Data type: String
serviceOrderItem.service.serviceSpecification

Required. Conditional. When supplied, serviceSpecification.id is 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.

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.idRequired. Required when serviceSpecification is present. 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.nameRequired. Name of the service specification. Located in the Service Specification \[sn\_prd\_pm\_service\_specification\] table. Data type: String
serviceOrderItem.service.serviceSpecification.@typePart of the TMF Open API standard. This value is always `ServiceSpecificationRef`. This information is not stored. Data type: String
serviceOrderItem.@typePart of the TMF Open API standard. This value is always `ServiceOrderItem`. This information is not stored. Data type: String
@typePart of the TMF Open API standard. This value is always `ServiceOrder`. This information is not stored.Data type: String

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.

HeaderDescription
AcceptData format of the response body. Only supports application/json.
Content-TypeData format of the request body. Only supports application/json.
HeaderDescription
Content-TypeData format of the response body. Only supports application/json.

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.

Status codeDescription
200Successful. 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.
400Bad 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.
404Not found. The requested item was not found.

Response body parameters (JSON)

NameDescription
committedDueDate

Optional. 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

externalIdUnique order number for the external service order. Data type: String
hrefRelative link to the resource record.Data type: String Default: Blank string
idSys\_id of the service order.Data type: String
noteOptional. List of additional notes made by the customer when ordering. Data type: Array
"note": [
 {
   "text": "String"
 }
]
note.textAdditional notes/comments made by the customer while ordering. Data type: String
orderDateDate and timestamp of the order.Format: YYYY-MM-DD HH:MM:SS Data type: String Default: Blank string
relatedPartyOptional. List of contacts for the order.Data type: Array of Objects
"relatedParty": [
  {
    "id": "String",
    "name": "String",
    "@referredType": "String",
    "@type": "String"
  }
]
relatedParty.idSys\_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.nameName of the account, customer, or consumer. Data type: String
relatedParty.@referredTypeType of customer. Possible values: - Customer - CustomerContact - Consumer Data type: String
relatedParty.@typePart of TMF Open API standard. Annotation for order line item contact. This value is always `RelatedParty`. This information is not stored. Data type: String
requestedCompletionDateOptional. Delivery date requested by the customer. Data type: String
requestedStartDateOptional. Order start date requested by the customer. Data type: String
serviceOrderItemRequired. 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",
    "serviceOrderItemRelationship": [Array],
    "place": {Object},
    "quantity": "Number",
    "relatedParty": {Object},
    "service": {Object},
    "@type": "String",
    "version": "String"
  }
]
serviceOrderItem.actionRequired. 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 For details, see Action types for customer and service orders. Data type: String
serviceOrderItem.actionReasonReason 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.committedDueDateOptional. Date and time when the action must be performed on the order line item. Data type: String
serviceOrderItem.externalProductInventory

Conditional. If supplied, each entry requires externalProductInventoryId. 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.externalProductInventoryIdExternal ID mapped to the product inventory.Data type: String
serviceOrderItem.idUnique 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.serviceOrderItemRelationship

Conditional. Item-level relationships. If supplied, each entry requires an id and relationshipType. Data type: Array

"serviceOrderItemRelationship:" [
  {
    "id": "String",
    "relationshipType": "String"
  }
]
serviceOrderItem.serviceOrderItemRelationship.idRequired. 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.serviceOrderItemRelationship.relationshipTypeRequired. Type of relationship between the two line items. This information is used to identify the relationship hierarchy. Possible values: - HasChild - HasParent - Requires `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

Optional. Map of the locations on which to install the service. Requires serviceOrderItem.place.id if present.Data type: Object

"place:" {
  "id": "String",
  "@type": "String"
}
serviceOrderItem.place.idSys_id of the associated location record in the Location [cmn_location] table. When employing the change action on a product order item (via theproductOrderItem.action parameter), updating the request with a new place sys_id creates a move order, where the order is not changed but is fulfilled in a new location. Data type: String
serviceOrderItem.place.@typePart of TMF Open API standard. Annotation for order line item contact. This value is always `Place`. This information is not stored. Data type: String
serviceOrderItem.quantityNumber of line items ordered.Data type: Number
serviceOrderItem.relatedPartyOptional. List of contacts for line items. Data type: Array
"relatedParty:" {
  "email": "String",
  "firstName": "String",
  "lastName": "String",
  "phone": "String",
  "@referredType": "String",
  "@type": "String"
}
serviceOrderItem.relatedParty.emailEmail address of the contact. Data type: String
serviceOrderItem.relatedParty.firstNameFirst name of the contact. Data type: String
serviceOrderItem.relatedParty.lastNameLast name of the contact. Data type: String
serviceOrderItem.relatedParty.phoneBusiness phone number of the contact. Data type: String
serviceOrderItem.relatedParty.@referredTypeType of customer. Possible value: OrderLineItemContact Data type: String
serviceOrderItem.relatedParty.@typePart of TMF Open API standard. Annotation for order line item contact. This value is always `RelatedParty`. This information is not stored. Data type: String
serviceOrderItem.serviceRequired. 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.idUnique 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

Conditional. If supplied, each entry requires 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.nameRequired for each characteristic entry. 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.previousValuePrevious characteristic option values if the update is for change order. The request is a change order if the serviceOrderItem.action parameter is other than add. For additional information on characteristic option values, see Create product characteristics and characteristic options. Data type: String
serviceOrderItem.service.serviceCharacteristic.valueCharacteristic option values associated with the service. For additional information on characteristic option values, see Create product characteristics and characteristic options. Data type: String
serviceOrderItem.service.serviceCharacteristic.valueTypeType of characteristic value.Possible values: - Array.Date - Array.Datetime - Array.Decimal - Array.Integer - Array.Object - Array.Single Line Test - Checkbox - Choice - Date, Address - Email - Integer, Date/Time - Object - Single Line Text - Yes/No Data type: String
serviceOrderItem.service.serviceSpecification

Conditional. When supplied, serviceSpecification.id is required. Description of the service specification associated with the service. Data type: Object

"serviceSpecification:" {
  "id": "String",
  "name": "String",
  "@type": "String"
}
serviceOrderItem.service.serviceSpecification.idRequired when serviceSpecification is present. 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.nameName of the service specification. Located in the Service Specification \[sn\_prd\_pm\_service\_specification\] table. Data type: String
serviceOrderItem.service.serviceSpecification.@typePart of the TMF Open API standard. This value is always `ServiceSpecificationRef`. This information is not stored. Data type: String
serviceOrderItem.@typePart of the TMF Open API standard. This value is always `ServiceOrderItem`. This information is not stored.Data type: String
stateState of the service order. For more information, seeService order states.Data type: String

cURL request

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": "Choice",
            "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": "Choice",
            "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

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

NameDescription
None 
NameDescription
None 
NameDescription
cancellationReasonReason for cancellation.Data type: String Default: Blank string
serviceOrderData about the service order.Data type: Object
"serviceOrder": {
  "id": "String",
  "href": "String",
  "@referredType": "String"
}
serviceOrder.idRequired. Sys\_id of the customer order to cancel.Data type: String Table: Customer Order \[sn\_ind\_tmt\_orm\_order\]
serviceOrder.hrefURL of the customer order to cancel.Data type: String Default: Blank string
serviceOrder.@referredTypeValue for this parameter should be `ServiceOrder`.Data type: String Default: Blank string
requestedCancellationDateOptional. Date to cancel the order.Data type: String Default: Blank string
@typeValue for this parameter should be `CancelServiceOrder`.Data type: String Default: Blank string

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.

HeaderDescription
AcceptData format of the response body. Only supports application/json.
Content-TypeData format of the request body. Only supports application/json.
HeaderDescription
Content-TypeData format of the response body. Only supports application/json.

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.

Status codeDescription
200Successful. The request was successfully processed.
400Bad 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.

Response body parameters (JSON)

NameDescription
cancellationReasonReason for cancellation.Data type: String
idSys\_id of the cancelled order.Data type: String
serviceOrderData about the service order.Data type: Object
"serviceOrder": {
  "id": "String",
  "@referredType": "String"
}
serviceOrder.idSys\_id of the cancelled order.Data type: String
serviceOrder.@referredTypeValue for this parameter is `ServiceOrder`.Data type: String
requestedCancellationDateDate to cancel the order.Data type: String
stateState of the cancellation. If the cancellation request was successfully processed \(201 status code\), the value for this parameter is `done`.Data type: String
@typeValue 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

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]

URL format

/api/sn_tmf_api/order/serviceOrder

Supported request parameters

NameDescription
None 
NameDescription
modeEnables 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
NameDescription
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.

disableCharValueValidationFlag that indicates how to control characteristic value validation behavior for choice-type characteristics.Valid values: - true: Validation is disabled and `characteristic_option_value` is set directly from the request payload without generating work notes. - false: Validates characteristic values against allowed choices and adds a work note to the record for any invalid value. Default: false The system property, `sn_ind_tmt_orm.disableCharValueValidation`, allows you to revert to pre-fix behavior when needed. The property isn't shipped by default. To disable validation, create a system property named s`n_ind_tmt_orm.disableCharValueValidation` and set the value to `true`. When disabled, the value is set directly from the request payload and no work notes are generated.
externalIdOptional. Unique order number for the external service order. Data type: String Table/field updated: sn\_ind\_tmt\_orm\_order
hrefRelative link to the resource record.Data type: String Default: Blank string
noteOptional. List of additional notes made by the customer when ordering. Data type: Array of Objects
"note": [
  {
    "text": "String"
  }
]
Stored in: sn\_ind\_tmt\_orm\_order
note.textAdditional notes/comments made by the customer while ordering. Data type: String Stored in: The comments field of the sn\_ind\_tmt\_orm\_order table. Default: Blank string
orderDateDate and timestamp of the order.Format: YYYY-MM-DD HH:MM:SS Data type: String Default: Blank string
relatedPartyOptional. 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.idRequired. 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.nameName of the account, customer, or consumer. Data type: String
relatedParty.@referredTypeRequired. Type of customer. Possible values: - Customer - CustomerContact - Consumer Data type: String
relatedParty.@typePart of TMF Open API standard. Annotation for order line item contact. This value is always `RelatedParty`. This information is not stored. Data type: String
requestedCompletionDateOptional. Delivery date requested by the customer. Data type: String Stored in: The expected\_end\_date field of the sn\_ind\_tmt\_orm\_order table. Default: Blank string
requestedStartDateOptional. Order start date requested by the customer. Data type: String Stored in: The expected\_start\_date field of the sn\_ind\_tmt\_orm\_order table. Default: Blank string
serviceOrderItemRequired. List of line items in the service order and their associated action. Data type: Array of Objects
"serviceOrderItem:" [
  {
    "action": "String",
    "actionReason": "String",
    "committedDueDate": "String",
    "externalProductInventory": [Array],
    "id": "String",
    "serviceOrderItemRelationship": [Array],
    "place": {Object},
    "quantity": "Number",
    "relatedParty": {Object},
    "service": {Object},
    "@type": "String",
    "version": "String"
  }
]
Table/field updated: sn\_ind\_tmt\_orm\_order\_line\_item
serviceOrderItem.actionRequired. 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 For details, see Action types for customer and service orders. Data type: String Table/field updated: sn\_ind\_tmt\_orm\_order\_line\_item/action Default: add
ServiceOrderItem.actionReasonOptional. 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.committedDueDateOptional. 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

Conditional. If supplied, each entry requires externalProductInventoryId. External IDs to map to the product inventories created for the order.Data type: Array of Objects

"externalProductInventory": [
  {
    "externalProductInventoryId": "String"
  }
]
serviceOrderItem.externalProductInventory.externalProductInventoryIdExternal 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.idRequired. 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.serviceOrderItemRelationship

Conditional. Item-level relationships. If supplied, each entry requires an id and relationshipType.Data type: Array of Objects

"serviceOrderItemRelationship:" [
  {
    "id": "String",
    "relationshipType": "String"
  }
]

Table/field updated: sn_ind_tmt_orm_order_line_item

serviceOrderItem.serviceOrderItemRelationship.idRequired. 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.serviceOrderItemRelationship.relationshipTypeRequired. Required. Type of relationship between the two line items. This information is used to identify the relationship hierarchy. Possible values: - HasChild - HasParent - Requires `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

Optional. Map of the locations on which to install the service. Requires serviceOrderItem.place.id if present.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. When employing the change action on a product order item (via theproductOrderItem.action parameter), updating the request with a new place sys_id creates a move order, where the order is not changed but is fulfilled in a new location. Data type: String

Table/field updated: sn_ind_tmt_orm_order_line_item/location

Default: Blank string

serviceOrderItem.place.@typePart 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.relatedPartyOptional. List of contacts for line items. Data type: Array ``` "relatedParty:" { "email": "String", "firstName": "String", "lastName": "String", "phone": "String", "@referredType": "String", "@type": "String" }
</td></tr><tr><td>

serviceOrderItem.relatedParty.email

</td><td>

Email address of the contact. Data type: String

</td></tr><tr><td>

serviceOrderItem.relatedParty.firstName

</td><td>

First name of the contact. Data type: String

</td></tr><tr><td>

serviceOrderItem.relatedParty.lastName

</td><td>

Last name of the contact. Data type: String

</td></tr><tr><td>

serviceOrderItem.relatedParty.phone

</td><td>

Business phone number of the contact. Data type: String

</td></tr><tr><td>

serviceOrderItem.relatedParty.@referredType

</td><td>

Required. Type of customer. Possible value: OrderLineItemContact

 Data type: String

</td></tr><tr><td>

serviceOrderItem.relatedParty.@type

</td><td>

Part of TMF Open API standard. Annotation for order line item contact. This value is always `RelatedParty`. This information is not stored. Data type: String

</td></tr><tr><td>

serviceOrderItem.service

</td><td>

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" }
Table/field updated: sn\_ind\_tmt\_orm\_order\_line\_item

</td></tr><tr><td>

serviceOrderItem.service.id

</td><td>

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

</td></tr><tr><td>

serviceOrderItem.service.serviceCharacteristic

</td><td><p>Conditional. If supplied, each entry requires <strong>serviceOrderItem.service.serviceCharacteristic</strong>. List that describes the characteristics of the associated service. Only service characteristics with a current <strong>value</strong> different from the <strong>previousValue</strong> are returned.</p>
<p>Data type: Array</p>
<p><code>"serviceCharacteristic:" [ 
 {
  "name": "String",
  "previousValue": "String",
  "value": "String",
  "valueType": "String"
 }
]</code></p></td></tr><tr><td>

serviceOrderItem.service.serviceCharacteristic.name

</td><td>

Required for each characteristic entry. Name of the characteristic record to associated with the service. Located in the Characteristic \[sn\_prd\_pm\_characteristic\] table. Data type: String

</td></tr><tr><td>

serviceOrderItem.service.serviceCharacteristic.previousValue

</td><td>Previous characteristic option values if the update is for change order. The request is a change order if the <strong>serviceOrderItem.action</strong> parameter is other than <code>add</code>. For additional information on characteristic option values, see <a href="../../../order-management/som-product-config-add-characteristics/">Create product characteristics and characteristic options</a>. Data type: String</td></tr><tr><td>

serviceOrderItem.service.serviceCharacteristic.value

</td><td>

Characteristic option values associated with the service. For additional information on characteristic option values, see <a href="../../../order-management/som-product-config-add-characteristics/">Create product characteristics and characteristic options</a>. Data type: String

</td></tr><tr><td>

serviceOrderItem.service.serviceCharacteristic.valueType

</td><td>

Type of characteristic value.Possible values:

-   Array.Date
-   Array.Datetime
-   Array.Decimal
-   Array.Integer
-   Array.Object
-   Array.Single Line Test
-   Checkbox
-   Choice
-   Date, Address
-   Email
-   Integer, Date/Time
-   Object
-   Single Line Text
-   Yes/No

Data type: String

</td></tr><tr><td>

serviceOrderItem.service.serviceRelationship

</td><td>

List of product inventories related to the service.Data type: Array of Objects
"serviceRelationship": [ { "id": "String", "relationshipType": "String" } ]
</td></tr><tr><td>

serviceOrderItem.service.serviceRelationship.id

</td><td>

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.

</td></tr><tr><td>

serviceOrderItem.service.serviceRelationship.relationshipType

</td><td>

Type of relationship between the service and the product inventory. Possible value: Requires

Data type: String

</td></tr><tr><td>

serviceOrderItem.service.serviceSpecification

</td><td><p>Conditional. When supplied, <strong>serviceSpecification.id</strong> is required. Description of the service specification associated with the service. <strong>Note:</strong> Change orders (<strong>serviceOrderItem.action</strong> is <code>change</code>) are processed differently based on the value of the <strong>sn_ind_tmt_orm.allowSpecVersionUpdateInChangeOrder</strong> system property.</p>
<ul>
<li>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.</li>
<li>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.</li>
</ul>
<p>Data type: Object</p>
<p><code>"serviceSpecification:" {
  "id": "String",
  "internalVersion": "String",
  "name": "String",
  "version": "String",
  "@type": "String"
}</code></p>
<p>Stored in: The service_specification field of the Order Line Item [sn_ind_tmt_orm_order_line_item] table.</p></td></tr><tr><td>

serviceOrderItem.service.serviceSpecification.id

</td><td>Required when <strong>serviceSpecification</strong> is present. 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</td></tr><tr><td>

serviceOrderItem.service.serviceSpecification.internalVersion

</td><td>

Version of the service specification.Data type: String

Table: Service Specification \[sn\_prd\_pm\_service\_specification\]

</td></tr><tr><td>

serviceOrderItem.service.serviceSpecification.name

</td><td>

Required. Name of the service specification. Located in the Service Specification \[sn\_prd\_pm\_service\_specification\] table. Data type: String

</td></tr><tr><td>

serviceOrderItem.service.serviceSpecification.version

</td><td>

External\_version of the service specification.Data type: String

Table: Service Specification \[sn\_prd\_pm\_service\_specification\]

</td></tr><tr><td>

serviceOrderItem.service.serviceSpecification.@type

</td><td>

Part of the TMF Open API standard. This value is always `ServiceSpecificationRef`. This information is not stored. Data type: String

</td></tr><tr><td>

serviceOrderItem.@type

</td><td>

Part of the TMF Open API standard. This value is always `ServiceOrderItem`. This information is not stored. Data type: String

</td></tr><tr><td>

@type

</td><td>

Part of the TMF Open API standard. This value is always `ServiceOrder`. This information is not stored.Data type: String

</td></tr></tbody>
</table>

### 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](../rest-api-explorer/c_RESTAPI.md).

|Header|Description|
|------|-----------|
|Accept|Data format of the response body. Only supports **application/json**.|

|Header|Description|
|------|-----------|
|Content-Type|Data format of the response body. Only supports **application/json**.|

### 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](../rest-api-explorer/c_RESTAPI.md).

<table id="table_kmf_3jm_gqb"><thead><tr><th>

Status code

</th><th>

Description

</th></tr></thead><tbody><tr><td>

200

</td><td id="entry-200-status-code">

Successful. The request was successfully processed.

</td></tr><tr><td>

201

</td><td><p>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:</p>
<ul>
<li>The following Order Item characteristics does not exist: Review specification &lt;<strong>specification.name</strong>&gt; and correct the characteristic and characteristic option in the order line item prior to approving the order.</li>
<li>Order Item characteristic: &lt;<strong>characteristic.name</strong>&gt; with characteristic value: &lt;<strong>characteristic.value</strong>&gt; is invalid. Correct the characteristic values before approving the order.</li>
</ul></td></tr><tr><td>

202

</td><td>Accepted. Successful request for an order in asynchronous mode. That is, the request was made with the <strong>mode</strong> parameter set to <code>async</code> and the record is scheduled to be processed in the Inbound Queue [sn_tmt_core_inbound_queue] table.</td></tr><tr><td>

400

</td><td>Bad Request. Could be any of the following reasons:-   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: Customer Account or Consumer is missing - The related party customer or consumer object is missing from the payload.
-   Invalid payload: Order creation failed. - Not able to create the requested order.
-   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: Request body missing. - Payload was not passed in the request body.
-   Invalid payload: serviceOrderItem action is missing. – The service object or JSON is missing from the payload.
-   Invalid payload: serviceOrderItem ID is missing. – The ID is missing from the service order line item.
-   Invalid payload: serviceOrderItem missing. - Service order line item object or JSON is missing.
-   Invalid payload: serviceOrderItem service is missing. – The service property is missing from the service order line item.
-   Invalid payload: Service specification does not exist. - The service specification in the service order line item is not valid.
-   Invalid payload: serviceSpecification ID is missing. - The <strong>id</strong> parameter in the service order line item of the service specification object is missing from the payload.
-   Invalid payload: serviceSpecification is missing. - The service specification object or JSON in the service order line item 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.</td></tr><tr><td>

404

</td><td id="entry-404-status-code">

Not found. The requested item wasn't found.

</td></tr></tbody>
</table>

### Response body parameters \(JSON\)

<table><thead><tr><th>

Name

</th><th>

Description

</th></tr></thead><tbody><tr><td>

committedDueDate

</td><td><p>Date and time when the action must be performed on the order.</p>
<p>This value must be the same as or later than the <strong>committedDueDate</strong> values for each order line item.</p>
<p>Data type: String</p></td></tr><tr><td>

externalId

</td><td>

Unique order number for the external service order. Data type: String

</td></tr><tr><td>

href

</td><td>

Relative link to the resource record.Data type: String

Default: Blank string

</td></tr><tr><td>

id

</td><td>

Sys\_id of the service order.Data type: String

</td></tr><tr><td>

note

</td><td>

Optional. List of additional notes made by the customer when ordering. Data type: Array
"note": [ { "text": "String" } ]
</td></tr><tr><td>

note.text

</td><td>

Additional notes/comments made by the customer while ordering. Data type: String

</td></tr><tr><td>

orderDate

</td><td>

Date and timestamp of the order.Format: YYYY-MM-DD HH:MM:SS

Data type: String

Default: Blank string

</td></tr><tr><td>

orderId

</td><td><p>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.<strong>Note:</strong> This value is the only result if the order is created asynchronously using the <strong>mode</strong> query parameter.</p>
<div class="highlight"><pre><span></span><code>{
 &quot;orderId&quot;: &quot;b0fc877ac3ab5110856d73ce3640dde0&quot;
}
</code></pre></div>
<p>Data type: String</p></td></tr><tr><td>

relatedParty

</td><td>

Optional. List of contacts for the order.Data type: Array of Objects
"relatedParty": [ { "id": "String", "name": "String", "@referredType": "String", "@type": "String" } ]
</td></tr><tr><td>

relatedParty.id

</td><td>

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

</td></tr><tr><td>

relatedParty.name

</td><td>

Name of the account, customer, or consumer. Data type: String

</td></tr><tr><td>

relatedParty.@referredType

</td><td>

Type of customer. Possible values:

-   Customer
-   CustomerContact
-   Consumer

Data type: String

</td></tr><tr><td>

relatedParty.@type

</td><td>

Part of TMF Open API standard. Annotation for order line item contact. This value is always `RelatedParty`. This information is not stored. Data type: String

</td></tr><tr><td>

requestedCompletionDate

</td><td>

Optional. Delivery date requested by the customer. Data type: String

</td></tr><tr><td>

requestedStartDate

</td><td>

Optional. Order start date requested by the customer. Data type: String

</td></tr><tr><td>

serviceOrderItem

</td><td>

Required. 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", "serviceOrderItemRelationship": [Array], "place": {Object}, "quantity": "Number", "relatedParty": {Object}, "service": {Object}, "@type": "String", "version": "String" } ]
</td></tr><tr><td>

serviceOrderItem.action

</td><td>

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

For details, see <a href="../../../order-management/order-mgt-customer-order-types/">Action types for customer and service orders</a>.

Data type: String

</td></tr><tr><td>

ServiceOrderItem.actionReason

</td><td>

Description of the reason for adding the line item.Data type: String

Table: Order Line Item \[sn\_ind\_tmt\_orm\_order\_line\_item\]

</td></tr><tr><td>

serviceOrderItem.committedDueDate

</td><td>

Optional. Date and time when the action must be performed on the order line item.

Data type: String

</td></tr><tr><td>

serviceOrderItem.externalProductInventory

</td><td><p>Conditional. List of external IDs mapped to the product inventories created for the order. If supplied, each entry requires <strong>externalProductInventoryId</strong>.Data type: Array of Objects</p>
<div class="highlight"><pre><span></span><code>&quot;externalProductInventory&quot;: [
  {
    &quot;externalProductInventoryId&quot;: &quot;String&quot;
  }
]
</code></pre></div></td></tr><tr><td>

serviceOrderItem.externalProductInventory.externalProductInventoryId

</td><td>

External ID mapped to the product inventory.Data type: String

</td></tr><tr><td>

serviceOrderItem.id

</td><td>

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

</td></tr><tr><td>

serviceOrderItem.serviceOrderItemRelationship

</td><td><p>Conditional. Item-level relationships. If supplied, each entry requires an <strong>id</strong> and <strong>relationshipType</strong>. Data type: Array</p>
<div class="highlight"><pre><span></span><code>&quot;serviceOrderItemRelationship:&quot; [
  {
    &quot;id&quot;: &quot;String&quot;,
    &quot;relationshipType&quot;: &quot;String&quot;
  }
]
</code></pre></div></td></tr><tr><td>

serviceOrderItem.serviceOrderItemRelationship.id

</td><td>

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

</td></tr><tr><td>

serviceOrderItem.serviceOrderItemRelationship.relationshipType

</td><td>

Required. Type of relationship between the two line items. This information is used to identify the relationship hierarchy. Possible values:

-   HasChild
-   HasParent
-   Requires

`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

</td></tr><tr><td>

serviceOrderItem.place

</td><td><p>Optional. Map of the locations on which to install the service. Requires <strong>serviceOrderItem.place.id</strong> if present.Data type: Object</p>
<div class="highlight"><pre><span></span><code>&quot;place:&quot; {
  &quot;id&quot;: &quot;String&quot;,
  &quot;@type&quot;: &quot;String&quot;
}
</code></pre></div></td></tr><tr><td>

serviceOrderItem.place.id

</td><td>Sys_id of the associated location record in the Location [cmn_location] table. When employing the change action on a product order item (via the<strong>productOrderItem.action</strong> parameter), updating the request with a new place sys_id creates a move order, where the order is not changed but is fulfilled in a new location. Data type: String</td></tr><tr><td>

serviceOrderItem.place.@type

</td><td>

Part of TMF Open API standard. Annotation for order line item contact. This value is always `Place`. This information is not stored. Data type: String

</td></tr><tr><td>

serviceOrderItem.quantity

</td><td>

Number of line items ordered.Data type: Number

</td></tr><tr><td>

serviceOrderItem.relatedParty

</td><td>

Optional. List of contacts for line items. Data type: Array
"relatedParty:" { "email": "String", "firstName": "String", "lastName": "String", "phone": "String", "@referredType": "String", "@type": "String" }
</td></tr><tr><td>

serviceOrderItem.relatedParty.email

</td><td>

Email address of the contact. Data type: String

</td></tr><tr><td>

serviceOrderItem.relatedParty.firstName

</td><td>

First name of the contact. Data type: String

</td></tr><tr><td>

serviceOrderItem.relatedParty.lastName

</td><td>

Last name of the contact. Data type: String

</td></tr><tr><td>

serviceOrderItem.relatedParty.phone

</td><td>

Business phone number of the contact. Data type: String

</td></tr><tr><td>

serviceOrderItem.relatedParty.@referredType

</td><td>

Required. Type of customer. Possible value: OrderLineItemContact

Data type: String

</td></tr><tr><td>

serviceOrderItem.relatedParty.@type

</td><td>

Part of TMF Open API standard. Annotation for order line item contact. This value is always `RelatedParty`. This information is not stored. Data type: String

</td></tr><tr><td>

serviceOrderItem.service

</td><td>

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" }
</td></tr><tr><td>

serviceOrderItem.service.id

</td><td>

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

</td></tr><tr><td>

serviceOrderItem.service.serviceCharacteristic

</td><td><p>Conditional. If supplied, each entry requires <strong>serviceOrderItem.service.serviceCharacteristic</strong>. List that describes the characteristics of the associated service. Only service characteristics with a current <strong>value</strong> different from the <strong>previousValue</strong> are returned.</p>
<p>Data type: Array</p>
<div class="highlight"><pre><span></span><code>&quot;serviceCharacteristic:&quot; [ 
 {
  &quot;name&quot;: &quot;String&quot;,
  &quot;previousValue&quot;: &quot;String&quot;,
  &quot;value&quot;: &quot;String&quot;,
  &quot;valueType&quot;: &quot;String&quot;
 }
]
</code></pre></div></td></tr><tr><td>

serviceOrderItem.service.serviceCharacteristic.name

</td><td>

Required for each characteristic entry. Name of the characteristic record to associated with the service. Located in the Characteristic \[sn\_prd\_pm\_characteristic\] table. Data type: String

</td></tr><tr><td>

serviceOrderItem.service.serviceCharacteristic.previousValue

</td><td>Previous characteristic option values if the update is for change order. The request is a change order if the <strong>serviceOrderItem.action</strong> parameter is other than <code>add</code>. For additional information on characteristic option values, see <a href="../../../order-management/som-product-config-add-characteristics/">Create product characteristics and characteristic options</a>. Data type: String</td></tr><tr><td>

serviceOrderItem.service.serviceCharacteristic.value

</td><td>

Characteristic option values associated with the service. For additional information on characteristic option values, see <a href="../../../order-management/som-product-config-add-characteristics/">Create product characteristics and characteristic options</a>. Data type: String

</td></tr><tr><td>

serviceOrderItem.service.serviceCharacteristic.valueType

</td><td>

Type of characteristic value.Possible values:

-   Array.Date
-   Array.Datetime
-   Array.Decimal
-   Array.Integer
-   Array.Object
-   Array.Single Line Test
-   Checkbox
-   Choice
-   Date, Address
-   Email
-   Integer, Date/Time
-   Object
-   Single Line Text
-   Yes/No

Data type: String

</td></tr><tr><td>

serviceOrderItem.service.serviceRelationship

</td><td>

List of product inventories related to the service.Data type: Array of Objects
"serviceRelationship": [ { "id": "String", "relationshipType": "String" } ]
</td></tr><tr><td>

serviceOrderItem.service.serviceRelationship.id

</td><td>

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.

</td></tr><tr><td>

serviceOrderItem.service.serviceRelationship.relationshipType

</td><td>

Type of relationship between the service and the product inventory. Possible value: Requires

Data type: String

</td></tr><tr><td>

serviceOrderItem.service.serviceSpecification

</td><td><p>Conditional. When supplied, <strong>serviceSpecification.id</strong> is required. Description of the service specification associated with the service. Data type: Object</p>
<div class="highlight"><pre><span></span><code>&quot;serviceSpecification:&quot; {
  &quot;id&quot;: &quot;String&quot;,
  &quot;internalId&quot;: &quot;String&quot;,
  &quot;internalVersion&quot;: &quot;String&quot;,
  &quot;name&quot;: &quot;String&quot;,
  &quot;version&quot;: &quot;String&quot;,
  &quot;@type&quot;: &quot;String&quot;
}
</code></pre></div></td></tr><tr><td>

serviceOrderItem.service.serviceSpecification.id

</td><td>Required when <strong>serviceSpecification</strong> is present. 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</td></tr><tr><td>

serviceOrderItem.service.serviceSpecification.internalId

</td><td>

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.

</td></tr><tr><td>

serviceOrderItem.service.serviceSpecification.internalVersion

</td><td>

Version of the service specification.Data type: String

Table: Service Specification \[sn\_prd\_pm\_service\_specification\]

</td></tr><tr><td>

serviceOrderItem.service.serviceSpecification.name

</td><td>

Name of the service specification. Located in the Service Specification \[sn\_prd\_pm\_service\_specification\] table. Data type: String

</td></tr><tr><td>

serviceOrderItem.service.serviceSpecification.version

</td><td>

External\_version of the service specification.Data type: String

Table: Service Specification \[sn\_prd\_pm\_service\_specification\]

</td></tr><tr><td>

serviceOrderItem.service.serviceSpecification.@type

</td><td>

Part of the TMF Open API standard. This value is always `ServiceSpecificationRef`. This information is not stored. Data type: String

</td></tr><tr><td>

serviceOrderItem.state

</td><td>

State of the service order item. For example, new.Data type: String

</td></tr><tr><td>

serviceOrderItem.@type

</td><td>

Part of the TMF Open API standard. This value is always `ServiceOrderItem`. This information is not stored.Data type: String

</td></tr><tr><td>

state

</td><td>

State of the service order. For more information, see<a href="../../../order-management/service-order-mgt-state-values/">Service order states</a>.Data type: String

</td></tr><tr><td>

@type

</td><td id="type-entry-tmf641">

Part of the TMF Open API standard. This value is always `ServiceOrder`. This information is not stored.Data type: String

</td></tr></tbody>
</table>

### Processing asynchronously

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 `add`.
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", "valueType": "Choice", "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", "valueType": "Choice", "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

The following example updates a service order by setting the **serviceOrderItem.action** property to `change`.
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", "valueType": "Choice", "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", "valueType": "Choice", "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

The following example deletes a service order line item by setting the **serviceOrderItem.action** property to `delete`.
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", "valueType": "Choice", "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", "valueType": "Choice", "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

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 [Install Order Management](../../order-management/order-mgt-install-providers.md).

### URL format

`/api/sn_tmf_api/order/serviceOrder/outboundresponse`

### Supported request parameters

|Name|Description|
|----|-----------|
|None| |

|Name|Description|
|----|-----------|
|None| |

<table class="rest_api_request_body"><thead><tr><th>

Name

</th><th>

Description

</th></tr></thead><tbody><tr><td>

externalId

</td><td>

Optional. 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.

</td></tr><tr><td>

disableCharValueValidation

</td><td>

Flag that indicates how to control characteristic value validation behavior for choice-type characteristics.Valid values:

-   true: Validation is disabled and `characteristic_option_value` is set directly from the request payload without generating work notes.
-   false: Validates characteristic values against allowed choices and adds a work note to the record for any invalid value.

Default: false

To disable validation, create a system property named `sn_ind_tmt_orm.disableCharValueValidation` and set the value to `true`. When disabled, the value is set directly from the request payload and no work notes are generated. The property isn't shipped by default.

</td></tr><tr><td>

serviceOrderItem

</td><td>

Required. List of domain orders whose external fulfillment state needs to be updated. Data type: Array of Objects
"ServiceOrderItem": [ { "id": "String", "state": "String" } ]
</td></tr><tr><td>

serviceOrderItem.id

</td><td>

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\]

</td></tr><tr><td>

serviceOrderItem.state

</td><td>

Required. External fulfillment state of the domain order.Valid values:

-   error
-   fulfilled
-   pending

Data type: String

</td></tr></tbody>
</table>

### 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](../rest-api-explorer/c_RESTAPI.md).

|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**.|

|Header|Description|
|------|-----------|
|None| |

### 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](../rest-api-explorer/c_RESTAPI.md).

<table><thead><tr><th>

Status code

</th><th>

Description

</th></tr></thead><tbody><tr><td>

201

</td><td>

Successful. The request was successfully processed.

</td></tr><tr><td>

400

</td><td>Bad Request. Could be any of the following reasons:-   <code>Invalid payload: externalId is missing</code>: Indicates that the external ID (<strong>externalId</strong>) was not passed.
-   <code>Invalid payload: serviceOrderItem state is missing:</code> Indicates that the external fulfillment state (<strong>ServiceOrderItem.state</strong>) was not passed in one or more domain orders.
-   <code>Invalid external id. Please pass the correct external id</code>: Indicates that the passed external ID (<strong>externalId</strong>) is not present in system.
-   <code>Invalid domain order id. Please pass the correct domain order id</code>: Indicates that the passed domain order ID (<strong>ServiceOrderItem.id</strong>) is not present in the system.
-   <code>Domain order id passed is not associated with external id</code>: Indicates that the external ID (<strong>externalId</strong>) is not associated with any domain orders. The system only updates domain orders that are associated with an external ID passed in the payload.
-   <code>Invalid fulfilment state: Please provide correct fulfilment state</code>: Indicates that the passed fulfilment state (<strong>ServiceOrderItem.state</strong>) for one or more domain orders is not valid.</td></tr><tr><td>

500

</td><td id="entry-500-status-code">

Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.

</td></tr></tbody>
</table>

### Response body parameters \(JSON\)

<table id="table_y44_214_21c"><thead><tr><th>

Name

</th><th>

Description

</th></tr></thead><tbody><tr><td>

externalId

</td><td>

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.

</td></tr><tr><td>

href

</td><td>

Relative link to the resource record.Data type: String

Default: Blank string

</td></tr><tr><td>

orderDate

</td><td>

Date and timestamp of the order.Format: YYYY-MM-DD HH:MM:SS

Data type: String

Default: Blank string

</td></tr><tr><td>

serviceOrderItem

</td><td>

List of domain orders whose external fulfillment state needs to be updated. Data type: Array of Objects
"ServiceOrderItem": [ { "id": "String", "state": "String" } ]
</td></tr><tr><td>

serviceOrderItem.id

</td><td>

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\]

</td></tr><tr><td>

serviceOrderItem.state

</td><td>

External fulfillment state of the domain order.Possible values:

-   error
-   fulfilled
-   pending

Data type: String

</td></tr></tbody>
</table>

### 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" } ] } ```

sndocs is an independent community mirror and is not affiliated with or endorsed by ServiceNow.

ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are associated.

© 2026 ServiceNow, Inc. All rights reserved.

Documentation content is redistributed under the Apache License 2.0 from the ServiceNowDocs repository.