Een lijst met producten ophalen (per klant)
van toepassing op: Partnercentrum | Partnercentrum beheerd door 21Vianet | Partnercentrum voor Microsoft Cloud voor de Amerikaanse overheid
U kunt de volgende methoden gebruiken om een verzameling producten voor een bestaande klant op te halen.
Voorwaarden
Referenties zoals beschreven in Partnercentrum-verificatie. Dit scenario ondersteunt verificatie met zowel zelfstandige app- als app+gebruikersreferenties.
Een klant-id (
customer-tenant-id
). Als u de klant-id niet weet, kunt u deze opzoeken in Partnercentrum door de werkruimte Klanten te selecteren, vervolgens de klant in de lijst met klanten en vervolgens Account. Zoek op de pagina Account van de klant naar de Microsoft-id in de sectie Klantaccountgegevens. De Microsoft-id is hetzelfde als de klant-id (customer-tenant-id
).
REST-aanvraag
Aanvraagsyntaxis
Methode | Aanvraag-URI |
---|---|
VERZENDEN | {baseURL}/v1/customers/{customer-tenant-id}/products?targetView={targetView} HTTP/1.1 |
URI-parameters aanvragen
Naam | Type | Vereist | Beschrijving |
---|---|---|---|
klant-tenant-id | GUID | Ja | De waarde is een GUID-indeling klant-tenant-id, een identificatie waarmee u een klant kunt opgeven. |
targetView | tekenreeks (if referring to a sequence of characters) | Ja | Bepaalt het doeloverzicht van de catalogus. De ondersteunde waarden zijn: Azure, inclusief alle Azure-items AzureReservations, inclusief alle Azure-reserveringen AzureReservationsVM, die alle reserveringsitems voor virtuele machines (VM's) bevat AzureReservationsSQL, inclusief alle SQL-reserveringen AzureReservationsCosmosDb, inclusief alle items van de Cosmos-databasereservering MicrosoftAzure, waaronder items voor Microsoft Azure-abonnementen (MS-AZR-0145P) en Azure-plannen OnlineServices, inclusief alle items van online diensten. Deze targetView omvat commerciële marketplace, traditionele services op basis van licenties en nieuwe op handelslicenties gebaseerde services Software, dat alle software-items omvat SoftwareSUSELinux, inclusief alle software-SUSE Linux-items SoftwarePerpetual, inclusief alle perpetuele software-items SoftwareSubscriptions, inclusief alle softwareabonnementitems SpecializedOffers, waaronder gespecialiseerde aanbiedingen die aan sommige partners beschikbaar zijn gesteld |
Aanvraagkoptekst
Zie Partnercentrum REST-headersvoor meer informatie.
Verzoekinhoud
Geen.
Voorbeeld van aanvraag
Vraag om een lijst met azure-producten op basis van gebruik die beschikbaar zijn voor een bepaalde klant. Producten voor zowel Microsoft Azure (MS-AZR-0145P) als Azure-abonnementen worden geretourneerd voor klanten in de openbare cloud:
GET https://api.partnercenter.microsoft.com/v1/customers/65543400-f8b0-4783-8530-6d35ab8c6801/products?targetView=MicrosoftAzure HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: 83643f5e-5dfd-4375-88ed-054412460dc8
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
Nieuwe op handelslicenties gebaseerde services
Notitie
De nieuwe commerce-ervaringen voor services op basis van licenties omvatten veel nieuwe mogelijkheden en zijn beschikbaar voor alle CSP's (Cloud Solution Provider). Zie overzicht van nieuwe commerce-ervaringenvoor meer informatie.
Volg dit voorbeeld voor een lijst met producten per land/regio voor services op basis van nieuwe commercelicenties als onderdeel van de technische preview van de nieuwe commerce-ervaring. Nieuwe commercelicentieservices worden geïdentificeerd met id- en displayNames-waarden van OnlineServicesNCE. Zie het onderstaande antwoordvoorbeeld.
GET https://api.partnercenter.microsoft.com/v1/customers/65543400-f8b0-4783-8530-6d35ab8c6801/products?targetView=OnlineServices HTTP/1.1
Authorization: Bearer
Accept: application/json
MS-RequestId: 031160b2-b0b0-4d40-b2b1-aaa9bb84211d
MS-CorrelationId: bbbb1111-cc22-3333-44dd-555555eeeeee
Rest-antwoord
Geslaagde antwoorden en foutcodes
Elk antwoord bevat een HTTP-statuscode die aangeeft of de aanvraag is geslaagd of mislukt, samen met aanvullende debugginginformatie. Gebruik een hulpprogramma voor netwerktracering om deze code, het fouttype en aanvullende parameters te lezen. Zie Partnercentrum-foutcodesvoor de volledige lijst.
Deze methode retourneert de volgende foutcodes:
HTTP-statuscode | Foutcode | Beschrijving |
---|---|---|
403 | 400036 | Toegang tot de aangevraagde targetView is niet toegestaan. |
Antwoordvoorbeeld voor Microsoft Azure- en Azure-plan
HTTP/1.1 200 OK
Content-Length: 1909
Content-Type: application/json; charset=utf-8
MS-CorrelationId: cccc2222-dd33-4444-55ee-666666ffffff
MS-RequestId: ae7288e2-2673-4ad4-8c12-7aad818d5949
{
"totalCount": 2,
"items": [
{
"id": "MS-AZR-0145P",
"productId": "9DEA7946-EC2C-441E-9FFD-E3B275F7E838",
"title": "Microsoft Azure",
"description": "Azure Cloud Solution Provider offer for Partner and Resellers",
"minimumQuantity": 1,
"maximumQuantity": 1,
"isTrial": false,
"supportedBillingCycles": [
"monthly"
],
"purchasePrerequisites": [
"MicrosoftCloudAgreement"
],
"actions": [
"Refund"
],
"dynamicAttributes": {
"isMicrosoftProduct": true,
"billingType": "usage",
"category": "Enterprise",
"isAddon": false,
"prerequisiteSkus": [],
"rank": 1413,
"hasAddOns": false,
"isAutoRenewable": false,
"upgradeTargetOffers": null,
"conversionTargetOffers": [],
"unitType": "Usage-based",
"limitUnitOfMeasure": "None",
"limit": 0,
"reselleeQualifications": [],
"resellerQualifications": []
},
"links": {
"availabilities": {
"uri": "/products/9DEA7946-EC2C-441E-9FFD-E3B275F7E838/skus/MS-AZR-0145P/availabilities?country=US&targetSegment=Commercial",
"method": "GET",
"headers": []
},
"self": {
"uri": "/products/9DEA7946-EC2C-441E-9FFD-E3B275F7E838/skus/MS-AZR-0145P?country=US",
"method": "GET",
"headers": []
}
}
},
{
"id": "0001",
"productId": "DZH318Z0BPS6",
"title": "Microsoft Azure plan",
"description": "Microsoft Azure plan (MS-AZR-0017G)",
"minimumQuantity": 1,
"maximumQuantity": 1,
"isTrial": false,
"supportedBillingCycles": [
"one_time"
],
"purchasePrerequisites": [
"MicrosoftCustomerAgreement"
],
"inventoryVariables": [],
"provisioningVariables": [],
"actions": [
"Refund"
],
"dynamicAttributes": {
"isMicrosoftProduct": true,
"pilotProgram": "modernazurepilot"
},
"links": {
"availabilities": {
"uri": "/products/DZH318Z0BPS6/skus/0001/availabilities?country=US&targetSegment=Commercial",
"method": "GET",
"headers": []
},
"self": {
"uri": "/products/DZH318Z0BPS6/skus/0001?country=US",
"method": "GET",
"headers": []
}
}
}
],
"links": {
"self": {
"uri": "/customers/e2a0c0f3-0f74-4d1c-808c-dfa511481913/products/all/skus?targetView=MicrosoftAzure&targetSegment=Commercial",
"method": "GET",
"headers": []
}
},
"attributes": {
"objectType": "Collection"
}
}
Voorbeeldantwoord voor nieuwe handelsdiensten op licentiebasis
Notitie
De nieuwe commerce-ervaringen voor services op basis van licenties omvatten veel nieuwe mogelijkheden en zijn beschikbaar voor alle CSP's (Cloud Solution Provider). Zie overzicht van nieuwe commerce-ervaringenvoor meer informatie.
{
"totalCount": 19,
"items": [{
"id": "CFQ7TTC0LH18",
"title": "Microsoft 365 Business Basic",
"description": "Best for businesses that need professional email, cloud file storage, and online meetings & chat. Desktop versions of Office apps like Excel, Word, and PowerPoint not included. For businesses with up to 300 employees.",
"productType": {
"id": "OnlineServicesNCE",
"displayName": "OnlineServicesNCE"
},
"isMicrosoftProduct": true,
"publisherName": "Microsoft Corporation",
"links": {
"skus": {
"uri": "/products/CFQ7TTC0LH18/skus?country=US",
"method": "GET",
"headers": []
},
"self": {
"uri": "/products/CFQ7TTC0LH18?country=US",
"method": "GET",
"headers": []
}
}
},
...
],
"links": {
"self": {
"uri": "/products?country=US&targetView=OnlineServices",
"method": "GET",
"headers": []
}
},
"attributes": {
"objectType": "Collection"
}
}