다음을 통해 공유


청구서 추정 링크 가져오기

적용 대상: 파트너 센터 | 21Vianet에서 운영되는 파트너 센터 | Microsoft Cloud for US Government 파트너 센터

청구되지 않은 조정 품목에 대한 세부 정보를 쿼리하는 데 도움이 되는 예상 링크를 가져올 수 있습니다.

필수 조건

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

  • 청구서 식별자입니다. 그러면 품목을 검색할 송장이 식별됩니다.

C#

다음 예제 코드에서는 지정된 통화에 대해 청구되지 않은 품목을 쿼리하는 예상 링크를 가져오는 방법을 보여 주었습니다. 응답에는 각 기간(예: 현재 및 이전 달)에 대한 예상 링크가 포함됩니다.

// IAggregatePartner partnerOperations;
// string curencyCode;

 // all the operations executed on this partner operation instance will share the same correlation Id but will differ in request Id
 IPartner scopedPartnerOperations = partnerOperations.With(RequestContextFactory.Instance.Create(Guid.NewGuid()));

// read estimate links for currencycode
var estimateLinks = scopedPartnerOperations.Invoices.Estimates.Links.ByCurrency(curencyCode).Get();

비슷한 예제는 다음을 참조하세요.

  • 샘플: 콘솔 테스트 앱
  • 프로젝트: 파트너 센터 SDK 샘플
  • 클래스: GetEstimatesLinks.cs

REST 요청

요청 구문

메서드 요청 URI
GET {baseURL}/v1/invoices/estimates/links?currencycode={currencycode} HTTP/1.1

URI 매개 변수

요청을 만들 때 다음 URI 및 쿼리 매개 변수를 사용합니다.

이름 종류 필요함 설명
currencyCode string 청구되지 않은 품목의 통화 코드입니다.

요청 헤더

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

요청 본문

없음

요청 예제

GET https://api.partnercenter.microsoft.com/v1/invoices/estimates/links?currencycode=usd HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: 1234ecb8-37af-45f4-a1a1-358de3ca2b9e
MS-CorrelationId: 5e612512-4345-4bb0-866e-47aeda031234
X-Locale: en-US
MS-PartnerCenter-Application: Partner Center .NET SDK Samples
Host: api.partnercenter.microsoft.com

Important

2023년 6월 현재 최신 파트너 센터 .NET SDK 릴리스 3.4.0이 보관됩니다. 유용한 정보가 포함된 추가 정보 파일함께 GitHub에서 SDK 릴리스를 다운로드할 수 있습니다.

파트너는 파트너 센터 REST API계속 사용하는 것이 좋습니다.

REST 응답

성공하면 응답에 청구되지 않은 예상치를 검색하는 링크가 포함됩니다.

응답 성공 및 오류 코드

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

응답 예제

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/10.0
MS-CorrelationId: 80EAA055-B5D3-4D88-BFE8-924A3F706462
MS-RequestId: 1b18689e-3fe3-4fdb-d09e-39d13941390b
X-Locale: en-US
X-SourceFiles: =?UTF-8?B?RDpcU291cmNlc1xSUEUuUGFydG5lci5TZXJ2aWNlLkJpbGxpbmdTZXJ2aWNlXHYxLjFcV2ViQXBpc1xCaWxsaW5nU2VydmljZS5WMi5XZWJcdjFcaW52b2ljZXNcZXN0aW1hdGVzXGxpbmtz?=
X-Powered-By: ASP.NET
Date: Thu, 14 Mar 2019 18:15:06 GMT
Content-Length: 1857

{
  "totalCount": 4,
  "items": [
    {
      "type": "daily_rated_usage",
      "title": "Daily rated usage unbilled",
      "description": "This invoice line items includes unbilled consumption based data only.",
      "period": "Current",
      "link": {
        "uri": "/invoices/unbilled/lineitems?provider=Marketplace&invoicelineitemtype=UsageLineItems&currencycode=USD&period=current&size=2000",
        "method": "GET",
        "headers": []
      }
    },
    {
      "type": "daily_rated_usage",
      "title": "Daily rated usage unbilled",
      "description": "This invoice line items includes unbilled consumption based data only.",
      "period": "Previous",
      "link": {
        "uri": "/invoices/unbilled/lineitems?provider=Marketplace&invoicelineitemtype=UsageLineItems&currencycode=USD&period=previous&size=2000",
        "method": "GET",
        "headers": []
      }
    },
    {
      "type": "non_consumption",
      "title": "Unbilled reconciliation line items",
      "description": "This includes reconciliation line items for unbilled data only.",
      "period": "Current",
      "link": {
        "uri": "/invoices/unbilled/lineitems?provider=all&invoicelineitemtype=billinglineitems&currencycode=USD&period=current&size=2000",
        "method": "GET",
        "headers": []
      }
    },
    {
      "type": "non_consumption",
      "title": "Unbilled reconciliation line items",
      "description": "This includes reconciliation line items for unbilled data only.",
      "period": "Previous",
      "link": {
        "uri": "/invoices/unbilled/lineitems?provider=all&invoicelineitemtype=billinglineitems&currencycode=USD&period=previous&size=2000",
        "method": "GET",
        "headers": []
      }
    }
  ],
  "attributes": {
    "objectType": "Collection"
 }
}