> ## Documentation Index
> Fetch the complete documentation index at: https://docs.m3ter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Meters

## Retrieve Meter

**Function name:** `m3ter_GetMeter`
**Category:** READ
**HTTP method:** GET
**Destination:** m3ter

Retrieve the Meter with the given UUID.

### Parameters

| Name                       | Label       | Type                   | Required | Description                           | Constraints                                                           |
| -------------------------- | ----------- | ---------------------- | :------: | ------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials | M3terEntityParameter   |    Yes   | The m3ter credentials to use.         | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `id`                       | id          | LookupParameter        |    Yes   | The UUID of the Meter to retrieve.    | -                                                                     |
| `statePath`                | State Path  | StateVariableParameter |    No    | State variable to store the response. | -                                                                     |

### Exits

| Exit    | Description                                                                      |
| ------- | -------------------------------------------------------------------------------- |
| `NEXT`  | The API call succeeded.                                                          |
| `ERROR` | The API call failed. Error details are stored in the `m3shError` state variable. |

## Update Meter

**Function name:** `m3ter_PutMeter`
**Category:** WRITE
**HTTP method:** PUT
**Destination:** m3ter

Update the Meter with the given UUID.

**Note:** If you have created Custom Fields for a Meter, when you use this endpoint to update the Meter use the `customFields` parameter to preserve those Custom Fields. If you omit them from the update request, they will be lost.

### Parameters

| Name                       | Label        | Type                   | Required | Description                            | Constraints                                                           |
| -------------------------- | ------------ | ---------------------- | :------: | -------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials  | M3terEntityParameter   |    Yes   | The m3ter credentials to use.          | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `id`                       | id           | LookupParameter        |    Yes   | The UUID of the Meter to update.       | -                                                                     |
| `requestPath`              | Request Path | StateVariableParameter |    Yes   | State variable containing the request. | -                                                                     |
| `statePath`                | State Path   | StateVariableParameter |    No    | State variable to store the response.  | -                                                                     |

### Exits

| Exit    | Description                                                                      |
| ------- | -------------------------------------------------------------------------------- |
| `NEXT`  | The API call succeeded.                                                          |
| `ERROR` | The API call failed. Error details are stored in the `m3shError` state variable. |

## Delete Meter

**Function name:** `m3ter_DeleteMeter`
**Category:** WRITE
**HTTP method:** DELETE
**Destination:** m3ter

Delete the Meter with the given UUID.

### Parameters

| Name                       | Label       | Type                   | Required | Description                           | Constraints                                                           |
| -------------------------- | ----------- | ---------------------- | :------: | ------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials | M3terEntityParameter   |    Yes   | The m3ter credentials to use.         | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `id`                       | id          | LookupParameter        |    Yes   | The UUID of the Meter to delete.      | -                                                                     |
| `statePath`                | State Path  | StateVariableParameter |    No    | State variable to store the response. | -                                                                     |

### Exits

| Exit    | Description                                                                      |
| ------- | -------------------------------------------------------------------------------- |
| `NEXT`  | The API call succeeded.                                                          |
| `ERROR` | The API call failed. Error details are stored in the `m3shError` state variable. |

## List Meters

**Function name:** `m3ter_ListMeters`
**Category:** READ
**HTTP method:** GET (paginated)
**Destination:** m3ter

Retrieve a list of Meters that can be filtered by Product, Meter ID, or Meter short code.

### Parameters

| Name                       | Label            | Type                    | Required | Description                                | Constraints                                                           |
| -------------------------- | ---------------- | ----------------------- | :------: | ------------------------------------------ | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials      | M3terEntityParameter    |    Yes   | The m3ter credentials to use.              | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `statePath`                | State Path       | StateVariableParameter  |    No    | State variable to store the response.      | -                                                                     |
| `queryParams`              | Query Parameters | KeyValueLookupParameter |    No    | Query parameters to include in the request | allowedValues: productId,ids,codes                                    |

### Exits

| Exit    | Description                                                                      |
| ------- | -------------------------------------------------------------------------------- |
| `NEXT`  | The API call succeeded.                                                          |
| `ERROR` | The API call failed. Error details are stored in the `m3shError` state variable. |

## Create Meter

**Function name:** `m3ter_PostMeter`
**Category:** WRITE
**HTTP method:** POST
**Destination:** m3ter

Create a new Meter.

When you create a Meter, you can define two types of field for usage data collection and ingest into the platform:

* `dataFields` to collect raw usage data measures - numeric quantitative data values or non-numeric point data values.
* `derivedFields` to derive usage data measures that are the result of applying a calculation to `dataFields`, `customFields`, or system `Timestamp` fields.

You can also:

* Create `customFields` for a Meter, which allows you to attach custom data to the Meter as name/value pairs.
* Create Global Meters, which are not tied to a specific Product and allow you collect to usage data that will form the basis of usage-based pricing across more than one of your Products.

**IMPORTANT! - use of PII:** The use of any of your end-customers' Personally Identifiable Information (PII) in m3ter is restricted to a few fields on the **Account** entity. Please ensure that any fields you configure for Meters, such as Data Fields or Derived Fields, do not contain any end-customer PII data. See the [Introduction section](https://www.m3ter.com/docs/api#section/Introduction) above for more details.

See also:

* [Reviewing Meter Options](https://www.m3ter.com/docs/guides/setting-up-usage-data-meters-and-aggregations/reviewing-meter-options).

### Parameters

| Name                       | Label        | Type                   | Required | Description                            | Constraints                                                           |
| -------------------------- | ------------ | ---------------------- | :------: | -------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials  | M3terEntityParameter   |    Yes   | The m3ter credentials to use.          | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `requestPath`              | Request Path | StateVariableParameter |    Yes   | State variable containing the request. | -                                                                     |
| `statePath`                | State Path   | StateVariableParameter |    No    | State variable to store the response.  | -                                                                     |

### Exits

| Exit    | Description                                                                      |
| ------- | -------------------------------------------------------------------------------- |
| `NEXT`  | The API call succeeded.                                                          |
| `ERROR` | The API call failed. Error details are stored in the `m3shError` state variable. |
