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

# Integrationruns

## Retrieve Latest IntegrationRun

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

Retrieve the latest integration run for the entity.

### Parameters

| Name                       | Label       | Type                   | Required | Description                                                                                                    | Constraints                                                           |
| -------------------------- | ----------- | ---------------------- | :------: | -------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials | M3terEntityParameter   |    Yes   | The m3ter credentials to use.                                                                                  | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `entityType`               | entityType  | LookupParameter        |    Yes   | The type of the entity you want to retrieve the last integration run for. Two options: \* Bill \* Notification | -                                                                     |
| `id`                       | id          | LookupParameter        |    Yes   | The UUID of the entity to retrieve the latest integration run for.                                             | -                                                                     |
| `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 IntegrationRuns

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

Retrieve the latest integration runs for entity and ids

### Parameters

| Name                       | Label            | Type                    | Required | Description                                | Constraints                                                           |
| -------------------------- | ---------------- | ----------------------- | :------: | ------------------------------------------ | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials      | M3terEntityParameter    |    Yes   | The m3ter credentials to use.              | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `entityType`               | entityType       | LookupParameter         |    Yes   | The type of the entity (e.g. Bill).        | -                                                                     |
| `statePath`                | State Path       | StateVariableParameter  |    No    | State variable to store the response.      | -                                                                     |
| `queryParams`              | Query Parameters | KeyValueLookupParameter |    No    | Query parameters to include in the request | allowedValues: ids                                                    |

### Exits

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

## Get IntegrationRun for the UUID

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

Retrieve the integration run for the id

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

## Get IntegrationRun Log

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

Retrieve the integrationrun log for the given UUID.

This endpoint is for retrieving logs of a specific integrationrun. It is useful for debugging and monitoring the performance of integrations within your 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 UUID associated with the integrationrun. This ID helps in pinpointing the exact integrationrun logs you are looking 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. |

## List IntegrationRuns By DestinationId

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

Retrieve a list of the integration runs for the destination

### Parameters

| Name                       | Label            | Type                    | Required | Description                                | Constraints                                                           |
| -------------------------- | ---------------- | ----------------------- | :------: | ------------------------------------------ | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials      | M3terEntityParameter    |    Yes   | The m3ter credentials to use.              | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `destinationId`            | destinationId    | LookupParameter         |    Yes   | The UUID of the destination.               | -                                                                     |
| `statePath`                | State Path       | StateVariableParameter  |    No    | State variable to store the response.      | -                                                                     |
| `queryParams`              | Query Parameters | KeyValueLookupParameter |    No    | Query parameters to include in the request | allowedValues: destination,startDate,endDate,status,order             |

### Exits

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

## List IntegrationRuns

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

Retrieve a list of the integration runs for the specified entity.

You can filter the list using the `startDate` and `endDate` query parameters to specify date/times to define the time period you want to return integration runs for.

### Parameters

| Name                       | Label            | Type                    | Required | Description                                                                                                | Constraints                                                           |
| -------------------------- | ---------------- | ----------------------- | :------: | ---------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials      | M3terEntityParameter    |    Yes   | The m3ter credentials to use.                                                                              | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `entityId`                 | entityId         | LookupParameter         |    Yes   | The UUID of the entity to retrieve the integration runs for.                                               | -                                                                     |
| `entityType`               | entityType       | LookupParameter         |    Yes   | The type of the entity you want to retrieve the integration runs for. Two options: \* Bill \* Notification | -                                                                     |
| `statePath`                | State Path       | StateVariableParameter  |    No    | State variable to store the response.                                                                      | -                                                                     |
| `queryParams`              | Query Parameters | KeyValueLookupParameter |    No    | Query parameters to include in the request                                                                 | allowedValues: startDate,endDate,status,order                         |

### Exits

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