Získání nefakturovaných položek řádku odsouhlasení faktury
Platí pro: Partnerské centrum | Partnerské centrum provozované společností 21Vianet | Partnerské centrum pro Microsoft Cloud pro státní správu USA
Následující metody umožňují získat kolekci podrobností pro nefakturované řádkové položky faktury (označované také jako otevřené položky řádku fakturace).
Požadavky
Přihlašovací údaje popsané v ověřování v Partnerském centru Tento scénář podporuje ověřování pomocí samostatných přihlašovacích údajů aplikace i aplikace a uživatele.
Identifikátor faktury. Tím se identifikuje faktura, pro kterou se mají načíst řádkové položky.
C#
Pokud chcete získat řádkové položky pro zadanou fakturu, načtěte objekt faktury:
Voláním metody ById získáte rozhraní pro operace faktury pro zadanou fakturu.
Voláním metody Get nebo GetAsync načtěte objekt faktury.
Objekt faktury obsahuje všechny informace pro zadanou fakturu:
Zprostředkovatel identifikuje zdroj nefakturovaných podrobných informací (například OneTime).
InvoiceLineItemType určuje typ (například BillingLineItem).
Získání kolekce řádkových položek, které odpovídají instanci InvoiceDetail :
Předejte instanci BillingProvider a InvoiceLineItemType metodě.
Volání Get nebo GetAsync metoda načíst přidružené řádkové položky.
Vytvořte enumerátor pro procházení kolekce. Příklad najdete v následujícím ukázkovém kódu.
Následující ukázkový kód používá smyčku foreach ke zpracování kolekce InvoiceLineItems . Pro každou invoiceLineItemType se načte samostatná kolekce řádkových položek.
// IAggregatePartner partnerOperations;
// string currencyCode;
// string period;
// int pageMaxSizeReconLineItems = 2000;
// 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()));
var seekBasedResourceCollection = scopedPartnerOperations.Invoices.ById("unbilled").By("onetime", "billinglineitems", currencyCode, period, pageMaxSizeReconLineItems).Get();
var fetchNext = true;
ConsoleKeyInfo keyInfo;
var itemNumber = 1;
while (fetchNext)
{
Console.Out.WriteLine("\tLine line items count: " + seekBasedResourceCollection.Items.Count());
seekBasedResourceCollection.Items.ToList().ForEach(item =>
{
// Instance of type OneTimeInvoiceLineItem
if (item is OneTimeInvoiceLineItem)
{
Type t = typeof(OneTimeInvoiceLineItem);
PropertyInfo[] properties = t.GetProperties();
foreach (PropertyInfo property in properties)
{
// Insert code here to work with the line item properties
}
}
itemNumber++;
});
Console.Out.WriteLine("\tPress any key to fetch next data. Press the Escape (Esc) key to quit: \n");
keyInfo = Console.ReadKey();
if (keyInfo.Key == ConsoleKey.Escape)
{
break;
}
fetchNext = !string.IsNullOrWhiteSpace(seekBasedResourceCollection.ContinuationToken);
if (fetchNext)
{
if (seekBasedResourceCollection.Links.Next.Headers != null && seekBasedResourceCollection.Links.Next.Headers.Any())
{
seekBasedResourceCollection = scopedPartnerOperations.Invoices.ById("unbilled").By("onetime", "billinglineitems", currencyCode, period, pageMaxSizeReconLineItems).Seek(seekBasedResourceCollection.ContinuationToken, SeekOperation.Next);
}
}
}
Podobný příklad najdete tady:
- Ukázka: Konzolová testovací aplikace
- Projekt: Ukázky sady SDK v Partnerském centru
- Třída: GetUnBilledReconLineItemsPaging.cs
Požadavek REST
Syntaxe požadavku
V závislosti na vašem případu použití můžete pro požadavek REST použít následující syntaxe. Další informace najdete v popisech jednotlivých syntaxí.
metoda | Identifikátor URI žádosti | Popis případu použití syntaxe |
---|---|---|
GET | {baseURL}/v1/invoices/unbilled/lineitems?provider=onetime&invoicelineitemtype=billinglineitems¤cycode={currencycode}&period={period} HTTP/1.1 | Tato syntaxe slouží k vrácení úplného seznamu každé řádkové položky pro danou fakturu. |
GET | {baseURL}/v1/invoices/unbilled/lineitems?provider=onetime&invoicelineitemtype=billinglineitems¤cycode={currencycode}&period={period}&size={size} HTTP/1.1 | U velkých faktur použijte tuto syntaxi se zadanou velikostí a posunem 0, abyste vrátili stránkovaný seznam řádkových položek. |
GET | {baseURL}/v1/invoices/unbilled/lineitems?provider=onetime&invoicelineitemtype=billinglineitems¤cycode={currencycode}&period={period}&size={size}&seekOperation=Next | Pomocí této syntaxe získáte další stránku položek řádku odsouhlasení pomocí seekOperation = "Next" . |
Parametry identifikátoru URI
Při vytváření požadavku použijte následující identifikátor URI a parametry dotazu.
Name | Type | Požadováno | Popis |
---|---|---|---|
Zprostředkovatel | string | Ano | Zprostředkovatel: OneTime. |
invoice-line-item-type | string | Ano | Typ podrobností faktury: BillingLineItems. |
hasPartnerEarnedCredit | bool | No | Hodnota označující, zda se mají vrátit řádkové položky s použitým kreditem získaným partnerem. Poznámka: Tento parametr se použije pouze v případě, že typ zprostředkovatele je OneTime a InvoiceLineItemType je UsageLineItems. |
currencyCode | string | Ano | Kód měny pro nefakturované řádkové položky. |
Období | string | Ano | Období nefakturované rekondibility. příklad: current, previous. |
size | Číslo | No | Maximální počet položek, které se mají vrátit. Výchozí velikost je 2000 |
seekOperation | string | No | Nastavte funkci seekOperation=Next a získejte další stránku řádkových položek recon. |
Záhlaví žádosti
Další informace najdete v tématu Hlavičky REST Partnerského centra.
Text požadavku
Nezaokrouhlovat.
Odpověď REST
V případě úspěchu odpověď obsahuje kolekci podrobností o položce řádku.
U položky řádku ChargeType je hodnota Nákup namapována na Nový a hodnota Refundace je namapována na Storno.
Kódy úspěšnosti a chyb odpovědi
Každá odpověď obsahuje stavový kód HTTP, který označuje úspěch nebo selhání a další informace o ladění. Ke čtení tohoto kódu, typu chyby a dalších parametrů použijte nástroj pro trasování sítě. Úplný seznam najdete v tématu Kódy chyb REST v Partnerském centru.
Příklady odpovědí na žádosti
Příklad odpovědi požadavku 1
Následující podrobnosti platí pro tento příklad:
- Zprostředkovatel: OneTime
- InvoiceLineItemType: BillingLineItems
- Období: Předchozí
Příklad požadavku 1
GET https://api.partnercenter.microsoft.com/v1//invoices/unbilled/lineitems?provider=onetime&invoicelineitemtype=billinglineitems¤cycode=usd&period=previous&size=2000 HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: 1234ecb8-37af-45f4-a1a1-358de3ca2b9e
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
X-Locale: en-US
MS-PartnerCenter-Application: Partner Center .NET SDK Samples
Host: api.partnercenter.microsoft.com
Důležité
Od června 2023 se teď archivuje nejnovější verze sady .NET SDK partnerského centra 3.4.0. Vydání sady SDK si můžete stáhnout z GitHubu spolu se souborem readme, který obsahuje užitečné informace.
Doporučujeme, aby partneři dál používali rozhraní REST API Partnerského centra.
Příklad odpovědi 1
HTTP/1.1 200 OK
Content-Length: 2484
Content-Type: application/json; charset=utf-8
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: 1234ecb8-37af-45f4-a1a1-358de3ca2b9e
MS-CV: bpqyomePDUqrSSYC.0
MS-ServerId: 202010406
Date: Wed, 20 Feb 2019 19:59:27 GMT
{
"totalCount": 3,
"items": [
{
"partnerId": "934f3416-bc2f-47f3-b492-77e517d4e572",
"customerId": "c139c4bf-2e8b-4ab5-8bed-d9f50dcca7a2",
"customerName": "Test_Test_Office R2 Reduce Seats Validation",
"customerDomainName": "testcustomerr2t2reduce.onmicrosoft.com",
"customerCountry": "US",
"invoiceNumber": "",
"mpnId": "5357564",
"resellerMpnId": "4649221",
"orderId": "94e858b6d855",
"orderDate": "2021-05-20T18:30:06.6045692Z",
"productId": "CFQ7TTC0LH0R",
"skuId": "0002",
"availabilityId": "CFQ7TTC0K5RQ",
"productName": "Microsoft 365 Phone System - Virtual User",
"skuName": "Microsoft 365 Phone System - Virtual User",
"productQualifiers": [
"AddOn",
"Trial"
],
"chargeType": "new",
"unitPrice": "0",
"effectiveUnitPrice": "0",
"unitType": "",
"quantity": "25",
"subtotal": "0",
"taxTotal": "0",
"totalForCustomer": "0",
"currency": "USD",
"publisherName": "Microsoft Corporation",
"publisherId": "",
"subscriptionDescription": "",
"subscriptionId": "aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e",
"subscriptionStartDate": "2021-05-20T00:00:00Z",
"subscriptionEndDate": "2021-06-19T00:00:00Z",
"chargeStartDate": "2021-05-20T00:00:00Z",
"chargeEndDate": "2021-06-19T00:00:00Z",
"termAndBillingCycle": "One-Month commitment for trial",
"alternateId": "94e858b6d855",
"referenceId": "0cf1202a-5b7d-4219-966e-93c637113708",
"priceAdjustmentDescription": "",
"discountDetails": "",
"pricingCurrency": "USD",
"pcToBCExchangeRate": "1",
"pcToBCExchangeRateDate": "2021-05-01T00:00:00",
"billableQuantity": "25",
"meterDescription": "",
"billingFrequency": "",
"reservationOrderId": "99f246cf-ed96-41b4-b0cd-0aa43eb1fe91",
"invoiceLineItemType": "billing_line_items",
"billingProvider": "one_time",
"promotionId": "",
"attributes": {
"objectType": "OneTimeInvoiceLineItem"
}
},
{
"partnerId": "934f3416-bc2f-47f3-b492-77e517d4e572",
"customerId": "835a59a7-3172-47b5-bdef-d9cc65f4d0e4",
"customerName": "TEST_TEST Test Promotions 01",
"customerDomainName": "kyletestpromos01.onmicrosoft.com",
"customerCountry": "US",
"invoiceNumber": "",
"mpnId": "5357564",
"resellerMpnId": "0",
"orderId": "5f9d52bb1408",
"orderDate": "2021-05-20T18:48:30.6168285Z",
"productId": "CFQ7TTC0HL8W",
"skuId": "0001",
"availabilityId": "CFQ7TTC0K59S",
"productName": "Power BI Premium Per User",
"skuName": "Power BI Premium Per User",
"productQualifiers": [],
"chargeType": "new",
"unitPrice": "16",
"effectiveUnitPrice": "14.4",
"unitType": "",
"quantity": "50",
"subtotal": "720",
"taxTotal": "0",
"totalForCustomer": "0",
"currency": "USD",
"publisherName": "Microsoft Corporation",
"publisherId": "",
"subscriptionDescription": "",
"subscriptionId": "bbbb1b1b-cc2c-dd3d-ee4e-ffffff5f5f5f",
"subscriptionStartDate": "2021-05-20T00:00:00Z",
"subscriptionEndDate": "2022-05-19T00:00:00Z",
"chargeStartDate": "2021-05-20T00:00:00Z",
"chargeEndDate": "2021-06-19T00:00:00Z",
"termAndBillingCycle": "One-Year commitment for monthly/yearly billing",
"alternateId": "5f9d52bb1408",
"referenceId": "28b535e0-68f4-40b5-84f7-8ed9241eb149",
"priceAdjustmentDescription": "[\"Price for given billing period\",\"You are getting a discount due to a pre-determined override.\",\"You are getting a discount for being a partner.\",\"You are getting a price guarantee for your price.\",\"Price for given term\"]",
"discountDetails": "",
"pricingCurrency": "USD",
"pcToBCExchangeRate": "1",
"pcToBCExchangeRateDate": "2021-05-01T00:00:00",
"billableQuantity": "50",
"meterDescription": "",
"billingFrequency": "Monthly",
"reservationOrderId": "8fdebb4a-7110-496e-9570-623e4c992797",
"invoiceLineItemType": "billing_line_items",
"billingProvider": "one_time",
"promotionId": "39NFJQT1X27N:0002:39NFJQT1Q5KL",
"attributes/objectType": "OneTimeInvoiceLineItem",
"attributes": {
"objectType": "OneTimeInvoiceLineItem"
}
},
{
"partnerId": "934f3416-bc2f-47f3-b492-77e517d4e572",
"customerId": "c139c4bf-2e8b-4ab5-8bed-d9f50dcca7a2",
"customerName": "Test_Test_Office R2 Reduce Seats Validation",
"customerDomainName": "testcustomerr2t2reduce.onmicrosoft.com",
"customerCountry": "US",
"invoiceNumber": "",
"mpnId": "1234567",
"resellerMpnId": 0,
"orderId": "HJVtMZMkgQ2miuCiNv0RSr51zQDans0m1",
"orderDate": "2019-02-04T17:59:52.9460102Z",
"productId": "DZH318Z0BXWC",
"skuId": "0002",
"availabilityId": "DZH318Z0BP8B",
"productName": "Test WAF-as-a-Service",
"skuName": "Test WaaS - Medium Plan",
"chargeType": "New",
"unitPrice": 820,
"effectiveUnitPrice": 820,
"unitType": "",
"quantity": 1,
"subtotal": 820,
"taxTotal": 0,
"totalForCustomer": 0,
"currency": "USD",
"publisherName": "Test Networks, Inc.",
"publisherId": "21223810",
"subscriptionDescription": "",
"subscriptionId": "cccc2c2c-dd3d-ee4e-ff5f-aaaaaa6a6a6a",
"subscriptionStartDate": "2019-02-01T00:00:00Z",
"subscriptionEndDate": "2020-01-31T00:00:00Z",
"chargeStartDate": "2019-02-04T09:22:40.1767993-08:00",
"chargeEndDate": "2019-03-03T09:22:40.1767993-08:00",
"termAndBillingCycle": "1 Year Subscription",
"alternateId": "123456ad566",
"priceAdjustmentDescription": "[\"15.0% Partner earned credit for services managed\"]",
"discountDetails": "",
"pricingCurrency": "USD",
"pcToBCExchangeRate": 1,
"pcToBCExchangeRateDate": "2019-08-01T00:00:00Z",
"billableQuantity": 3.1618,
"meterDescription": "Bandwidth - Data Transfer In (GB) - Zone 2",
"reservationOrderId": "883d475b-0000-1234-0000-8818752f1234",
"attributes": {
"objectType": "OneTimeInvoiceLineItem"
}
}
]
}
],
"links": {
"self": {
"uri": "/invoices/unbilled/lineitems?provider=onetime&invoicelineitemtype=billinglineitems¤cycode=usd&period=previous&size=2000",
"method": "GET",
"headers": []
},
"next": {
"uri": "/invoices/unbilled/lineitems?provider=onetime&invoicelineitemtype=billinglineitems¤cycode=usd&period=previous&size=2000&seekOperation=Next",
"method": "GET",
"headers": [
{
"key": "MS-ContinuationToken",
"value": "AQAAAA=="
}
]
}
},
"attributes": {
"objectType": "Collection"
}
}
Příklad odpovědi požadavku 2
Následující podrobnosti platí pro tento příklad:
- Zprostředkovatel: OneTime
- InvoiceLineItemType: BillingLineItems
- Období: Předchozí
- SeekOperation: Next
Příklad požadavku 2
GET https://api.partnercenter.microsoft.com/v1/invoices/unbilled/lineitems?provider=onetime&invoiceLineItemType=billinglineitems¤cyCode=usd&period=previous&size=2000&seekoperation=next HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-ContinuationToken: d19617b8-fbe5-4684-a5d8-0230972fb0cf,0705c4a9-39f7-4261-ba6d-53e24a9ce47d_a4ayc/80/OGda4BO/1o/V0etpOqiLx1JwB5S3beHW0s=,0d81c700-98b4-4b13-9129-ffd5620f72e7
MS-RequestId: 1234ecb8-37af-45f4-a1a1-358de3ca2b9e
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
X-Locale: en-US
MS-PartnerCenter-Application: Partner Center .NET SDK Samples
Host: api.partnercenter.microsoft.com
Příklad odpovědi 2
HTTP/1.1 200 OK
Content-Length: 2484
Content-Type: application/json; charset=utf-8
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: 1234ecb8-37af-45f4-a1a1-358de3ca2b9e
MS-CV: bpqyomePDUqrSSYC.0
MS-ServerId: 202010406
Date: Wed, 20 Feb 2019 19:59:27 GMT
{
"totalCount": 2,
"items": [
{
"partnerId": "934f3416-bc2f-47f3-b492-77e517d4e572",
"customerId": "c139c4bf-2e8b-4ab5-8bed-d9f50dcca7a2",
"customerName": "Test_Test_Office R2 Reduce Seats Validation",
"customerDomainName": "testcustomerr2t2reduce.onmicrosoft.com",
"customerCountry": "US",
"invoiceNumber": "",
"mpnId": "5357564",
"resellerMpnId": "4649221",
"orderId": "94e858b6d855",
"orderDate": "2021-05-20T18:30:06.6045692Z",
"productId": "CFQ7TTC0LH0R",
"skuId": "0002",
"availabilityId": "CFQ7TTC0K5RQ",
"productName": "Microsoft 365 Phone System - Virtual User",
"skuName": "Microsoft 365 Phone System - Virtual User",
"productQualifiers": [
"AddOn",
"Trial"
],
"chargeType": "new",
"unitPrice": "0",
"effectiveUnitPrice": "0",
"unitType": "",
"quantity": "25",
"subtotal": "0",
"taxTotal": "0",
"totalForCustomer": "0",
"currency": "USD",
"publisherName": "Microsoft Corporation",
"publisherId": "",
"subscriptionDescription": "",
"subscriptionId": "aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e",
"subscriptionStartDate": "2021-05-20T00:00:00Z",
"subscriptionEndDate": "2021-06-19T00:00:00Z",
"chargeStartDate": "2021-05-20T00:00:00Z",
"chargeEndDate": "2021-06-19T00:00:00Z",
"termAndBillingCycle": "One-Month commitment for trial",
"alternateId": "94e858b6d855",
"referenceId": "0cf1202a-5b7d-4219-966e-93c637113708",
"priceAdjustmentDescription": "",
"discountDetails": "",
"pricingCurrency": "USD",
"pcToBCExchangeRate": "1",
"pcToBCExchangeRateDate": "2021-05-01T00:00:00",
"billableQuantity": "25",
"meterDescription": "",
"billingFrequency": "",
"reservationOrderId": "99f246cf-ed96-41b4-b0cd-0aa43eb1fe91",
"invoiceLineItemType": "billing_line_items",
"billingProvider": "one_time",
"promotionId": "",
"attributes": {
"objectType": "OneTimeInvoiceLineItem"
}
},
{
"partnerId": "934f3416-bc2f-47f3-b492-77e517d4e572",
"customerId": "835a59a7-3172-47b5-bdef-d9cc65f4d0e4",
"customerName": "TEST_TEST Test Promotions 01",
"customerDomainName": "kyletestpromos01.onmicrosoft.com",
"customerCountry": "US",
"invoiceNumber": "",
"mpnId": "5357564",
"resellerMpnId": "0",
"orderId": "5f9d52bb1408",
"orderDate": "2021-05-20T18:48:30.6168285Z",
"productId": "CFQ7TTC0HL8W",
"skuId": "0001",
"availabilityId": "CFQ7TTC0K59S",
"productName": "Power BI Premium Per User",
"skuName": "Power BI Premium Per User",
"productQualifiers": [],
"chargeType": "new",
"unitPrice": "16",
"effectiveUnitPrice": "14.4",
"unitType": "",
"quantity": "50",
"subtotal": "720",
"taxTotal": "0",
"totalForCustomer": "0",
"currency": "USD",
"publisherName": "Microsoft Corporation",
"publisherId": "",
"subscriptionDescription": "",
"subscriptionId": "bbbb1b1b-cc2c-dd3d-ee4e-ffffff5f5f5f",
"subscriptionStartDate": "2021-05-20T00:00:00Z",
"subscriptionEndDate": "2022-05-19T00:00:00Z",
"chargeStartDate": "2021-05-20T00:00:00Z",
"chargeEndDate": "2021-06-19T00:00:00Z",
"termAndBillingCycle": "One-Year commitment for monthly/yearly billing",
"alternateId": "5f9d52bb1408",
"referenceId": "28b535e0-68f4-40b5-84f7-8ed9241eb149",
"priceAdjustmentDescription": "[\"Price for given billing period\",\"You are getting a discount due to a pre-determined override.\",\"You are getting a discount for being a partner.\",\"You are getting a price guarantee for your price.\",\"Price for given term\"]",
"discountDetails": "",
"pricingCurrency": "USD",
"pcToBCExchangeRate": "1",
"pcToBCExchangeRateDate": "2021-05-01T00:00:00",
"billableQuantity": "50",
"meterDescription": "",
"billingFrequency": "Monthly",
"reservationOrderId": "8fdebb4a-7110-496e-9570-623e4c992797",
"invoiceLineItemType": "billing_line_items",
"billingProvider": "one_time",
"promotionId": "39NFJQT1X27N:0002:39NFJQT1Q5KL",
"attributes/objectType": "OneTimeInvoiceLineItem",
"attributes": {
"objectType": "OneTimeInvoiceLineItem"
}
},
{
"partnerId": "934f3416-bc2f-47f3-b492-77e517d4e572",
"customerId": "c139c4bf-2e8b-4ab5-8bed-d9f50dcca7a2",
"customerName": "Test_Test_Office R2 Reduce Seats Validation",
"customerDomainName": "testcustomerr2t2reduce.onmicrosoft.com",
"customerCountry": "US",
"invoiceNumber": "",
"mpnId": "1234567",
"resellerMpnId": 0,
"orderId": "HJVtMZMkgQ2miuCiNv0RSr51zQDans0m1",
"orderDate": "2019-02-04T17:59:52.9460102Z",
"productId": "DZH318Z0BXWC",
"skuId": "0002",
"availabilityId": "DZH318Z0BP8B",
"productName": "Test WAF-as-a-Service",
"skuName": "Test WaaS - Medium Plan",
"chargeType": "New",
"unitPrice": 820,
"effectiveUnitPrice": 820,
"unitType": "",
"quantity": 1,
"subtotal": 820,
"taxTotal": 0,
"totalForCustomer": 0,
"currency": "USD",
"publisherName": "Test Networks, Inc.",
"publisherId": "21223810",
"subscriptionDescription": "",
"subscriptionId": "cccc2c2c-dd3d-ee4e-ff5f-aaaaaa6a6a6a",
"subscriptionStartDate": "2019-02-01T00:00:00Z",
"subscriptionEndDate": "2020-01-31T00:00:00Z",
"chargeStartDate": "2019-02-04T09:22:40.1767993-08:00",
"chargeEndDate": "2019-03-03T09:22:40.1767993-08:00",
"termAndBillingCycle": "1 Year Subscription",
"alternateId": "123456ad566",
"priceAdjustmentDescription": "[\"15.0% Partner earned credit for services managed\"]",
"discountDetails": "",
"pricingCurrency": "USD",
"pcToBCExchangeRate": 1,
"pcToBCExchangeRateDate": "2019-08-01T00:00:00Z",
"billableQuantity": 3.1618,
"meterDescription": "Bandwidth - Data Transfer In (GB) - Zone 2",
"reservationOrderId": "883d475b-0000-1234-0000-8818752f1234",
"attributes": {
"objectType": "OneTimeInvoiceLineItem"
}
},
{
"partnerId": "0c924e8d-4852-4692-a4d7-7dd0dc09ad80",
"customerId": "org:d7f565f5-5367-492f-a465-9e2057c5e3c3",
"customerName": "TEST_TEST_GTM1",
"customerDomainName": "TESTTESTGTM1.onmicrosoft.com",
"customerCountry": "US",
"invoiceNumber": "",
"mpnId": "123456",
"resellerMpnId": 0,
"orderId": "VdqkP11Bu4DlcjP5rLeQabcdefg-1234",
"orderDate": "2021-01-29T19:50:13.9869095Z",
"productId": "CFQ7TTC01234",
"skuId": "0001",
"availabilityId": "CFQ7TTC0ABCD",
"productName": "Office 365 E3",
"skuName": "Office 365 E3",
"chargeType": "new",
"unitPrice": 16,
"effectiveUnitPrice": 16,
"unitType": "",
"quantity": 1,
"subtotal": 16,
"taxTotal": 1.61,
"totalForCustomer": 17.61,
"currency": "USD",
"publisherName": "Microsoft Corporation",
"publisherId": "",
"subscriptionDescription": "",
"subscriptionId": "dddd3d3d-ee4e-ff5f-aa6a-bbbbbb7b7b7b",
"chargeStartDate": "2021-01-29T00:00:00Z",
"chargeEndDate": "2021-02-27T00:00:00Z",
"termAndBillingCycle": "One-Year commitment for monthly/yearly billing",
"priceAdjustmentDescription": "[\"1 month billing/",\"You are getting a discount for being a partner.\",\"You are getting a price guarantee for your price.\",\"Yearly Duration\"]",
"discountDetails": "",
"pricingCurrency": "USD",
"pcToBCExchangeRate": 1,
"pcToBCExchangeRateDate": "0001-01-01T00:00:00",
"billableQuantity": 1,
"meterDescription": "",
"billingFrequency": "Monthly",
"reservationOrderId": "e770c049-89c7-4ec1-b366-123456789000",
"invoiceLineItemType": "billing_line_items",
"billingProvider": "one_time",
"attributes": {
"objectType": "OneTimeInvoiceLineItem"
}
}
],
"links": {
"self": {
"uri": "/invoices/unbilled/lineitems?provider=onetime&invoicelineitemtype=billinglineitems¤cycode=usd&period=previous&size=2000",
"method": "GET",
"headers": []
}
},
"attributes": {
"objectType": "Collection"
}
}
Příklad požadavku 3
GET https://api.partnercenter.microsoft.com/v1/invoices/unbilled/lineitems?provider=OneTime&invoiceLineItemType=UsageLineItems¤cyCode=usd&period=previous&size=2000&seekoperation=next HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-ContinuationToken: d19617b8-fbe5-4684-a5d8-0230972fb0cf,0705c4a9-39f7-4261-ba6d-53e24a9ce47d_a4ayc/80/OGda4BO/1o/V0etpOqiLx1JwB5S3beHW0s=,0d81c700-98b4-4b13-9129-ffd5620f72e7
MS-RequestId: 1234ecb8-37af-45f4-a1a1-358de3ca2b9e
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
X-Locale: en-US
MS-PartnerCenter-Application: Partner Center .NET SDK Samples
Host: api.partnercenter.microsoft.com
Příklad odpovědi 3
HTTP/1.1 200 OK
Content-Length: 2484
Content-Type: application/json; charset=utf-8
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: 1234ecb8-37af-45f4-a1a1-358de3ca2b9e
MS-CV: bpqyomePDUqrSSYC.0
MS-ServerId: 202010406
Date: Wed, 20 Feb 2019 19:59:27 GMT
{
"totalCount": 2,
"items": [
{
"partnerId": "934f3416-bc2f-47f3-b492-77e517d4e572",
"customerId": "c139c4bf-2e8b-4ab5-8bed-d9f50dcca7a2",
"customerName": "Test_Test_Office R2 Reduce Seats Validation",
"customerDomainName": "testcustomerr2t2reduce.onmicrosoft.com",
"customerCountry": "US",
"invoiceNumber": "",
"mpnId": "5357564",
"resellerMpnId": "4649221",
"orderId": "94e858b6d855",
"orderDate": "2021-05-20T18:30:06.6045692Z",
"productId": "CFQ7TTC0LH0R",
"skuId": "0002",
"availabilityId": "CFQ7TTC0K5RQ",
"productName": "Microsoft 365 Phone System - Virtual User",
"skuName": "Microsoft 365 Phone System - Virtual User",
"productQualifiers": [
"AddOn",
"Trial"
],
"chargeType": "new",
"unitPrice": "0",
"effectiveUnitPrice": "0",
"unitType": "",
"quantity": "25",
"subtotal": "0",
"taxTotal": "0",
"totalForCustomer": "0",
"currency": "USD",
"publisherName": "Microsoft Corporation",
"publisherId": "",
"subscriptionDescription": "",
"subscriptionId": "aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e",
"subscriptionStartDate": "2021-05-20T00:00:00Z",
"subscriptionEndDate": "2021-06-19T00:00:00Z",
"chargeStartDate": "2021-05-20T00:00:00Z",
"chargeEndDate": "2021-06-19T00:00:00Z",
"termAndBillingCycle": "One-Month commitment for trial",
"alternateId": "94e858b6d855",
"referenceId": "0cf1202a-5b7d-4219-966e-93c637113708",
"priceAdjustmentDescription": "",
"discountDetails": "",
"pricingCurrency": "USD",
"pcToBCExchangeRate": "1",
"pcToBCExchangeRateDate": "2021-05-01T00:00:00",
"billableQuantity": "25",
"meterDescription": "",
"billingFrequency": "",
"reservationOrderId": "99f246cf-ed96-41b4-b0cd-0aa43eb1fe91",
"invoiceLineItemType": "billing_line_items",
"billingProvider": "one_time",
"promotionId": "",
"attributes": {
"objectType": "OneTimeInvoiceLineItem"
}
},
{
"partnerId": "934f3416-bc2f-47f3-b492-77e517d4e572",
"customerId": "835a59a7-3172-47b5-bdef-d9cc65f4d0e4",
"customerName": "TEST_TEST Test Promotions 01",
"customerDomainName": "kyletestpromos01.onmicrosoft.com",
"customerCountry": "US",
"invoiceNumber": "",
"mpnId": "5357564",
"resellerMpnId": "0",
"orderId": "5f9d52bb1408",
"orderDate": "2021-05-20T18:48:30.6168285Z",
"productId": "CFQ7TTC0HL8W",
"skuId": "0001",
"availabilityId": "CFQ7TTC0K59S",
"productName": "Power BI Premium Per User",
"skuName": "Power BI Premium Per User",
"productQualifiers": [],
"chargeType": "new",
"unitPrice": "16",
"effectiveUnitPrice": "14.4",
"unitType": "",
"quantity": "50",
"subtotal": "720",
"taxTotal": "0",
"totalForCustomer": "0",
"currency": "USD",
"publisherName": "Microsoft Corporation",
"publisherId": "",
"subscriptionDescription": "",
"subscriptionId": "bbbb1b1b-cc2c-dd3d-ee4e-ffffff5f5f5f",
"subscriptionStartDate": "2021-05-20T00:00:00Z",
"subscriptionEndDate": "2022-05-19T00:00:00Z",
"chargeStartDate": "2021-05-20T00:00:00Z",
"chargeEndDate": "2021-06-19T00:00:00Z",
"termAndBillingCycle": "One-Year commitment for monthly/yearly billing",
"alternateId": "5f9d52bb1408",
"referenceId": "28b535e0-68f4-40b5-84f7-8ed9241eb149",
"priceAdjustmentDescription": "[\"Price for given billing period\",\"You are getting a discount due to a pre-determined override.\",\"You are getting a discount for being a partner.\",\"You are getting a price guarantee for your price.\",\"Price for given term\"]",
"discountDetails": "",
"pricingCurrency": "USD",
"pcToBCExchangeRate": "1",
"pcToBCExchangeRateDate": "2021-05-01T00:00:00",
"billableQuantity": "50",
"meterDescription": "",
"billingFrequency": "Monthly",
"reservationOrderId": "8fdebb4a-7110-496e-9570-623e4c992797",
"invoiceLineItemType": "billing_line_items",
"billingProvider": "one_time",
"promotionId": "39NFJQT1X27N:0002:39NFJQT1Q5KL",
"attributes/objectType": "OneTimeInvoiceLineItem",
"attributes": {
"objectType": "OneTimeInvoiceLineItem"
}
},
{
"partnerId": "934f3416-bc2f-47f3-b492-77e517d4e572",
"customerId": "c139c4bf-2e8b-4ab5-8bed-d9f50dcca7a2",
"customerName": "Test_Test_Office R2 Reduce Seats Validation",
"customerDomainName": "testcustomerr2t2reduce.onmicrosoft.com",
"customerCountry": "US",
"invoiceNumber": "",
"mpnId": "1234567",
"resellerMpnId": 0,
"orderId": "HJVtMZMkgQ2miuCiNv0RSr51zQDans0m1",
"orderDate": "2019-02-04T17:59:52.9460102Z",
"productId": "DZH318Z0BXWC",
"skuId": "0002",
"availabilityId": "DZH318Z0BP8B",
"productName": "Test WAF-as-a-Service",
"skuName": "Test WaaS - Medium Plan",
"chargeType": "New",
"unitPrice": 820,
"effectiveUnitPrice": 820,
"unitType": "",
"quantity": 1,
"subtotal": 820,
"taxTotal": 0,
"totalForCustomer": 0,
"currency": "USD",
"publisherName": "Test Networks, Inc.",
"publisherId": "21223810",
"subscriptionDescription": "",
"subscriptionId": "cccc2c2c-dd3d-ee4e-ff5f-aaaaaa6a6a6a",
"subscriptionStartDate": "2019-02-01T00:00:00Z",
"subscriptionEndDate": "2020-01-31T00:00:00Z",
"chargeStartDate": "2019-02-04T09:22:40.1767993-08:00",
"chargeEndDate": "2019-03-03T09:22:40.1767993-08:00",
"termAndBillingCycle": "1 Year Subscription",
"alternateId": "123456ad566",
"priceAdjustmentDescription": "[\"15.0% Partner earned credit for services managed\"]",
"discountDetails": "",
"pricingCurrency": "USD",
"pcToBCExchangeRate": 1,
"pcToBCExchangeRateDate": "2019-08-01T00:00:00Z",
"billableQuantity": 3.1618,
"meterDescription": "Bandwidth - Data Transfer In (GB) - Zone 2",
"reservationOrderId": "883d475b-0000-1234-0000-8818752f1234",
"attributes": {
"objectType": "OneTimeInvoiceLineItem"
}
},
{
"partnerId": "0c924e8d-4852-4692-a4d7-7dd0dc09ad80",
"customerId": "org:d7f565f5-5367-492f-a465-9e2057c5e3c3",
"customerName": "TEST_TEST_GTM1",
"customerDomainName": "TESTTESTGTM1.onmicrosoft.com",
"customerCountry": "US",
"invoiceNumber": "",
"mpnId": "123456",
"resellerMpnId": 0,
"orderId": "VdqkP11Bu4DlcjP5rLeQabcdefg-1234",
"orderDate": "2021-01-29T19:50:13.9869095Z",
"productId": "CFQ7TTC01234",
"skuId": "0001",
"availabilityId": "CFQ7TTC0ABCD",
"productName": "Office 365 E3",
"skuName": "Office 365 E3",
"chargeType": "new",
"unitPrice": 16,
"effectiveUnitPrice": 16,
"unitType": "",
"quantity": 1,
"subtotal": 16,
"taxTotal": 1.61,
"totalForCustomer": 17.61,
"currency": "USD",
"publisherName": "Microsoft Corporation",
"publisherId": "",
"subscriptionDescription": "",
"subscriptionId": "dddd3d3d-ee4e-ff5f-aa6a-bbbbbb7b7b7b",
"chargeStartDate": "2021-01-29T00:00:00Z",
"chargeEndDate": "2021-02-27T00:00:00Z",
"termAndBillingCycle": "One-Year commitment for monthly/yearly billing",
"priceAdjustmentDescription": "[\"1 month billing/",\"You are getting a discount for being a partner.\",\"You are getting a price guarantee for your price.\",\"Yearly Duration\"]",
"discountDetails": "",
"pricingCurrency": "USD",
"pcToBCExchangeRate": 1,
"pcToBCExchangeRateDate": "0001-01-01T00:00:00",
"billableQuantity": 1,
"meterDescription": "",
"billingFrequency": "Monthly",
"reservationOrderId": "e770c049-89c7-4ec1-b366-123456789000",
"invoiceLineItemType": "billing_line_items",
"billingProvider": "one_time",
"attributes": {
"objectType": "OneTimeInvoiceLineItem"
}
}
],
"links": {
"self": {
"uri": "/invoices/unbilled/lineitems?provider=all&invoicelineitemtype=billinglineitems¤cycode=usd&period=previous&size=2000",
"method": "GET",
"headers": []
}
},
"attributes": {
"objectType": "Collection"
}
}