Azure-spaarplannen aanschaffen
Van toepassing op: Partnercentrum
Dit artikel bevat informatie over de API-ervaring voor het aanschaffen van een Azure-besparingsplan in Partnercentrum en biedt voorbeelden van aanvragen/antwoorden die specifiek zijn voor Azure-besparingsplannen.
Vereisten
Referenties zoals beschreven in verificatie in partnercentrum. Dit scenario ondersteunt verificatie met app+gebruikersreferenties.
Een klant-id (customer-tenant-id
). Als u de klant-id niet weet, kunt u deze opzoeken in het 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
).
Als u een Azure-spaarplan wilt kopen voor een klant met behulp van de Partnercentrum-API, moet u een Azure-abonnement voor die klant hebben met ten minste één actief Azure-abonnement. Een Azure-abonnement aanschaffen.
Een Azure-besparingsplan ontdekken
Voer de volgende stappen uit voordat u een Azure-besparingsplan aanschaft:
Identificeer en haal het product en de SKU op die u wilt kopen. U kunt dit doen door eerst de producten en SKU's te vermelden, of als u de id's van het product en de SKU al kent, selecteert u deze. Als u azure-spaarplanwaarden in de onderstaande API's wilt weergeven, is een klant-id vereist in de route voor de onderstaande API's en moet de klant een Azure-plan hebben.
- Een lijst met producten ophalen (per land/regio)
- Een lijst met producten ophalen (per klant)
- Een product ophalen met behulp van de product-id
- Een lijst met SKU's ophalen voor een product (per land/regio)
- Een lijst met SKU's ophalen voor een product (per klant)
- Een SKU ophalen met behulp van de SKU-id
Haal de beschikbaarheid voor de SKU op. U hebt de CatalogItemId van de beschikbaarheid nodig bij het plaatsen van de bestelling. Gebruik een van de volgende API's om deze waarde op te halen:
Voor Azure-spaarplannen retourneert de lijst met SKU's voor een product (per klant) en haal een SKU op met behulp van de SKU-id en antwoorden van de beschikbaarheids-API een minimumPurchaseCommitment voor de SKU. Dit is de minimale toezegging die per uur kan worden gedaan voor een bepaalde termijn. Dit is alleen van toepassing op een Azure-besparingsplan en is niet van toepassing op andere productfamilies.
Azure-spaarplan aanschaffen
Voer de volgende stappen uit om uw Azure-spaarplanorder in te dienen:
- Maak een winkelwagen voor de verzameling catalogusitems die u wilt kopen. Wanneer u een winkelwagen maakt, worden de winkelwagenregelitems automatisch gegroepeerd op basis van wat u samen in dezelfde bestelling kunt kopen.
- Bekijk de winkelwagen. Het uitchecken van een winkelwagen resulteert in het maken van een order.
In de API-aanvragen moeten partners de volgende parameters opgeven bij het maken of bijwerken van een winkelwagen en het maken van een bestelling. PurchaseCommitment is een nieuwe waarde voor Azure-spaarplannen.
- Bereik: mogelijke waarden zijn één, gedeeld
- EntitlementId: Azure-abonnements-id, vereist voor één bereik
- SubscriptionId: Azure-plan-id, vereist voor gedeeld bereik
- PurchaseCommitment: het vaste uurbedrag dat is vastgelegd voor rekenservices voor een of drie jaar.
Voor Azure-besparingsplannen is een inrichtingscontext vereist, waaronder bereik- en abonnements-id/rechten-id, en een aankoopverplichting, inclusief bedrag, graan en valuta.
Azure-besparingsplan weergeven en beheren
Partners kunnen Azure-spaarplannen bekijken die zijn gekocht in partnercentrum. Net als reserveringsexemplaren kunnen partners Azure Portal blijven gebruiken voor beheeracties na aankoop. Zie Azure-spaarplannen beheren - Microsoft Cost Management voor meer informatie over het beheren van een Azure-besparingsplan.
In de api's Een abonnement ophalen op basis van id en Api's voor abonnementen van een klant ophalen, wordt een gegevensmodel met de naam SubscriptionLineItem geretourneerd. In het antwoord op het abonnement zien partners de volgende eigenschappen voor het Azure-besparingsplan:
- unitType: de waarde is voordeel
- billingType: de waarde is voordeel
- lineItems: Een regelitem bevat de aankoopgegevens van een bepaald Azure-spaarplanabonnement (bijvoorbeeld bereik en PurchaseCommitment).
- productOrderId: Id voor een specifieke productaankoop (bijvoorbeeld Reserveringen of Een Azure-spaarplan).
Notitie
Voor een Azure-besparingsplan dat is aangeschaft via Azure Portal, retourneren de abonnements-API's de order-id niet.
Factuur en afstemming voor Azure-besparingsplan
Partners kunnen het afstemmen en factureren van een spaarplan in CSP bezoeken om te begrijpen hoe de besparingen worden weerspiegeld in hun maandelijkse afstemmingsbestanden voor facturering.
Voorbeelden van aanvragen/antwoorden
API-voorbeelden ontdekken
Een product ophalen op basis van id
Antwoord:
{
"id": "DZH318Z09V6F",
"title": "Azure savings plan",
"description": "Flexible pricing model offering lower prices compared to On-Demand pricing, in exchange for a specific usage commitment",
"productType": {
"id": "Azure",
"displayName": "Azure",
"subType": {
"id": "SavingsPlan",
"displayName": "SavingsPlan"
}
},
"isMicrosoftProduct": true,
"publisherName": "Microsoft Corporation",
"links": {
"skus": {
"uri": "/products/DZH318Z09V6F/skus?country=US",
"method": "GET",
"headers": []
},
"self": {
"uri": "/products/DZH318Z09V6F?country=US",
"method": "GET",
"headers": []
}
}
}
Een SKU ophalen op basis van id
Antwoord:
{
"id": "0001",
"productId": "DZH318Z09V6F",
"title": "Compute savings plan, 1 Year",
"description": "Compute savings plan, 1 Year",
"minimumQuantity": 1,
"maximumQuantity": 1,
"minimumPurchaseCommitment": {
"grain": "Hourly",
"currencyCode": {
"code": "USD",
"symbol": "$"
},
"amount": "0.001"
},
"isTrial": false,
"supportedBillingCycles": [
"one_time",
"monthly"
],
"purchasePrerequisites": [
"MicrosoftCloudAgreement"
],
"inventoryVariables": [],
"provisioningVariables": [],
"actions": [
"Refund"
],
"dynamicAttributes": {
"isMicrosoftProduct": true,
"armSkuName": "Compute_Savings_Plan",
"duration": "1year",
"termDuration": "P1Y",
"internal": false
},
"links": {
"availabilities": {
"uri": "/products/DZH318Z09V6F/skus/0001/availabilities?country=US",
"method": "GET",
"headers": []
},
"self": {
"uri": "/products/DZH318Z09V6F/skus/0001?country=US",
"method": "GET",
"headers": []
}
}
}
Beschikbaarheid ophalen op id
Antwoord:
{
"id": "DZH318Z0BLD3",
"productId": "DZH318Z09V6F",
"skuId": "0001",
"catalogItemId": "DZH318Z09V6F:0001:DZH318Z0BLD3",
"defaultCurrency": {
"code": "USD",
"symbol": "$"
},
"segment": "commercial",
"country": "US",
"isPurchasable": true,
"isRenewable": false,
"renewalInstructions": [],
"terms": [
{
"duration": "P1Y",
"description": "1year"
}
],
"links": {
"self": {
"uri": "/products/DZH318Z09V6F/skus/0001/availabilities/DZH318Z0BLD3?country=US",
"method": "GET",
"headers": []
}
},
"product": {
"id": "DZH318Z09V6F",
"title": "Azure savings plan",
"description": "Flexible pricing model offering lower prices compared to On-Demand pricing, in exchange for a specific usage commitment",
"productType": {
"id": "Azure",
"displayName": "Azure",
"subType": {
"id": "SavingsPlan",
"displayName": "SavingsPlan"
}
},
"isMicrosoftProduct": true,
"publisherName": "Microsoft Corporation",
"links": {
"skus": {
"uri": "/products/DZH318Z09V6F/skus?country=US",
"method": "GET",
"headers": []
},
"self": {
"uri": "/products/DZH318Z09V6F?country=US",
"method": "GET",
"headers": []
}
}
},
"sku": {
"id": "0001",
"productId": "DZH318Z09V6F",
"title": "Compute savings plan, 1 Year",
"description": "Compute savings plan, 1 Year",
"minimumQuantity": 1,
"maximumQuantity": 1,
"minimumPurchaseCommitment": {
"grain": "Hourly",
"currencyCode": {
"code": "USD",
"symbol": "$"
},
"amount": "0.001"
},
"isTrial": false,
"supportedBillingCycles": [
"one_time",
"monthly"
],
"purchasePrerequisites": [
"MicrosoftCloudAgreement"
],
"inventoryVariables": [],
"provisioningVariables": [],
"actions": [
"Refund"
],
"dynamicAttributes": {
"isMicrosoftProduct": true,
"armSkuName": "Compute_Savings_Plan",
"duration": "1year",
"termDuration": "P1Y",
"internal": false
},
"links": {
"availabilities": {
"uri": "/products/DZH318Z09V6F/skus/0001/availabilities?country=US",
"method": "GET",
"headers": []
},
"self": {
"uri": "/products/DZH318Z09V6F/skus/0001?country=US",
"method": "GET",
"headers": []
}
}
}
}
Een lijst met SKU's ophalen voor een product (per klant)
Antwoord:
{
"totalCount": 2,
"items": [
{
"id": "0001",
"productId": "DZH318Z09V6F",
"title": "Compute savings plan, 1 Year",
"description": "Compute savings plan, 1 Year",
"minimumQuantity": 1,
"maximumQuantity": 1,
"minimumPurchaseCommitment": {
"grain": "Hourly",
"currencyCode": {
"code": "USD",
"symbol": "$"
},
"amount": "0.001"
},
"isTrial": false,
"supportedBillingCycles": [
"one_time",
"monthly"
],
"purchasePrerequisites": [
"MicrosoftCloudAgreement"
],
"inventoryVariables": [],
"provisioningVariables": [],
"actions": [
"Refund"
],
"dynamicAttributes": {
"isMicrosoftProduct": true,
"armSkuName": "Compute_Savings_Plan",
"duration": "1year",
"termDuration": "P1Y",
"internal": false
},
"links": {
"availabilities": {
"uri": "/products/DZH318Z09V6F/skus/0001/availabilities",
"method": "GET",
"headers": []
},
"self": {
"uri": "/products/DZH318Z09V6F/skus/0001",
"method": "GET",
"headers": []
}
}
},
{
"id": "0002",
"productId": "DZH318Z09V6F",
"title": "Compute savings plan, 3 Years",
"description": "Compute savings plan, 3 Years",
"minimumQuantity": 1,
"maximumQuantity": 1,
"minimumPurchaseCommitment": {
"grain": "Hourly",
"currencyCode": {
"code": "USD",
"symbol": "$"
},
"amount": "0.001"
},
"isTrial": false,
"supportedBillingCycles": [
"one_time",
"monthly"
],
"purchasePrerequisites": [
"MicrosoftCloudAgreement"
],
"inventoryVariables": [],
"provisioningVariables": [],
"actions": [
"Refund"
],
"dynamicAttributes": {
"isMicrosoftProduct": true,
"armSkuName": "Compute_Savings_Plan",
"duration": "3years",
"termDuration": "P3Y",
"internal": false
},
"links": {
"availabilities": {
"uri": "/products/DZH318Z09V6F/skus/0002/availabilities?country=US",
"method": "GET",
"headers": []
},
"self": {
"uri": "/products/DZH318Z09V6F/skus/0002?country=US",
"method": "GET",
"headers": []
}
}
}
],
"links": {
"self": {
"uri": "/products/DZH318Z09V6F/skus?country=US",
"method": "GET",
"headers": []
}
},
"attributes": {
"objectType": "Collection"
}
}
Een lijst met SKU's ophalen voor een product (per land/regio)
Antwoord:
{
"totalCount": 2,
"items": [
{
"id": "0001",
"productId": "DZH318Z09V6F",
"title": "Compute savings plan, 1 Year",
"description": "Compute savings plan, 1 Year",
"minimumQuantity": 1,
"maximumQuantity": 1,
"minimumPurchaseCommitment": {
"grain": "Hourly",
"currencyCode": {
"code": "USD",
"symbol": "$"
},
"amount": "0.001"
},
"isTrial": false,
"supportedBillingCycles": [
"one_time",
"monthly"
],
"purchasePrerequisites": [
"MicrosoftCloudAgreement"
],
"inventoryVariables": [],
"provisioningVariables": [],
"actions": [
"Refund"
],
"dynamicAttributes": {
"isMicrosoftProduct": true,
"armSkuName": "Compute_Savings_Plan",
"duration": "1year",
"termDuration": "P1Y",
"internal": false
},
"links": {
"availabilities": {
"uri": "/products/DZH318Z09V6F/skus/0001/availabilities?country=US",
"method": "GET",
"headers": []
},
"self": {
"uri": "/products/DZH318Z09V6F/skus/0001?country=US",
"method": "GET",
"headers": []
}
}
},
{
"id": "0002",
"productId": "DZH318Z09V6F",
"title": "Compute savings plan, 3 Years",
"description": "Compute savings plan, 3 Years",
"minimumQuantity": 1,
"maximumQuantity": 1,
"minimumPurchaseCommitment": {
"grain": "Hourly",
"currencyCode": {
"code": "USD",
"symbol": "$"
},
"amount": "0.001"
},
"isTrial": false,
"supportedBillingCycles": [
"one_time",
"monthly"
],
"purchasePrerequisites": [
"MicrosoftCloudAgreement"
],
"inventoryVariables": [],
"provisioningVariables": [],
"actions": [
"Refund"
],
"dynamicAttributes": {
"isMicrosoftProduct": true,
"armSkuName": "Compute_Savings_Plan",
"duration": "3years",
"termDuration": "PY",
"internal": false
},
"links": {
"availabilities": {
"uri": "/products/DZH318Z09V6F/skus/0002/availabilities?country=US",
"method": "GET",
"headers": []
},
"self": {
"uri": "/products/DZH318Z09V6F/skus/0002?country=US",
"method": "GET",
"headers": []
}
}
}
],
"links": {
"self": {
"uri": "/products/DZH318Z09V6F/skus?country=US",
"method": "GET",
"headers": []
}
},
"attributes": {
"objectType": "Collection"
}
}
Een lijst met beschikbaarheid per SKU ophalen (per klant)
Antwoord:
{
"totalCount": 1,
"items": [
{
"id": "DZH318Z0BLD3",
"productId": "DZH318Z09V6F",
"skuId": "0001",
"catalogItemId": "DZH318Z09V6F:0001:DZH318Z0BLD3",
"defaultCurrency": {
"code": "USD",
"symbol": "$"
},
"segment": "commercial",
"country": "US",
"isPurchasable": true,
"isRenewable": false,
"renewalInstructions": [],
"terms": [
{
"duration": "P1Y",
"description": "1year"
}
],
"links": {
"self": {
"uri": "/products/DZH318Z09V6F/skus/0001/availabilities/DZH318Z0BLD3?country=US",
"method": "GET",
"headers": []
}
},
"product": {
"id": "DZH318Z09V6F",
"title": "Azure savings plan",
"description": "Flexible pricing model offering lower prices compared to On-Demand pricing, in exchange for a specific usage commitment",
"productType": {
"id": "Azure",
"displayName": "Azure",
"subType": {
"id": "SavingsPlan",
"displayName": "SavingsPlan"
}
},
"isMicrosoftProduct": true,
"publisherName": "Microsoft Corporation",
"links": {
"skus": {
"uri": "/products/DZH318Z09V6F/skus?country=US",
"method": "GET",
"headers": []
},
"self": {
"uri": "/products/DZH318Z09V6F?country=US",
"method": "GET",
"headers": []
}
}
},
"sku": {
"id": "0001",
"productId": "DZH318Z09V6F",
"title": "Compute savings plan, 1 Year",
"description": "Compute savings plan, 1 Year",
"minimumQuantity": 1,
"maximumQuantity": 1,
"minimumPurchaseCommitment": {
"grain": "Hourly",
"currencyCode": {
"code": "USD",
"symbol": "$"
},
"amount": "0.001"
},
"isTrial": false,
"supportedBillingCycles": [
"one_time",
"monthly"
],
"purchasePrerequisites": [
"MicrosoftCloudAgreement"
],
"inventoryVariables": [],
"provisioningVariables": [],
"actions": [
"Refund"
],
"dynamicAttributes": {
"isMicrosoftProduct": true,
"armSkuName": "Compute_Savings_Plan",
"duration": "1year",
"termDuration": "P1Y",
"internal": false
},
"links": {
"availabilities": {
"uri": "/products/DZH318Z09V6F/skus/0001/availabilities?country=US",
"method": "GET",
"headers": []
},
"self": {
"uri": "/products/DZH318Z09V6F/skus/0001?country=US",
"method": "GET",
"headers": []
}
}
}
}
],
"links": {
"self": {
"uri": "/products/DZH318Z09V6F/skus/0001/availabilities?country=US",
"method": "GET",
"headers": []
}
},
"attributes": {
"objectType": "Collection"
}
}
Een lijst met beschikbaarheid per SKU ophalen (per land/regio)
Antwoord:
{
"totalCount": 1,
"items": [
{
"id": "DZH318Z0BLD3",
"productId": "DZH318Z09V6F",
"skuId": "0001",
"catalogItemId": "DZH318Z09V6F:0001:DZH318Z0BLD3",
"defaultCurrency": {
"code": "USD",
"symbol": "$"
},
"segment": "commercial",
"country": "US",
"isPurchasable": true,
"isRenewable": false,
"renewalInstructions": [],
"terms": [
{
"duration": "P1Y",
"description": "1year"
}
],
"links": {
"self": {
"uri": "/products/DZH318Z09V6F/skus/0001/availabilities/DZH318Z0BLD3?country=US",
"method": "GET",
"headers": []
}
},
"product": {
"id": "DZH318Z09V6F",
"title": "Azure savings plan",
"description": "Flexible pricing model offering lower prices compared to On-Demand pricing, in exchange for a specific usage commitment",
"productType": {
"id": "Azure",
"displayName": "Azure",
"subType": {
"id": "SavingsPlan",
"displayName": "SavingsPlan"
}
},
"isMicrosoftProduct": true,
"publisherName": "Microsoft Corporation",
"links": {
"skus": {
"uri": "/products/DZH318Z09V6F/skus?country=US",
"method": "GET",
"headers": []
},
"self": {
"uri": "/products/DZH318Z09V6F?country=US",
"method": "GET",
"headers": []
}
}
},
"sku": {
"id": "0001",
"productId": "DZH318Z09V6F",
"title": "Compute savings plan, 1 Year",
"description": "Compute savings plan, 1 Year",
"minimumQuantity": 1,
"maximumQuantity": 1,
"minimumPurchaseCommitment": {
"grain": "Hourly",
"currencyCode": {
"code": "USD",
"symbol": "$"
},
"amount": "0.001"
},
"isTrial": false,
"supportedBillingCycles": [
"one_time",
"monthly"
],
"purchasePrerequisites": [
"MicrosoftCloudAgreement"
],
"inventoryVariables": [],
"provisioningVariables": [],
"actions": [
"Refund"
],
"dynamicAttributes": {
"isMicrosoftProduct": true,
"armSkuName": "Compute_Savings_Plan",
"duration": "1year",
"termDuration": "P1Y",
"internal": false
},
"links": {
"availabilities": {
"uri": "/products/DZH318Z09V6F/skus/0001/availabilities?country=US",
"method": "GET",
"headers": []
},
"self": {
"uri": "/products/DZH318Z09V6F/skus/0001?country=US",
"method": "GET",
"headers": []
}
}
}
}
],
"links": {
"self": {
"uri": "/products/DZH318Z09V6F/skus/0001/availabilities?country=US",
"method": "GET",
"headers": []
}
},
"attributes": {
"objectType": "Collection"
}
}
Voorbeelden van aankoop-API's
Winkelwagen maken
Aanvraag:
{
"lineItems": [
{
"id": 0,
"catalogItemId": "DZH318Z09V6F:0001:DZH318Z0BLD3",
"quantity": 1,
"billingCycle": "one_time",
"termDuration": "P1Y",
"provisioningContext": {
"scope": “shared", // scope options are shared, single
"subscriptionId": "aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e", // Azure plan ID, this is required for shared scope
},
"purchaseCommitment": {
"amount": 0.05,
"grain": "hourly",
"currency": "usd"
}
}
]
}
Antwoord:
{
"id": "66e3591e-faad-445c-b930-4ccdbf54c43f",
"creationTimestamp": "2023-05-18T05:15:16.8466842Z",
"lastModifiedTimestamp": "2023-05-18T05:15:16.8467621Z",
"expirationTimestamp": "2023-05-25T05:15:23.6893847Z",
"lastModifiedUser": "9db12087-fbc3-481c-8965-73d44ff88e27",
"status": "Active",
"lineItems": [
{
"id": 0,
"catalogItemId": "DZH318Z09V6F:0001:DZH318Z0BLD3",
"quantity": 1,
"currencyCode": "USD",
"billingCycle": "one_time",
"termDuration": "P1Y",
"provisioningContext": {
"scope": "shared",
"subscriptionId": "aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e"
},
"orderGroup": "0",
"purchaseCommitment": {
"amount": 0.05,
"currency": "usd",
"grain": "hourly"
}
}
],
"links": {
"self": {
"uri": "/customers/6f4ce4d8-f42e-45e0-8661-92ad6ac9d003/carts/66e3591e-faad-445c-b930-4ccdbf54c43f",
"method": "GET",
"headers": []
}
},
"attributes": {
"objectType": "Cart"
}
}
Winkelwagen ophalen
Antwoord:
{
"id": "66e3591e-faad-445c-b930-4ccdbf54c43f",
"creationTimestamp": "2023-05-18T05:15:16.8466842Z",
"lastModifiedTimestamp": "2023-05-18T05:15:16.8467621Z",
"expirationTimestamp": "2023-05-25T05:15:23.6893847Z",
"lastModifiedUser": "9db12087-fbc3-481c-8965-73d44ff88e27",
"status": "Active",
"lineItems": [
{
"id": 0,
"catalogItemId": "DZH318Z09V6F:0001:DZH318Z0BLD3",
"quantity": 1,
"currencyCode": "USD",
"billingCycle": "one_time",
"termDuration": "P1Y",
"provisioningContext": {
"scope": "shared",
"subscriptionId": "aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e"
},
"orderGroup": "0",
"purchaseCommitment": {
"amount": 0.05,
"currency": "usd",
"grain": "hourly"
}
}
],
"links": {
"self": {
"uri": "/customers/6f4ce4d8-f42e-45e0-8661-92ad6ac9d003/carts/66e3591e-faad-445c-b930-4ccdbf54c43f",
"method": "GET",
"headers": []
}
},
"attributes": {
"objectType": "Cart"
}
}
Winkelwagen bijwerken
Aanvraag:
{
"id": "66e3591e-faad-445c-b930-4ccdbf54c43f",
"creationTimestamp": "2023-05-18T05:15:16.8466842Z",
"lastModifiedTimestamp": "2023-05-18T05:15:16.8467621Z",
"expirationTimestamp": "2023-05-25T05:15:23.6893847Z",
"lastModifiedUser": "9db12087-fbc3-481c-8965-73d44ff88e27",
"status": "Active",
"lineItems": [
{
"id": 0,
"catalogItemId": "DZH318Z09V6F:0001:DZH318Z0BLD3",
"quantity": 1,
"currencyCode": "USD",
"billingCycle": "one_time",
"termDuration": "P1Y",
"provisioningContext": {
"scope": “single", // previously was “shared”
“entitlementId": "cdd17cc7-14fe-4445-8650-1f52de705851“ // entitlementId equates to subscriptionId key for the scoped Azure subscription
},
"orderGroup": "0",
"purchaseCommitment": {
"amount": 0.05,
"currency": "usd",
"grain": "hourly"
}
}
],
"links": {
"self": {
"uri": "/customers/6f4ce4d8-f42e-45e0-8661-92ad6ac9d003/carts/66e3591e-faad-445c-b930-4ccdbf54c43f",
"method": "GET",
"headers": []
}
},
"attributes": {
"objectType": "Cart"
}
}
Antwoord:
{
"id": "66e3591e-faad-445c-b930-4ccdbf54c43f",
"creationTimestamp": "2023-05-18T05:15:16.8466842Z",
"lastModifiedTimestamp": "2023-05-18T05:15:16.8467621Z",
"expirationTimestamp": "2023-05-25T05:15:23.6893847Z",
"lastModifiedUser": "9db12087-fbc3-481c-8965-73d44ff88e27",
"status": "Active",
"lineItems": [
{
"id": 0,
"catalogItemId": "DZH318Z09V6F:0001:DZH318Z0BLD3",
"quantity": 1,
"currencyCode": "USD",
"billingCycle": "one_time",
"termDuration": "P1Y",
"provisioningContext": {
"scope": “single",
“entitlementId": "cdd17cc7-14fe-4445-8650-1f52de705851“
},
"orderGroup": "0",
"purchaseCommitment": {
"amount": 0.05,
"currency": "usd",
"grain": "hourly"
}
}
],
"links": {
"self": {
"uri": "/customers/6f4ce4d8-f42e-45e0-8661-92ad6ac9d003/carts/66e3591e-faad-445c-b930-4ccdbf54c43f",
"method": "GET",
"headers": []
}
},
"attributes": {
"objectType": "Cart"
}
}
Winkelwagen afrekenen
Antwoord:
{
"orders": [
{
"id": "2b912b339251",
"alternateId": "2b912b339251",
"referenceCustomerId": "6f4ce4d8-f42e-45e0-8661-92ad6ac9d003",
"billingCycle": "one_time",
"currencyCode": "USD",
"currencySymbol": "US$",
"lineItems": [
{
"lineItemNumber": 0,
"provisioningContext": {
"scope": "single",
"entitlementId": "cdd17cc7-14fe-4445-8650-1f52de705851"
},
"offerId": "DZH318Z09V6F:0001:DZH318Z0BLD3",
"termDuration": "P1Y",
"transactionType": "New",
"friendlyName": "Compute savings plan, 1 Year",
"quantity": 1,
"pricing": {
"listPrice": 438.0,
"discountedPrice": 438.0,
"proratedPrice": 438.0,
"price": 438.0,
"extendedPrice": 438.0
},
"purchaseCommitment": {
"amount": 0.05,
"currency": "usd",
"grain": "hourly"
},
"links": {
"product": {
"uri": "/products/DZH318Z09V6F?country=US",
"method": "GET",
"headers": []
},
"sku": {
"uri": "/products/DZH318Z09V6F/skus/0001?country=US",
"method": "GET",
"headers": []
},
"availability": {
"uri": "/products/DZH318Z09V6F/skus/0001/availabilities/DZH318Z0BLD3?country=US",
"method": "GET",
"headers": []
}
}
}
],
"creationDate": "2023-05-18T05:16:33.1368156Z",
"status": "pending",
"transactionType": "UserPurchase",
"links": {
"self": {
"uri": "/customers/6f4ce4d8-f42e-45e0-8661-92ad6ac9d003/orders/2b912b339251",
"method": "GET",
"headers": []
},
"provisioningStatus": {
"uri": "/customers/6f4ce4d8-f42e-45e0-8661-92ad6ac9d003/orders/2b912b339251/provisioningstatus",
"method": "GET",
"headers": []
},
"patchOperation": {
"uri": "/customers/6f4ce4d8-f42e-45e0-8661-92ad6ac9d003/orders/2b912b339251",
"method": "PATCH",
"headers": []
}
},
"totalPrice": 438.0,
"client": {},
"attributes": {
"objectType": "Order"
}
}
],
"additionalInformation": [],
"attributes": {
"objectType": "CartCheckoutResult"
}
}
Order maken
Aanvraag:
{
"BillingCycle": "monthly",
"ReferenceCustomerId": "6f4ce4d8-f42e-45e0-8661-92ad6ac9d003",
"LineItems": [
{
"LineItemNumber": 0,
"OfferId": "DZH318Z09V6F:0001:DZH318Z0BLD3",
"Quantity": 1,
"TermDuration": "P1Y",
"ProvisioningContext": {
"scope": "single",
"entitlementId": "cdd17cc7-14fe-4445-8650-1f52de705851"
},
"PurchaseCommitment": {
"amount": 0.05,
"currency": "usd",
"grain": "hourly"
}
}
]
}
Antwoord:
{
"id": "2b912b3392fd",
"alternateId": "2b912b3392fd",
"referenceCustomerId": "6f4ce4d8-f42e-45e0-8661-92ad6ac9d003",
"billingCycle": "monthly",
"currencyCode": "USD",
"currencySymbol": "US$",
"lineItems": [
{
"lineItemNumber": 0,
"provisioningContext": {
"scope": "single",
"entitlementId": "cdd17cc7-14fe-4445-8650-1f52de705851"
},
"offerId": "DZH318Z09V6F:0001:DZH318Z0BLD3",
"termDuration": "P1Y",
"transactionType": "New",
"friendlyName": "Compute savings plan, 1 Year",
"quantity": 1,
"pricing": {
"listPrice": 438.0,
"discountedPrice": 438.0,
"proratedPrice": 438.0,
"price": 438.0,
"extendedPrice": 438.0
},
"purchaseCommitment": {
"amount": 0.05,
"currency": "usd",
"grain": "hourly"
},
"links": {
"product": {
"uri": "/products/DZH318Z09V6F?country=US",
"method": "GET",
"headers": []
},
"sku": {
"uri": "/products/DZH318Z09V6F/skus/0001?country=US",
"method": "GET",
"headers": []
},
"availability": {
"uri": "/products/DZH318Z09V6F/skus/0001/availabilities/DZH318Z0BLD3?country=US",
"method": "GET",
"headers": []
}
}
}
],
"creationDate": "2023-05-18TT21:22:26.7034834Z",
"status": "pending",
"transactionType": "UserPurchase",
"links": {
"self": {
"uri": "/customers/6f4ce4d8-f42e-45e0-8661-92ad6ac9d003/orders/2b912b3392fd",
"method": "GET",
"headers": []
},
"provisioningStatus": {
"uri": "/customers/6f4ce4d8-f42e-45e0-8661-92ad6ac9d003/orders/2b912b3392fd/provisioningstatus",
"method": "GET",
"headers": []
},
"patchOperation": {
"uri": "/customers/6f4ce4d8-f42e-45e0-8661-92ad6ac9d003/orders/2b912b3392fd",
"method": "PATCH",
"headers": []
}
},
"client": {},
"attributes": {
"objectType": "Order"
}
}
Voorbeelden van api's voor bestellingen en abonnementen
Een bestelling ophalen op basis van id
Antwoord:
{
"id": "2b912b3392fd",
"alternateId": "2b912b3392fd",
"referenceCustomerId": "6f4ce4d8-f42e-45e0-8661-92ad6ac9d003",
"billingCycle": "monthly",
"currencyCode": "USD",
"currencySymbol": "US$",
"lineItems": [
{
"lineItemNumber": 0,
"subscriptionId": "bbbb1b1b-cc2c-dd3d-ee4e-ffffff5f5f5f",
"provisioningContext": {
"scope": "single",
"entitlementId": "cdd17cc7-14fe-4445-8650-1f52de705851"
},
"offerId": "DZH318Z09V6F:0001:DZH318Z0BLD3",
"termDuration": "P1Y",
"transactionType": "New",
"friendlyName": "Compute savings plan, 1 Year",
"quantity": 1,
"purchaseCommitment": {
"amount": 0.05,
"currency": "usd",
"grain": "hourly"
},
"links": {
"product": {
"uri": "/products/DZH318Z09V6F?country=US",
"method": "GET",
"headers": []
},
"sku": {
"uri": "/products/DZH318Z09V6F/skus/0001?country=US",
"method": "GET",
"headers": []
},
"availability": {
"uri": "/products/DZH318Z09V6F/skus/0001/availabilities/DZH318Z0BLD3?country=US",
"method": "GET",
"headers": []
}
}
}
],
"creationDate": "2023-05-18TT21:22:26.7034834Z",
"status": "completed",
"transactionType": "UserPurchase",
"links": {
"self": {
"uri": "/customers/6f4ce4d8-f42e-45e0-8661-92ad6ac9d003/orders/2b912b3392fd",
"method": "GET",
"headers": []
},
"provisioningStatus": {
"uri": "/customers/6f4ce4d8-f42e-45e0-8661-92ad6ac9d003/orders/2b912b3392fd/provisioningstatus",
"method": "GET",
"headers": []
},
"patchOperation": {
"uri": "/customers/6f4ce4d8-f42e-45e0-8661-92ad6ac9d003/orders/2b912b3392fd",
"method": "PATCH",
"headers": []
}
},
"client": {},
"attributes": {
"objectType": "Order"
}
}
Alle orders van een klant ophalen
Antwoord:
{
"totalCount": 1,
"items": [
{
"id": "2b912b3392fd",
"alternateId": "2b912b3392fd",
"referenceCustomerId": "6f4ce4d8-f42e-45e0-8661-92ad6ac9d003",
"billingCycle": "monthly",
"currencyCode": "USD",
"currencySymbol": "US$",
"lineItems": [
{
"lineItemNumber": 0,
"subscriptionId": "bbbb1b1b-cc2c-dd3d-ee4e-ffffff5f5f5f",
"provisioningContext": {
"scope": "single",
"entitlementId": "cdd17cc7-14fe-4445-8650-1f52de705851"
},
"offerId": "DZH318Z09V6F:0001:DZH318Z0BLD3",
"termDuration": "P1Y",
"transactionType": "New",
"friendlyName": "Compute savings plan, 1 Year",
"quantity": 1,
"purchaseCommitment": {
"amount": 0.05,
"currency": "usd",
"grain": "hourly"
},
"links": {
"product": {
"uri": "/products/DZH318Z09V6F?country=US",
"method": "GET",
"headers": []
},
"sku": {
"uri": "/products/DZH318Z09V6F/skus/0001?country=US",
"method": "GET",
"headers": []
},
"availability": {
"uri": "/products/DZH318Z09V6F/skus/0001/availabilities/DZH318Z0BLD3?country=US",
"method": "GET",
"headers": []
}
}
}
],
"creationDate": "2023-05-18TT21:22:26.7034834Z",
"status": "completed",
"transactionType": "UserPurchase",
"links": {
"self": {
"uri": "/customers/6f4ce4d8-f42e-45e0-8661-92ad6ac9d003/orders/2b912b3392fd",
"method": "GET",
"headers": []
},
"provisioningStatus": {
"uri": "/customers/6f4ce4d8-f42e-45e0-8661-92ad6ac9d003/orders/2b912b3392fd/provisioningstatus",
"method": "GET",
"headers": []
},
"patchOperation": {
"uri": "/customers/6f4ce4d8-f42e-45e0-8661-92ad6ac9d003/orders/2b912b3392fd",
"method": "PATCH",
"headers": []
}
},
"client": {},
"attributes": {
"objectType": "Order"
}
}
],
"links": {
"self": {
"uri": "/customers/6f4ce4d8-f42e-45e0-8661-92ad6ac9d003/orders",
"method": "GET",
"headers": []
}
},
"attributes": {
"objectType": "Collection"
}
}
Een abonnement ophalen op id
Antwoord:
{
"id": "cccc2c2c-dd3d-ee4e-ff5f-aaaaaa6a6a6a",
"offerId": "DZH318Z09V6F:0001:DZH318Z0BLD3",
"offerName": "Compute savings plan, 1 Year",
"friendlyName": "Compute_Savings_Plan_123",
"productType": {
"id": "Azure",
"displayName": "Azure",
"subType": {
"id": "SavingsPlan",
"displayName": "SavingsPlan"
}
},
"quantity": 1,
"unitType": "Benefit",
"hasPurchasableAddons": false,
"creationDate": "2023-05-18T05:19:22.5478955Z",
"effectiveStartDate": "2023-05-18T05:19:21.3362111Z",
"commitmentEndDate": "2024-05-17T00:00:00Z",
"billingCycleEndDate": "2024-05-17T00:00:00Z",
"status": "active",
"autoRenewEnabled": true,
"isTrial": false,
"billingType": "benefit",
"billingCycle": "one_time",
"termDuration": "P1Y",
"renewalTermDuration": "",
"isMicrosoftProduct": true,
"partnerId": "",
"attentionNeeded": false,
"actionTaken": false,
"contractType": "subscription",
"links": {
"product": {
"uri": "/products/DZH318Z09V6F?country=US",
"method": "GET",
"headers": []
},
"sku": {
"uri": "/products/DZH318Z09V6F/skus/0001?country=US",
"method": "GET",
"headers": []
},
"availability": {
"uri": "/products/DZH318Z09V6F/skus/0001/availabilities/DZH318Z0BLD3?country=US",
"method": "GET",
"headers": []
},
"self": {
"uri": "/customers/6f4ce4d8-f42e-45e0-8661-92ad6ac9d003/subscriptions/cccc2c2c-dd3d-ee4e-ff5f-aaaaaa6a6a6a",
"method": "GET",
"headers": []
}
},
"publisherName": "Microsoft Corporation",
"lineItems": [
{
"id": "2131a68b-9796-4557-b628-354539ed66dc",
"friendlyName": "Compute_Savings_Plan_123",
"scope": {
"type": "single",
"entitlementId": "cdd17cc7-14fe-4445-8650-1f52de705851"
},
"autoRenewEnabled": true,
"status": "active",
"purchaseCommitment": {
"amount": 0.05,
"currency": "usd",
"grain": "Hourly"
}
}
],
"productOrderId": "2131a68b-9796-4557-b628-354539ed66dc",
"orderId": "2b912b339251",
"attributes": {
"objectType": "Subscription"
}
}
Abonnementen van een klant ophalen
Antwoord:
{
"totalCount": 1,
"items": [
{
"id": "cccc2c2c-dd3d-ee4e-ff5f-aaaaaa6a6a6a",
"offerId": "DZH318Z09V6F:0001:DZH318Z0BLD3",
"offerName": "Compute savings plan, 1 Year",
"friendlyName": "Compute_Savings_Plan_123",
"productType": {
"id": "Azure",
"displayName": "Azure",
"subType": {
"id": "SavingsPlan",
"displayName": "SavingsPlan"
}
},
"quantity": 1,
"unitType": "Benefit",
"hasPurchasableAddons": false,
"creationDate": "2023-05-18T05:19:22.5478955Z",
"effectiveStartDate": "2023-05-18T05:19:21.3362111Z",
"commitmentEndDate": "2024-05-17T00:00:00Z",
"commitmentEndDateTime": "2024-05-17T23:59:59Z",
"billingCycleEndDate": "2024-05-17T00:00:00Z",
"billingCycleEndDateTime": "2024-05-17T23:59:59Z",
"status": "active",
"autoRenewEnabled": true,
"isTrial": false,
"billingType": "benefit",
"billingCycle": "one_time",
"termDuration": "P1Y",
"renewalTermDuration": "",
"isMicrosoftProduct": true,
"partnerId": "",
"attentionNeeded": false,
"actionTaken": false,
"contractType": "subscription",
"links": {
"product": {
"uri": "/products/DZH318Z09V6F?country=US",
"method": "GET",
"headers": []
},
"sku": {
"uri": "/products/DZH318Z09V6F/skus/0001?country=US",
"method": "GET",
"headers": []
},
"availability": {
"uri": "/products/DZH318Z09V6F/skus/0001/availabilities/DZH318Z0BLD3?country=US",
"method": "GET",
"headers": []
},
"self": {
"uri": "/customers/6f4ce4d8-f42e-45e0-8661-92ad6ac9d003/subscriptions/cccc2c2c-dd3d-ee4e-ff5f-aaaaaa6a6a6a",
"method": "GET",
"headers": []
}
},
"publisherName": "Microsoft Corporation",
"lineItems": [
{
"id": "2131a68b-9796-4557-b628-354539ed66dc",
"friendlyName": "Compute_Savings_Plan_123",
"scope": {
"type": "single",
"entitlementId": "cdd17cc7-14fe-4445-8650-1f52de705851"
},
"autoRenewEnabled": true,
"status": "active",
"purchaseCommitment": {
"amount": 0.05,
"currency": "usd",
"grain": "Hourly"
}
}
],
"productOrderId": "2131a68b-9796-4557-b628-354539ed66dc",
"orderId": "2b912b339251",
"attributes": {
"objectType": "Subscription"
}
}
],
"links": {
"self": {
"uri": "/customers/6f4ce4d8-f42e-45e0-8661-92ad6ac9d003/subscriptions",
"method": "GET",
"headers": []
}
},
"attributes": {
"objectType": "Collection"
}
}