共用方式為


超額

適用於

  • 合作夥伴中心

適當的角色

  • 管理代理人

注意

授權型服務的新商務體驗包含許多新功能,且適用於所有 雲端解決方案提供者 (CSP)。 如需更多資訊,請參閱 新商務體驗概覽

用來獲取指定客戶的超額用量。 超額可讓客戶在使用超出規定限制的服務時繼續使用服務。 超額使用定義為超過訂閱帳戶的消費量,按使用付費方式累積。

必要條件

  • 憑證,如合作夥伴中心驗證所述。 此案例支援使用獨立應用程式和 App+使用者認證進行驗證。

  • 客戶識別碼 (customer-tenant-id)。 如果您不知道客戶的 ID,可以在合作夥伴中心中選擇 [客戶] 工作區,再從客戶清單中選擇該客戶,接著選擇 [帳戶]。 在客戶的 [帳戶] 頁面上,尋找 [客戶帳戶資訊] 區段中的 [Microsoft 識別碼]。 Microsoft ID 與客戶 ID (customer-tenant-id) 相同。

REST 要求

[GET] /customers/{customer-tenant-id}/subscriptions/overage

要求語法

方法 要求 URI
GET {baseURL}/v1/customers/{customer-tenant-id}/subscriptions/overage HTTP/1.1

URI 參數

使用下列查詢參數可傳回客戶的超額。

名稱 類型​​ 必要 描述
customer-tenant-id guid Y 對應至客戶租戶的 GUID。

請求標頭

如需詳細資訊,請參閱合作夥伴中心 REST 標頭。

請求主體

要求範例

GET https://api.partnercenter.microsoft.com/v1/customers/{customer-tenant-id}/subscriptions/overage HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: 18752a69-1aa1-4ef7-8f9d-eb3681b2d70a
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
X-Locale: en-US

REST 響應

如果成功,這個方法會回傳給客戶的超額。

回應成功和錯誤碼

每個回應都隨附 HTTP 狀態碼,會指出成功與否以及其他的偵錯資訊。 請使用網路追蹤工具來讀取此錯誤碼、錯誤類型和其他參數。 如需完整清單,請參閱錯誤代碼

回應範例

HTTP/1.1 200 OK
Content-Length: 138
Content-Type: application/json
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: 18752a69-1aa1-4ef7-8f9d-eb3681b2d70a
Date: Fri, 26 Feb 2021 20:42:26 GMT

{
    "totalCount": 1,
    "items": [
        {
            "azureEntitlementId": "ea1c26b7-8c99-42bb-ba7d-c535831fae8e",
            "partnerId": "1234",
            "type": "PhoneServices",
            "overageEnabled": true,
            "links": {
                "overage": {
                    "uri": "/customers/f62cf10b-8f76-4fc4-9774-c5291f8faf86/subscriptions/overage",
                    "method": "GET",
                    "headers": []
                }
            },
            "attributes": {
                "objectType": "Overage"
            }
        }
    ],
    "attributes": {
        "objectType": "Collection"
    }
}