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 and runs in the sn_prd_invt namespace.

The calling user must have the sn_prd_invt.product_inventory_integrator role.

This API creates and updates data in the following tables:
  • 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.

TMF conformance logo

Product Inventory Open API - GET /sn_prd_invt/product

Retrieves all product inventory records and their associated child product inventories.

URL format

Default URL: api/sn_prd_invt/product

Supported request parameters

Table 1. Path parameters
Name Description
None
Table 3. Request body parameters (JSON)
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.

Table 4. Request headers
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.

Response body parameters (JSON)

Example: 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 and the sys_ids of the associated child product inventory records.

URL format

Default URL: /api/sn_prd_invt/product/{id}

Supported request parameters

Table 7. Path parameters
Name Description
id Sys_id or exteranl_id of the product inventory record to retrieve.

Data type: String

Table: Product Inventory [sn_prd_invt_product_inventory]

Table 9. Request body parameters (JSON)
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.

Table 10. Request headers
Header Description
None
Table 11. Response headers
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.

Table 12. Status codes
Status code Description
200 Request successfully processed.
400
Bad Request. Could be any of the following reasons:
  • Invalid path parameter
  • Invalid URI
404 Record not found. Record associated with the ID is not found in the table.

Response body parameters (JSON)

Example: 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": [
     {
       "productId": "2702912bffff5610a82effffffffff88",
       "relationshipType": "child"
     },
     {
       "productId": "e2a11de7ffff5610a82effffffffff96",
       "relationshipType": "child"
     }
   ],
   "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.

Important: Starting with the Tokyo release, this endpoint is deprecated. The new version of this endpoint is Product Inventory Open API - GET /sn_prd_invt/product.

URL format

Default URL: api/sn_prd_invt/productinventory

Supported request parameters

Table 13. Path parameters
Name Description
None
Table 15. Request body parameters (JSON)
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.

Table 16. Request headers
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.

Response body parameters (JSON)

Example: 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.

Important: Starting with the Tokyo release, this endpoint is deprecated. The new version of this endpoint is Product Inventory Open API - GET /sn_prd_invt/product/{id}.

URL format

Default URL: /api/sn_prd_invt/productinventory/{inventoryId}

Supported request parameters

Table 19. Path parameters
Name Description
inventoryId Sys_id of the product inventory to retrieve.

Data type: String

Table: Product Inventory [sn_prd_invt_product_inventory]

Table 21. Request body parameters (JSON)
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.

Table 22. Request headers
Header Description
None
Table 23. Response headers
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.

Table 24. Status codes
Status code Description
200 Request successfully processed.
400 Bad Request. Could be any of the following reasons:
  • Invalid path parameter
  • Invalid URI
404 Record not found. Record associated with the ID is not found in the table.

Response body parameters (JSON)

Example: 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.

You can also use this endpoint to create product inventory bundles. For additional information on these bundles, see.

URL format

Default URL: /api/sn_prd_invt/product

Supported request parameters

Table 25. Path parameters
Name Description
None
Table 26. Query parameters
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.

Table 28. Request 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.
Table 29. Response headers
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.

Table 30. Status codes
Status code Description
201 Request successfully processed.
400 Bad Request. Could be any of the following reasons:
  • Empty payload.
  • Invalid payload. Mandatory field missing: <field name>

Response body parameters (JSON)

Example: 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.

Important: Starting with the Tokyo release, this endpoint is deprecated. The new version of this endpoint is Product Inventory Open API - POST /sn_prd_invt/product.

URL format

Default URL: /api/sn_prd_invt/productinventory

Supported request parameters

Table 31. Path parameters
Name Description
None
Table 32. Query parameters
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.

Table 34. Request 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.
Table 35. Response headers
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.

Table 36. Status codes
Status code Description
201 Request successfully processed.
400 Bad Request. Could be any of the following reasons:
  • Empty payload.
  • Invalid payload. Mandatory field missing: <field name>

Response body parameters (JSON)

Example: 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"
}