적용 대상: 21Vianet에서 운영하는 파트너 센터 | 미국 정부용 Microsoft 클라우드 파트너 센터
비고
최신 상용 구매의 경우 이 API는 2025년 5월 15일 이전에 생성된 청구서에만 적용됩니다.
청구서 ID를 사용하여 지정된 청구서를 검색합니다.
필수 조건
자격 증명은 파트너 센터 인증에서 설명됩니다. 이 시나리오에서는 App+User 자격 증명으로만 인증을 지원합니다.
유효한 청구서 ID입니다.
C#
ID로 청구서를 가져오려면 다음을 수행합니다.
IPartner.Invoices 컬렉션을 사용하고 ById() 메서드를 호출합니다.
Get() 또는 GetAsync() 메서드를 호출합니다.
// IPartner scopedPartnerOperations;
// string selectedInvoiceId;
var invoice = scopedPartnerOperations.Invoices.ById(selectedInvoiceId).Get();
샘플: 콘솔 테스트 앱. 프로젝트: PartnerSDK.FeatureSample 클래스: GetInvoice.cs
REST 요청
요청 구문
| 메서드 | URI 요청 |
|---|---|
| GET | {baseURL}/v1/invoices/{invoice-id} HTTP/1.1 |
URI 매개 변수
다음 쿼리 매개 변수를 사용하여 청구서를 가져옵니다.
| 이름 | 유형 | 필수 | Description |
|---|---|---|---|
| invoice-id | string | Yes | 값은 재판매자가 지정된 청구서에 대한 결과를 필터링할 수 있도록 하는 청구서 ID 입니다. |
요청 헤더
자세한 내용은 Partner Center REST 헤더를 참조하세요.
요청 메시지 본문
None
예제 요청
GET https://api.partnercenter.microsoft.com/v1/invoices/<invoice-id> HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: 8ac25aa5-9537-4b6d-b782-aa0c8e979e99
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
REST 응답
성공하면 이 메서드는 응답 본문에 청구서 리소스를 반환합니다.
응답 성공 및 오류 코드
각 응답에는 성공 또는 실패와 추가 디버깅 정보를 나타내는 HTTP 상태 코드가 함께 제공됩니다. 네트워크 추적 도구를 사용하여 이 코드, 오류 유형 및 추가 매개 변수를 읽을 수 있습니다. 전체 목록은 오류 코드를 참조하세요.
응답 예제
HTTP/1.1 200 OK
Content-Length: 676
Content-Type: application/json; charset=utf-8
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: 8ac25aa5-9537-4b6d-b782-aa0c8e979e99
Date: Thu, 24 Mar 2016 05:22:14 GMT
{
"id": "G000024135",
"invoiceDate": "2018-02-08T22:40:37.5897767Z",
"billingPeriodStartDate": "2018-02-01T22:40:37.5897767Z",
"billingPeriodEndDate": "2018-02-28T22:40:37.5897767Z",
"totalCharges": 2076.63,
"paidAmount": 0,
"currencyCode": "USD",
"currencySymbol": "$",
"pdfDownloadLink": "/invoices/G000024135/documents/statement",
"taxReceipts": [
{
"id": "123456",
"taxReceiptPdfDownloadLink": "/invoices/G000024135/receipts/123456/documents/statement"
}
],
"invoiceDetails": [
{
"invoiceLineItemType": "billing_line_items",
"billingProvider": "one_time",
"links": {
"self": {
"uri": "/invoices/OneTime-G000024135/lineitems/OneTime/BillingLineItems",
"method": "GET",
"headers": []
}
},
"attributes": {
"objectType": "InvoiceDetail"
}
}
],
"documentType": "invoice",
"invoiceType": "OneTime",
"links": {
"self": {
"uri": "/invoices/OneTime-G000024135",
"method": "GET",
"headers": []
}
},
"attributes": {
"objectType": "Invoice"
}
}