Skip to content

Commit 4c23611

Browse files
authored
Merge pull request #264690 from bandersmsft/billing-enterprise-api-marketplace-storecharage
MCM - Adding new migrate ea-marketplace-store-charge API article
2 parents 2ab3a33 + 94fccf8 commit 4c23611

File tree

3 files changed

+144
-11
lines changed

3 files changed

+144
-11
lines changed
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
---
2+
title: Migrate from EA Marketplace Store Charge API
3+
titleSuffix: Microsoft Cost Management
4+
description: This article has information to help you migrate from the EA Marketplace Store Charge API.
5+
author: bandersmsft
6+
ms.author: banders
7+
ms.date: 01/31/2024
8+
ms.topic: conceptual
9+
ms.service: cost-management-billing
10+
ms.subservice: cost-management
11+
ms.reviewer: maminn
12+
---
13+
14+
# Migrate from EA Marketplace Store Charge API
15+
16+
EA customers who were previously using the Enterprise Reporting consumption.azure.com API to [get their marketplace store charges](/rest/api/billing/enterprise/billing-enterprise-api-marketplace-storecharge) need to migrate to a replacement Azure Resource Manager API. This article helps you migrate by using the following instructions. It also explains the contract differences between the old API and the new API.
17+
18+
Endpoints to migrate off:
19+
20+
|Endpoint|API Comments|
21+
|---|---|
22+
| `/v3/enrollments/{enrollmentNumber}/marketplacecharges` | • API method: GET <br><br> • Synchronous (non polling) <br><br> • Data format: JSON |
23+
| `/v3/enrollments/{enrollmentNumber}/billingPeriods/{billingPeriod}/marketplacecharges` | • API method: GET <br><br> • Synchronous (non polling) <br><br> • Data format: JSON |
24+
| `/v3/enrollments/{enrollmentNumber}/marketplacechargesbycustomdate?startTime=2017-01-01&endTime=2017-01-10` | • API method: GET <br><br> • Synchronous (non polling) <br><br> • Data format: JSON |
25+
26+
## Assign permissions to an SPN to call the API
27+
28+
Before calling the API, you need to configure a service principal with the correct permission. You use the service principal to call the API. For more information, see [Assign permissions to ACM APIs](cost-management-api-permissions.md).
29+
30+
### Call the Marketplaces API
31+
32+
Use the following request URIs when calling the new Marketplaces API. All Azure and Marketplace charges are merged into a single file that is available through the new solutions. You can identify which charges are *Azure* versus *Marketplace* charges by using the `PublisherType` field that is available in the new dataset.
33+
34+
Your enrollment number should be used as the `billingAccountId`.
35+
36+
#### Supported requests
37+
38+
You can call the API using the following scopes:
39+
40+
- Department: `/providers/Microsoft.Billing/departments/{departmentId}`
41+
- Enrollment: `/providers/Microsoft.Billing/billingAccounts/{billingAccountId}`
42+
- EnrollmentAccount: `/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}`
43+
- Management Group: `/providers/Microsoft.Management/managementGroups/{managementGroupId}`
44+
- Subscription: `/subscriptions/{subscriptionId}/`
45+
46+
For subscription, billing account, department, enrollment account, and management group scopes you can also add a billing period to the scope using `/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}`. For example, to specify a billing period at the department scope, use `/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}`.
47+
48+
[List Marketplaces](/rest/api/consumption/marketplaces/list#marketplaceslistresult)
49+
50+
```http
51+
GET https://management.azure.com/{scope}/providers/Microsoft.Consumption/marketplaces
52+
```
53+
54+
With optional parameters:
55+
56+
```http
57+
https://management.azure.com/{scope}/providers/Microsoft.Consumption/marketplaces?$filter={$filter}&$top={$top}&$skiptoken={$skiptoken}
58+
```
59+
60+
#### Response body changes
61+
62+
Old response:
63+
64+
65+
```json
66+
[
67+
{
68+
"id": "id",
69+
"subscriptionGuid": "00000000-0000-0000-0000-000000000000",
70+
"subscriptionName": "subName",
71+
"meterId": "2core",
72+
"usageStartDate": "2015-09-17T00:00:00Z",
73+
"usageEndDate": "2015-09-17T23:59:59Z",
74+
"offerName": "Virtual LoadMaster&trade; (VLM) for Azure",
75+
"resourceGroup": "Res group",
76+
"instanceId": "id",
77+
"additionalInfo": "{\"ImageType\":null,\"ServiceType\":\"Medium\"}",
78+
"tags": "",
79+
"orderNumber": "order",
80+
"unitOfMeasure": "",
81+
"costCenter": "100",
82+
"accountId": 100,
83+
"accountName": "Account Name",
84+
"accountOwnerId": "[email protected]",
85+
"departmentId": 101,
86+
"departmentName": "Department 1",
87+
"publisherName": "Publisher 1",
88+
"planName": "Plan name",
89+
"consumedQuantity": 1.15,
90+
"resourceRate": 0.1,
91+
"extendedCost": 1.11,
92+
"isRecurringCharge": "False"
93+
},
94+
...
95+
]
96+
```
97+
98+
New response:
99+
100+
```json
101+
{
102+
"id": "/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/marketPlaces/marketplacesId1",
103+
"name": "marketplacesId1",
104+
"type": "Microsoft.Consumption/marketPlaces",
105+
"tags": {
106+
"env": "newcrp",
107+
"dev": "tools"
108+
},
109+
"properties": {
110+
"accountName": "Account1",
111+
"additionalProperties": "additionalProperties",
112+
"costCenter": "Center1",
113+
"departmentName": "Department1",
114+
"billingPeriodId": "/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201702",
115+
"usageStart": "2017-02-13T00:00:00Z",
116+
"usageEnd": "2017-02-13T23:59:59Z",
117+
"instanceName": "shared1",
118+
"instanceId": "/subscriptions/subid/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1",
119+
"currency": "USD",
120+
"consumedQuantity": 0.00328,
121+
"pretaxCost": 0.67,
122+
"isEstimated": false,
123+
"meterId": "00000000-0000-0000-0000-000000000000",
124+
"offerName": "offer1",
125+
"resourceGroup": "TEST",
126+
"orderNumber": "00000000-0000-0000-0000-000000000000",
127+
"publisherName": "xyz",
128+
"planName": "plan2",
129+
"resourceRate": 0.24,
130+
"subscriptionGuid": "00000000-0000-0000-0000-000000000000",
131+
"subscriptionName": "azure subscription",
132+
"unitOfMeasure": "10 Hours",
133+
"isRecurringCharge": false
134+
}
135+
}
136+
137+
```
138+
139+
## Next steps
140+
141+
- Read the [Migrate from Azure Enterprise Reporting to Microsoft Cost Management APIs overview](migrate-ea-reporting-arm-apis-overview.md) article.

articles/cost-management-billing/automate/migrate-ea-usage-details-api.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ titleSuffix: Microsoft Cost Management
44
description: This article has information to help you migrate from the EA Usage Details APIs.
55
author: bandersmsft
66
ms.author: banders
7-
ms.date: 11/17/2023
7+
ms.date: 01/30/2024
88
ms.topic: conceptual
99
ms.service: cost-management-billing
1010
ms.subservice: cost-management
@@ -68,16 +68,6 @@ The table below summarizes the different APIs that you may be using today to ing
6868
| `/v3/enrollments/{enrollmentNumber}/usagedetails/submit?billingPeriod={billingPeriod}` | - API method: POST<br> - Asynchronous (polling based)<br> - Data format: CSV |
6969
| `/v3/enrollments/{enrollmentNumber}/usagedetails/submit?startTime=2017-04-01&endTime=2017-04-10` | - API method: POST<br> - Asynchronous (polling based)<br> - Data format: CSV |
7070

71-
## Enterprise Marketplace Store Charge APIs to migrate off
72-
73-
In addition to the usage details APIs outlined above, you'll need to migrate off the [Enterprise Marketplace Store Charge APIs](/rest/api/billing/enterprise/billing-enterprise-api-marketplace-storecharge). All Azure and Marketplace charges have been merged into a single file that is available through the new solutions. You can identify which charges are *Azure* versus *Marketplace* charges by using the `PublisherType` field that is available in the new dataset. The table below outlines the applicable APIs. All of the following APIs are behind the *https://consumption.azure.com* endpoint.
74-
75-
| Endpoint | API Comments |
76-
| --- | --- |
77-
| `/v3/enrollments/{enrollmentNumber}/marketplacecharges` | - API method: GET<br> - Synchronous (non polling)<br> - Data format: JSON |
78-
| `/v3/enrollments/{enrollmentNumber}/billingPeriods/{billingPeriod}/marketplacecharges` | - API method: GET<br> - Synchronous (non polling)<br> - Data format: JSON |
79-
| `/v3/enrollments/{enrollmentNumber}/marketplacechargesbycustomdate?startTime=2017-01-01&endTime=2017-01-10` | - API method: GET<br> - Synchronous (non polling)<br> - Data format: JSON |
80-
8171
## Data field mapping
8272

8373
The table below provides a summary of the old fields available in the solutions you're currently using along with the field to use in the new solutions.

articles/cost-management-billing/costs/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@
237237
items:
238238
- name: Migrate from EA Reporting APIs to ARM
239239
href: ../automate/migrate-ea-reporting-arm-apis-overview.md
240+
- name: EA Marketplace Store Charge API
241+
href: ../automate/migrate-ea-marketplace-store-charge-api.md
240242
- name: EA Usage Details APIs
241243
href: ../automate/migrate-ea-usage-details-api.md
242244
- name: EA Balance Summary API

0 commit comments

Comments
 (0)