{
  "openapi": "3.1.0",
  "info": {
    "title": "NumCore APIs",
    "version": "v1",
    "description": "# Getting started\n\nConnect your bank's apps, USSD, agents and partners to customers, accounts, investments and loans in NumCore.\n\n1. **Create an API client** in the console: **Administration › API clients**. Copy the secret; it is shown once.\n2. **Get a token** with the client id and secret ([Authentication](#section/Authentication)).\n3. **Call the API** with the token and your bank code in `X-NumCore-Tenant`. Every call needs both.\n\n```bash\ncurl https://api.numcore.io/v1/customers?limit=5 \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\"\n```\n\nBuild and test against your **sandbox** first. Nothing in it is real money.\n\n## Environments\n\n| | Bank code | Sign-in realm |\n|---|---|---|\n| Sandbox | `yourbank-sandbox` | `https://auth.numcore.io/realms/yourbank-sandbox` |\n| Live | `yourbank` | `https://auth.numcore.io/realms/yourbank` |\n\nBoth use `https://api.numcore.io`. Sandbox and live are fully separate, including API clients: create a new one when\nyou go live.\n\n# Authentication\n\nExchange the API client's id and secret for a token (OAuth 2.0 client credentials):\n\n```bash\ncurl https://auth.numcore.io/realms/yourbank-sandbox/protocol/openid-connect/token \\\n  -d grant_type=client_credentials \\\n  -d client_id=$CLIENT_ID \\\n  -d client_secret=$CLIENT_SECRET\n```\n\n```json\n{ \"access_token\": \"eyJhbGciOi...\", \"expires_in\": 300, \"token_type\": \"Bearer\" }\n```\n\nSend it on every call as `Authorization: Bearer <access_token>`.\n\n- A token lasts **5 minutes**. Reuse it until shortly before it expires.\n- A sandbox token doesn't work on live, and the other way round.\n- Keep the secret on your servers, never in an app or web page.\n\n## Mutual TLS (recommended for live)\n\nRegister your system's TLS client certificate on the API client (**Administration › API clients › Certificate** in the\nconsole). From then on every call must come over mutual TLS with that certificate, so a leaked secret or token is no\nuse without the certificate's private key.\n\n```bash\ncurl https://api.numcore.io/v1/customers \\\n  --cert bridge.crt --key bridge.key \\\n  -H \"Authorization: Bearer $TOKEN\" -H \"X-NumCore-Tenant: yourbank\"\n```\n\n- Send only the certificate (PEM). The private key never leaves your servers.\n- Without the certificate a call answers `401 client_certificate_required`; with another one, `401 client_certificate_mismatch`.\n- Renewing: one certificate is registered at a time, and the old one stops working as soon as the new one is\n  registered. Switch your system over at the same moment, in a quiet period.\n- A self-signed certificate is fine: NumCore matches the exact certificate (its SHA-256 fingerprint), not who issued it.\n\n## Managing API clients\n\n| In the console | Effect |\n|---|---|\n| Replace secret | The old secret stops working at once. |\n| Disable | Its tokens stop working at once. |\n| Delete | Removed; its history stays in the audit trail. |\n| Certificate | Every call must come with that TLS client certificate. |\n\nA client has roles like a staff member. A call needs the **permission** (from its roles) and the **API product**\n(from your licence).\n\n## API products\n\nYour licence sets which products you can call; each operation shows its product. Others answer\n`403 api_not_licensed`. Sandboxes can call every product.\n\n| Product | What it covers |\n|---|---|\n| `customers.create` | Create and activate customers |\n| `customers.read` | Customer details |\n| `customers.kyc` | KYC tiers, address verification, identifiers, documents, next of kin |\n| `accounts.open` | Open, approve and activate savings and current accounts |\n| `accounts.balances` | Savings and current accounts with their balances |\n| `accounts.statements` | Account transactions |\n| `accounts.deposits-withdrawals` | Post deposits and withdrawals |\n| `accounts.transfers` | Transfer between accounts in the bank |\n| `investments.create` | Open, approve, activate and top up fixed and recurring deposits |\n| `investments.read` | Fixed and recurring deposits with their transactions |\n| `loans.read` | Loans with their schedules and transactions |\n| `loans.repayments` | Take loan repayments |\n| `events.read` | The event feed: every event in order |\n\nTo add a product, contact NumCore.\n\n# Making requests\n\n## Money\n\nAmounts are **strings** with an ISO 4217 currency: `{ \"amount\": \"1500.00\", \"currency\": \"NGN\" }`. Use a decimal type;\nfloating point loses kobo.\n\n## Dates\n\nISO 8601: `2026-11-10`, `2026-11-10T14:00:00Z`. Business dates are in the bank's time zone.\n\n## Safe retries\n\nEvery request that moves money needs `clientRef`: your own reference, up to 50 characters (e.g. `USSD-55120` or a\nNIP session ID).\n\n- Retry with the **same `clientRef` and body** after a timeout: you get the original result; the money moves once.\n  A retry sent while the first try is still running waits for it, then gets its result.\n- The same `clientRef` with a **different body** answers `409 client_ref_reused`.\n- References are per API client, so they never clash with another channel's.\n\n```bash\ncurl -X POST https://api.numcore.io/v1/savings-accounts/42/deposits \\\n  -H \"Authorization: Bearer $TOKEN\" -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ \"amount\": \"5000.00\", \"description\": \"Cash deposit\", \"clientRef\": \"USSD-55120\" }'\n```\n\n\n## Lists\n\nLists are paged with a cursor:\n\n```\nGET /v1/customers?limit=50\n→ { \"items\": [ ... ], \"nextCursor\": \"eyJpZCI6NTB9\" }\n\nGET /v1/customers?limit=50&cursor=eyJpZCI6NTB9\n```\n\n`limit` is 1 to 200 (default 50). When `nextCursor` is `null` there are no more pages.\n\n## Errors\n\nErrors are [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem details. Act on `code`, not the wording.\n\n```json\n{\n  \"status\": 422,\n  \"title\": \"Insufficient funds\",\n  \"detail\": \"The account has 3,200.00 available; the withdrawal is 5,000.00.\",\n  \"code\": \"insufficient_funds\",\n  \"traceId\": \"00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01\"\n}\n```\n\n| Status | Common codes | What to do |\n|---|---|---|\n| 400 | `validation_failed`, `client_ref_required`, `https_required` | Fix the fields listed in `errors`. Always call over HTTPS. |\n| 401 | `unauthenticated` | Get a new token. |\n| 401 | `client_certificate_required`, `client_certificate_mismatch` | Connect with the client certificate registered for these credentials. |\n| 403 | `forbidden`, `api_not_licensed` | The client's roles or your licence don't allow it. |\n| 404 | `customer_not_found`, `savings_account_not_found`, ... | Check the id. |\n| 409 | `client_ref_reused`, `account_not_active` | Use a new `clientRef`, or check the account. |\n| 409 | `client_ref_in_progress` | Rare: the first try was still running. Send the same request again after `Retry-After` seconds to get its result. |\n| 422 | `insufficient_funds`, ... | A business rule refused it. Show `detail` to staff. |\n| 429 | `rate_limited` | Slow down and retry after `Retry-After` seconds. |\n| 5xx | `internal_error` | Retry later. Quote `traceId` to support. |\n\nOperations list only their own codes; the ones above can come from any call.\n\n## Approvals\n\nIf your bank requires approval for an action, the call answers **202** and runs once a checker approves it.\n\n# Walkthroughs\n\nEach request sends the token and `X-NumCore-Tenant`. Get `officeId` and `productId` values from your bank's console.\n\n## Onboard a customer\n\nProducts: `customers.create`, `customers.kyc`.\n\n**1. Create and activate the customer** in one call:\n\n```http\nPOST /v1/customers\n{\n  \"legalForm\": \"person\",\n  \"officeId\": 1,\n  \"firstName\": \"Amaka\",\n  \"lastName\": \"Okafor\",\n  \"dateOfBirth\": \"1994-03-18\",\n  \"gender\": \"female\",\n  \"mobileNumber\": \"08031234567\",\n  \"email\": \"amaka@example.ng\",\n  \"bvn\": \"22212345678\",\n  \"activate\": true,\n  \"activatedOn\": \"2026-11-10\"\n}\n```\n\n`201` returns the customer's `id` and `customerNumber`.\n\nIf the customer looks like one the bank already has (the same name and date of birth, or the same email), `409\npossible_duplicate_customer` lists up to five matches in `duplicates`. Check them; if this really is someone else,\nsend the request again with `\"allowPossibleDuplicate\": true`. A bank can turn this check off, or make it refuse\noutright with `duplicate_customer`.\n\n**2. Record the BVN check** after verifying it with NIBSS:\n\n```http\nPOST /v1/customers/{id}/identifier-verifications\n{ \"type\": \"bvn\", \"verifiedOn\": \"2026-11-10\" }\n```\n\n**3. Check the KYC tier:**\n\n```http\nGET /v1/customers/{id}/kyc\n```\n\n## Open an account and make a deposit\n\nProducts: `accounts.open`, `accounts.deposits-withdrawals`, `accounts.balances`.\n\n**1. Submit, approve and activate** the account:\n\n```http\nPOST /v1/savings-accounts\n{ \"productId\": 3, \"customerId\": 1024 }\n\nPOST /v1/savings-accounts/{id}/approval\n{ \"approvedOn\": \"2026-11-10\" }\n\nPOST /v1/savings-accounts/{id}/activation\n{ \"activatedOn\": \"2026-11-10\" }\n```\n\n**2. Deposit**, with a new `clientRef`:\n\n```http\nPOST /v1/savings-accounts/{id}/deposits\n{\n  \"amount\": \"25000.00\",\n  \"description\": \"Opening deposit\",\n  \"clientRef\": \"APP-778812\"\n}\n```\n\n**3. Read the balance:**\n\n```http\nGET /v1/savings-accounts/{id}\n```\n\n## Transfer between two customers\n\nProduct: `accounts.transfers`.\n\n```http\nPOST /v1/savings-accounts/{fromId}/transfers\n{\n  \"toAccountId\": 2051,\n  \"amount\": \"10000.00\",\n  \"description\": \"Rent\",\n  \"clientRef\": \"APP-778813\"\n}\n```\n\nBoth accounts must be in the same currency.\n\n**Product limits**: an account's product may cap one withdrawal or transfer out (`withdrawal_limit_exceeded`), what\nthey come to in a day (`daily_withdrawal_limit_exceeded`), and the balance a credit may reach\n(`maximum_balance_exceeded`). The account's `terms` show its `maximumWithdrawal`, `dailyWithdrawalLimit` and\n`maximumBalance`, and its `interestTiers` when it earns more on larger balances.\n\n**Channels**: when money comes or goes through POS, NIP, a cheque or another outside channel, send the bank's\n`channelId` for it with a deposit, withdrawal, loan repayment or cash loan payout. The bank sets its channels up in the\nconsole and gives you their ids. The money then settles in that channel's own GL account, so the bank can reconcile it\nagainst the scheme's statement. An unknown channel is `transaction_channel_not_found`; one the bank has stopped using is\n`transaction_channel_inactive`.\n\n## Take a loan repayment\n\nProducts: `loans.read`, `loans.repayments`.\n\n**1. See what is due:**\n\n```http\nGET /v1/loans/{id}/schedule\n```\n\n**2. Post the repayment:**\n\n```http\nPOST /v1/loans/{id}/repayments\n{ \"amount\": \"15500.00\", \"clientRef\": \"USSD-55120\" }\n```\n\nIt pays the oldest instalments first.\n\n**To prepay**, so the later instalments get smaller or fewer, preview it and then post it:\n\n```http\nPOST /v1/loans/{id}/prepayments/preview\n{ \"amount\": \"200000.00\", \"effect\": \"reduceTerm\" }\n\nPOST /v1/loans/{id}/prepayments\n{ \"amount\": \"200000.00\", \"effect\": \"reduceTerm\", \"clientRef\": \"APP-88213\" }\n```\n\nIt settles what is due first. The rest pays principal ahead, and the instalments after the next one are recalculated\non the lower balance: `reduceInstallment` keeps their number, `reduceTerm` ends the loan sooner.\n\n**Variable-rate loans** follow a rate index the bank sets up, plus a margin. Apply with `interestRateMargin` instead of\n`interestRatePerPeriod`; the loan's `variableRate` shows the margin, floor and cap. When the index moves, end of day\nrecalculates the instalments from the next period, and `GET /v1/loans/{id}/rate-changes` lists each change.\n\n**Credit lines**: when the bank has approved a limit for the borrower, send its `creditLineId` with the application.\nThe loan is refused if it would take the borrower over the limit, and the loan shows the line it was drawn under.\n\n## Book a fixed deposit\n\nProduct: `investments.create`.\n\n```http\nPOST /v1/fixed-deposit-accounts\n{\n  \"productId\": 7,\n  \"customerId\": 1024,\n  \"depositAmount\": \"500000.00\",\n  \"term\": 90,\n  \"funding\": \"savingsTransfer\",\n  \"linkedSavingsAccountId\": 4410\n}\n```\n\n`term` is in the product's unit (here days). Approve and activate it as for a savings account.\n\n# Webhooks and events\n\nNumCore tells you when money moves and when records change. Add your HTTPS address in the console under\n**Administration › Webhooks**, pick the events, and copy the signing secret.\n\nTransaction alerts:\n\n| Event | When |\n|---|---|\n| `savings.credited` | Money paid into a savings, current or term deposit account |\n| `savings.debited` | Money taken out of one |\n| `loan.disbursed` | A loan paid out |\n| `loan.repaid` | A loan repayment taken |\n| `transaction.reversed` | One of these reversed |\n\nLifecycle events, sent in the same database transaction as the change:\n\n| Events | When |\n|---|---|\n| `customer.created`, `.activated`, `.closed`, `.rejected`, `.withdrawn` | A customer is created or changes status |\n| `savings.created`, `.approved`, `.activated`, `.matured`, `.closed`, `.rejected`, `.withdrawn` | A savings, current, fixed or recurring deposit account is opened or changes status |\n| `loan.created`, `.approved`, `.overpaid`, `.closed`, `.writtenOff`, `.reopened`, `.rejected`, `.withdrawn` | A loan is applied for or changes status (paying it out is `loan.disbursed`) |\n| `approval.requested`, `.approved`, `.rejected`, `.withdrawn`, `.failed` | A change waits for a checker, or is decided |\n| `endOfDay.completed`, `endOfDay.completedWithFailures` | End of day finishes |\n\nA record created straight into a later status, such as a customer created active, sends both events:\n`customer.created`, then `customer.activated`. Lifecycle events carry ids, numbers and statuses, not names or\ncontact details.\n\nEach event is one `POST` ([body](#tag/Webhooks)). Answer `2xx` within 10 seconds or it is retried with a growing wait.\n\n- **Ignore repeats** using `X-NumCore-Event-Id`.\n- **Don't rely on order.** For order, read the event feed.\n- **Verify the signature** before trusting the body.\n\n## When your endpoint is down\n\nAfter 5 failed deliveries in a row (the bank can change this) NumCore pauses your endpoint. While it is paused nothing\nis sent and no delivery uses up its retries. Every 5 minutes, waiting twice as long after each failure up to 6 hours,\none trial delivery is sent. When a trial or a test ping from the console gets a `2xx`, everything waiting is sent.\n\n## The event feed\n\n`GET /v1/events` ([reference](#tag/Events)) lists the same events in a fixed order, for systems that would rather read\nat their own pace. Keep the `position` of the last event you processed and ask for what comes after it:\n\n```bash\ncurl -H \"Authorization: Bearer $TOKEN\" -H \"X-NumCore-Tenant: yourbank\" \\\n  \"https://api.numcore.io/v1/events?after=1840&types=loan.approved,loan.closed&limit=100\"\n```\n\nAsking after a position never skips an event. If `hasMore` is true, ask again at once with `lastPosition`. Events are\nkept for 30 days by default. The feed needs the `events.read` product.\n\n## Verifying the signature\n\n`X-NumCore-Signature` is `v1=` plus the hex HMAC-SHA256 of `{X-NumCore-Timestamp}.{raw body}`, keyed with the signing\nsecret. Refuse timestamps more than five minutes old.\n\n```js\nimport crypto from 'node:crypto';\n\nfunction verify(rawBody, headers, secret) {\n  const timestamp = headers['x-numcore-timestamp'];\n  if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;\n  const expected = 'v1=' + crypto.createHmac('sha256', secret).update(`${timestamp}.${rawBody}`).digest('hex');\n  const given = headers['x-numcore-signature'] ?? '';\n  return given.length === expected.length && crypto.timingSafeEqual(Buffer.from(given), Buffer.from(expected));\n}\n```\n\n```csharp\nstatic bool Verify(string rawBody, string timestamp, string signature, string secret)\n{\n    if (Math.Abs(DateTimeOffset.UtcNow.ToUnixTimeSeconds() - long.Parse(timestamp)) > 300) return false;\n    using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(secret));\n    var expected = \"v1=\" + Convert.ToHexStringLower(hmac.ComputeHash(Encoding.UTF8.GetBytes($\"{timestamp}.{rawBody}\")));\n    return CryptographicOperations.FixedTimeEquals(Encoding.UTF8.GetBytes(signature), Encoding.UTF8.GetBytes(expected));\n}\n```\n\nUse the **raw** body, before JSON parsing. The body has the customer's phone and email: treat it as personal data.\n\n# Versioning\n\nWithin `/v1` we only add operations, optional fields and new values (statuses, events, error codes), so handle\nunknown values. Breaking changes come as `/v2`, announced in advance, with `/v1` kept running.\n\n[Download the OpenAPI file](openapi.json) to generate clients or import into Postman.",
    "x-logo": {
      "url": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMDAgNDQiIHdpZHRoPSIyMDAiIGhlaWdodD0iNDQiPgogIDxjaXJjbGUgY3g9IjE4IiBjeT0iMjIiIHI9IjExIiBmaWxsPSJub25lIiBzdHJva2U9IiMyRjZCRjIiIHN0cm9rZS13aWR0aD0iNS41Ii8+CiAgPGNpcmNsZSBjeD0iMzQiIGN5PSIyMiIgcj0iMTEiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzRCQUU4RiIgc3Ryb2tlLXdpZHRoPSI1LjUiLz4KICA8cGF0aCBkPSJNMjcuOCAyOC4yIEExMSAxMSAwIDAgMSAyMy44IDMyLjIiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzJGNkJGMiIgc3Ryb2tlLXdpZHRoPSI1LjUiLz4KICA8dGV4dCB4PSI1NCIgeT0iMjYiIGZvbnQtZmFtaWx5PSJRdWlja3NhbmQsIEludGVyLCBzeXN0ZW0tdWksIC1hcHBsZS1zeXN0ZW0sIFNlZ29lIFVJLCBzYW5zLXNlcmlmIiBmb250LXNpemU9IjIyIiBmb250LXdlaWdodD0iNzAwIiBsZXR0ZXItc3BhY2luZz0iLTAuNCI+PHRzcGFuIGZpbGw9IiMwQjFCM0YiPm51bTwvdHNwYW4+PHRzcGFuIGZpbGw9IiM0QkFFOEYiPmNvcmU8L3RzcGFuPjwvdGV4dD4KICA8dGV4dCB4PSI1NSIgeT0iMzkiIGZvbnQtZmFtaWx5PSJJbnRlciwgc3lzdGVtLXVpLCAtYXBwbGUtc3lzdGVtLCBTZWdvZSBVSSwgc2Fucy1zZXJpZiIgZm9udC1zaXplPSI4IiBmb250LXdlaWdodD0iNjAwIiBsZXR0ZXItc3BhY2luZz0iMi4yIiBmaWxsPSIjNUI2NzgzIj5ERVZFTE9QRVJTPC90ZXh0Pgo8L3N2Zz4K",
      "altText": "NumCore"
    }
  },
  "servers": [
    {
      "url": "https://api.numcore.io",
      "description": "Sandbox and live (choose with X-NumCore-Bank)"
    }
  ],
  "tags": [
    {
      "name": "Customers"
    },
    {
      "name": "Customer KYC"
    },
    {
      "name": "Customer identifiers"
    },
    {
      "name": "Savings accounts"
    },
    {
      "name": "Savings transactions"
    },
    {
      "name": "Fixed deposit accounts"
    },
    {
      "name": "Recurring deposit accounts"
    },
    {
      "name": "Loans"
    },
    {
      "name": "Loan transactions"
    },
    {
      "name": "Rate indexes"
    },
    {
      "name": "Loan prepayments"
    },
    {
      "name": "Events"
    },
    {
      "name": "Webhooks",
      "description": "What NumCore sends to your notification endpoint. See the Webhooks guide."
    }
  ],
  "x-tagGroups": [
    {
      "name": "Customers",
      "tags": [
        "Customers",
        "Customer KYC",
        "Customer identifiers"
      ]
    },
    {
      "name": "Accounts",
      "tags": [
        "Savings accounts",
        "Savings transactions"
      ]
    },
    {
      "name": "Investments",
      "tags": [
        "Fixed deposit accounts",
        "Recurring deposit accounts"
      ]
    },
    {
      "name": "Loans",
      "tags": [
        "Loans",
        "Loan transactions",
        "Rate indexes",
        "Loan prepayments"
      ]
    },
    {
      "name": "Events",
      "tags": [
        "Events"
      ]
    },
    {
      "name": "Webhooks",
      "tags": [
        "Webhooks"
      ]
    }
  ],
  "paths": {
    "/v1/customers": {
      "get": {
        "x-numcore-api-product": "customers.read",
        "operationId": "listCustomers",
        "summary": "List customers",
        "tags": [
          "Customers"
        ],
        "parameters": [
          {
            "name": "officeId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/CustomerStatus"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Matches the display name, Customer ID or mobile number anywhere, ignoring case.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of customers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Customer"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "description": "API product: `customers.read`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/customers \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      },
      "post": {
        "x-numcore-api-product": "customers.create",
        "operationId": "createCustomer",
        "summary": "Create a customer",
        "description": "A person needs firstName and lastName; a business needs fullName.\n\nAPI product: `customers.create`",
        "tags": [
          "Customers"
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "legalForm",
                  "officeId"
                ],
                "properties": {
                  "legalForm": {
                    "$ref": "#/components/schemas/LegalForm"
                  },
                  "officeId": {
                    "type": "integer",
                    "format": "int64"
                  },
                  "firstName": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Person only; required for a person."
                  },
                  "middleName": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Person only."
                  },
                  "lastName": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Person only; required for a person."
                  },
                  "dateOfBirth": {
                    "type": "string",
                    "format": "date",
                    "description": "Person only."
                  },
                  "gender": {
                    "$ref": "#/components/schemas/Gender"
                  },
                  "fullName": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Entity only; required for an entity."
                  },
                  "incorporationNumber": {
                    "type": "string",
                    "maxLength": 50,
                    "description": "Entity only."
                  },
                  "incorporationDate": {
                    "type": "string",
                    "format": "date",
                    "description": "Entity only."
                  },
                  "externalId": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "mobileNumber": {
                    "type": "string",
                    "pattern": "^(\\s*|[ ().-]*\\+?(?:[ ().-]*[0-9]){7,15}[ ().-]*)$",
                    "description": "Spaces, dashes, dots and brackets are dropped; then an optional + and 7 to 15 digits.",
                    "example": "+2348031234567"
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 200
                  },
                  "submittedOn": {
                    "type": "string",
                    "format": "date",
                    "description": "Defaults to today."
                  },
                  "activate": {
                    "type": "boolean",
                    "description": "Activate immediately; requires activatedOn."
                  },
                  "activatedOn": {
                    "type": "string",
                    "format": "date",
                    "description": "Only with activate true."
                  },
                  "address": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Residential or registered address."
                  },
                  "bvn": {
                    "type": "string",
                    "pattern": "^[0-9]{11}$",
                    "description": "Person only."
                  },
                  "nin": {
                    "type": "string",
                    "pattern": "^[0-9]{11}$",
                    "description": "Person only."
                  },
                  "customFields": {
                    "$ref": "#/components/schemas/CustomFieldValuesInput"
                  },
                  "allowPossibleDuplicate": {
                    "type": "boolean",
                    "description": "Go ahead although the customer looks like one the bank already has."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Queued",
            "description": "Queued for approval."
          },
          "409": {
            "description": "mobile_number_in_use, external_id_in_use, identifier_in_use, possible_duplicate_customer, duplicate_customer",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "Mobile number in use",
                  "detail": "Mobile number in use.",
                  "code": "mobile_number_in_use",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "office_not_found, date_in_future, date_before_submission, date_before_office_opening, customer_blacklisted, onboarding_product_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Office not found",
                  "detail": "Office not found.",
                  "code": "office_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://api.numcore.io/v1/customers \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"legalForm\":\"person\",\"officeId\":1}'"
          }
        ]
      }
    },
    "/v1/customers/kyc-rules": {
      "get": {
        "x-numcore-api-product": "customers.kyc",
        "operationId": "getCustomerKycRules",
        "summary": "Get KYC rules",
        "tags": [
          "Customer KYC"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "The rules",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerKycRules"
                }
              }
            }
          }
        },
        "description": "What your bank requires to open customers and upload documents.\n\nAPI product: `customers.kyc`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/customers/kyc-rules \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      }
    },
    "/v1/customers/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/Id"
        }
      ],
      "get": {
        "x-numcore-api-product": "customers.read",
        "operationId": "getCustomer",
        "summary": "Get a customer",
        "tags": [
          "Customers"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CustomerRef"
          }
        ],
        "responses": {
          "200": {
            "description": "The customer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            }
          },
          "404": {
            "description": "customer_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Customer not found",
                  "detail": "Customer not found.",
                  "code": "customer_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "By id or Customer ID.\n\nAPI product: `customers.read`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/customers/1 \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      }
    },
    "/v1/customers/{id}/activation": {
      "post": {
        "x-numcore-api-product": "customers.create",
        "operationId": "activateCustomer",
        "summary": "Activate a customer",
        "tags": [
          "Customers"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "activatedOn"
                ],
                "properties": {
                  "activatedOn": {
                    "type": "string",
                    "format": "date",
                    "description": "Not in the future, not before submission, not before the office opened."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The active customer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Queued",
            "description": "Queued for approval."
          },
          "404": {
            "description": "customer_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Customer not found",
                  "detail": "Customer not found.",
                  "code": "customer_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "409": {
            "description": "invalid_status_transition",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "Invalid status transition",
                  "detail": "Invalid status transition.",
                  "code": "invalid_status_transition",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "date_in_future, date_before_submission, date_before_reactivation, date_before_office_opening, custom_fields_missing, onboarding_product_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Date in future",
                  "detail": "Date in future.",
                  "code": "date_in_future",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "API product: `customers.create`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://api.numcore.io/v1/customers/1/activation \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"activatedOn\":\"2026-11-10\"}'"
          }
        ]
      }
    },
    "/v1/customers/{id}/kyc": {
      "get": {
        "x-numcore-api-product": "customers.kyc",
        "operationId": "getCustomerKyc",
        "summary": "Get KYC tier",
        "description": "The customer's tier, its limits, and what is missing for the next one.\n\nAPI product: `customers.kyc`",
        "tags": [
          "Customer KYC"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CustomerRef"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CustomerKyc"
          },
          "404": {
            "description": "customer_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Customer not found",
                  "detail": "Customer not found.",
                  "code": "customer_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/customers/1/kyc \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      }
    },
    "/v1/customers/{id}/kyc-tier-changes": {
      "post": {
        "x-numcore-api-product": "customers.kyc",
        "operationId": "changeCustomerKycTier",
        "summary": "Change KYC tier",
        "description": "An upgrade needs every requirement of the new tier; otherwise 422 lists what is missing.\n\nAPI product: `customers.kyc`",
        "tags": [
          "Customer KYC"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tier",
                  "reason"
                ],
                "properties": {
                  "tier": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CustomerKyc"
          },
          "202": {
            "$ref": "#/components/responses/Queued",
            "description": "Queued for approval."
          },
          "404": {
            "description": "customer_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Customer not found",
                  "detail": "Customer not found.",
                  "code": "customer_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "409": {
            "description": "kyc_tier_unchanged, customer_not_editable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "Kyc tier unchanged",
                  "detail": "Kyc tier unchanged.",
                  "code": "kyc_tier_unchanged",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "kyc_requirements_not_met, kyc_not_applicable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Kyc requirements not met",
                  "detail": "Kyc requirements not met.",
                  "code": "kyc_requirements_not_met",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://api.numcore.io/v1/customers/1/kyc-tier-changes \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"tier\":1,\"reason\":\"string\"}'"
          }
        ]
      }
    },
    "/v1/customers/{id}/address-verification": {
      "post": {
        "x-numcore-api-product": "customers.kyc",
        "operationId": "verifyCustomerAddress",
        "summary": "Verify address",
        "description": "API product: `customers.kyc`",
        "tags": [
          "Customer KYC"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "verifiedOn"
                ],
                "properties": {
                  "verifiedOn": {
                    "type": "string",
                    "format": "date",
                    "description": "Not in the future."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CustomerKyc"
          },
          "202": {
            "$ref": "#/components/responses/Queued",
            "description": "Queued for approval."
          },
          "404": {
            "description": "customer_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Customer not found",
                  "detail": "Customer not found.",
                  "code": "customer_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "409": {
            "description": "customer_not_editable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "Customer not editable",
                  "detail": "Customer not editable.",
                  "code": "customer_not_editable",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "address_missing, date_in_future",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Address missing",
                  "detail": "Address missing.",
                  "code": "address_missing",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://api.numcore.io/v1/customers/1/address-verification \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"verifiedOn\":\"2026-11-10\"}'"
          }
        ]
      }
    },
    "/v1/customers/{id}/identifier-verifications": {
      "post": {
        "x-numcore-api-product": "customers.kyc",
        "operationId": "verifyCustomerIdentifier",
        "summary": "Verify BVN or NIN",
        "description": "Record that you checked it with NIBSS or NIMC.\n\nAPI product: `customers.kyc`",
        "tags": [
          "Customer KYC"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "verifiedOn"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "bvn",
                      "nin"
                    ]
                  },
                  "verifiedOn": {
                    "type": "string",
                    "format": "date",
                    "description": "Not in the future."
                  },
                  "evidence": {
                    "$ref": "#/components/schemas/Base64File"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CustomerKyc"
          },
          "202": {
            "$ref": "#/components/responses/Queued",
            "description": "Queued for approval."
          },
          "404": {
            "description": "customer_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Customer not found",
                  "detail": "Customer not found.",
                  "code": "customer_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "409": {
            "description": "customer_not_editable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "Customer not editable",
                  "detail": "Customer not editable.",
                  "code": "customer_not_editable",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "identifier_missing, date_in_future, document_too_large, document_file_type_not_allowed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Identifier missing",
                  "detail": "Identifier missing.",
                  "code": "identifier_missing",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://api.numcore.io/v1/customers/1/identifier-verifications \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"type\":\"bvn\",\"verifiedOn\":\"2026-11-10\"}'"
          }
        ]
      }
    },
    "/v1/customers/{id}/documents": {
      "parameters": [
        {
          "$ref": "#/components/parameters/Id"
        }
      ],
      "get": {
        "x-numcore-api-product": "customers.kyc",
        "operationId": "listCustomerDocuments",
        "summary": "List documents",
        "tags": [
          "Customer KYC"
        ],
        "parameters": [
          {
            "name": "current",
            "in": "query",
            "description": "True for only the documents in use.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Documents (without their files)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomerDocument"
                  }
                }
              }
            }
          },
          "404": {
            "description": "customer_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Customer not found",
                  "detail": "Customer not found.",
                  "code": "customer_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "API product: `customers.kyc`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/customers/1/documents \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      },
      "post": {
        "x-numcore-api-product": "customers.kyc",
        "operationId": "uploadCustomerDocument",
        "summary": "Upload a document",
        "description": "Multipart (type and file) or JSON with the file in Base64.\n\nAPI product: `customers.kyc`",
        "tags": [
          "Customer KYC"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "file"
                ],
                "properties": {
                  "type": {
                    "$ref": "#/components/schemas/CustomerDocumentType"
                  },
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Base64File"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type"
                    ],
                    "properties": {
                      "type": {
                        "$ref": "#/components/schemas/CustomerDocumentType"
                      }
                    }
                  }
                ]
              },
              "example": {
                "type": "proofOfAddress",
                "fileName": "electricity-bill.pdf",
                "contentBase64": "JVBERi0xLjcK"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Uploaded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerDocument"
                }
              }
            }
          },
          "404": {
            "description": "customer_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Customer not found",
                  "detail": "Customer not found.",
                  "code": "customer_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "409": {
            "description": "customer_not_editable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "Customer not editable",
                  "detail": "Customer not editable.",
                  "code": "customer_not_editable",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "413": {
            "description": "The request is larger than any allowed document.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 413,
                  "title": "Not found",
                  "detail": "Not found.",
                  "code": "not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "document_too_large, document_file_type_not_allowed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Document too large",
                  "detail": "Document too large.",
                  "code": "document_too_large",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "parameters": [],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://api.numcore.io/v1/customers/1/documents \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"type\":\"proofOfAddress\",\"fileName\":\"electricity-bill.pdf\",\"contentBase64\":\"JVBERi0xLjcK\"}'"
          }
        ]
      }
    },
    "/v1/customers/{id}/documents/{documentId}/content": {
      "get": {
        "x-numcore-api-product": "customers.kyc",
        "operationId": "getCustomerDocumentContent",
        "summary": "Download a document",
        "tags": [
          "Customer KYC"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The file as uploaded, with its content type and file name (Content-Disposition).",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "customer_not_found, document_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Customer not found",
                  "detail": "Customer not found.",
                  "code": "customer_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "API product: `customers.kyc`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/customers/1/documents/1/content \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      }
    },
    "/v1/customers/{id}/next-of-kin": {
      "parameters": [
        {
          "$ref": "#/components/parameters/Id"
        }
      ],
      "put": {
        "x-numcore-api-product": "customers.kyc",
        "operationId": "setCustomerNextOfKin",
        "summary": "Set next of kin",
        "description": "API product: `customers.kyc`",
        "tags": [
          "Customer KYC"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NextOfKin"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The customer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Queued",
            "description": "Queued for approval."
          },
          "404": {
            "description": "customer_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Customer not found",
                  "detail": "Customer not found.",
                  "code": "customer_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "409": {
            "description": "customer_not_editable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "Customer not editable",
                  "detail": "Customer not editable.",
                  "code": "customer_not_editable",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "next_of_kin_not_applicable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Next of kin not applicable",
                  "detail": "Next of kin not applicable.",
                  "code": "next_of_kin_not_applicable",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "parameters": [],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X PUT https://api.numcore.io/v1/customers/1/next-of-kin \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"Chidi Obi\",\"relationship\":\"Brother\",\"mobileNumber\":\"+2348031234567\"}'"
          }
        ]
      },
      "delete": {
        "x-numcore-api-product": "customers.kyc",
        "operationId": "deleteCustomerNextOfKin",
        "summary": "Remove next of kin",
        "tags": [
          "Customer KYC"
        ],
        "responses": {
          "200": {
            "description": "The customer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Queued",
            "description": "Queued for approval."
          },
          "404": {
            "description": "customer_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Customer not found",
                  "detail": "Customer not found.",
                  "code": "customer_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "409": {
            "description": "customer_not_editable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "Customer not editable",
                  "detail": "Customer not editable.",
                  "code": "customer_not_editable",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "API product: `customers.kyc`",
        "parameters": [],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X DELETE https://api.numcore.io/v1/customers/1/next-of-kin \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      }
    },
    "/v1/customers/{customerId}/identifiers": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CustomerId"
        }
      ],
      "get": {
        "x-numcore-api-product": "customers.kyc",
        "operationId": "listCustomerIdentifiers",
        "summary": "List identity documents",
        "tags": [
          "Customer identifiers"
        ],
        "responses": {
          "200": {
            "description": "Identifiers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomerIdentifier"
                  }
                }
              }
            }
          },
          "404": {
            "description": "customer_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Customer not found",
                  "detail": "Customer not found.",
                  "code": "customer_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "API product: `customers.kyc`",
        "parameters": [],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/customers/1/identifiers \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      },
      "post": {
        "x-numcore-api-product": "customers.kyc",
        "operationId": "createCustomerIdentifier",
        "summary": "Add an identity document",
        "description": "To change a BVN or NIN, remove it and add the new one.\n\nAPI product: `customers.kyc`",
        "tags": [
          "Customer identifiers"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "value"
                ],
                "properties": {
                  "type": {
                    "$ref": "#/components/schemas/IdentifierType"
                  },
                  "value": {
                    "type": "string",
                    "maxLength": 50,
                    "description": "Stored trimmed and upper-cased."
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerIdentifier"
                }
              }
            }
          },
          "404": {
            "description": "customer_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Customer not found",
                  "detail": "Customer not found.",
                  "code": "customer_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "409": {
            "description": "identifier_type_exists, identifier_in_use",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "Identifier type exists",
                  "detail": "Identifier type exists.",
                  "code": "identifier_type_exists",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "customer_blacklisted",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Customer blacklisted",
                  "detail": "Customer blacklisted.",
                  "code": "customer_blacklisted",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "parameters": [],
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://api.numcore.io/v1/customers/1/identifiers \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"type\":\"bvn\",\"value\":\"string\"}'"
          }
        ]
      }
    },
    "/v1/customers/{customerId}/identifiers/{id}": {
      "delete": {
        "x-numcore-api-product": "customers.kyc",
        "operationId": "deleteCustomerIdentifier",
        "summary": "Remove an identity document",
        "tags": [
          "Customer identifiers"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CustomerId"
          },
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "responses": {
          "204": {
            "description": "Removed"
          },
          "404": {
            "description": "identifier_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Identifier not found",
                  "detail": "Identifier not found.",
                  "code": "identifier_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "API product: `customers.kyc`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X DELETE https://api.numcore.io/v1/customers/1/identifiers/1 \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      }
    },
    "/v1/savings-accounts": {
      "get": {
        "x-numcore-api-product": "accounts.balances",
        "operationId": "listSavingsAccounts",
        "summary": "List accounts",
        "tags": [
          "Savings accounts"
        ],
        "parameters": [
          {
            "name": "customerId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "groupId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "productId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "officeId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/SavingsAccountStatus"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "description": "savings or current.",
            "schema": {
              "type": "string",
              "enum": [
                "savings",
                "current"
              ]
            }
          },
          {
            "name": "dormant",
            "in": "query",
            "description": "true for dormant accounts only, false for accounts that are not dormant.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "categoryId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "fieldOfficerId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "$ref": "#/components/parameters/AccountNumber"
          },
          {
            "$ref": "#/components/parameters/AccountSearch"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of accounts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SavingsAccount"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Savings and current accounts.\n\nAPI product: `accounts.balances`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/savings-accounts \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      },
      "post": {
        "x-numcore-api-product": "accounts.open",
        "operationId": "openSavingsAccount",
        "summary": "Open an account",
        "description": "For an active customer. Approve and activate it next.\n\nAPI product: `accounts.open`",
        "tags": [
          "Savings accounts"
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "productId"
                ],
                "properties": {
                  "productId": {
                    "type": "integer",
                    "format": "int64"
                  },
                  "customerId": {
                    "type": "integer",
                    "format": "int64"
                  },
                  "groupId": {
                    "type": "integer",
                    "format": "int64"
                  },
                  "submittedOn": {
                    "type": "string",
                    "format": "date",
                    "description": "Defaults to today."
                  },
                  "fieldOfficerId": {
                    "type": "integer",
                    "format": "int64"
                  },
                  "externalId": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "customFields": {
                    "$ref": "#/components/schemas/CustomFieldValuesInput"
                  },
                  "categoryId": {
                    "type": "integer",
                    "format": "int64",
                    "description": "An active account category."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The submitted application",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavingsAccount"
                }
              }
            }
          },
          "409": {
            "description": "external_id_in_use, loan_already_replaced",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "External id in use",
                  "detail": "External id in use.",
                  "code": "external_id_in_use",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "loan_top_up_not_allowed, replaced_loan_not_eligible, product_not_found, customer_not_found, customer_not_active, group_not_found, group_not_active, date_in_future, date_before_owner_activation, account_category_not_found, account_category_inactive",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Loan top up not allowed",
                  "detail": "Loan top up not allowed.",
                  "code": "loan_top_up_not_allowed",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://api.numcore.io/v1/savings-accounts \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"productId\":1}'"
          }
        ]
      }
    },
    "/v1/savings-accounts/{id}": {
      "get": {
        "x-numcore-api-product": "accounts.balances",
        "operationId": "getSavingsAccount",
        "summary": "Get an account",
        "tags": [
          "Savings accounts"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "responses": {
          "200": {
            "description": "The account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavingsAccount"
                }
              }
            }
          },
          "404": {
            "description": "savings_account_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Savings account not found",
                  "detail": "Savings account not found.",
                  "code": "savings_account_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "With its balance, holds and blocks.\n\nAPI product: `accounts.balances`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/savings-accounts/1 \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      }
    },
    "/v1/savings-accounts/{id}/approval": {
      "post": {
        "x-numcore-api-product": "accounts.open",
        "operationId": "approveSavingsAccount",
        "summary": "Approve an account",
        "tags": [
          "Savings accounts"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "approvedOn"
                ],
                "properties": {
                  "approvedOn": {
                    "type": "string",
                    "format": "date"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/SavingsAccount"
          },
          "202": {
            "$ref": "#/components/responses/Queued",
            "description": "Queued for approval."
          },
          "404": {
            "description": "savings_account_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Savings account not found",
                  "detail": "Savings account not found.",
                  "code": "savings_account_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "409": {
            "description": "invalid_status_transition",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "Invalid status transition",
                  "detail": "Invalid status transition.",
                  "code": "invalid_status_transition",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "date_in_future, date_before_submission",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Date in future",
                  "detail": "Date in future.",
                  "code": "date_in_future",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "API product: `accounts.open`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://api.numcore.io/v1/savings-accounts/1/approval \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"approvedOn\":\"2026-11-10\"}'"
          }
        ]
      }
    },
    "/v1/savings-accounts/{id}/activation": {
      "post": {
        "x-numcore-api-product": "accounts.open",
        "operationId": "activateSavingsAccount",
        "summary": "Activate an account",
        "tags": [
          "Savings accounts"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "activatedOn"
                ],
                "properties": {
                  "activatedOn": {
                    "type": "string",
                    "format": "date"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/SavingsAccount"
          },
          "202": {
            "$ref": "#/components/responses/Queued",
            "description": "Queued for approval."
          },
          "404": {
            "description": "savings_account_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Savings account not found",
                  "detail": "Savings account not found.",
                  "code": "savings_account_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "409": {
            "description": "invalid_status_transition",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "Invalid status transition",
                  "detail": "Invalid status transition.",
                  "code": "invalid_status_transition",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "date_in_future, date_before_approval, date_before_owner_activation, customer_not_active, group_not_active, accounting_closed, custom_fields_missing",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Date in future",
                  "detail": "Date in future.",
                  "code": "date_in_future",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "API product: `accounts.open`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://api.numcore.io/v1/savings-accounts/1/activation \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"activatedOn\":\"2026-11-10\"}'"
          }
        ]
      }
    },
    "/v1/savings-accounts/{id}/deposits": {
      "post": {
        "x-numcore-api-product": "accounts.deposits-withdrawals",
        "operationId": "depositToSavingsAccount",
        "summary": "Deposit",
        "description": "API product: `accounts.deposits-withdrawals`",
        "tags": [
          "Savings transactions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SavingsTransactionInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/SavingsTransaction"
          },
          "201": {
            "$ref": "#/components/responses/SavingsTransaction"
          },
          "202": {
            "$ref": "#/components/responses/Queued",
            "description": "Queued for approval."
          },
          "404": {
            "description": "savings_account_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Savings account not found",
                  "detail": "Savings account not found.",
                  "code": "savings_account_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "409": {
            "description": "account_not_active, client_ref_reused, client_ref_in_progress",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "Account not active",
                  "detail": "Account not active.",
                  "code": "account_not_active",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "transaction_date_in_future, transaction_before_activation, credits_blocked, maximum_balance_exceeded, amount_precision_exceeded, accounting_closed, backdating_limit_exceeded, gl_mapping_missing, transaction_channel_not_found, transaction_channel_inactive, kyc_tier_limit_exceeded, account_blacklisted, transaction_held_for_review",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Transaction date in future",
                  "detail": "Transaction date in future.",
                  "code": "transaction_date_in_future",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://api.numcore.io/v1/savings-accounts/1/deposits \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"amount\":\"1500.00\",\"clientRef\":\"USSD-55120\"}'"
          }
        ]
      }
    },
    "/v1/savings-accounts/{id}/withdrawals": {
      "post": {
        "x-numcore-api-product": "accounts.deposits-withdrawals",
        "operationId": "withdrawFromSavingsAccount",
        "summary": "Withdraw",
        "description": "Any withdrawal fee posts with it.\n\nAPI product: `accounts.deposits-withdrawals`",
        "tags": [
          "Savings transactions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SavingsTransactionInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/SavingsTransaction"
          },
          "201": {
            "$ref": "#/components/responses/SavingsTransaction"
          },
          "202": {
            "$ref": "#/components/responses/Queued",
            "description": "Queued for approval."
          },
          "404": {
            "description": "savings_account_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Savings account not found",
                  "detail": "Savings account not found.",
                  "code": "savings_account_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "409": {
            "description": "account_not_active, client_ref_reused, client_ref_in_progress, account_dormant",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "Account not active",
                  "detail": "Account not active.",
                  "code": "account_not_active",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "insufficient_funds, debits_blocked, withdrawal_limit_exceeded, daily_withdrawal_limit_exceeded, account_locked_in, transaction_date_in_future, transaction_before_activation, amount_precision_exceeded, accounting_closed, gl_mapping_missing, tax_gl_account_invalid, account_blacklisted, transaction_held_for_review, mandate_not_met, signatory_not_found, transaction_channel_not_found, transaction_channel_inactive",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Insufficient funds",
                  "detail": "Insufficient funds.",
                  "code": "insufficient_funds",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://api.numcore.io/v1/savings-accounts/1/withdrawals \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"amount\":\"1500.00\",\"clientRef\":\"USSD-55120\"}'"
          }
        ]
      }
    },
    "/v1/savings-accounts/{id}/transfers": {
      "post": {
        "x-numcore-api-product": "accounts.transfers",
        "operationId": "transferBetweenSavingsAccounts",
        "summary": "Transfer",
        "description": "To another account in the same currency.\n\nAPI product: `accounts.transfers`",
        "tags": [
          "Savings transactions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/SavingsTransactionInput"
                  },
                  {
                    "type": "object",
                    "required": [
                      "toAccountId"
                    ],
                    "properties": {
                      "toAccountId": {
                        "type": "integer",
                        "format": "int64"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/SavingsTransfer"
          },
          "201": {
            "$ref": "#/components/responses/SavingsTransfer"
          },
          "202": {
            "$ref": "#/components/responses/Queued",
            "description": "Queued for approval."
          },
          "404": {
            "description": "savings_account_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Savings account not found",
                  "detail": "Savings account not found.",
                  "code": "savings_account_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "409": {
            "description": "account_not_active, client_ref_reused, client_ref_in_progress, account_dormant",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "Account not active",
                  "detail": "Account not active.",
                  "code": "account_not_active",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "same_account, counterparty_account_not_found, currency_mismatch, insufficient_funds, debits_blocked, withdrawal_limit_exceeded, daily_withdrawal_limit_exceeded, credits_blocked, maximum_balance_exceeded, account_locked_in, transaction_date_in_future, transaction_before_activation, accounting_closed, gl_mapping_missing, tax_gl_account_invalid, kyc_tier_limit_exceeded, account_blacklisted, transaction_held_for_review, mandate_not_met, signatory_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Same account",
                  "detail": "Same account.",
                  "code": "same_account",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://api.numcore.io/v1/savings-accounts/1/transfers \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"amount\":\"1500.00\",\"clientRef\":\"USSD-55120\",\"toAccountId\":1}'"
          }
        ]
      }
    },
    "/v1/savings-accounts/{id}/transactions": {
      "get": {
        "x-numcore-api-product": "accounts.statements",
        "operationId": "listSavingsTransactions",
        "summary": "List transactions",
        "description": "In date order, with the running balance.\n\nAPI product: `accounts.statements`",
        "tags": [
          "Savings transactions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of transactions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SavingsTransaction"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "savings_account_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Savings account not found",
                  "detail": "Savings account not found.",
                  "code": "savings_account_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/savings-accounts/1/transactions \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      }
    },
    "/v1/savings-accounts/{id}/transactions/{transactionId}": {
      "get": {
        "x-numcore-api-product": "accounts.statements",
        "operationId": "getSavingsTransaction",
        "summary": "Get a transaction",
        "tags": [
          "Savings transactions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          },
          {
            "$ref": "#/components/parameters/TransactionId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/SavingsTransaction"
          },
          "404": {
            "description": "transaction_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Transaction not found",
                  "detail": "Transaction not found.",
                  "code": "transaction_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "API product: `accounts.statements`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/savings-accounts/1/transactions/1 \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      }
    },
    "/v1/fixed-deposit-accounts": {
      "get": {
        "x-numcore-api-product": "investments.read",
        "operationId": "listFixedDepositAccounts",
        "summary": "List fixed deposits",
        "tags": [
          "Fixed deposit accounts"
        ],
        "parameters": [
          {
            "name": "customerId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "groupId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "productId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "officeId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/SavingsAccountStatus"
            }
          },
          {
            "$ref": "#/components/parameters/AccountNumber"
          },
          {
            "$ref": "#/components/parameters/AccountSearch"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of accounts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TermDepositAccount"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "description": "API product: `investments.read`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/fixed-deposit-accounts \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      },
      "post": {
        "x-numcore-api-product": "investments.create",
        "operationId": "openFixedDepositAccount",
        "summary": "Book a fixed deposit",
        "description": "Approve and activate it next.\n\nAPI product: `investments.create`",
        "tags": [
          "Fixed deposit accounts"
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenFixedDepositInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/TermDepositAccount"
          },
          "409": {
            "description": "external_id_in_use",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "External id in use",
                  "detail": "External id in use.",
                  "code": "external_id_in_use",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "product_not_found, customer_not_found, customer_not_active, date_in_future, deposit_amount_out_of_range, amount_precision_exceeded, term_out_of_range, no_rate_band, linked_account_required, linked_account_invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Product not found",
                  "detail": "Product not found.",
                  "code": "product_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://api.numcore.io/v1/fixed-deposit-accounts \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"productId\":1,\"depositAmount\":\"1500.00\",\"term\":1}'"
          }
        ]
      }
    },
    "/v1/fixed-deposit-accounts/{id}": {
      "get": {
        "x-numcore-api-product": "investments.read",
        "operationId": "getFixedDepositAccount",
        "summary": "Get a fixed deposit",
        "tags": [
          "Fixed deposit accounts"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/TermDepositAccount"
          },
          "404": {
            "description": "fixed_deposit_account_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Fixed deposit account not found",
                  "detail": "Fixed deposit account not found.",
                  "code": "fixed_deposit_account_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "API product: `investments.read`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/fixed-deposit-accounts/1 \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      }
    },
    "/v1/fixed-deposit-accounts/{id}/approval": {
      "post": {
        "x-numcore-api-product": "investments.create",
        "operationId": "approveFixedDepositAccount",
        "summary": "Approve a fixed deposit",
        "tags": [
          "Fixed deposit accounts"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "approvedOn"
                ],
                "properties": {
                  "approvedOn": {
                    "type": "string",
                    "format": "date"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/TermDepositAccount"
          },
          "202": {
            "$ref": "#/components/responses/Queued",
            "description": "Queued for approval."
          },
          "404": {
            "description": "fixed_deposit_account_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Fixed deposit account not found",
                  "detail": "Fixed deposit account not found.",
                  "code": "fixed_deposit_account_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "409": {
            "description": "invalid_status_transition",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "Invalid status transition",
                  "detail": "Invalid status transition.",
                  "code": "invalid_status_transition",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "date_in_future, date_before_submission",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Date in future",
                  "detail": "Date in future.",
                  "code": "date_in_future",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "API product: `investments.create`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://api.numcore.io/v1/fixed-deposit-accounts/1/approval \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"approvedOn\":\"2026-11-10\"}'"
          }
        ]
      }
    },
    "/v1/fixed-deposit-accounts/{id}/activation": {
      "post": {
        "x-numcore-api-product": "investments.create",
        "operationId": "activateFixedDepositAccount",
        "summary": "Activate a fixed deposit",
        "description": "Funds it; the term runs from today.\n\nAPI product: `investments.create`",
        "tags": [
          "Fixed deposit accounts"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "activatedOn"
                ],
                "properties": {
                  "activatedOn": {
                    "type": "string",
                    "format": "date"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/TermDepositAccount"
          },
          "202": {
            "$ref": "#/components/responses/Queued",
            "description": "Queued for approval."
          },
          "404": {
            "description": "fixed_deposit_account_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Fixed deposit account not found",
                  "detail": "Fixed deposit account not found.",
                  "code": "fixed_deposit_account_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "409": {
            "description": "invalid_status_transition",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "Invalid status transition",
                  "detail": "Invalid status transition.",
                  "code": "invalid_status_transition",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "date_in_future, date_before_approval, customer_not_active, insufficient_funds, linked_account_invalid, currency_mismatch, custom_fields_missing, migration_not_supported",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Date in future",
                  "detail": "Date in future.",
                  "code": "date_in_future",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://api.numcore.io/v1/fixed-deposit-accounts/1/activation \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"activatedOn\":\"2026-11-10\"}'"
          }
        ]
      }
    },
    "/v1/fixed-deposit-accounts/{id}/top-ups": {
      "post": {
        "x-numcore-api-product": "investments.create",
        "operationId": "topUpFixedDeposit",
        "summary": "Top up a fixed deposit",
        "description": "If the product allows top-ups.\n\nAPI product: `investments.create`",
        "tags": [
          "Fixed deposit accounts"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount",
                  "clientRef"
                ],
                "properties": {
                  "clientRef": {
                    "$ref": "#/components/schemas/ClientRef"
                  },
                  "amount": {
                    "$ref": "#/components/schemas/PositiveAmount"
                  },
                  "transactionDate": {
                    "type": "string",
                    "format": "date",
                    "description": "Defaults to today."
                  },
                  "fromSavingsAccountId": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Left out, the top-up is in cash."
                  },
                  "reference": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/SavingsTransaction"
          },
          "201": {
            "$ref": "#/components/responses/SavingsTransaction"
          },
          "202": {
            "$ref": "#/components/responses/Queued",
            "description": "Queued for approval."
          },
          "404": {
            "description": "fixed_deposit_account_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Fixed deposit account not found",
                  "detail": "Fixed deposit account not found.",
                  "code": "fixed_deposit_account_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "409": {
            "description": "account_not_active, client_ref_reused, client_ref_in_progress",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "Account not active",
                  "detail": "Account not active.",
                  "code": "account_not_active",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "top_up_not_allowed, top_up_below_minimum, top_up_too_close_to_maturity, deposit_amount_out_of_range, transaction_date_in_future, transaction_before_activation, funding_account_invalid, insufficient_funds, withdrawal_limit_exceeded, daily_withdrawal_limit_exceeded, accounting_closed, backdating_limit_exceeded",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Top up not allowed",
                  "detail": "Top up not allowed.",
                  "code": "top_up_not_allowed",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://api.numcore.io/v1/fixed-deposit-accounts/1/top-ups \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"amount\":\"1500.00\",\"clientRef\":\"USSD-55120\"}'"
          }
        ]
      }
    },
    "/v1/fixed-deposit-accounts/{id}/transactions": {
      "get": {
        "x-numcore-api-product": "investments.read",
        "operationId": "listFixedDepositTransactions",
        "summary": "List fixed deposit transactions",
        "tags": [
          "Fixed deposit accounts"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of transactions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SavingsTransaction"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "fixed_deposit_account_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Fixed deposit account not found",
                  "detail": "Fixed deposit account not found.",
                  "code": "fixed_deposit_account_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "API product: `investments.read`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/fixed-deposit-accounts/1/transactions \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      }
    },
    "/v1/recurring-deposit-accounts": {
      "get": {
        "x-numcore-api-product": "investments.read",
        "operationId": "listRecurringDepositAccounts",
        "summary": "List recurring deposits",
        "tags": [
          "Recurring deposit accounts"
        ],
        "parameters": [
          {
            "name": "customerId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "groupId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "productId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "officeId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/SavingsAccountStatus"
            }
          },
          {
            "$ref": "#/components/parameters/AccountNumber"
          },
          {
            "$ref": "#/components/parameters/AccountSearch"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of accounts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TermDepositAccount"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "description": "API product: `investments.read`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/recurring-deposit-accounts \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      },
      "post": {
        "x-numcore-api-product": "investments.create",
        "operationId": "openRecurringDepositAccount",
        "summary": "Open a recurring deposit",
        "description": "Approve and activate it next.\n\nAPI product: `investments.create`",
        "tags": [
          "Recurring deposit accounts"
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenRecurringDepositInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/TermDepositAccount"
          },
          "409": {
            "description": "external_id_in_use",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "External id in use",
                  "detail": "External id in use.",
                  "code": "external_id_in_use",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "product_not_found, customer_not_found, customer_not_active, date_in_future, deposit_amount_out_of_range, amount_precision_exceeded, term_out_of_range, no_rate_band, linked_account_required, linked_account_invalid, renewal_not_supported",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Product not found",
                  "detail": "Product not found.",
                  "code": "product_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://api.numcore.io/v1/recurring-deposit-accounts \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"productId\":1,\"installmentAmount\":\"1500.00\",\"term\":1}'"
          }
        ]
      }
    },
    "/v1/recurring-deposit-accounts/{id}": {
      "get": {
        "x-numcore-api-product": "investments.read",
        "operationId": "getRecurringDepositAccount",
        "summary": "Get a recurring deposit",
        "tags": [
          "Recurring deposit accounts"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/TermDepositAccount"
          },
          "404": {
            "description": "recurring_deposit_account_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Recurring deposit account not found",
                  "detail": "Recurring deposit account not found.",
                  "code": "recurring_deposit_account_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "API product: `investments.read`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/recurring-deposit-accounts/1 \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      }
    },
    "/v1/recurring-deposit-accounts/{id}/approval": {
      "post": {
        "x-numcore-api-product": "investments.create",
        "operationId": "approveRecurringDepositAccount",
        "summary": "Approve a recurring deposit",
        "tags": [
          "Recurring deposit accounts"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "approvedOn"
                ],
                "properties": {
                  "approvedOn": {
                    "type": "string",
                    "format": "date"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/TermDepositAccount"
          },
          "202": {
            "$ref": "#/components/responses/Queued",
            "description": "Queued for approval."
          },
          "404": {
            "description": "recurring_deposit_account_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Recurring deposit account not found",
                  "detail": "Recurring deposit account not found.",
                  "code": "recurring_deposit_account_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "409": {
            "description": "invalid_status_transition",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "Invalid status transition",
                  "detail": "Invalid status transition.",
                  "code": "invalid_status_transition",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "date_in_future, date_before_submission",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Date in future",
                  "detail": "Date in future.",
                  "code": "date_in_future",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "API product: `investments.create`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://api.numcore.io/v1/recurring-deposit-accounts/1/approval \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"approvedOn\":\"2026-11-10\"}'"
          }
        ]
      }
    },
    "/v1/recurring-deposit-accounts/{id}/activation": {
      "post": {
        "x-numcore-api-product": "investments.create",
        "operationId": "activateRecurringDepositAccount",
        "summary": "Activate a recurring deposit",
        "description": "The first instalment is due today.\n\nAPI product: `investments.create`",
        "tags": [
          "Recurring deposit accounts"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "activatedOn"
                ],
                "properties": {
                  "activatedOn": {
                    "type": "string",
                    "format": "date"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/TermDepositAccount"
          },
          "202": {
            "$ref": "#/components/responses/Queued",
            "description": "Queued for approval."
          },
          "404": {
            "description": "recurring_deposit_account_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Recurring deposit account not found",
                  "detail": "Recurring deposit account not found.",
                  "code": "recurring_deposit_account_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "409": {
            "description": "invalid_status_transition",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "Invalid status transition",
                  "detail": "Invalid status transition.",
                  "code": "invalid_status_transition",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "date_in_future, date_before_approval, customer_not_active, custom_fields_missing",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Date in future",
                  "detail": "Date in future.",
                  "code": "date_in_future",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://api.numcore.io/v1/recurring-deposit-accounts/1/activation \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"activatedOn\":\"2026-11-10\"}'"
          }
        ]
      }
    },
    "/v1/recurring-deposit-accounts/{id}/transactions": {
      "get": {
        "x-numcore-api-product": "investments.read",
        "operationId": "listRecurringDepositTransactions",
        "summary": "List recurring deposit transactions",
        "tags": [
          "Recurring deposit accounts"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of transactions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SavingsTransaction"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "recurring_deposit_account_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Recurring deposit account not found",
                  "detail": "Recurring deposit account not found.",
                  "code": "recurring_deposit_account_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "API product: `investments.read`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/recurring-deposit-accounts/1/transactions \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      }
    },
    "/v1/loans": {
      "get": {
        "x-numcore-api-product": "loans.read",
        "operationId": "listLoans",
        "summary": "List loans",
        "tags": [
          "Loans"
        ],
        "parameters": [
          {
            "name": "customerId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "groupId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "productId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "officeId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "loanOfficerId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/LoanStatus"
            }
          },
          {
            "$ref": "#/components/parameters/AccountNumber"
          },
          {
            "$ref": "#/components/parameters/AccountSearch"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of loans",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Loan"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "description": "API product: `loans.read`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/loans \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      }
    },
    "/v1/loans/{id}": {
      "get": {
        "x-numcore-api-product": "loans.read",
        "operationId": "getLoan",
        "summary": "Get a loan",
        "tags": [
          "Loans"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Loan"
          },
          "404": {
            "description": "loan_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Loan not found",
                  "detail": "Loan not found.",
                  "code": "loan_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "With its balances and arrears.\n\nAPI product: `loans.read`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/loans/1 \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      }
    },
    "/v1/loans/{id}/schedule": {
      "get": {
        "x-numcore-api-product": "loans.read",
        "operationId": "getLoanSchedule",
        "summary": "Get the repayment schedule",
        "description": "API product: `loans.read`",
        "tags": [
          "Loans"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanSchedule"
          },
          "404": {
            "description": "loan_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Loan not found",
                  "detail": "Loan not found.",
                  "code": "loan_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "repayment_dates_collide, first_repayment_not_after_disbursement, custom_schedule_out_of_date, custom_schedule_principal_mismatch",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Repayment dates collide",
                  "detail": "Repayment dates collide.",
                  "code": "repayment_dates_collide",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/loans/1/schedule \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      }
    },
    "/v1/loans/{id}/repayments": {
      "post": {
        "x-numcore-api-product": "loans.repayments",
        "operationId": "repayLoan",
        "summary": "Take a repayment",
        "description": "Pays the oldest instalments first.\n\nAPI product: `loans.repayments`",
        "tags": [
          "Loan transactions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoanPaymentInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanTransaction"
          },
          "201": {
            "$ref": "#/components/responses/LoanTransaction"
          },
          "202": {
            "$ref": "#/components/responses/Queued",
            "description": "Queued for approval."
          },
          "404": {
            "description": "loan_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Loan not found",
                  "detail": "Loan not found.",
                  "code": "loan_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "409": {
            "description": "client_ref_reused, client_ref_in_progress",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "Client ref reused",
                  "detail": "Client ref reused.",
                  "code": "client_ref_reused",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "loan_not_active, transaction_date_in_future, transaction_before_disbursement, amount_precision_exceeded, accounting_closed, transaction_before_reschedule, transaction_before_prepayment, transaction_channel_not_found, transaction_channel_inactive",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Loan not active",
                  "detail": "Loan not active.",
                  "code": "loan_not_active",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://api.numcore.io/v1/loans/1/repayments \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"amount\":\"1500.00\",\"clientRef\":\"USSD-55120\"}'"
          }
        ]
      }
    },
    "/v1/loans/{id}/transactions": {
      "get": {
        "x-numcore-api-product": "loans.read",
        "operationId": "listLoanTransactions",
        "summary": "List loan transactions",
        "tags": [
          "Loan transactions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of transactions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LoanTransaction"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "loan_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Loan not found",
                  "detail": "Loan not found.",
                  "code": "loan_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "API product: `loans.read`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/loans/1/transactions \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      }
    },
    "/v1/loans/{id}/transactions/{transactionId}": {
      "get": {
        "x-numcore-api-product": "loans.read",
        "operationId": "getLoanTransaction",
        "summary": "Get a loan transaction",
        "tags": [
          "Loan transactions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          },
          {
            "$ref": "#/components/parameters/TransactionId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanTransaction"
          },
          "404": {
            "description": "transaction_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Transaction not found",
                  "detail": "Transaction not found.",
                  "code": "transaction_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "API product: `loans.read`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/loans/1/transactions/1 \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      }
    },
    "/v1/loans/{id}/rate-changes": {
      "get": {
        "x-numcore-api-product": "loans.read",
        "operationId": "listLoanRateChanges",
        "summary": "List a loan's rate changes",
        "tags": [
          "Rate indexes"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "responses": {
          "200": {
            "description": "The changes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LoanRateChange"
                  }
                }
              }
            }
          },
          "404": {
            "description": "loan_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Loan not found",
                  "detail": "Loan not found.",
                  "code": "loan_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "For a variable-rate loan: each time its index moved its rate, and the first instalment recalculated at the new rate.\n\nAPI product: `loans.read`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/loans/1/rate-changes \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      }
    },
    "/v1/loans/{id}/ownership-costs": {
      "get": {
        "x-numcore-api-product": "loans.read",
        "operationId": "listOwnershipCosts",
        "summary": "List an Ijarah's ownership costs",
        "tags": [
          "Loans"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "responses": {
          "200": {
            "description": "The costs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OwnershipCost"
                  }
                }
              }
            }
          },
          "404": {
            "description": "loan_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Loan not found",
                  "detail": "Loan not found.",
                  "code": "loan_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "Takaful and major maintenance the bank paid as owner of the leased asset.\n\nAPI product: `loans.read`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/loans/1/ownership-costs \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      }
    },
    "/v1/loans/{id}/prepayments": {
      "get": {
        "x-numcore-api-product": "loans.read",
        "operationId": "listLoanPrepayments",
        "summary": "List a loan's prepayments",
        "tags": [
          "Loan prepayments"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "responses": {
          "200": {
            "description": "The prepayments",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LoanPrepaymentRecord"
                  }
                }
              }
            }
          },
          "404": {
            "description": "loan_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Loan not found",
                  "detail": "Loan not found.",
                  "code": "loan_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "API product: `loans.read`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/loans/1/prepayments \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      },
      "post": {
        "x-numcore-api-product": "loans.repayments",
        "operationId": "prepayLoan",
        "summary": "Prepay a loan",
        "description": "Settles what is due, pays the rest of the principal ahead and recalculates the later instalments: smaller, or fewer.\n\nAPI product: `loans.repayments`",
        "tags": [
          "Loan prepayments"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoanPrepaymentInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The prepayment this clientRef already made",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoanPrepaymentRecord"
                }
              }
            }
          },
          "201": {
            "description": "The prepayment. Location is its repayment transaction.",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoanPrepaymentRecord"
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Queued",
            "description": "Queued for approval."
          },
          "404": {
            "description": "loan_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Loan not found",
                  "detail": "Loan not found.",
                  "code": "loan_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "409": {
            "description": "client_ref_reused, client_ref_in_progress",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 409,
                  "title": "Client ref reused",
                  "detail": "Client ref reused.",
                  "code": "client_ref_reused",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "loan_not_active, transaction_date_in_future, transaction_before_disbursement, amount_precision_exceeded, accounting_closed, transaction_before_reschedule, transaction_before_prepayment, transaction_before_last, tranches_pending, nothing_to_recalculate, prepayment_not_above_dues, prepayment_exceeds_principal, prepayment_during_grace",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Loan not active",
                  "detail": "Loan not active.",
                  "code": "loan_not_active",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://api.numcore.io/v1/loans/1/prepayments \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"clientRef\":\"USSD-55120\"}'"
          }
        ]
      }
    },
    "/v1/loans/{id}/prepayments/preview": {
      "post": {
        "x-numcore-api-product": "loans.repayments",
        "operationId": "previewLoanPrepayment",
        "summary": "Preview a prepayment",
        "tags": [
          "Loan prepayments"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoanPrepaymentPreviewInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The prepayment worked out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoanPrepaymentPreview"
                }
              }
            }
          },
          "404": {
            "description": "loan_not_found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 404,
                  "title": "Loan not found",
                  "detail": "Loan not found.",
                  "code": "loan_not_found",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          },
          "422": {
            "description": "loan_not_active, transaction_date_in_future, transaction_before_disbursement, amount_precision_exceeded, transaction_before_reschedule, transaction_before_prepayment, transaction_before_last, tranches_pending, nothing_to_recalculate, prepayment_not_above_dues, prepayment_exceeds_principal, prepayment_during_grace",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "status": 422,
                  "title": "Loan not active",
                  "detail": "Loan not active.",
                  "code": "loan_not_active",
                  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
                }
              }
            }
          }
        },
        "description": "What the prepayment would do, with the schedule before and after. Nothing is saved.\n\nAPI product: `loans.repayments`",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -X POST https://api.numcore.io/v1/loans/1/prepayments/preview \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"amount\":\"1500.00\",\"effect\":\"reduceInstallment\"}'"
          }
        ]
      }
    },
    "/v1/events": {
      "get": {
        "operationId": "listEvents",
        "summary": "Read the event feed",
        "description": "Every event in order. Ask for the events after the last position you processed.\n\nAPI product: `events.read`",
        "tags": [
          "Events"
        ],
        "x-numcore-api-product": "events.read",
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "The position of the last event you processed."
          },
          {
            "name": "types",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Only these event types, comma-separated, e.g. `customer.created,loan.approved`."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of events",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventFeedPage"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl https://api.numcore.io/v1/events \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"X-NumCore-Tenant: yourbank-sandbox\""
          }
        ]
      }
    }
  },
  "webhooks": {
    "transactionAlert": {
      "post": {
        "operationId": "receiveTransactionAlert",
        "summary": "Transaction alert",
        "description": "One `POST` per event. See [Webhooks](#section/Webhooks) for retries and the signature.",
        "tags": [
          "Webhooks"
        ],
        "security": [],
        "parameters": [
          {
            "name": "X-NumCore-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-NumCore-Event-Type",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/NotificationDeliveryEventType"
            }
          },
          {
            "name": "X-NumCore-Delivery-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "X-NumCore-Delivery-Attempt",
            "in": "header",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "X-NumCore-Timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "X-NumCore-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "example": "v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionAlertEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx tells NumCore the event was received."
          },
          "400": {
            "description": "Anything other than 2xx (or no answer in time) is a failed attempt and is retried."
          }
        }
      }
    },
    "lifecycleEvent": {
      "post": {
        "operationId": "receiveLifecycleEvent",
        "summary": "Transaction alert",
        "description": "One `POST` per event. See [Webhooks](#section/Webhooks) for retries and the signature.",
        "tags": [
          "Webhooks"
        ],
        "security": [],
        "parameters": [
          {
            "name": "X-NumCore-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-NumCore-Event-Type",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/NotificationDeliveryEventType"
            }
          },
          {
            "name": "X-NumCore-Delivery-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "X-NumCore-Delivery-Attempt",
            "in": "header",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "X-NumCore-Timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "X-NumCore-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "example": "v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LifecycleEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx tells NumCore the event was received."
          },
          "400": {
            "description": "Anything other than 2xx (or no answer in time) is a failed attempt and is retried."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CustomerStatus": {
        "type": "string",
        "enum": [
          "pending",
          "active",
          "closed",
          "rejected",
          "withdrawn"
        ]
      },
      "Customer": {
        "type": "object",
        "required": [
          "id",
          "customerNumber",
          "legalForm",
          "status",
          "officeId",
          "displayName",
          "submittedOn"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "customerNumber": {
            "type": "string",
            "pattern": "^C[0-9]{9}$",
            "example": "C482915307"
          },
          "mainAccountNumber": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer's main account number: their first-opened savings or current account that isn't closed.",
            "example": "0123456789"
          },
          "legalForm": {
            "$ref": "#/components/schemas/LegalForm"
          },
          "status": {
            "$ref": "#/components/schemas/CustomerStatus"
          },
          "officeId": {
            "type": "integer",
            "format": "int64"
          },
          "displayName": {
            "type": "string",
            "description": "First, middle and last name for a person; the registered name for an entity.",
            "example": "Ada Ngozi Obi"
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "firstName": {
            "type": [
              "string",
              "null"
            ]
          },
          "middleName": {
            "type": [
              "string",
              "null"
            ]
          },
          "lastName": {
            "type": [
              "string",
              "null"
            ]
          },
          "dateOfBirth": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "gender": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Gender"
              },
              {
                "type": "null"
              }
            ]
          },
          "fullName": {
            "type": [
              "string",
              "null"
            ]
          },
          "incorporationNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "incorporationDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "mobileNumber": {
            "type": [
              "string",
              "null"
            ],
            "example": "+2348031234567"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "submittedOn": {
            "type": "string",
            "format": "date"
          },
          "activatedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "closedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "rejectedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "withdrawnOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "reactivatedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "statusReason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the customer was closed, rejected or withdrawn."
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "addressVerifiedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "When the bank verified the address."
          },
          "kycTier": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 3,
            "description": "CBN KYC tier of a person."
          },
          "insiderRelationship": {
            "description": "Set when the customer is an insider of the bank.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/InsiderRelationship"
              },
              {
                "type": "null"
              }
            ]
          },
          "insiderNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "nextOfKin": {
            "description": "A person's next of kin, if recorded.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/NextOfKin"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "LegalForm": {
        "type": "string",
        "enum": [
          "person",
          "entity"
        ]
      },
      "Gender": {
        "type": "string",
        "enum": [
          "male",
          "female"
        ]
      },
      "CustomFieldValuesInput": {
        "type": "object",
        "description": "Custom field values keyed by field key, e.g. {\"marketAssociation\": \"Balogun traders\", \"dependants\": \"3\"}.",
        "additionalProperties": {
          "$ref": "#/components/schemas/CustomFieldValue"
        }
      },
      "Problem": {
        "type": "object",
        "required": [
          "title",
          "status",
          "code"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "description": "Machine-readable error code, e.g. `customer_not_found`.",
            "example": "tenant_not_found"
          },
          "errors": {
            "type": "object",
            "description": "Field problems, keyed by the request's JSON property path.",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "traceId": {
            "type": "string",
            "description": "The request's trace id."
          }
        }
      },
      "CustomerKycRules": {
        "type": "object",
        "required": [
          "bvnOrNinRequiredToOpen",
          "maxDocumentBytes"
        ],
        "properties": {
          "bvnOrNinRequiredToOpen": {
            "type": "boolean",
            "description": "Whether a new person needs a bvn or nin."
          },
          "maxDocumentBytes": {
            "type": "integer",
            "format": "int64",
            "description": "The largest document file, after Base64 decoding.",
            "example": 5242880
          }
        }
      },
      "Base64File": {
        "type": "object",
        "required": [
          "fileName",
          "contentBase64"
        ],
        "properties": {
          "fileName": {
            "type": "string",
            "maxLength": 200,
            "example": "nin-slip.pdf"
          },
          "contentBase64": {
            "type": "string",
            "contentEncoding": "base64",
            "description": "The file in standard Base64."
          }
        }
      },
      "CustomerDocument": {
        "type": "object",
        "required": [
          "id",
          "customerId",
          "type",
          "fileName",
          "contentType",
          "sizeBytes",
          "sha256",
          "uploadedAt"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "customerId": {
            "type": "integer",
            "format": "int64"
          },
          "type": {
            "$ref": "#/components/schemas/CustomerDocumentType"
          },
          "fileName": {
            "type": "string",
            "maxLength": 200,
            "example": "electricity-bill.pdf"
          },
          "contentType": {
            "type": "string",
            "enum": [
              "application/pdf",
              "image/jpeg",
              "image/png"
            ]
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          },
          "sha256": {
            "type": "string",
            "description": "Hex SHA-256 of the file."
          },
          "uploadedAt": {
            "type": "string",
            "format": "date-time"
          },
          "supersededAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When a newer document of the same type replaced this one; null while it is current."
          }
        }
      },
      "CustomerDocumentType": {
        "type": "string",
        "enum": [
          "idDocument",
          "proofOfAddress",
          "photo",
          "signature",
          "bvnEvidence",
          "ninEvidence"
        ]
      },
      "NextOfKin": {
        "type": "object",
        "required": [
          "name",
          "relationship",
          "mobileNumber"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 200,
            "example": "Chidi Obi"
          },
          "relationship": {
            "type": "string",
            "maxLength": 50,
            "example": "Brother"
          },
          "mobileNumber": {
            "type": "string",
            "pattern": "^(\\s*|[ ().-]*\\+?(?:[ ().-]*[0-9]){7,15}[ ().-]*)$",
            "description": "Stored the same way as a customer's mobile number.",
            "example": "+2348031234567"
          },
          "address": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "maxLength": 200
          }
        }
      },
      "CustomerIdentifier": {
        "type": "object",
        "required": [
          "id",
          "customerId",
          "type",
          "value",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "customerId": {
            "type": "integer",
            "format": "int64"
          },
          "type": {
            "$ref": "#/components/schemas/IdentifierType"
          },
          "value": {
            "type": "string",
            "example": "22212345678"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "verifiedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "When the bank verified a BVN or NIN."
          },
          "evidenceDocumentId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The evidence document sent with the verification, if any."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "IdentifierType": {
        "type": "string",
        "enum": [
          "bvn",
          "nin",
          "passport",
          "driversLicence",
          "voterCard",
          "cac"
        ]
      },
      "SavingsAccountStatus": {
        "type": "string",
        "enum": [
          "submitted",
          "approved",
          "active",
          "matured",
          "closed",
          "prematurelyClosed",
          "rejected",
          "withdrawn"
        ]
      },
      "SavingsAccount": {
        "type": "object",
        "required": [
          "id",
          "accountNumber",
          "accountNumberScheme",
          "productId",
          "officeId",
          "currency",
          "status",
          "balance",
          "holdAmount",
          "availableBalance",
          "debitsBlocked",
          "creditsBlocked",
          "dormant",
          "submittedOn",
          "terms"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "accountNumber": {
            "type": "string",
            "pattern": "^[0-9]{10}$",
            "example": "0001234567"
          },
          "accountNumberScheme": {
            "$ref": "#/components/schemas/AccountNumberScheme"
          },
          "dormant": {
            "type": "boolean",
            "description": "No customer-initiated transaction for the bank's dormancy period."
          },
          "dormantSince": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "reactivatedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The last reactivation from dormancy."
          },
          "productId": {
            "type": "integer",
            "format": "int64"
          },
          "customerId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "groupId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "officeId": {
            "type": "integer",
            "format": "int64"
          },
          "fieldOfficerId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "categoryId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SavingsAccountStatus"
          },
          "balance": {
            "$ref": "#/components/schemas/SignedAmount"
          },
          "holdAmount": {
            "$ref": "#/components/schemas/Amount"
          },
          "availableBalance": {
            "$ref": "#/components/schemas/SignedAmount"
          },
          "debitsBlocked": {
            "type": "boolean"
          },
          "creditsBlocked": {
            "type": "boolean"
          },
          "blockReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "submittedOn": {
            "type": "string",
            "format": "date"
          },
          "approvedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "activatedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "closedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "rejectedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "withdrawnOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "lockedInUntil": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "statusReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "terms": {
            "type": "object",
            "description": "The product's terms when the account was submitted.",
            "properties": {
              "nominalAnnualInterestRate": {
                "$ref": "#/components/schemas/Rate"
              },
              "interestCompounding": {
                "$ref": "#/components/schemas/InterestCompounding"
              },
              "interestPosting": {
                "$ref": "#/components/schemas/InterestPosting"
              },
              "interestCalculationMethod": {
                "$ref": "#/components/schemas/InterestCalculationMethod"
              },
              "daysInYear": {
                "type": "integer"
              },
              "minimumBalanceForInterest": {
                "$ref": "#/components/schemas/Amount"
              },
              "enforceMinimumBalance": {
                "type": "boolean"
              },
              "minimumBalance": {
                "$ref": "#/components/schemas/Amount"
              },
              "allowOverdraft": {
                "type": "boolean"
              },
              "overdraftLimit": {
                "$ref": "#/components/schemas/Amount"
              },
              "overdraftInterestRate": {
                "$ref": "#/components/schemas/Rate"
              },
              "withdrawalFee": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "monthlyFee": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "interestTiers": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InterestTier"
                }
              },
              "interestTierMethod": {
                "$ref": "#/components/schemas/InterestTierMethod"
              },
              "maximumBalance": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Customer credits can't take the balance above this."
              },
              "maximumWithdrawal": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The most one withdrawal or transfer out may be."
              },
              "dailyWithdrawalLimit": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The most withdrawals and transfers out may come to in a day."
              },
              "nonInterestContract": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/DepositContract"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        }
      },
      "SavingsTransactionInput": {
        "type": "object",
        "required": [
          "amount",
          "clientRef"
        ],
        "properties": {
          "clientRef": {
            "$ref": "#/components/schemas/ClientRef"
          },
          "amount": {
            "$ref": "#/components/schemas/PositiveAmount"
          },
          "transactionDate": {
            "type": "string",
            "format": "date",
            "description": "Defaults to today."
          },
          "reference": {
            "type": "string",
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "signedBy": {
            "type": "array",
            "description": "For an account with a mandate, the ids of its signatories who signed.",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          },
          "channelId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The transaction channel the money came or goes through."
          }
        }
      },
      "SavingsTransaction": {
        "type": "object",
        "required": [
          "id",
          "accountId",
          "type",
          "transactionDate",
          "amount",
          "currency",
          "reversed",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "accountId": {
            "type": "integer",
            "format": "int64"
          },
          "type": {
            "$ref": "#/components/schemas/SavingsTransactionType"
          },
          "transactionDate": {
            "type": "string",
            "format": "date"
          },
          "amount": {
            "$ref": "#/components/schemas/Amount"
          },
          "currency": {
            "type": "string"
          },
          "runningBalance": {
            "type": [
              "string",
              "null"
            ],
            "description": "The balance after this transaction in date order; null once undone."
          },
          "reversed": {
            "type": "boolean"
          },
          "reversedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "journalEntryId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "reversalJournalEntryId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "parentId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The transaction this one belongs to."
          },
          "counterpartyAccountId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The other account of a transfer, or the loan a loan disbursement paid out or a loan repayment repaid."
          },
          "counterpartyAccountKind": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CounterpartyAccountKind"
              },
              {
                "type": "null"
              }
            ],
            "description": "What counterpartyAccountId is, so a client can link to it; null when there is no counterparty."
          },
          "cashierId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The cashier whose till took or paid the cash; such a transaction is undone at the till."
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "channelId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The transaction channel the money came or went through, if one was named."
          }
        }
      },
      "TermDepositAccount": {
        "type": "object",
        "required": [
          "id",
          "accountNumber",
          "kind",
          "productId",
          "officeId",
          "currency",
          "status",
          "balance",
          "nominalAnnualInterestRate",
          "term",
          "termUnit",
          "depositAmount",
          "maturityInstruction",
          "funding",
          "prematureClosure",
          "submittedOn"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "accountNumber": {
            "type": "string",
            "example": "0001234567"
          },
          "kind": {
            "$ref": "#/components/schemas/DepositProductKind"
          },
          "productId": {
            "type": "integer",
            "format": "int64"
          },
          "customerId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "groupId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "officeId": {
            "type": "integer",
            "format": "int64"
          },
          "fieldOfficerId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SavingsAccountStatus"
          },
          "balance": {
            "$ref": "#/components/schemas/Amount"
          },
          "nominalAnnualInterestRate": {
            "$ref": "#/components/schemas/Rate"
          },
          "interestCompounding": {
            "$ref": "#/components/schemas/InterestCompounding"
          },
          "interestPosting": {
            "$ref": "#/components/schemas/InterestPosting"
          },
          "interestCalculationMethod": {
            "$ref": "#/components/schemas/InterestCalculationMethod"
          },
          "daysInYear": {
            "type": "integer"
          },
          "term": {
            "type": "integer"
          },
          "termUnit": {
            "$ref": "#/components/schemas/TermUnit"
          },
          "depositAmount": {
            "$ref": "#/components/schemas/Amount",
            "description": "Fixed deposits, the deposit; recurring deposits, each installment."
          },
          "maturityDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Projected while the application is pending; fixed on activation."
          },
          "maturityAmount": {
            "type": [
              "string",
              "null"
            ],
            "description": "Projected while the deposit runs; the actual amount once it matures or closes early."
          },
          "maturityInstruction": {
            "$ref": "#/components/schemas/MaturityInstruction"
          },
          "linkedSavingsAccountId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "funding": {
            "$ref": "#/components/schemas/PaymentMethod"
          },
          "prematureClosure": {
            "$ref": "#/components/schemas/PrematureClosure"
          },
          "prematureClosureRate": {
            "type": [
              "string",
              "null"
            ],
            "description": "The rate interest was finally paid at when closed early."
          },
          "renewedFromAccountId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "renewedToAccountId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "submittedOn": {
            "type": "string",
            "format": "date"
          },
          "approvedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "activatedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "closedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "rejectedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "withdrawnOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "lockedInUntil": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "statusReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "totalDeposited": {
            "$ref": "#/components/schemas/Amount",
            "description": "The deposit amount plus top-ups, or what was paid in."
          },
          "topUp": {
            "description": "Fixed deposits only.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/TopUpRules"
              },
              {
                "type": "null"
              }
            ]
          },
          "recurring": {
            "type": [
              "object",
              "null"
            ],
            "description": "Recurring deposits only.",
            "properties": {
              "installmentEvery": {
                "type": "integer"
              },
              "installmentUnit": {
                "$ref": "#/components/schemas/TermUnit"
              },
              "mandatoryInstallments": {
                "type": "boolean"
              },
              "installmentCount": {
                "type": "integer"
              },
              "expectedTotalDeposits": {
                "$ref": "#/components/schemas/Amount"
              },
              "totalDeposited": {
                "$ref": "#/components/schemas/Amount"
              },
              "paidInstallments": {
                "type": "integer"
              },
              "missedInstallments": {
                "type": "integer"
              },
              "missedAmount": {
                "$ref": "#/components/schemas/Amount"
              }
            }
          },
          "accountNumberScheme": {
            "$ref": "#/components/schemas/AccountNumberScheme"
          }
        }
      },
      "OpenFixedDepositInput": {
        "type": "object",
        "required": [
          "productId",
          "depositAmount",
          "term"
        ],
        "description": "Give either customerId or groupId.",
        "properties": {
          "productId": {
            "type": "integer",
            "format": "int64"
          },
          "customerId": {
            "type": "integer",
            "format": "int64"
          },
          "groupId": {
            "type": "integer",
            "format": "int64"
          },
          "submittedOn": {
            "type": "string",
            "format": "date"
          },
          "depositAmount": {
            "$ref": "#/components/schemas/PositiveAmount"
          },
          "term": {
            "type": "integer",
            "minimum": 1,
            "description": "In the product's term unit."
          },
          "maturityInstruction": {
            "$ref": "#/components/schemas/MaturityInstruction"
          },
          "linkedSavingsAccountId": {
            "type": "integer",
            "format": "int64",
            "description": "An open savings or current account of the same owner and currency."
          },
          "funding": {
            "$ref": "#/components/schemas/PaymentMethod"
          },
          "fieldOfficerId": {
            "type": "integer",
            "format": "int64"
          },
          "externalId": {
            "type": "string",
            "maxLength": 100
          },
          "customFields": {
            "$ref": "#/components/schemas/CustomFieldValuesInput"
          }
        }
      },
      "ClientRef": {
        "type": "string",
        "minLength": 1,
        "maxLength": 50,
        "pattern": "^[ -~]+$",
        "description": "Your own reference for this transaction, e.g. `USSD-55120` or a NIP session ID.",
        "example": "USSD-55120"
      },
      "PositiveAmount": {
        "type": "string",
        "pattern": "^(?=.*[1-9])\\d+(\\.\\d+)?$",
        "example": "1500.00"
      },
      "OpenRecurringDepositInput": {
        "type": "object",
        "required": [
          "productId",
          "installmentAmount",
          "term"
        ],
        "description": "Give either customerId or groupId.",
        "properties": {
          "productId": {
            "type": "integer",
            "format": "int64"
          },
          "customerId": {
            "type": "integer",
            "format": "int64"
          },
          "groupId": {
            "type": "integer",
            "format": "int64"
          },
          "submittedOn": {
            "type": "string",
            "format": "date"
          },
          "installmentAmount": {
            "$ref": "#/components/schemas/PositiveAmount"
          },
          "term": {
            "type": "integer",
            "minimum": 1,
            "description": "In the product's term unit."
          },
          "maturityInstruction": {
            "$ref": "#/components/schemas/MaturityInstruction"
          },
          "linkedSavingsAccountId": {
            "type": "integer",
            "format": "int64"
          },
          "fieldOfficerId": {
            "type": "integer",
            "format": "int64"
          },
          "externalId": {
            "type": "string",
            "maxLength": 100
          },
          "customFields": {
            "$ref": "#/components/schemas/CustomFieldValuesInput"
          }
        }
      },
      "LoanStatus": {
        "type": "string",
        "enum": [
          "submitted",
          "approved",
          "active",
          "overpaid",
          "closed",
          "writtenOff",
          "rejected",
          "withdrawn"
        ]
      },
      "Loan": {
        "type": "object",
        "required": [
          "id",
          "accountNumber",
          "productId",
          "type",
          "officeId",
          "currency",
          "status",
          "principal",
          "numberOfRepayments",
          "repaymentEvery",
          "repaymentFrequency",
          "interestRatePerPeriod",
          "interestRateFrequency",
          "annualInterestRate",
          "interestMethod",
          "amortization",
          "repaymentStrategy",
          "submittedOn",
          "expectedDisbursementOn",
          "disbursementFee",
          "balances",
          "arrears",
          "classification"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "accountNumber": {
            "type": "string",
            "description": "Assigned by NumCore.",
            "example": "0000000042"
          },
          "productId": {
            "type": "integer",
            "format": "int64"
          },
          "type": {
            "$ref": "#/components/schemas/LoanType"
          },
          "customerId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "groupId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "officeId": {
            "type": "integer",
            "format": "int64"
          },
          "loanOfficerId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/LoanStatus"
          },
          "principal": {
            "$ref": "#/components/schemas/Amount"
          },
          "approvedPrincipal": {
            "type": [
              "string",
              "null"
            ]
          },
          "numberOfRepayments": {
            "type": "integer"
          },
          "repaymentEvery": {
            "type": "integer"
          },
          "repaymentFrequency": {
            "$ref": "#/components/schemas/RepaymentFrequency"
          },
          "interestRatePerPeriod": {
            "$ref": "#/components/schemas/LoanRate"
          },
          "interestRateFrequency": {
            "$ref": "#/components/schemas/InterestRateFrequency"
          },
          "annualInterestRate": {
            "$ref": "#/components/schemas/Rate"
          },
          "interestMethod": {
            "$ref": "#/components/schemas/InterestMethod"
          },
          "amortization": {
            "$ref": "#/components/schemas/AmortizationMethod"
          },
          "repaymentStrategy": {
            "$ref": "#/components/schemas/RepaymentStrategy"
          },
          "submittedOn": {
            "type": "string",
            "format": "date"
          },
          "expectedDisbursementOn": {
            "type": "string",
            "format": "date"
          },
          "firstRepaymentOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "approvedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "disbursedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "closedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "writtenOffOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "rejectedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "withdrawnOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "statusReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "disbursementFee": {
            "$ref": "#/components/schemas/Amount"
          },
          "balances": {
            "type": "object",
            "required": [
              "principalOutstanding",
              "interestOutstanding",
              "feesOutstanding",
              "penaltiesOutstanding",
              "totalOutstanding",
              "overpaid"
            ],
            "properties": {
              "principalOutstanding": {
                "$ref": "#/components/schemas/Amount"
              },
              "interestOutstanding": {
                "$ref": "#/components/schemas/Amount"
              },
              "feesOutstanding": {
                "$ref": "#/components/schemas/Amount"
              },
              "penaltiesOutstanding": {
                "$ref": "#/components/schemas/Amount"
              },
              "totalOutstanding": {
                "$ref": "#/components/schemas/Amount"
              },
              "overpaid": {
                "$ref": "#/components/schemas/Amount"
              }
            }
          },
          "arrears": {
            "type": "object",
            "required": [
              "amount",
              "daysInArrears",
              "bucket"
            ],
            "description": "Everything owed on instalments due before today, unless within the product's arrears tolerance.",
            "properties": {
              "amount": {
                "$ref": "#/components/schemas/Amount"
              },
              "daysInArrears": {
                "type": "integer"
              },
              "overdueSince": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date"
              },
              "bucket": {
                "$ref": "#/components/schemas/ArrearsBucket"
              }
            }
          },
          "classification": {
            "type": "object",
            "required": [
              "class",
              "interestSuspended",
              "suspendedInterest",
              "provisionHeld"
            ],
            "properties": {
              "class": {
                "$ref": "#/components/schemas/LoanClass"
              },
              "classifiedOn": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date"
              },
              "interestSuspended": {
                "type": "boolean",
                "description": "Accrued interest is being suspended rather than recognised."
              },
              "suspendedInterest": {
                "$ref": "#/components/schemas/Amount"
              },
              "provisionHeld": {
                "$ref": "#/components/schemas/Amount",
                "description": "The loan loss provision posted for the loan."
              },
              "stage": {
                "type": "integer",
                "minimum": 1,
                "maximum": 3
              },
              "stageProbationSince": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "While the loan is on probation towards a better stage, the day it started."
              }
            }
          },
          "repaymentSavingsAccountId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "replacesLoanId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The loan this one tops up or refinances, or null."
          },
          "recovered": {
            "$ref": "#/components/schemas/Amount",
            "description": "Recovered since the loan was written off."
          },
          "recalculatedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The date of the latest prepayment that recalculated the schedule."
          },
          "variableRate": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LoanVariableRate"
              },
              {
                "type": "null"
              }
            ]
          },
          "creditLineId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The credit line the loan was drawn under."
          },
          "relief": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LoanRelief"
              },
              {
                "type": "null"
              }
            ],
            "description": "Present when the loan's product offers payment relief or the loan has been given some."
          },
          "feeRecognition": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LoanFeeRecognition"
              },
              {
                "type": "null"
              }
            ],
            "description": "Present when the disbursement fee is earned by the effective interest method."
          },
          "capitalisedFee": {
            "type": [
              "string",
              "null"
            ],
            "description": "The disbursement fee added to the principal at disbursement; null when it was taken from the payout."
          },
          "nonInterestContract": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FinancingContract"
              },
              {
                "type": "null"
              }
            ]
          },
          "financedAsset": {
            "type": [
              "string",
              "null"
            ]
          },
          "supplier": {
            "type": [
              "string",
              "null"
            ]
          },
          "customerContribution": {
            "type": [
              "string",
              "null"
            ],
            "description": "A Musharakah's customer part of the asset's price."
          },
          "ownershipTransferredOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "For an Ijarah or a Musharakah, the day the asset became the customer's, the day the financing was paid off."
          },
          "ijarahAsset": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LoanIjarahAsset"
              },
              {
                "type": "null"
              }
            ],
            "description": "An Ijarah's leased asset; null for any other loan."
          },
          "restructured": {
            "type": "boolean",
            "description": "An approved reschedule changed the loan's terms."
          },
          "restructure": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LoanRestructure"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "LoanPaymentInput": {
        "type": "object",
        "required": [
          "amount",
          "clientRef"
        ],
        "properties": {
          "clientRef": {
            "$ref": "#/components/schemas/ClientRef"
          },
          "amount": {
            "$ref": "#/components/schemas/PositiveAmount"
          },
          "transactionDate": {
            "type": "string",
            "format": "date",
            "description": "Defaults to today."
          },
          "reference": {
            "type": "string",
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "channelId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The transaction channel the money came or goes through."
          }
        }
      },
      "LoanTransaction": {
        "type": "object",
        "required": [
          "id",
          "loanId",
          "type",
          "transactionDate",
          "amount",
          "currency",
          "principal",
          "interest",
          "fees",
          "penalties",
          "overpayment",
          "reversed",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "loanId": {
            "type": "integer",
            "format": "int64"
          },
          "type": {
            "$ref": "#/components/schemas/LoanTransactionType"
          },
          "transactionDate": {
            "type": "string",
            "format": "date"
          },
          "amount": {
            "$ref": "#/components/schemas/Amount"
          },
          "currency": {
            "type": "string"
          },
          "principal": {
            "$ref": "#/components/schemas/Amount"
          },
          "interest": {
            "$ref": "#/components/schemas/Amount"
          },
          "fees": {
            "$ref": "#/components/schemas/Amount"
          },
          "penalties": {
            "$ref": "#/components/schemas/Amount"
          },
          "overpayment": {
            "$ref": "#/components/schemas/Amount"
          },
          "chargeId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "savingsAccountId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "savingsTransactionId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "journalEntryId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "reversed": {
            "type": "boolean"
          },
          "reversedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "reversalJournalEntryId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "channelId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The transaction channel the money came or went through, if one was named."
          }
        }
      },
      "LoanRateChange": {
        "type": "object",
        "required": [
          "id",
          "loanId",
          "effectiveOn",
          "previousRate",
          "newRate",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "loanId": {
            "type": "integer",
            "format": "int64"
          },
          "effectiveOn": {
            "type": "string",
            "format": "date"
          },
          "previousRate": {
            "type": "string",
            "description": "Per the loan's rate period."
          },
          "newRate": {
            "type": "string"
          },
          "fromInstallment": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The first instalment recalculated at the new rate; null when none was."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OwnershipCost": {
        "type": "object",
        "required": [
          "id",
          "loanId",
          "kind",
          "currency",
          "amount",
          "incurredOn",
          "journalEntryId",
          "reversed",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "loanId": {
            "type": "integer",
            "format": "int64"
          },
          "kind": {
            "$ref": "#/components/schemas/OwnershipCostKind"
          },
          "currency": {
            "type": "string"
          },
          "amount": {
            "$ref": "#/components/schemas/Amount"
          },
          "incurredOn": {
            "type": "string",
            "format": "date"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "journalEntryId": {
            "type": "integer",
            "format": "int64"
          },
          "reversed": {
            "type": "boolean"
          },
          "reversedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "LoanPrepaymentRecord": {
        "type": "object",
        "required": [
          "id",
          "loanId",
          "transactionId",
          "effect",
          "prepaidOn",
          "currency",
          "amount",
          "duesPaid",
          "principalPrepaid",
          "repaymentsBefore",
          "repaymentsAfter",
          "installmentBefore",
          "installmentAfter",
          "interestSaved",
          "undone",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "loanId": {
            "type": "integer",
            "format": "int64"
          },
          "transactionId": {
            "type": "integer",
            "format": "int64",
            "description": "The repayment transaction it made; undo that to undo the prepayment."
          },
          "effect": {
            "$ref": "#/components/schemas/PrepaymentEffect"
          },
          "prepaidOn": {
            "type": "string",
            "format": "date"
          },
          "currency": {
            "type": "string"
          },
          "amount": {
            "$ref": "#/components/schemas/Amount"
          },
          "duesPaid": {
            "$ref": "#/components/schemas/Amount",
            "description": "What was due on prepaidOn; the first part of the amount settled it."
          },
          "principalPrepaid": {
            "$ref": "#/components/schemas/Amount"
          },
          "repaymentsBefore": {
            "type": "integer",
            "description": "The loan's number of instalments before and after."
          },
          "repaymentsAfter": {
            "type": "integer"
          },
          "installmentBefore": {
            "$ref": "#/components/schemas/Amount",
            "description": "The first recalculated instalment's principal and interest, before and after."
          },
          "installmentAfter": {
            "$ref": "#/components/schemas/Amount"
          },
          "interestSaved": {
            "$ref": "#/components/schemas/Amount",
            "description": "Scheduled interest of the recalculated instalments, before less after."
          },
          "undone": {
            "type": "boolean"
          },
          "undoneOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "LoanPrepaymentInput": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanPrepaymentPreviewInput"
          },
          {
            "type": "object",
            "required": [
              "clientRef"
            ],
            "properties": {
              "clientRef": {
                "$ref": "#/components/schemas/ClientRef"
              }
            }
          }
        ]
      },
      "LoanPrepaymentPreviewInput": {
        "type": "object",
        "required": [
          "amount",
          "effect"
        ],
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/PositiveAmount"
          },
          "effect": {
            "$ref": "#/components/schemas/PrepaymentEffect"
          },
          "transactionDate": {
            "type": "string",
            "format": "date",
            "description": "Defaults to today."
          },
          "reference": {
            "type": "string",
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "maxLength": 500
          }
        }
      },
      "LoanPrepaymentPreview": {
        "type": "object",
        "required": [
          "effect",
          "prepaidOn",
          "currency",
          "amount",
          "duesPaid",
          "principalPrepaid",
          "repaymentsBefore",
          "repaymentsAfter",
          "installmentBefore",
          "installmentAfter",
          "interestSaved",
          "before",
          "after"
        ],
        "properties": {
          "effect": {
            "$ref": "#/components/schemas/PrepaymentEffect"
          },
          "prepaidOn": {
            "type": "string",
            "format": "date"
          },
          "currency": {
            "type": "string"
          },
          "amount": {
            "$ref": "#/components/schemas/Amount"
          },
          "duesPaid": {
            "$ref": "#/components/schemas/Amount"
          },
          "principalPrepaid": {
            "$ref": "#/components/schemas/Amount"
          },
          "repaymentsBefore": {
            "type": "integer"
          },
          "repaymentsAfter": {
            "type": "integer"
          },
          "installmentBefore": {
            "$ref": "#/components/schemas/Amount"
          },
          "installmentAfter": {
            "$ref": "#/components/schemas/Amount"
          },
          "interestSaved": {
            "$ref": "#/components/schemas/Amount"
          },
          "before": {
            "$ref": "#/components/schemas/LoanSchedule"
          },
          "after": {
            "$ref": "#/components/schemas/LoanSchedule"
          }
        }
      },
      "EventFeedPage": {
        "type": "object",
        "required": [
          "items",
          "lastPosition",
          "hasMore"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventFeedItem"
            }
          },
          "lastPosition": {
            "type": "integer",
            "format": "int64",
            "description": "The last item's position, or the `after` you sent when there are none."
          },
          "hasMore": {
            "type": "boolean",
            "description": "Whether more events wait after lastPosition now; if so, ask again at once."
          }
        }
      },
      "NotificationDeliveryEventType": {
        "type": "string",
        "enum": [
          "savings.credited",
          "savings.debited",
          "loan.disbursed",
          "loan.repaid",
          "transaction.reversed",
          "customer.created",
          "customer.activated",
          "customer.closed",
          "customer.rejected",
          "customer.withdrawn",
          "savings.created",
          "savings.approved",
          "savings.activated",
          "savings.matured",
          "savings.closed",
          "savings.rejected",
          "savings.withdrawn",
          "loan.created",
          "loan.approved",
          "loan.overpaid",
          "loan.closed",
          "loan.writtenOff",
          "loan.reopened",
          "loan.rejected",
          "loan.withdrawn",
          "approval.requested",
          "approval.approved",
          "approval.rejected",
          "approval.withdrawn",
          "approval.failed",
          "endOfDay.completed",
          "endOfDay.completedWithFailures",
          "notification.ping"
        ]
      },
      "TransactionAlertEvent": {
        "type": "object",
        "required": [
          "id",
          "type",
          "occurredAt",
          "tenant",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The event's id, the same on every delivery of it."
          },
          "type": {
            "$ref": "#/components/schemas/NotificationDeliveryEventType"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the posting was made."
          },
          "tenant": {
            "type": "string",
            "example": "yourbank"
          },
          "data": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TransactionAlertData"
              },
              {
                "type": "null"
              }
            ],
            "description": "Null for notification.ping."
          }
        }
      },
      "LifecycleEvent": {
        "type": "object",
        "required": [
          "id",
          "type",
          "occurredAt",
          "tenant",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The event's id, the same on every delivery of it."
          },
          "type": {
            "$ref": "#/components/schemas/NotificationDeliveryEventType"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the change was saved."
          },
          "tenant": {
            "type": "string",
            "example": "yourbank"
          },
          "data": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CustomerEventData"
              },
              {
                "$ref": "#/components/schemas/SavingsAccountEventData"
              },
              {
                "$ref": "#/components/schemas/LoanEventData"
              },
              {
                "$ref": "#/components/schemas/ApprovalEventData"
              },
              {
                "$ref": "#/components/schemas/EndOfDayEventData"
              }
            ]
          }
        }
      },
      "CustomerEventData": {
        "type": "object",
        "description": "customer.* events.",
        "required": [
          "customerId",
          "customerNumber",
          "legalForm",
          "officeId",
          "status",
          "previousStatus"
        ],
        "properties": {
          "customerId": {
            "type": "integer",
            "format": "int64"
          },
          "customerNumber": {
            "type": "string"
          },
          "legalForm": {
            "$ref": "#/components/schemas/LegalForm"
          },
          "officeId": {
            "type": "integer",
            "format": "int64"
          },
          "status": {
            "$ref": "#/components/schemas/CustomerStatus"
          },
          "previousStatus": {
            "description": "Null for customer.created and for the status event of a customer created in that status.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/CustomerStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "kycTier": {
            "type": [
              "integer",
              "null"
            ]
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "SavingsAccountEventData": {
        "type": "object",
        "description": "savings.* lifecycle events, for savings, current, fixed and recurring deposit accounts.",
        "required": [
          "accountId",
          "accountNumber",
          "accountType",
          "productId",
          "officeId",
          "currency",
          "status",
          "previousStatus"
        ],
        "properties": {
          "accountId": {
            "type": "integer",
            "format": "int64"
          },
          "accountNumber": {
            "type": "string",
            "example": "0001234567"
          },
          "accountType": {
            "$ref": "#/components/schemas/DepositProductKind"
          },
          "productId": {
            "type": "integer",
            "format": "int64"
          },
          "customerId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "groupId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "officeId": {
            "type": "integer",
            "format": "int64"
          },
          "currency": {
            "type": "string",
            "example": "NGN"
          },
          "status": {
            "$ref": "#/components/schemas/SavingsAccountStatus"
          },
          "previousStatus": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SavingsAccountStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "LoanEventData": {
        "type": "object",
        "description": "loan.* lifecycle events.",
        "required": [
          "loanId",
          "accountNumber",
          "loanType",
          "productId",
          "officeId",
          "currency",
          "principal",
          "status",
          "previousStatus"
        ],
        "properties": {
          "loanId": {
            "type": "integer",
            "format": "int64"
          },
          "accountNumber": {
            "type": "string",
            "example": "0001234567"
          },
          "loanType": {
            "$ref": "#/components/schemas/LoanType"
          },
          "productId": {
            "type": "integer",
            "format": "int64"
          },
          "customerId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "groupId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "officeId": {
            "type": "integer",
            "format": "int64"
          },
          "currency": {
            "type": "string",
            "example": "NGN"
          },
          "principal": {
            "type": "string",
            "description": "The approved principal, as a decimal string.",
            "example": "250000.00"
          },
          "status": {
            "$ref": "#/components/schemas/LoanStatus"
          },
          "previousStatus": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LoanStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ApprovalEventData": {
        "type": "object",
        "description": "approval.* events.",
        "required": [
          "approvalId",
          "action",
          "status",
          "previousStatus",
          "makerUsername",
          "createdAt"
        ],
        "properties": {
          "approvalId": {
            "type": "integer",
            "format": "int64"
          },
          "action": {
            "type": "string",
            "example": "deposits.account.close"
          },
          "resourceType": {
            "type": [
              "string",
              "null"
            ]
          },
          "resourceId": {
            "type": [
              "string",
              "null"
            ]
          },
          "officeId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "status": {
            "$ref": "#/components/schemas/ApprovalStatus"
          },
          "previousStatus": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ApprovalStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "makerUsername": {
            "type": "string"
          },
          "checkerUsername": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "decidedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "EndOfDayEventData": {
        "type": "object",
        "description": "endOfDay.* events, sent each time a run finishes.",
        "required": [
          "runId",
          "businessDate",
          "status",
          "trigger",
          "attempts",
          "startedAt",
          "failedSteps"
        ],
        "properties": {
          "runId": {
            "type": "integer",
            "format": "int64"
          },
          "businessDate": {
            "type": "string",
            "format": "date"
          },
          "status": {
            "$ref": "#/components/schemas/EndOfDayRunStatus"
          },
          "trigger": {
            "type": "string",
            "enum": [
              "manual",
              "scheduled"
            ]
          },
          "attempts": {
            "type": "integer"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "finishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "failedSteps": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The codes of the steps that failed; empty when the run completed."
          }
        }
      },
      "EndOfDayRunStatus": {
        "type": "string",
        "enum": [
          "running",
          "completed",
          "completedWithFailures"
        ]
      },
      "ApprovalStatus": {
        "type": "string",
        "enum": [
          "pending",
          "approved",
          "rejected",
          "withdrawn",
          "failed"
        ]
      },
      "LoanType": {
        "type": "string",
        "enum": [
          "individual",
          "group",
          "jointLiability"
        ]
      },
      "DepositProductKind": {
        "type": "string",
        "enum": [
          "savings",
          "current",
          "fixedDeposit",
          "recurringDeposit"
        ]
      },
      "TransactionAlertData": {
        "type": "object",
        "required": [
          "accountType",
          "accountId",
          "accountNumber",
          "direction",
          "amount",
          "currency",
          "balanceAfter",
          "narration",
          "transactionId",
          "transactionType",
          "transactionDate",
          "channel"
        ],
        "properties": {
          "accountType": {
            "type": "string",
            "enum": [
              "savings",
              "current",
              "fixedDeposit",
              "recurringDeposit",
              "loan"
            ]
          },
          "accountId": {
            "type": "integer",
            "format": "int64"
          },
          "accountNumber": {
            "type": "string",
            "example": "0001234567"
          },
          "customerId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The account holder; null for a group's account."
          },
          "groupId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "mobileNumber": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer's mobile number as stored when the event was written."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer's email as stored when the event was written."
          },
          "direction": {
            "type": "string",
            "enum": [
              "credit",
              "debit"
            ]
          },
          "amount": {
            "$ref": "#/components/schemas/Amount"
          },
          "currency": {
            "type": "string",
            "example": "NGN"
          },
          "balanceAfter": {
            "type": "string",
            "description": "Deposit accounts: the balance after the movement.",
            "example": "25300.00"
          },
          "narration": {
            "type": "string",
            "description": "The transaction's description, or a standard one for its type."
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "transactionId": {
            "type": "integer",
            "format": "int64",
            "description": "The savings or loan transaction; for transaction.reversed, the one undone."
          },
          "transactionType": {
            "type": "string",
            "description": "The savings or loan transaction type, e.g. deposit, transferOut, vat, repayment.",
            "example": "deposit"
          },
          "transactionDate": {
            "type": "string",
            "format": "date"
          },
          "channel": {
            "type": "string",
            "enum": [
              "teller",
              "staff",
              "standingInstruction",
              "loan",
              "shares",
              "system"
            ]
          }
        }
      },
      "Amount": {
        "type": "string",
        "pattern": "^\\d+(\\.\\d+)?$",
        "example": "1500.00"
      },
      "EventFeedItem": {
        "type": "object",
        "required": [
          "position",
          "id",
          "type",
          "occurredAt",
          "tenant",
          "data"
        ],
        "properties": {
          "position": {
            "type": "integer",
            "format": "int64",
            "description": "The event's place in the feed."
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The event's id, the same one webhooks send."
          },
          "type": {
            "$ref": "#/components/schemas/NotificationEventType"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "tenant": {
            "type": "string"
          },
          "data": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TransactionAlertData"
              },
              {
                "$ref": "#/components/schemas/CustomerEventData"
              },
              {
                "$ref": "#/components/schemas/SavingsAccountEventData"
              },
              {
                "$ref": "#/components/schemas/LoanEventData"
              },
              {
                "$ref": "#/components/schemas/ApprovalEventData"
              },
              {
                "$ref": "#/components/schemas/EndOfDayEventData"
              }
            ]
          }
        }
      },
      "NotificationEventType": {
        "type": "string",
        "enum": [
          "savings.credited",
          "savings.debited",
          "loan.disbursed",
          "loan.repaid",
          "transaction.reversed",
          "customer.created",
          "customer.activated",
          "customer.closed",
          "customer.rejected",
          "customer.withdrawn",
          "savings.created",
          "savings.approved",
          "savings.activated",
          "savings.matured",
          "savings.closed",
          "savings.rejected",
          "savings.withdrawn",
          "loan.created",
          "loan.approved",
          "loan.overpaid",
          "loan.closed",
          "loan.writtenOff",
          "loan.reopened",
          "loan.rejected",
          "loan.withdrawn",
          "approval.requested",
          "approval.approved",
          "approval.rejected",
          "approval.withdrawn",
          "approval.failed",
          "endOfDay.completed",
          "endOfDay.completedWithFailures"
        ]
      },
      "PrepaymentEffect": {
        "type": "string",
        "enum": [
          "reduceInstallment",
          "reduceTerm"
        ]
      },
      "LoanSchedule": {
        "type": "object",
        "required": [
          "currency",
          "disbursementOn",
          "principal",
          "disbursementFee",
          "totalPrincipal",
          "totalInterest",
          "totalFees",
          "totalPenalties",
          "totalRepayment",
          "installments"
        ],
        "properties": {
          "currency": {
            "type": "string"
          },
          "disbursementOn": {
            "type": "string",
            "format": "date"
          },
          "principal": {
            "$ref": "#/components/schemas/Amount"
          },
          "disbursementFee": {
            "$ref": "#/components/schemas/Amount"
          },
          "totalPrincipal": {
            "$ref": "#/components/schemas/Amount"
          },
          "totalInterest": {
            "$ref": "#/components/schemas/Amount"
          },
          "totalFees": {
            "$ref": "#/components/schemas/Amount"
          },
          "totalPenalties": {
            "$ref": "#/components/schemas/Amount"
          },
          "totalRepayment": {
            "$ref": "#/components/schemas/Amount"
          },
          "installments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LoanInstallment"
            }
          }
        }
      },
      "LoanInstallment": {
        "type": "object",
        "required": [
          "number",
          "fromDate",
          "dueDate",
          "principal",
          "interest",
          "fees",
          "penalties",
          "total",
          "principalBalance",
          "paid",
          "waived",
          "writtenOff",
          "capitalised",
          "outstanding",
          "overdue"
        ],
        "properties": {
          "number": {
            "type": "integer"
          },
          "fromDate": {
            "type": "string",
            "format": "date"
          },
          "dueDate": {
            "type": "string",
            "format": "date"
          },
          "principal": {
            "$ref": "#/components/schemas/Amount"
          },
          "interest": {
            "$ref": "#/components/schemas/Amount"
          },
          "fees": {
            "$ref": "#/components/schemas/Amount"
          },
          "penalties": {
            "$ref": "#/components/schemas/Amount"
          },
          "total": {
            "$ref": "#/components/schemas/Amount"
          },
          "principalBalance": {
            "$ref": "#/components/schemas/Amount",
            "description": "Principal still to be repaid after this instalment, on schedule."
          },
          "paid": {
            "$ref": "#/components/schemas/Amount"
          },
          "waived": {
            "$ref": "#/components/schemas/Amount"
          },
          "writtenOff": {
            "$ref": "#/components/schemas/Amount"
          },
          "capitalised": {
            "$ref": "#/components/schemas/Amount",
            "description": "Arrears on the instalment moved into principal of a later schedule by a reschedule."
          },
          "outstanding": {
            "$ref": "#/components/schemas/Amount"
          },
          "completedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "overdue": {
            "type": "boolean"
          }
        }
      },
      "OwnershipCostKind": {
        "type": "string",
        "enum": [
          "takaful",
          "maintenance",
          "other"
        ]
      },
      "LoanTransactionType": {
        "type": "string",
        "enum": [
          "disbursement",
          "repayment",
          "interestWaiver",
          "chargeWaiver",
          "writeOff",
          "refund",
          "capitalisation",
          "recovery",
          "penaltyWaiver"
        ]
      },
      "RepaymentFrequency": {
        "type": "string",
        "enum": [
          "days",
          "weeks",
          "months"
        ]
      },
      "LoanRate": {
        "type": "string",
        "description": "Percentage as a decimal string, per the product's interestRateFrequency, e.g. \"2.5\" for 2.5%.",
        "pattern": "^\\d+(\\.\\d+)?$",
        "example": "2.5"
      },
      "InterestRateFrequency": {
        "type": "string",
        "enum": [
          "perMonth",
          "perYear"
        ]
      },
      "Rate": {
        "type": "string",
        "description": "Percentage per year as a decimal string, e.g. \"7.5\" for 7.5%.",
        "pattern": "^\\d+(\\.\\d+)?$",
        "example": "7.5"
      },
      "InterestMethod": {
        "type": "string",
        "enum": [
          "decliningBalance",
          "flat"
        ]
      },
      "AmortizationMethod": {
        "type": "string",
        "enum": [
          "equalInstallments",
          "equalPrincipal"
        ]
      },
      "RepaymentStrategy": {
        "type": "string",
        "enum": [
          "penaltiesFeesInterestPrincipal",
          "interestPrincipalPenaltiesFees",
          "principalInterestPenaltiesFees"
        ]
      },
      "ArrearsBucket": {
        "type": "string",
        "enum": [
          "current",
          "bucket1",
          "bucket2",
          "bucket3",
          "bucket4"
        ]
      },
      "LoanClass": {
        "type": "string",
        "enum": [
          "performing",
          "passAndWatch",
          "substandard",
          "doubtful",
          "veryDoubtful",
          "lost"
        ]
      },
      "LoanVariableRate": {
        "type": "object",
        "required": [
          "indexId",
          "margin",
          "floor",
          "cap"
        ],
        "description": "A variable-rate loan's index and margin, and the floor and cap its rate stays within.",
        "properties": {
          "indexId": {
            "type": "integer",
            "format": "int64"
          },
          "margin": {
            "type": "string"
          },
          "floor": {
            "type": "string"
          },
          "cap": {
            "type": "string"
          },
          "effectiveOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The effective date of the index rate the loan's rate is on now."
          }
        }
      },
      "LoanRelief": {
        "type": "object",
        "required": [
          "lastOn",
          "installmentsGranted",
          "maxInstallments"
        ],
        "description": "Payment relief a loan has been given.",
        "properties": {
          "lastOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The latest relief's effective date."
          },
          "installmentsGranted": {
            "type": "integer",
            "description": "Instalments of payment holiday or interest-only period given so far."
          },
          "maxInstallments": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The most the loan's product allows."
          }
        }
      },
      "LoanFeeRecognition": {
        "type": "object",
        "required": [
          "fee",
          "earned",
          "deferred",
          "writtenOff"
        ],
        "description": "A disbursement fee earned by the effective interest method.",
        "properties": {
          "fee": {
            "$ref": "#/components/schemas/Amount"
          },
          "earned": {
            "$ref": "#/components/schemas/Amount"
          },
          "deferred": {
            "$ref": "#/components/schemas/Amount"
          },
          "writtenOff": {
            "$ref": "#/components/schemas/Amount"
          }
        }
      },
      "FinancingContract": {
        "type": "string",
        "enum": [
          "murabaha",
          "ijarah",
          "musharakah"
        ]
      },
      "LoanIjarahAsset": {
        "type": "object",
        "required": [
          "accounting",
          "ownershipCosts"
        ],
        "properties": {
          "accounting": {
            "$ref": "#/components/schemas/IjarahAccounting"
          },
          "ownershipCosts": {
            "$ref": "#/components/schemas/Amount",
            "description": "The bank's own costs of owning the asset recorded so far, less any reversed."
          },
          "cost": {
            "type": [
              "string",
              "null"
            ],
            "description": "Under fas32, the asset's cost while it is on the books; null under financing."
          },
          "accumulatedDepreciation": {
            "type": [
              "string",
              "null"
            ],
            "description": "Under fas32, the depreciation the books hold for it."
          },
          "netBookValue": {
            "type": [
              "string",
              "null"
            ],
            "description": "Under fas32, cost less accumulated depreciation."
          },
          "depreciatedThrough": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          }
        }
      },
      "LoanRestructure": {
        "type": "object",
        "required": [
          "restructuredOn",
          "reschedules",
          "capitalisedIncomeInSuspense"
        ],
        "description": "The latest approved reschedule of a restructured loan, and whether its classification is still held.",
        "properties": {
          "restructuredOn": {
            "type": "string",
            "format": "date"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "reschedules": {
            "type": "integer",
            "description": "How many reschedules of the loan were approved."
          },
          "classificationHeldAt": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LoanClass"
              },
              {
                "type": "null"
              }
            ]
          },
          "curedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "capitalisedIncomeInSuspense": {
            "$ref": "#/components/schemas/Amount",
            "description": "Capitalised interest, fees and penalties held in interest in suspense until the loan is cured."
          }
        }
      },
      "IjarahAccounting": {
        "type": "string",
        "enum": [
          "financing",
          "fas32"
        ]
      },
      "MaturityInstruction": {
        "type": "string",
        "enum": [
          "awaitClosure",
          "transferToSavings",
          "renewPrincipal",
          "renewPrincipalAndInterest"
        ]
      },
      "PaymentMethod": {
        "type": "string",
        "enum": [
          "cash",
          "savingsTransfer"
        ]
      },
      "InterestCompounding": {
        "type": "string",
        "enum": [
          "daily",
          "monthly",
          "quarterly",
          "semiAnnual",
          "annual"
        ]
      },
      "InterestPosting": {
        "type": "string",
        "enum": [
          "daily",
          "monthly",
          "quarterly",
          "semiAnnual",
          "annual"
        ]
      },
      "InterestCalculationMethod": {
        "type": "string",
        "enum": [
          "dailyBalance",
          "averageDailyBalance"
        ]
      },
      "TermUnit": {
        "type": "string",
        "enum": [
          "days",
          "weeks",
          "months",
          "years"
        ]
      },
      "PrematureClosure": {
        "type": "object",
        "properties": {
          "penaltyRate": {
            "type": [
              "string",
              "null"
            ],
            "description": "Percentage points taken off the rate; null for no penalty."
          },
          "penaltyBasis": {
            "$ref": "#/components/schemas/PenaltyBasis"
          }
        }
      },
      "TopUpRules": {
        "type": "object",
        "required": [
          "allowed"
        ],
        "properties": {
          "allowed": {
            "type": "boolean"
          },
          "minimumAmount": {
            "type": [
              "string",
              "null"
            ]
          },
          "cutoffDays": {
            "type": [
              "integer",
              "null"
            ]
          }
        }
      },
      "AccountNumberScheme": {
        "type": "string",
        "enum": [
          "nuban",
          "serial"
        ]
      },
      "PenaltyBasis": {
        "type": "string",
        "enum": [
          "wholeTerm",
          "completedTerm"
        ]
      },
      "SavingsTransactionType": {
        "type": "string",
        "enum": [
          "deposit",
          "withdrawal",
          "withdrawalFee",
          "feeCharge",
          "periodicFee",
          "interestPosting",
          "overdraftInterest",
          "transferIn",
          "transferOut",
          "prematureClosurePenalty",
          "loanDisbursement",
          "charge",
          "vat",
          "withholdingTax",
          "withholdingTaxRefund",
          "transferLevy",
          "loanRepayment",
          "sharePurchase",
          "shareRedemption",
          "shareDividend",
          "profitDistribution",
          "profitLoss"
        ]
      },
      "CounterpartyAccountKind": {
        "type": "string",
        "enum": [
          "savings",
          "current",
          "fixedDeposit",
          "recurringDeposit",
          "loan",
          "shareAccount"
        ]
      },
      "SignedAmount": {
        "type": "string",
        "pattern": "^-?\\d+(\\.\\d+)?$",
        "example": "-250.00"
      },
      "InterestTier": {
        "type": "object",
        "required": [
          "fromBalance",
          "annualRate"
        ],
        "properties": {
          "fromBalance": {
            "$ref": "#/components/schemas/Amount"
          },
          "annualRate": {
            "$ref": "#/components/schemas/Rate"
          }
        }
      },
      "InterestTierMethod": {
        "type": "string",
        "enum": [
          "wholeBalance",
          "banded"
        ]
      },
      "DepositContract": {
        "type": "string",
        "enum": [
          "qard",
          "wadiah",
          "mudarabah"
        ]
      },
      "CustomerKyc": {
        "type": "object",
        "required": [
          "customerId",
          "tiered",
          "identifiers",
          "documents",
          "tiers",
          "history"
        ],
        "properties": {
          "customerId": {
            "type": "integer",
            "format": "int64"
          },
          "tiered": {
            "type": "boolean",
            "description": "False for an entity; CBN KYC tiers apply to people only."
          },
          "tier": {
            "type": [
              "integer",
              "null"
            ]
          },
          "tierChangedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "requirementsMet": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the customer still meets their current tier's requirements."
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "addressVerifiedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "identifiers": {
            "type": "array",
            "description": "The customer's identifiers, with BVN and NIN verification.",
            "items": {
              "$ref": "#/components/schemas/CustomerIdentifier"
            }
          },
          "documents": {
            "type": "array",
            "description": "The current document of each type uploaded.",
            "items": {
              "$ref": "#/components/schemas/CustomerDocument"
            }
          },
          "nextOfKin": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NextOfKin"
              },
              {
                "type": "null"
              }
            ]
          },
          "tiers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KycTier"
            }
          },
          "history": {
            "type": "array",
            "description": "Tier changes, newest first.",
            "items": {
              "$ref": "#/components/schemas/KycTierChange"
            }
          },
          "balanceLimitAppliesTo": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "customer",
              "account",
              null
            ]
          }
        }
      },
      "KycTier": {
        "type": "object",
        "required": [
          "tier",
          "currency",
          "requirementsMet",
          "requirements"
        ],
        "properties": {
          "tier": {
            "type": "integer",
            "minimum": 1,
            "maximum": 3
          },
          "maxSingleCredit": {
            "type": [
              "string",
              "null"
            ],
            "description": "Largest single credit to a savings or current account; null means no limit.",
            "example": "50000.00"
          },
          "maxBalance": {
            "type": [
              "string",
              "null"
            ],
            "description": "Largest balance credits may take a savings or current account to; null means no limit.",
            "example": "300000.00"
          },
          "currency": {
            "type": "string",
            "example": "NGN",
            "description": "The limits apply to accounts in this currency only."
          },
          "requirementsMet": {
            "type": "boolean"
          },
          "requirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KycRequirement"
            }
          }
        }
      },
      "KycTierChange": {
        "type": "object",
        "required": [
          "id",
          "fromTier",
          "toTier",
          "reason",
          "changedOn",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "fromTier": {
            "type": "integer"
          },
          "toTier": {
            "type": "integer"
          },
          "reason": {
            "type": "string"
          },
          "changedOn": {
            "type": "string",
            "format": "date"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "KycRequirement": {
        "type": "object",
        "required": [
          "code",
          "description",
          "met"
        ],
        "properties": {
          "code": {
            "type": "string",
            "example": "bvn-or-nin"
          },
          "description": {
            "type": "string"
          },
          "met": {
            "type": "boolean"
          }
        }
      },
      "Approval": {
        "type": "object",
        "required": [
          "id",
          "action",
          "status",
          "httpMethod",
          "path",
          "makerUsername",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "action": {
            "type": "string",
            "example": "accounting.journal-entry.post"
          },
          "status": {
            "$ref": "#/components/schemas/ApprovalStatus"
          },
          "httpMethod": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "resourceType": {
            "type": [
              "string",
              "null"
            ]
          },
          "resourceId": {
            "type": [
              "string",
              "null"
            ]
          },
          "officeId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "payload": {
            "description": "The queued request body, redacted as in the audit trail."
          },
          "makerUsername": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "checkerUsername": {
            "type": [
              "string",
              "null"
            ]
          },
          "decidedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it was rejected."
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why this request needs approval when no maker-checker rule covers its action, for example a till limit."
          },
          "result": {
            "description": "How the request went when it ran after approval.",
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "required": [
                  "statusCode"
                ],
                "properties": {
                  "statusCode": {
                    "type": "integer"
                  },
                  "location": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "body": {
                    "description": "The response body, redacted."
                  }
                }
              }
            ]
          }
        }
      },
      "CustomFieldValue": {
        "type": [
          "string",
          "boolean",
          "array",
          "null"
        ],
        "items": {
          "type": "string"
        },
        "example": "Balogun market traders"
      },
      "InsiderRelationship": {
        "type": "string",
        "enum": [
          "director",
          "shareholder",
          "staff",
          "relatedParty"
        ]
      }
    },
    "parameters": {
      "Limit": {
        "name": "limit",
        "in": "query",
        "description": "Page size.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 200,
          "default": 50
        }
      },
      "Cursor": {
        "name": "cursor",
        "in": "query",
        "description": "The nextCursor from the previous page.",
        "schema": {
          "type": "string"
        }
      },
      "Id": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "integer",
          "format": "int64"
        }
      },
      "CustomerRef": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The customer's id, or their Customer ID.",
        "schema": {
          "oneOf": [
            {
              "type": "integer",
              "format": "int64"
            },
            {
              "type": "string",
              "pattern": "^C[0-9]{9}$"
            }
          ]
        },
        "example": "C482915307"
      },
      "CustomerId": {
        "name": "customerId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "integer",
          "format": "int64"
        }
      },
      "AccountNumber": {
        "name": "accountNumber",
        "in": "query",
        "description": "Only the account with exactly this number.",
        "schema": {
          "type": "string",
          "maxLength": 100
        }
      },
      "AccountSearch": {
        "name": "q",
        "in": "query",
        "description": "Case-insensitive search: accounts whose number or external id contains the text, or whose owner's name contains it.",
        "schema": {
          "type": "string",
          "maxLength": 100
        }
      },
      "TransactionId": {
        "name": "transactionId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "responses": {
      "Queued": {
        "description": "Queued for approval. Location is the approval.",
        "headers": {
          "Location": {
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Approval"
            }
          }
        }
      },
      "CustomerKyc": {
        "description": "The customer's KYC position",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CustomerKyc"
            }
          }
        }
      },
      "SavingsAccount": {
        "description": "The account",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SavingsAccount"
            }
          }
        }
      },
      "SavingsTransaction": {
        "description": "The transaction (201 when new, 200 when replayed or read)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SavingsTransaction"
            }
          }
        }
      },
      "SavingsTransfer": {
        "description": "Both legs of the transfer (201 when new, 200 when replayed)",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "from",
                "to"
              ],
              "properties": {
                "from": {
                  "$ref": "#/components/schemas/SavingsTransaction"
                },
                "to": {
                  "$ref": "#/components/schemas/SavingsTransaction"
                }
              }
            }
          }
        }
      },
      "TermDepositAccount": {
        "description": "The fixed or recurring deposit account",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/TermDepositAccount"
            }
          }
        }
      },
      "Loan": {
        "description": "The loan",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Loan"
            }
          }
        }
      },
      "LoanSchedule": {
        "description": "The repayment schedule",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LoanSchedule"
            }
          }
        }
      },
      "LoanTransaction": {
        "description": "The transaction (201 when new, 200 when replayed, read or undone)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LoanTransaction"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "bearer": {
        "type": "oauth2",
        "description": "A token from your bank's realm with the API client's id and secret. See Authentication.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://auth.numcore.io/realms/{bank}/protocol/openid-connect/token",
            "scopes": {}
          }
        }
      }
    }
  }
}