---
title: "Create accumulator configuration"
method: POST
path: "/v1/accumulator-configs"
tags: ["Configuration"]
---

# Create accumulator configuration

`POST /v1/accumulator-configs`

## Request

- Base URL: `https://sandbox.pismolabs.io/accumulator`
- URL: `https://sandbox.pismolabs.io/accumulator/v1/accumulator-configs`
- Auth: HTTP bearer

Creates a new accumulator configuration, which keeps running totals for specified transaction types. Fees are applied to these totals based on an associated fee model.

After you create an accumulator configuration, you need to:   

1. <a href='https://developers.pismo.io/pismo-docs/reference/postmodel' target="_blank">Create a fee model</a> referencing the accumulator configuration. 
2. Attach the fee model to a <a href='https://developers.pismo.io/pismo-docs/reference/attachmentbyprogram' target="_blank">program<a> or <a href='https://developers.pismo.io/pismo-docs/reference/attachmentbyaccount' target="_blank">account<a>.

## Headers

- `x-tenant` string
- `x-cid` string

## Request body

- NewAccumulatorConfig
  - `level` 'tenant' | 'account', required: Configuration level - org/tenant or account
  - `account_id` number: Pismo account ID
  - `identifier` string, required: Client-assigned accumulator configuration identifier for client tracking purposes. This identifier is used to <a href="https://developers.pismo.io/pismo-docs/reference/postmodel" target="_blank">create an accumulator fee model</a>.
  - `conditions` Conditions, required
    - `processing_code` ListCondition: Add processing codes representing transaction types to either include or exclude - enter one or the other, but not both. If processing codes are "include"d, then only those transactionss of those type(s) are accumulated. If processing codes are "excluded"d, then only non-excluded types are accumulated.
      - `include` string[]: Include these transaction types for accumulation
      - `exclude` string[]: Exclude these transaction types for accumulation
  - `increase_type` 'principal_amount' | 'contract_amount', required: Type of increase the accumulator will use for accumulating. `principal_amount` - The transaction amount without fees is accumulated. `contract_amount` - The transaction amount including fees is accumulated.
  - `reset_strategy` ResetStrategy: Configure when accumulator totals are reset to zero.
    - `time_window` TimeWindow
      - `timezone` string: The <a href='https://en.wikipedia.org/wiki/List_of_tz_database_time_zones' target='_blank'>IANA Time Zone database</a>, such as "America/New_York". This attribute will be used to evaluate the desired time zone for the time reset window. If `time_zone` is not passed, the default is current UTC time zone.
      - `window` 'daily' | 'weekly' | 'monthly' | 'lifetime' | 'once', required: Window duration for the accumulator reset.
      - `month_day` number: Month day to reset. Can only be used when `window` is monthly.

## Response `201`

Created

- AccumulatorConfig
  - `id` string
  - `level` 'tenant' | 'account', required: Configuration level - org/tenant or account
  - `account_id` number: Pismo account ID
  - `identifier` string, required: Client-assigned accumulator configuration identifier for client tracking purposes. This identifier is used to <a href="https://developers.pismo.io/pismo-docs/reference/postmodel" target="_blank">create an accumulator fee model</a>.
  - `conditions` Conditions, required
    - `processing_code` ListCondition: Add processing codes representing transaction types to either include or exclude - enter one or the other, but not both. If processing codes are "include"d, then only those transactionss of those type(s) are accumulated. If processing codes are "excluded"d, then only non-excluded types are accumulated.
      - `include` string[]: Include these transaction types for accumulation
      - `exclude` string[]: Exclude these transaction types for accumulation
  - `increase_type` 'principal_amount' | 'contract_amount', required: Type of increase the accumulator will use for accumulating. `principal_amount` - The transaction amount without fees is accumulated. `contract_amount` - The transaction amount including fees is accumulated.
  - `reset_strategy` ResetStrategy: Configure when accumulator totals are reset to zero.
    - `time_window` TimeWindow
      - `timezone` string: The <a href='https://en.wikipedia.org/wiki/List_of_tz_database_time_zones' target='_blank'>IANA Time Zone database</a>, such as "America/New_York". This attribute will be used to evaluate the desired time zone for the time reset window. If `time_zone` is not passed, the default is current UTC time zone.
      - `window` 'daily' | 'weekly' | 'monthly' | 'lifetime' | 'once', required: Window duration for the accumulator reset.
      - `month_day` number: Month day to reset. Can only be used when `window` is monthly.

## Other responses

- `400`: Bad request
- `409`: Conflict
- `500`: Internal server error

---

[API](https://skmtc.dev/pismo/apis/core-platform-accumulator.md) - [All operations](https://skmtc.dev/pismo/apis/core-platform-accumulator/llms.txt) - [OpenAPI document](https://skmtc.dev/pismo/apis/core-platform-accumulator/revisions/0efe44c49338?raw)
