共用方式為


取得訂單配置狀態

適用於: 合作夥伴中心 | 由 21Vianet 營運的合作夥伴中心 | 適用於美國政府的 Microsoft 雲端合作夥伴中心

適當的角色:管理員代理

取得訂單之訂單項目布建狀態的集合。

必要條件

  • 如合作夥伴中心驗證中所述的認證。 此案例僅支援使用「應用程式+使用者」認證來進行驗證。

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

  • 訂單標識碼。

C#

若要取得訂單的布建狀態,請使用下列代碼段:

// Retrieve an order's provisioning status.
 var customerOrder = partnerOperations.Customers.ById(customerId).Orders.ById(orderId).Get();
 var provisioningStatusList = partnerOperations.Customers.ById(customerId).Orders.ById(customerOrder.Id).ProvisioningStatus.Get();

REST 要求

要求語法

方法 要求 URI
GET {baseURL}/v1/customers/{customer-id}/orders/{order-id}/provisioningstatus HTTP/1.1

URI 參數

使用下列路徑參數來識別客戶和訂用帳戶。

名稱 類型​​ 必需 描述
客戶識別碼 字串 Yes 識別客戶的 GUID 格式化字串。
訂單編號 字串 Yes 識別順序的字串。

要求標頭

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

請求正文

無。

要求範例

GET https://api.partnercenter.microsoft.com/v1/customers/0c39d6d5-c70d-4c55-bc02-f620844f3fd1/orders/34828C05-C16C-4D6F-9CFC-4D2650EF19A1/provisioningstatus HTTP/1.1
Accept: application/json, text/plain, */*
Authorization: Bearer <token>
MS-RequestId: d0e38dfd-a2c5-4a14-ac06-12d30f0ec54e
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
X-Locale: en-US
Host: api.partnercenter.microsoft.com

REST 響應

如果成功,回應內容會包含 OrderLineItemProvisioningStatus 資源。

回應成功和錯誤碼

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

回應範例

HTTP/1.1 200 OK
Content-Length: 177
Content-Type: application/json; charset=utf-8
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: d0e38dfd-a2c5-4a14-ac06-12d30f0ec54e
MS-CV: InswEQre402koceL.0
MS-ServerId: 030020344
Date: Thu, 20 Apr 2017 19:23:39 GMT

{
    "totalCount": 1,
    "items": [
        {
            "orderLineItemId": 0,
            "lineItemNumber": 0,
            "status": "fulfilled",
            "quantityProvisioningInformation": [
                {
                    "quantity": 1,
                    "status": "fulfilled"
                }
            ]
        }
    ],
    "attributes": {
        "objectType": "Collection"
    }
}