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

# Counteradjustments

## List CounterAdjustments

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

Retrieve a list of CounterAdjustments created for Accounts in your Organization. You can filter the list returned by date, Account ID, or Counter ID.

**CONSTRAINTS:**

* The `counterId` query parameter is always required when calling this endpoint, used either as a single query parameter or in combination with any of the other query parameters.
* If you want to use the `date`, `dateStart`, or `dateEnd` query parameters, you must also use the `accountId` query parameter.

### 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: counterId,accountId,date,endDateStart,endDateEnd,sortOrder,dateStart,dateEnd |

### Exits

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

## Create CounterAdjustment

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

Create a new CounterAdjustment for an Account using a Counter.

**Notes:**

* Use the new absolute value for the Counter for the selected date - if it was 15 and has increased to 20, enter 20; if it was 15 and has decreased to 10, enter 10. *Do not enter* the plus or minus value relative to the previous Counter value on the Account.
* CounterAdjustments on Accounts are supported down to a *specific day* of granularity - you cannot create more than one CounterAdjustment for any given day using the same Counter and you'll receive an error if you try to do this.

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

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

Retrieve a CounterAdjustment 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 CounterAdjustment 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 CounterAdjustment

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

Update a CounterAdjustment for an Account.

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

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

Delete a CounterAdjustment 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 CounterAdjustment 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. |
