Product Inventory Open API
The Product Inventory Open API provides endpoints to create and retrieve product inventories.
Use this API to manage product inventory information between external systems and the ServiceNow AI Platform.
This API is included in the Product Inventory Advanced application, which is available on the ServiceNow Store.
This API is provided within the sn_prd_invt namespace.
The calling user must have the sn_prd_invt.product_inventory_integrator role.
- Product Characteristics [sn_prd_invt_product_characteristics]
- Product Inventory [sn_prd_invt_product_inventory]
- Product Model [cmdb_model]
- Product Model Characteristic [sn_prd_pm_product_model_characteristic]
The Product Inventory Open API is a ServiceNow® implementation of the TM Forum Product Inventory Management API REST specification. This implementation is based on the TMF637 Product Inventory Management API REST Specification Release 19, August 2019. The Product Inventory Open API is conformance certified by TM Forum.
Product Inventory Open API - GET /sn_prd_invt/product
Retrieves a list of all product inventories.
URL format
Default URL: api/sn_prd_invt/product
Supported request parameters
| Name | Description |
|---|---|
| None |
| Name | Description |
|---|---|
| customer | Filter
product inventories by customer. Only product offerings with a
customer sys_id or external ID matching the value of this parameter are returned in
the response. Data type: String |
| 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 |
| place | Filter
product inventories by place. Only product offerings with a place
sys_id or external id matching the value of this parameter are returned in the
response. Data type: String |
| status | Filter
product inventories by status. Only product inventories with a
status 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 |
|---|---|
| href | Relative link to the product inventory record. Data type: String |
| id | Sys_id of the product inventory
from
the Product Inventory [sn_prd_invt_product_inventory]
table. Data type: String |
| name | Name of the product inventory. Data type: String |
| place | Place associated with the product. Data type: String |
| productCharacteristic | List of product characteristics. Data type: Array |
| productCharacteristic.name | Name
of the characteristic. Data type: String |
| productCharacteristic.value | Value of the characteristic. Data type: String |
| productOffering | Product offering that the product inventory is associated with. Data type: Object |
| productOffering.id | Initial_version or external_id of the product offering. Located in the Product
Offering [sn_prd_pm_product_offering] table. Data type: String |
| productOffering.internalId | Initial_version of the product offering. Located in the Product Offering
[sn_prd_pm_product_offering] table. Data type: String |
| productOffering.internalVersion | Version of the product offering. Located in the Product Offering
[sn_prd_pm_product_offering] table. Data type: String |
| productOffering.name | Name of the product offering. Located in the Product Offering
[sn_prd_pm_product_offering] table. Data type: String |
| productOffering.version | External_version of the product offering. Located in the Product Offering
[sn_prd_pm_product_offering] table. Data type: String |
| productPrice | Returns an empty array. Data type: Array |
| productRelationship | List of related products. Data type: Array |
| productRelationship.productId | Sys_id of the related product from the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
| productRelationship.relationshipType | Type of relationship. Data type: String |
| productSpecification | Product specification for the product. Data type: Object |
| productSpecification.id | Initial_version or external_id of the product specification. Located in the
Product Specification [sn_prd_pm_product_specification] table. Data type: String |
| productSpecification.internalId | Initial_version of the product specification. Located in the Product
Specification [sn_prd_pm_product_specification] table. Data type: String |
| productSpecification.internalVersion | Version of the product specification. Located in the Product Specification
[sn_prd_pm_product_specification] table. Data type: String |
| productSpecification.version | External_version of the product specification. Located in the Product
Specification [sn_prd_pm_product_specification] table. Data type: String |
| realizingResource | Resource that realizes the product. The realizing resource is a child product
inventory of this product inventory. Data type: Object |
| realizingResource.id | Sys_id of the realizing resource. Located in the
Product Inventory [sn_prd_invt_product_inventory] table.
Data type: String |
| realizingResource.type | Type of the realizing resource. Valid value: child Data type: String |
| realizingService | Service that realizes the product. The realizing service is a child product
inventory of this product inventory. Data type: Object |
| realizingService.id | Sys_id of the realizing service. Located in the
Product Inventory [sn_prd_invt_product_inventory] table.
Data type: String |
| realizingService.type | Type of the realizing service. Valid value: child Data type: String |
| relatedParty | List of parties associated with the ticket. Data type: Array |
| relatedParty.id | Sys_id of the account or customer contact associated with the ticket. Located in the Account [customer_account], Contact [customer_contact], or Consumer [csm_consumer] table. Data type: String |
| relatedParty.@referredType | Type of customer. Possible values:
Data type: String |
| state | Current state of the product. Data type: String |
cURL request
This example retrieves all product inventories.
curl --location --request GET "https://instance.service-now.com/api/sn_prd_invt/product" \
--user 'username':'password'
Response body.
[
{
"id": "037fd87ec3603010abc8b5183c40ddf2",
"relatedParty": [
{
"id": "ffc68911c35420105252716b7d40dd55",
"name": "Example Company",
"@type": "RelatedParty",
"@referredType": "Customer"
},
{
"id": "eaf68911c35420105252716b7d40ddde",
"name": "Sally Thomas",
"@type": "RelatedParty",
"@referredType": "CustomerContact"
}
],
"name": "Routing and Configuration PI0000318",
"productSpecification": {
"id": "aec57e981bb420106ba59acf034bcb08",
"name": "Routing and Configuration",
"version": "",
"internalVersion": "1",
"internalId": "aec57e981bb420106ba59acf034bcb08"
},
"status": "Active",
"productOffering": {
"id": "69017a0f536520103b6bddeeff7b127d",
"name": "Premium SD-WAN Offering",
"version": "",
"internalVersion": "1",
"internalId": "69017a0f536520103b6bddeeff7b127d"
},
"product": "ce0b52c7532520103b6bddeeff7b12f5",
"place": {
"id": "25ab9c4d0a0a0bb300f7dabdc0ca7c1c",
"name": "100 South Charles Street, Baltimore,MD"
},
"productCharacteristic": [],
"productRelationship": [],
"realizingService": [],
"realizingResource": [
{
"id": "9b2fa60b536520103b6bddeeff7b1233",
"name": "Route Target"
}
],
"productPrice": [],
"href": "/api/sn_prd_invt/product/037fd87ec3603010abc8b5183c40ddf2",
"billingAccount": "Not Specified."
}
]
Product Inventory Open API - GET /sn_prd_invt/product/{id}
Retrieves a specified product inventory record.
URL format
Default URL: /api/sn_prd_invt/product/{id}
Supported request parameters
| Name | Description |
|---|---|
| id | Sys_id of the product inventory to retrieve. Located in the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
| Name | Description |
|---|---|
| customer | Filter product inventories by customer. Only product offerings with a customer
sys_id or external id matching the value of this parameter are returned in the
response. Data type: String |
| 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 |
| place | Filter product inventories by place. Only product offerings with a place sys_id
or external id matching the value of this parameter are returned in the
response. Data type: String |
| status | Filter product inventories by status. Only product inventories with a status
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-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. |
| 400 | Bad Request. Could be any of the following reasons:
|
| 404 | Record not found. Record associated with the ID is not found in the table. |
Response body parameters (JSON)
| Name | Description |
|---|---|
| href | Relative link to the product inventory record. Data type: String |
| id | Sys_id of the product inventory
from
the Product Inventory [sn_prd_invt_product_inventory]
table. Data type: String |
| name | Name of the product inventory. Data type: String |
| place | Place associated with the product. Data type: String |
| productCharacteristic | List of product characteristics. Data type: Array |
| productCharacteristic.name | Name of the characteristic. Data type: String |
| productCharacteristic.value | Value of the characteristic. Data type: String |
| productOffering | Product offering that the product inventory is associated with. Data type: Object |
| productOffering.id | Initial_version or external_id of the product offering. Located in the Product
Offering [sn_prd_pm_product_offering] table. Data type: String |
| productOffering.internalId | Initial_version of the product offering. Located in the Product Offering
[sn_prd_pm_product_offering] table. Data type: String |
| productOffering.internalVersion | Version of the product offering. Located in the Product Offering
[sn_prd_pm_product_offering] table. Data type: String |
| productOffering.name | Name of the product offering. Located in the Product Offering
[sn_prd_pm_product_offering] table. Data type: String |
| productOffering.version | External_version of the product offering. Located in the Product Offering
[sn_prd_pm_product_offering] table. Data type: String |
| productPrice | Returns an empty array. Data type: Array |
| productRelationship | List of related products. Data type: Array |
| productRelationship.productId | Sys_id of the related product from the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
| productRelationship.relationshipType | Type of relationship. Data type: String |
| productSpecification | Product specification for the product. Data type: Object |
| productSpecification.id | Initial_version or external_id of the product specification. Located in the
Product Specification [sn_prd_pm_product_specification] table. Data type: String |
| productSpecification.internalId | Initial_version of the product specification. Located in the Product
Specification [sn_prd_pm_product_specification] table. Data type: String |
| productSpecification.internalVersion | Version of the product specification. Located in the Product Specification
[sn_prd_pm_product_specification] table. Data type: String |
| productSpecification.version | External_version of the product specification. Located in the Product
Specification [sn_prd_pm_product_specification] table. Data type: String |
| realizingResource | Resource that realizes the product. The realizing resource is a child product
inventory of this product inventory. Data type: Object |
| realizingResource.id | Sys_id of the realizing resource. Located in the
Product Inventory [sn_prd_invt_product_inventory] table.
Data type: String |
| realizingResource.type | Type of the realizing resource. Valid value: child Data type: String |
| realizingService | Service that realizes the product. The realizing service is a child product
inventory of this product inventory. Data type: Object |
| realizingService.id | Sys_id of the realizing service. Located in the
Product Inventory [sn_prd_invt_product_inventory] table.
Data type: String |
| realizingService.type | Type of the realizing service. Valid value: child Data type: String |
| relatedParty | List of parties associated with the ticket. Data type: Array |
| relatedParty.id | Sys_id of the account or customer contact associated with the ticket. Located in the Account [customer_account], Contact [customer_contact], or Consumer [csm_consumer] table. Data type: String |
| relatedParty.@referredType | Type of customer. Data type: String |
| state | Current state of the product. Data type: String |
cURL request
This example retrieves a specified product inventory.
curl -X GET 'https://instance.service-now.com/api/sn_prd_invt/product/037fd87ec3603010abc8b5183c40ddf2' \
--user 'username':'password'
Output:
{
"id": "037fd87ec3603010abc8b5183c40ddf2",
"relatedParty": [
{
"id": "ffc68911c35420105252716b7d40dd55",
"name": "Example Company",
"@type": "RelatedParty",
"@referredType": "Customer"
},
{
"id": "eaf68911c35420105252716b7d40ddde",
"name": "Sally Thomas",
"@type": "RelatedParty",
"@referredType": "CustomerContact"
}
],
"name": "Routing and Configuration PI0000318",
"productSpecification": {
"id": "aec57e981bb420106ba59acf034bcb08",
"name": "Routing and Configuration",
"version": "",
"internalVersion": "1",
"internalId": "aec57e981bb420106ba59acf034bcb08"
},
"status": "Active",
"productOffering": {
"id": "69017a0f536520103b6bddeeff7b127d",
"name": "Premium SD-WAN Offering",
"version": "",
"internalVersion": "1",
"internalId": "69017a0f536520103b6bddeeff7b127d"
},
"product": "ce0b52c7532520103b6bddeeff7b12f5",
"place": {
"id": "25ab9c4d0a0a0bb300f7dabdc0ca7c1c",
"name": "100 South Charles Street, Baltimore,MD"
},
"productCharacteristic": [],
"productRelationship": [],
"realizingService": [],
"realizingResource": [
{
"id": "9b2fa60b536520103b6bddeeff7b1233",
"name": "Route Target"
}
],
"productPrice": [],
"href": "/api/sn_prd_invt/product/037fd87ec3603010abc8b5183c40ddf2",
"billingAccount": "Not Specified."
}
Product Inventory Open API - GET /sn_prd_invt/productinventory
Retrieves a list of all product inventories.
URL format
Default URL: api/sn_prd_invt/productinventory
Supported request parameters
| Name | Description |
|---|---|
| None |
| Name | Description |
|---|---|
| customer | Filter product inventories by customer. Only product offerings with a customer
sys_id or external id matching the value of this parameter are returned in the
response. Data type: String |
| 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 |
| place | Filter product inventories by place. Only product offerings with a place sys_id
or external id matching the value of this parameter are returned in the
response. Data type: String |
| status | Filter product inventories by status. Only product inventories with a status
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 |
|---|---|
| id | Sys_id of the product inventory from the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
| name | Name of the product inventory. Data type: String |
| place | Place associated with the product. Data type: String |
| productCharacteristic | List of product characteristics. Data type: Array |
| productCharacteristic.name | Name of the characteristic. Data type: String |
| productCharacteristic.value | Value of the characteristic. Data type: String |
| productOffering | Product offering that the product inventory is associated with. Data type: Object |
| productOffering.id | Sys_id of the product offering. Located in the Product Offering
[sn_prd_pm_product_offering] table. Data type: String |
| productOffering.name | Name of the product offering. Located in the Product Offering
[sn_prd_pm_product_offering] table. Data type: String |
| productRelationship | List of related products. Data type: Array |
| productRelationship.productId | Sys_id of the related product from the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
| productRelationship.relationshipType | Type of relationship. Data type: String |
| productSpecification | Product specification for the product. Data type: Object |
| productSpecification.id | Sys_id of the product specification. Located in the Product Specification
[sn_prd_pm_product_specification] table. Data type: String |
| realizingResource | Realizing resource. Data type: Object |
| realizingResource.id | Sys_id of the realizing resource from the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
| realizingResource.type | Type of the realizing resource. Data type: String |
| realizingService | Realizing service. Data type: Object |
| realizingService.id | Sys_id of the realizing service from the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
| realizingService.type | Type of the realizing service. Data type: String |
| relatedParty | List of parties associated with the ticket. Data type: Array |
| relatedParty.id | Sys_id of the account or customer contact associated with the ticket. Located in the Account [customer_account], Contact [customer_contact] or Consumer [csm_consumer] table. Data type: String |
| relatedParty.@referredType | Type of customer. Possible values:
Data type: String |
| state | Current state of the product. Data type: String |
cURL request
This example retrieves all product inventories.
curl "https://instance.servicenow.com/api/sn_prd_invt/productinventory" \
--request GET \
--user 'username':'password'
Response body.
[
{
"id": "075072aec3a83010abc8b5183c40dd44",
"relatedParty": [
{
"id": "ffc68911c35420105252716b7d40dd55",
"name": "Funco Intl",
"@type": "RelatedParty",
"@referredType": "Customer"
},
{
"id": "eaf68911c35420105252716b7d40ddde",
"name": "Sally Thomas",
"@type": "RelatedParty",
"@referredType": "CustomerContact"
}
],
"name": "Firewall Administration PI0000300",
"productSpecification": {
"id": "31c5caff07266010a7955b7e0ad3006b",
"name": "Firewall Administration"
},
"status": "Active",
"productOffering": {
"id": "",
"name": ""
},
"place": {
"id": "920cf6ac73d423002728660c4cf6a799",
"name": "200 South James street,Atlanta, GA"
},
"productCharacteristic": [
{
"name": "Firewall Administration CPE Type",
"valueType": "Choice",
"value": "Physical"
},
{
"name": "Configuration and Policy backup",
"valueType": "Choice",
"value": ""
},
{
"name": "Firewall Administration CPE ID",
"valueType": "Single Line Text",
"value": "CPE123456789"
},
{
"name": "Remote CLI troubleshoot support",
"valueType": "Choice",
"value": ""
},
{
"name": "Firewall Administration CPE Model",
"valueType": "Choice",
"value": "9300 series"
}
],
"productRelationship": [],
"realizingService": [],
"realizingResource": [
{
"id": "3546463307666010a7955b7e0ad3005d",
"name": "Cisco Firewall Management system"
}
]
},
{
"id": "0303a8ea74418510f877ca57242ff96d",
"relatedParty": [
{
"id": "ffc68911c35420105252716b7d40dd55",
"name": "Funco Intl",
"@type": "RelatedParty",
"@referredType": "Customer"
},
{
"id": "eaf68911c35420105252716b7d40ddde",
"name": "Sally Thomas",
"@type": "RelatedParty",
"@referredType": "CustomerContact"
}
],
"name": "SD-WAN Edge Device PI0001114",
"productSpecification": {
"id": "39b627aa53702010cd6dddeeff7b1202",
"name": "SD-WAN Edge Device"
},
"status": "Installation Pending",
"productOffering": {
"id": "69017a0f536520103b6bddeeff7b127d",
"name": "Premium SD-WAN Offering"
},
"place": "",
"productCharacteristic": [],
"productRelationship": [],
"realizingService": [
{
"id": "bf65eadc1b7420106ba59acf034bcb57",
"name": "SD-WAN Routing"
},
{
"id": "16d79ec3532520103b6bddeeff7b12a6",
"name": "SD WAN Optimization Service"
},
{
"id": "16d79ec3532520103b6bddeeff7b12a6",
"name": "SD WAN Optimization Service"
},
{
"id": "bf65eadc1b7420106ba59acf034bcb57",
"name": "SD-WAN Routing"
},
{
"id": "bf65eadc1b7420106ba59acf034bcb57",
"name": "SD-WAN Routing"
},
{
"id": "bf65eadc1b7420106ba59acf034bcb57",
"name": "SD-WAN Routing"
}
],
"realizingResource": [
{
"id": "493fa60b536520103b6bddeeff7b12b6",
"name": "Customer Premise SD-WAN Router"
}
]
}
]
Product Inventory Open API - GET /sn_prd_invt/productinventory/{inventoryId}
Retrieves a product inventory.
URL format
Default URL: /api/sn_prd_invt/productinventory/{inventoryId}
Supported request parameters
| Name | Description |
|---|---|
| inventoryId | Sys_id of the product inventory to retrieve. Located in the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
| Name | Description |
|---|---|
| customer | Filter product inventories by customer. Only product offerings with a customer
sys_id or external id matching the value of this parameter are returned in the
response. Data type: String |
| 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 |
| place | Filter product inventories by place. Only product offerings with a place sys_id
or external id matching the value of this parameter are returned in the
response. Data type: String |
| status | Filter product inventories by status. Only product inventories with a status
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-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. |
| 400 | Bad Request. Could be any of the following reasons:
|
| 404 | Record not found. Record associated with the ID is not found in the table. |
Response body parameters (JSON)
| Name | Description |
|---|---|
| id | Sys_id of the product inventory from the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
| name | Name of the product inventory. Data type: String |
| place | Place associated with the product. Data type: String |
| productCharacteristic | List of product characteristics. Data type: Array |
| productCharacteristic.name | Name of the characteristic. Data type: String |
| productCharacteristic.value | Value of the characteristic. Data type: String |
| productOffering | Product offering that the product inventory is associated with. Data type: Object |
| productOffering.id | Sys_id of the product offering. Located in the Product Offering
[sn_prd_pm_product_offering] table. Data type: String |
| productOffering.name | Name of the product offering. Located in the Product Offering
[sn_prd_pm_product_offering] table. Data type: String |
| productRelationship | List of related products. Data type: Array |
| productRelationship.productId | Sys_id of the related product from the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
| productRelationship.relationshipType | Type of relationship. Data type: String |
| productSpecification | Product specification for the product. Data type: Object |
| productSpecification.id | Sys_id of the product specification. Located in the Product Specification
[sn_prd_pm_product_specification] table. Data type: String |
| realizingResource | Realizing resource. Data type: Object |
| realizingResource.id | Sys_id of the realizing resource from the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
| realizingResource.type | Type of the realizing resource. Data type: String |
| realizingService | Realizing service. Data type: Object |
| realizingService.id | Sys_id of the realizing service from the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
| realizingService.type | Type of the realizing service. Data type: String |
| relatedParty | List of parties associated with the ticket. Data type: Array |
| relatedParty.id | Sys_id of the account or customer contact associated with the ticket. Located in the Account [customer_account], Contact [customer_contact], or Consumer [csm_consumer] table. Data type: String |
| relatedParty.@referredType | Type of customer. Possible values:
Data type: String |
| state | Current state of the product. Data type: String |
cURL request
This example retrieves a product inventory for an SD-WAN service package.
curl --location --request GET 'https:// instance.servicenow.com/api/sn_prd_invt/productinventory/074450fc74918d10f877ca57242ff9e3' \
--user 'username':'password'
Output:
{
"id": "074450fc74918d10f877ca57242ff9e3",
"relatedParty": [
{
"id": "ffc68911c35420105252716b7d40dd55",
"name": "Funco Intl",
"@type": "RelatedParty",
"@referredType": "Customer"
},
{
"id": "eaf68911c35420105252716b7d40ddde",
"name": "Sally Thomas",
"@type": "RelatedParty",
"@referredType": "CustomerContact"
}
],
"name": "SD-WAN Service Package PI0001576",
"productSpecification": {
"id": "cfe5ef6a53702010cd6dddeeff7b12f6",
"name": "SD-WAN Service Package"
},
"status": "Installation Pending",
"productOffering": {
"id": "69017a0f536520103b6bddeeff7b127d",
"name": "Premium SD-WAN Offering"
},
"place": "",
"productCharacteristic": [],
"productRelationship": [
{
"id": "a74490fc74918d10f877ca57242ff942",
"name": "SD-WAN Edge Device PI0001582",
"relationshipType": "Bundles"
},
{
"id": "b85414fc74918d10f877ca57242ff90e",
"name": "SD-WAN Controller PI0001602",
"relationshipType": "Bundles"
},
{
"id": "d74490fc74918d10f877ca57242ff907",
"name": "SD-WAN Security PI0001577",
"relationshipType": "Bundles"
}
],
"realizingService": [],
"realizingResource": []
}
Product Inventory Open API - POST /sn_prd_invt/product
Creates a product inventory record.
URL format
Default URL: /api/sn_prd_invt/product
Supported request parameters
| Name | Description |
|---|---|
| None |
| Name | Description |
|---|---|
| None |
| Name | Description |
|---|---|
| name | Required. Name of the product inventory. Data type: String |
| pid | Unique identifier for the product inventory from the external system. Data type: String Default: Blank string |
| productCharacteristic | List of product characteristics. Data type: Array |
| productCharacteristic.name | Name of the characteristic. Data type: String Default: Blank string |
| productCharacteristic.value | Value of the characteristic. Data type: String Default: Blank string |
| productOffering | Required. Product offering that the product inventory is associated
with. Data type: Object |
| productOffering.id | Required. Initial_version or external_id of the product offering. Located in
the Product Offering [sn_prd_pm_product_offering] table. Data type: String |
| productOffering.internalVersion | Version of the product offering. Located in the Product Offering
[sn_prd_pm_product_offering] table. Data type: String |
| productOffering.name | Name of the product offering. Located in the Product Offering
[sn_prd_pm_product_offering] table. Data type: String Default: Blank string |
| productOffering.version | External_version of the product offering. Located in the Product Offering
[sn_prd_pm_product_offering] table. Data type: String |
| productRelationship | List of related products. Data type: Array |
| productRelationship.productId | Required if using the productRelationship parameter.
Sys_id of the related product from the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
| productRelationship.relationshipType | Type of relationship. The only valid value is
child. Data type: String Default: Blank string |
| productSpecification | Required. Product specification for the product. Data type: Object |
| productSpecification.id | Required. Initial_version or external_id of the product specification. Located
in the Product Specification [sn_prd_pm_product_specification] table. Data type: String |
| productSpecification.internalVersion | Version of the product specification. Located in the Product Specification
[sn_prd_pm_product_specification] table. Data type: String |
| productSpecification.version | External_version of the product specification. Located in the Product
Specification [sn_prd_pm_product_specification] table. Data type: String |
| realizingResource | Resource that realizes the product. The realizing resource is a child product
inventory of this product inventory. Data type: Object |
| realizingResource.id | Required if using the realizingResource parameter. Sys_id of the realizing resource. Located in the
Product Inventory [sn_prd_invt_product_inventory] table.
Data type: String |
| realizingResource.type | Type of the realizing resource. Valid value: child Data type: String |
| realizingService | Service that realizes the product. The realizing service is a child product
inventory of this product inventory. Data type: Object |
| realizingService.id | Required if using the realizingService parameter. Sys_id of the realizing service. Located in the
Product Inventory [sn_prd_invt_product_inventory] table.
Data type: String |
| realizingService.type | Type of the realizing service. Valid value: child Data type: String |
| relatedParty | List of parties associated with the ticket. Data type: Array |
| relatedParty.id | Required if using the relatedParty parameter. Sys_id of the account or customer contact associated with the ticket. Located in the Account [customer_account], Contact [customer_contact], or
Consumer [csm_consumer] table. Data type: String |
| relatedParty.@referredType | Type of customer. Possible values:
Data type: String Default: Blank string |
| state | Current state of the
product. Possible
values:
Data type: String Default: installation_pending |
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 |
|---|---|
| 201 | Request successfully processed. |
| 400 | Bad Request. Could be any of the following reasons:
|
Response body parameters (JSON)
| Name | Description |
|---|---|
| href | Relative link to the product inventory record. Data type: String |
| id | Sys_id of the product inventory from the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
| name | Name of the product inventory. Data type: String |
| pid | Unique identifier for the product inventory from the external system. Data type: String |
| productCharacteristic | List of product characteristics. Data type: Array |
| productCharacteristic.name | Name of the characteristic. Data type: String |
| productCharacteristic.value | Value of the characteristic. Data type: String |
| productOffering | Product offering that the product inventory is associated with. Data type: Object |
| productOffering.id | Initial_version or external_id of the product offering. Located in the Product
Offering [sn_prd_pm_product_offering] table. Data type: String |
| productOffering.internalId | Initial_version of the product offering. Located in the Product Offering
[sn_prd_pm_product_offering] table. Data type: String |
| productOffering.internalVersion | Version of the product offering. Located in the Product Offering
[sn_prd_pm_product_offering] table. Data type: String |
| productOffering.name | Name of the product offering. Located in the Product Offering
[sn_prd_pm_product_offering] table. Data type: String |
| productOffering.version | External_version of the product offering. Located in the Product Offering
[sn_prd_pm_product_offering] table. Data type: String |
| productPrice | Returns an empty array. Data type: Array |
| productRelationship | List of related products. Data type: Array |
| productRelationship.productId | Sys_id of the related product from the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
| productRelationship.relationshipType | Type of relationship. Data type: String |
| productSpecification | Product specification for the product. Data type: Object |
| productSpecification.id | Initial_version or external_id of the product specification. Located in the
Product Specification [sn_prd_pm_product_specification] table. Data type: String |
| productSpecification.internalId | Initial_version of the product specification. Located in the Product
Specification [sn_prd_pm_product_specification] table. Data type: String |
| productSpecification.internalVersion | Version of the product specification. Located in the Product Specification
[sn_prd_pm_product_specification] table. Data type: String |
| productSpecification.version | External_version of the product specification. Located in the Product
Specification [sn_prd_pm_product_specification] table. Data type: String |
| realizingResource | Resource that realizes the product. The realizing resource is a child product
inventory of this product inventory. Data type: Object |
| realizingResource.id | Sys_id of the realizing resource. Located in the
Product Inventory [sn_prd_invt_product_inventory] table.
Data type: String |
| realizingResource.type | Type of the realizing resource. Valid value: child Data type: String |
| realizingService | Service that realizes the product. The realizing service is a child product
inventory of this product inventory. Data type: Object |
| realizingService.id | Sys_id of the realizing service. Located in the
Product Inventory [sn_prd_invt_product_inventory] table.
Data type: String |
| realizingService.type | Type of the realizing service. Valid value: child Data type: String |
| relatedParty | List of parties associated with the ticket. Data type: Array |
| relatedParty.id | Sys_id of the account or customer contact associated with the ticket. Located in the Account [customer_account], Contact [customer_contact], or Consumer [csm_consumer] table. Data type: String |
| relatedParty.@referredType | Type of customer. Possible values:
Data type: String |
| state | Current state of the product. Data type: String |
cURL request
This example creates a product inventory for a voice over IP solution for a user.
curl -X POST "https://instance.service-now.com/api/sn_prd_invt/product" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--user "username":"password" \
--data "[
{
"pid": "PO-456",
"description": "inventory description",
"isBundle": false,
"name": "Voice Over IP Basic instance for Jean",
"productOffering": {
"@referredType": "ProductOffering",
"name": "Premium SD-WAN Offering",
"id": "69017a0f536520103b6bddeeff7b127d"
},
"productCharacteristic": [],
"productRelationship": [
{
"productId": "fa6d13f45b5620102dff5e92dc81c77f",
"relationshipType": "child"
}
],
"realizingService": {
"id": "fe6d13f45b5620102dff5e92dc81c786",
"relationshipType": "child"
},
"realizingResource": {
"id": "326d13f45b5620102dff5e92dc81c78c",
"relationshipType": "child"
},
"relatedParty": [
{
"@referredType": "CustomerContact",
"@type": "RelatedParty",
"name": "Sally Thomas",
"id": "eaf68911c35420105252716b7d40ddde"
},
{
"@referredType": "Customer",
"@type": "RelatedParty",
"name": "Funco Intl",
"id": "ffc68911c35420105252716b7d40dd55"
}
],
"productSpecification": {
"@referredType": "ProductSpecification",
"@type": null,
"name": null,
"id": "3ee1fdb1c3331010d216b5183c40dd81",
"internalVersion": "1"
},
"bundle": false
}
]"
Response body.
{
"pid": "PO-456",
"description": "inventory description",
"isBundle": false,
"name": "Voice Over IP Basic instance for Jean",
"productOffering": {
"@referredType": "ProductOffering",
"name": "Premium SD-WAN Offering",
"id": "69017a0f536520103b6bddeeff7b127d",
"internalVersion": "1",
"version": null,
"status": "published",
"internalId": "69017a0f536520103b6bddeeff7b127d"
},
"productCharacteristic": [],
"productRelationship": [
{
"productId": "fa6d13f45b5620102dff5e92dc81c77f",
"relationshipType": "child"
}
],
"realizingService": {
"id": "fe6d13f45b5620102dff5e92dc81c786",
"relationshipType": "child"
},
"realizingResource": {
"id": "326d13f45b5620102dff5e92dc81c78c",
"relationshipType": "child"
},
"relatedParty": [
{
"@referredType": "CustomerContact",
"@type": "RelatedParty",
"name": "Sally Thomas",
"id": "eaf68911c35420105252716b7d40ddde"
},
{
"@referredType": "Customer",
"@type": "RelatedParty",
"name": "Example Company",
"id": "ffc68911c35420105252716b7d40dd55"
}
],
"productSpecification": {
"@referredType": "ProductSpecification",
"@type": null,
"name": null,
"id": "3ee1fdb1c3331010d216b5183c40dd81",
"internalVersion": "1",
"version": null,
"status": "published",
"internalId": "3ee1fdb1c3331010d216b5183c40dd81"
},
"bundle": false,
"productPrice": [],
"id": "25b07475471789108761b955d36d439d",
"href": "/api/sn_prd_invt/product/25b07475471789108761b955d36d439d"
}
Product Inventory Open API - POST /sn_prd_invt/productinventory
Creates a product inventory.
URL format
Default URL: /api/sn_prd_invt/productinventory
Supported request parameters
| Name | Description |
|---|---|
| None |
| Name | Description |
|---|---|
| None |
| Name | Description |
|---|---|
| name | Required. Name of the product inventory. Data type: String |
| pid | Unique identifier for the product inventory from the external system. Data type: String Default: Blank string |
| productCharacteristic | List of product characteristics. Data type: Array |
| productCharacteristic.name | Name of the characteristic. Data type: String Default: Blank string |
| productCharacteristic.value | Value of the characteristic. Data type: String Default: Blank string |
| productOffering | Required. Product offering that the product inventory is associated
with. Data type: Object |
| productOffering.id | Required. Sys_id of the product offering. Located in the Product Offering
[sn_prd_pm_product_offering] table. Data type: String |
| productOffering.name | Name of the product offering. Located in the Product Offering [sn_prd_pm_product_offering] table. Data type: String Default: Blank string |
| productRelationship | List of related products. Data type: Array |
| productRelationship.productId | Required if using the productRelationship parameter.
Sys_id of the related product from the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
| productRelationship.relationshipType | Type of relationship. The only valid value is
child. Data type: String Default: Blank string |
| productSpecification | Required. Product specification for the product. Data type: Object |
| productSpecification.id | Required. Sys_id of the product specification. Located in the Product
Specification [sn_prd_pm_product_specification] table. Data type: String |
| realizingResource | Realizing resource. Data type: Object |
| realizingResource.id | Required if using the realizingResource parameter. Sys_id
of the realizing resource from the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
| realizingResource.type | Type of the realizing resource. The only valid value is
child. Data type: String Default: Blank string |
| realizingService | Realizing service. Data type: Object |
| realizingService.id | Required if using the realizingService parameter. Sys_id
of the realizing service from the Product Inventory [sn_prd_invt_product_inventory]
table. Data type: String |
| realizingService.type | Type of the realizing service. The only valid value is
child. Data type: String Default: Blank string |
| relatedParty | List of parties associated with the ticket. Data type: Array |
| relatedParty.id | Required if using the relatedParty parameter. Sys_id of the account or customer contact associated with the ticket. Located in the Account [customer_account], Contact [customer_contact], or
Consumer [csm_Consumer] table. Data type: String |
| relatedParty.@referredType | Type of customer. Possible values:
Data type: String Default: Blank string |
| state | Current state of the product. Possible values:
Data type: String Default: installation_pending |
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 |
|---|---|
| 201 | Request successfully processed. |
| 400 | Bad Request. Could be any of the following reasons:
|
Response body parameters (JSON)
| Name | Description |
|---|---|
| id | Sys_id of the product inventory from the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
| name | Name of the product inventory. Data type: String |
| pid | Unique identifier for the product inventory from the external system. Data type: String |
| productCharacteristic | List of product characteristics. Data type: Array |
| productCharacteristic.name | Name of the characteristic. Data type: String |
| productCharacteristic.value | Value of the characteristic. Data type: String |
| productOffering | Product offering that the product inventory is associated with. Data type: Object |
| productOffering.id | Sys_id of the product offering. Located in the Product Offering
[sn_prd_pm_product_offering] table. Data type: String |
| productOffering.name | Name of the product offering. Located in the Product Offering
[sn_prd_pm_product_offering] table. Data type: String |
| productRelationship | List of related products. Data type: Array |
| productRelationship.productId | Sys_id of the related product from the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
| productRelationship.relationshipType | Type of relationship. Data type: String |
| productSpecification | Product specification for the product. Data type: Object |
| productSpecification.id | Sys_id of the product specification. Located in the Product Specification
[sn_prd_pm_product_specification] table. Data type: String |
| realizingResource | Realizing resource. Data type: Object |
| realizingResource.id | Sys_id of the realizing resource from the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
| realizingResource.type | Type of the realizing resource. Data type: String |
| realizingService | Realizing service. Data type: Object |
| realizingService.id | Sys_id of the realizing service from the Product Inventory
[sn_prd_invt_product_inventory] table. Data type: String |
| realizingService.type | Type of the realizing service. Data type: String |
| relatedParty | List of parties associated with the ticket. Data type: Array |
| relatedParty.id | Sys_id of the account or customer contact associated with the ticket. Located in the Account [customer_account], Contact [customer_contact], or Consumer [csm_consumer] table. Data type: String |
| relatedParty.@referredType | Type of customer. Possible values:
Data type: String |
| state | Current state of the product. Data type: String |
cURL request
This example creates a product inventory for a voice over IP solution for a user.
curl --location --request POST “https://instance.servicenow.com/api/sn_prd_invt/productinventory” \
--header “Content-Type: application/json” \
--data-raw '[
{
"pid": "demoInventory",
"description": "inventory description",
"isBundle": false,
"name": "Voice Over IP Basic instance for Jean",
"productOffering": {
"id": "69017a0f536520103b6bddeeff7b127d",
"name": "Premium SD-WAN Offering",
"@referredType": "ProductOffering"
},
"productCharacteristic": [
{
"name": "CPE Type",
"valueType": "choice",
"value": "Virtual"
},
{
"name":"Routing",
"valueType": "choice",
"value": "Premium"
}
],
"productRelationship": [
{
"productId": "7e6d13f45b5620102dff5e92dc81c787",
"relationshipType": "child"
}
],
"relatedParty": [
{
"id": "eaf68911c35420105252716b7d40ddde",
"name": "Sally Thomas",
"role": "User",
"@type": "RelatedParty",
"@referredType": "CustomerContact"
},
{
"id": "ffc68911c35420105252716b7d40dd55",
"name": "Funco Intl",
"@type": "RelatedParty",
"@referredType": "Customer"
}
],
"productSpecification": {
"id": "cfe5ef6a53702010cd6dddeeff7b12f6",
"@referredType": "ProductSpecification",
"version": "1"
}
}
]'
--user 'username':'password'
Response body.
{
"pid": "demoInventory",
"description": "inventory description",
"isBundle": false,
"name": "Voice Over IP Basic instance for Jean",
"productOffering": {
"id": "69017a0f536520103b6bddeeff7b127d",
"name": "Premium SD-WAN Offering",
"@referredType": "ProductOffering"
},
"productCharacteristic": [
{
"name": "CPE Type",
"valueType": "choice",
"value": "Virtual"
},
{
"name": "Routing",
"valueType": "choice",
"value": "Premium"
}
],
"productRelationship": [
{
"productId": "7e6d13f45b5620102dff5e92dc81c787",
"relationshipType": "child"
}
],
"relatedParty": [
{
"id": "eaf68911c35420105252716b7d40ddde",
"name": "Sally Thomas",
"role": "User",
"@type": "RelatedParty",
"@referredType": "CustomerContact"
},
{
"id": "ffc68911c35420105252716b7d40dd55",
"name": "Funco Intl",
"@type": "RelatedParty",
"@referredType": "Customer"
}
],
"productSpecification": {
"id": "cfe5ef6a53702010cd6dddeeff7b12f6",
"@referredType": "ProductSpecification",
"version": "1"
},
"id": "3ac715c6745d8150f877ca57242ff97a"
}