다음을 통해 공유


주문 품목별 활성화 링크 가져오기

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

주문 품목 번호로 Microsoft Marketplace 구독 활성화 링크를 가져옵니다.

파트너 센터에서 기본 페이지의 구독에서 특정 구독 을 선택하거나 구독 페이지에서 활성화할 구독 옆에 있는 게시자의 사이트로 이동 링크를 선택하여 이 작업을 수행할 수 있습니다 .

필수 조건

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

  • 정품 인증이 필요한 제품으로 주문이 완료되었습니다.

C#

품목의 활성화 링크를 가져오려면 IAggregatePartner.Customers 컬렉션을 사용하고 선택한 고객 ID로 ById() 메서드를 호출합니다. 그런 다음 지정된 OrderId를 사용하여 Orders 속성 및 ById() 메서드를 호출합니다. 그런 다음, 품목 번호 식별자를 사용하여 ById() 메서드를 사용하여 LineItems를 호출합니다. 마지막으로 ActivationLinks() 메서드를 호출합니다 .

// IAggregatePartner partnerOperations;
// string customerId;
// string orderId;
// string lineItemNumber

// get the activation link for the specific line item
var partnerOperations.Customers.ById(customerId).Orders.ById(orderId).OrderLineItems.ById(lineItemNumber).ActivationLinks();

REST 요청

요청 구문

메서드 URI 요청
GET {baseURL}/v1/customers/{customerId}/orders/{orderId}/lineitems/{lineItemNumber}/activationlinks HTTP/1.1

요청 헤더

자세한 내용은 Partner Center REST 헤더를 참조하세요.

요청 메시지 본문

없음.

예제 요청

GET https://api.partnercenter.microsoft.com/v1/customers/8c5b65fd-c725-4f50-8d9c-97ec9169fdd0/orders/03fb46b3-bf8c-49aa-b908-ca2e93bcc04a/lineitems/0/activationlinks HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: 3705fc6d-4127-4a87-bdba-9658f73fe019
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd

REST 응답

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

응답 성공 및 오류 코드

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

응답 예제

HTTP/1.1 200 OK
Content-Length: 809
Content-Type: application/json
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: 3705fc6d-4127-4a87-bdba-9658f73fe019
Date: Fri, 20 Nov 2015 01:08:23 GMT
{
  "totalCount": 1,
  "items": [
    {
      "lineItemNumber": 0,
      "link": {
        "uri": "<link populated here>",
        "method": "GET",
        "headers": [

        ]
      }
    }
  ],
  "links": {
    "self": {
      "uri": "/customers/8c5b65fd-c725-4f50-8d9c-97ec9169fdd0/orders/03fb46b3-bf8c-49aa-b908-ca2e93bcc04a/lineitems/0/activationlinks",
      "method": "GET",
      "headers": [

      ]
    }
  },
  "attributes": {
    "objectType": "Collection"
  }
}