Check the inventory of catalog items using Partner Center APIs

How to check the inventory for a specific set of catalog items.

Important

This API will be retired on September 25, 2026. Partners should migrate to the new Check inventory by resource type API, which provides improved filtering by resource type.

Prerequisites

  • Credentials as described in Partner Center authentication. This scenario supports authentication with both standalone App and App+User credentials.

  • One or more product IDs. Optionally, SKU IDs can also be specified.

  • Any additional context needed for verifying the inventory of the SKUs referenced by the provided product/SKU IDs. These requirements might vary by type of product/SKU and can be determined from the SKU's InventoryVariables property.

REST request

Request syntax

Method Request URI
POST {baseURL}/v1/extensions/product/checkInventory?country={country-code} HTTP/1.1

URI parameter

Use the following query parameter to check the inventory.

Name Type Required Description
country-code string Yes A country/region ID.

Request headers

For more information, see Partner Center REST headers.

Request body

The inventory request details, consisting of an InventoryCheckRequest resource containing one or more InventoryItem resources.

Ensure the Azure Subscription specified in the request body is registered and enabled to purchase Azure RIs. See Register a Subscription for details on the registration process.

Request example

POST https://api.partnercenter.microsoft.com/v1/extensions/product/checkinventory?country=US HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: d1b1981a-e088-4610-870a-eebec96d6bcd
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
X-Locale: en-US
Content-Type: application/json

{"TargetItems":[{"ProductId":"DZH318Z0BQ3P"}],"InventoryContext":{"customerId":"d6bf25b7-e0a8-4f2d-a31b-97b55cfc774d","azureSubscriptionId":"3A231FBE-37FE-4410-93FD-730D3D5D4C75","armRegionName":"Europe"}}

REST response

If successful, the response body contains a collection of InventoryItem objects populated with the restriction details, if any apply.

Note

If an input InventoryItem represents an item that could not be found in the catalog, it will not be included in the output collection.

Response success and error codes

Each response comes with an HTTP status code that indicates success or failure and additional debugging information. Use a network trace tool to read this code, error type, and additional parameters. For the full list, see Partner Center error codes.

Response example

HTTP/1.1 200 OK
Content-Length: 1021
Content-Type: application/json; charset=utf-8
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: d1b1981a-e088-4610-870a-eebec96d6bcd
X-Locale: en-US
[
    {
        "productId": "DZH318Z0BQ3P",
        "skuId": "0039",
        "isRestricted": true,
        "restrictions": [
            {
                "reasonCode": "NotAvailableForSubscription",
                "description": "Restriction identified of type 'Location' with values 'japanwest'.",
                "properties": {
                    "type": "Location",
                    "values": "japanwest"
                }
            }
        ]
    },
    {
        "productId": "DZH318Z0BQ3P",
        "skuId": "0038",
        "isRestricted": true,
        "restrictions": [
            {
                "reasonCode": "NotAvailableForSubscription",
                "description": "Restriction identified of type 'Location' with values 'japanwest'.",
                "properties": {
                    "type": "Location",
                    "values": "japanwest"
                }
            }
        ]
    },
    {
        "productId": "DZH318Z0BQ3P",
        "skuId": "000S",
        "isRestricted": false,
        "restrictions": []
    },
    {
        "productId": "DZH318Z0BQ3P",
        "skuId": "0011",
        "isRestricted": false,
        "restrictions": []
    }
]