> ## 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.

# Plangroups

## List PlanGroups

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

Retrieve a list of PlanGroups.

Retrieves a list of PlanGroups within the specified organization. You can optionally filter by Account IDs or PlanGroup IDs, and also paginate the results for easier management.

### 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: accountId,ids                                          |

### Exits

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

## Create PlanGroup

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

Create a new PlanGroup.
This endpoint creates a new PlanGroup within the specified organization.

### 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. |

## Retrieve PlanGroup

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

Retrieve a specific PlanGroup with the given UUID.

This endpoint retrieves detailed information about a specific PlanGroup identified by the given UUID within a specific organization.

### 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 unique identifier (UUID) of the PlanGroup 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 PlanGroup

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

Update the PlanGroup with the given UUID.

This endpoint updates the details of a specific PlanGroup identified by the given UUID within a specific organization. This allows modifications to existing PlanGroup attributes.

**Note:** If you have created Custom Fields for a PlanGroup, when you use this endpoint to update the PlanGroup 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 unique identifier (UUID) of the PlanGroup 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 PlanGroup

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

Delete a PlanGroup with the given UUID.

This endpoint deletes the PlanGroup identified by the given UUID within a specific organization. This operation is irreversible and removes the PlanGroup along with any associated settings.

### 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 unique identifier (UUID) of the PlanGroup 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. |
