다음을 통해 공유


ID별 제품 가져오기

제품 ID를 사용하여 지정된 제품 리소스를 가져옵니다.

필수 조건

  • 자격 증명(파트너 센터 인증에서 설명). 이 시나리오는 독립 실행형 앱과 App+사용자 자격 증명을 모두 사용하여 인증을 지원합니다.

  • 제품 ID입니다.

C#

ID별로 특정 제품을 찾으려면 IAggregatePartner.Products 컬렉션을 사용하고 ByCountry() 메서드를 사용하여 국가를 선택한 다음 ById() 메서드를 호출합니다. 마지막으로 Get() 또는 GetAsync() 메서드를 호출하여 제품을 반환합니다.

// IAggregatePartner partnerOperations;

Product productDetail = partnerOperations.Products.ByCountry("US").ById("DZH318Z0BQ3Q").Get();

Java

파트너 센터 Java SDK를 사용하여 파트너 센터 리소스를 관리할 수 있습니다. 파트너 커뮤니티에서 유지 관리하며 Microsoft에서 공식적으로 지원하지 않는 오픈 소스 프로젝트입니다. 문제가 발생한 경우 커뮤니티에서 도움을 받거나 GitHub에서 문제를 열 수 있습니다.

ID별로 특정 제품을 찾으려면 IAggregatePartner.getProducts 함수를 사용하고 byCountry() 함수를 사용하여 국가를 선택한 다음 byId() 함수를 호출합니다. 마지막으로 get() 함수를 호출하여 제품을 반환합니다.

// IAggregatePartner partnerOperations;

Product productDetail = partnerOperations.getProducts().byCountry("US").byId("DZH318Z0BQ3Q").get();

PowerShell

파트너 센터 PowerShell 모듈을 사용하여 파트너 센터 리소스를 관리할 수 있습니다. 파트너 커뮤니티에서 유지 관리하며 Microsoft에서 공식적으로 지원하지 않는 오픈 소스 프로젝트입니다. 문제가 발생한 경우 커뮤니티에서 도움을 받거나 GitHub에서 문제를 열 수 있습니다.

ID로 특정 제품을 찾으려면 Get-PartnerProduct 명령을 실행하고 ProductId 매개 변수를 지정합니다. CountryCode 매개 변수는 옵션입니다. 지정하지 않으면 재판매인과 연결된 국가가 사용됩니다.

Get-PartnerProduct -ProductId 'DZH318Z0BQ3Q'

REST 요청

요청 구문

메서드 요청 URI
GET {baseURL}/v1/products/{product-id}?country={country} HTTP/1.1

URI 매개 변수

다음 경로 매개 변수를 사용하여 지정된 제품을 가져옵니다.

속성 Type 필수 설명
product-id string 제품을 식별하는 문자열입니다.
country string 국가/지역 ID입니다.

요청 헤더

자세한 내용은 파트너 센터 REST 헤더를 참조하세요.

요청 본문

없음

요청 예제

GET https://api.partnercenter.microsoft.com/v1/products/{product-id}?country=US HTTP/1.1
Authorization: Bearer
Accept: application/json
MS-RequestId: 031160b2-b0b0-4d40-b2b1-aaa9bb84211d
MS-CorrelationId: 7c1f6619-c176-4040-a88f-2c71f3ba4533

REST 응답

성공하면 응답 본문에 Product 리소스가 포함됩니다.

응답 성공 및 오류 코드

각 응답에는 성공 또는 실패와 추가 디버깅 정보를 나타내는 HTTP 상태 코드가 함께 제공됩니다. 네트워크 추적 도구를 사용하여 이 코드, 오류 유형 및 추가 매개 변수를 읽을 수 있습니다. 전체 목록은 파트너 센터 오류 코드를 참조 하세요.

이 메서드는 다음 오류 코드를 반환합니다.

HTTP 상태 코드 오류 코드 설명
404 400013 제품을 찾을 수 없습니다.

Azure VM 예약에 대한 응답 예제(Azure 플랜)

HTTP/1.1 200 OK
Content-Length: 1918
Content-Type: application/json
MS-CorrelationId: 7c1f6619-c176-4040-a88f-2c71f3ba4533
MS-RequestId: ac943950-ba3d-47a0-bd2a-c5617a7fefe8
Date: Tue, 23 Jan 2018 23:13:01 GMT

{
    "id": "DZH318Z0BQ3Q",
    "title": "Virtual Machines DSv2 Series",
    "description": "Dsv2-series instances are the latest generation of D-series instances that will carry more powerful CPUs which are on average about 35% faster than D-series instances, and carry the same memory and disk configurations as the D-series. Dsv2-series instances are based on the latest generation 2.4 GHz Intel Xeon® E5-2673 v3 (Haswell) processor, and with Intel Turbo Boost Technology 2.0 can go to 3.2 GHz.",
    "productType": {
        "id": "Azure",
        "displayName": "Azure",
        "subType": {
            "id": "VirtualMachines",
            "displayName": "VirtualMachines"
        }
    },
    "isMicrosoftProduct": true,
    "publisherName": "Microsoft",
    "links": {
        "skus": {
            "uri": "/products/DZH318Z0BQ3Q/skus?country=US",
            "method": "GET",
            "headers": []
        },
        "self": {
            "uri": "/products/DZH318Z0BQ3Q?country=US",
            "method": "GET",
            "headers": []
        }
    }
}

새 상거래 라이선스 기반 제품에 대한 응답 예제

참고 항목

라이선스 기반 서비스에 대한 새로운 상거래 환경에는 많은 새로운 기능이 포함되며 모든 CSP(클라우드 솔루션 공급자)에서 사용할 수 있습니다. 자세한 내용은 새 상거래 환경 개요를 참조하세요.

{
    "id": "CFQ7TTC0LH18",
    "title": "Microsoft 365 Business Basic",
    "description": "Best for businesses that need professional email, cloud file storage, and online meetings & chat. Desktop versions of Office apps like Excel, Word, and PowerPoint not included. For businesses with up to 300 employees.",
    "productType": {
        "id": "OnlineServicesNCE",
        "displayName": "OnlineServicesNCE"
    },
    "isMicrosoftProduct": true,
    "publisherName": "Microsoft Corporation",
    "links": {
        "skus": {
            "uri": "/products/CFQ7TTC0LH18/skus?country=US",
            "method": "GET",
            "headers": []
        },
        "self": {
        "uri": "/products/CFQ7TTC0LH18?country=US",
            "method": "GET",
            "headers": []
        }
    }
}