|
| 1 | +--- |
| 2 | +title: Migrate from the EA Billing Periods API |
| 3 | +titleSuffix: Microsoft Cost Management |
| 4 | +description: This article has information to help you migrate from the EA Billing Periods API. |
| 5 | +author: bandersmsft |
| 6 | +ms.author: banders |
| 7 | +ms.date: 02/21/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 the EA Billing Periods API |
| 15 | + |
| 16 | +EA customers that previously used the [Billing periods](/rest/api/billing/enterprise/billing-enterprise-api-billing-periods) Enterprise Reporting consumption.azure.com API to get their billing periods need to use different mechanisms to get the data they need. This article helps you migrate from the old API by using replacement APIs. |
| 17 | + |
| 18 | +Endpoints to migrate off: |
| 19 | + |
| 20 | +| **Endpoint** | **API Comments** | |
| 21 | +| --- | --- | |
| 22 | +| /v2/enrollments/{enrollmentNumber}/billingperiods | • API method: GET <br> • Synchronous (non polling) <br> • Data format: JSON | |
| 23 | + |
| 24 | +## New solutions |
| 25 | + |
| 26 | +There's no new single API that has the same functionality that returns billing periods with consumption data and that returns the API routes for the four sets of data. Instead, you call each new API individually. If data of the requested type is available, it gets included in the response. Otherwise, no data is included in the response. |
| 27 | + |
| 28 | +The Balance Summary and Price Sheet APIs use the billing period *as a parameter*. Create your GET request with the billing period using the year and month (_yyyyMM_) format. |
| 29 | + |
| 30 | +### Balance Summary |
| 31 | + |
| 32 | +Call the new Balances API to get either [the balances for all billing periods](/rest/api/consumption/balances/get-by-billing-account/) or the balances for a [specific billing period](/rest/api/consumption/balances/get-for-billing-period-by-billing-account/). |
| 33 | + |
| 34 | +### Usage Details |
| 35 | + |
| 36 | +To get usage details, use either Cost Management Exports or the [Cost Management Cost Details API](/rest/api/cost-management/generate-cost-details-report). You can get the cost and usage details data for a time period. If data exists for the specified period, it gets returned. Otherwise, no data is included in the response. |
| 37 | + |
| 38 | +The billing period can be represented in the Usage Details alternatives by using the billing period time frame as the selected start and end date. |
| 39 | + |
| 40 | +For more information about each option, see [Migrate from EA Usage Details APIs](migrate-ea-usage-details-api.md). |
| 41 | + |
| 42 | +### Marketplace charges |
| 43 | + |
| 44 | +Call the [List Marketplaces API](/rest/api/consumption/marketplaces/list/#marketplaceslistresult) to get a list of available marketplaces in reverse chronological order by billing period. |
| 45 | + |
| 46 | +### Price Sheet |
| 47 | + |
| 48 | +Call the new [Price Sheet API](/rest/api/consumption/price-sheet) to get the price sheet for either [the current billing period](/rest/api/consumption/price-sheet/get/) or for [a specific billing period](/rest/api/consumption/price-sheet/get-by-billing-period/). |
| 49 | + |
| 50 | +## Next steps |
| 51 | + |
| 52 | +- Read the [Migrate from Azure Enterprise Reporting to Microsoft Cost Management APIs overview](migrate-ea-reporting-arm-apis-overview.md) article. |
0 commit comments