다음을 통해 공유


시장에 대한 제안 목록 가져오기

에 적용 : 파트너 센터 | 21Vianet에서 운영하는 파트너 센터 | 미국 정부 전용 Microsoft 클라우드 파트너 센터

특정 시장에 대한 모든 제안이 포함된 컬렉션을 얻습니다.

필수 구성 요소

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

C#

지정된 시장에서 제품 목록을 얻으려면 IAggregatePartner.Offers 컬렉션을 사용하고, 국가/지역별로 시장을 선택하고, Get() 또는 Get Async() 메서드를 호출합니다.

// IAggregatePartner partnerOperations;

ResourceCollection<Offer> offers = partnerOperations.Offers.ByCountry("US").Get();

샘플: 콘솔 테스트 앱. 프로젝트: PartnerSDK.FeatureSample 클래스: Offers.cs

REST 요청

요청 구문

메서드 요청 URI
가져오기 {baseURL}/v1/offers?country={country-id} HTTP/1.1

URI 매개 변수

이 표에는 혜택을 가져오는 데 필요한 쿼리 매개 변수가 나열됩니다.

이름 유형 필수 설명
국가 ID 문자열 Y 국가/지역 ID입니다.

요청 헤더

  • 문자열로 형식이 지정된 locale-id 필요합니다. 자세한 내용은 파트너 센터 REST 헤더 참조하세요.

요청 본문

없음.

요청 예제

GET https://api.partnercenter.microsoft.com/v1/offers?country=<country-id> HTTP/1.1
Authorization: Bearer
Accept: application/json
MS-RequestId: 031160b2-b0b0-4d40-b2b1-aaa9bb84211d
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
X-Locale: <locale-id>

REST 응답

성공하면 이 메서드는 응답 본문에 Offer 리소스 컬렉션을 반환합니다.

응답 성공 및 오류 코드

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

응답 예제

HTTP/1.1 200 OK
Content-Length: 26584
Content-Type: application/json
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: 031160b2-b0b0-4d40-b2b1-aaa9bb84211d
Date: Mon, 23 Nov 2015 23:20:44 GMT

{
    "totalCount":12,"items":[{
        "id":"E60E0348-1710-484B-992A-32B294D4CDE1",
        "name":"Azure Rights Management Premium (Government Pricing)",
        "description":"Microsoft Azure Rights Management Premium helps you protect confidential documents and email with strong encryption.
                       Control the use of your information by specifying who can view, edit, print, save and share your data.
                       Simple to use and integrated with Microsoft Office, SharePoint and Exchange.",
        "minimumQuantity":1,
        "maximumQuantity":10000000,
        "rank":5,
        "uri":"/3c95518e-8c37-41e3-9627-0ca339200f53/Offers/E60E0348-1710-484B-992A-32B294D4CDE1",
        "locale":"EN-US",
        "country":"US",
        "category":{
            "id":"Government_Key",
            "name":"Government",
            "rank":40,
            "locale":"en-us",
            "country":"US",
            "attributes":{
                "objectType":"OfferCategory"
            }
        },
        "prerequisiteOffers":[],
        "isAddOn":false,
        "isAvailableForPurchase":true,
        "billing":"license",
        "isAutoRenewable":true,
        "product":{
            "id":"c52ea49f-fe5d-4e95-93ba-1de91d380f89",
            "name":"Azure Rights Management Premium",
            "unit":"Licenses"
        },
        "unitType":"Licenses",
        "links":{
            "learnMore":{
                "uri":"http://g.microsoftonline.com/0BXPS00en/0000",
                "method":"GET",
                "headers":[]
            },
            "self":{
                "uri":"/offers/E60E0348-1710-484B-992A-32B294D4CDE1",
                "method":"GET",
                "headers":[]
            }
        },
        "attributes":{
            "objectType":"Offer"
        }
    },
    "links":{
        "self":{
            "uri":"/v1/offers?country={country-id}",
            "method":"GET",
            "headers":[]
        },
        "previous":{
            "uri":"/v1/offers?country={country-id}",
            "method":"GET",
            "headers":[]
        }
    },
    "attributes":{
        "objectType":"Collection"
    }
}