# Leap Meters API V2 Release

The new version (V2) of Leap’s Meters API is now available. This new API offers improvements for partners working in multiple programs and markets and provides additional meter metadata and enrollment information not currently available in the V1 Meters API.

The Meters API V2 includes two new endpoint groups (whereas V1 provided all data in a single endpoint group):

- **Meter Details endpoints** provide data about the customer, site, utility and device, information that does not typically change. These new endpoints align naming and data structure with the Create Meters API, supporting a universal file format that makes it easier for partners adding both utility- and device-type meters to work with data on the Leap platform.
- **Meter Enrollment endpoints** provide statuses and fields related to program enrollment, which are likely to change more frequently than the meter details data. Included with these endpoints are:

- Enhanced search capabilities with new request filter parameters
  - Simplified reporting of meter-to-market group mapping
  - New program delivery period fields with details on enrollment status and deadlines for each applicable program
  - Details on actions required to complete enrollment, utilizing the Program Enrollment Checklists released earlier this year

For more information, see the [Meters API V2 Developer Guide](https://go.leap.energy/e/980722/docs-sync-meter-inventory-v2/881ln/879021277/h/cG4KB41F5qlxyNrOGSMG9h9G_RqcZmHGdN4FIs0xVvI). The [Meters API v1 endpoints](https://developer.leap.energy/update/docs/sync-meter-updates#/) are being deprecated (end of support date to be announced) and we encourage partners to review the documentation and make migration plans.

## Summary of changes when migrating from V1 to V2:

### V1 -> V2 field name changes within new **Meter Details endpoints** 
(note that some fields are now embedded within the new `customer`, `utility`, or `site` objects):

- `utility` -> `utility_name`
- `service_point_number` -> `electric_service_account_number`
- `bill_customer_agreement_number` -> `bill_customer_account_number`
- `bill_service_account_number` -> `bill_service_agreement_number`
- `customer_name` -> `end_customer_name`
- `connection_reference_ids` -> `connection_references`

### V1 -> V2 updated locations and fields within the new **Meter Enrollment endpoints**:

Fields within V1 `participation` array:

- Market group membership is now tracked under the `program_enrollment` array within the `market_group_id` and `market_group_name` fields for each current and upcoming delivery period

- NOTE: The upcoming three `trade_date` fields in V1 has been replaced by the new delivery period objects within the V2 `program_enrollment` array. This gives you visibility into market group assignment for the next period as soon as it happens (indicated by the `market_group_id` and `market_group_name` moving from `null` to the assigned market group) instead of the limited three-day visibility currently available in V1.
  - NOTE: If you dispatch in groups, make sure to track updates to these group fields for all upcoming delivery periods and update your group mapping starting on the date of that upcoming delivery period

Fields within V1 `enrollment` object:

- `status` -> `global_enrollment_status`
  - NOTE: Program-level `enrollment_status` values are now also available within the `program_enrollment` array
- `active_periods`, `eligible_from`, and `eligible_to` are replaced by the delivery period details in the `program_enrollment` array
- `status_reasons` and `action_required` are replaced by the `required_actions` object

- NOTE: Make sure to trigger follow-ups on any actions under the `partner` object
- `partner_preferred_action`, `partner_indicated_idle_period`, and `partner_indicated_disenrollment` are replaced by `participation_preferences` array
