# Get accumulator configuration Gets the accumulator configuration You can get accumulator configuration IDs with the [List accumulator configuration](ref:get-config-accumulators) endpoint. # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "Core platform - Accumulator", "version": "1.0.0", "description": "API to accumulate transaction amounts for fee collection.", "contact": { "name": "API Support", "url": "https://developers.pismo.io/support/" }, "license": { "name": "Copyright Pismo" } }, "servers": [ { "url": "https://sandbox.pismolabs.io/accumulator", "description": "Sandbox API server for testing" } ], "security": [ { "BearerAuth": [] } ], "tags": [ { "name": "Configuration", "description": "Accumulator configuration endpoints" } ], "components": { "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "description": "Account access token. Tokens can expire quickly, which can result in an \"401 Unauthorized\" error.", "bearerFormat": "JWT" } }, "parameters": { "AccumulatorConfigID": { "in": "path", "name": "accumulatorConfigId", "required": true, "description": "Accumulator ID", "schema": { "type": "string", "example": "x88900-0009xx" } }, "CidHeader": { "in": "header", "name": "x-cid", "description": "The Correlation IDentifier field is used to link related API requests and events. The CID can help the Pismo engineering team track everything related to a call. If not passed, a random one is generated. You can find the CID in the reponse header.\n", "schema": { "type": "string", "example": "c737895c-8159-4c0c-a92a-a4f8600bff37" } }, "TenantHeader": { "in": "header", "name": "x-tenant", "description": "Organization/tenant ID", "schema": { "type": "string", "example": "TN-beaecb37-d149-4674-a485-af0d11e40d85" } } }, "schemas": { "AcctID": { "description": "Pismo account ID", "type": "number", "format": "int64", "example": 8675309 }, "AccumulatorConfig": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "example": "3e6b3f44-1d1a-413c-8243-644618f53037" } } }, { "$ref": "#/components/schemas/NewAccumulatorConfig" } ] }, "Conditions": { "type": "object", "properties": { "processing_code": { "$ref": "#/components/schemas/ListCondition" } } }, "ErrorModel": { "type": "object", "properties": { "code": { "type": "string", "description": "Code the error internal", "example": "EACM9999" }, "message": { "type": "string", "description": "Message that describes the error.", "example": "An Internal Server Error found, please contact the administrator" } } }, "Identifier": { "type": "string", "description": "Client-assigned accumulator configuration identifier for client tracking purposes. This identifier is used to create an accumulator fee model.\n", "example": "total_cashout_config" }, "IncreaseType": { "type": "string", "description": "Type of increase the accumulator will use for accumulating.\n`principal_amount` - The transaction amount without fees is accumulated.\n`contract_amount` - The transaction amount including fees is accumulated.\n", "enum": [ "principal_amount", "contract_amount" ], "example": "principal_amount" }, "Level": { "type": "string", "description": "Configuration level - org/tenant or account", "enum": [ "tenant", "account" ], "example": "account" }, "ListCondition": { "type": "object", "description": "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.\n", "properties": { "include": { "type": "array", "description": "Include these transaction types for accumulation", "items": { "type": "string", "minLength": 2, "maxLength": 6, "pattern": "^[a-zA-Z0-9]+$" }, "example": [ "00", "01" ] }, "exclude": { "type": "array", "description": "Exclude these transaction types for accumulation", "items": { "type": "string", "minLength": 2, "maxLength": 6, "pattern": "^[a-zA-Z0-9]+$" }, "example": [ "99", "90" ] } } }, "MonthDay": { "type": "number", "description": "Month day to reset. Can only be used when `window` is monthly.", "minimum": 1, "maximum": 28, "format": "int32", "example": 1 }, "NewAccumulatorConfig": { "type": "object", "required": [ "level", "identifier", "conditions", "increase_type" ], "properties": { "level": { "$ref": "#/components/schemas/Level" }, "account_id": { "$ref": "#/components/schemas/AcctID" }, "identifier": { "$ref": "#/components/schemas/Identifier" }, "conditions": { "$ref": "#/components/schemas/Conditions" }, "increase_type": { "$ref": "#/components/schemas/IncreaseType" }, "reset_strategy": { "$ref": "#/components/schemas/ResetStrategy" } } }, "ResetStrategy": { "type": "object", "description": "Configure when accumulator totals are reset to zero.", "properties": { "time_window": { "$ref": "#/components/schemas/TimeWindow" } } }, "TimeWindow": { "type": "object", "required": [ "window" ], "properties": { "timezone": { "$ref": "#/components/schemas/Timezone" }, "window": { "$ref": "#/components/schemas/Window" }, "month_day": { "$ref": "#/components/schemas/MonthDay" } } }, "Timezone": { "type": "string", "description": "The IANA Time Zone database, such as \"America/New_York\". \nThis attribute will be used to evaluate the desired time zone for the time reset window.\nIf `time_zone` is not passed, the default is current UTC time zone.\n", "example": "America/Sao_Paulo", "default": "UTC" }, "Window": { "type": "string", "description": "Window duration for the accumulator reset.", "example": "daily", "enum": [ "daily", "weekly", "monthly", "lifetime", "once" ] } }, "examples": { "accumulatorConfigNotFoundError": { "value": { "code": "EACM0003", "message": "Configuration not found" } } } }, "paths": { "/v1/accumulator-configs/{accumulatorConfigId}": { "get": { "summary": "Get accumulator configuration", "description": "Gets the accumulator configuration\n\nYou can get accumulator configuration IDs with the [List accumulator configuration](https://developers.pismo.io/pismo-docs/reference/get-config-accumulators) endpoint.\n", "operationId": "get-v1-accumulator-config", "tags": [ "Configuration" ], "parameters": [ { "$ref": "#/components/parameters/AccumulatorConfigID" }, { "$ref": "#/components/parameters/TenantHeader" }, { "$ref": "#/components/parameters/CidHeader" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccumulatorConfig" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorModel" }, "examples": { "accumulatorConfigNotFoundError": { "$ref": "#/components/examples/accumulatorConfigNotFoundError" } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } } } } } } } } ```