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

# Plantemplates

## List PlanTemplates

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

Retrieve a list of PlanTemplates.

This endpoint enables you to retrieve a paginated list of PlanTemplates belonging to a specific Organization, identified by its UUID. You can filter the list by PlanTemplate IDs or Product IDs for more focused retrieval.

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

### Exits

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

## Create PlanTemplate

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

Create a new PlanTemplate.

This endpoint creates a new PlanTemplate within a specific Organization, identified by its unique UUID. The request body should contain the necessary information for the new PlanTemplate.

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

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

Retrieve a specific PlanTemplate.

This endpoint allows you to retrieve a specific PlanTemplate within a specific Organization, both identified by their unique identifiers (UUIDs).

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

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

Update a specific PlanTemplate.

This endpoint enables you to update a specific PlanTemplate within a specific Organization, both identified by their unique identifiers (UUIDs). The request body should contain the updated information for the PlanTemplate.

**Note:** If you have created Custom Fields for a Plan Template, when you use this endpoint to update the Plan Template 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 PlanTemplate 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 PlanTemplate

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

Delete a specific PlanTemplate.

This endpoint enables you to delete a specific PlanTemplate within a specific Organization, both identified by their unique identifiers (UUIDs).

### 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 PlanTemplate to update. | -                                                                     |
| `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. |
