# List Org interest plans List all interest plans for a given Org. # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "Banking - Interest engine", "version": "1.0.0", "description": "API to handle interest-bearing account operations", "termsOfService": "https://developers.pismo.io/terms/", "contact": { "name": "API Support", "url": "https://developers.pismolabs.io/pismo-docs/docs/support" }, "license": { "name": "Copyright Pismo" } }, "servers": [ { "url": "https://sandbox.pismolabs.io/interest-engine", "description": "Sandbox API server for testing" }, { "url": "https://sandbox.pismolabs.io/passport/v2/s2s/access-token", "description": "Sandbox API for oauth2" } ], "tags": [ { "name": "Interest engine", "description": "Manage interest plans" } ], "components": { "parameters": { "Authorization": { "name": "authorization", "in": "header", "description": "Authorization", "required": true, "example": "Bearer YOUR_BEARER_TOKEN", "schema": { "type": "string" } }, "PageNumber": { "name": "page", "in": "query", "required": true, "description": "Page number. Default is `1`.", "example": 1, "schema": { "type": "integer", "format": "int32" } }, "PerPage": { "name": "perPage", "in": "query", "required": true, "description": "Number of items per page. Default is `10`.", "example": 10, "schema": { "type": "integer", "format": "int32" } } }, "schemas": { "AccrualBasis": { "type": "string", "description": "Method used to calculate interest accrual.\n * `BD/252`: Calculates daily interest using a 252-day year and the actual number of business days in each time period.\n * `ACTUAL/360`: Calculates daily interest using a 360-day year and the actual number of days in each time period.\n * `ACTUAL/365`: Calculates daily interest using a 365-day year and the actual number of days in each time period.\n * `ACTUAL/ACTUAL`: Calculates daily interest using the actual number of days in the year (which in the leap year is 366) and the actual number of days in each time period.\n", "enum": [ "BD/252", "ACTUAL/360", "ACTUAL/365", "ACTUAL/ACTUAL" ], "example": "ACTUAL/365" }, "AccrualFrequency": { "type": "string", "description": "Interest accrual frequency", "enum": [ "DAILY", "MONTHLY", "QUARTERLY", "HALF_YEARLY", "YEARLY", "MATURITY" ], "example": "DAILY" }, "Amount": { "type": "number", "format": "double", "description": "Amount in the `interest_by_tier`", "example": 1000 }, "Benchmark": { "type": "string", "description": "Market index used to measure interest value over time. For fixed interest, this field must be null.\n - `BOE`: Bank of England, UK\n - `DI`: Interbank Deposit Contract, Brazil\n - `FED`: Federal Reserve System, USA\n - `RBA`: Reserve Bank of Australia\n - `RBI`: Reserve Bank of India\n - `TO`: Overnight Interbank Target Rate (Tasa Objetivo), Mexico\n", "enum": [ "BOE", "DI", "FED", "RBA", "RBI", "TO" ], "example": "FED" }, "CapEffectiveRate": { "type": "number", "format": "double", "description": "Cap effective rate. If you provide a value for `cap_effective_rate`, you must also provide a value for `cap_threshold`.", "example": 1.2 }, "CapitalizationFrequency": { "type": "string", "description": "Interest payout frequency", "enum": [ "DAILY", "MONTHLY", "QUARTERLY", "HALF_YEARLY", "YEARLY", "MATURITY" ], "example": "DAILY" }, "CapThreshold": { "type": "number", "format": "double", "description": "Cap threshold value. If you provide a value for `cap_threshold`, you must also provide a value for `cap_effective_rate`.", "example": 1.1 }, "CurrentPage": { "type": "integer", "format": "int32", "description": "Current page", "example": 1 }, "CurrencyCode": { "type": "string", "format": "number", "description": "Numeric currency code in ISO 4217 standard", "example": "986" }, "Days": { "type": "integer", "format": "int32", "description": "Number of days in `interest_by_tier`", "example": 30 }, "Description": { "type": "string", "description": "Interest plan name", "example": "Banking plan" }, "DivisionId": { "type": "string", "description": "Division ID attached to the interest plan for accrual by division", "example": "d9b2c9e1-4633-4a10-841b-270f7f1493cd" }, "FeeProcessingCode": { "type": "string", "format": "number", "description": "Processing code configured in the [fee model](https://developers.pismo.io/pismo-docs/docs/fee-model) for charging a tax, penalty, or fee.", "example": "001100" }, "FixedInterestRate": { "type": "number", "format": "float", "description": "Fixed annual interest rate for investments or deposits. If a `benchmark` value is provided, this field must be null.", "example": 0.1 }, "FloorEffectiveRate": { "type": "number", "format": "double", "description": "Floor effective rate", "example": 2.2 }, "FloorThreshold": { "type": "number", "format": "double", "description": "Floor threshold value", "example": 2.1 }, "InterestByTiers": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/InterestByTiersType" }, "tier_calculation": { "$ref": "#/components/schemas/TierCalculation" }, "tiers": { "type": "array", "items": { "$ref": "#/components/schemas/InterestByTiersArrayObject" } } }, "required": [ "type", "tier_calculation", "tiers" ], "description": "Interest by tiers configuration", "example": { "type": "TERM", "tier_calculation": "RETROACTIVE", "tiers": [ { "days": 30, "amount": 1000, "margin_rate": 1, "fixed_interest_rate": 1.2 }, { "days": 60, "amount": 2000, "margin_rate": 1, "fixed_interest_rate": 1.3 } ] } }, "InterestByTiersArrayObject": { "type": "object", "properties": { "days": { "$ref": "#/components/schemas/Days" }, "amount": { "$ref": "#/components/schemas/Amount" }, "margin_rate": { "$ref": "#/components/schemas/MarginRate" }, "fixed_interest_rate": { "$ref": "#/components/schemas/FixedInterestRate" } }, "description": "Tier details for interest calculation" }, "InterestByTiersType": { "type": "string", "description": "Interest type\n- `TERM`: Interest rate varies according to the period of time since the deposit was made.\n- `AMOUNT`: Interest rate varies according to the current balance.\n", "enum": [ "TERM", "AMOUNT" ], "example": "TERM" }, "InterestPlanId": { "type": "string", "format": "UUID", "description": "Interest plan ID generated during the plan's creation. Must be an alphanumeric UUID with the alphabetical characters in lowercase.", "example": "07d84f79-3027-47bd-b628-65528ccc8fb2" }, "InterestPlansResponse": { "type": "object", "properties": { "current_page": { "$ref": "#/components/schemas/CurrentPage" }, "per_page": { "$ref": "#/components/schemas/PerPage" }, "pages": { "$ref": "#/components/schemas/Pages" }, "total_items": { "$ref": "#/components/schemas/TotalItems" }, "items": { "type": "array", "items": { "type": "object", "properties": { "interest_plan_id": { "$ref": "#/components/schemas/InterestPlanId" }, "org_id": { "$ref": "#/components/schemas/OrgId" }, "description": { "$ref": "#/components/schemas/Description" }, "currency_code": { "$ref": "#/components/schemas/CurrencyCode" }, "benchmark": { "$ref": "#/components/schemas/Benchmark" }, "fixed_interest_rate": { "$ref": "#/components/schemas/FixedInterestRate" }, "margin_rate": { "$ref": "#/components/schemas/MarginRate" }, "margin": { "$ref": "#/components/schemas/Margin" }, "fee_processing_code": { "$ref": "#/components/schemas/FeeProcessingCode" }, "accrual_basis": { "$ref": "#/components/schemas/AccrualBasis" }, "interest_type": { "$ref": "#/components/schemas/InterestType" }, "capitalization_frequency": { "$ref": "#/components/schemas/CapitalizationFrequency" }, "accrual_frequency": { "$ref": "#/components/schemas/AccrualFrequency" }, "status": { "$ref": "#/components/schemas/Status" }, "operation_type": { "$ref": "#/components/schemas/OperationType" }, "start_date": { "$ref": "#/components/schemas/StartDate" }, "interest_by_tiers": { "$ref": "#/components/schemas/InterestByTiers" }, "interest_thresholds": { "$ref": "#/components/schemas/InterestThresholds" }, "division_id": { "$ref": "#/components/schemas/DivisionId" } } } } } }, "InterestThresholds": { "type": "object", "properties": { "cap_threshold": { "$ref": "#/components/schemas/CapThreshold" }, "cap_effective_rate": { "$ref": "#/components/schemas/CapEffectiveRate" }, "floor_threshold": { "$ref": "#/components/schemas/FloorThreshold" }, "floor_effective_rate": { "$ref": "#/components/schemas/FloorEffectiveRate" } }, "description": "Cap and floor thresholds for the interest plan", "example": { "interest_thresholds": { "cap_threshold": 1.1, "cap_effective_rate": 1.2, "floor_threshold": 2.2, "floor_effective_rate": 2.1 } } }, "InterestType": { "type": "string", "description": "Interest calculation type\n- `SIMPLE`: Calculated on the original deposit or investment value.\n- `COMPOUND`: Calculated on the original value plus the last accumulated interest.\n", "enum": [ "SIMPLE", "COMPOUND" ], "example": "SIMPLE" }, "Margin": { "type": "number", "format": "double", "description": "Also known as a spread, this is an incremental rate the clients receive on investments or deposits. \nIf a `benchmark` value is provided, this field is optional.\nIf `benchmark` is null, this field must be null also.\n", "example": 0.02 }, "MarginRate": { "type": "number", "format": "double", "description": "Rate linked to the benchmark rate. For example, for 110% FED, margin rate is 110%. If a `benchmark` value is not provided, this field must be null.", "example": 1.1 }, "OperationType": { "type": "string", "description": "Operation type.\n- `DEBIT`: Interest plan for debit type operations\n- `CREDIT`: Interest plan for credit type operations\n", "enum": [ "DEBIT", "CREDIT" ], "example": "DEBIT" }, "OrgId": { "type": "string", "description": "Organization ID generated in the onboarding process", "example": "TN-cc8f8b89-233a-4582-9f36-63ee85278d6d" }, "Pages": { "type": "integer", "format": "Int32", "description": "Total number of pages. Default is `1`.", "example": 1 }, "PerPage": { "type": "integer", "description": "Number of items per page. Default is `10`.", "format": "Int32", "example": 1 }, "StartDate": { "type": "string", "format": "date", "description": "Date to start applying the benchmark rate in the accrual process. Format = YYYY-MM-DD.", "example": "2024-09-10" }, "Status": { "type": "string", "description": "Interest plan status. Must be set to `ACTIVE`.", "enum": [ "ACTIVE" ], "example": "ACTIVE" }, "TierCalculation": { "type": "string", "description": "Tier calculation method\n- `RETROACTIVE`: Interest is recalculated from the beginning based on the new applicable rate.\n- `NON-RETROACTIVE`: Interest is calculated progressively based on each layer rate.\n", "enum": [ "RETROACTIVE", "NON-RETROACTIVE" ], "example": "RETROACTIVE" }, "TotalItems": { "type": "integer", "format": "int32", "description": "Total number of items", "example": 1 } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } }, "responses": { "400BadRequest": { "description": "Bad request" }, "401Unauthorized": { "description": "Unauthorized" }, "404NotFound": { "description": "Not found" }, "500InternalServerError": { "description": "Internal server error" } } }, "security": [ { "BearerAuth": [] } ], "paths": { "/v1/interest/plan": { "get": { "summary": "List Org interest plans", "description": "List all interest plans for a given Org.", "tags": [ "Interest engine" ], "operationId": "get-v1-interest-plans", "parameters": [ { "$ref": "#/components/parameters/Authorization" }, { "$ref": "#/components/parameters/PageNumber" }, { "$ref": "#/components/parameters/PerPage" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InterestPlansResponse" } } } }, "400": { "$ref": "#/components/responses/400BadRequest" }, "401": { "$ref": "#/components/responses/401Unauthorized" }, "404": { "$ref": "#/components/responses/404NotFound" }, "500": { "$ref": "#/components/responses/500InternalServerError" } } } } } } ```