Service Order Open API
- UpdatedAug 3, 2023
- 48 minutes to read
- Vancouver
- API reference
The Service Order Open API provides a standardized mechanism for placing service orders.
This API is a ServiceNow® implementation of the Open API TMForum TMF641 Service Ordering Management API specification.
To access this API, the Order Management for Telecommunications (sn_ind_tmt_orm) plugin must be activated. For more information, see Install Order Management. For information about Order Management tables, entities, and relationships, see Order Management data model .
This API is provided within the sn_ind_tmt_orm
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.
Service Order Open API – GET /sn_ind_tmt_orm/serviceorder
Retrieves all service orders.
- 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_ind_tmt_orm/serviceorder
Supported request parameters
Name | Description |
---|---|
None |
Name | Description |
---|---|
fields | List of fields to return in the response. Invalid fields are ignored. If this
parameter is not used, all fields are returned. Data type: String |
limit | Maximum number of records to return. For requests that exceed this number of records, use the offset parameter to paginate record retrieval. Default: 20 Maximum: 100 Data type: Number |
offset | Starting index at which to begin retrieving records. Use this value to paginate record retrieval. This functionality enables the retrieval of all records, regardless of the number of records, in small manageable
chunks. Default: 0 Data type: Number |
state | Filter orders by state. Only orders with a state matching the value of this
parameter are returned in the response. Data type: String |
Name | Description |
---|---|
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.
Header | Description |
---|---|
None |
Header | Description |
---|---|
Content-Range | Specifies the range of content returned in a paginated call. For example, if
|
Content-Type | Data format of the response body. Only supports application/json. |
Link | Contains the following links to navigate through query results.
|
X-Total-Count | For 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 code | Description |
---|---|
200 | Request successfully processed. Full resource returned in response (no pagination). |
206 | Partial resource returned in response (with pagination). |
400 | Bad request. Possible reasons:
|
404 | Record not found. No records matching the query parameters are found in the table. |
Response body parameters (JSON)
Name | Description |
---|---|
committedDueDate | Date and time when the action must be performed on the order. This value must be the same as or later than the committedDueDate values for each order line item. Data type: String |
expectedCompletionDate | Date on which the order is to be completed. Data type: String |
id | Sys_id of the requested service order. Data type: String |
note | Array of objects that describe additional notes made by the customer when ordering.
Data type: Array
|
note.author | User name of the person that authored the associated note. Data type: String |
note.date | Date that the note was created. Data type: String |
note.text | Additional notes/comments made by the customer while ordering.
Data type: String |
ponr | Flag that indicates whether the point of no return for the order has been reached. Valid values: Data type: Boolean
|
relatedParty | List of contacts for the order. Each contact is an object in the array. Data type: Array
|
relatedParty.id | Sys_id or external_id of the account or
customer contact associated with the order. Located in the Account
[customer_account] or Contact [customer_contact] table.
Data type: String |
relatedParty.name | Name of the account or customer.
Data type: String |
relatedParty.@referredType | Type of customer.
Possible values:
Data type: String |
relatedParty.@type | 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 |
requestedCompletionDate | Delivery date requested by the customer.
Data type: String |
requestedStartDate | Order start date requested by the customer.
Data type: String |
serviceOrderItem | Array of objects that describes the line items in the service order and their associated action.
Data type: Array |
serviceOrderItem.action | Action to perform on the service order item. Possible actions are defined on the
Choice List tab in the Action Dictionary Entry field of the
sn_ind_tmt_orm_order_line_item table.
For details, see Action types for customer and service order management. Data type: String |
serviceOrderItem.committedDueDate | Date and time when the action must be performed on the order line item. Data type: String |
serviceOrderItem.externalProductInventory | Array of objects containing external ids mapped to the product inventories created for the order. Data type: Array
|
serviceOrderItem.externalProductInventory.externalProductInventoryId | External id mapped to the product inventory. Data type: String |
serviceOrderItem.id | Unique identifier of the line item. Located in the sn_ind_tmt_orm_external_id field of the Order Line Item [sn_ind_tmt_orm_order_line_item] table.
Data type: String |
serviceOrderItem.orderRelationship | Array of objects that describe the relationships between order line items.
Data type: Array
|
serviceOrderItem.orderRelationship.id | Unique identifier of the related line item.
Located in the sn_ind_tmt_orm_external_id field of the Order Line Item
[sn_ind_tmt_orm_order_line_item] table.
Data type: String |
serviceOrderItem.orderRelationship.relationshipType | Type of relationship between the two line items. This information is used to identify the relationship hierarchy.
Possible values:
HasChild and HasParent are used for parent/child relationships. Requires is used for horizontal relationships (a line item requires another line item).Data type: String |
serviceOrderItem.quantity | Number of line items ordered. Data type: Number |
serviceOrderItem.place | Map of the locations on which to install the service. Data type: Object
|
serviceOrderItem.place.id | Sys_id of the associated location record in the Location [cmn_location] table.
Data type: String |
serviceOrderItem.place.@type | Part of TMF Open API standard. Annotation
for order line item contact. This value is always Place. This
information is not stored.
Data type: String |
serviceOrderItem.ponr | Flag that indicates whether the point of no return for the order line item has been reached. Valid values: Data type: Boolean
|
serviceOrderItem.relatedParty | List of contacts for line items.
Data type: Array
|
serviceOrderItem.relatedParty.email | Email address of the contact.
Data type: String |
serviceOrderItem.relatedParty.firstName | First name of the contact.
Data type: String |
serviceOrderItem.relatedParty.id | Sys_id of the line item contact associated with the order line item. Located in the Order Line Item Contact [sn_ind_tmt_orm_order_line_item_contact] table.
Data type: String |
serviceOrderItem.relatedParty.lastName | Last name of the contact.
Data type: String |
serviceOrderItem.relatedParty.phone | Business phone number of the contact.
Data type: String |
serviceOrderItem.relatedParty.@referredType | Required. Type of customer.
Possible value: OrderLineItemContact Data type: String |
serviceOrderItem.relatedParty.@type | Part of TMF Open API standard.
Annotation for order line item contact. This value is always
RelatedParty. This information is not stored.
Data type: String |
serviceOrderItem.service | Description of the instance details of the service purchased by the customer.
Data type: Object
|
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
|
serviceOrderItem.service.serviceCharacteristic.value | Characteristic option values associated with the service. For additional information on characteristic option values, see Product Catalog data model and versioning.
Data type: String |
serviceOrderItem.service.serviceCharacteristic.valueType | Type of characteristic value. Data type: String |
serviceOrderItem.service.serviceRelationship | List of product inventories related to the service. Data type: Array
|
serviceOrderItem.service.serviceRelationship.id | Sys_id or sn_prd_invt_external_id of the product inventory. Located in the sys_id
or sn_prd_invt_external_id field of the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
serviceOrderItem.service.serviceRelationship.relationshipType | Type of relationship between the service and the product inventory. Possible value: Requires Data type: String |
serviceOrderItem.service.serviceSpecification | Description of the service specification associated with the service.
Data type: Object
|
serviceOrderItem.service.serviceSpecification.id | Initial_version or external_id of the
service specification. The initial_version is the sys_id of the first version of the
specification. Located in the sys_id or external_id field of the Service
Specification [sn_prd_pm_service_specification] table.
Data type: String |
serviceOrderItem.service.serviceSpecification.internalId | Initial_version of the service specification. The initial_version is the sys_id
of the first version of the specification. Located in the Service Specification
[sn_prd_pm_service_specification] table. Data type: String |
serviceOrderItem.service.serviceSpecification.internalVersion | Version of the service specification. Located in the Service Specification
[sn_prd_pm_service_specification] table. Data type: String |
serviceOrderItem.service.serviceSpecification.name | Name of the service specification. Located in
the Service Specification [sn_prd_pm_service_specification] table.
Data type: String |
serviceOrderItem.service.serviceSpecification.version | External_version of the service specification. Located in the Service
Specification [sn_prd_pm_service_specification] table. Data type: String |
serviceOrderItem.service.serviceSpecification.@type | Part of the TMF Open API standard. This value
is always ServiceSpecificationRef. This information is not
stored.
Data type: String |
serviceOrderItem.service.serviceType | Service type. Data type: String |
serviceOrderItem.service.state | State of the sold product. For example, new. Data type: String |
serviceOrderItem.state | State of the service order item. For example, new. Data type: String |
serviceOrderItem.version | Service order line item version. Data type: String |
serviceOrderItem.@type | Part of the TMF Open API standard. This value is always
ServiceOrderItem. This information is not stored. Data type: String |
state | State of the service order. For more information, seeService order states in Order Management. Data type: String |
@type | Part of the TMF Open API standard. This value is always
ServiceOrder. This information is not stored. Data type: String |
Example: cURL request
This example retrieves all service orders.
curl --location --request GET 'https://instance.service-now.com/api/sn_ind_tmt_orm/serviceorder' \
--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",
"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": "ffc68911c35420105252716b7d40dd55",
"name": "Example Company",
"@type": "RelatedParty",
"@referredType": "Customer"
},
{
"id": "eaf68911c35420105252716b7d40ddde",
"name": "Abel Tuter",
"@type": "RelatedParty",
"@referredType": "CustomerContact"
}
],
"state": "new",
"version": "1",
"@type": "ServiceOrder"
}
]
Service Order Open API – GET /sn_ind_tmt_orm/serviceorder/{id}
Retrieves a specified service order.
- 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_ind_tmt_orm/serviceorder/{id}
Supported request parameters
Name | Description |
---|---|
id | Sys_id of the service order to retrieve. Located in the Order
[sn_ind_tmt_orm_order] table. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
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.
Header | Description |
---|---|
None |
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.
Status code | Description |
---|---|
200 | Request
successfully processed. Full resource returned in response (no
pagination).
The response returns successful with an error
message if the selected order has processing issues.
|
400 | Bad request. Possible reasons:
|
404 | Not found. The requested item wasn't found. |
Response body parameters (JSON)
Name | Description |
---|---|
committedDueDate | Date and time when the action must be performed on the order. This value must be the same as or later than the committedDueDate values for each order line item. Data type: String |
expectedCompletionDate | Date on which the order is to be completed. Data type: String |
id | Sys_id of the requested service order. Data type: String |
note | Array of objects that describe additional notes made by the customer when ordering.
Data type: Array
|
note.author | User name of the person that authored the associated note. Data type: String |
note.date | Date that the note was created. Data type: String |
note.text | Additional notes/comments made by the customer while ordering.
Data type: String |
ponr | Flag that indicates whether the point of no return for the order has been reached. Valid values: Data type: Boolean
|
relatedParty | List of contacts for the order. Each contact is an object in the array. Data type: Array
|
relatedParty.id | Sys_id or external_id of the account or
customer contact associated with the order. Located in the Account
[customer_account] or Contact [customer_contact] table.
Data type: String |
relatedParty.name | Name of the account or customer.
Data type: String |
relatedParty.@referredType | Type of customer.
Possible values:
Data type: String |
relatedParty.@type | 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 |
requestedCompletionDate | Delivery date requested by the customer.
Data type: String |
requestedStartDate | Order start date requested by the customer.
Data type: String |
serviceOrderItem | Array of objects that describes the line items in the service order and their associated action.
Data type: Array
|
serviceOrderItem.action | Action to perform on the service order item. Possible actions are defined on the
Choice List tab in the Action Dictionary Entry field of the
sn_ind_tmt_orm_order_line_item table.
For details, see Action types for customer and service order management Data type: String |
serviceOrderItem.committedDueDate | Date and time when the action must be performed on the order line item. Data type: String |
serviceOrderItem.externalProductInventory | Array of objects containing external ids mapped to the product inventories created for the order. Data type: Array
|
serviceOrderItem.externalProductInventory.externalProductInventoryId | External id mapped to the product inventory. Data type: String |
serviceOrderItem.id | Unique identifier of the line item. Located in the sn_ind_tmt_orm_external_id field of the Order Line Item [sn_ind_tmt_orm_order_line_item] table.
Data type: String |
serviceOrderItem.orderRelationship | Array of objects that describe the relationships between order line items.
Data type: Array
|
serviceOrderItem.orderRelationship.id | Unique identifier of the related line item.
Located in the sn_ind_tmt_orm_external_id field of the Order Line Item
[sn_ind_tmt_orm_order_line_item] table.
Data type: String |
serviceOrderItem.orderRelationship.relationshipType | Type of relationship between the two line items. This information is used to identify the relationship hierarchy.
Possible values:
HasChild and HasParent are used for parent/child relationships. Requires is used for horizontal relationships (a line item requires another line item).Data type: String |
serviceOrderItem.quantity | Number of line items ordered. Data type: Number |
serviceOrderItem.place | Map of the locations on which to install the service. Data type: Object
|
serviceOrderItem.place.id | Sys_id of the associated location record in the Location [cmn_location] table.
Data type: String |
serviceOrderItem.place.@type | Part of TMF Open API standard. Annotation
for order line item contact. This value is always Place. This
information is not stored.
Data type: String |
serviceOrderItem.ponr | Flag that indicates whether the point of no return for the order line item has been reached. Valid values: Data type: Boolean
|
serviceOrderItem.relatedParty | List of contacts for line items.
Data type: Array
|
serviceOrderItem.relatedParty.email | Email address of the contact.
Data type: String |
serviceOrderItem.relatedParty.firstName | First name of the contact.
Data type: String |
serviceOrderItem.relatedParty.id | Sys_id of the line item contact associated with the order line item. Located in the Order Line Item Contact [sn_ind_tmt_orm_order_line_item_contact] table.
Data type: String |
serviceOrderItem.relatedParty.lastName | Last name of the contact.
Data type: String |
serviceOrderItem.relatedParty.phone | Business phone number of the contact.
Data type: String |
serviceOrderItem.relatedParty.@referredType | Required. Type of customer.
Possible value: OrderLineItemContact Data type: String |
serviceOrderItem.relatedParty.@type | Part of TMF Open API standard.
Annotation for order line item contact. This value is always
RelatedParty. This information is not stored.
Data type: String |
serviceOrderItem.service | Description of the instance details of the service purchased by the customer.
Data type: Object |
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
|
serviceOrderItem.service.serviceCharacteristic.value | Characteristic option values associated with the service. For additional information on characteristic option values, see Product Catalog data model and versioning.
Data type: String |
serviceOrderItem.service.serviceCharacteristic.valueType | Type of characteristic value. Data type: String |
serviceOrderItem.service.serviceRelationship | List of product inventories related to the service. Data type: Array
|
serviceOrderItem.service.serviceRelationship.id | Sys_id or sn_prd_invt_external_id of the product inventory. Located in the sys_id
or sn_prd_invt_external_id field of the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
serviceOrderItem.service.serviceRelationship.relationshipType | Type of relationship between the service and the product inventory. Possible value: Requires Data type: String |
serviceOrderItem.service.serviceSpecification | Description of the service specification associated with the service.
Data type: Object
|
serviceOrderItem.service.serviceSpecification.id | Initial_version or external_id of the
service specification. The initial_version is the sys_id of the first version of the
specification. Located in the sys_id or external_id field of the Service
Specification [sn_prd_pm_service_specification] table.
Data type: String |
serviceOrderItem.service.serviceSpecification.internalId | Initial_version of the service specification. The initial_version is the sys_id
of the first version of the specification. Located in the Service Specification
[sn_prd_pm_service_specification] table. Data type: String |
serviceOrderItem.service.serviceSpecification.internalVersion | Version of the service specification. Located in the Service Specification
[sn_prd_pm_service_specification] table. Data type: String |
serviceOrderItem.service.serviceSpecification.name | Name of the service specification. Located in
the Service Specification [sn_prd_pm_service_specification] table.
Data type: String |
serviceOrderItem.service.serviceSpecification.version | External_version of the service specification. Located in the Service
Specification [sn_prd_pm_service_specification] table. Data type: String |
serviceOrderItem.service.serviceSpecification.@type | Part of the TMF Open API standard. This value
is always ServiceSpecificationRef. This information is not
stored.
Data type: String |
serviceOrderItem.service.serviceType | Service type. Data type: String |
serviceOrderItem.service.state | State of the sold product. For example, new. Data type: String |
serviceOrderItem.state | State of the service order item. For example, new. Data type: String |
serviceOrderItem.version | Service order line item version. Data type: String |
serviceOrderItem.@type | Part of the TMF Open API standard. This value is always
ServiceOrderItem. This information is not stored. Data type: String |
state | State of the service order. For more information, seeService order states in Order Management. Data type: String |
@type | Part of the TMF Open API standard. This value is always
ServiceOrder. This information is not stored. Data type: String |
Example: cURL request
The following example retrieves a specified service order.
curl "https://instance.service-now.com/api/sn_ind_tmt_orm/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",
"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": "ffc68911c35420105252716b7d40dd55",
"name": "Example Company",
"@type": "RelatedParty",
"@referredType": "Customer"
},
{
"id": "eaf68911c35420105252716b7d40ddde",
"name": "Abel Tuter",
"@type": "RelatedParty",
"@referredType": "CustomerContact"
}
],
"state": "new",
"version": "1",
"@type": "ServiceOrder"
}
Service Order Open API - PATCH /sn_ind_tmt_orm/order/serviceorder/{id}
Updates the specified service order.
URL format
Default URL: /api/sn_ind_tmt_orm/order/serviceOrder/{id}
Supported request parameters
Name | Description |
---|---|
id | Sys_id of the customer order to update. Located in the Customer Order
[sn_ind_tmt_orm_order] table. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
committedDueDate | Date and time when the action must be performed on the order. This value must be the same as or later than the committedDueDate values for each order line item. If the action for order line items is suspend or resume, this parameter can't be updated. Data type: String Table/field updated: sn_ind_tmt_orm_order/committed_due_date |
externalId | Unique order number for the external service order.
Data type: String Table/field updated: sn_ind_tmt_orm_order |
note | Array of objects that describe additional notes made by the customer when ordering.
Data type: Array
Table/field updated: sn_ind_tmt_orm_order |
note.text | Additional notes/comments made by the customer while ordering.
Data type: String Table/field updated: sn_ind_tmt_orm_order/comments Default: Blank string |
orderDate | Date of the customer order request. Data type: String |
relatedParty | List of contacts for the order. Each contact is an object in the array. Data type: Array
|
relatedParty.id | Required. Sys_id or external_id of the account or customer contact associated with the order.
Located in the
Account
[customer_account] or Contact [customer_contact] table.
Data type: String Table updated: sn_ind_tmt_orm_order |
relatedParty.name | Name of the account or customer.
Data type: String |
relatedParty.@referredType | Type of customer.
Possible values:
Data type: String |
relatedParty.@type | 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 |
requestedCompletionDate | Delivery date requested by the customer.
Data type: String Table/field updated: sn_ind_tmt_orm_order/expected_end_date Default: Blank string |
requestedStartDate | Order start date requested by the customer.
Data type: String Table/field updated: sn_ind_tmt_orm_order/expected_start_date Default: Blank string |
serviceOrderItem | Required. Array of objects that describes the line items in the service order and their associated action.
Data type: Array
Table/field updated: sn_ind_tmt_orm_order_line_item |
serviceOrderItem.action | Required. Action to perform on the service order item. Possible actions are defined on the
Choice List tab in the Action Dictionary Entry field of the
sn_ind_tmt_orm_order_line_item table.
Possible values:
Data type: String Table/field updated: sn_ind_tmt_orm_order_line_item/action Default: add |
serviceOrderItem.committedDueDate | Date 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 Table/field updated: sn_ind_tmt_orm_order_line_item/committed_due_date |
serviceOrderItem.externalProductInventory | Array of objects containing external ids to map to the product inventories created for the order. Data type: Array
|
serviceOrderItem.externalProductInventory.externalProductInventoryId | External id to map to the product inventory. Data type: String Table/field updated: sn_ind_tmt_orm_order_line_item/external_inventory_id and sn_prd_invt_product_inventory/sn_prd_invt_external_id |
serviceOrderItem.id | Required. Unique
identifier of the line item. Located in the sn_ind_tmt_orm_external_id field of the
Order Line Item [sn_ind_tmt_orm_order_line_item] table.
Data type: String Table/field updated: sn_ind_tmt_orm_order_line_item/external_id |
serviceOrderItem.orderRelationship | Required. Array of objects that describe the
relationships between order line items. Data type: Array
Table/field updated: sn_ind_tmt_orm_order_line_item |
serviceOrderItem.orderRelationship.id | Required. Unique identifier of the related line item.
Located in the sn_ind_tmt_orm_external_id field of the Order Line Item
[sn_ind_tmt_orm_order_line_item] table.
Data type: String Table/field updated: sn_ind_tmt_orm_order_line_item/parent_line_item or sn_ind_tmt_orm_order_line_related_items/related_order_line_item |
serviceOrderItem.orderRelationship.relationshipType | Required. Type of relationship between the two line items. This information is used to identify the relationship hierarchy.
Possible values:
HasChild and HasParent are used for parent/child relationships. Requires is used for horizontal relationships (a line item requires another line item).Data type: String |
serviceOrderItem.place | Map of the locations on which to install the service. Data type: Object
|
serviceOrderItem.place.id | Required. Sys_id of the associated location record in the Location [cmn_location] table.
Data type: String Table/field updated: sn_ind_tmt_orm_order_line_item/location Default: Blank string |
serviceOrderItem.place.@type | Part of TMF Open API standard. Annotation for order line item place. Data type: String |
serviceOrderItem.quantity | Sets the number of line items to order. This property is only applicable when adding a service order; that is, the value of the action property is
Data type: Number Default: Empty string Table/field updated: sn_ind_tmt_orm_order/quantity |
serviceOrderItem.relatedParty | List of contacts for line items.
Data type: Array
|
serviceOrderItem.relatedParty.email | Email address of the contact.
Data type: String |
serviceOrderItem.relatedParty.firstName | First name of the contact.
Data type: String |
serviceOrderItem.relatedParty.lastName | Last name of the contact.
Data type: String |
serviceOrderItem.relatedParty.phone | Business phone number of the contact.
Data type: String |
serviceOrderItem.relatedParty.@referredType | Required. Type of customer.
Possible value: OrderLineItemContact Data type: String |
serviceOrderItem.relatedParty.@type | Part of TMF Open API standard.
Annotation for order line item contact. This value is always
RelatedParty. This information is not stored.
Data type: String |
serviceOrderItem.service | Required. Description of the instance details of the service purchased by the customer.
Data type: Object
Table/field updated: sn_ind_tmt_orm_order_line_item |
serviceOrderItem.service.id | Unique identifier of the service sold. This
value can be the sys_id or external ID in the Product Inventory
[sn_ind_tmt_orm_product_inventory] table. This value is only used for change/disconnect orders. Data type: String |
serviceOrderItem.service.serviceCharacteristic | List that
describes the characteristics of the associated service.
Only service characteristics with a current value different from the previousValue are returned. Data type: Array
|
serviceOrderItem.service.serviceCharacteristic.name | Name of the characteristic record to
associated with the service. Located in the Characteristic
[sn_prd_pm_characteristic] table.
Data type: String |
serviceOrderItem.service.serviceCharacteristic.previousValue | Previous characteristic option values if the update is for change order. The request is a change order if the serviceOrderItem.action parameter is other than
add. For additional information on characteristic option values, see.Product Catalog data model and versioning.
Data type: String |
serviceOrderItem.service.serviceCharacteristic.value | Characteristic option values associated with the service. For additional information on characteristic option values, see Product Catalog data model and versioning.
Data type: String |
serviceOrderItem.service.serviceSpecification | Required. Description of the service specification associated with the service.
Data type: Object
Updates the service_specification field in the Order Line Item [sn_ind_tmt_orm_order_line_item] table. |
serviceOrderItem.service.serviceSpecification.id | Required. Initial_version or external_id of the
service specification. The initial_version is the sys_id of the first version of the
specification. Located in the sys_id or external_id field of the Service
Specification [sn_prd_pm_service_specification] table.
Data type: String |
serviceOrderItem.service.serviceSpecification.name | Required. Name of the service specification. Located in
the Service Specification [sn_prd_pm_service_specification] table.
Data type: String |
serviceOrderItem.service.serviceSpecification.@type | Part of the TMF Open API standard. This value
is always ServiceSpecificationRef. This information is not
stored.
Data type: String |
serviceOrderItem.@type | Part of the TMF Open API standard. This value
is always ServiceOrderItem. This information is not stored.
Data type: String |
@type | Part 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.
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 |
---|---|
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.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
201 | Successful. If there are any issues with the characteristics or
characteristics option information, the endpoint stores the following comments in
the work notes fields of the associated Customer Order Line Item record:
|
400 | Bad Request. Could be any of the following reasons:
|
404 | Not found. The requested item was not found. |
Response body parameters (JSON)
Name | Description |
---|---|
committedDueDate | Date and time when the action must be performed on the order. This value must be the same as or later than the committedDueDate values for each order line item. Data type: String |
externalId | Unique order number for the external service order.
Data type: String |
id | Sys_id of the service order. Data type: String |
note | Array of objects that describe additional notes made by the customer when ordering.
Data type: Array
|
note.text | Additional notes/comments made by the customer while ordering.
Data type: String |
relatedParty | List of contacts for the order. Each contact is an object in the array. Data type: Array
|
relatedParty.id | Sys_id or external_id of the account or customer contact associated with the order.
Located in the
Account
[customer_account] or Contact [customer_contact] table.
Data type: String |
relatedParty.name | Name of the account or customer.
Data type: String |
relatedParty.@referredType | Type of customer.
Possible values:
Data type: String |
relatedParty.@type | 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 |
requestedCompletionDate | Delivery date requested by the customer.
Data type: String |
requestedStartDate | Order start date requested by the customer.
Data type: String |
serviceOrderItem | Array of objects that describes the line items in the service order and their associated action.
Data type: Array
|
serviceOrderItem.action | Action to perform on the service order item. Possible actions are defined on the
Choice List tab in the Action Dictionary Entry field of the
sn_ind_tmt_orm_order_line_item table.
Possible values:
Data type: String |
serviceOrderItem.committedDueDate | Date and time when the action must be performed on the order line item. Data type: String |
serviceOrderItem.externalProductInventory | Array of objects containing external ids mapped to the product inventories created for the order. Data type: Array
|
serviceOrderItem.externalProductInventory.externalProductInventoryId | External id mapped to the product inventory. Data type: String |
serviceOrderItem.id | Unique identifier of the line item. Located in the sn_ind_tmt_orm_external_id field of the Order Line Item [sn_ind_tmt_orm_order_line_item] table.
Data type: String |
serviceOrderItem.orderRelationship | Array of objects that describe the relationships between order line items.
Data type: Array
|
serviceOrderItem.orderRelationship.id | Unique identifier of the related line item.
Located in the sn_ind_tmt_orm_external_id field of the Order Line Item
[sn_ind_tmt_orm_order_line_item] table.
Data type: String |
serviceOrderItem.orderRelationship.relationshipType | Type of relationship between the two line items. This information is used to identify the relationship hierarchy.
Possible values:
HasChild and HasParent are used for parent/child relationships. Requires is used for horizontal relationships (a line item requires another line item).Data type: String |
serviceOrderItem.place | Map of the locations on which to install the service. Data type: Object
|
serviceOrderItem.place.id | Sys_id of the associated location record in the Location [cmn_location] table.
Data type: String |
serviceOrderItem.place.@type | Part of TMF Open API standard. Annotation
for order line item contact. This value is always Place. This
information is not stored.
Data type: String |
serviceOrderItem.quantity | Number of line items ordered. Data type: Number |
serviceOrderItem.relatedParty | List of contacts for line items.
Data type: Array
|
serviceOrderItem.relatedParty.email | Email address of the contact.
Data type: String |
serviceOrderItem.relatedParty.firstName | First name of the contact.
Data type: String |
serviceOrderItem.relatedParty.lastName | Last name of the contact.
Data type: String |
serviceOrderItem.relatedParty.phone | Business phone number of the contact.
Data type: String |
serviceOrderItem.relatedParty.@referredType | Required. Type of customer.
Possible value: OrderLineItemContact Data type: String |
serviceOrderItem.relatedParty.@type | Part of TMF Open API standard.
Annotation for order line item contact. This value is always
RelatedParty. This information is not stored.
Data type: String |
serviceOrderItem.service | Description of the instance details of the service purchased by the customer.
Data type: Object
|
serviceOrderItem.service.id | Unique identifier of the service sold. This
value can be the sys_id or external ID in the Product Inventory
[sn_ind_tmt_orm_product_inventory] table. This value is only returned for change/disconnect orders. Data type: String |
serviceOrderItem.service.serviceCharacteristic | List that
describes the characteristics of the associated service.
Only service characteristics with a current value different from the previousValue are returned. Data type: Array
|
serviceOrderItem.service.serviceCharacteristic.name | Name of the characteristic record to
associated with the service. Located in the Characteristic
[sn_prd_pm_characteristic] table.
Data type: String |
serviceOrderItem.service.serviceCharacteristic.previousValue | Previous characteristic option values if the update is for change order. The request is a change order if the serviceOrderItem.action parameter is other than
add. For additional information on characteristic option values, see.Product Catalog data model and versioning.
Data type: String |
serviceOrderItem.service.serviceCharacteristic.value | Characteristic option values associated with the service. For additional information on characteristic option values, see Product Catalog data model and versioning.
Data type: String |
serviceOrderItem.service.serviceSpecification | Description of the service specification associated with the service.
Data type: Object
|
serviceOrderItem.service.serviceSpecification.id | Initial_version or external_id of the
service specification. The initial_version is the sys_id of the first version of the
specification. Located in the sys_id or external_id field of the Service
Specification [sn_prd_pm_service_specification] table.
Data type: String |
serviceOrderItem.service.serviceSpecification.name | Name of the service specification. Located in
the Service Specification [sn_prd_pm_service_specification] table.
Data type: String |
serviceOrderItem.service.serviceSpecification.@type | Part of the TMF Open API standard. This value
is always ServiceSpecificationRef. This information is not
stored.
Data type: String |
serviceOrderItem.@type | Part of the TMF Open API standard. This value is always
ServiceOrderItem. This information is not stored. Data type: String |
state | State of the service order. For more information, seeService order states in Order Management. Data type: String |
Example: cURL request
This example shows how to update a service order.
curl -X PATCH 'https://instance.service-now.com/api/sn_ind_tmt_orm/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",
"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"
}
]
}'
Sarsij Kumar02:14
Change the response as well to the following
Sarsij Kumar02:14
{
"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",
"quantity": 1,
"@type": "ServiceOrderItem",
"service": {
"serviceState": "active",
"@type": "CFS",
"serviceCharacteristic": [
{
"name": "CPE Type",
"valueType": "string",
"value": "Virtual"
},
{
"name": "Administration Support",
"valueType": "string",
"value": "Basic( Customer Managed)"
},
{
"name": "Firewall coverage",
"valueType": "string",
"value": "Standard(Up to 20 sites)"
},
{
"name": "Firewall Security",
"valueType": "string",
"value": "Basic"
}
],
"serviceSpecification": {
"id": "f99546ff07266010a7955b7e0ad300a8",
"name": "Managed Firewall Service",
"internalVersion": "1",
"@type": "Managed Firewall Service",
"sys_id": "f99546ff07266010a7955b7e0ad300a8",
"version": "",
"status": "published",
"internalId": "f99546ff07266010a7955b7e0ad300a8"
},
"serviceRelationship": [
{
"id": "326d13f45b5620102dff5e92dc81c785",
"relationshipType": "Requires"
}
]
},
"place": {
"id": "5671dd2ec3a53010188473ce3640dd81",
"@type": "Place"
}
}
],
"relatedParty": [
{
"id": "eaf68911c35420105252716b7d40ddde",
"name": "Sally Thomas",
"@type": "RelatedParty",
"@referredType": "CustomerContact"
},
{
"id": "ffc68911c35420105252716b7d40dd55",
"name": "Funco Intl",
"@type": "RelatedParty",
"@referredType": "Customer"
}
],
"orderType": "add",
"state": "revision_received",
"href": "/api/sn_ind_tmt_orm/order/serviceOrder/a831e56e77602110c8b3a4d54b5a9954"
}
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",
"quantity": 1,
"@type": "ServiceOrderItem",
"service": {
"serviceState": "active",
"@type": "CFS",
"serviceCharacteristic": [
{
"name": "CPE Type",
"valueType": "string",
"value": "Virtual"
},
{
"name": "Administration Support",
"valueType": "string",
"value": "Basic( Customer Managed)"
},
{
"name": "Firewall coverage",
"valueType": "string",
"value": "Standard(Up to 20 sites)"
},
{
"name": "Firewall Security",
"valueType": "string",
"value": "Basic"
}
],
"serviceSpecification": {
"id": "f99546ff07266010a7955b7e0ad300a8",
"name": "Managed Firewall Service",
"internalVersion": "1",
"@type": "Managed Firewall Service",
"sys_id": "f99546ff07266010a7955b7e0ad300a8",
"version": "",
"status": "published",
"internalId": "f99546ff07266010a7955b7e0ad300a8"
},
"serviceRelationship": [
{
"id": "326d13f45b5620102dff5e92dc81c785",
"relationshipType": "Requires"
}
]
},
"place": {
"id": "5671dd2ec3a53010188473ce3640dd81",
"@type": "Place"
}
}
],
"relatedParty": [
{
"id": "eaf68911c35420105252716b7d40ddde",
"name": "Sally Thomas",
"@type": "RelatedParty",
"@referredType": "CustomerContact"
},
{
"id": "ffc68911c35420105252716b7d40dd55",
"name": "Funco Intl",
"@type": "RelatedParty",
"@referredType": "Customer"
}
],
"orderType": "add",
"state": "revision_received",
"href": "/api/sn_ind_tmt_orm/order/serviceOrder/a831e56e77602110c8b3a4d54b5a9954"
}
Service Order Open API - POST /sn_ind_tmt_orm/cancelserviceorder
Cancels the specified service order.
URL format
Default URL: /api/sn_ind_tmt_orm/cancelserviceorder
Supported request parameters
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Name | Description |
---|---|
cancellationReason | Reason for cancellation. Data type: String Default: Blank string |
serviceOrder | Contains data about the service order. Data type: Object
|
serviceOrder.id | Required. Sys_id of the customer order to cancel. Located in the Customer Order
[sn_ind_tmt_orm_order] table. Data type: String |
serviceOrder.href | URL of the customer order to cancel. Data type: String Default: Blank string |
serviceOrder.@referredType | The value for this parameter should be ServiceOrder .Data type: String Default: Blank string |
requestedCancellationDate | Date to cancel the order. Data type: String Default: Blank string |
@type | The value 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.
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 |
---|---|
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.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad Request. Could be any of the following
reasons:
|
Response body parameters (JSON)
Name | Description |
---|---|
cancellationReason | Reason for cancellation. Data type: String |
id | Sys_id of the cancelled order. Data type: String |
serviceOrder | Contains data about the service order. Data type: Object
|
serviceOrder.id | Sys_id of the cancelled order. Data type: String |
serviceOrder.@referredType | The value for this parameter is ServiceOrder .Data type: String |
requestedCancellationDate | Date to cancel the order. Data type: String |
state | State of the cancellation. If the cancellation request was successfully
processed (201 status code), the value for this parameter is
done .Data type: String |
@type | The value for this parameter is CancelServiceOrder .Data type: String |
Example: cURL request
The following code example cancels a customer order.
curl -X POST "https://instance.servicenow.com/api/sn_ind_tmt_orm/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_ind_tmt_orm/serviceorder
Creates, updates, or deletes a service order or line item.
- 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_ind_tmt_orm/serviceorder
Supported request parameters
Name | Description |
---|---|
None |
Name | Description |
---|---|
mode | Enables asynchronous order processing. That is,
the order is added to the Inbound Queue [sn_tmt_core_inbound_queue] table to be
created. If not included, the order is processed synchronously. Possible value: async Data type: String |
Name | Description |
---|---|
committedDueDate | Date and time when the action must be performed on the order.
This value must be the same as or later than the committedDueDate values for each order line item. Data type: String Table/field updated: sn_ind_tmt_orm_order/committed_due_date |
externalId | Unique order number for the external service order.
Data type: String Table/field updated: sn_ind_tmt_orm_order |
note | Array of objects that describe additional notes made by the customer when ordering.
Data type: Array
Table/field updated: sn_ind_tmt_orm_order |
note.text | Additional notes/comments made by the customer while ordering.
Data type: String Table/field updated: sn_ind_tmt_orm_order/comments Default: Blank string |
orderDate | Date of the customer order request. Data type: String |
relatedParty | List of contacts for the order. Each contact is an object in the array. Data type: Array
|
relatedParty.id | Required. Sys_id or external_id of the account or customer contact associated with the order.
Located in the
Account
[customer_account] or Contact [customer_contact] table.
Data type: String Table updated: sn_ind_tmt_orm_order |
relatedParty.name | Name of the account or customer.
Data type: String |
relatedParty.@referredType | Type of customer.
Possible values:
Data type: String |
relatedParty.@type | 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 |
requestedCompletionDate | Delivery date requested by the customer.
Data type: String Table/field updated: sn_ind_tmt_orm_order/expected_end_date Default: Blank string |
requestedStartDate | Order start date requested by the customer.
Data type: String Table/field updated: sn_ind_tmt_orm_order/expected_start_date Default: Blank string |
serviceOrderItem | Required. Array of objects that describes the line items in the service order and their associated action.
Data type: Array
Table/field updated: sn_ind_tmt_orm_order_line_item |
serviceOrderItem.action | Required. Action to perform on the service order item. Possible actions are defined on the
Choice List tab in the Action Dictionary Entry field of the
sn_ind_tmt_orm_order_line_item table.
Possible values:
Data type: String Table/field updated: sn_ind_tmt_orm_order_line_item/action Default: add |
serviceOrderItem.committedDueDate | Date and time when the action must be performed on the order line item.
Data type: String Table/field updated: sn_ind_tmt_orm_order_line_item/committed_due_date |
serviceOrderItem.externalProductInventory | Array of objects containing external ids to map to the product inventories created for the order. Data type: Array
|
serviceOrderItem.externalProductInventory.externalProductInventoryId | External id to map to the product inventory. Data type: String Table/field updated: sn_ind_tmt_orm_order_line_item/external_inventory_id and sn_prd_invt_product_inventory/sn_prd_invt_external_id |
serviceOrderItem.id | Required. Unique
identifier of the line item. Located in the sn_ind_tmt_orm_external_id field of the
Order Line Item [sn_ind_tmt_orm_order_line_item] table.
Data type: String Table/field updated: sn_ind_tmt_orm_order_line_item/external_id |
serviceOrderItem.orderRelationship | Required. Array of objects that describe the
relationships between order line items. Data type: Array
Table/field updated: sn_ind_tmt_orm_order_line_item |
serviceOrderItem.orderRelationship.id | Required. Unique identifier of the related line item.
Located in the sn_ind_tmt_orm_external_id field of the Order Line Item
[sn_ind_tmt_orm_order_line_item] table.
Data type: String Table/field updated: sn_ind_tmt_orm_order_line_item/parent_line_item or sn_ind_tmt_orm_order_line_related_items/related_order_line_item |
serviceOrderItem.orderRelationship.relationshipType | Required. Type of relationship between the two line items. This information is used to identify the relationship hierarchy.
Possible values:
HasChild and HasParent are used for parent/child relationships. Requires is used for horizontal relationships (a line item requires another line item).Data type: String |
serviceOrderItem.place | Map of the locations on which to install the service. Data type: Object
|
serviceOrderItem.place.id | Required. Sys_id of the associated location record in the Location [cmn_location] table.
Data type: String Table/field updated: sn_ind_tmt_orm_order_line_item/location Default: Blank string |
serviceOrderItem.place.@type | Part of TMF Open API standard. Annotation for order line item place. Data type: String |
serviceOrderItem.quantity | Sets the number of line items to order. This property is only applicable when adding a service order; that is, the value of the action property is
Data type: Number Default: Empty string Table/field updated: sn_ind_tmt_orm_order/quantity |
serviceOrderItem.relatedParty | List of contacts for line items.
Data type: Array
|
serviceOrderItem.relatedParty.email | Email address of the contact.
Data type: String |
serviceOrderItem.relatedParty.firstName | First name of the contact.
Data type: String |
serviceOrderItem.relatedParty.lastName | Last name of the contact.
Data type: String |
serviceOrderItem.relatedParty.phone | Business phone number of the contact.
Data type: String |
serviceOrderItem.relatedParty.@referredType | Required. Type of customer.
Possible value: OrderLineItemContact Data type: String |
serviceOrderItem.relatedParty.@type | Part of TMF Open API standard.
Annotation for order line item contact. This value is always
RelatedParty. This information is not stored.
Data type: String |
serviceOrderItem.service | Required. Description of the instance details of the service purchased by the customer.
Data type: Object
Table/field updated: sn_ind_tmt_orm_order_line_item |
serviceOrderItem.service.id | Unique identifier of the service sold. This
value can be the sys_id or external ID in the Product Inventory
[sn_ind_tmt_orm_product_inventory] table. This value is only used for change/disconnect orders. Data type: String |
serviceOrderItem.service.serviceCharacteristic | List that
describes the characteristics of the associated service.
Only service characteristics with a current value different from the previousValue are returned. Data type: Array
|
serviceOrderItem.service.serviceCharacteristic.name | Name of the characteristic record to
associated with the service. Located in the Characteristic
[sn_prd_pm_characteristic] table.
Data type: String |
serviceOrderItem.service.serviceCharacteristic.previousValue | Previous characteristic option values if the update is for change order. The request is a change order if the serviceOrderItem.action parameter is other than
add. For additional information on characteristic option values, see.Product Catalog data model and versioning.
Data type: String |
serviceOrderItem.service.serviceCharacteristic.value | Characteristic option values associated with the service. For additional information on characteristic option values, see Product Catalog data model and versioning.
Data type: String |
serviceOrderItem.service.serviceRelationship | List of product inventories related to the service. Data type: Array
|
serviceOrderItem.service.serviceRelationship.id | Sys_id or sn_prd_invt_external_id of the product inventory. Located in the sys_id
or sn_prd_invt_external_id field of the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
serviceOrderItem.service.serviceRelationship.relationshipType | Type of relationship between the service and the product inventory. Possible value: Requires Data type: String |
serviceOrderItem.service.serviceSpecification | Required. Description of the service specification associated with the service.
Data type: Object
Updates the service_specification field in the Order Line Item [sn_ind_tmt_orm_order_line_item] table. |
serviceOrderItem.service.serviceSpecification.id | Required. Initial_version or external_id of the
service specification. The initial_version is the sys_id of the first version of the
specification. Located in the sys_id or external_id field of the Service
Specification [sn_prd_pm_service_specification] table.
Data type: String |
serviceOrderItem.service.serviceSpecification.internalVersion | Version of the service specification. Located in the Service Specification
[sn_prd_pm_service_specification] table. Data type: String |
serviceOrderItem.service.serviceSpecification.name | Required. Name of the service specification. Located in
the Service Specification [sn_prd_pm_service_specification] table.
Data type: String |
serviceOrderItem.service.serviceSpecification.version | External_version of the service specification. Located in the Service
Specification [sn_prd_pm_service_specification] table. Data type: String |
serviceOrderItem.service.serviceSpecification.@type | Part of the TMF Open API standard. This value
is always ServiceSpecificationRef. This information is not
stored.
Data type: String |
serviceOrderItem.@type | Part of the TMF Open API standard. This value
is always ServiceOrderItem. This information is not stored.
Data type: String |
@type | Part 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.
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.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
201 | Successful. If there are any issues with the
characteristics or characteristics option information, the endpoint stores the
following comments in the work notes fields of the associated Customer Order Line
Item record:
|
202 | Accepted. Successful request for an order in
asynchronous mode. That is, the request was made with the mode
parameter set to async and the record is scheduled to be processed
in the Inbound Queue [sn_tmt_core_inbound_queue] table. |
400 | Bad Request. Could be any of the following
reasons:
|
404 | Not found. The requested item wasn't found. |
Response body parameters (JSON)
Name | Description |
---|---|
committedDueDate | Date and time when the action must be performed on the order. This value must be the same as or later than the committedDueDate values for each order line item. Data type: String |
externalId | Unique order number for the external service order.
Data type: String |
id | Sys_id of the service order. Data type: String |
note | Array of objects that describe additional notes made by the customer when ordering.
Data type: Array
|
note.text | Additional notes/comments made by the customer while ordering.
Data type: String |
orderId | Sys_id of the order to be created. Upon
succussful request, the order is added to the Inbound Queue
[sn_tmt_core_inbound_queue] table on a schedule to be processed. Note: This value is the only result if the order is created asynchronously using
the mode query parameter.
Data type: String |
relatedParty | List of contacts for the order. Each contact is an object in the array. Data type: Array
|
relatedParty.id | Sys_id or external_id of the account or customer contact associated with the order.
Located in the
Account
[customer_account] or Contact [customer_contact] table.
Data type: String |
relatedParty.name | Name of the account or customer.
Data type: String |
relatedParty.@referredType | Type of customer.
Possible values:
Data type: String |
relatedParty.@type | 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 |
requestedCompletionDate | Delivery date requested by the customer.
Data type: String |
requestedStartDate | Order start date requested by the customer.
Data type: String |
serviceOrderItem | Array of objects that describes the line items in the service order and their associated action.
Data type: Array
|
serviceOrderItem.action | Action to perform on the service order item. Possible actions are defined on the
Choice List tab in the Action Dictionary Entry field of the
sn_ind_tmt_orm_order_line_item table.
Possible values:
Data type: String |
serviceOrderItem.committedDueDate | Date and time when the action must be performed on the order line item. Data type: String |
serviceOrderItem.externalProductInventory | Array of objects containing external ids mapped to the product inventories created for the order. Data type: Array
|
serviceOrderItem.externalProductInventory.externalProductInventoryId | External id mapped to the product inventory. Data type: String |
serviceOrderItem.id | Unique identifier of the line item. Located in the sn_ind_tmt_orm_external_id field of the Order Line Item [sn_ind_tmt_orm_order_line_item] table.
Data type: String |
serviceOrderItem.orderRelationship | Array of objects that describe the relationships between order line items.
Data type: Array
|
serviceOrderItem.orderRelationship.id | Unique identifier of the related line item.
Located in the sn_ind_tmt_orm_external_id field of the Order Line Item
[sn_ind_tmt_orm_order_line_item] table.
Data type: String |
serviceOrderItem.orderRelationship.relationshipType | Type of relationship between the two line items. This information is used to identify the relationship hierarchy.
Possible values:
HasChild and HasParent are used for parent/child relationships. Requires is used for horizontal relationships (a line item requires another line item).Data type: String |
serviceOrderItem.place | Map of the locations on which to install the service. Data type: Object
|
serviceOrderItem.place.id | Sys_id of the associated location record in the Location [cmn_location] table.
Data type: String |
serviceOrderItem.place.@type | Part of TMF Open API standard. Annotation
for order line item contact. This value is always Place. This
information is not stored.
Data type: String |
serviceOrderItem.quantity | Number of line items ordered. Data type: Number |
serviceOrderItem.relatedParty | List of contacts for line items.
Data type: Array
|
serviceOrderItem.relatedParty.email | Email address of the contact.
Data type: String |
serviceOrderItem.relatedParty.firstName | First name of the contact.
Data type: String |
serviceOrderItem.relatedParty.lastName | Last name of the contact.
Data type: String |
serviceOrderItem.relatedParty.phone | Business phone number of the contact.
Data type: String |
serviceOrderItem.relatedParty.@referredType | Required. Type of customer.
Possible value: OrderLineItemContact Data type: String |
serviceOrderItem.relatedParty.@type | Part of TMF Open API standard.
Annotation for order line item contact. This value is always
RelatedParty. This information is not stored.
Data type: String |
serviceOrderItem.service | Description of the instance details of the service purchased by the customer.
Data type: Object
|
serviceOrderItem.service.id | Unique identifier of the service sold. This
value can be the sys_id or external ID in the Product Inventory
[sn_ind_tmt_orm_product_inventory] table. This value is only returned for change/disconnect orders. Data type: String |
serviceOrderItem.service.serviceCharacteristic | List that
describes the characteristics of the associated service.
Only service characteristics with a current value different from the previousValue are returned. Data type: Array
|
serviceOrderItem.service.serviceCharacteristic.name | Name of the characteristic record to
associated with the service. Located in the Characteristic
[sn_prd_pm_characteristic] table.
Data type: String |
serviceOrderItem.service.serviceCharacteristic.previousValue | Previous characteristic option values if the update is for change order. The request is a change order if the serviceOrderItem.action parameter is other than
add. For additional information on characteristic option values, see.Product Catalog data model and versioning.
Data type: String |
serviceOrderItem.service.serviceCharacteristic.value | Characteristic option values associated with the service. For additional information on characteristic option values, see Product Catalog data model and versioning.
Data type: String |
serviceOrderItem.service.serviceRelationship | List of product inventories related to the service. Data type: Array
|
serviceOrderItem.service.serviceRelationship.id | Sys_id or sn_prd_invt_external_id of the product inventory. Located in the sys_id
or sn_prd_invt_external_id field of the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
serviceOrderItem.service.serviceRelationship.relationshipType | Type of relationship between the service and the product inventory. Possible value: Requires Data type: String |
serviceOrderItem.service.serviceSpecification | Description of the service specification associated with the service.
Data type: Object
|
serviceOrderItem.service.serviceSpecification.id | Initial_version or external_id of the
service specification. The initial_version is the sys_id of the first version of the
specification. Located in the sys_id or external_id field of the Service
Specification [sn_prd_pm_service_specification] table.
Data type: String |
serviceOrderItem.service.serviceSpecification.internalId | Initial_version of the service specification. The initial_version is the sys_id
of the first version of the specification. Located in the Service Specification
[sn_prd_pm_service_specification] table. Data type: String |
serviceOrderItem.service.serviceSpecification.internalVersion | Version of the service specification. Located in the Service Specification
[sn_prd_pm_service_specification] table. Data type: String |
serviceOrderItem.service.serviceSpecification.name | Name of the service specification. Located in
the Service Specification [sn_prd_pm_service_specification] table.
Data type: String |
serviceOrderItem.service.serviceSpecification.version | External_version of the service specification. Located in the Service
Specification [sn_prd_pm_service_specification] table. Data type: String |
serviceOrderItem.service.serviceSpecification.@type | Part of the TMF Open API standard. This value
is always ServiceSpecificationRef. This information is not
stored.
Data type: String |
serviceOrderItem.state | State of the service order item. For example, new. Data type: String |
serviceOrderItem.@type | Part of the TMF Open API standard. This value is always
ServiceOrderItem. This information is not stored. Data type: String |
state | State of the service order. For more information, seeService order states in Order Management. Data type: String |
@type | Part of the TMF Open API standard. This value is always
ServiceOrder. This information is not stored. Data type: String |
Example: 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_ind_tmt_orm/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",
"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"
}
]
}'
Response body.
{
"orderId": "304e877ac3ab5110856d73ce3640dde5"
}
Example: 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_ind_tmt_orm/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",
"quantity": 1,
"@type": "ServiceOrderItem",
"service": {
"@type": "CFS",
"serviceCharacteristic": [
{
"name": "Firewall Security",
"value": "Standard"
},
{
"name": "Firewall coverage",
"value": "Premium (Up to 50 sites)"
},
{
"name": "Administration Support",
"value": "Basic (Customer Managed)"
}
],
"serviceRelationship": [
{
"id": "326d13f45b5620102dff5e92dc81c785",
"relationshipType": "Requires"
}
],
"serviceSpecification": {
"id": "f99546ff07266010a7955b7e0ad300a8",
"name": "Managed Firewall Service",
"@type": "Managed Firewall Service"
}
},
"relatedParty": [
{
"firstName": "Mike",
"lastName": "Hudson",
"email": "mike@example.com",
"phone": "1234567890",
"@type": "RelatedParty",
"@referredType": "OrderLineItemContact"
}
],
"place": {
"id": "920cf6ac73d423002728660c4cf6a799",
"@type": "Place"
}
}
],
"relatedParty": [
{
"id": "eaf68911c35420105252716b7d40ddde",
"name": "Abel Tuter",
"@type": "RelatedParty",
"@referredType": "CustomerContact"
},
{
"id": "ffc68911c35420105252716b7d40dd55",
"name": "Example Company",
"@type": "RelatedParty",
"@referredType": "Customer"
}
]
}" \
--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",
"quantity": 1,
"@type": "ServiceOrderItem",
"service": {
"@type": "CFS",
"serviceCharacteristic": [
{
"name": "Firewall Security",
"value": "Standard"
},
{
"name": "Firewall coverage",
"value": "Premium (Up to 50 sites)"
},
{
"name": "Administration Support",
"value": "Basic (Customer Managed)"
}
],
"serviceRelationship": [
{
"id": "326d13f45b5620102dff5e92dc81c785",
"relationshipType": "Requires"
}
],
"serviceSpecification": {
"id": "f99546ff07266010a7955b7e0ad300a8",
"name": "Managed Firewall Service",
"@type": "Managed Firewall Service",
"internalVersion": "2",
"version": "v2",
"internalId": "f99546ff07266010a7955b7e0ad300a8"
}
},
"relatedParty": [
{
"firstName": "Mike",
"lastName": "Hudson",
"email": "mike@example.com",
"phone": "1234567890",
"@type": "RelatedParty",
"@referredType": "OrderLineItemContact"
}
],
"place": {
"id": "920cf6ac73d423002728660c4cf6a799",
"@type": "Place"
},
"state": "new"
}
],
"relatedParty": [
{
"id": "eaf68911c35420105252716b7d40ddde",
"name": "Abel Tuter",
"@type": "RelatedParty",
"@referredType": "CustomerContact"
},
{
"id": "ffc68911c35420105252716b7d40dd55",
"name": "Example Company",
"@type": "RelatedParty",
"@referredType": "Customer"
}
],
"id": "4f2af65ac3a030106e2473ce3640ddcf",
"state": "new"
}
Example: 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_ind_tmt_orm/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",
"@type": "ServiceOrderItem",
"service": {
"@type": "CFS",
"serviceCharacteristic": [
{
"name": "Firewall Security",
"value": "Premium",
"previousValue": "Standard"
}
],
"id": "4b5072aec3a83010abc8b5183c40dd42"
},
"relatedParty": [
{
"firstName": "Mike",
"lastName": "Hudson",
"email": "mike@example.com",
"phone": "1234567890",
"@type": "RelatedParty",
"@referredType": "OrderLineItemContact"
}
],
"place": {
"id": "920cf6ac73d423002728660c4cf6a799",
"@type": "Place"
}
}
],
"relatedParty": [
{
"id": "eaf68911c35420105252716b7d40ddde",
"name": "Abel Tuter",
"@type": "RelatedParty",
"@referredType": "CustomerContact"
},
{
"id": "ffc68911c35420105252716b7d40dd55",
"name": "Example Company",
"@type": "RelatedParty",
"@referredType": "Customer"
}
]
}" \
--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",
"@type": "ServiceOrderItem",
"service": {
"@type": "CFS",
"serviceCharacteristic": [
{
"name": "Firewall Security",
"value": "Premium",
"previousValue": "Standard"
}
],
"id": "4b5072aec3a83010abc8b5183c40dd42"
},
"relatedParty": [
{
"firstName": "Mike",
"lastName": "Hudson",
"email": "mike@example.com",
"phone": "1234567890",
"@type": "RelatedParty",
"@referredType": "OrderLineItemContact"
}
],
"place": {
"id": "920cf6ac73d423002728660c4cf6a799",
"@type": "Place"
},
"state": "new"
}
],
"relatedParty": [
{
"id": "eaf68911c35420105252716b7d40ddde",
"name": "Abel Tuter",
"@type": "RelatedParty",
"@referredType": "CustomerContact"
},
{
"id": "ffc68911c35420105252716b7d40dd55",
"name": "Example Company",
"@type": "RelatedParty",
"@referredType": "Customer"
}
],
"id": "4f2af65ac3a030106e2473ce3640ddcf",
"state": "new"
}
Example: 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_ind_tmt_orm/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",
"@type": "ServiceOrderItem",
"service": {
"@type": "CFS",
"serviceCharacteristic": [
{
"name": "Firewall Security",
"value": "Premium",
"previousValue": "Standard"
}
],
"id": "4b5072aec3a83010abc8b5183c40dd42"
},
"relatedParty": [
{
"firstName": "Mike",
"lastName": "Hudson",
"email": "mike@example.com",
"phone": "1234567890",
"@type": "RelatedParty",
"@referredType": "OrderLineItemContact"
}
],
"place": {
"id": "920cf6ac73d423002728660c4cf6a799",
"@type": "Place"
}
}
],
"relatedParty": [
{
"id": "eaf68911c35420105252716b7d40ddde",
"name": "Abel Tuter",
"@type": "RelatedParty",
"@referredType": "CustomerContact"
},
{
"id": "ffc68911c35420105252716b7d40dd55",
"name": "Example Company",
"@type": "RelatedParty",
"@referredType": "Customer"
}
]
}" \
--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",
"@type": "ServiceOrderItem",
"service": {
"@type": "CFS",
"serviceCharacteristic": [
{
"name": "Firewall Security",
"value": "Premium",
"previousValue": "Standard"
}
],
"id": "4b5072aec3a83010abc8b5183c40dd42"
},
"relatedParty": [
{
"firstName": "Mike",
"lastName": "Hudson",
"email": "mike@example.com",
"phone": "1234567890",
"@type": "RelatedParty",
"@referredType": "OrderLineItemContact"
}
],
"place": {
"id": "920cf6ac73d423002728660c4cf6a799",
"@type": "Place"
},
"state": "new"
}
],
"relatedParty": [
{
"id": "eaf68911c35420105252716b7d40ddde",
"name": "Abel Tuter",
"@type": "RelatedParty",
"@referredType": "CustomerContact"
},
{
"id": "ffc68911c35420105252716b7d40dd55",
"name": "Example Company",
"@type": "RelatedParty",
"@referredType": "Customer"
}
],
"id": "4f2af65ac3a030106e2473ce3640ddcf",
"state": "new"
}
Service Order Open API – POST /sn_ind_tmt_orm/serviceorder/outboundresponse
Updates the fulfillment state for specified domain orders 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.
URL format
/api/sn_ind_tmt_orm/serviceorder/outboundresponse
Supported request parameters
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Name | Description |
---|---|
externalId | Required. Outbound request identifier of the domain orders record sent for fulfillment. Located in the request_id field in the Outbound Request [sn_tmt_core_outbound_request] table. Data type: String |
ServiceOrderItem | Required. List of domain orders whose external fulfillment state needs to be updated. Data type: Array of Objects
|
ServiceOrderItem.id | Required. Sys_id of a domain order record for which to update the external fulfillment state. Located in the Domain Order [sn_ind_tmt_orm_domain_order] table. Data type: String |
ServiceOrderItem.state | Required. External fulfillment state of the domain order. Valid values:
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.
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.
Status code | Description |
---|---|
201 | Successful. The request was successfully processed. |
400 | Bad Request. Could be any of the following reasons:
|
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters (JSON or XML)
Name | Description |
---|---|
Same as the request parameters. |
Example: cURL request
The following code example shows how to call this endpoint.
curl "http://instance.servicenow.com/api/sn_ind_tmt_orm/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"
}
]
}
On this page
- Service Order Open API – GET /sn_ind_tmt_orm/serviceorder
- Service Order Open API – GET /sn_ind_tmt_orm/serviceorder/{id}
- Service Order Open API - PATCH /sn_ind_tmt_orm/order/serviceorder/{id}
- Service Order Open API - POST /sn_ind_tmt_orm/cancelserviceorder
- Service Order Open API – POST /sn_ind_tmt_orm/serviceorder
- Service Order Open API – POST /sn_ind_tmt_orm/serviceorder/outboundresponse