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

# Externalmappings

## Retrieve External Mapping

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

Retrieve an External Mapping with the given UUID.

This endpoint enables you to retrieve the External Mapping with the specified UUID for 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 External Mapping 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 External Mapping

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

Updates an External Mapping with the given UUID.

This endpoint enables you to update an existing External Mapping entity, identified by its UUID. You must supply a request body with the new details for the External Mapping.

### 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 External Mapping to retrieve. | -                                                                     |
| `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. |

## List External Mappings for a m3ter Entity

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

Retrieve a list of External Mapping entities for a specified m3ter entity.

Use this endpoint to retrieve a list of External Mapping entities associated with a specific m3ter entity. The list can be paginated 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 |
| `entity`                   | entity      | LookupParameter        |    Yes   | The entity type.                                 | -                                                                     |
| `m3terId`                  | m3terId     | LookupParameter        |    Yes   | The unique identifer (UUID) of the m3ter entity. | -                                                                     |
| `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 External Mappings for External Entity

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

Retrieve a list of External Mapping entities for a specified external system entity.

Use this endpoint to retrieve a list of External Mapping entities associated with a specific external system entity. The list can be paginated 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 |
| `system`                   | system        | LookupParameter        |    Yes   | The identifier for the external system.               | -                                                                     |
| `externalTable`            | externalTable | LookupParameter        |    Yes   | The identifier for the external table.                | -                                                                     |
| `externalId`               | externalId    | LookupParameter        |    Yes   | The unique identifier (UUID) for the external entity. | -                                                                     |
| `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 External Mappings

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

Retrieve a list of all External Mapping entities.

This endpoint retrieves a list of all External Mapping entities for a specific Organization. The list can be paginated for better management, and supports filtering using the external system.

### 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: externalSystemId,m3terIds,integrationConfigId          |

### Exits

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