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

# Lookuptables

## List LookupTableRevisionData Jobs

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

List the Lookup Table Revision Data job Responses for the given Lookup Table Revision.

There are four types of Revision Data jobs:

* **COPY**. Job runs when you use the [Copy LookupTableRevisionData](https://www.m3ter.com/docs/api#tag/LookupTableRevisionData/operation/CopyLookupTableRevisionData) endpoint which returns the `jobId`.
* **UPLOAD**. Job runs when you use the [Generate LookupTableRevisionData Upload URL](https://www.m3ter.com/docs/api#tag/LookupTableRevisionData/operation/GenerateLookupTableDataUploadUrl) endpoint which returns the `jobId`.
* **DOWNLOAD**. Job runs when you use the [](https://www.m3ter.com/docs/api#tag/LookupTableRevisionData/operation/TriggerLookupTableRevisionDataDownloadJob) endpoint which returns the `jobId`.
* **ARCHIVE**. Job runs when you either manually change a DRAFT Revision to PUBLISHED using the [Update LookupTableRevision Status](https://www.m3ter.com/docs/api#tag/LookupTableRevision/operation/UpdateLookupTableRevisionStatus) endpoint or you publish a DRAFT Revision and the existing PUBLISHED Revision is archived.

**NOTE:** This endpoint returns the id of each Data job. You then use:

* The [Get LookupTableRevisionData Job Response](https://www.m3ter.com/docs/api#tag/LookupTableRevisionData/operation/GetLookupTableRevisionDataJobResponse) endpoint to retrieve a specific Data job Response.
* The [Delete LookupTableRevisionData Job Response](https://www.m3ter.com/docs/api#tag/LookupTableRevisionData/operation/DeleteLookupTableRevisionDataJobResponse) to delete a specific Data job Response.

### Parameters

| Name                       | Label                 | Type                   | Required | Description                           | Constraints                                                           |
| -------------------------- | --------------------- | ---------------------- | :------: | ------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials           | M3terEntityParameter   |    Yes   | The m3ter credentials to use.         | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `lookupTableId`            | lookupTableId         | LookupParameter        |    Yes   | UUID of the Lookup Table.             | -                                                                     |
| `lookupTableRevisionId`    | lookupTableRevisionId | LookupParameter        |    Yes   | UUID of the Lookup Table Revision.    | -                                                                     |
| `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 LookupTableRevision

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

Retrieve a Lookup Table Revision for 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 Lookup Table Revision to retrieve.    | -                                                                     |
| `lookupTableId`            | lookupTableId | LookupParameter        |    Yes   | The UUID of the Lookup Table the Revision belongs to. | -                                                                     |
| `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 LookupTableRevision

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

Update a Lookup Table Revision for the given UUID.

**NOTE:** If you've already added data to a Lookup Table Revision - see the following [Lookup Table Revision Data](https://www.m3ter.com/docs/api#tag/LookupTableRevisionData) section - then you won't be able to change the Revision's field schema and you'll receive an error if you try do this. Create a new Revision instead, or delete the data items first.

### 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 Lookup Table Revision to update.      | -                                                                     |
| `lookupTableId`            | lookupTableId | LookupParameter        |    Yes   | The UUID of the Lookup Table the Revision belongs to. | -                                                                     |
| `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 LookupTableRevision

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

Delete the Lookup Table Revision for 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 Lookup Table Revision to update.      | -                                                                     |
| `lookupTableId`            | lookupTableId | LookupParameter        |    Yes   | The UUID of the Lookup Table the Revision belongs to. | -                                                                     |
| `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. |

## Trigger Download LookupTableRevisionData URL Job

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

Trigger an URL job to download the Lookup Table Revision Data. The URL download Data `jobId` is returned and you can then use the [List LookupTableRevisionData Jobs](https://www.m3ter.com/docs/api#tag/LookupTableRevisionData/operation/ListLookupTableRevisionDataJobs) endpoint or the [Get LookupTableRevisionData Job Response](https://www.m3ter.com/docs/api#tag/LookupTableRevisionData/operation/GetLookupTableRevisionDataJobResponse) endpoint to retrieve the URL and perform the Revision data Download.

### Parameters

| Name                       | Label                 | Type                   | Required | Description                            | Constraints                                                           |
| -------------------------- | --------------------- | ---------------------- | :------: | -------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials           | M3terEntityParameter   |    Yes   | The m3ter credentials to use.          | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `lookupTableId`            | lookupTableId         | LookupParameter        |    Yes   | UUID of the Lookup Table.              | -                                                                     |
| `lookupTableRevisionId`    | lookupTableRevisionId | LookupParameter        |    Yes   | UUID of the Lookup Table Revision.     | -                                                                     |
| `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. |

## Get LookupTableRevisionData entry

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

Retrieve a Lookup Table Revision Data item for the given lookup key.

**NOTES:**

* To obtain the lookup key for a Revision's data items, use the [Get LookupTableRevisionData](https://www.m3ter.com/docs/api#tag/LookupTableRevisionData/operation/GetLookupTableRevisionData) endpoint in this section and use the `additional=lookupKey` query parameter.
* If the Revision's Data schema uses multiple key fields, enter these as a comma-separated list for the `lookupKey` path parameter: .../key1,key2,key3 and so on. Importantly, multiple keys must be *entered in the same order* as they are configured in the Revision's Data schema.

### Parameters

| Name                       | Label                 | Type                   | Required | Description                                            | Constraints                                                           |
| -------------------------- | --------------------- | ---------------------- | :------: | ------------------------------------------------------ | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials           | M3terEntityParameter   |    Yes   | The m3ter credentials to use.                          | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `lookupTableId`            | lookupTableId         | LookupParameter        |    Yes   | UUID of the Lookup Table.                              | -                                                                     |
| `lookupTableRevisionId`    | lookupTableRevisionId | LookupParameter        |    Yes   | UUID of the Lookup Table Revision.                     | -                                                                     |
| `lookupKey`                | lookupKey             | LookupParameter        |    Yes   | The specific lookup key for the Data item 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. |

## Upsert LookupTableRevisionData entry

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

Create/update a Lookup Table Revision Data item by lookup key.

**NOTES:**

* To obtain the lookup key for a Revision's data items, use the [Get LookupTableRevisionData](https://www.m3ter.com/docs/api#tag/LookupTableRevisionData/operation/GetLookupTableRevisionData) endpoint in this section and use the `additional=lookupKey` query parameter.
* If the Revision's Data schema uses multiple key fields, enter these as a comma-separated list for the `lookupKey` path parameter: .../key1,key2,key3 and so on. Importantly, multiple keys must be *entered in the same order* as they are configured in the Revision's Data schema.

### Parameters

| Name                       | Label                 | Type                    | Required | Description                                          | Constraints                                                           |
| -------------------------- | --------------------- | ----------------------- | :------: | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials           | M3terEntityParameter    |    Yes   | The m3ter credentials to use.                        | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `lookupTableId`            | lookupTableId         | LookupParameter         |    Yes   | UUID of the Lookup Table.                            | -                                                                     |
| `lookupTableRevisionId`    | lookupTableRevisionId | LookupParameter         |    Yes   | UUID of the Lookup Table Revision.                   | -                                                                     |
| `lookupKey`                | lookupKey             | LookupParameter         |    Yes   | The specific lookup key for the Data item to upsert. | -                                                                     |
| `requestPath`              | Request Path          | StateVariableParameter  |    Yes   | State variable containing the 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: additional                                             |

### Exits

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

## Delete LookupTableRevisionData entry

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

Delete a Lookup Table Revision Data entry by lookup key.

**NOTES:**

* To obtain the lookup key for a Revision's data items, use the [Get LookupTableRevisionData](https://www.m3ter.com/docs/api#tag/LookupTableRevisionData/operation/GetLookupTableRevisionData) endpoint in this section and use the `additional=lookupKey` query parameter.
* If the Revision's Data schema uses multiple key fields, enter these as a comma-separated list for the `lookupKey` path parameter: .../key1,key2,key3 and so on. Importantly, multiple keys must be *entered in the same order* as they are configured in the Revision's Data schema.

### Parameters

| Name                       | Label                 | Type                   | Required | Description                                          | Constraints                                                           |
| -------------------------- | --------------------- | ---------------------- | :------: | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials           | M3terEntityParameter   |    Yes   | The m3ter credentials to use.                        | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `lookupTableId`            | lookupTableId         | LookupParameter        |    Yes   | UUID of the Lookup Table.                            | -                                                                     |
| `lookupTableRevisionId`    | lookupTableRevisionId | LookupParameter        |    Yes   | UUID of the Lookup Table Revision.                   | -                                                                     |
| `lookupKey`                | lookupKey             | LookupParameter        |    Yes   | The specific lookup key for the Data item to delete. | -                                                                     |
| `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. |

## Get LookupTable

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

Retrieve a Lookup Table by 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 Lookup Table to retrieve.  | -                                                                     |
| `statePath`                | State Path       | StateVariableParameter  |    No    | State variable to store the response.      | -                                                                     |
| `queryParams`              | Query Parameters | KeyValueLookupParameter |    No    | Query parameters to include in the request | allowedValues: additional                                             |

### Exits

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

## Update LookupTable

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

Update the Lookup Table 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 Lookup Table 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 LookupTable

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

Delete the Lookup Table 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 Lookup Table 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. |

## Get LookupTableRevisionData Job Response.

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

Get the Lookup Table Revision Data job Response for given job id.

**NOTE:** Use the [List LookupTableRevisionData Jobs](https://www.m3ter.com/docs/api#tag/LookupTableRevisionData/operation/ListLookupTableRevisionDataJobs) endpoint to list the Data job Responses for a specific Revision.

### Parameters

| Name                       | Label                 | Type                   | Required | Description                                 | Constraints                                                           |
| -------------------------- | --------------------- | ---------------------- | :------: | ------------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials           | M3terEntityParameter   |    Yes   | The m3ter credentials to use.               | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `lookupTableId`            | lookupTableId         | LookupParameter        |    Yes   | UUID of the Lookup Table.                   | -                                                                     |
| `lookupTableRevisionId`    | lookupTableRevisionId | LookupParameter        |    Yes   | UUID of the Lookup Table Revision.          | -                                                                     |
| `id`                       | id                    | LookupParameter        |    Yes   | UUID of the Lookup Table Revision Data job. | -                                                                     |
| `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 LookupTableRevisionData Job Response

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

Delete the LookupTableRevisionData Job Response for given job id.

**NOTE:** Use the [List LookupTableRevisionData Jobs](https://www.m3ter.com/docs/api#tag/LookupTableRevisionData/operation/ListLookupTableRevisionDataJobs) endpoint to list the Data job Responses for a specific Revision.

### Parameters

| Name                       | Label                 | Type                   | Required | Description                                 | Constraints                                                           |
| -------------------------- | --------------------- | ---------------------- | :------: | ------------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials           | M3terEntityParameter   |    Yes   | The m3ter credentials to use.               | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `lookupTableId`            | lookupTableId         | LookupParameter        |    Yes   | UUID of the Lookup Table.                   | -                                                                     |
| `lookupTableRevisionId`    | lookupTableRevisionId | LookupParameter        |    Yes   | UUID of the Lookup Table Revision.          | -                                                                     |
| `id`                       | id                    | LookupParameter        |    Yes   | UUID of the Lookup Table Revision Data job. | -                                                                     |
| `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 LookupTableRevisionArchivedData URL

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

Get a URL which you can use to download the data for the specified archived Lookup Table Revision:

* The `contentType` request parameter is required.
* The returned URL is presigned - you can copy it into a browser and the data file is downloaded locally.
* The upload URL is time limited - the `expiry` time is given in the response and the URL is valid for ***one hour***.

### Parameters

| Name                       | Label                 | Type                   | Required | Description                            | Constraints                                                           |
| -------------------------- | --------------------- | ---------------------- | :------: | -------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials           | M3terEntityParameter   |    Yes   | The m3ter credentials to use.          | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `lookupTableId`            | lookupTableId         | LookupParameter        |    Yes   | UUID of the LookupTable                | -                                                                     |
| `lookupTableRevisionId`    | lookupTableRevisionId | LookupParameter        |    Yes   | UUID of the LookupTableRevision        | -                                                                     |
| `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. |

## Copy LookupTableRevisionData

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

Copy the Lookup Table Revision Data from a source Revision to an optional target Revision:

* If you omit a target `revisionId`, then the source Revision and its Data is duplicated. The new Revision is given the source Revision's name appended with "Copy" but is assigned a new unique id.
* If you specify a target `revisionId` to copy the source Revision and its Data to, you must ensure that the target Revision has a Data schema that matches the source Revision's Data schema otherwise you'll receive an error

### Parameters

| Name                       | Label                 | Type                   | Required | Description                                            | Constraints                                                           |
| -------------------------- | --------------------- | ---------------------- | :------: | ------------------------------------------------------ | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials           | M3terEntityParameter   |    Yes   | The m3ter credentials to use.                          | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `lookupTableId`            | lookupTableId         | LookupParameter        |    Yes   | UUID of the Lookup Table.                              | -                                                                     |
| `lookupTableRevisionId`    | lookupTableRevisionId | LookupParameter        |    Yes   | UUID of the source Lookup Table Revision to copy from. | -                                                                     |
| `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. |

## Generate LookupTableRevisionData Upload URL

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

Generate a URL which can be used to upload a data file for creating or updating the Lookup Table Revision's data:

* An upload URL is returned together with an UPLOAD `jobId`.
* You can then upload your data file using a PUT request using the returned upload URL as the endpoint. For the PUT request, map the headers returned and their values and in the request body select the specified CSV or JSONL file containing the Revision Data to upload.
* You can use the returned UPLOAD `jobId` with the [List LookupTableRevisionData Jobs](https://www.m3ter.com/docs/api#tag/LookupTableRevisionData/operation/ListLookupTableRevisionDataJobs) or the [Get LookupTableRevisionData Job Response](https://www.m3ter.com/docs/api#tag/LookupTableRevisionData/operation/GetLookupTableRevisionDataJobResponse) endpoints for any follow-up or troubleshooting.

**Important:**

* The `contentLength` request parameter is required.
* The upload URL is time limited - it is valid for ***one minute***.

### Parameters

| Name                       | Label                 | Type                   | Required | Description                            | Constraints                                                           |
| -------------------------- | --------------------- | ---------------------- | :------: | -------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials           | M3terEntityParameter   |    Yes   | The m3ter credentials to use.          | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `lookupTableId`            | lookupTableId         | LookupParameter        |    Yes   | UUID of the Lookup Table.              | -                                                                     |
| `lookupTableRevisionId`    | lookupTableRevisionId | LookupParameter        |    Yes   | UUID of the Lookup Table Revision.     | -                                                                     |
| `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 LookupTable

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

Retrieve a list Lookup Tables created for the Organization:

* Returned list can be filtered by Lookup Table `code` query parameter.
* If you want to include any non-default fields for the returned Lookup Tables, use the additional query parameter to specify which you want to include in the response.

### 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: codes,additional                                       |

### Exits

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

## Create LookupTable

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

Create a new Lookup Table.

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

## List LookupTableRevision

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

List LookupTableRevision entities

### Parameters

| Name                       | Label            | Type                    | Required | Description                                | Constraints                                                           |
| -------------------------- | ---------------- | ----------------------- | :------: | ------------------------------------------ | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials      | M3terEntityParameter    |    Yes   | The m3ter credentials to use.              | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `lookupTableId`            | lookupTableId    | LookupParameter         |    Yes   | The lookup table Id                        | -                                                                     |
| `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. |

## Create LookupTableRevision

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

Create a new Revision for a Lookup Table.

Fields and Keys for Revision schema: Use the `fields` parameter to define a Revision schema containing up to 10 number or string fields. Use the `keys` parameter to specify which are the key fields:

* At least one field must be a non-key field and at least one a key field.
* Up to 5 key fields can be defined.
* Using multiple key fields: ensure that the order in which they are defined matches the order in which you want to use them in any Lookup functions that reference the Revision's Lookup Table, because this is the order in which they will be passed into the function. The order of non-key fields is not constrained in this way.

Revision status: when you first create a Lookup Table Revision it has DRAFT status. Use the [Update LookupTableRevision Status](https://docs.m3ter.com/api/lookuptablerevision/update-lookuptablerevision-status) call to change a Revision's status.

### Parameters

| Name                       | Label         | Type                   | Required | Description                                                | Constraints                                                           |
| -------------------------- | ------------- | ---------------------- | :------: | ---------------------------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials   | M3terEntityParameter   |    Yes   | The m3ter credentials to use.                              | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `lookupTableId`            | lookupTableId | LookupParameter        |    Yes   | UUID of the Lookup Table the Revision will be created for. | -                                                                     |
| `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. |

## Get LookupTableRevisionData

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

List Lookup Table Revision Data items for 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 |
| `lookupTableId`            | lookupTableId         | LookupParameter         |    Yes   | UUID of the Lookup Table.                  | -                                                                     |
| `lookupTableRevisionId`    | lookupTableRevisionId | LookupParameter         |    Yes   | UUID of the Lookup Table Revision.         | -                                                                     |
| `statePath`                | State Path            | StateVariableParameter  |    No    | State variable to store the response.      | -                                                                     |
| `queryParams`              | Query Parameters      | KeyValueLookupParameter |    No    | Query parameters to include in the request | allowedValues: limit,additional                                       |

### Exits

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

## Upsert LookupTableRevisionData

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

Create/update the Lookup Table Revision Data for 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 |
| `lookupTableId`            | lookupTableId         | LookupParameter         |    Yes   | UUID of the Lookup Table.                  | -                                                                     |
| `lookupTableRevisionId`    | lookupTableRevisionId | LookupParameter         |    Yes   | UUID of the Lookup Table Revision.         | -                                                                     |
| `requestPath`              | Request Path          | StateVariableParameter  |    Yes   | State variable containing the 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: additional                                             |

### Exits

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

## Delete LookupTableRevisionData

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

Delete the Lookup Table Revision Data for 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 |
| `lookupTableId`            | lookupTableId         | LookupParameter        |    Yes   | UUID of the Lookup Table.             | -                                                                     |
| `lookupTableRevisionId`    | lookupTableRevisionId | LookupParameter        |    Yes   | UUID of the Lookup Table Revision.    | -                                                                     |
| `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 LookupTableRevision Status

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

Update the status of a Lookup Table Revision for 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 Lookup Table Revision to update the status for. | -                                                                     |
| `lookupTableId`            | lookupTableId | LookupParameter        |    Yes   | UUID of the Lookup Table the Revision belongs to.               | -                                                                     |
| `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. |
