SKU 가용성 목록 가져오기(고객별)
적용 대상: 파트너 센터 | 21Vianet에서 운영되는 파트너 센터 | Microsoft Cloud for US Government 파트너 센터
다음 방법을 사용하여 특정 고객이 사용할 수 있는 지정된 제품 및 SKU에 대한 가용성 컬렉션을 가져올 수 있습니다.
필수 조건
자격 증명(파트너 센터 인증에서 설명). 이 시나리오는 독립 실행형 앱과 App+사용자 자격 증명을 모두 사용하여 인증을 지원합니다.
고객 ID (
customer-tenant-id
). 고객의 ID를 모르는 경우 고객 작업 영역을 선택하고 고객 목록에서 고객을 선택한 다음 계정을 선택하여 파트너 센터에서 조회할 수 있습니다. 고객 계정 페이지의 고객 계정 정보 섹션에서 Microsoft ID를 찾습니다. Microsoft ID는 고객 ID(customer-tenant-id
)와 동일합니다.제품 식별자(product-id)입니다.
SKU 식별자(sku-id)입니다.
REST 요청
요청 구문
메서드 | 요청 URI |
---|---|
게시 | {baseURL}/v1/customers/{customer-tenant-id}/products/{product-id}/skus/{sku-id}/availabilities HTTP/1.1 |
게시 | {baseURL}/v1/customers/{customer-tenant-id}/products/{product-id}/skus/{sku-id}/availabilities?IncludeLifeCycleState=true HTTP/1.1 |
URI 매개 변수 요청
이름 | 유형 | 필수 | 설명 |
---|---|---|---|
고객-테넌트-ID | GUID | 예 | 값은 GUID 형식의 customer-tenant-id이며, 이는 고객을 지정할 수 있는 식별자입니다. |
제품 ID | string | 예 | 제품을 식별하는 문자열입니다. |
sku-id | string | 예 | SKU를 식별하는 문자열입니다. |
IncludeLifeCycleState | string | 아니요 | New Commerce 라이선스 기반 제품에 대한 수명 주기 상태 값을 반환하도록 true로 설정할 수 있는 문자열 플래그입니다. 플래그가 포함되지 않은 경우 이러한 값은 반환되지 않습니다. |
요청 헤더
자세한 내용은 파트너 센터 REST 헤더를 참조하세요.
요청 본문
없음
요청 예제
GET https://api.partnercenter.microsoft.com/v1/customers/65543400-f8b0-4783-8530-6d35ab8c6801/products/DZH318Z0BPS6/skus/0001/availabilities HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: 83643f5e-5dfd-4375-88ed-054412460dc8
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
REST 응답
응답 성공 및 오류 코드
각 응답에는 성공 또는 실패 및 더 많은 디버깅 정보를 나타내는 HTTP 상태 코드가 함께 제공됩니다. 네트워크 추적 도구를 사용하여 이 코드, 오류 유형 및 기타 매개 변수를 읽습니다. 전체 목록은 파트너 센터 오류 코드를 참조 하세요.
이 메서드는 다음 오류 코드를 반환합니다.
HTTP 상태 코드 | 오류 코드 | 설명 |
---|---|---|
404 | 400013 | 상위 제품을 찾을 수 없습니다. |
Azure 플랜에 대한 응답 예제
HTTP/1.1 200 OK
Content-Length: 1909
Content-Type: application/json; charset=utf-8
MS-CorrelationId: bbbb1111-cc22-3333-44dd-555555eeeeee
MS-RequestId: ae7288e2-2673-4ad4-8c12-7aad818d5949
{
"id": "0001",
"productId": "DZH318Z0BPS6",
"title": "Microsoft Azure plan",
"description": "Microsoft Azure plan (MS-AZR-0017G)",
"minimumQuantity": 1,
"maximumQuantity": 1,
"isTrial": false,
"supportedBillingCycles": [
"one_time"
],
"purchasePrerequisites": [
"MicrosoftCustomerAgreement"
],
"inventoryVariables": [],
"provisioningVariables": [],
"actions": [
"Refund"
],
"dynamicAttributes": {
"isMicrosoftProduct": true,
"pilotProgram": "modernazurepilot"
},
"links": {
"availabilities": {
"uri": "/products/DZH318Z0BPS6/skus/0001/availabilities?country=US",
"method": "GET",
"headers": []
},
"self": {
"uri": "/products/DZH318Z0BPS6/skus/0001?country=US",
"method": "GET",
"headers": []
}
}
}
새 상거래 라이선스 기반 서비스에 대한 응답 예제
참고
라이선스 기반 서비스에 대한 새로운 상거래 환경에는 많은 새로운 기능이 포함되며 모든 CSP(클라우드 솔루션 공급자)에서 사용할 수 있습니다. 자세한 내용은 새 상거래 환경 개요를 참조하세요.
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/10.0
MS-CorrelationId: cccc2222-dd33-4444-55ee-666666ffffff,cccc2222-dd33-4444-55ee-666666ffffff
MS-RequestId: 70324727-62d8-4195-8f99-70ea25058d02,70324727-62d8-4195-8f99-70ea25058d02
X-Locale: en-US,en-US
X-SourceFiles: =?UTF-8?B?QzpcVXNlcnNcbWFtZW5kZVxkZXZcZHBzLXJwZVxSUEUuUGFydG5lci5TZXJ2aWNlLkNhdGFsb2dcV2ViQXBpc1xDYXRhbG9nU2VydmljZS5WMi5XZWJcdjFccHJvZHVjdHNcRFpIMzE4WjBCUTNRXHNrdXNcMDAwMVxhdmFpbGFiaWxpdGllcw==?=
X-Powered-By: ASP.NET
Date: Wed, 14 Mar 2018 22:19:37 GMT
Content-Length: 808
{
"id": "CFQ7TTC0K971",
"productId": "CFQ7TTC0LH18",
"skuId": "0001",
"catalogItemId": "CFQ7TTC0LH18:0001:CFQ7TTC0K971",
"defaultCurrency": {
"code": "USD",
"symbol": "$"
},
"segment": "commercial",
"country": "US",
"isPurchasable": true,
"isRenewable": true,
"renewalInstructions": [
{
"applicableTermIds": [
"5aeco6mffyxo"
],
"renewalOptions": [
{
"renewToId": "CFQ7TTC0LH18:0001",
"isAutoRenewable": true
}
]
},
…
],
"terms": [
{
"id": "5aeco6mffyxo",
"duration": "P1Y",
"description": "One-Year commitment for monthly/yearly billing",
"billingCycle": "Annual",
"cancellationPolicies": [
{
"refundOptions": [
{
"sequenceId": 0,
"type": "Full",
"expiresAfter": "P1D"
}
]
}
]
},
…
],
"links": {
"self": {
"uri": "/products/CFQ7TTC0LH18/skus/0001/availabilities/CFQ7TTC0K971?country=US",
"method": "GET",
"headers": []
}
},
"links": {
"availabilities": {
"uri": "/products/CFQ7TTC0LH18/skus/0001/availabilities?country=US",
"method": "GET",
"headers": []
},
"self": {
"uri": "/products/CFQ7TTC0LH18/skus/0001?country=US",
"method": "GET",
"headers": []
}
}
}
}