{
  "openapi": "3.0.3",
  "info": {
    "contact": {
      "email": "apiteam@peachfinance.com"
    },
    "description": "# Introduction\nThis API is organized around [REST](https://en.wikipedia.org/wiki/Representational_state_transfer).\n\nOur API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses,\nand uses standard HTTP response codes, authentication, and verbs.\n\nYou can use the API in test mode, which does not affect your live data. The API key you use to authenticate the\nrequest determines whether the request is in live mode or test mode.\n\n# Versioning\n\nThis API is versioned. For more information see [API Versioning Docs](https://docs.peachfinance.com/api-versioning).\nFor a list of available versions—and the breaking changes associated with them—see\n[Breaking Changes](https://docs.peachfinance.com/api-docs/breaking-changes). (Requires Docs Hub login.)\n\n# Pagination\nPeach Finance API utilizes cursor-based pagination via the `startingAfter`\nand `endingBefore` parameters. Both parameters take an existing Object ID\nvalue and return objects in reverse chronological order. The `endingBefore`\nparameter returns objects listed before the named object. The `startingAfter`\nparameter returns objects listed after the named object. If both parameters\nare provided, only `endingBefore` is used.\n\nThe size of the page can be limited using the `limit` parameter.\n`limit` is optional; the default is 25 and can be between 1 and 100.\nSending both `startingBefore` and `endingAfter` is not currently supported.\n\nSome endpoints will allow sending a `sortBy` parameter, enumerating the fields that can be used to\nsort the results returned by that particular endpoint. For example, if the results can be sorted by\n`createdAt` and `updatedAt`, then sending `sortBy=[updatedAt, -createdAt]` will return the results sorted\nby `updatedAt` in ascending order and `createdAt` in descending order lexicographically.\n\n# Metadata\nSome Peach objects have a `metaData` attribute. You can use this attribute to pass\nkey-value data as part of an object.\n\nMetadata can be used when you need to store additional information on an object. Metadata\nis not used by Peach. It is stored as part of an object and returned to you.\n\nDo not store any personal identifiable information (such as SSN) as metadata. Use dedicated\nattributes for PII as these attributes are encrypted.\n\nNote: Metadata attribute can hold up to 50 keys, with key names up to 100 characters long and values\nup to 500 characters long.\n\n# Attributes Formats\nSome Peach attributes use common formats.\n1. **Interest rate, promo rate and APR** - Rates are annual. Format is decimal. For example, 0.005 is 0.5% annual rate, 0.01 is 1% annual rate, 0.2 is 20% annual rate.\n2. **Dates** - Dates are in format `YYYY-MM-DD`. Dates are computed relative to either\n    - the company timezone, which is configured on the company config, or\n    - the product timezone, which is configured on the Loan Type.  Note: it is possible for a company to have multiple products with different timezones.\n3. **Date-times** - Timestamps are in ISO-8601 format expressed either in UTC like `2001-01-01T12:00:00Z` or with UTC offset like\n    `2001-01-01T12:00:00-07:00`. Some date-times will include subsecond precision to an arbitrary number of digits like `2001-01-01T12:00:00.123Z`.\n4. **Amount** - Amounts are in decimal format with 2 places after the decimal point. For example, 32.45 is thirty-two dollars and forty-five cents.\n\n# Identifiers\nPeach objects always have unique identifiers created by Peach. Some objects support external IDs. If external ID is supported, the object will have `externalId` attribute. You can fetch objects using external ID (only objects that support external IDs).\nPeach IDs have the same format XX-YYYY-YYYY.\n\nXX - is a prefix from the list below.\n\nYYYY-YYYY - is a random set of numbers and letters (capital characters A-Z and digits 1-9). The digit zero is not used to avoid confusion with capital letter O.\n\n## External IDs\nExternal IDs allows avoiding the need to map IDs between your system and Peach. You can pass your IDs when creating various objects at Peach and then use the same IDs to fetch\nthe information back.\n\nWhen fetching data with external IDs or when sending a request that requires a reference to an object using its external ID (for example, inside a body of a POST request), there is\na need to add a `ext-` in front of the ID. This will make sure Peach knows these are external IDs being used.\n\nFor example, fetching a borrower using the external ID would look like `GET /api/people/ext-MY_EXTERNAL_BORROWER_ID`.\n\nWhen creating objects with external IDs, the `ext-` prefix is not needed.\nFor example, when creating a new borrower the body would look like:\n```\nPOST /api/people\n{\n  \"externalId\" : \"MY_EXTERNAL_BORROWER_ID\"\n  ...\n}\n```\n\n## List of Prefixes\n\n| Prefix | Object |\n| --- | ----------- |\n| UR | User |\n| BO | Borrower |\n| BN | Person Name |\n| BI | Person Identity |\n| CT | Contact |\n| LT | Loan Type |\n| IR | Investor |\n| LN | Loan |\n| LN | Loan Draw |\n| LA | Installment Advances |\n| CP | Company |\n| TX | Transaction |\n| EV | Event |\n| EM | Event Message |\n| PT | Payment Instrument |\n| PA | Payment ID |\n| DD | Document Descriptor |\n| FT | Fee Type |\n| MS | Person Monitoring Status |\n| CS | Case |\n| CE | Case Type |\n| AP | Autopay |\n| IN | Interaction |\n| DT | Do Not Interact Type |\n| DN | Do Not Interact |\n| NT | Notification Type |\n| NO | Notification |\n| TD | Template Descriptor |\n| TV | Template Version |\n| CO | Code |\n| CR | Compliance Rule |\n| SR | Service |\n| FD | FEMA Disaster Details |\n| NT | Note |\n| CN | Consent |\n| LR | Legal Representative |\n| RL | Role |\n| PM | Permission |\n| WT | Workflow Type |\n| ST | Workflow Step Type |\n| IT | Workflow Item Type |\n| WF | Workflow |\n| WS | Workflow Step |\n| WI | Workflow Workitem |\n| VT | Verification Type |\n| VE | Verification |\n| VA | Verification Attempt |\n| OB | Obligation |\n| RE | Repayment Notification Descriptor  |\n| LP | Loan People |\n| RA | InterestRate |\n| PE | Period (loan)  |\n| IA | Loan Investor Association |\n| SE | Settlement |\n| RF | Loan Refund |\n| SM | Statement |\n| SA | Statement Activity |\n| SD | Statement Draw Info |\n| LF | Loan Fee |\n| AE | Autopay Expected Payment |\n| FE | FEMA Disaster |\n| TY | Loan Tape Type |\n| TA | Loan Tape |\n| MR | Merchant |\n| LS | Loan Reporting Status |\n| CA | Credit Agency |\n| CL | Collection Agency |\n| CI | Card Issuer |\n| WH | Webhook |\n| AF | ACHFile Upload Monitoring |\n| FB | Funding Account Balance |\n| BC | Borrower Campaign |\n| RN | Campaign Run |\n| CX | Contact  Exporter|\n| TC | Transaction Chargeback |\n| PS | Promise to Pay Plan |\n| P2 | Promise to Pay Period |\n| LL | Loan Label |\n| AK | API Key    |\n| AT | AI Call Transcription Result |\n| SU | AI Call Summary Result |\n| RC | Rate Cap |\n\n# Events\nOur system supports pull events via our REST API.\nYou can see more information <a href=\"/api-docs/api-public/events\">here</a>.\n\n# Compliance Guard\nCompliance Guard covers core regulatory obligations related to servicing and\ncollections. It does not cover rules required for debt collection agencies\n(though some of them are applicable to creditors and servicers as a best\npractice.)\n\nCompliance Guard allows you to:\n  - Run real-time regulatory checks before initiating an outbound communication\n  with a borrower. Rules cover laws on the federal level and 50 states + DC. The\n  system runs appropriate rules based on loan type, loan status, location of a borrower,\n  borrower status, and past communications.\n  - Monitor for bankruptcy, deceased, active military, and FEMA (disasters). You can\n  monitor for all four or any combination of the four. On hits, we automatically create \"cases\"\n  with all details, block future outbound communications (if needed), and notify\n  you about the cases.\n\n## Configuring Compliance Guard\n- Peach will configure an appropriate loan type for you. It allows us to select a\npredefined set of regulatory rules\n- Peach will work with you to override regulatory rules based on your risk appetite. You\ncan \"mute\" rules. You can add rules. This is typically done with your legal\nand compliance teams.\n- Peach will work with you to add business rules based on your needs. For example, don't\nallow outbound debt collection calls on Sundays. This is typically done with your\noperations and product teams.\n\n## Implementing Compliance Guard in your system\n- You need to create borrower and loan objects in the Peach system. For more details\nsee <a href=\"/api-docs/api-public/borrowers\">Borrower Management</a> and <a href=\"/api-docs/api-public/loans\">Loans Management</a>.\n- You need to report all communications with a borrower. Not required for monitoring.\nThis way Peach can track all interactions with the borrower. For more details see\n<a href=\"/api-docs/api-public/communicator\">Communicator & Interactions</a>.\n- When sending a communication through Peach it will automatically check Compliance\n  Guard rules to determiend if the communication is compliant. If it is not compliant,\n  the communication will not be rejected. (Some send endpoints do not perform\n  Compliance Guard checks, but they should be clearly marked.)\n- You can also manually check if a communication is compliant by using the\n  <a href=\"/api-docs/api-public/compliance-guard/peach.people.handlers.can_interact\">Can interact</a> endpoint.\n\n# Locks\nPeach ensures consistency of the loan's ledger and balances. In order to make sure that\nmultiple operations are not writing to the ledger at the same time, Peach uses locks to protect\nthe consistency of the loan.\n\nIn situations where an API call affects a loan's ledger, the system will lock the\nloan to protect its consistency. Subsequent calls that affect that loan's ledger might\nreturn a `423 Locked` status if the loan is still locked. In these cases, you can make\na call to <a href=\"/api-docs/api-public/loans/peach.people.loans.handlers.get_lock_status\">Lock Status</a>\nto check if the loan is still locked.\n\nIf you are trying to make a call and get `423 Locked`, consider polling on the <a href=\"/api-docs/api-public/loans/peach.people.loans.handlers.get_lock_status\">Lock Status</a>\nto check when the lock is released. Most locks are short.\nSome API calls (e.g. retroactive interest adjustment or payment backdate)\ncan trigger a loan replay. Loan replays can last several minutes, during which the loan will\nbe locked.\n\n# Sync calls\nMost of the API endpoints are asynchronous by design. There are situations in which you\nmight want to wait until the API call/operation finishes. Some API endpoints have\na special query parameter called `sync`.\n\nFor example:\n- <a href=\"/api-docs/api-public/payment-instruments/peach.payment_instruments.handlers.person_payment_instrument_create\">Create Payment Instrument</a>\n- <a href=\"/api-docs/api-public/line-of-credit-purchases/peach.people.loans.purchases.handlers.draw_purchases_create\">Create Purchase</a>\n\nWhen `sync=true`, the call will be blocked until the async operation has finished.\nIf the operation takes too long, you will get a `408 Request Timeout` response.\nIn that case, you need to poll on that specific operations' result.\nFor example: if you make a call to add a Payment Instrument, and it times out, you can poll\nthe `/payment-instruments` endpoint to see if the new payment instrument has been added.\n\n# Errors\n\n**BETA** - Standardization of error response bodies is in progress.\n\nPeach uses conventional HTTP response codes to indicate the success or failure of an API request.\nIn general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that\nresulted from the provided information (e.g., a required parameter was missing), and codes in the 5xx\nrange indicate an error with the Peach service.\nError response bodies have the following JSON format:\n```json\n{\n    \"statusCode\": 400,\n    \"message\": \"A description of the error.\",\n    \"errorType\": \"TheErrorType\"\n}\n```\nFor a list of error types, see the <a href=\"/api-docs/api-public/errors\">Errors</a> section.\n",
    "license": {
      "name": "Proprietary",
      "url": "https://www.peachfinance.com/terms-of-use"
    },
    "termsOfService": "https://www.peachfinance.com/terms-of-use",
    "title": "Peach Finance API",
    "version": "2023-11-29",
    "x-logo": {
      "altText": "Peach Finance",
      "backgroundColor": "#FFFFFF",
      "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA1wAAAE0CAYAAAA43TLaAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAC+FSURBVHgB7d3PbltXtufxtQ/txHYKKPaggZukgZBxzU0Pbl2nJ6GewMrgom13AMtPYEqpeaR5ItFPYBpI20bXIPITmJl0OVWDMPNyeAJcJwXcwWUBlVhJmWf13iTlP7L+i/ucffb5fgDHf2NLlESe31lrr2UkQsPOx+3MjBfdj5NabbP52Rd9AQAAAICcGYnM45VrS0b09o5fTlWSW0k23mx276cCAAAAADmILnB9t3J1aL9r7PkHVPpqzJ0ky/qELwAAAAA+xRi49Ah/fFPFPDi/frcnAAAAADBnVQ9c21Ijpi9JcofzXgAAAADmhcD1ulRVHiSqXVoOAQAAAJwEgWs/Rgaq5hbnvQAAAAAcB4HrsJ4P2/h5s9ndHAkAAAAAHIDAdWRmZB+0Tc57AQAAADgIgetkpsM2MrnV7N4dCAAAAAC8hMA1PyxXBgAAAPAKApcPLFcGAAAAIASuPGxmRu787vN7mwIAAACgUghc+WG5MgAAAFAxBK5isFwZAAAAqAACV9FYrgwAAABEi8AVktmwjfPrd3sCAAAAoPQIXEFiuTIAAAAQAwJX+FiuDAAAAJQUgatcWK4MAAAAlAiBq6w47wUAAAAEj8BVckZMT7Kfl5vdzZEAAAAACMopQamp6JIm59wPbwgAAACAoCSC0jM2dA3/8HFbAAAAAASFwBWLLLsuAAAAAIJC4IqEirYFAAAAQFAIXAAAAADgCYELAAAAADwhcAEAAACAJwQuAAAAAPCEwAUAAAAAnhC4AAAAAMATAhcAAAAAeELgAgAAAABPCFwAAAAA4AmBCwAAAAA8IXABAAAAgCcELgAAAADwhMAFAAAAAJ4QuAAAAADAEwIXAAAAAHgSYeAyIwEAAACAAEQXuIzRgQAAAABAAOKrcI11TQAAAAAgANEFrmb3fl+F0AUAAACgeFEOzTi/fn+V0AUAAACgaNFOKXShy2TatMHrhqhwrgsAAABA7oxUxLBzpaHGrNr3+EP704bEJ31//V5TAAAAAASjMoHrZTZ8tW34WhJjLotoXeJA4AIAAAACU8nA9bLHK1eWEkkuq+iilBuBCwAAAAhM5QPXNtdymCXSToy5riptKR8CFwAAABAYAtcuJuHLmI4xclnKc96LwAUAAAAEhsB1gBfnvYIftkHgAgAAAAJD4DqCYefqohpZtI/adQkPgQsAAAAIDIHrGAI970XgAgAAAAJD4DqhSfgSs2gSuSnFthwSuAAAAIDAELjmaNi51lKjnYLOexG4AAAAgMAQuDx5adhGXue9CFwAAABAYAhcng07i/UsObOYw3kvAhcAAAAQGAJXjraHbRgxn8r8Ww4JXAAAAEBgCFwF8XDei8AFAAAABIbAFYA5nfcicAEAAACBIXAF5ITnvQhcAAAAQGAIXIE68n4vNYP3N+5eFAAAAADBIHCVwEsth3ue9zJies31uzcEAAAAQDAIXCUz7FxdlMRcV9HF57+okhrVhWb3fioAAAAAgkHgKinXcmg/fK3pz572m93NkQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIlhEEZdhZrIuca4xr2jBq7I/dN60nIu+531f7Y/uf+qH+MiMjI2aUqf5djBnZX0nV6KhmaiN59ixtdu+nAgAAAMAbAlcBtkNVlkhLVFvGTMJUaztcSZ6MDCSTkYp8a0PZIEmSVJ79Y9Dsbo4EAAAAwIkQuDybhqvftLJEW4noBVuhattfbkjobBCzFbZBJubbJNN+s3t3IAAAAACOhMA1Z88Dlhkv2gf3gq0atXKvWnnhWhK1r5J8RQADAAAADofANQfDzpVGltQWjWaX4wlYB0qNmL4kyZ3mZ1/0BQAAAMBrCFzHNOx83JYk+1BFl6QMLYJemZH9RNocG33wu8/vbQoAAACACQLXEQw711qSyGVC1r6ofAEAAAAzBK4DuDNZWfLW0rRdUNqCo0hVzFqSZX1G0AMAAKCKCFx7cC2Dk8EXxlyvyJksj6Yth5JlawQvAAAAVAmBawcXtNSMP6Wa5YcR06PdEAAAAFVB4JLZKPfk3E3OZuVIpW9qtTWCFwAAAGJW6cD1ImhJh7bBghC8AAAAELFKBi6CVngmrYac8QIAAEBkKhe4Hq9cWzKinwqtg0EieAEAACAmlQlcDMMolck4+fPrd3sCAAAAlFj0gcu1D47N2W5i5LqgbFKT6QLVLgAAAJRVIhEbfnLtpibnhoSt0mpoYobDlWufCgAAAFBCUVa4hp1rLTW6QftgVKh2AQAAoHSiq3C5aogm+g1hKzpUuwAAAFA60VS4hp0rjSyRTSPmgiB2VLsAAABQClFUuKZntZJvCFuV4apdD92IfwEAAAACVuoK12yB8W0VXRRUkg3Zq831u2sCAAAABKi0gWsyGCPRL4UFxlDpG9UbtBgCAAAgNKVsKZy2EMpDIWzBMdJ2LYbuHJ8AAAAAASldhWu4cnVDRToCvC412bOPmt0/DgQAAAAIQGkClzuvpebsl4x7x0FsIF8+v36vKwAAAEDBShG4XKuYaxkTWghxSAzTAAAAQAiCP8M1HY5B2MLRqOgqS5IBAABQtKAD118/ubrIcAwcF6ELAAAARQu2pfD7T65eH6v0BDgh2gsBAABQlCArXG7sO2EL80KlCwAAAEUJLnANV658qqpMmMNcEboAAABQhKBaCidhS8yqAJ7QXggAAIA8BRO4CFvIS01l6b2Ne3cEAAAA8CyIwMWADOTNJLWF5mdf9AUAAADwqPDA5Ua/JypfCpCvkcn0YrN7PxUAAADAk0ID17BzpaFJ8o2I1gXIX2qypzZ0bY4EAAAA8KCwKYXTsGUeErZQoIaas1RXAQAA4E0hFa5hZ7GuyVlb2ZKG4DBSI2aQqX4vKqkkZpRkWbr9e7v8+cb0O1PPEuMCbcMm6/fEaEPVtAi5rzKSdJvr/2dZAAAAgDkrJnCtXN1QkY7gdSoD+9h8JcYMbKjq+zhj5AKvyJlWliRtG8Qu2H+vXfUQlhn56Hef39sUAAAAYI5yD1yMf9/JjFT1TqLSF3naL+o80bBzrZWJtpOaXFZ1AaxyGKIBAACAucs1cA07H7c1GT+UytsOWbppL/D7Ehh3vi5LpJ0Yc71S4cuG3vc37i0IAAAAMCe5Ba4XQzIqfG7LXtAb1bUQQ9ZeZuFryYi5LhX42HGeCwAAAPOUW+D6bvnqQ/uvtaVybDVLsltJttUt+/jxxytXlqpQ9WIpMgAAAOYll8BVzXNb8QStnWzVqy0182nEwYv9XAAAAJgL74Fr1ko4lMqIN2jt5IKXGrNhP4taEhlaCwEAADAPXgNX1fZtGTGbkmXLVZt051oN7fv+qUT2caa1EAAAACeViE/J2eguwnelrgVNF5rrdz+q4ljx8+v3e++v32uq6JpERMfjTwUAAAA4AW8VrqqMgFeVW4k+XeW8z1Rs0yhVZPn8+r2uAAAAAMfgJXBVopXQVbVUb5RpxHueHq9cWZ21GZbdyGRPmwRqAAAAHIeflsLYWwkn+7TcFDvC1l7Or99fNZm5aH+YSrnVJXmL1kIAAAAcy9wrXLFPJVQxa+fX764KDsV9PkjN3C77CHmTPbMB+48DAQAAAI5g7hWu2fmdCJlRZsYfEbaOxg0RaX5+b6HsAzXUnNoQAAAA4IjmGrger1xbkhhbCSdTCGXhd5//303BsbgWw1KHLiPt4R8+bgsAAABwBHMLXK51zIjGd9ZlOhxjodm9SzvZCU3PdekNKSnGxAMAAOCo5lfhSsxNia269TxsVW+3li/2seyVNnRR5QIAAMARzSVwTQZliHQkJoQtb2aha0FKiCoXAAAAjmIuUwr/uny1lxi5LrEgbOXCBvUlTcxtKRmT1Baan33RFwAAMHeN1qWG+/7ZrHNqLKaeiNbdj81L62ZO2R+P5MxoNOizKxNBO3Hgim4MPGErV6UMXSr99zfulbJCBwBACOqtdv0t+akhkrTtN9cp9Z59gW3JsY+nmIERtcHLfCuSpcb+/B9yZkAYQwhOHrhWrn2poosSBTMyWXaRsJWvxytXVu0TY6la9ahyHezd1qWHGvMC9NfY54/Ji/1Ean/+d/vcOFL7op/Is/TJ4C9RDt75F3snOhGJdB1I/uzn0K0ng6+7AnmndcndzG2INzr6YfD1fxPkwgWs38hWyz4n2mtGvWBfH9qSCxfE5KtMpP9U3uxXIYDZrx03VfuCeGIfy4W/DR6lUmKz5xcvXBX2yeDRKzfmT8kJ2OpEO56w5ZbbZh8RtvLnphf+dflqo0xtqdl47D7v+4I9zcJWQypD3fv8ys8dM/n1mntydz+zoUsnL/5j+/lT9heslzQEc2EvRusCd8Nmyf8NG1N/u/X7xR8Hf2bliycvQpZcV3m6mE0+v1Xype7fb9nn3ZvnZEveal3q21+8E9lz8Cvs+/rbat3wPJaGeLLbZ/jJhmbUylWV2I99kVuzYasvKERN3+zYD0JpKgDGhsNhZ5ELIxzRpF3GXUjetk++Q3eH7d3WB913W//aEgDP2a+RXK4vEkluCubuf7Qutd1z2zl5OrTVENftsCSB3ExwlbWXnoNvu7dVAM+OHbgmZ7c0r3KwX0ZM7/z63VVBYZrd3siofuTasqQc6llyLq7JnChCw9a/btoK2DfvtD74xt3VF6DiZhfADcmBu/jmgnt+pkHr0sNpyNKboYSsfSy5t3V684vnX/hz7MA1NmZVYqCSSvbzsqBwrp2zTDu6bJXrsgBzM2l7uc0LP6our+pWUf9ejF4NWqW8Gd/g+Rc+HStwuepWLGPgpxMJN5lgE4hm996mrZzekjJQbbEIGR7wwo/KckNY8r5gd/+eO2skOLIIgtZOPP/Ci2MFrliqW7NzW6kgKIm+uSov7dkI2Wx4BuDD9gv/7X+Z7aQBYmdEVqUA52SLFvEjcAH13dYHGxEFrZ0mz78uTPL8i3k4cuCKprqlknJuK0yT81wlaS1keAZysOTGrvOij9i5z3EbuAq6vtCbVLkOx1W1bED9RkWjD6kuTM6Ga9B2ihM5cuDKkqQtEXCthIJguYmRJWktrMup3zBhDr41EtFv3m59QEUV0apN9jMVxdSpch1su6ol1Rs5vvpO64MvufGF4zpy4DKipU/5biohrYThm7YWlmBqYZZFcZ4RoTN1+/z75butS3y+IUrTqXaF4mtrDy5oTJfZx1/V2psu0m2A4zpS4HKLjqXsdzUmUwmzNUHwXGuhShZ8lcst/6atEHlRkR5jrBGb2YCChhSrwdfW69yewCTes1pHRbcBjuVIgWtszJKUnKoyKKNEzq/fX5XwB2jQVohcZbbSxV1WxCSU0eyMiH+VC6AqSRVbCPcx7TZ4u/VvtKDi0A4duKIYluEGZXTv9wSlYitIwVckmVaIfJm6u+PMIX/EIM9FxwdhEfILrn15el4r+OXFhTBiNhimgcM6dOCKYViGq24JSsdWuXrGSF8CZiLZS4dSaZyVp7zYo/TsRX1QlYKMs1yTsOXalwUHWeVcLQ7j0IHLmMIPs54M1a1Sy1TvSNjqw86/01aIXNk7rB3uxqPMZq2xlyUsS1WuHrvzSYStw+NcLQ7jUIHLtRPaz6hSX0xS3So3V+UKfWJhlpxqC5AzzpygzIpadHyQqo6In+5Cy24LjoRztTjIoQJXlphyn0+x1a1EtjYFpRb6xEKjwd2lRQVw5gRlVeyi44NUbxGy+3gknNk6Js7VYn+HClxlP59ijOk3u5vh73PCvpLsTDfoKpcpdxUY5UWVC2VUC3rMuKmfladLUiH2gtDdmG4IjotztdjTgYErhnZC9m7Fwe3lMkYHEi7OcaEQrsrFnVWUTeg3CsKtvs3fbNreBcGJcK4Wezl10B9w7YRGSkylz96teGRq7hjRtgRqdo4r5FCISLkzJ6NAz8PMQSoVYZ/fKtGN4RYda/DVFNNyF8//MXjUl4hNl/jqqmAuMpHb9gbYxdGgT2cVnjswcCVGLqtKaWn40+1wBEn2xqYmv27Yj2yQd/MTMdwhzIm9EdSXIJi6StYo/tyDujOEqxKf9IfBo6YgMubmpMYVuFkVri+Rmp6j0w0Jho5slWhgH/evzORGy3hwWmqjdPAofflPuYr+W/KTfdtr9vlXW/bVt2H/3wsaRptqI/IbYDiGfQPXsLNUV/2lLSWWRPxEWUWurXD4ydWBvQnQlgBpwNW3yKRPBo8WJCDuAuA3stXKpi/4rhWpIbkyLXfx9LcdFyZAaFzVKJtcJIdveyhNrFWu2ZTIhhTKhazEda9s/sfg6/5h/g9XPRq96CZ5/v9Mg9iWG/R2vdjwpTft83GP52Ns2/cM17hW7rBFO2GcMpUHEq7GsLPIWZoKchcA7qLMVmNWXUXGPrm6QJhKjsIeQgBMjUWWpERUSj6peQ/FT4mctM+u/Sxnm08Gf+rMI9S652F7M67nbsjZm19NG7oK6nKaTC1kgAae239oRialfpJRE/SFOY4pyTTwEf+nG4LKm4Uv1wqX29Aee3HxoQABC3sU/O5UsusxDqWZjoAvwoug5W5Q+Trr5KpLPw4eLbng5doUJX9LDNDAtn0DV2LK/eKdZM/6gujMqpapBCpLTjOpEM+5CwrJLXSVo00L1RXqouP9mXpsi5Dd0BIpppXw20zMRZ9BaycXvGwF7aINXcuS81CabHJWEdgncE3GwZd5H4NK2uz+kWlxsVL5SkKlXPTiVe7iIqchHw0BAjUb0FDSBfFxLUIuYiS/DTy3fpYz7aLONdnQ1XVhT3K9YauLrOyAs2fgGtdMqS8a3bJjQbTUhDt63V5QNATYweRS5TJ1d1ErQICmZwyLnuZ5XGZ7GEPpFVTdWnPntIoele7C3huydTHPFsPYqqM4nr1bCkt+fivLsnArIDixoNtFDaPh8Tp3piuPKtdYxtxNRZD8VlXc2V7v7WKxLELO+/1Ym7VWByEdDEbTFsO8BmoobYXYO3AlSbk3jicypp0wYtN2URPqUkEueLEH86149obUaGlFcHxXVf4p2ZobLS4ebY+IlxJzb3/O49KDClsvezJ4tJRPq7epMzwDuwYut3/LPrOU+UV7xPmtCjCaSpjqszOQwCsyGfcFqCZvVRV30fyfg7+4m3A98UxLPuo735H8uhlq2Np2WrY+khzOdGWs7Ki8PSpcW+W+Q6rhnu/BHGXivVpwfLR14XWJnEoFqJgcqiqTytaTwf8b+K5YuPejrOckG61WPcehJWk2mQoYNtdeaC+Eb4h3ZR0Wg3nZNXBlSekHZqSC6IU8OGMspxoC7DCWzHsbrDKpEIHxXFVJ3aLb7Z/kMZwmKdni5m3/lDOLeQ0tcSGmqGmERzU9X2tuiVemxbTCaju12y+qSssYKa1MNODKB+bHneFSCZFJyjqJCwDmx/ei450By108v9u61PdbUZuMiO8WPXHvqOxjktcwtJ77OEiJuAmKjdalrnj0s6DKdg1ctUTe0zCvYw9Fs3CX4mJ+kuyfA01OSaAaAuxQk6SurpvfI815sSewH9+Ljse7thDqA/svt8Wb6SLkUfmWOOfS1pbltuh9vtKSVORQTru2FKqWu6WwdqrGBUclBPxxVqXChdcYybx/XiThTu9ExUzPDMmH4k9vt7a10/JLz/+I+HKN+s5xSl6vLK2EQJ5eC1zDzr/bsFXyi8Vnz1JB9Jrd+6kEKjHmtwLskMekqiyHc2LAYUzPDPmr9u9VSXGDEMT/mZxSjfpWMbm0E5a1ugX4tkuFq1b6O/MhX4hj7lIBSsKI8d7SU5OEwIUgeB6h/mC/SsobsuX1PI5TshHxPiuN26huAXt47QCMm1BY4nkZQBBUtSHAS9zd8EzUe7v2LzKOLHBpfbY0tyLGgyeTnVLl5j5mPidm2rvF+wYqV+V6p3XpgXg8t7S9CDn0ARGutfPXHJ57ktl4fgCve33igNonyHInrlRQGcZIqsqACoQvE7ktOfjPCC7WX2XqmtNjF4aaa8mK4WPobTKhlR4m5LhQlnkeFJGJcWe5+hKwZ3Imj3P5adkmEwJ5ei1wqWjDlDxxAUBI7J1213rUEO+Upe8o3Lut/9lSydriyWF3beU0In7R7VcKeUS8Tqpb3q/r+oLKsDczhvZ1TXB4r53hqiUc9geAeZmFrVXJhflegIJlknXEn1cWHR/Evi2eh2eIuBHxErSkIZ7RTgjs77XARXsWAJycO9th764/lBx39dh72JsCFMj3omM5YiXlx8GfN/MYEe+qXBIsvSCe/UPOUF0H9rHb1tiGAACOzF10vSVbbvzy9TxGwO/0q4y56EGhfC86Pt7Y8cmIeI8TBU39rDxdGh0wyKMo6v26Tgcht1QCIXglcA07S3WVXwQAwqb1d1qXViUAxl5s2bfnt9NzIlsNlcKk8Q3MQNkUsej4IG5E/K/y5k2ZfK36YabDM4IMXOI9cNHKDBxkR4Xrp8buRa9SKf0eMQAHmVw4BbEDR6XAiPWqvgAFymEU/LHOCbkR8e+2Prhjv1Zvij+NEEfEuxZP8Y8bPcABdpzhKv/SYyFwVQpnDoGp47VaAfPjdxGwDk4SZoyo9/ONIS5Crkni/ZpIJSNwAQdIJELDziKhqzJMkB9rY0wqQE6MrW4dp9UKmJe3W793Zxcb4omZnsM6NhfWjOcq8PYiZAmIkcz7a6QNdZzfAg7wSuDKEv+jQ/NxhsBVGcrHGmAkMwqWSOKzXe9Io+D3YnKoAmd+JzQG6RcZE7iAA+yocMVx8ToWk8dWdRRs2Pn3YD/O9kWXQ8TIy1wuRoHjcueEfC4XnldQmrUkpuLVdBGyBGKcS4WrRuACDrAjcIXZnnVUJonj/cBBQj5zqLwAIRcqZlmAAvkeBT+eYyugEfW8CNnUQ1qEnORwhgvAwaI8wyWqVLgqIEtCrmQaAhfy0Ptx8CeWHaMwOSw67s3zfOJp+aXHImQAeXs1cGkcLYX2DlZDEL+AJxQmSZIK4FfKZEIUrTbdP+XNvD/H3Yh4OeEAjoNNFyFLADLJuPkHBOCVwGViGaluzAVB9JJEwv04P/uFFzl4ZWT8EZMJUTQVXRRPfE3fdIuQxbNEzGUJQB4TBMcyppoHHCDOlkKRBqPh46cabkths/tH9pLAG3uRu/xk8Bc+x1Aot+hYPI6Ct9UZL5UoV+Wq4oh4X06JaQiAfcUauOwdl7NtQbSmEwqDbYGlugWf1n4cfO39Dj1wEM+LftMfB3/2dj4xjxHxISxCfuZ9KiODOYDDiDZwGeNvRC2KlyWnwx2YoULlAb6s/TB4tCpAwWbVm4Z44jsQ5bUI+b+3/rXQ16ozspXDDUBW8QAHiTdwScDne3BiqtqWQBljUgHmSl0L1A3CFkLhu7r1k5zJY/qm94Xhb8ipJSnQdEiI36mMyqAy4ECnJFa2wuXOcTW7m7R3RSgx8qEEKhP9VoD5SY1kH1X4zFYqOVwYhyLxXHWZB9+Ljq3+aND3/tp9WrY2f5U3N3zuIFXJrtdb7dU83p+9TdaUeGz702Bfj4FQxBu4nFO/cWXuviAqw84V92LfkEAlSY2WQsyFEXPrJ3mz4Iu1YtnKXvqEyl5QfC86zmvdgav+vNO65AZzeKzWTRchjzw/ZgdwNwEb4o2puxDO1FRgb1EHrmw8duNq+4KoZIlZNBKwZ89SAU5gerZkzCRCBKdsi44P4kbE2yrXTZ9VLrcIWQoMXPbGTaquCdTrvzFZD8Awn+pIpfwakqNXApcakxrPX5R5MmbyotARRCUxclnD/TQdNbv3UwGOwQUtNyzAHegXIEA1MYs+L96TnNtHXZXr3dYHd3Qaijwx9bdbv1/0OXVxf+r9xs1s7xiBqyJ+GDxqSom5G0f2uWYoOYp2aMZMffiHj9uCaEzaCTXgCZRMKMTRpfbb2s9y5r89GTxaIGwhZH6DiaRFfP7bG83eg1Aiic/HbV/jHDp93Jm+eqvNeHhgD3Gf4RLaCmOTJUk75CqsrRJ/JcC+3MRBM7CfxV+5AQkELJSFW3Ts+fxs453Wpdyf4DPxb3sRchFf765F853Wv438tk2KnJWnSyOqXMCudgauVCLj2gqHncVVphXGwYatwhdJ7idJkr4AL6SuncdI8r29rLM/zvo/yVtplYdgoLxCWORbZrPHry+FmNwMvCwe0VYI7C36CpdVz5KzS8KTQOkNO1faIU8nnHj2D1oKc2EGieiyBEZlPDottdFIzowIVYiJq85koT//Bm677a6I5wZ7s7Kv00DkTZFVPCB0O4Zm6MjEMzPjOfs+cdclAmNjloI+dKhmQCU1H/biYcSLOpCfjAFUc1HUiPixmE37+rkhnhVbxQPC9cr1a20c6ThrtwSZ4Rml5oZlJMbrKOITU1HObwGIjpvoJZ7b0apDbxYxXGI2aj8Vz1yV6+3WB4sC4BU7Wgpr0d6d1/GYuy4lZqtbq6GP1ExqtYJG/gKAP6bYpb2RKXQRshu57/0cnhHdsKGyX6a2andToeb5sRmLrLEcurp2BK4z9ovjF4nSrMrV/OyLvqBUJqPgjXwooeP8FoDI5LDouIrc47kqOXNTUbN8Bp80zsrTT+0FZXDnbPdiw9ZtV50Tj7bkTGkeD8zfK0WDZrfnxobGXuVC2SSTF6eGhEylz/ktALGpScB7D8ur4YZLSM7cuVeTU6ePEdMpS2vhO61Ln6r3z3MdMEip2l7v0jKaSqw4y1U6k+qWmCUJnKreEQCIDKPg/SjucdUHkhMj2e3Z+b9gzd6+VfHMSMIZ74p7LXBlmX4vEaPKVS7u7JaUYBRxwvlAAJFxi46FUfBebI9Ql5ydll96bvm65MLU7Wvjw1BDlxte4t4+yYER5Yx3xb0WuGwZOJWYUeUqjTJMJpyYjIO/nwoARMXcFHiTFXA2Lh0M3NGRW5KfRoihy4Wtc7LVl3xuKKSsMcEuLYX+x4YWTbPx7WFnMfexrDiiJPG+M2Qe1NBOCCAurvqioi2BT0tFjIh/Q7a6+VW5JoIKXe7tsGHrG/vDC5KPvqDyXgtcWoHAJe6ORvIWrYUBe7xybcm+2JfiwG2S0SoAIC5jGwYE3rkR8ZKzAqpcjg1d+s2sTbUw7kaCezskx1ZZW8lcE1Tea4GrNtZKjLZWyTq0FobJtRIa0XIE4sl0QtoJAcSDUfB5KmYRcgFVLnFnulTk9jutS7kP03CP8dutS71scmbL5Pl499i9Bee1wDW9eIx3NPzLVMcbtBaGpyyDMhymEwKIDYuO82TqZ+XpkuSsoCrXtiXXYvh269+8V/dc0HJj38/J02ERNxGobmFbstsvGlONKpetTrRoLQzL8JNrN0sxKGMmkS3aCQFEY1rd0suC3BRVTfxh8GjVfpdKMeznmdmwYWj4buuDjXlXvFzroP17uy5oyeQGgini5jrVLTx3ardfzDL51phqLDuctRY+aH72RV9QqMnOLS3PnVX7YtFj2THgl9oLs6LPfeRrPHgy+EthNz3domMt5uK0wkzLBYQiJtnZu+43spxGo++hoaId+3Z07Nd5f7onLOsf9WugYQPbP6fLiz9057/t+1SfPHu4OFuMlOoWXrZr4LIlrsH0E7UaNBt/aS/2L3IWpziutVMTY5/0tTwv9ElCOyHgX8Od+5DKqLmLtMICF4uOizF73PuSMxfybCXolg0pha8A0ElgMm0X+23ly/6KuxaV1Eam73XHeTMzuSmgv7U3B1o2oDV+nQSsF79bNPv23vrb4OtUgJldA1eSZX178SsVUteasaFrcYGKRUGSc/aCShtSFm73FlVRABFxlURl0XEhthchF1HlOi1PV3+VM66NtCFBmawlaO12+1+fFwUKrWLtyr41/R8GX3cFeMmugctVer5buTYqVbXhpFRaWXLO7X26IcjVcOXKp2UZAb9NNSvqsDEA+OL7LFEqpeWuh/y2WtpqjXsd7EvO3ACNf2ldWpiOS6ed9ITSMdeR2MWpvX7DDc5QrcY5rm1GdGm4ci1trt+l7zYn07A1mUpYHirp+e79ngBAJFx1JRN/r/nurv+TwaMFKalGq1W3VaD/Eo9Usuv1Vnt1NOjn3mnjhjvYCudytdp3589ezyz/bfCnVIAdkr1+I1N5IBVkKy2rNnTRw56D7z+5er10YUsmo+AJ5ACi4nvRcSbl7gpwVSDjvfpk6kUsQt5mA3FPGPRwEms/Dv7E5GLsas/AlWQVGQ2/C0KXfy5sjVV6Uja2upUU0PIBAL7ksOg4/XHw59JfiJpcwkgxi5C3uVHxprj9XGW2NhuzD+xqz8DV7N7vV2UB8m4IXf6UNmyJm5Vh7jDNEkBMfC86NpFUTdxAizyqXG/JVqFnmp8M/tSx7ydTeA9J7WNF2MJBkv1+szILkPdA6Jq/MoetSXUry3oCAJFwZ5PsxfWH4k/6k5yJqc0qjyBSyCLklz0ZPFoidB3Mha0f7WMlwAH2DVxVPcf1MkLX/LgBGaUNW0J1C0B8/ilnXDWlIf70ixgC4ctp2bLhUb2+P9sj4qVg09BFe+Fe3GND2MJh7Ru4kkw5/CfT0PXdylW3p4txqcc0XLm6UcYBGc9R3QIQId+LjrPIhjC44RmSQwgJZQG1ay8UBmnsZm322ACHsm/gmt3NTwXOoiZnvxl2rjQEh+ZC6nfLVx/aF49SPzG5yYRUtwDExC06Fr/VrQdu3LhE5g3Z8r7U1lW53DATCcBskMayQFx1096EX+bMFo4qOegPKG2FL2toYh4+Xrm2JDjQsHOt5UKqrbu3pczYuwUgTl7PCtkLDO/BpAjTKpf/a6OamGBuVNpqTtdWK5tS7ZvwqZFs4cfB11F+XsOvAwNXorQV7tAworeHK/97Q7Cn4SfXbmrittZ7vXuaC/ZuAYiNq56oeL0ZlrqpfhKpPMLkbBFyMEcZXLXShq4FreQwDd38Wc5cfDL4S6WHyeH4DgxcVR8Pvxf7RNj5buXqkBbDV7nHY9JCqBrFHSAjpkd1C0BsGAV/MnmNiC9yEfJuXOj6cTrB8IZUotq13UL49UcxDX9B/g4MXI69eGY06O5ci+HQVbsYqLFd1UrK30L4siyjugUgKnksOn4yeNST+OVwbaQ3JUDu4+uqXZFPMez9LGebtBBiHg4VuGgr3J+rdrmzSlU92zXsfNx+vHJlMK1qaTTBU8UwKANAdHxXt8R75ScM01Cpnqsepv526/eFLkLei6t2uUl97mxXTG2GrnJpL44Xfhg8ukFVC/NyqMA1aStUoW91f5OzXZM2wz983JYKeN4+mIwf2rtcFyQmblDG+t1VAYDIeF50HN0o+P35r/AkkgRZ5dq23WYYQfBKXdCyQXoh5vOHKMahApejRplWeDgNzcYPhyvXbsd6vsu9X39dvtpz7ZRRtQ++xKguCABEJodR8L0YR8HvZToivhqLkA+yS/BKpQReqmg1CVrw5dCBK8nO0MN6BCq65AKJqwDFUvFyrYPbQSsxfscJF4lWQgCx8r1QN6nYBDs3It6+Zni/IR3KIuTD2A5eLsC44RomyBZTHdm3q0dFC3k5ddg/2Oz2RsNPrvZV46xoeGMrQLbi1f5u5WrqLuSTLOuX6WJ+OgzkbFuN3FQzbh86oZeVayXcoJUQQHxmZ4Ea4k/Uo+D3UrMX7pnnnWauyuVGxJftTNFseErPve1vydaifZzas5bWhuTOhSzjZhJ89ZOc3eR8FvJ06MA1MdY1SUxbcByTM162OiTDlWs9SZI7zc++6EugXDUrM+NFNeZ6TIMwDkIr4fy8Ye8cCqLn7mY3WpeagrkYyRlvF4FP5Vy/LlvePlY+3/aQuZCZx9fAz1JeLtzYT46eTL/Ju61/bdmo2nIBzN7IfU9FW25AiMyNC1dJar8f2G/fimT9Ku3Q+knOfGS/1is/PXsvRbxuGTmi71au/VeVLsA9S+3dlv7Y6IPa+KmtfG0W9mI1rWT9puVClqlYyNpm7yAun1+/R+ssAAA5sxfAjWfuHPzsm/s1e5H6nvveBrK6eRHI0hf/l/m7TsKVO0fndsaOB6elNkordI4Q5XDkwPV45cqq/aQvTS9xqaj07ZPMt5pIvzbWgc/WQzf4YlwzLZNNyvsXYh1+cVhuwXFz/e4NAQAAAOboyIFr2Fmqa/LrkCpXHuzdGtWBC2FiklRNltZMbSTPnqUiW6P9KmLTitUZ+y2pZ4lMS/WaNabhyrT4+L1EbaVRn14sssIIAACAOB05cDlUuULjyuiTcnqdIHVUZmSy7CJTCQEAAODDsYbOMSI+NJOQ1SBsHZ1m2TJhCwAAAL4cK3C5EfGi1dq1gfi4Mf3nu/d7AgAAAHhy7LVKRnVVgJJSlVvn19m3BQAAAL+OHbgmbVhUuVBCKvrt+Y17HQEAAAA8O3bgcqhyoXRU0iSTRQEAAABycKLA5apcrjVLgDKYjH/XBYZkAAAAIC8nClyTv0DfXJ2OJQcCRtgCAABAAU4cuNzEQpWMKhfCRdgCAABAQU4cuCZ/yWQvF1UuBIiwBQAAgALNJXDNqlzLAoSEsAUAAICCGZmj4SdXH6pKW4CiEbYAAAAQgLlUuJ4bG6pcKJzbs0XYAgAAQAjmGria3bsDe7G7JkBBjJjNJNtqE7YAAAAQglMyZ26Ahia/XLc/bAiQI7cT7v2Nux0BAAAAAjHflkKZDtAwmd4QIEcqsnx+4x5hCwAAAEGZe+Bymt37fVdtEMA3Nxwj04Xz6/e6AgAAAATGS+Ca/MX65qr9LhXAF5X+bDhGXwAAAIAAzXUs/E7DzrWWJvqNAHPmKqi0EAIAACB03ipcznRqIQuRMUfbLYSELQAAAJSA1wrXNhYiYx7cyHfJfr7R7G6OBAAAACiBuY+F39VYb0hiHgqj4nEsZuT2u72/fpfBGAAAACiVXCpczrBzpa3T0AUcGlUtAAAAlFlugct5vPK/OkaSDQEO4s5qqd5gAiEAAADKLNfA5Txevto1Rm4KsCvXPpjdSrKtLlUtAAAAlF3ugcv5bvnqN/ZfbgnwEiOmJ1m2ZqtaqQAAAAARyGdoxg5G9SM1DNHAzHSBsQ1a9/oCAAAARKSQCpcz7FxpKJMLq+150OKcFgAAAOJUWOByhp1rLU3Ehi6tC6qDoAUAAICKKDRwOcPO1UUbur4UVMGmyfQWQQsAAABVUXjgcoadK0uamNuCCDF1EAAAANUVROBy2NEVGdoGAQAAgHACl/N45cqqEfOpoJxsyFKjX1HNAgAAAKaCClwOoatknocs6bE/CwAAAHhVcIHLIXSFzIzsJ00/y2zIkqc9KlkAAADA3oIMXA5nukJhRqI6UJUHieiAM1kAAADA4QUbuJzp9EIXutjTlY9ZuBL5VowZJFnWp00QAAAAOL6gA5czXY6sbk9XQzAPqaiMjA1Umerfp8FKRzKtXqUCAAAAYG6CD1yOrXQ1NDEPhdB1MDfEwlWo1AarxIxslSoVF7Jka8R5KwAAACBfpQhcziR0GfOlfYtbgl3ZoLV8fv1eVwAAAAAEoTSBa9vj5atdY+Sm4FW2svX+xr0FAQAAABCMRErm/Ma9joquCV5hjEkFAAAAQFBKF7ic8+v3V01mLsrkbBIAAAAAhKmUgctpdu8OTKYLxkhfAAAAACBApQ1cjhtj3vz83gIthgAAAABCVOrAtW3aYqhNocUQAAAAQECiCFyOq3aZ7M2LqnJLAAAAACAA0QQup9ntjdwUQ3e2S6h2AQAAAChYVIFrm6129d9fv9fkbBcAAACAIkUZuLY9P9ulMhAAAAAAyFnUgctxZ7ve37h30Va7bghthgAAAAByFH3g2marXb3JUA3aDAEAAADkpDKBy5kM1XjRZnhHAAAAAMCjSgWubbM2wyWCFwAAAACfKhm4thG8AAAAAPhU6cC17fXgZUYCAAAAACdE4HrJi+CVMdUQAAAAwIkZwb6GnauLUpObqtKWgBkxveb63RsCAAAAIBhUuA7Q7N7bbH5+b8G1G85GyqcCAAAAAIdAhesYhp0rbTVmyT56H9qfNiQAVLgAAACA8JwSHFmze79vv3PfggxfAAAAAMJA4DqhV8PXtVYm2k5qcjn0M18AAAAA/KOl0JNhZ7EucqaVGbOYJHLBdwCjpRAAAAAIDxUuT5rdTbfLqz/7NuHaDzMxrSQxH6pqw6aklsxJpvp3AQAAABAUKlwFcyHMfhjqWWKDmLhKmAtipiGi9aP8PSZ7drHZ/eNAAAAAAASDwBWoaUviuYatXdkwltjvpSGq9cSY34rRxvM/qGYkWXZrdpYMAAAAAAAAAAAgfv8fPRONIFLoGr8AAAAASUVORK5CYII=\n"
    }
  },
  "servers": [
    {
      "url": "https://sandboxapi.peach.finance/api"
    }
  ],
  "security": [
    {
      "oauth2": []
    },
    {
      "bearerAuth": []
    },
    {
      "apiKeyHeader": []
    }
  ],
  "tags": [
    {
      "description": "Authentication and authorization related endpoints.\n",
      "name": "Auth"
    },
    {
      "description": "API Keys can be managed with these endpoints.\n",
      "name": "API Keys"
    },
    {
      "description": "Endpoints for use in configuring the frontend before and after authentication.\n",
      "name": "Frontend"
    },
    {
      "description": "The Borrower object represents a borrower.\nIt allows you to maintain different statuses that are associated with the same borrower.\nThe API allows you to create, delete and update your borrowers. You can retrieve\nan individual borrower as well as a list of all your borrowers.\n",
      "name": "Borrowers"
    },
    {
      "description": "Identity objects represent various forms of identification that a borrower may have.\nWe allow one primary identity per borrower, and any number of secondary identities.\nThe identity sent when creating a borrower is the primary identity, and cannot be\ndeleted/archived or changed to be a secondary identity.\n",
      "name": "Identity"
    },
    {
      "description": "This object allows you to add and manage a Borrower's contact information. A Borrower can\nhave an \"unlimited\" number of contacts. However, it is important to properly create key contact objects.\n\nPeach Borrower Portal (if used by the lender), shows the following contacts only:\n\n`EMAIL` contactType=email, label=personal or work, affiliation=self, status=primary.\n\n`MOBILE PHONE` contactType=phone, label=personal, affiliation=self, status=primary.\n\n`HOME PHONE` contactType=phone, label=home, affiliation=self, status=secondary.\n\n`HOME ADDRESS` contactType=address, label=home, affiliation=self, status=primary.\n\n\nThe Peach system sends notices (e.g. payment reminder) to borrowers (if configured by the lender).\nIn order for a notice to be sent successfully, both contact object and template must exist.\nIf a contact cannot be found, the system will not send a notice.\nThe system will try to find the following contact objects:\n\n\nEmail notices:\ncontactType=email, valid=true, affiliation=self, status=primary\n(if \"primary\" is not found, the system searches for \"secondary\" and then for \"additional\")\n\n\nText message/SMS notices:\ncontactType=phone, valid=true, affiliation=self, receiveTextMessages=true, label=personal, status=primary\n(if \"primary\" is not found, the system searches for \"secondary\" and then for \"additional\")\n",
      "name": "Contact Information"
    },
    {
      "description": "This object represents a payment method (e.g. bank account, credit card, debit card, etc.) belonging to a borrower.\n",
      "name": "Payment Instruments"
    },
    {
      "description": "This object allows you to block interactions on a borrower; and must be connected with a case. You can\ncreate multiple Do Not Interact instances on a borrower but only one instance on a case. There are two ways\nto create Do Not Interacts:\n\n1. Manually - after a case is created, you can manually create Do Not Interact objects on any borrower case.\n\n2. In bulk on a Supercase, on the related subcases. See [Create Do Not Interact instances on all subcases](#tag/Supercases/operation/peach.supercases.handlers.supercase_bulk_create_dni)\nfor more details.\n",
      "name": "Do Not Interact"
    },
    {
      "description": "This object allows you to create custom `Do Not Interact Types` which will create\n`Do Not Interact` instances automatically when case conditions are met. For example,\nwhen a new `bankruptcy` case is `initiated`, the system can automatically create `Do Not Interact`\nto block debt collection related interactions for 30 calendar days.\n\nThe conditions are set in the following way. There are two triggers and one condition fields that you can configure:\n1. `onStatus` - triggered based on the case status.\n2. `onOutcome` - triggered based on the case outcome.\n3. `onCondition` - condition(s) based on case fields values.\n\nYou must provide at least one trigger, `onStatus` or `onOutcome`, when creating a new `Do Not Interact Type` object.\n\nFew examples:\n- `onStatus=processing`, `onOutcome=null`, `onCondition=null` - the `Do Not Interact`\ninstance will be created when the case status is changed to `processing`.\n- `onStatus=completed`, `onOutcome=approved`, `onCondition=null` - the `Do Not Interact`\ninstance will be created when the case status is changed to `completed` and the outcome is `approved`.\n\n`Do Not Interact Types` must be associated with `Case Types`. A `Do Not Interact Type` object can\nbe associated with multiple `Case Types`.\n",
      "name": "Do Not Interact Types"
    },
    {
      "description": "This object allows you to create custom `Notification Types` which will create\n`interaction` instances (such as emails, text messages, etc.) automatically when case conditions are met. For example,\nwhen a new `bankruptcy` case is `initiated`, the system can automatically send an email notification\nand ask the borrower to provide supporting documents.\n\nThe conditions are set in the following way. There are two triggers and one condition fields that you can configure:\n1. `onStatus` - triggered based on the case status.\n2. `onOutcome` - triggered based on the case outcome.\n3. `onCondition` - condition(s) based on case fields values.\n\nYou must provide at least one trigger, `onStatus` or `onOutcome`, when creating a new `Notification Type` object.\n\nFew examples:\n- `onStatus=processing`, `onOutcome=null`, `onCondition=null` - the `interaction`\ninstance will be created when the case status is changed to `processing`.\n- `onStatus=completed`, `onOutcome=approved`, `onCondition=null` - the `interaction`\ninstance will be created when the case status is changed to `completed` and the outcome is `approved`.\n\n`Notification Types` must be associated with `Case Types`. A `Notification Type` object can\nbe associated with multiple `Case Types`.\n",
      "name": "Notification Types"
    },
    {
      "description": "The campaign feature allows lenders to create a list of borrower contacts that meet certain criteria,\nfor consumption by auto-dialer systems. For example, if the \"Auto-create collection cases\" procedure is\nconfigured along with the auto-close feature you can create a query that looks at the open collection\ncases to understand what borrowers you consider to still be delinquent after starting collections on\nthem. You can then layer on which cases have been snoozed and/or do not have scheduled calls.\nThe campaign feature has two basic components. The Campaign, is a query that collects a list of borrowers\nto contact that can be triggered at predefined intervals. The Contact Exporter defines how and where the\ncontacts are delivered. Multiple Campaigns can use a single Exporter. The lender can create and maintain\na list of Campaigns and Contact Exporters as needed.\n",
      "name": "Campaign Overview"
    },
    {
      "description": "This object allows you to create custom Campaigns. A Campaign is characterized by a set of rules, defined\nas a SQL query created in Redash and associated with the Campaign. A Campaign can be triggered at predefined\nintervals. For example, a Campaign can be triggered every day to add borrowers who are 30 days past due. Campaigns\ncan also be manually triggered.\nWhen a Campaign is triggered by schedule or manually, a query is executed against the lender's replica data and\nreturns a list of person IDs. The output is sent to the configured Contact Exporter to be written as a configurable\nCSV file with contact information required by auto dialers and other systems.\n",
      "name": "Campaigns"
    },
    {
      "description": "This object allows you to create custom Contact Exporters. The Contact Exporter defines how and where the\ncontacts generated by the Campaign are delivered.\n",
      "name": "Contact Exporters"
    },
    {
      "description": "This object allows you to add cases to a borrower that are relevant to servicing\nor collections. For example, a bankruptcy case. A borrower can have multiple\ncases. If you enabled Compliance Guard monitoring feature, we'll create a new case\nevery time a borrower matches to one of the external data sources we use. For example,\nif you monitor for active military, and we match one of your borrowers to\nthe SCRA (https://scra.dmdc.osd.mil/scra/) database we'll create a new case\nwith type=`militaryDuty`.\n",
      "name": "Cases"
    },
    {
      "description": "This object allows you to create custom case types. You then can create case instances from a case type.\nPeach has a predefined collection of special case types,\nsuch as `bankruptcy`, `identityTheft`, and more. You can use any of the special types\nas your base case type. To customize your case type you can:\n- Add additional custom fields\n- Add and remove automatic `Do Not Interact Types`\n- Add custom name\n- Add custom description\n\nIf you don't want to use any of the special predefined case types, then use `generic` as your base type.\n",
      "name": "Case Types"
    },
    {
      "description": "The Smart Reviews system allows for creating reminder tasks in the Peach\nCRM based on certain key events or triggers. For example, a trigger could\nbe when a borrower starts military service.\n\nAt creation time, all case types are supplied with a default smart review\nconfiguration that is disabled by default. Smart review tasks can be\nenabled by setting the `smartReviews.enable` flag.\n\n## Key Dates\n\nFor most case types, configuration revolves around 'key dates' and you\nspecify when you want a reminder task to be created relative to these key\ndates:\n\n```\nGET /case-type/{caseTypeId}\n\n// returns something like...\n\n{\n        \"caseType\": \"militaryDuty\",\n        // <other fields ...>\n        \"smartReviews\": {\n                \"enable\": true,\n                \"config\": {\n                        \"keyDates\": {\n                                \"dutyStartDate\": 0,\n                                \"dutyEndDate\": 0,\n                        }\n                }\n        }\n}\n```\n\nKey dates offsets can be expressed as an integer or array of\nintegers. Whenever `(keyDateFieldValue + offset) == today`, then a review\ntask will be created. That is:\n\n- For an offset of 0, create a task on the key date\n- For an offset of -1, create a task the day before the key date\n- For an offset of 1, create a task the day after the key date\n\nand so on. This math is based on calendar days and not business days.\n\nThe following is a list of base case types that use key dates and their\nsupported key date fields:\n\n- `bankruptcy`\n  - `courtCaseClosedDate`\n  - `creditorClaimDeadlineDate`\n  - `anticipatedCaseCompletionDate`\n\n- `creditBureauDispute`\n  - `responseDueDate`\n\n- `debtValidation`\n  - `requestDate`\n\n- `deceased`\n  - `deceasedNoticeReceivedDate`\n\n- `disputeOfDebt`\n  - `noticeReceivedDate`\n\n- `identityTheft`\n  - `reportReceivedDate`\n\n- `legalAction`\n  - `legalActionIntiatedDate`\n  - `legalJudgementEffectiveDate`\n\n- `militaryDuty`\n  - `dutyStartDate`\n  - `dutyEndDate`\n\n## Collections\n\n`collection` type cases operate on a different set of rules:\n\nThe field `objectsPreventingReminderTasks` is an array of any combination\nof the following string values:\n\n- `dni`\n- `scheduledCall`\n- `snooze`\n\nIf present in `objectsPreventingReminderTasks`, the associated object will\ncause a task to not be created if it exists; `[\"dni\"]` will prevent a new\ntask when the borrower has a DNI, and so on.\n\nThe field `lastOutboundInteractionThreshold` is a positive integer\nindicating how many calendar days after the last outbound interaction to\nwait until creating a reminder task. If this field is 3, and the last\ninteraction was sent 3/20, then a reminder will be created on 3/23\n(assuming nothing otherwise prevents a task from being created).\n",
      "name": "Smart Reviews"
    },
    {
      "description": "This object allows for the management of many cases across a number of borrowers. That is\nto say that a supercase can create, manage, and close many cases at once.\n\nThis is particularly useful if an issue occurs which affects a large group of borrowers.\n\n- Cases created by a supercase are called `subcases`\n- A supercase can only manage cases it has created (i.e., NOT cases created via the `/cases` endpoint)\n\nManaging \"who\" is affected by a supercase is an important aspect of supercases:\n\n- A `member` of a supercase is one \"borrower-loan\" pairing.\n- A `population` is a set of members added at once.\n  - A supercase might have many populations if different members are\n    added at different times.\n  - It's useful to keep track of sets of members like this because different\n    actions might need to be taken on different members depending on when\n    they're added to a supercase.\n  - A `population`'s membership may be changed until it is \"committed\" by setting\n    `isDraft: false`, at which time the memberships are locked and subcases are created.\n",
      "name": "Supercases"
    },
    {
      "description": "This object allows you to add or create documents related to a borrower. There are multiple ways to use document object:\n  - Render a document from a Peach template. For example, loan terms or Autopay agreement.\n  - Upload any type of file. For example, a PDF copy of borrower's driver license.\n  - Documents can also be used to render a legal disclosure from Peach template.\n\nTo create a new document there are two steps:\n  1. Create a document descriptor.\n  2. Upload document content/file.\n\nWhen a new document is rendered from the template you just need to complete step #1.\n",
      "name": "Documents"
    },
    {
      "description": "Explicit consent to receive certain kinds of communications.\n",
      "name": "Consent"
    },
    {
      "description": "If a borrower is represented by a legal entity you can add the legal entity details.\nNormally, if a borrower is represented by a status=`active` legal entity we block\nfuture debt collection related communications.\n",
      "name": "Legal Representation"
    },
    {
      "description": "Interactions represent communications with a borrower.\n\nWhenever Peach communicates with a borrower an interaction is recorded.\n\nAdditionally, communications taking place outside of Peach  should be recorded\nas interactions.\n\nPast interactions information is used by Compliance Guard to make decisions\nabout when and how it is appropriate to communicate again with a borrower.\n",
      "name": "Interactions"
    },
    {
      "description": "Compliance Guard helps ensures communications with borrowers are compliant with\nregulations.\n",
      "name": "Compliance Guard"
    },
    {
      "description": "Borrowers typically have loans. We support multiple loan types and each loan type\ncomes with its set of federal and state compliance rules. You can maintain different statuses of a loan.\nA borrower can have multiple loans. A loan can belong to multiple people, but\nonly one borrower can be defined as a `mainBorrower`. A loan is always created using\nthe `mainBorrower` borrower identifier. Other people can be added as part of the loan\ndetails.\n\nAll loan attributes can be updated as long as the loan is in `pending` status. Once the\nloan status changes to `originated` attributes of `atOrigination` object become read only and\ncannot be updated.\n\nA Loan doesn't start accruing interest until it is activated. To activate the loan, call `Activate a loan`.\nOn activation the loan can use the due dates and payments schedule from the `atOrigination` object\nor the loan can be re-amortized using the activation date as the loan start date.\n",
      "name": "Loans"
    },
    {
      "description": "Rate caps are rate limits applied to loans and draws to ensure compliance with various regulations.\n\nThey prevent calculated interest rates (spread + index) from exceeding specified maximums. Rate caps can be applied\nto loans and line of credit draws. When multiple rate caps overlap on the same\ndates, the system automatically uses the lowest value to ensure compliance.\n",
      "name": "Rate Caps"
    },
    {
      "description": "This object represents an installment advance (also called loan proceeds or loan disbursements). Advances should be used for installment\nloans of type \"multiple advances\". Advances can be made on Loan objects only. To clarify, Advances cannot be made on Line of Credit\nobjects. Advances increase principal balance of a Loan. Each advance has a unique identifier.\n",
      "name": "Installment Advances"
    },
    {
      "description": "This object represents refunds. Various situations require full or partial refunds of a loan. Depending on the refund\namount and whether the borrower has made payments, a refund may also trigger a reimbursement to the borrower.\n",
      "name": "Installment Refunds"
    },
    {
      "description": "This object represents a draw. Draws can be made on Line of Credit loans only. Draws can be amortized\nor non-amortized. If amortized, the draw will be amortized over the selected number of periods and aligned to the Line of\nCredit due dates. If non-amortized, the draw is due on a due date following the current period statement creation.\nA draw can have different interest and promo rates from the Line of Credit. Each draw has a unique identifier, similar to a loan.\n",
      "name": "Line of Credit Draws"
    },
    {
      "description": "This object represents a line of credit purchase. Purchases can be made on Draw objects only. Purchases of type regular increase\nprincipal balance of a Draw. Some purchase types, such as `cashBack` or `refund` are actually reduce the principal balance of a Draw.\nEach purchase has a unique identifier.\n",
      "name": "Line of Credit Purchases"
    },
    {
      "description": "This object represents the rules, configurations, and other settings surrounding a loan type\nor financial product. A lender can configure multiple loan types. Each type represent a financial product.\nOnce the loan type is created, you can create instances of that type.\n",
      "name": "Loan Types"
    },
    {
      "description": "This object represents the expected loan payments on due dates. Expected payments are what we expect to\nreceive from a borrower on a specific date. Expected payments are created as a result of loan amortization.\nThe amounts and due dates can change during lifetime of a loan. For example, a borrower might change due dates\nfrequency from `monthly` to `weekly` and it will lower periodic payment amount.\n",
      "name": "Expected Payments"
    },
    {
      "description": "This object represents information on the borrower's obligation for a given loan period. It also provides information\non the current status of the fulfillment of the obligation vis-à-vis the amount due and the due date. The obligation\nis dynamically changing as a result of factors such as payments and service credits made, and the crossing over of due dates.\n",
      "name": "Obligations"
    },
    {
      "description": "Payment plans are a specific type of hardship tool that can be used to create a temporary loan schedule for a borrower.\nLenders can create a payment plan by specifying the `paymentPlanType`, `numberOfPeriods` and `amount`. After the `numberOfPeriods`\nends, any remaining periods of the loan will be paid according to the originally scheduled recurring amount and frequency of the\nloan at the time when the payment plan was created.\n\nWhen the agreed upon recurring payment plan `amount` is less than the originally scheduled payment amount, the system uses\n`isExtendLoanDuration` to ascertain whether to keep the existing loan `duration` or automatically extend the original loan `duration`.\n\nWhen the agreed upon recurring payment plan `amount` is more than the originally scheduled recurring amount, the loan `duration`\nwill be shortened to the point where the remaining balance of the loan is paid off.\n\nOnly one active payment plan is allowed at a time. Please note that creating an active payment plan will overwrite changes\nmade to the loan schedule such as due date deferrals, change due date, and change loan terms. This is because the payment plan by\ndesign creates a new loan schedule.\n\nIf a loan is on a payment plan, other hardship tools cannot be used. Lenders must cancel the payment plan and then make any required\nloan modifications.\n\nPayment plan is presently for installment only.\n",
      "name": "Payment Plans"
    },
    {
      "description": "This object represents a `Promise to Pay Plan`. A `Promise to Pay Plan` is a group of Promise to Pay\nPeriods— unscheduled payments that was verbally committed by a borrower. `Promise to Pay Plan`s are\ndefined on an account level. `Promise to Pay Plan`s are not guaranteed payments. They are used to track\nverbal commitments made by borrowers.\n\nNote: When creating or updating a `Promise to Pay Plan`, either pass a `schedule` object, or pass schedule descriptor\nattributes— `startDate`, `frequency`, `specificDays`, `duration` and `amount`. Mixing the two\napproaches is not allowed.\n",
      "name": "Promise to Pay Plans"
    },
    {
      "description": "This object contains information about the fees that are charged to the loan, including draw, origination or\ndynamic fees, such as late fees.\n",
      "name": "Fees"
    },
    {
      "description": "This object represents the interest and promo rates of the loan. You can modify interest and promo rates at any time.\nIf a rate is modified or added with an effective date in the past, we will recalculate loan balances retroactively and\nfuture expected payments from the effective date. If a rate is modified or added with effective date in the future, we\nwill recalculate future expected payments only.\n",
      "name": "Rates"
    },
    {
      "description": "This object represents payments and credits. Payments represent real money that were paid back by borrowers. Credits\nare adjustments made on a loan. Credits lower balances similar to payments. Credits can be issued by customer service\nrepresentatives or supervisors.\n",
      "name": "Transactions"
    },
    {
      "description": "This object represents line of credit (e.g. credit card) or loan (e.g. personal installment) statement. Each statement is\nassociated with one due date.\n\nFor lines of credit, statements are created one calendar day after the period end date. The number of dates between a\nstatement creation and a due date can be configured by lenders, but are normally 14 or 21 days.\n\nFor installments, there are two options for when statements can be created:\n1. One calendar day after the period end date, which is also the due date. In this case, the statement date and due date are the same.\n2. A number of calendar days before the period end date. The offset (as number of calendar days) can be configured by lenders.\n   In this case, a statement is created and sent before the period ends, which means some of the statement details are calculated\n   based on partial period data (e.g. amount of interest accrued in the period.)\n",
      "name": "Statements"
    },
    {
      "description": "This object represents the current Autopay plan. The current Autopay plan must be canceled before creating a new plan. The autopay\ncadence can be aligned to due dates or can be on a different payment schedule.\n",
      "name": "Autopay"
    },
    {
      "description": "This object represents current loan balances.\n",
      "name": "Balances"
    },
    {
      "description": "This object represents loan credit reporting data as it was reported to credit bureaus.\n",
      "name": "Credit Reporting"
    },
    {
      "description": "This utility function returns financial institution name that a routing number belongs to.\nThis information is updated once or twice a month by the Federal Reserve Bank.\n",
      "name": "Routing Numbers"
    },
    {
      "description": "This utility function returns card details.\nThe BIN information is provided by First Data and normally updated weekly.\n",
      "name": "BIN Numbers"
    },
    {
      "description": "This utility function is used for managing index interest rates (for example, a rate that is pegged to the prime rate\nof the Fed). Index Interest Rates are set at the loan type level and can be used by loans associated with the loanTypeId.\nIndex Interest Rates are only relevant to interest rates and not relevant to promo rates.\n\nIndex Interest Rate values can be updated with a new value with an effective date in the past. When a new Index Interest\nRate value is set, the previous rate end date will be set to one calendar day before the new rate's effective date.\nIf the new rate's effective date is in the past, the Peach system will replay all Active loans (to clarify, Active loans\nat the time of Index Interest Rate update) with the new Index Interest Rate value and re-accrue loans' interest.\n",
      "name": "Index Rates"
    },
    {
      "description": "Operations represent ongoing asynchronous tasks in the Peach system. When\nyou start an asynchronous task, either directly by having an API call with\n`sync=false` or indirectly by having an API call with `sync=true` time\nout, you will receive an operation ID that can be used to monitor its\nstatus.\n\nWhen an operation completes, the operation ID will continue to be valid\nfor 1 hour, after which it will expire and become inaccessible.\n\nUnder certain exceptional circumstances, an asychronous task may be\ndelayed and not complete before 24 hours have passed. At that point, the\noperation ID will expire despite still being in-flight. If this happens,\nplease reach out to Peach support.\n",
      "name": "Operations"
    },
    {
      "description": "This object represents an event. Events are sent from Peach to you. Events can be\nrelated to any object in this API.\n\n| Event Name                                  | Occurs when                                                           | Related Object     |\n|---------------------------------------------|-----------------------------------------------------------------------|--------------------|\n| advance.statuschanged                       | an advance status changes                                             | Advance            |\n| advance.updated                             | an advance amount is updated                                          | Advance            |\n| autopay.schedule.created                    | an autopay schedule is set up                                         | Autopay            |\n| autopay.schedule.cancel                     | an autopay schedule is canceled                                       | Autopay            |\n| autopay.schedule.changed                    | an autopay schedule is changed                                        | Autopay            |\n| autopay.payment.rescheduled                 | an autopay payment is rescheduled                                     | Autopay            |\n| autopay.payment.canceled                    | an autopay payment is canceled                                        | Autopay            |\n| card.created                                | a card is created                                                     | Card               |\n| card.replacement.requested                  | a card replacement is requested                                       | Card               |\n| card.status.changed                         | a card's status is changed                                            | Card               |\n| case.changed                                | a case is created, updated, or deleted, with precise change information | Case             |\n| case.created                                | [**DEPRECATED** - no longer fired, use case.changed instead] a case is created         | Case               |\n| case.deleted                                | [**DEPRECATED** - was never used, use case.changed instead] a case is deleted         | Case               |\n| case.updated                                | [**DEPRECATED** - no longer fired, use case.changed instead] a case is updated         | Case               |\n| case.association.added                      | an association is added to a case                                     | Case               |\n| case.association.removed                    | an association is removed from a case                                 | Case               |\n| case.donotinteract.changed                  | a DoNotInteract object is created, updated, or deleted, with precise change information | Case               |\n| case.donotinteract.created                  | [**DEPRECATED** - use case.donotinteract.changed instead] a DoNotInteract object is created | Case               |\n| case.donotinteract.deleted                  | [**DEPRECATED** - use case.donotinteract.changed instead] a DoNotInteract object is deleted | Case               |\n| case.donotinteract.updated                  | [**DEPRECATED** - use case.donotinteract.changed instead] a DoNotInteract object is updated | Case               |\n| case.donotinteract.expired                  | a DoNotInteract object has expired                                    | Case |\n| case.escalation.changed                     | a case escalation is created, updated, or deleted, with precise change information | Case  |\n| case.escalation.created                     | [**DEPRECATED** - use case.escalation.changed instead] a case escalation is created | Case               |\n| case.escalation.canceled                    | [**DEPRECATED** - use case.escalation.changed instead] a case escalation is canceled | Case               |\n| contact.created                             | a contact is created                                                  | Contact            |\n| contact.deleted                             | a contact is deleted                                                  | Contact            |\n| contact.updated                             | a contact is updated                                                  | Contact            |\n| communication.send                          | communication is attempted                                            | Interaction        |\n| indexrate.created                           | index rate is created                                                 | Loan Type          |\n| indexrate.updated                           | index rate is updated                                                 | Loan Type          |\n| interaction.blocked                         | interaction is blocked for a borrower                                 | Interaction        |\n| loan.balance.changed                        | a loan balance changed                                                | Loan               |\n| loan.closed                                 | a loan is closed                                                      | Loan               |\n| loan.created                                | a loan is created                                                     | Loan               |\n| loan.credit.limit.changed                   | a loan credit limit was changed                                       | Loan               |\n| draw.credit.limit.changed                   | a draw credit limit was changed                                       | Draw               |\n| loan.creditreporting.created                | a loan is scheduled to start credit reporting                         | Credit Reporting Status |\n| loan.creditreporting.stopped                | a loan is scheduled to stop credit reporting                          | Credit Reporting Status |\n| loan.current                                | a loan is current or became current                                   | Loan               |\n| loan.duedate.defer                          | a single loan due date is deferred                                    | Loan               |\n| loan.fee.booked                             | a dynamic fee is applied                                              | Loan               |\n| loan.fee.canceled                           | a dynamic fee is canceled                                             | Loan               |\n| loan.fee.changed                            | a dynamic fee is changed                                              | Loan               |\n| loan.interest.capitalized                   | interest capitalization is triggered after a due date                 | Loan               |\n| loan.interestaccrued.min                    | minimum interest charge is triggered on a draw                        | Draw               |\n| loan.latefee.booked                         | a late fee is applied                                                 | Loan               |\n| loan.modificationfee.booked                 | a modification fee is applied                                         | Loan               |\n| loan.migration.succeeded                    | a loan migration succeeds                                             | Loan               |\n| loan.migration.failed                       | a loan migration fails                                                | Loan               |\n| loan.obligation.statuschanged               | a change in a loan's obligation status is recorded                    | Loan               |\n| loan.overdue                                | a loan is overdue                                                     | Loan               |\n| loan.overdue.update                         | a loan is overdue                                                     | Loan               |\n| loan.ownerchanged                           | a loan changes owners                                                 | Loan               |\n| loan.paymentplan.setup                      | a loan payment plan is set up                                         | Loan               |\n| loan.period.started                         | a loan period has started                                             | Loan               |\n| loan.promiseplan.created                    | a promise to pay plan is created                                      | Promise to Pay Plan|\n| loan.promiseplan.statuschanged              | a promise to pay plan status changes                                  | Promise to Pay Plan|\n| loan.promiseplan.due.today                  | a promise to pay plan is due today                                    | Promise to Pay Plan|\n| loan.promiseplan.overdue                    | a promise to pay plan becomes \"overdue\"                               | Promise to Pay Plan|\n| loan.promiseplan.current                    | a promise to pay plan changes from \"overdue\" to \"current\"             | Promise to Pay Plan|\n| loan.promoprogram.created                   | a promo program is created                                            | Loan               |\n| loan.promoprogram.updated                   | a promo program is updated                                            | Loan               |\n| loan.rate.created                           | rate is created                                                       | Loan               |\n| loan.rate.updated                           | rate is updated                                                       | Loan               |\n| loan.refunded                               | payments on a loan are refunded                                       | Loan               |\n| loan.reimbursement.initiated                | a borrower reimbursement is initiated                                 | Loan               |\n| loan.reimbursement.processed                | a borrower reimbursement is processed                                 | Loan               |\n| loan.schedule.defer                         | a loan schedule is deferred                                           | Loan               |\n| loan.changeloanterms.scra.update            | a loan SCRA plan is created                                           | Loan               |\n| loan.scraplan.changed                       | a loan SCRA plan is changed                                           | Loan               |\n| loan.scraplan.deleted                       | a loan SCRA plan is deleted                                           | Loan               |\n| loan.servicefee.booked                      | a service fee is booked                                               | Loan               |\n| loan.membershipfee.booked                   | a membership fee is booked                                            | Loan               |\n| loan.statuschanged                          | a loan changes status                                                 | Loan               |\n| person.consent.updated                      | a borrower updates their consents                                     | Borrower           |\n| person.created                              | a borrower is created                                                 | Borrower           |\n| person.monitoring.bankruptcy.started        | bankruptcy and deceased monitoring begins for a borrower              | Borrower           |\n| person.monitoring.scra.started              | SCRA monitoring begins for a borrower                                 | Borrower           |\n| payment.instrument.created                  | a payment instrument is created                                       | Payment Instrument |\n| payment.instrument.updated                  | a payment instrument is updated                                       | Payment Instrument |\n| payment.instrument.deactivated              | a payment instrument is deactivated                                   | Payment Instrument |\n| payment.applied                             | **DEPRECATED** used in place of payment.initiated for internal ACH prior to deprecation. | Transaction        |\n| payment.chargeback                          | a payment is charged back                                             | Transaction        |\n| payment.chargeback.reversed                 | a payment is chargeback is reversed                                   | Transaction        |\n| payment.failed                              | a payment fails                                                       | Transaction        |\n| payment.initiated                           | a payment is initiated                                                | Transaction        |\n| payment.pending                             | a payment is pending                                                  | Transaction        |\n| payment.reversed                            | a payment is reversed                                                 | Transaction        |\n| payment.succeeded                           | a payment is succeeded                                                | Transaction        |\n| payment.scheduled                           | a payment is scheduled                                                | Transaction        |\n| payment.rescheduled                         | a payment is rescheduled                                              | Transaction        |\n| payment.due.today                           | periodically for external transactions with a status of \"scheduled\"   | Transaction        |\n| payment.hold.days.expired                   | a transaction's hold days expired                                     | Transaction        |\n| paymentplan.created                         | a payment plan is created                                             | Payment Plan       |\n| paymentplan.statuschanged                   | a payment plan changes status                                         | Payment Plan       |\n| purchase.authorized                         | a purchase is authorized                                              | Purchase           |\n| purchase.settled                            | a purchase is settled                                                 | Purchase           |\n| purchase.applied                            | a purchase is applied.                                                | Purchase           |\n| purchase.created                            | a purchase is created                                                 | Purchase           |\n| purchase.changed                            | a purchase is updated                                                 | Purchase           |\n| purchase.dispute.created                    | a purchase dispute is created                                         | Purchase Dispute   |\n| purchase.dispute.updated                    | a purchase dispute is updated                                         | Purchase Dispute   |\n| statement.created                           | a statement is created                                                | Loan               |\n| reconciliation.payment.failed               | a reconciliation payment fails                                        | Transaction        |\n",
      "name": "Events"
    },
    {
      "description": "Notification settings designed to increase loan repayment.\n",
      "name": "Repayment Engine"
    },
    {
      "description": "This object represents institutional owners of loans. Investors must be created before they\ncan be associated with loans.\n",
      "name": "Investors"
    },
    {
      "description": "This object represents a bank account belonging to an investor. Peach will settle payment\nproceed into that account.\n",
      "name": "Settlement Instruments"
    },
    {
      "description": "Investors associated with a loan.\n",
      "name": "LoansInvestors",
      "x-displayName": "Loan Investors"
    },
    {
      "description": "Loan Configuration\n",
      "name": "LoanConfiguration",
      "x-displayName": "Loan Configuration"
    },
    {
      "description": "A borrower verification session represents the\nquestion and response flow for an agent to verify the identity of a human\nwho purports to be a particular borrower. For instance, upon receiving a phone\ncall, an agent would initiate a borrower verification, ask the questions to the\nborrower, and enter their responses. A set of responses are either correct (thus\nverifying the human as the borrower) or they are incorrect.\n\nThe agent is never shown the correct answers, so privacy risks are\nminimized and socially engineered security attacks are mitigated.\n",
      "name": "Verifications"
    },
    {
      "description": "This object represents configurations describing how new borrower verifications\nshould behave.\n",
      "name": "Verification Types"
    },
    {
      "description": "Allows configuration for which fields should be included for loans or payments tapes.\n",
      "name": "Loan Tape Types"
    },
    {
      "description": "Allows investors to get different loan tapes delivered to different SFTP servers.\n",
      "name": "Loan Tapes"
    },
    {
      "description": "Allows lenders to keep track of merchants associated with loans and purchases.\nMerchant details can be shown in the Peach Borrower Portal. The following attributes are shown to a borrower:\n\n`NAME` businessName\n\n`ADDRESS` address\n\n`DEPARTMENT OR CONTACT NAME` primaryContactName\n\n`EMAIL` primaryContactEmail\n\n`PHONE` primaryContactPhone\n",
      "name": "Merchants"
    },
    {
      "description": "Allows lenders to keep track of different collection agencies that charged-off loans may be assigned to.\nThis is useful when a lender assigns charged off loans to a third party debt collection agency.\nThe Peach Borrower Portal will display the collection agency information to the borrower. The lender can continue to use Peach as the system\nof record / ledger for charged off loans. The lender can post any payments collected by the collection agency as `isExternal=true` transactions.\nThe Peach system will waterfall the payments and update loan balances.\n",
      "name": "Collection Agencies"
    },
    {
      "description": "Allows a loan to be assigned to a collection agency\n",
      "name": "Loan Collection Agencies"
    },
    {
      "description": "The templates system is used manage templates and render content from existing templates. Templates can be used, for\ninstance, when sending emails and text messages. Custom branding and dynamic fields can be added into\ntemplates.\n\n## Management\nThe templates system consists of two main components: Template Descriptors and Template Versions (also sometimes\nsimply referred to as \"templates\"). A Template Descriptor is a configuration object that defines the structure\nof a template. A Template Version is a specific instance of a template that contains the actual content.\n\nA Template Descriptor many have many Template Versions associated with it. There can be only one \"active\"\nTemplate Version at a time.\n\n## Content\n### Syntax\nPeach uses <a href=\"https://jinja.palletsprojects.com/\">Jinja templating</a>. Therefore all templates\nuse Jinja template syntax, and _must be a valid Jinja template to render_.\n\n### Rendering Context\nWhen a template is rendered, context variables are passed into the template. If a template looks like:\n\n```\nHello {{foo}}, your loan is due on {{bar}}.\n````\n\nthen the context variables in the template are `foo` and `bar`. If, when the template is\nrendered, the provided context is:\n\n```\n{\n  \"foo\": \"John\",\n  \"bar\": \"2021-01-01\"\n}\n```\n\n...then the rendered template will be:\n\n```\nHello John, your loan is due on 2021-01-01.\n```\n",
      "name": "Templates"
    },
    {
      "description": "Peach automatically sends messages on your behalf. For example when autopay is enabled for a borrower\na message with subject `autopayEnabled` is sent.\n\n### Automatically Calculated Context Vars\nWhen the Peach system sends messages it automatically calculates context variables.\nThese context variables can be referenced in the template content. For example, when the system\nsends `autopayEnabled` it includes the populated context variables `paymentMethod`, `paymentMethodLastFour`,\nand `paymentSchedule`.\n\n### Customization\nPeach comes with predefined template content out-of-the-box. You can customize the content of these messages\nby updating the content of the template associated with the subject. See\n<a href=\"/api-docs/api-public/templates/peach.communicator.handlers.update_template_version\">Update Template Version</a>.\n\nIf you choose to customize the content of a template it's important to understand that different\ninteraction subjects have different automatically calculated context variables.\n\nFor example, you can see below the subject `autopayAmountChanged` with context variables\n`company`, `person`, `loan`, `extraCharge`, `paymentAmount` and `paymentDueDate`. This means\nfor the template with `subject=autopayAmountChanged` you can write a template like:\n\n<!--\n  We must include this jinja raw escape because Connexion runs the openapi spec through\n  a Jinja template render when loading the spec at boot up time.\n  We must put it in an HTML comment so Redoc doesn't show the raw escape in the docs. (I hate computers.)\n  {% raw %}\n-->\n```jinja\nHello {{person.name.firstName}},\n\nThis is {{company.brandName}} from {{company.domainName}}, in regards to your loan\n{{loan.displayId}}.\n\nYour autopay changed. It is now {{paymentAmount}}. (That's an additional {{extraCharge}}.)\n\nBye!\n```\n<!-- {% endraw %} -->\n\n### Available Context Variables\nIn this section of the docs you can see what context variables are automatically calculated for a\ngiven subject's system sent messages. (Note the list is currently incomplete.)\n",
      "name": "System Sent Messages"
    },
    {
      "description": "Peach displays some messages as documents or UI elements. You may choose to customize the content of these messages\nusing the templating system.\n\n### Available Context Variables\nIn this section of the docs you can see what context variables are automatically calculated for a\ngiven subject's system displayed message. (Note the list is currently incomplete.)\n",
      "name": "System Documents & UI"
    },
    {
      "name": "Monitoring Services"
    },
    {
      "description": "Peach allows clients to bring their own/partner bank to process ACH payments.\nIf configured, the Peach system will create NACHA files and upload them to the provided destination (SFTP).\nThe Peach system will download NACHA return files from the same destination. Make sure you coordinate this setup with the Peach team.\n\nNACHA requires bank accounts to be verified. If you are using Peach system to process ACH payments, borrowers have two options to verify their bank account:\n1. Connect their online bank account via Plaid.\n2. Trigger micro-deposits and verify amounts.\n\nPlease note the following logic of how Peach system selects payment processor for micro-deposits. A payment method is associated with a borrower\nobject instead of a specific loan because the same method can be used to pay multiple loans.\n- If you have only one loan type and one payment processor with `default=true`, the system will use the `default=true` payment processor to initiate micro-deposits.\n- If you have more than one loan type and one payment processor with `default=true`, the system will use the `default=true` payment processor to initiate micro-deposits.\n- If you have have more than one loan type and more than one payment processor:\n    - You can associate a specific payment processor with a loan type.\n    - If a borrower has one or more loans in status [`pending`, `originated`, `active`, `frozen`, `accelerated`, `chargedOff`] of ONE loan type only,\n      the system will use that loan type's ACH payment processor for micro-deposits. If the loan type doesn't have an ACH payment processor\n      associated, the system will use the `default=true` processor to initiate micro-deposits.\n    - If a borrower has one or more loans in status [`pending`, `originated`, `active`, `frozen`, `accelerated`, `chargedOff`] of more than one\n      loan type, the system will use the `default=true` processor to initiate micro-deposits.\n",
      "name": "Payment Processors"
    },
    {
      "description": "**BETA**\n\nAllows clients to manage configurations for card issuers.\n",
      "name": "Card Issuers"
    },
    {
      "description": "**BETA**\n\nAllows lenders to associate physical or virtual card with a loan or line of credit.\n",
      "name": "Cards"
    },
    {
      "description": "Allows clients to manage webhooks.\n\nThe Peach webhook system will issue `POST` requests with the event data as JSON payload.\n",
      "name": "Webhooks"
    },
    {
      "description": "Send and receive communications like email and text messages with borrowers and their contacts. When\nsending and receiving communications an interaction is usually created.\n",
      "name": "Communicator"
    },
    {
      "description": "A bulk sender object represents a campaign worker which sends messages\nto the borrowers returned by a campaign's query results.\n\nFor each row returned by the campaign in its query result a message is sent via the\n<a href=\"/api-docs/api-public/communicator/peach.communicator.handlers.handle_send\">Send endpoint</a>.\n\nSome of the query results columns are automatically mapped to the request body of the Send endpoint,\nthese columns are:\n- `caseId`\n- `contactId`\n- `context`\n- `interactionExternalId`\n- `isTransactional`\n- `loanId`\n- `previousInteractionId`\n- `statementId`\n- `sendAt`\n- `useTemplate`\n\nIn order for a bulk sender to function, at a minimum the\ncampaign's query results must return at least the column\n`borrowerId`.\n\nNote that bulk senders send with `{ strictUndefined: true }` so any missing context variables \nwill cause the send request to fail rather than sending with a default (empty) value, which is\nthe standard behavior for the `/communicator/send` endpoint.\n\nFor more details on required columns see\nper-`InteractionSubject` documentation for&nbsp;\n<a href=\"/api-docs/api-public/campaigns/peach.people.campaigns.handlers_runs.campaign_run_create\">Campaign run</a>.\n",
      "name": "Bulk Senders"
    },
    {
      "description": "Tasks are used to track work that needs to be done by agents in the CRM. Tasks\nare automatically assigned to agents based on configurable characteristics of\nthe agents and the tasks.\n",
      "name": "Tasks"
    },
    {
      "description": "Task-Worker Pairing Configs are used to configure the behavior of tasks in the CRM. A TWPC\nis used to define the rules for how tasks are assigned to agents (i.e., workers).\n\nIn order to configure a TWPC you need to understand the contents of task and worker\nobjects. See the\n<a href=\"/api-docs/api-public/tasks/peach.twilio.taskrouter.handlers.list_unterminated_tasks\">List Unterminated Task</a>\nendpoint and the\n<a href=\"/api-docs/api-public/tasks/peach.twilio.taskrouter.handlers_workers.list_workers\">List Workers</a>\nendpoint for more details.\n",
      "name": "Task-Worker Pairing Configs"
    },
    {
      "name": "Line of Credit Migration"
    },
    {
      "description": "Errors",
      "name": "Errors"
    }
  ],
  "paths": {
    "/3rdparty/{companyId}/plaid/credentials": {
      "post": {
        "description": "Store or replace the Plaid API credentials associated with this company.\n\nThese credentials are used by Peach to connect to Plaid on the company's behalf for\noperations such as bank account linking and balance checks. Both fields are required;\npartial updates are not supported — submitting new credentials replaces the existing ones entirely.\n",
        "operationId": "peach.company.handlers.third_party_update_plaid_credentials",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Plaid"
        },
        "responses": {
          "204": {
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "company:update.sensitive"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update a company's Plaid credentials",
        "tags": [
          "Companies"
        ]
      }
    },
    "/active-escalations": {
      "get": {
        "description": "List active case escalations for a company\n",
        "operationId": "peach.cases.escalations.handlers.case_open_escalations_get_by_company",
        "parameters": [
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/offset"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CaseEscalationDetailedPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "case:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List active case escalations for a company",
        "tags": [
          "Cases"
        ]
      }
    },
    "/amortize": {
      "post": {
        "description": "This utility generates an amortization schedule for an installment loan or line of credit draw.\nThe `atOrigination` field is where you specify various loan or draw-specific inputs such as the\nstart date, amount to be financed, and duration.\n\nYou can specify generic loan type configurations as part of the request body (or omit these\nfields and use the default configurations). Alternatively, you can use predefined loan type\nconfigurations by passing in a `loanTypeId`. For a line of credit draw, you can also pass in\na `loanId` in place of a `loanTypeId`. When a `loanId` is provided, the amortization calculation\nwill reference the configurations of the loan type associated with the `loanId`, and will also\nuse the line of credit start date and rates associated with the `loanId` if these fields are\nnot passed in.\n\nWhen generating an amortization schedule from a predefined loan type, you can pass in either a\n`personAddress` or `personAddressId` to check the amortization output against any existing rate\ncaps associated with the loan type.\n\nNote for the \"Predefined Line Of Credit\" option only:\n- If the loan type is configured to accrue interest as `accrualMethod=compoundWithFees`, there is\na known limitation to the draw amortization calculation logic.\n- The draw amortization calculation will be done using the `compound` method and not `compoundWithFees`.\nTo ensure that the system calculates interest accurately, amortized draws should NOT include any fees.\n",
        "operationId": "peach.loans.handlers.amortization_get",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AmortizableLoan"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Amortize"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:amortize"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Amortize loan",
        "tags": [
          "Loan Amortization"
        ]
      }
    },
    "/amortize-combinations": {
      "post": {
        "description": "NOTE: This endpoint does not support recurring dynamic fees. Origination fees and other dynamic non-recurring fees are supported.\n",
        "operationId": "peach.loans.handlers.amortization_combinations",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AmortizeCombinationsBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AmortizationCombinationsResult"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:amortize"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Amortize loan combinations",
        "tags": [
          "Loan Amortization"
        ]
      }
    },
    "/auth/exchange-token": {
      "post": {
        "operationId": "peach.security.handlers.exchange_token_create",
        "parameters": [],
        "requestBody": {
          "$ref": "#/components/requestBodies/ExchangeTokenPost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/TemporaryTokenResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "auth:exchange-token"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Takes a user ID and returns a temporary token that can be exchanged for a real auth token.",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/password": {
      "post": {
        "operationId": "peach.security.handlers.password_post",
        "requestBody": {
          "$ref": "#/components/requestBodies/AuthPost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/SingletonResponse"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Change password",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/permissions": {
      "get": {
        "operationId": "peach.security.handlers.permissions_get",
        "responses": {
          "200": {
            "$ref": "#/components/responses/UserPermissions"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get all permissions for the requesting user",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/token": {
      "delete": {
        "operationId": "peach.security.handlers.logout",
        "responses": {
          "200": {
            "$ref": "#/components/responses/SingletonResponse"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerAuth": []
          }
        ],
        "summary": "End login session, invalidating current login token.",
        "tags": [
          "Auth"
        ]
      },
      "post": {
        "operationId": "peach.security.handlers.validate_and_send_token",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyIdQuery"
          },
          {
            "$ref": "#/components/parameters/domainQuery"
          },
          {
            "$ref": "#/components/parameters/userTypeQuery"
          },
          {
            "$ref": "#/components/parameters/authTypeQuery"
          },
          {
            "$ref": "#/components/parameters/authValueTypeQuery"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/AuthPost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/JWT"
          }
        },
        "security": [],
        "summary": "Exchange username and password for JWT token",
        "tags": [
          "Auth"
        ]
      },
      "put": {
        "operationId": "peach.security.handlers.renew_jwt_token",
        "responses": {
          "200": {
            "$ref": "#/components/responses/JWT"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerAuth": []
          }
        ],
        "summary": "Exchange current token for a new one",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/token/short-lived": {
      "post": {
        "operationId": "peach.security.handlers.short_lived_token",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "permissions": {
                    "description": "List of permissions that the short-lived token can have. These can only be permissions that are already given to the calling user.\n",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/JWT"
          }
        },
        "security": [
          {
            "oauth2": [
              "auth.short-lived-token:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create a short-lived token",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/user": {
      "get": {
        "operationId": "peach.security.handlers.user_info_get",
        "parameters": [],
        "responses": {
          "200": {
            "$ref": "#/components/responses/UserInfo"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get logged-in user's info.\n",
        "tags": [
          "Auth"
        ]
      }
    },
    "/bin-numbers": {
      "post": {
        "operationId": "peach.bin_numbers.handlers.get_bin_number",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "cardNumber": {
                    "description": "The card number. Must provide at least first 4 digits of the card number.",
                    "example": "4111111111111111",
                    "pattern": "^\\d{4,}$",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "properties": {
                            "cardNetwork": {
                              "description": "The card network.",
                              "enum": [
                                "visa",
                                "mastercard",
                                "discover",
                                "americanexpress"
                              ],
                              "example": "visa",
                              "nullable": true,
                              "type": "string"
                            },
                            "cardType": {
                              "description": "The card type.",
                              "enum": [
                                "credit",
                                "debit"
                              ],
                              "example": "debit",
                              "type": "string"
                            },
                            "issuer": {
                              "description": "The card issuer institution name.",
                              "example": "First United Bank",
                              "type": "string"
                            },
                            "lastUpdatedDate": {
                              "description": "Peach system receives a BIN list published by First Data/Fiserv a few times per month.\nThis is the date when Peach received the latest update.\n",
                              "type": "string"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Card Details"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "properties": {
                            "lastUpdatedDate": {
                              "description": "Peach system receives a BIN list published by First Data/Fiserv a few times per month.\nThis is the date when Peach received the latest update.\n",
                              "type": "string"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": [
              "bin.numbers:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get BIN details from card number",
        "tags": [
          "BIN Numbers"
        ]
      }
    },
    "/bootstrap": {
      "get": {
        "description": "Get pre-auth app metadata and settings.\n\nFetch metadata and settings for a Peach application. This endpoint is public readable\nbecause this information is necessary to properly render the frontend even for\nusers who are not yet logged-in — i.e., the login page needs to have the right\ncompany name and color scheme.\n\nSince multiple frontend application are supported by the backend you must specify\nfor *which* frontend application this bootstrap request is intended. The best way\nto do this is by specifying domain. e.g., `domain=myappdomain.com`. (Please note\nthat a \"Company App Domain\" must already be configured for your environment for\nthis to work. There is no public API for this yet, so contact support.)\n\nYou may also specify the `companyId` and `appDomainType` instead of the `domain`,\nbut this is discouraged and mostly intended for development / debugging.\n",
        "operationId": "peach.security.handlers.bootstrap",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyIdQuery"
          },
          {
            "$ref": "#/components/parameters/domainQuery"
          },
          {
            "$ref": "#/components/parameters/appDomainTypeQuery"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FrontendPreauthBootstrap"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [],
        "summary": "Get bootstrap data",
        "tags": [
          "Frontend"
        ]
      }
    },
    "/campaign-workers/bulk-senders": {
      "get": {
        "description": "Get a list of all bulk senders.\n",
        "operationId": "peach.people.campaigns.handlers_workers.bulk_sender_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/BulkSenderList"
          }
        },
        "security": [
          {
            "oauth2": [
              "bulksender:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List bulk senders",
        "tags": [
          "Bulk Senders"
        ]
      },
      "post": {
        "description": "Create a new bulk sender.\n",
        "operationId": "peach.people.campaigns.handlers_workers.bulk_sender_create",
        "requestBody": {
          "$ref": "#/components/requestBodies/BulkSenderCreate"
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/BulkSender"
          }
        },
        "security": [
          {
            "oauth2": [
              "bulksender:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create bulk sender",
        "tags": [
          "Bulk Senders"
        ]
      }
    },
    "/campaign-workers/bulk-senders/{bulkSenderId}": {
      "delete": {
        "description": "Delete a bulk sender by ID.\n",
        "operationId": "peach.people.campaigns.handlers_workers.bulk_sender_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/bulkSenderId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "bulksender:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete bulk sender",
        "tags": [
          "Bulk Senders"
        ]
      },
      "get": {
        "description": "Get a bulk sender by ID.\n",
        "operationId": "peach.people.campaigns.handlers_workers.bulk_sender_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/bulkSenderId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/BulkSender"
          }
        },
        "security": [
          {
            "oauth2": [
              "bulksender:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get bulk sender by ID",
        "tags": [
          "Bulk Senders"
        ]
      },
      "put": {
        "description": "Update the existing bulk sender\n",
        "operationId": "peach.people.campaigns.handlers_workers.bulk_sender_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/bulkSenderId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/BulkSenderUpdate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/BulkSender"
          }
        },
        "security": [
          {
            "oauth2": [
              "bulksender:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update bulk sender",
        "tags": [
          "Bulk Senders"
        ]
      }
    },
    "/campaign-workers/contact-exporters": {
      "get": {
        "description": "Get a list of all contact exporters.\n",
        "operationId": "peach.people.contact_exporters.handlers.contact_exporter_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ContactExporterList"
          }
        },
        "security": [
          {
            "oauth2": [
              "contactexporter:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List contact exporters",
        "tags": [
          "Contact Exporters"
        ]
      },
      "post": {
        "description": "Create a new Contact Exporter by defining the contact matching criteria and the exportable columns. If\ndesired, designate an SFTP setting and/or screen through Compliance Guard.\n\nWhen contacts are screened, the exporter calls Compliance Guard with the `checkAtCompanyNoon` flag enabled.\nSee the `checkAtCompanyNoon` field on the <a href=\"/api-docs/api-public/compliance-guard/peach.people.handlers.can_interact\">Can Interact Endpoint</a> for\nfurther information. In other words, regardless of the time of day that the exporter runs, compliance is\nchecked as of noon in the company's time zone. This does not override other reasons a check can fail:\nthe borrower having a Do Not Interact in place, having reached the interaction frequency limit, etc.\n\nWhere possible, it's always advised to check compliance right before an action. Many things can change\n(payments are made, other automated interactions are sent, consents/addresses can be updated)\nfrom when you plan something to happen to when it actually happens. Lenders are responsible for ensuring\nit is still permissible to conduct the interaction.\n",
        "operationId": "peach.people.contact_exporters.handlers.contact_exporter_create",
        "requestBody": {
          "$ref": "#/components/requestBodies/ContactExporterCreate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ContactExporter"
          }
        },
        "security": [
          {
            "oauth2": [
              "contactexporter:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create contact exporter",
        "tags": [
          "Contact Exporters"
        ]
      }
    },
    "/campaign-workers/contact-exporters/{contactExporterId}": {
      "delete": {
        "description": "Delete a contact exporter by ID.\n",
        "operationId": "peach.people.contact_exporters.handlers.contact_exporter_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/contactExporterId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "contactexporter:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete contact exporter",
        "tags": [
          "Contact Exporters"
        ]
      },
      "get": {
        "description": "Get a contact exporter by ID.\n",
        "operationId": "peach.people.contact_exporters.handlers.contact_exporter_get_by_id",
        "parameters": [
          {
            "$ref": "#/components/parameters/contactExporterId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ContactExporter"
          }
        },
        "security": [
          {
            "oauth2": [
              "contactexporter:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get contact exporter by ID",
        "tags": [
          "Contact Exporters"
        ]
      },
      "put": {
        "description": "Update a contact exporter by ID.\n",
        "operationId": "peach.people.contact_exporters.handlers.contact_exporter_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/contactExporterId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/ContactExporterUpdate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ContactExporter"
          }
        },
        "security": [
          {
            "oauth2": [
              "contactexporter:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update contact exporter",
        "tags": [
          "Contact Exporters"
        ]
      }
    },
    "/campaigns": {
      "get": {
        "description": "Get a list of all campaigns.\n",
        "operationId": "peach.people.campaigns.handlers.campaign_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/BorrowerCampaignList"
          }
        },
        "security": [
          {
            "oauth2": [
              "borrowercampaign:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get campaigns",
        "tags": [
          "Campaigns"
        ]
      },
      "post": {
        "description": "Create a new campaign by associating a Redash query that returns a single column containing\nborrower IDs labeled \"id\". The campaign can also be scheduled.\n",
        "operationId": "peach.people.campaigns.handlers.campaign_create",
        "requestBody": {
          "$ref": "#/components/requestBodies/BorrowerCampaignCreate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/BorrowerCampaign"
          }
        },
        "security": [
          {
            "oauth2": [
              "borrowercampaign:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create campaign",
        "tags": [
          "Campaigns"
        ]
      }
    },
    "/campaigns/{borrowerCampaignId}": {
      "get": {
        "description": "Get a campaign by ID.\n",
        "operationId": "peach.people.campaigns.handlers.campaign_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/borrowerCampaignId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/BorrowerCampaign"
          }
        },
        "security": [
          {
            "oauth2": [
              "borrowercampaign:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get campaign by ID",
        "tags": [
          "Campaigns"
        ]
      },
      "put": {
        "description": "Update a campaign by ID.\n",
        "operationId": "peach.people.campaigns.handlers.campaign_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/borrowerCampaignId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/BorrowerCampaignUpdate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/BorrowerCampaign"
          }
        },
        "security": [
          {
            "oauth2": [
              "borrowercampaign:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update campaign",
        "tags": [
          "Campaigns"
        ]
      }
    },
    "/campaigns/{borrowerCampaignId}/runs": {
      "get": {
        "description": "Get a list of campaign runs.\n",
        "operationId": "peach.people.campaigns.handlers_runs.campaign_run_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/borrowerCampaignId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/BorrowerCampaignList"
          }
        },
        "security": [
          {
            "oauth2": [
              "borrowercampaign.run:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get campaign runs",
        "tags": [
          "Campaigns"
        ]
      },
      "post": {
        "description": "Start a new borrower campaign run and save results.\n\nThe behavior of the campaign run is controlled by configured settings on\nthe campaign object and via the associated `BulkSender` and `ContextExporter` objects.\n\nBy default when the campaign runs, it executes the Redash query referenced in the\n`redashQueryUrl` and feeds the query results as input to the campaign run.\n\nOptionally, you can override this by specifing a `queryResultsOverride` field\nas input.\n",
        "operationId": "peach.people.campaigns.handlers_runs.campaign_run_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/borrowerCampaignId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/BorrowerCampaignRunCreate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/BorrowerCampaignRun"
          }
        },
        "security": [
          {
            "oauth2": [
              "borrowercampaign.run:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Run campaign",
        "tags": [
          "Campaigns"
        ]
      }
    },
    "/campaigns/{borrowerCampaignId}/runs/{borrowerCampaignRunId}": {
      "get": {
        "description": "Get campaign run data by ID.\n",
        "operationId": "peach.people.campaigns.handlers_runs.campaign_run_read",
        "parameters": [
          {
            "$ref": "#/components/parameters/borrowerCampaignId"
          },
          {
            "$ref": "#/components/parameters/borrowerCampaignRunId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/BorrowerCampaignRun"
          }
        },
        "security": [
          {
            "oauth2": [
              "borrowercampaign.run:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get campaign run",
        "tags": [
          "Campaigns"
        ]
      },
      "put": {
        "description": "Update campaign run data.\n",
        "operationId": "peach.people.campaigns.handlers_runs.campaign_run_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/borrowerCampaignId"
          },
          {
            "$ref": "#/components/parameters/borrowerCampaignRunId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/BorrowerCampaignRunUpdate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/BorrowerCampaignRun"
          }
        },
        "security": [
          {
            "oauth2": [
              "borrowercampaign.run:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update campaign run",
        "tags": [
          "Campaigns"
        ]
      }
    },
    "/campaigns/{borrowerCampaignId}/runs/{borrowerCampaignRunId}/download": {
      "get": {
        "description": "Download files generated by a campaign run.\n",
        "operationId": "peach.people.campaigns.handlers_runs.campaign_run_download",
        "parameters": [
          {
            "$ref": "#/components/parameters/borrowerCampaignId"
          },
          {
            "$ref": "#/components/parameters/borrowerCampaignRunId"
          },
          {
            "$ref": "#/components/parameters/downloadFile"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "borrowercampaign.run:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Download all files",
        "tags": [
          "Campaigns"
        ]
      }
    },
    "/card-issuers": {
      "get": {
        "operationId": "peach.card_issuers.handlers.card_issuers_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CardIssuerPagingResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "card.issuer:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get card issuers",
        "tags": [
          "Card Issuers"
        ]
      },
      "post": {
        "description": "Creates a new card issuer.",
        "operationId": "peach.card_issuers.handlers.card_issuer_create",
        "parameters": [],
        "requestBody": {
          "$ref": "#/components/requestBodies/CardIssuerPost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CardIssuerResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "card.issuer:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create card issuer",
        "tags": [
          "Card Issuers"
        ]
      }
    },
    "/card-issuers/{cardIssuerId}": {
      "delete": {
        "operationId": "peach.card_issuers.handlers.card_issuer_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/cardIssuerId"
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "card.issuer:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete card issuer",
        "tags": [
          "Card Issuers"
        ]
      },
      "get": {
        "operationId": "peach.card_issuers.handlers.card_issuer_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/cardIssuerId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CardIssuerResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "card.issuer:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get card issuer by ID",
        "tags": [
          "Card Issuers"
        ]
      },
      "put": {
        "operationId": "peach.card_issuers.handlers.card_issuer_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/cardIssuerId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CardIssuerPut"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CardIssuerResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "card.issuer:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update card issuer",
        "tags": [
          "Card Issuers"
        ]
      }
    },
    "/case-types": {
      "get": {
        "operationId": "peach.cases.case_types.handlers.list_case_type",
        "parameters": [
          {
            "$ref": "#/components/parameters/loanTypeIdFilter"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/smartReviewsEnable"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CaseTypesPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "case.type:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get case types",
        "tags": [
          "Case Types"
        ]
      },
      "post": {
        "operationId": "peach.cases.case_types.handlers.create_case_type",
        "requestBody": {
          "$ref": "#/components/requestBodies/CaseTypePost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CaseType"
          }
        },
        "security": [
          {
            "oauth2": [
              "case.type:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create type",
        "tags": [
          "Case Types"
        ]
      }
    },
    "/case-types/{caseTypeId}": {
      "get": {
        "operationId": "peach.cases.case_types.handlers.get_case_type_by_id",
        "parameters": [
          {
            "$ref": "#/components/parameters/caseTypeId"
          },
          {
            "$ref": "#/components/parameters/version"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CaseType"
          }
        },
        "security": [
          {
            "oauth2": [
              "case.type:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get type by ID",
        "tags": [
          "Case Types"
        ]
      },
      "put": {
        "description": "A `PUT` request is used to update an existing type configuration. While the type is in `draft` status requests\ncan move it to `active`. Setting the `status` to `deprecated` will immediately hide it from future `GET`\nall requests, and spawn a `draft` replica which can be edited and published in its place.\n",
        "operationId": "peach.cases.case_types.handlers.update_case_type",
        "parameters": [
          {
            "$ref": "#/components/parameters/caseTypeId"
          },
          {
            "$ref": "#/components/parameters/version"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CaseTypePut"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CaseType"
          }
        },
        "security": [
          {
            "oauth2": [
              "case.type:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update type",
        "tags": [
          "Case Types"
        ]
      }
    },
    "/case-types/{caseTypeId}/associations": {
      "delete": {
        "operationId": "peach.cases.case_types.handlers.case_type_remove_association",
        "parameters": [
          {
            "$ref": "#/components/parameters/caseTypeId"
          },
          {
            "in": "query",
            "name": "objectType",
            "required": true,
            "schema": {
              "enum": [
                "doNotInteractType",
                "notificationType",
                "loanType"
              ],
              "type": "string"
            }
          },
          {
            "description": "The ID of the object to dissociate from",
            "in": "query",
            "name": "objectId",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "case.type.association:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Remove association",
        "tags": [
          "Case Types"
        ]
      },
      "post": {
        "operationId": "peach.cases.case_types.handlers.case_type_add_association",
        "parameters": [
          {
            "$ref": "#/components/parameters/caseTypeId"
          },
          {
            "in": "query",
            "name": "objectType",
            "required": true,
            "schema": {
              "enum": [
                "doNotInteractType",
                "notificationType",
                "loanType"
              ],
              "type": "string"
            }
          },
          {
            "description": "The ID of the object to associate with",
            "in": "query",
            "name": "objectId",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "case.type.association:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Add association",
        "tags": [
          "Case Types"
        ]
      }
    },
    "/case-types/{caseTypeId}/create-smart-review-tasks": {
      "post": {
        "operationId": "peach.cases.case_types.handlers.create_smart_review_tasks",
        "parameters": [
          {
            "$ref": "#/components/parameters/caseTypeId"
          },
          {
            "$ref": "#/components/parameters/caseTypeSmartReviewsAsOfDate"
          }
        ],
        "responses": {
          "200": {
            "description": "Run successful with no reminder tasks created"
          },
          "201": {
            "$ref": "#/components/responses/SmartReviewsTasksCreated"
          }
        },
        "security": [
          {
            "oauth2": [
              "case:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create case type review tasks for ID",
        "tags": [
          "Case Types"
        ]
      }
    },
    "/cases": {
      "get": {
        "description": "Get all cases. Returns only borrower-bound cases by default.\n",
        "operationId": "peach.cases.handlers.list_cases_by_company",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "$ref": "#/components/parameters/expand"
          },
          {
            "$ref": "#/components/parameters/includeFields"
          },
          {
            "$ref": "#/components/parameters/associations"
          },
          {
            "$ref": "#/components/parameters/caseOutcome"
          },
          {
            "$ref": "#/components/parameters/caseStatus"
          },
          {
            "$ref": "#/components/parameters/caseStatuses"
          },
          {
            "$ref": "#/components/parameters/caseStatusUpdatedBefore"
          },
          {
            "$ref": "#/components/parameters/caseStatusUpdatedAfter"
          },
          {
            "$ref": "#/components/parameters/caseNumber"
          },
          {
            "$ref": "#/components/parameters/caseType"
          },
          {
            "$ref": "#/components/parameters/caseTypeId"
          },
          {
            "$ref": "#/components/parameters/createdBefore"
          },
          {
            "$ref": "#/components/parameters/createdAfter"
          },
          {
            "$ref": "#/components/parameters/nupUpdatedNull"
          },
          {
            "$ref": "#/components/parameters/snoozedUntilBefore"
          },
          {
            "$ref": "#/components/parameters/snoozedUntilAfter"
          },
          {
            "$ref": "#/components/parameters/owningEmployeeId"
          },
          {
            "$ref": "#/components/parameters/loanTypes"
          },
          {
            "$ref": "#/components/parameters/filterInteractionStatus"
          },
          {
            "$ref": "#/components/parameters/filterInteractionChannel"
          },
          {
            "$ref": "#/components/parameters/filterInteractionScheduledAtFromBefore"
          },
          {
            "$ref": "#/components/parameters/filterInteractionScheduledAtFromAfter"
          },
          {
            "$ref": "#/components/parameters/filterInteractionScheduledAtToBefore"
          },
          {
            "$ref": "#/components/parameters/filterInteractionScheduledAtToAfter"
          },
          {
            "$ref": "#/components/parameters/associatedDocumentId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CasesPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "case:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get all cases",
        "tags": [
          "Cases"
        ]
      }
    },
    "/communicator/preview": {
      "post": {
        "description": "Render the template and return as a JSON response.\n\nIt selects an appropriate Template Descriptor (matching `subject`, `channel`), and\nrenders the active Template Version with the given `context`. \n\nThe three contents are returned in a single JSON response, they are `contentHtml`,\n`contentText` and `subjectLine`.\n\nNOTE: This is different from the `/render` endpoints because it does not\nreturn a *file* but rather the simple text-respresentation of the rendered\ntemplates that would be used in rendering a file. It is generally easier\nto test and debug the rendered templates as JSON strings rather than, for\ninstance a PDF file.\n",
        "operationId": "peach.communicator.handlers.preview",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "caseId": {
                    "type": "string"
                  },
                  "channel": {
                    "$ref": "#/components/schemas/InteractionChannel"
                  },
                  "context": {
                    "type": "object"
                  },
                  "loanId": {
                    "type": "string"
                  },
                  "overrideTemplateId": {
                    "$ref": "#/components/schemas/OverrideTemplateId"
                  },
                  "personId": {
                    "type": "string"
                  },
                  "subject": {
                    "$ref": "#/components/schemas/InteractionSubject"
                  }
                },
                "required": [
                  "subject",
                  "channel",
                  "personId"
                ],
                "type": "object"
              }
            }
          },
          "description": "Template selectors and the data.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "contentHtml": {
                      "type": "string"
                    },
                    "contentText": {
                      "type": "string"
                    },
                    "subjectLine": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator:render"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Render template preview for subject",
        "tags": [
          "Communicator"
        ]
      }
    },
    "/communicator/preview-free-form-email": {
      "post": {
        "description": "Render a template for \"free-form\" emails and return is as JSON.\n\nA free-form message is one that can contain any content.\n\nTemplates previewed via this endpoint will be free-form but still be branded.\ni.e., they will use the `freeFormBranded` interaction subject, not `freeForm`.\n\nThis returns the three contents of a template in a single JSON response, \nthey are `contentHtml`, `contentText` and `subjectLine`.\n",
        "operationId": "peach.communicator.handlers.preview_free_form_email",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "contentHtml": {
                    "description": "The content of the email in the HTML format.",
                    "type": "string"
                  },
                  "contentPlain": {
                    "description": "The content of the email in the plain text format.",
                    "type": "string"
                  },
                  "subjectLine": {
                    "description": "The subject line of the email.",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Subject line and content of the free form email.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "contentHtml": {
                      "type": "string"
                    },
                    "contentText": {
                      "type": "string"
                    },
                    "subjectLine": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator:render"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Preview free-form email",
        "tags": [
          "Communicator"
        ]
      }
    },
    "/communicator/receive": {
      "post": {
        "description": "Receive a message.\n\nThis is different from a normal `/interactions` creation because\nit creates the interaction and also performs associated \"inbound message\"\nactions:\n\n- if the message is an email sent to an email address configured as\n  \"unmonitored\", it will autorespond that the email was not received because\n  it was sent to an \"unmonitored address\".\n- it will publish a taskrouter task for inbound interactions (either\n  `handleInboundInteraction` or `handleUnboundInboundInteraction`).\n",
        "operationId": "peach.communicator.handlers.handle_receive",
        "requestBody": {
          "$ref": "#/components/requestBodies/CommunicatorReceiveOnlyPost"
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Interaction"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "interaction:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Receive message",
        "tags": [
          "Communicator"
        ]
      }
    },
    "/communicator/render": {
      "post": {
        "description": "Render a file (`text`, `html` or `pdf`) from template and download it.\n\nIt selects an appropriate Template Descriptor (matching `subject`, `channel`), and\nrenders the active Template Version with the given `context`. Only\nthe content matching the `fmt` query parameter is returned in the file.\n\nThe rendered template file is then downloaded as an attachment. (i.e., a\nresponse is sent with the header `Content-Disposition: attachment`.)\n\nNote: that a Document Descriptor is NOT created.\n",
        "operationId": "peach.communicator.handlers.render",
        "parameters": [
          {
            "$ref": "#/components/parameters/renderFormat"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/TemplateRender"
                  },
                  {
                    "required": [
                      "subject",
                      "channel",
                      "personId"
                    ],
                    "type": "object"
                  }
                ]
              }
            }
          },
          "description": "Template selectors and the data",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator:render"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Render to download",
        "tags": [
          "Communicator"
        ]
      }
    },
    "/communicator/render-to-document": {
      "post": {
        "description": "Render a file (`text`, `html` or `pdf`) from template and write it to a document descriptor.\n\nIt selects an appropriate Template Descriptor (matching `subject`, `channel`), and\nrenders the active Template Version with the given `context`. Only\nthe content matching the `fmt` query parameter is returned in the file.\n\nThe rendered template file is then associated with the given `documentId`. (i.e., this\nnew content can be downloaded via that Document Descriptor.)\n\nWARNING: if there is existing document content for that document it will be\noverwritten.\n",
        "operationId": "peach.communicator.handlers.render_to_document",
        "parameters": [
          {
            "$ref": "#/components/parameters/renderFormat"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/TemplateRender"
                  },
                  {
                    "properties": {
                      "documentId": {
                        "description": "The unique identifier of the Document Descriptor. Can be Peach or lender's external identifier. The rendered content will create a file in HTML or text format and associate it with the documentId. To convert the rendered document to PDF please use another endpoint, `convert_person_document`, as an extra step.\n",
                        "type": "string"
                      },
                      "statementId": {
                        "description": "The unique identifier of the Statement. Can be Peach or lender's external identifier. The statement attributes will be used as dynamic fields in the template.\n",
                        "type": "string"
                      }
                    },
                    "required": [
                      "subject",
                      "channel",
                      "personId",
                      "documentId"
                    ],
                    "type": "object"
                  }
                ]
              }
            }
          },
          "description": "Template selectors, context and the document ID.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator:render"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Render to document",
        "tags": [
          "Communicator"
        ]
      }
    },
    "/communicator/resend": {
      "post": {
        "description": "Copy the fields from an existing interaction into a new interaction\nand queue that new interaction for sending. \n\nWARNING: This message is not checked against Compliance Guard.\n",
        "operationId": "peach.communicator.handlers.resend",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "interactionId": {
                    "description": "The interaction to resend.",
                    "type": "string"
                  }
                },
                "required": [
                  "interactionId"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "properties": {
                            "interactionId": {
                              "description": "ID of the new interaction.",
                              "type": "string"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Accepted"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator:send"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Resend existing interaction",
        "tags": [
          "Communicator"
        ]
      }
    },
    "/communicator/send": {
      "post": {
        "description": "Send a message and save it as a new interaction.\n\nThe message is checked against Compliance Guard and may be rejected\nif it violates any rules. \n\nIf the message is accepted, it is queued for send. \nYou can check the status of the queued interaction by calling \n`GET` on `/interactions/{interactionId}` endpoint with the interaction ID\nreturned by this endpoint.\n\n## Context Variables\n### Hydratable Context Variables\nCertain context variables can be \"hydrated\" by this endpoint for use in the template\nbeing rendered for sending. \n\nFor instance, if you provide a `loanId` in the request\nbody it is \"hydrated\" to a `loan` object and passed to the context. This means you\ncan then reference things like `{{loan.displayId}}` when customizing the template.\n\n- `companyId` hydrates to `company`\n- `loanId` hydrates to `loan`\n- `loanIds` hydrates to `loans`\n- `caseId` hydrates to `case`\n\n### No Automatic Context Variables\nNote that this endpoint does not automatically fill in context variables.\n\nIf the template you're sending requires context variables, you must provide them. This\ncan sometimes be confusing because Peach will automatically calculate and include \ncontext variables when the system sends a message automatically. See\n<a href=\"/api-docs/api-public/system-sent-messages\">System Sent Messages</a> for more information.\n\n## Difference from `/interactions` endpoint\nNote this is different from `POST`ing to a `/interactions` endpoint because those\nendpoints create the interaction object, but do NOT send an actual message. \n(You can think of that endpoint as creating a historical log of an interaction\nwhich happened elsewhere.)\n",
        "operationId": "peach.communicator.handlers.handle_send",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommunicatorSend"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "OK"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The request was well-formed but was unable to be processed due to failed business logic validations. This includes scenarios where:\n- The template for this type of message is disabled.\n- No suitable email or phone contact found.\n- The contact does not belong to the specified borrower.\n- The borrower is inactive or not eligible for the type of interaction attempted.\n- Communication consent for the requested channel has been revoked by the borrower.\n- The contact information is marked as invalid or archived.\n- The borrower has opted out of receiving certain types of messages (e.g., text messages) to the specified contact method.\n- The interaction is blocked by Compliance Guard due to federal, state, or business rules violations.\n- The request fails due to time-of-day restrictions outside permitted communication hours, though this case will specifically include a `sendAt` attribute indicating the next allowable time.\n- The loan associated with the communication is missing critical details or does not belong to the borrower.\n- An invalid address prevents determining applicable state rules for communication.\nEach failure is accompanied by a detailed message explaining the specific reason the interaction cannot proceed.\n"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator:send"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Send message",
        "tags": [
          "Communicator"
        ]
      }
    },
    "/communicator/send-confirmation-code": {
      "post": {
        "description": "Send a verification code to an email or phone number.\n\nThis creates a confirmation code in the system which can be used\nvia the `.../contacts` endpoint to verify the contact. (i.e., this \nsets the `verified` attribute of the contact to `true`.)\n\nThis endpoint is rate limited to 10 requests per *borrower*\nper hour.\n\nAn interaction is created with InteractionSubject `confirmationCode`.\n\nNOTE: This endpoint is not checked against Compliance Guard, however\nit should never be necessary to restrict sending confirmation codes\ndue to compliance guard rules.\n",
        "operationId": "peach.communicator.confirmation_codes.handlers.send_confirmation_code",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "channel": {
                    "$ref": "#/components/schemas/InteractionChannel"
                  },
                  "context": {
                    "description": "Template specific properties to substitute in the corresponding\nConfirmationCode template.\n",
                    "type": "object"
                  },
                  "email": {
                    "description": "The destination email address.",
                    "type": "string"
                  },
                  "personId": {
                    "description": "The borrower's unique identifier. Can be Peach or lender's\nexternal identifier.\n",
                    "type": "string"
                  },
                  "phone": {
                    "description": "The destination phone number.",
                    "type": "string"
                  }
                },
                "required": [
                  "personId"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator.confirmationcode:send"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Send confirmation code for contact verification",
        "tags": [
          "Communicator"
        ]
      }
    },
    "/communicator/send-free-form-email": {
      "post": {
        "description": "Sends an email with the `freeFormBranded` template. \n\nThis selects the Template Descriptor with `subject=freeFormBranded` and\nits currently active Template Version. The `freeFormBranded`` template allows \nfor the insertion of completely custom content within a standard branded email\ntemplate.\n\nWARNING: This endpoint is not checked against Compliance Guard.\n",
        "operationId": "peach.communicator.handlers.send_free_form_email",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "contentHtml": {
                    "description": "The content of the email in the HTML format.",
                    "type": "string"
                  },
                  "contentPlain": {
                    "description": "The content of the email in the plain text format.",
                    "type": "string"
                  },
                  "isTransactional": {
                    "$ref": "#/components/schemas/SendIsTransactionalDefaultFalse"
                  },
                  "language": {
                    "$ref": "#/components/schemas/language"
                  },
                  "personalizations": {
                    "description": "Specifies the email destination. See the body of POST /mail/send at https://sendgrid.com/docs/api-reference/.\n",
                    "items": {},
                    "type": "array"
                  },
                  "previousInteractionId": {
                    "description": "The ID of an existing interaction to link the new interaction to.\n",
                    "type": "string"
                  },
                  "subjectLine": {
                    "description": "The subject line of the email.",
                    "type": "string"
                  },
                  "theme": {
                    "$ref": "#/components/schemas/InteractionTheme"
                  }
                },
                "required": [
                  "personalizations"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "properties": {
                            "interactionId": {
                              "description": "ID of the new interaction",
                              "type": "string"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Accepted"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator:send"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Send free-form email",
        "tags": [
          "Communicator"
        ]
      }
    },
    "/communicator/subjects": {
      "get": {
        "description": "List all the currently available Interaction Subject descriptors.\n\nAn interaction subject is the category or topic to which an interaction pertains.\n(Note this is different from the subject line of an email message.)\n\nFor example, an email or a text message will necessarily contain different\ncontent due to their nature, but they still might pertain to\nthe subject of `paymentReminder`. Similarly, a phone call despite not being\ntext based at all might also pertain to the subject of `paymentReminder`.\n",
        "operationId": "peach.communicator.handlers.subject_descriptors_list",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SubjectDescriptor"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator.template:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List subject desciptors",
        "tags": [
          "Communicator"
        ]
      }
    },
    "/communicator/subjects/{subject}": {
      "get": {
        "description": "Get the descriptor for a specific Interaction Subject.\n\nNote that subject descriptors do not have an `id` field but are\ninstead identified by their unique `subject` field.\n",
        "operationId": "peach.communicator.handlers.subject_descriptor_get_by_subject",
        "parameters": [
          {
            "$ref": "#/components/parameters/subject"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjectDescriptor"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator.template:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get subject descriptor",
        "tags": [
          "Communicator"
        ]
      },
      "put": {
        "description": "Update the descriptor for a specific Interaction Subject.\n\nNote that subject descriptors do not have an `id` field but are\ninstead identified by their unique `subject` field.\n",
        "operationId": "peach.communicator.handlers.subject_descriptor_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/subject"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubjectDescriptor"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjectDescriptor"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator.template:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update subject descriptor",
        "tags": [
          "Communicator"
        ]
      }
    },
    "/communicator/templatedescriptors": {
      "get": {
        "operationId": "peach.communicator.handlers.list_template_descriptors",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/parameters-companyIdQuery"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TemplateDescriptor"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "description": "Bad request"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator.template:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List template descriptors",
        "tags": [
          "Templates"
        ]
      },
      "post": {
        "operationId": "peach.communicator.handlers.create_template_descriptor",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateDescriptorMutate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateDescriptor"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Bad request"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator.template:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create template descriptor",
        "tags": [
          "Templates"
        ]
      }
    },
    "/communicator/templatedescriptors/{descriptorId}": {
      "delete": {
        "operationId": "peach.communicator.handlers.delete_template_descriptor",
        "parameters": [
          {
            "$ref": "#/components/parameters/descriptorId"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator.template:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete template descriptor",
        "tags": [
          "Templates"
        ]
      },
      "get": {
        "operationId": "peach.communicator.handlers.get_template_descriptor",
        "parameters": [
          {
            "$ref": "#/components/parameters/descriptorId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateDescriptor"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "description": "Bad request"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator.template:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get template descriptor",
        "tags": [
          "Templates"
        ]
      },
      "put": {
        "operationId": "peach.communicator.handlers.update_template_descriptor",
        "parameters": [
          {
            "$ref": "#/components/parameters/descriptorId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateDescriptorMutate"
              }
            }
          },
          "description": "The updated template descriptor",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateDescriptor"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Bad request"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator.template:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update template descriptor",
        "tags": [
          "Templates"
        ]
      }
    },
    "/communicator/templatedescriptors/{descriptorId}/templates": {
      "get": {
        "description": "List all template versions for the given template descriptor.",
        "operationId": "peach.communicator.handlers.list_template_versions_by_descriptor",
        "parameters": [
          {
            "$ref": "#/components/parameters/descriptorId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TemplateVersion"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator.template:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List template versions for descriptor",
        "tags": [
          "Templates"
        ]
      }
    },
    "/communicator/templates": {
      "get": {
        "description": "List all template versions. \n\nDeprecated in favor of `/v2/communicator/templates`.\n\nThis dumps all template versions (regardless of active status) without paging.\n",
        "operationId": "peach.communicator.handlers.list_template_versions",
        "parameters": [
          {
            "$ref": "#/components/parameters/parameters-companyIdQuery"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TemplateVersion"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator.template:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List all template versions (Deprecated)",
        "tags": [
          "Templates"
        ]
      },
      "post": {
        "description": "Create a new template versions.\n\nThe new version will not be active until it is activated with \n<a href=\"/api-docs/api-public/templates/peach.communicator.handlers.activate_template_version\">the activate endpoint</a>.\n",
        "operationId": "peach.communicator.handlers.create_template_version",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateVersionMutate"
              }
            }
          },
          "description": "The new template",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateVersion"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Bad request"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator.template:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create template version",
        "tags": [
          "Templates"
        ]
      }
    },
    "/communicator/templates/export": {
      "get": {
        "description": "Export all template descriptors and template versions for a company. \nThe export is in JSON format. It can be used with the import endpoint to\nrestore templates.\n",
        "operationId": "peach.communicator.handlers.export_templates",
        "parameters": [
          {
            "description": "The company to export templates",
            "in": "query",
            "name": "companyId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Export only active templates",
            "in": "query",
            "name": "activeOnly",
            "schema": {
              "default": true,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {},
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator.template:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Export all template descriptors and versions",
        "tags": [
          "Templates"
        ]
      }
    },
    "/communicator/templates/import": {
      "post": {
        "description": "Import exported template descriptors and template versions for a company. The exported\ndata should come from the `/communicator/templates/export` endpoint.\n\nThe import will create new template descriptor if a matching one does not exist\nand will create new template versions if a matching one does not exist. This is often\nused to \"promote\" templates from a testing environment to a production environment.\n",
        "operationId": "peach.communicator.handlers.import_templates",
        "parameters": [
          {
            "description": "The company to import templates for",
            "in": "query",
            "name": "companyId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "If an imported version data has new content and is marked active,\nactivate the newly created template version.\n",
            "in": "query",
            "name": "allowActivate",
            "schema": {
              "default": true,
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "items": {},
                "type": "array"
              }
            }
          },
          "description": "The exported template data",
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successfully imported"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator.template:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Import exported template descriptors and versions",
        "tags": [
          "Templates"
        ]
      }
    },
    "/communicator/templates/{templateVersionId}": {
      "delete": {
        "operationId": "peach.communicator.handlers.delete_template_version",
        "parameters": [
          {
            "$ref": "#/components/parameters/templateVersionId"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator.template:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete template version",
        "tags": [
          "Templates"
        ]
      },
      "get": {
        "operationId": "peach.communicator.handlers.get_template_version",
        "parameters": [
          {
            "$ref": "#/components/parameters/templateVersionId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateVersion"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator.template:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get template version",
        "tags": [
          "Templates"
        ]
      },
      "put": {
        "operationId": "peach.communicator.handlers.update_template_version",
        "parameters": [
          {
            "$ref": "#/components/parameters/templateVersionId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateVersionMutate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateVersion"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Bad request"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator.template:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update template version",
        "tags": [
          "Templates"
        ]
      }
    },
    "/communicator/templates/{templateVersionId}/activate": {
      "put": {
        "description": "Set's the given template version as active.\n\nA template descriptor can have exactly one \"active\" version. The active template\nversion is what's used to generate the content of the messages.\n",
        "operationId": "peach.communicator.handlers.activate_template_version",
        "parameters": [
          {
            "$ref": "#/components/parameters/templateVersionId"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator.template:activate"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Activate template version",
        "tags": [
          "Templates"
        ]
      }
    },
    "/communicator/templates/{templateVersionId}/preview": {
      "post": {
        "description": "Render the template contents of the given Template Version \nusing the given context.\n\nThe three contents are returned in a single JSON response, they are `contentHtml`,\n`contentText` and `subjectLine`.\n",
        "operationId": "peach.communicator.handlers.preview_template_version",
        "parameters": [
          {
            "$ref": "#/components/parameters/templateVersionId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "context": {
                    "type": "object"
                  },
                  "personId": {
                    "$ref": "#/components/schemas/AnyId"
                  }
                },
                "required": [
                  "personId"
                ],
                "type": "object"
              }
            }
          },
          "description": "Context data",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "contentHtml": {
                      "type": "string"
                    },
                    "contentText": {
                      "type": "string"
                    },
                    "subjectLine": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator:render"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Render template version preview",
        "tags": [
          "Templates"
        ]
      }
    },
    "/communicator/templates/{templateVersionId}/render": {
      "post": {
        "description": "Render a file (`text`, `html` or `pdf`) from this Template Version and download it.\n\nOnly the content matching the `fmt` query parameter is returned in the file.\n\nThe rendered template file is then downloaded as an attachment. (i.e., a\nresponse is sent with the header `Content-Disposition: attachment`.)\n\nNote: that a Document Descriptor is NOT created.\n",
        "operationId": "peach.communicator.handlers.render_template_version",
        "parameters": [
          {
            "$ref": "#/components/parameters/templateVersionId"
          },
          {
            "$ref": "#/components/parameters/renderFormat"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/TemplateRender"
                  },
                  {
                    "required": [
                      "personId"
                    ],
                    "type": "object"
                  }
                ]
              }
            }
          },
          "description": "Template selectors and the data",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator:render"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Render template version",
        "tags": [
          "Templates"
        ]
      }
    },
    "/communicator/templates/{templateVersionId}/vars": {
      "get": {
        "description": "List all context variables used in the given template version.\n\nIf a template looks like:\n  \n```\nHello {{name}},\n\nYour loan {{loanName}} is due on {{dueDate}}.\n\nThanks,\n{{companyName}}\n\n{{SOME_MACRO()}}\n```\n\nThe context variables are `name`, `loanName`, `dueDate` and `companyName` as\nwell as whatever context variables are defined in `SOME_MACRO()` (but \n`SOME_MACRO` itself is NOT a context variable). Note that this means\nsometimes a Template Version may contain many context variables since all possible\ncontext variables are included in this list.\n",
        "operationId": "peach.communicator.handlers.get_template_vars",
        "parameters": [
          {
            "$ref": "#/components/parameters/templateVersionId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator.template:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List context vars for template version",
        "tags": [
          "Templates"
        ]
      }
    },
    "/companies/{companyId}/auth/saml/callback": {
      "post": {
        "operationId": "peach.security.handlers.saml_sp_auth.idp_initiated",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/userTypeQuery"
          },
          {
            "$ref": "#/components/parameters/appDomainTypeQuery"
          }
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "properties": {
                  "RelayState": {
                    "type": "string"
                  },
                  "SAMLResponse": {
                    "type": "string"
                  }
                },
                "required": [
                  "SAMLResponse"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [],
        "summary": "SAML callback endpoint\n",
        "tags": [
          "Auth"
        ]
      }
    },
    "/companies/{companyId}/auth/saml/help": {
      "get": {
        "operationId": "peach.security.handlers.saml_sp_auth.idp_setup_help",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/userTypeQuery"
          },
          {
            "$ref": "#/components/parameters/appDomainTypeQuery"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [],
        "summary": "Display IdP setup help\n",
        "tags": [
          "Auth"
        ]
      }
    },
    "/companies/{companyId}/auth/saml/login": {
      "get": {
        "operationId": "peach.security.handlers.saml_sp_auth.sp_initiated",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/userTypeQuery"
          },
          {
            "$ref": "#/components/parameters/appDomainTypeQuery"
          },
          {
            "description": "If `true`, will return a URL to the login instead of redirecting to the login",
            "in": "query",
            "name": "returnUrl",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [],
        "summary": "Redirect to the SAML login endpoint\n",
        "tags": [
          "Auth"
        ]
      }
    },
    "/companies/{companyId}/auth/saml/metadata.xml": {
      "get": {
        "description": "Peach acts as the service provider\n",
        "operationId": "peach.security.handlers.saml_sp_auth.sp_metadata_xml",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/userTypeQuery"
          },
          {
            "$ref": "#/components/parameters/appDomainTypeQuery"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/xml": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [],
        "summary": "Display Peach SP Metadata",
        "tags": [
          "Auth"
        ]
      }
    },
    "/companies/{companyId}/auth/send-one-time-code": {
      "post": {
        "description": "Send a one time code to a phone number or email address. For phone numbers, the code\ncan be sent via text or voice.\n",
        "operationId": "peach.security.handlers.send_one_time_code",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "channel": {
                    "$ref": "#/components/schemas/OneTimeCodeChannel"
                  },
                  "context": {
                    "description": "Template specific properties to substitute in the corresponding\nConfirmationCode template.\n",
                    "type": "object"
                  },
                  "force": {
                    "default": false,
                    "description": "Force using the auth type of the user and not the company\n",
                    "type": "boolean"
                  },
                  "userType": {
                    "$ref": "#/components/schemas/UserType"
                  },
                  "username": {
                    "description": "Either an email address or phone number. \n\nIf the specified `channel` is `text` or `voice`, or the auth type for the specified\n`userType` is `oneTimeCodeText`, then this must be a valid phone number. Otherwise,\nit must be a valid email address.\n\nThis `username` is used to look up the user in the system. \n\nFor agents:\n- If the user belongs to an agent, then the given `username` is used directly as the\n  recipient email address or phone number to text or call with the one time code.\n\nFor borrowers:\n- If the user belongs to a borrower of type `business`, then the given `username`\n  is used directly as the recipient email address or phone number to text or call\n  with the one time code.\n- If the user belongs to a borrower of type `person`, then borrower's primary\n  contact with `affiliation=self` is selected. And that value is \n  used as the recipient email address or phone number to text or call with\n  the one time code.\n",
                    "type": "string"
                  }
                },
                "required": [
                  "username",
                  "channel"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "No input errors were found. i.e., The one time code *may* have been sent successfully.\n\nWe do not reveal if a borrower is found and a message successfully sent in order to prevent\nan attacker from learning if the given phone number or email addresse is \nin the system.\n"
          },
          "429": {
            "description": "This request has been rate limited; please try again later.\n"
          }
        },
        "security": [],
        "summary": "Send one time code.\n",
        "tags": [
          "Auth"
        ]
      }
    },
    "/companies/{companyId}/campaigns/{borrowerCampaignId}/runs": {
      "get": {
        "description": "Get a list of campaign runs.\n",
        "operationId": "peach.people.campaigns.handlers_runs.internal_campaign_run_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/borrowerCampaignId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/BorrowerCampaignList"
          }
        },
        "security": [
          {
            "oauth2": [
              "borrowercampaign.run:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get campaign runs",
        "tags": [
          "Campaigns"
        ]
      }
    },
    "/companies/{companyId}/collection-agencies": {
      "get": {
        "operationId": "peach.collections.handlers.collection_agencies_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/includeArchived"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CollectionAgencyPagingResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "collection.agency:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get collection agencies",
        "tags": [
          "Collection Agencies"
        ]
      },
      "post": {
        "description": "Creates a new collection agency. This is useful when a lender assigns a charged off loan to a third party debt collection agency.\nThe Peach Borrower Portal will display the collection agency information to the borrower. The lender can continue to use Peach as the system\nof record / ledger for charged off loans. The lender can post any payments collected by the collection agency as `isExternal=true` transaction. \nThe Peach system will waterfall the payments and update loan balances.\n",
        "operationId": "peach.collections.handlers.collection_agency_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CollectionAgencyPost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CollectionAgencyResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "collection.agency:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create collection agency",
        "tags": [
          "Collection Agencies"
        ]
      }
    },
    "/companies/{companyId}/collection-agencies/{collectionAgencyId}": {
      "delete": {
        "description": "Sets `isArchived = true` on the agency",
        "operationId": "peach.collections.handlers.collection_agency_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/collectionAgencyId"
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "collection.agency:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete collection agency",
        "tags": [
          "Collection Agencies"
        ]
      },
      "get": {
        "operationId": "peach.collections.handlers.collection_agency_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/collectionAgencyId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CollectionAgencyResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "collection.agency:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get collection agency by ID",
        "tags": [
          "Collection Agencies"
        ]
      },
      "put": {
        "operationId": "peach.collections.handlers.collection_agency_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/collectionAgencyId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CollectionAgencyPut"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CollectionAgencyResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "collection.agency:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update collection agency",
        "tags": [
          "Collection Agencies"
        ]
      }
    },
    "/companies/{companyId}/credit-agencies": {
      "get": {
        "operationId": "peach.credit_reporting.handlers.credit_agencies_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/uploadedByLender"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CreditAgencyPagingResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "credit.agency:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get credit agencies",
        "tags": [
          "Credit Agencies"
        ]
      },
      "post": {
        "description": "Creates a new credit agency.",
        "operationId": "peach.credit_reporting.handlers.credit_agency_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CreditAgencyPost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CreditAgencyResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "credit.agency:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create credit agency",
        "tags": [
          "Credit Agencies"
        ]
      }
    },
    "/companies/{companyId}/credit-agencies/{creditAgencyId}": {
      "get": {
        "operationId": "peach.credit_reporting.handlers.credit_agency_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/creditAgencyId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CreditAgencyResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "credit.agency:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get credit agency by ID",
        "tags": [
          "Credit Agencies"
        ]
      },
      "put": {
        "operationId": "peach.credit_reporting.handlers.credit_agency_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/creditAgencyId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CreditAgencyPut"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CreditAgencyResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "credit.agency:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update credit agency",
        "tags": [
          "Credit Agencies"
        ]
      }
    },
    "/companies/{companyId}/interactions/{interactionId}/call-transcripts/summaries": {
      "get": {
        "operationId": "peach.ai.call_transcription.handlers.internal_unbound_interaction_call_summary_results_get_by_interaction",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/interactionId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/callTranscriptionResultStatus"
          },
          {
            "$ref": "#/components/parameters/aICallTranscriptionResultIdFilter"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CallSummaryResultsPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "interaction:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get interaction call summaries",
        "tags": [
          "Interactions"
        ]
      }
    },
    "/companies/{companyId}/interactions/{interactionId}/previous": {
      "get": {
        "description": "For this interaction, get all the previous interactions linked to it\nvia the `previousInteractionId` field.\n",
        "operationId": "peach.people.interaction.handlers.internal_unbound_get_many_previous_interactions",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/interactionId"
          },
          {
            "$ref": "#/components/parameters/parameters-includeFields"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/InteractionsManyNoPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "interaction:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get previous interactions",
        "tags": [
          "Interactions"
        ]
      }
    },
    "/companies/{companyId}/investors": {
      "get": {
        "description": "Get all investors under the given company.",
        "operationId": "peach.payment_instruments.handlers.investor_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Paging"
                    },
                    {
                      "properties": {
                        "count": {
                          "format": "int32",
                          "type": "integer"
                        },
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/Investor"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "count",
                        "items"
                      ],
                      "type": "object"
                    }
                  ],
                  "title": "rules"
                }
              }
            },
            "description": "success"
          }
        },
        "security": [
          {
            "oauth2": [
              "investor:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get investors",
        "tags": [
          "Investors"
        ]
      },
      "post": {
        "description": "Create an investor under the umbrella of the given company.\n",
        "operationId": "peach.payment_instruments.handlers.investor_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/contactValidate"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Investor"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Investor"
                }
              }
            },
            "description": "created"
          }
        },
        "security": [
          {
            "oauth2": [
              "investor:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create investor",
        "tags": [
          "Investors"
        ]
      }
    },
    "/companies/{companyId}/investors/{investorId}": {
      "get": {
        "operationId": "peach.payment_instruments.handlers.investor_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/investorId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Investor"
                }
              }
            },
            "description": "success"
          }
        },
        "security": [
          {
            "oauth2": [
              "investor:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get investor by ID",
        "tags": [
          "Investors"
        ]
      },
      "put": {
        "operationId": "peach.payment_instruments.handlers.investor_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/investorId"
          },
          {
            "$ref": "#/components/parameters/contactValidate"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvestorMutable"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "updated"
          }
        },
        "security": [
          {
            "oauth2": [
              "investor:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update investor",
        "tags": [
          "Investors"
        ]
      }
    },
    "/companies/{companyId}/investors/{investorId}/settlement-instruments": {
      "get": {
        "operationId": "peach.payment_instruments.handlers.settlement_instrument_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/investorId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Paging"
                    },
                    {
                      "properties": {
                        "count": {
                          "format": "int32",
                          "type": "integer"
                        },
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/SettlementInstrument"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "count",
                        "items"
                      ],
                      "type": "object"
                    }
                  ],
                  "title": "Settlement Instruments"
                }
              }
            },
            "description": "Settlement Instruments"
          }
        },
        "security": [
          {
            "oauth2": [
              "settlement.instrument:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get settlement instruments",
        "tags": [
          "Settlement Instruments"
        ]
      },
      "post": {
        "operationId": "peach.payment_instruments.handlers.settlement_instrument_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/investorId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettlementInstrument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SettlementInstrument"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Settlement Instrument Created"
          }
        },
        "security": [
          {
            "oauth2": [
              "settlement.instrument:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create settlement instrument",
        "tags": [
          "Settlement Instruments"
        ]
      }
    },
    "/companies/{companyId}/investors/{investorId}/settlement-instruments/{settlementInstrumentId}": {
      "get": {
        "operationId": "peach.payment_instruments.handlers.settlement_instrument_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/investorId"
          },
          {
            "$ref": "#/components/parameters/settlementInstrumentId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SettlementInstrument"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Payment Instrument"
          }
        },
        "security": [
          {
            "oauth2": [
              "settlement.instrument:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get settlement instrument by ID",
        "tags": [
          "Settlement Instruments"
        ]
      },
      "put": {
        "operationId": "peach.payment_instruments.handlers.settlement_instrument_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/investorId"
          },
          {
            "$ref": "#/components/parameters/settlementInstrumentId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettlementInstrumentMutable"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Settlement Instrument Updated"
          }
        },
        "security": [
          {
            "oauth2": [
              "settlement.instrument:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update settlement instrument",
        "tags": [
          "Settlement Instruments"
        ]
      }
    },
    "/companies/{companyId}/loan-labels": {
      "get": {
        "operationId": "peach.loans.labels.handlers.loan_labels_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/parameters-createdBefore"
          },
          {
            "$ref": "#/components/parameters/parameters-createdAfter"
          },
          {
            "$ref": "#/components/parameters/loanFilter"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanLabelPagingResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.label:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan labels",
        "tags": [
          "Loan Labels"
        ]
      },
      "post": {
        "description": "Creates a new loan label.",
        "operationId": "peach.loans.labels.handlers.loan_label_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanLabelPost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanLabelResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.label:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create loan label",
        "tags": [
          "Loan Labels"
        ]
      }
    },
    "/companies/{companyId}/loan-labels/{loanLabelIds}/loans": {
      "get": {
        "operationId": "peach.loans.labels.handlers.loan_labels_get_loans",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/loanLabelIds"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanIdsResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.label:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loans by loan labels",
        "tags": [
          "Loan Labels"
        ]
      },
      "put": {
        "description": "Adds loans to the specified labels.",
        "operationId": "peach.loans.labels.handlers.loan_labels_add_loans",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/loanLabelIds"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanIdsPut"
        },
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.label:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Add labels to loans",
        "tags": [
          "Loan Labels"
        ]
      }
    },
    "/companies/{companyId}/loan-labels/{loanLabelIds}/loans/remove": {
      "put": {
        "description": "Remove loans from the specified labels.",
        "operationId": "peach.loans.labels.handlers.loan_labels_remove_loans",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/loanLabelIds"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanIdsPut"
        },
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.label:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Remove labels from loans",
        "tags": [
          "Loan Labels"
        ]
      }
    },
    "/companies/{companyId}/loan-labels/{loanLabelId}": {
      "delete": {
        "operationId": "peach.loans.labels.handlers.loan_label_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/loanLabelId"
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.label:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete loan label",
        "tags": [
          "Loan Labels"
        ]
      },
      "get": {
        "operationId": "peach.loans.labels.handlers.loan_label_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/loanLabelId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanLabelResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.label:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan label by ID",
        "tags": [
          "Loan Labels"
        ]
      },
      "put": {
        "description": "Updates a loan label.",
        "operationId": "peach.loans.labels.handlers.loan_label_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/loanLabelId"
          },
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanLabelPut"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanLabelResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.label:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update loan label",
        "tags": [
          "Loan Labels"
        ]
      }
    },
    "/companies/{companyId}/loan-tape-types": {
      "get": {
        "operationId": "peach.loans.tape.handlers.loan_tape_types_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanTapeTypePagingResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.tape.type:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan tape types",
        "tags": [
          "Loan Tape Types"
        ]
      },
      "post": {
        "description": "Creates a new loan tape type.",
        "operationId": "peach.loans.tape.handlers.loan_tape_type_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanTapeTypePost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanTapeTypeResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.tape.type:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create loan tape type",
        "tags": [
          "Loan Tape Types"
        ]
      }
    },
    "/companies/{companyId}/loan-tape-types/{loanTapeTypeId}": {
      "delete": {
        "operationId": "peach.loans.tape.handlers.loan_tape_type_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/loanTapeTypeId"
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.tape.type:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete loan tape type",
        "tags": [
          "Loan Tape Types"
        ]
      },
      "get": {
        "operationId": "peach.loans.tape.handlers.loan_tape_type_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/loanTapeTypeId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanTapeTypeResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.tape.type:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan tape type by ID",
        "tags": [
          "Loan Tape Types"
        ]
      },
      "put": {
        "operationId": "peach.loans.tape.handlers.loan_tape_type_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/loanTapeTypeId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanTapeTypePut"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanTapeTypeResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.tape.type:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update loan tape type",
        "tags": [
          "Loan Tape Types"
        ]
      }
    },
    "/companies/{companyId}/loan-tapes": {
      "get": {
        "operationId": "peach.loans.tape.handlers.loan_tapes_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/untokenize"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanTapePagingResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.tape:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan tapes",
        "tags": [
          "Loan Tapes"
        ]
      },
      "post": {
        "description": "Creates a new loan tape.",
        "operationId": "peach.loans.tape.handlers.loan_tape_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanTapePost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanTapeResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.tape:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create loan tape",
        "tags": [
          "Loan Tapes"
        ]
      }
    },
    "/companies/{companyId}/loan-tapes/{loanTapeId}": {
      "delete": {
        "operationId": "peach.loans.tape.handlers.loan_tape_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/loanTapeId"
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.tape:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete loan tape",
        "tags": [
          "Loan Tapes"
        ]
      },
      "get": {
        "operationId": "peach.loans.tape.handlers.loan_tape_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/loanTapeId"
          },
          {
            "$ref": "#/components/parameters/untokenize"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanTapeResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.tape:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan tape by ID",
        "tags": [
          "Loan Tapes"
        ]
      },
      "put": {
        "operationId": "peach.loans.tape.handlers.loan_tape_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/loanTapeId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanTapePut"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanTapeResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.tape:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update loan tape",
        "tags": [
          "Loan Tapes"
        ]
      }
    },
    "/companies/{companyId}/loan-types/{loanTypeId}/repayment-engine/notifications": {
      "get": {
        "operationId": "peach.repayment_engine.handlers.get_notification_types_internal",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/loanTypeId"
          },
          {
            "in": "query",
            "name": "trigger",
            "schema": {
              "$ref": "#/components/schemas/RepaymentNotificationTrigger"
            }
          },
          {
            "in": "query",
            "name": "subject",
            "schema": {
              "$ref": "#/components/schemas/RepaymentEngineInteractionSubject"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                "active",
                "inactive"
              ],
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/sendChannels"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/RepaymentNotificationType"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "repaymentengine.notification:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get product notification types",
        "tags": [
          "Repayment Engine"
        ]
      },
      "post": {
        "operationId": "peach.repayment_engine.handlers.create_notification_type_internal",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/loanTypeId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RepaymentNotificationType"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RepaymentNotificationType"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Created"
          }
        },
        "security": [
          {
            "oauth2": [
              "repaymentengine.notification:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create a notification type",
        "tags": [
          "Repayment Engine"
        ]
      }
    },
    "/companies/{companyId}/loan-types/{loanTypeId}/repayment-engine/{repaymentNotificationTypeId}": {
      "delete": {
        "operationId": "peach.repayment_engine.handlers.delete_notification_type_internal",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/loanTypeId"
          },
          {
            "$ref": "#/components/parameters/repaymentNotificationTypeId"
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "repaymentengine.notification:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete a notification type",
        "tags": [
          "Repayment Engine"
        ]
      },
      "get": {
        "operationId": "peach.repayment_engine.handlers.get_notification_type_by_id",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/loanTypeId"
          },
          {
            "$ref": "#/components/parameters/repaymentNotificationTypeId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RepaymentNotificationType"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "repaymentengine.notification:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get notification type by ID",
        "tags": [
          "Repayment Engine"
        ]
      },
      "put": {
        "operationId": "peach.repayment_engine.handlers.update_notification_type_internal",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/loanTypeId"
          },
          {
            "$ref": "#/components/parameters/repaymentNotificationTypeId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RepaymentNotificationTypeWithoutSubject"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RepaymentNotificationType"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Updated"
          }
        },
        "security": [
          {
            "oauth2": [
              "repaymentengine.notification:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update a notification type",
        "tags": [
          "Repayment Engine"
        ]
      }
    },
    "/companies/{companyId}/loans/{loanId}/promise-to-pay-plans/{promiseToPayPlanId}/evaluate": {
      "put": {
        "description": "Evaluates a `Promise to Pay Plan` and updates the `status` and `isOverdue` of the `Promise to Pay Plan`.",
        "operationId": "peach.loans.promise_to_pays.handlers.internal_evaluate_promise_to_pay_plan",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/promiseToPayPlanId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PromiseToPayPlan",
            "description": "Successfully evaluated the Promise to Pay Plan."
          }
        },
        "security": [
          {
            "oauth2": [
              "promise.to.pay.plan:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Evaluate Promise to Pay Plan, does not require personId",
        "tags": [
          "Promise to Pay Plans"
        ]
      }
    },
    "/companies/{companyId}/merchants": {
      "get": {
        "operationId": "peach.merchants.handlers.merchants_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/parentMerchantId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/MerchantPagingResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "merchant:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get merchants",
        "tags": [
          "Merchants"
        ]
      },
      "post": {
        "description": "Creates a new merchant.",
        "operationId": "peach.merchants.handlers.merchant_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/MerchantPost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/MerchantResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "merchant:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create merchant",
        "tags": [
          "Merchants"
        ]
      }
    },
    "/companies/{companyId}/merchants/{merchantId}": {
      "get": {
        "operationId": "peach.merchants.handlers.merchant_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/merchantId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/MerchantResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "merchant:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get merchant by ID",
        "tags": [
          "Merchants"
        ]
      },
      "put": {
        "operationId": "peach.merchants.handlers.merchant_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/merchantId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/MerchantPut"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/MerchantResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "merchant:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update merchant",
        "tags": [
          "Merchants"
        ]
      }
    },
    "/companies/{companyId}/payment-processors/{paymentProcessorId}/ach-files/{achFileId}/content": {
      "get": {
        "operationId": "peach.payment_processors.handlers.get_ach_file_content",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/paymentProcessorId"
          },
          {
            "$ref": "#/components/parameters/achFileId"
          },
          {
            "description": "If `true`, will return a URL to the content instead of redirecting to the content.",
            "in": "query",
            "name": "returnUrl",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AchFile"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "ach.file:download"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get ACH file content",
        "tags": [
          "ACH File"
        ]
      }
    },
    "/companies/{companyId}/payment-processors/{paymentProcessorId}/funding-instruments": {
      "get": {
        "operationId": "peach.payment_instruments.handlers.funding_instrument_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/paymentProcessorId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Paging"
                    },
                    {
                      "properties": {
                        "count": {
                          "format": "int32",
                          "type": "integer"
                        },
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/FundingInstrument"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "count",
                        "items"
                      ],
                      "type": "object"
                    }
                  ],
                  "title": "Funding Instruments"
                }
              }
            },
            "description": "Funding Instruments"
          }
        },
        "security": [
          {
            "oauth2": [
              "funding.instrument:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get funding instruments",
        "tags": [
          "Funding Instruments"
        ]
      },
      "post": {
        "operationId": "peach.payment_instruments.handlers.funding_instrument_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/paymentProcessorId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FundingInstrument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/FundingInstrument"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Funding Instrument Created"
          }
        },
        "security": [
          {
            "oauth2": [
              "funding.instrument:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create funding instrument",
        "tags": [
          "Funding Instruments"
        ]
      }
    },
    "/companies/{companyId}/payment-processors/{paymentProcessorId}/funding-instruments/{fundingInstrumentId}": {
      "get": {
        "operationId": "peach.payment_instruments.handlers.funding_instrument_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/paymentProcessorId"
          },
          {
            "$ref": "#/components/parameters/fundingInstrumentId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/FundingInstrument"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Payment Instrument"
          }
        },
        "security": [
          {
            "oauth2": [
              "funding.instrument:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get funding instrument by ID",
        "tags": [
          "Funding Instruments"
        ]
      },
      "put": {
        "operationId": "peach.payment_instruments.handlers.funding_instrument_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/paymentProcessorId"
          },
          {
            "$ref": "#/components/parameters/fundingInstrumentId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FundingInstrumentMutable"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Funding Instrument Updated"
          }
        },
        "security": [
          {
            "oauth2": [
              "funding.instrument:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update funding instrument",
        "tags": [
          "Funding Instruments"
        ]
      }
    },
    "/companies/{companyId}/people/{personId}/cases/{caseId}/workflow": {
      "get": {
        "operationId": "peach.workflows.handlers.get_case_workflow",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/caseId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Workflow"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "workflow:create",
              "workflow:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get case workflow",
        "tags": [
          "Workflows"
        ]
      }
    },
    "/companies/{companyId}/people/{personId}/cases/{caseId}/workflow/steps/{workflowStepId}": {
      "put": {
        "operationId": "peach.workflows.handlers.update_workflow_step",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/caseId"
          },
          {
            "$ref": "#/components/parameters/workflowStepId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "status": {
                    "$ref": "#/components/schemas/WorkflowStepStatus",
                    "required": true
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          }
        },
        "security": [
          {
            "oauth2": [
              "workflow:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update workflow step status",
        "tags": [
          "Workflows"
        ]
      }
    },
    "/companies/{companyId}/people/{personId}/cases/{caseId}/workflow/steps/{workflowStepId}/workitems/{workflowWorkitemId}": {
      "put": {
        "operationId": "peach.workflows.handlers.update_workflow_workitem",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/caseId"
          },
          {
            "$ref": "#/components/parameters/workflowStepId"
          },
          {
            "$ref": "#/components/parameters/workflowWorkitemId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "status": {
                    "$ref": "#/components/schemas/WorkflowWorkitemStatus",
                    "required": true
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          }
        },
        "security": [
          {
            "oauth2": [
              "workflow:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update workflow workitem status",
        "tags": [
          "Workflows"
        ]
      }
    },
    "/companies/{companyId}/people/{personId}/loans/{loanId}/investors": {
      "get": {
        "operationId": "peach.people.loans.handlers.internal_loan_investors_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoanInvestorsPaging"
                }
              }
            },
            "description": "success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan investors",
        "tags": [
          "Investors"
        ]
      }
    },
    "/companies/{companyId}/promo-program-types": {
      "get": {
        "operationId": "peach.promo_programs.handlers.promo_program_type.internal_promo_program_types_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PromoProgramTypePaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.promoprogram.type:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get promo program types",
        "tags": [
          "Promo Programs Type"
        ]
      },
      "post": {
        "operationId": "peach.promo_programs.handlers.promo_program_type.internal_promo_program_types_add",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/PromoProgramTypePost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PromoProgramType"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.promoprogram.type:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create promo program type",
        "tags": [
          "Promo Programs Type"
        ]
      }
    },
    "/companies/{companyId}/promo-program-types/{promoProgramTypeId}": {
      "delete": {
        "operationId": "peach.promo_programs.handlers.promo_program_type.internal_promo_program_types_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/promoProgramTypeId"
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.promoprogram.type:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Cancel promo program type",
        "tags": [
          "Promo Programs Type"
        ]
      },
      "get": {
        "operationId": "peach.promo_programs.handlers.promo_program_type.internal_promo_program_types_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/promoProgramTypeId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PromoProgramType"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.promoprogram.type:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get promo program type by ID",
        "tags": [
          "Promo Programs Type"
        ]
      },
      "put": {
        "operationId": "peach.promo_programs.handlers.promo_program_type.internal_promo_program_types_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/promoProgramTypeId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/PromoProgramTypePut"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PromoProgramType"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.promoprogram.type:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update promo program type",
        "tags": [
          "Promo Programs Type"
        ]
      }
    },
    "/companies/{companyId}/repayment-engine/notifications": {
      "get": {
        "operationId": "peach.repayment_engine.handlers.get_notification_types_by_company",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "in": "query",
            "name": "productId",
            "schema": {
              "$ref": "#/components/schemas/AnyId"
            }
          },
          {
            "in": "query",
            "name": "trigger",
            "schema": {
              "$ref": "#/components/schemas/RepaymentNotificationTrigger"
            }
          },
          {
            "in": "query",
            "name": "subject",
            "schema": {
              "$ref": "#/components/schemas/RepaymentEngineInteractionSubject"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                "active",
                "inactive"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dayType",
            "schema": {
              "$ref": "#/components/schemas/DayType"
            }
          },
          {
            "$ref": "#/components/parameters/sendChannels"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/NewPaginator"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/RepaymentNotificationType"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "repaymentengine.notification:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get all company notification types",
        "tags": [
          "Repayment Engine"
        ]
      }
    },
    "/companies/{companyId}/repayment-engine/products-with-notifications": {
      "get": {
        "operationId": "peach.repayment_engine.handlers.get_products_with_notifications",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "in": "query",
            "name": "trigger",
            "schema": {
              "$ref": "#/components/schemas/RepaymentNotificationTrigger"
            }
          },
          {
            "in": "query",
            "name": "subject",
            "schema": {
              "$ref": "#/components/schemas/RepaymentEngineInteractionSubject"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/NewPaginator"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "properties": {
                              "loanTypeAssetName": {
                                "type": "string"
                              },
                              "productId": {
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "repaymentengine.notification:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get all products with notifications for a company",
        "tags": [
          "Repayment Engine"
        ]
      }
    },
    "/companies/{companyId}/repayment-engine/subjects-with-notifications": {
      "get": {
        "operationId": "peach.repayment_engine.handlers.get_subjects_with_notifications",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "in": "query",
            "name": "productId",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AnyId"
            }
          },
          {
            "in": "query",
            "name": "trigger",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/RepaymentNotificationTrigger"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/RepaymentEngineInteractionSubject"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "repaymentengine.notification:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get distinct subjects with notifications for a company",
        "tags": [
          "Repayment Engine"
        ]
      }
    },
    "/companies/{companyId}/repayment-engine/triggers-with-notifications": {
      "get": {
        "operationId": "peach.repayment_engine.handlers.get_triggers_with_notifications",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "in": "query",
            "name": "productId",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AnyId"
            }
          },
          {
            "in": "query",
            "name": "subject",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/RepaymentEngineInteractionSubject"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/RepaymentNotificationTrigger"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "repaymentengine.notification:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get distinct triggers with notifications for a company",
        "tags": [
          "Repayment Engine"
        ]
      }
    },
    "/companies/{companyId}/task-worker-pairing-configs": {
      "get": {
        "description": "List the task-worker pairing configs for a company.\n",
        "operationId": "peach.twilio.taskrouter.handlers_task_worker_pairing_configs.task_worker_pairing_config_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/taskWorkerPairingConfigSortBy"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/TaskWorkerPairingConfigPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "twpc:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List task-worker pairing configs",
        "tags": [
          "Task-Worker Pairing Configs"
        ]
      },
      "post": {
        "description": "Create a new task-worker pairing config.\n\nChanges here will not take effect until synchronization is run. See:\n<a href=\"/api-docs/api-public/task-worker-pairing-configs/peach.twilio.taskrouter.handlers_task_worker_pairing_configs.task_worker_pairing_config_sync\">Sync task-worker pairing configs to Twilio</a>\n",
        "operationId": "peach.twilio.taskrouter.handlers_task_worker_pairing_configs.task_worker_pairing_config_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskWorkerPairingConfig"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/TaskWorkerPairingConfig"
          }
        },
        "security": [
          {
            "oauth2": [
              "twpc:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create task-worker pairing config\n",
        "tags": [
          "Task-Worker Pairing Configs"
        ]
      }
    },
    "/companies/{companyId}/task-worker-pairing-configs/sync": {
      "post": {
        "description": "Perform synchronization of task-worker pairing config to Twilio. \n\nAPI changes to task-worker pairing configs will have no effect until this synchronization is run.\n",
        "operationId": "peach.twilio.taskrouter.handlers_task_worker_pairing_configs.task_worker_pairing_config_sync",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "twpc:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Sync task-worker pairing configs to Twilio",
        "tags": [
          "Task-Worker Pairing Configs"
        ]
      }
    },
    "/companies/{companyId}/task-worker-pairing-configs/{taskWorkerPairingConfigId}": {
      "delete": {
        "description": "Delete a task-worker pairing config.\n\nChanges here will not take effect until synchronization is run. See:\n<a href=\"/api-docs/api-public/task-worker-pairing-configs/peach.twilio.taskrouter.handlers_task_worker_pairing_configs.task_worker_pairing_config_sync\">Sync task-worker pairing configs to Twilio</a>\n",
        "operationId": "peach.twilio.taskrouter.handlers_task_worker_pairing_configs.task_worker_pairing_config_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/taskWorkerPairingConfigId"
          },
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "responses": {
          "204": {
            "description": "Delete ok"
          }
        },
        "security": [
          {
            "oauth2": [
              "twpc:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete task-worker pairing config",
        "tags": [
          "Task-Worker Pairing Configs"
        ]
      },
      "get": {
        "operationId": "peach.twilio.taskrouter.handlers_task_worker_pairing_configs.task_worker_pairing_config_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/taskWorkerPairingConfigId"
          },
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/TaskWorkerPairingConfig"
          }
        },
        "security": [
          {
            "oauth2": [
              "twpc:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get task-worker pairing config",
        "tags": [
          "Task-Worker Pairing Configs"
        ]
      },
      "put": {
        "description": "Update a task-worker pairing config.\n\nChanges here will not take effect until synchronization is run. See:\n<a href=\"/api-docs/api-public/task-worker-pairing-configs/peach.twilio.taskrouter.handlers_task_worker_pairing_configs.task_worker_pairing_config_sync\">Sync task-worker pairing configs to Twilio</a>\n",
        "operationId": "peach.twilio.taskrouter.handlers_task_worker_pairing_configs.task_worker_pairing_config_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/taskWorkerPairingConfigId"
          },
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskWorkerPairingConfig"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/TaskWorkerPairingConfig"
          }
        },
        "security": [
          {
            "oauth2": [
              "twpc:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update task-worker pairing config",
        "tags": [
          "Task-Worker Pairing Configs"
        ]
      }
    },
    "/companies/{companyId}/twilio-queues": {
      "get": {
        "description": "Get information on task queues such as friendly name and task statistics.",
        "operationId": "peach.twilio.taskrouter.handlers.get_all_queues",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/TaskQueueData"
          }
        },
        "security": [
          {
            "oauth2": [
              "taskrouter.task.unterminated:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get information on Twilio task queues",
        "tags": [
          "Tasks"
        ]
      }
    },
    "/companies/{companyId}/twilio-terminated-tasks": {
      "get": {
        "operationId": "peach.twilio.taskrouter.handlers_task_history.task_history_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "taskrouter.task.terminated:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List Terminated Tasks",
        "tags": [
          "Tasks"
        ]
      }
    },
    "/companies/{companyId}/twilio-terminated-tasks/{taskHistoryId}": {
      "get": {
        "operationId": "peach.twilio.taskrouter.handlers_task_history.task_history_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/taskHistoryId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "taskrouter.task.terminated:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get Terminated Task by ID",
        "tags": [
          "Tasks"
        ]
      }
    },
    "/companies/{companyId}/twilio-terminated-tasks/{taskHistoryId}/clone": {
      "post": {
        "operationId": "peach.twilio.taskrouter.handlers_task_history.task_history_clone",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/taskHistoryId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "taskrouter.task.unterminated:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Clone Terminated Task by ID",
        "tags": [
          "Tasks"
        ]
      }
    },
    "/companies/{companyId}/twilio-unterminated-tasks": {
      "delete": {
        "description": "Bulk delete unterminated tasks from Twilio API. (this proxy's Twilio's\nTask API).\n\nAn \"unterminated\" task is an \"active\" task—or any task which has yet to have its\ntask assignment status set to `completed` or `canceled`. See: https://www.twilio.com/docs/taskrouter/lifecycle-task-state\n",
        "operationId": "peach.twilio.taskrouter.handlers.delete_unterminated_tasks",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "taskSids": {
                    "description": "List of task SIDs to delete.\n",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/SingletonResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "taskrouter.task.unterminated:bulk.delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Bulk Delete Unterminated Tasks",
        "tags": [
          "Tasks"
        ]
      },
      "get": {
        "description": "Reads unterminated task from Twilio API. (This essentially proxies Twilio's\nTask API).\n\nNote that paging works differently on this endpoint in order for compatibility\nwith the Twilio API—but you can still use `nextUrl` and `previousUrl`\n\nAn \"unterminated\" task is an \"active\" task—or any task which has yet to have its\ntask assignment status set to `completed` or `canceled`. See: https://www.twilio.com/docs/taskrouter/lifecycle-task-state\n",
        "operationId": "peach.twilio.taskrouter.handlers.list_unterminated_tasks",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "description": "Fields to include in the response.\n\nIf `reservation` include information on the task's current reservation in the field `reservation`\n",
            "explode": false,
            "in": "query",
            "name": "include",
            "required": false,
            "schema": {
              "items": {
                "enum": [
                  "reservation"
                ],
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "$ref": "#/components/parameters/taskQueueSid"
          },
          {
            "$ref": "#/components/parameters/taskAssignmentStatus"
          },
          {
            "$ref": "#/components/parameters/taskType"
          },
          {
            "$ref": "#/components/parameters/parameters-caseType"
          },
          {
            "$ref": "#/components/parameters/parameters-caseId"
          },
          {
            "$ref": "#/components/parameters/supercaseId"
          },
          {
            "$ref": "#/components/parameters/parameters-interactionId"
          },
          {
            "$ref": "#/components/parameters/unableToComplete"
          },
          {
            "$ref": "#/components/parameters/taskAttrMatchExpr"
          },
          {
            "$ref": "#/components/parameters/hasCase"
          },
          {
            "$ref": "#/components/parameters/hasCaseOwner"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Task"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "taskrouter.task.unterminated:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List Unterminated Tasks",
        "tags": [
          "Tasks"
        ]
      }
    },
    "/companies/{companyId}/twilio-unterminated-tasks/{taskSid}": {
      "delete": {
        "description": "Delete the unterminated task from Twilio API (this proxy's Twilio's\nTask API).\n\nThe deleted task immediately has its assignment status transition to `canceled`.\nThis also generates the Twilio event `task.deleted`.\n\nAn \"unterminated\" task is an \"active\" task—or any task which has yet to have its\ntask assignment status set to `completed` or `canceled`. See: https://www.twilio.com/docs/taskrouter/lifecycle-task-state\n",
        "operationId": "peach.twilio.taskrouter.handlers.delete_unterminated_task",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/taskSid"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/SingletonResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "taskrouter.task.unterminated:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Deletes Unterminated Task by SID",
        "tags": [
          "Tasks"
        ]
      },
      "get": {
        "description": "Read's the specified unterminated task from Twilio API (this proxy's Twilio's\nTask API).\n\nAn \"unterminated\" task is an \"active\" task—or any task which has yet to have its\ntask assignment status set to `completed` or `canceled`. See: https://www.twilio.com/docs/taskrouter/lifecycle-task-state\n",
        "operationId": "peach.twilio.taskrouter.handlers.read_unterminated_task",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/taskSid"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Task"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "taskrouter.task.unterminated:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Read Unterminated Task by SID",
        "tags": [
          "Tasks"
        ]
      }
    },
    "/companies/{companyId}/twilio-unterminated-tasks/{taskSid}/abandon": {
      "post": {
        "description": "Abandon an unterminated, accepted task. i.e., Mark the task as \"Unable to Complete\"\nand create a duplicate task.\n\nAn \"unterminated\" task is an \"active\" task—or any task which has yet to have its\ntask assignment status set to `completed` or `canceled`. See: https://www.twilio.com/docs/taskrouter/lifecycle-task-state\n",
        "operationId": "peach.twilio.taskrouter.handlers.abandon_accepted_task",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/taskSid"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Failed to abandon task"
          }
        },
        "security": [
          {
            "oauth2": [
              "taskrouter.task:receive"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Abandon Unterminated Task by SID",
        "tags": [
          "Tasks"
        ]
      }
    },
    "/companies/{companyId}/twilio-workers": {
      "get": {
        "description": "List all Taskrouter Workers.\n\nNote that this endpoint returns *all* Twilio workers up to 10,000—i.e., there\nis no paging. It may suffer from poor performance for large numbers of workers.\n",
        "operationId": "peach.twilio.taskrouter.handlers_workers.list_workers",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "description": "Extra fields to include in the response.\n\n- `statsToday`: include the `statsToday` field with statistical information about the given workers\n  since the start of \"today\" (from the worker's company's configured timezone).\n",
            "explode": false,
            "in": "query",
            "name": "include",
            "required": false,
            "schema": {
              "items": {
                "enum": [
                  "statsToday"
                ],
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "employee:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List Taskrouter Workers",
        "tags": [
          "Tasks"
        ]
      }
    },
    "/companies/{companyId}/workflow-step-types": {
      "get": {
        "operationId": "peach.workflows.handlers.get_workflow_step_types",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/NewPaginator"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/WorkflowStepType"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "workflow.type:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get workflow step types",
        "tags": [
          "Workflow Types"
        ]
      },
      "post": {
        "operationId": "peach.workflows.handlers.create_workflow_step_type",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowStepType"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/WorkflowStepType"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "workflow.type:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create workflow step type",
        "tags": [
          "Workflow Types"
        ]
      }
    },
    "/companies/{companyId}/workflow-step-types/{workflowStepTypeId}": {
      "delete": {
        "operationId": "peach.workflows.handlers.delete_workflow_step_type",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/workflowStepTypeId"
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          }
        },
        "security": [
          {
            "oauth2": [
              "workflow.type:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete workflow step type",
        "tags": [
          "Workflow Types"
        ]
      },
      "get": {
        "operationId": "peach.workflows.handlers.get_workflow_step_type_by_id",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/workflowStepTypeId"
          },
          {
            "$ref": "#/components/parameters/expand"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/WorkflowStepType"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "workflow.type:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get workflow step type",
        "tags": [
          "Workflow Types"
        ]
      },
      "put": {
        "operationId": "peach.workflows.handlers.update_workflow_step_type",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/workflowStepTypeId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowStepType"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/WorkflowStepType"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "workflow.type:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update workflow step type",
        "tags": [
          "Workflow Types"
        ]
      }
    },
    "/companies/{companyId}/workflow-types": {
      "get": {
        "operationId": "peach.workflows.handlers.get_workflow_types",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/NewPaginator"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/WorkflowType"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "workflow.type:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get workflow types",
        "tags": [
          "Workflow Types"
        ]
      },
      "post": {
        "operationId": "peach.workflows.handlers.create_workflow_type",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowType"
              }
            }
          },
          "description": "The new workflow type",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/WorkflowType"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "workflow.type:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create workflow type",
        "tags": [
          "Workflow Types"
        ]
      }
    },
    "/companies/{companyId}/workflow-types/export": {
      "post": {
        "operationId": "peach.workflows.handlers.export_workflow_types",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "description": "The output format",
            "in": "query",
            "name": "format",
            "schema": {
              "default": "json",
              "enum": [
                "json",
                "yaml"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "type": "object"
                  },
                  "type": "array"
                }
              },
              "application/x-yaml": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "workflow.type:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Export workflow, step and work item types.",
        "tags": [
          "Workflow Types"
        ]
      }
    },
    "/companies/{companyId}/workflow-types/import": {
      "post": {
        "operationId": "peach.workflows.handlers.import_workflow_types",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "items": {
                  "type": "object"
                },
                "type": "array"
              }
            },
            "application/octet-stream": {
              "schema": {
                "description": "**DEPRECATED**: Use JSON or YAML format instead.",
                "format": "binary",
                "type": "string"
              }
            },
            "application/x-yaml": {
              "schema": {
                "items": {
                  "type": "object"
                },
                "type": "array"
              }
            }
          },
          "description": "The data to import",
          "required": true
        },
        "responses": {
          "204": {
            "description": "success"
          }
        },
        "security": [
          {
            "oauth2": [
              "workflow.type:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Restore previously exported workflow, step and work item types.",
        "tags": [
          "Workflow Types"
        ]
      }
    },
    "/companies/{companyId}/workflow-types/{workflowTypeId}": {
      "delete": {
        "operationId": "peach.workflows.handlers.delete_workflow_type",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/workflowTypeId"
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          }
        },
        "security": [
          {
            "oauth2": [
              "workflow.type:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete workflow type",
        "tags": [
          "Workflow Types"
        ]
      },
      "get": {
        "operationId": "peach.workflows.handlers.get_workflow_type_by_id",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/workflowTypeId"
          },
          {
            "$ref": "#/components/parameters/expand"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/WorkflowType"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "workflow.type:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get workflow type by ID",
        "tags": [
          "Workflow Types"
        ]
      },
      "put": {
        "operationId": "peach.workflows.handlers.update_workflow_type",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/workflowTypeId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowType"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/WorkflowType"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "workflow.type:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update workflow type",
        "tags": [
          "Workflow Types"
        ]
      }
    },
    "/companies/{companyId}/workflow-workitem-types": {
      "get": {
        "operationId": "peach.workflows.handlers.get_workitem_types",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/NewPaginator"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/WorkflowWorkitemType"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "workflow.type:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get work item types",
        "tags": [
          "Workflow Types"
        ]
      },
      "post": {
        "operationId": "peach.workflows.handlers.create_workitem_type",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowWorkitemType"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/WorkflowWorkitemType"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "workflow.type:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create work item type",
        "tags": [
          "Workflow Types"
        ]
      }
    },
    "/companies/{companyId}/workflow-workitem-types/{workflowWorkitemTypeId}": {
      "delete": {
        "operationId": "peach.workflows.handlers.delete_workitem_type",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/workflowWorkitemTypeId"
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          }
        },
        "security": [
          {
            "oauth2": [
              "workflow.type:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete work item type",
        "tags": [
          "Workflow Types"
        ]
      },
      "get": {
        "operationId": "peach.workflows.handlers.get_workitem_type_by_id",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/workflowWorkitemTypeId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/WorkflowWorkitemType"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "workflow.type:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get work item type",
        "tags": [
          "Workflow Types"
        ]
      },
      "put": {
        "operationId": "peach.workflows.handlers.update_workitem_type",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          },
          {
            "$ref": "#/components/parameters/workflowWorkitemTypeId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowWorkitemType"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/WorkflowWorkitemType"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "workflow.type:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update work item type",
        "tags": [
          "Workflow Types"
        ]
      }
    },
    "/compliance/auth/token": {
      "delete": {
        "operationId": "peach.security.handlers.compliance_logout",
        "responses": {
          "200": {
            "$ref": "#/components/responses/SingletonResponse"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerAuth": []
          }
        ],
        "summary": "End login session, invalidating current login token.",
        "tags": [
          "Auth"
        ]
      },
      "post": {
        "operationId": "peach.security.handlers.compliance_validate_and_send_token",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyIdQuery"
          },
          {
            "$ref": "#/components/parameters/domainQuery"
          },
          {
            "$ref": "#/components/parameters/userTypeQuery"
          },
          {
            "$ref": "#/components/parameters/authTypeQuery"
          },
          {
            "$ref": "#/components/parameters/authValueTypeQuery"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/AuthPost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/JWT"
          }
        },
        "security": [],
        "summary": "Exchange username and password for JWT token",
        "tags": [
          "Auth"
        ]
      },
      "put": {
        "operationId": "peach.security.handlers.compliance_renew_jwt_token",
        "responses": {
          "200": {
            "$ref": "#/components/responses/JWT"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerAuth": []
          }
        ],
        "summary": "Exchange current token for a new one",
        "tags": [
          "Auth"
        ]
      }
    },
    "/compliance/code": {
      "get": {
        "description": "Retrieve all available codes\n",
        "operationId": "peach.compliance.handlers.code.code_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/derivedFromTypeId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CodeCollection"
          }
        },
        "security": [
          {
            "oauth2": [
              "compliance.code:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get codes",
        "tags": [
          "Codes"
        ]
      }
    },
    "/compliance/code/{codeId}": {
      "post": {
        "operationId": "peach.compliance.handlers.code.code_execute",
        "parameters": [
          {
            "$ref": "#/components/parameters/codeId"
          },
          {
            "$ref": "#/components/parameters/version"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CodeExecution"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CodeExecution"
          }
        },
        "security": [
          {
            "oauth2": [
              "compliance.code:execute"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Execute code",
        "tags": [
          "Codes"
        ]
      },
      "put": {
        "operationId": "peach.compliance.handlers.code.code_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/codeId"
          },
          {
            "$ref": "#/components/parameters/version"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CodeUpdate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/GetCode"
          }
        },
        "security": [
          {
            "oauth2": [
              "compliance.code:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update code",
        "tags": [
          "Codes"
        ]
      }
    },
    "/do-not-interact-types": {
      "get": {
        "operationId": "peach.cases.events.handlers.do_not_interact_type.do_not_interact_type_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/loanTypeIdFilter"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/DoNotInteractTypesPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "dni.type:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get types",
        "tags": [
          "Do Not Interact Types"
        ]
      },
      "post": {
        "operationId": "peach.cases.events.handlers.do_not_interact_type.do_not_interact_type_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/typeId"
          },
          {
            "$ref": "#/components/parameters/version"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/DoNotInteractType"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/DoNotInteractType"
          }
        },
        "security": [
          {
            "oauth2": [
              "dni.type:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create type",
        "tags": [
          "Do Not Interact Types"
        ]
      }
    },
    "/do-not-interact-types/{doNotInteractTypeId}": {
      "get": {
        "operationId": "peach.cases.events.handlers.do_not_interact_type.do_not_interact_type_get_by_id",
        "parameters": [
          {
            "$ref": "#/components/parameters/doNotInteractTypeId"
          },
          {
            "$ref": "#/components/parameters/version"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/DoNotInteractType"
          }
        },
        "security": [
          {
            "oauth2": [
              "dni.type:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get type by ID",
        "tags": [
          "Do Not Interact Types"
        ]
      },
      "put": {
        "description": "Change the triggering conditions and settings of a `draft` type, or update the `status` of an `active`\ntype to `deprecated`. Doing the later will create a new `draft` version of the configuration unless\nexplicitly told not to.\n",
        "operationId": "peach.cases.events.handlers.do_not_interact_type.do_not_interact_type_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/doNotInteractTypeId"
          },
          {
            "$ref": "#/components/parameters/version"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/DoNotInteractType"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/DoNotInteractType"
          }
        },
        "security": [
          {
            "oauth2": [
              "dni.type:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update type",
        "tags": [
          "Do Not Interact Types"
        ]
      }
    },
    "/document-uploads/{documentUploadLinkKey}/documents": {
      "post": {
        "operationId": "peach.docustore.handlers.documents_via_links.create_document_via_link",
        "parameters": [
          {
            "$ref": "#/components/parameters/documentUploadLinkKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentDescriptorCreate"
              }
            }
          },
          "description": "The new document descriptor",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDescriptorResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [],
        "summary": "Create new document via link",
        "tags": [
          "Documents"
        ]
      }
    },
    "/document-uploads/{documentUploadLinkKey}/documents/{documentDescriptorId}/content": {
      "post": {
        "operationId": "peach.docustore.handlers.documents_via_links.upload_document_content_via_link",
        "parameters": [
          {
            "$ref": "#/components/parameters/documentUploadLinkKey"
          },
          {
            "$ref": "#/components/parameters/documentDescriptorId"
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "properties": {
                  "file": {
                    "format": "binary",
                    "type": "string"
                  }
                },
                "required": [
                  "file"
                ],
                "type": "object"
              }
            }
          },
          "description": "The document content",
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created"
          }
        },
        "security": [],
        "summary": "Upload document content via link",
        "tags": [
          "Documents"
        ]
      }
    },
    "/employees": {
      "get": {
        "description": "Get employees\n",
        "operationId": "peach.employees.handlers.employees.employees_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/queryTeamId"
          },
          {
            "$ref": "#/components/parameters/queryTeamIds"
          },
          {
            "$ref": "#/components/parameters/queryExcludeTeamIds"
          },
          {
            "$ref": "#/components/parameters/queryManagerEmployeeId"
          },
          {
            "$ref": "#/components/parameters/queryEmployeeSearch"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/EmployeesPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "employee:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get employees",
        "tags": [
          "Employees"
        ]
      },
      "post": {
        "description": "Create a new employee for a company.\n",
        "operationId": "peach.employees.handlers.employees.employee_create",
        "requestBody": {
          "$ref": "#/components/requestBodies/EmployeePost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Employee"
          }
        },
        "security": [
          {
            "oauth2": [
              "employee:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create employee",
        "tags": [
          "Employees"
        ]
      }
    },
    "/employees/{employeeId}": {
      "get": {
        "description": "Get employee by ID\n",
        "operationId": "peach.employees.handlers.employees.employee_get_by_id",
        "parameters": [
          {
            "$ref": "#/components/parameters/employeeId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Employee"
          }
        },
        "security": [
          {
            "oauth2": [
              "employee:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get employee by ID",
        "tags": [
          "Employees"
        ]
      },
      "put": {
        "description": "Update an employee\n",
        "operationId": "peach.employees.handlers.employees.employee_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/employeeId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/EmployeePut"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Employee"
          }
        },
        "security": [
          {
            "oauth2": [
              "employee:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update employee",
        "tags": [
          "Employees"
        ]
      }
    },
    "/employees/{employeeId}/email-signature": {
      "get": {
        "description": "Get the employee's email signature\n",
        "operationId": "peach.employees.handlers.email_signature.employee_email_signature_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/employeeId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/EmailSignature"
          }
        },
        "security": [
          {
            "oauth2": [
              "employee.emailsignature:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get email signature",
        "tags": [
          "Employees"
        ]
      },
      "put": {
        "description": "Update the employee's email signature\n",
        "operationId": "peach.employees.handlers.email_signature.employee_email_signature_set",
        "parameters": [
          {
            "$ref": "#/components/parameters/employeeId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/EmailSignaturePut"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/EmailSignature"
          }
        },
        "security": [
          {
            "oauth2": [
              "employee.emailsignature:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update email signature",
        "tags": [
          "Employees"
        ]
      }
    },
    "/employees/{employeeId}/teams/{teamId}": {
      "delete": {
        "description": "Remove an employee from a team\n",
        "operationId": "peach.employees.handlers.employees.employee_remove_from_team",
        "parameters": [
          {
            "$ref": "#/components/parameters/employeeId"
          },
          {
            "$ref": "#/components/parameters/teamId"
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "employee:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Remove employee from team",
        "tags": [
          "Employees"
        ]
      },
      "put": {
        "description": "Add employee to a team\n",
        "operationId": "peach.employees.handlers.employees.employee_add_to_team",
        "parameters": [
          {
            "$ref": "#/components/parameters/employeeId"
          },
          {
            "$ref": "#/components/parameters/teamId"
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "employee:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Add employee to team",
        "tags": [
          "Employees"
        ]
      }
    },
    "/events": {
      "get": {
        "operationId": "peach.events.handlers.get_events_external",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "$ref": "#/components/parameters/personFilter"
          },
          {
            "$ref": "#/components/parameters/periodIdQuery"
          },
          {
            "$ref": "#/components/parameters/loanFilter"
          },
          {
            "$ref": "#/components/parameters/caseFilter"
          },
          {
            "$ref": "#/components/parameters/transactionFilter"
          },
          {
            "$ref": "#/components/parameters/createdAtFrom"
          },
          {
            "$ref": "#/components/parameters/createdAtTo"
          },
          {
            "$ref": "#/components/parameters/effectiveAtFrom"
          },
          {
            "$ref": "#/components/parameters/effectiveAtTo"
          },
          {
            "$ref": "#/components/parameters/accrualDate"
          },
          {
            "$ref": "#/components/parameters/includeDeleted"
          },
          {
            "$ref": "#/components/parameters/includeEventTypes"
          },
          {
            "$ref": "#/components/parameters/excludeEventTypes"
          },
          {
            "$ref": "#/components/parameters/webhookId"
          },
          {
            "$ref": "#/components/parameters/parameters-supercaseId"
          },
          {
            "description": "A comma separated list of creatingMessageIds to return.",
            "in": "query",
            "name": "creatingMessageIds",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/EventsPublic"
          }
        },
        "security": [
          {
            "oauth2": [
              "event:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Retrieve events",
        "tags": [
          "Events"
        ]
      }
    },
    "/interactions": {
      "get": {
        "operationId": "peach.people.interaction.handlers.unbound_interaction_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/hasNoPerson"
          },
          {
            "$ref": "#/components/parameters/channel"
          },
          {
            "$ref": "#/components/parameters/direction"
          },
          {
            "$ref": "#/components/parameters/status"
          },
          {
            "$ref": "#/components/parameters/statusDetails"
          },
          {
            "$ref": "#/components/parameters/agentOutcome"
          },
          {
            "$ref": "#/components/parameters/parameters-subject"
          },
          {
            "$ref": "#/components/parameters/theme"
          },
          {
            "$ref": "#/components/parameters/caseIds"
          },
          {
            "$ref": "#/components/parameters/contentContains"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "$ref": "#/components/parameters/createdAtBefore"
          },
          {
            "$ref": "#/components/parameters/createdAtAfter"
          },
          {
            "$ref": "#/components/parameters/startedAtBefore"
          },
          {
            "$ref": "#/components/parameters/startedAtAfter"
          },
          {
            "$ref": "#/components/parameters/scheduledAtFromBefore"
          },
          {
            "$ref": "#/components/parameters/scheduledAtFromAfter"
          },
          {
            "$ref": "#/components/parameters/scheduledAtToBefore"
          },
          {
            "$ref": "#/components/parameters/scheduledAtToAfter"
          },
          {
            "$ref": "#/components/parameters/createdBy"
          },
          {
            "$ref": "#/components/parameters/hasVoicemail"
          },
          {
            "$ref": "#/components/parameters/hasRecording"
          },
          {
            "$ref": "#/components/parameters/parameters-includeFields"
          },
          {
            "$ref": "#/components/parameters/sensitive"
          },
          {
            "$ref": "#/components/parameters/isExternal"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/InteractionsPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "interaction:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get interactions",
        "tags": [
          "Interactions"
        ]
      }
    },
    "/interactions/{interactionId}": {
      "get": {
        "operationId": "peach.people.interaction.handlers.unbound_interaction_get_by_id",
        "parameters": [
          {
            "$ref": "#/components/parameters/interactionId"
          },
          {
            "$ref": "#/components/parameters/searchable"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Interaction"
          }
        },
        "security": [
          {
            "oauth2": [
              "interaction:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get interaction by ID",
        "tags": [
          "Interactions"
        ]
      }
    },
    "/interactions/{interactionId}/call-transcripts/summaries": {
      "get": {
        "operationId": "peach.ai.call_transcription.handlers.unbound_interaction_call_summary_results_get_by_interaction",
        "parameters": [
          {
            "$ref": "#/components/parameters/interactionId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/callTranscriptionResultStatus"
          },
          {
            "$ref": "#/components/parameters/aICallTranscriptionResultIdFilter"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CallSummaryResultsPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "interaction:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get interaction call summaries",
        "tags": [
          "Interactions"
        ]
      }
    },
    "/interactions/{interactionId}/convo": {
      "get": {
        "operationId": "peach.twilio.convo.handlers_api.interaction_convo_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/interactionId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "conversation:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get interaction convo",
        "tags": [
          "Interactions"
        ]
      }
    },
    "/interactions/{interactionId}/convo/close": {
      "post": {
        "operationId": "peach.twilio.convo.handlers_api.interaction_convo_close",
        "parameters": [
          {
            "$ref": "#/components/parameters/interactionId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "conversation:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Close interaction convo",
        "tags": [
          "Interactions"
        ]
      }
    },
    "/interactions/{interactionId}/convo/join": {
      "post": {
        "description": "Add the user making the request to the conversation associated with this interaction.\n\nNote that only users of type `Agent` can join conversations. (i.e., `Service` and `Borrower`\nusers cannot join conversations.)\n",
        "operationId": "peach.twilio.convo.handlers_api.interaction_convo_join",
        "parameters": [
          {
            "$ref": "#/components/parameters/interactionId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/ConvoJoin"
        },
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "conversation:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Join interaction convo",
        "tags": [
          "Interactions"
        ]
      }
    },
    "/interactions/{interactionId}/convo/leave": {
      "post": {
        "operationId": "peach.twilio.convo.handlers_api.interaction_convo_leave",
        "parameters": [
          {
            "$ref": "#/components/parameters/interactionId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "conversation:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Leave interaction convo",
        "tags": [
          "Interactions"
        ]
      }
    },
    "/interactions/{interactionId}/notes": {
      "get": {
        "operationId": "peach.notes.handlers.list_interaction_notes",
        "parameters": [
          {
            "$ref": "#/components/parameters/interactionId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/noteCategories"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "description": "Include archived notes into the result",
            "in": "query",
            "name": "includeArchived",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "$ref": "#/components/parameters/notePinned"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/NewPaginator"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/NoteResponse"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "note:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get notes",
        "tags": [
          "Notes"
        ]
      },
      "post": {
        "operationId": "peach.notes.handlers.create_interaction_note",
        "parameters": [
          {
            "$ref": "#/components/parameters/interactionId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Note"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Note"
          }
        },
        "security": [
          {
            "oauth2": [
              "note:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create note",
        "tags": [
          "Notes"
        ]
      }
    },
    "/interactions/{interactionId}/notes/{noteId}": {
      "get": {
        "operationId": "peach.notes.handlers.get_interaction_note",
        "parameters": [
          {
            "$ref": "#/components/parameters/interactionId"
          },
          {
            "description": "The note identifier.",
            "in": "path",
            "name": "noteId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Note"
          }
        },
        "security": [
          {
            "oauth2": [
              "note:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get note by ID",
        "tags": [
          "Notes"
        ]
      },
      "put": {
        "operationId": "peach.notes.handlers.update_interaction_note",
        "parameters": [
          {
            "$ref": "#/components/parameters/interactionId"
          },
          {
            "description": "The note identifier.",
            "in": "path",
            "name": "noteId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Note"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Note"
          }
        },
        "security": [
          {
            "oauth2": [
              "note:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update note",
        "tags": [
          "Notes"
        ]
      }
    },
    "/interactions/{interactionId}/previous": {
      "get": {
        "description": "For this interaction, get all the previous interactions linked to it\nvia the `previousInteractionId` field.\n",
        "operationId": "peach.people.interaction.handlers.unbound_get_many_previous_interactions",
        "parameters": [
          {
            "$ref": "#/components/parameters/interactionId"
          },
          {
            "$ref": "#/components/parameters/parameters-includeFields"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/InteractionsManyNoPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "interaction:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get previous interactions",
        "tags": [
          "Interactions"
        ]
      }
    },
    "/interactions/{interactionId}/recording-content": {
      "get": {
        "operationId": "peach.people.interaction.handlers.unbound_interaction_download_recording",
        "parameters": [
          {
            "$ref": "#/components/parameters/interactionId"
          },
          {
            "$ref": "#/components/parameters/disposition"
          },
          {
            "$ref": "#/components/parameters/returnUrl"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200ReturnUrl"
          },
          "302": {
            "$ref": "#/components/responses/302DownloadRecordedContents"
          }
        },
        "security": [
          {
            "oauth2": [
              "interaction:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Download interaction recording",
        "tags": [
          "Interactions"
        ]
      }
    },
    "/interactions/{interactionId}/voicemail-content": {
      "get": {
        "operationId": "peach.people.interaction.handlers.unbound_interaction_download_voicemail",
        "parameters": [
          {
            "$ref": "#/components/parameters/interactionId"
          },
          {
            "$ref": "#/components/parameters/disposition"
          },
          {
            "$ref": "#/components/parameters/returnUrl"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200ReturnUrl"
          },
          "302": {
            "$ref": "#/components/responses/302DownloadRecordedContents"
          }
        },
        "security": [
          {
            "oauth2": [
              "interaction:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Download interaction voicemail",
        "tags": [
          "Interactions"
        ]
      }
    },
    "/keys": {
      "get": {
        "operationId": "peach.security.api_keys.handlers.company_api_keys_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/APIKeyStatus"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/offset"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/NewPaginator"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/ResponseAPIKeyNoSecret"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "company.keys:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get all API keys",
        "tags": [
          "API Keys"
        ]
      },
      "post": {
        "operationId": "peach.security.api_keys.handlers.company_api_key_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestBodyAPIKeyNoSecret"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseAPIKeyNoSecret"
                }
              }
            },
            "description": "Created"
          }
        },
        "security": [
          {
            "oauth2": [
              "company.keys:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create an API key",
        "tags": [
          "API Keys"
        ]
      }
    },
    "/keys/{keyId}": {
      "delete": {
        "operationId": "peach.security.api_keys.handlers.company_api_key_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/APIKeyId"
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "company.keys:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete an API key",
        "tags": [
          "API Keys"
        ]
      },
      "get": {
        "operationId": "peach.security.api_keys.handlers.company_api_key_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/APIKeyId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseAPIKeyNoSecret"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "company.keys:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get an API key",
        "tags": [
          "API Keys"
        ]
      },
      "put": {
        "operationId": "peach.security.api_keys.handlers.company_api_key_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/APIKeyId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestBodyAPIKeyUpdateAPIVersioning"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseAPIKeyNoSecretAPIVersioning"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "company.keys:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update an API key",
        "tags": [
          "API Keys"
        ]
      }
    },
    "/loan-types/{loanTypeId}/fee-types": {
      "get": {
        "operationId": "peach.people.loans.fees.handlers.fee_types_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/loanTypeId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "properties": {
                              "apiName": {
                                "$ref": "#/components/schemas/FeeApiName"
                              },
                              "displayName": {
                                "$ref": "#/components/schemas/FeeDisplayName"
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:types.list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get fee types",
        "tags": [
          "Fees"
        ]
      }
    },
    "/loan-types/{loanTypeId}/index-rates": {
      "get": {
        "operationId": "peach.loan_configuration.handlers.loan_type_index_rate_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/loanTypeId"
          },
          {
            "description": "The from date of the index rate. Pass the same value in the `fromDate` and `toDate` if you need to get the index rate for a\nspecific date.\n",
            "in": "query",
            "name": "fromDate",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "The end date of the index rate. Pass the same value in the `fromDate` and `toDate` if you need to get the index rate for a\nspecific date. If only a `fromDate` is specified, we assume no end date for the filter.\n",
            "in": "query",
            "name": "toDate",
            "schema": {
              "format": "date",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/IndexRatePaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "indexrates:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get index interest rates",
        "tags": [
          "Index Rates"
        ]
      },
      "post": {
        "operationId": "peach.loan_configuration.handlers.loan_type_index_rate_add",
        "parameters": [
          {
            "$ref": "#/components/parameters/loanTypeId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/IndexRateAdd"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/IndexRateResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "indexrates:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Add index interest rate",
        "tags": [
          "Index Rates"
        ]
      }
    },
    "/loan-types/{loanTypeId}/index-rates/{indexRateId}": {
      "delete": {
        "operationId": "peach.loan_configuration.handlers.loan_type_index_rate_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/loanTypeId"
          },
          {
            "$ref": "#/components/parameters/indexRateId"
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "indexrates:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Cancel index interest rate",
        "tags": [
          "Index Rates"
        ]
      },
      "get": {
        "operationId": "peach.loan_configuration.handlers.loan_type_index_rate_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/loanTypeId"
          },
          {
            "$ref": "#/components/parameters/indexRateId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/IndexRateResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "indexrates:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get index interest rate by ID",
        "tags": [
          "Index Rates"
        ]
      },
      "put": {
        "description": "This endpoint is used for updating index interest rates.\n",
        "operationId": "peach.loan_configuration.handlers.loan_type_index_rate_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/loanTypeId"
          },
          {
            "$ref": "#/components/parameters/indexRateId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/IndexRateUpdate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/IndexRateResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "indexrates:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update index interest rate",
        "tags": [
          "Index Rates"
        ]
      }
    },
    "/loans": {
      "get": {
        "description": "Get all loans associated with a company.\n",
        "operationId": "peach.loans.handlers.loans_get_by_company",
        "parameters": [
          {
            "$ref": "#/components/parameters/fieldsGetLoans"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/loanStatuses"
          },
          {
            "$ref": "#/components/parameters/managedByPeach"
          },
          {
            "$ref": "#/components/parameters/includeAdditionalBorrowers"
          },
          {
            "$ref": "#/components/parameters/loanTypeIdFilter"
          },
          {
            "$ref": "#/components/parameters/loanLabels"
          },
          {
            "$ref": "#/components/parameters/createdAtBefore"
          },
          {
            "$ref": "#/components/parameters/createdAtAfter"
          },
          {
            "$ref": "#/components/parameters/updatedAtBefore"
          },
          {
            "$ref": "#/components/parameters/updatedAtAfter"
          },
          {
            "$ref": "#/components/parameters/originatedAtAfter"
          },
          {
            "$ref": "#/components/parameters/originatedAtBefore"
          },
          {
            "$ref": "#/components/parameters/activatedAtBefore"
          },
          {
            "$ref": "#/components/parameters/activatedAtAfter"
          },
          {
            "$ref": "#/components/parameters/sortByForLoans"
          },
          {
            "$ref": "#/components/parameters/loansDueDate"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/LoansPaging"
                    },
                    {
                      "$ref": "#/components/schemas/LoansMinimalPaging"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:listall"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loans",
        "tags": [
          "Loans"
        ]
      }
    },
    "/notification-types": {
      "get": {
        "operationId": "peach.cases.events.handlers.notifications.notification_type_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/loanTypeIdFilter"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/NotificationTypesPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "notification.type:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get types",
        "tags": [
          "Notification Types"
        ]
      },
      "post": {
        "description": "Create a new type configuration for triggering notifications.\n",
        "operationId": "peach.cases.events.handlers.notifications.notification_type_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/typeId"
          },
          {
            "$ref": "#/components/parameters/version"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/NotificationType"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/NotificationType"
          }
        },
        "security": [
          {
            "oauth2": [
              "notification.type:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create type",
        "tags": [
          "Notification Types"
        ]
      }
    },
    "/notification-types/{notificationTypeId}": {
      "get": {
        "operationId": "peach.cases.events.handlers.notifications.notification_type_get_by_id",
        "parameters": [
          {
            "$ref": "#/components/parameters/notificationTypeId"
          },
          {
            "$ref": "#/components/parameters/version"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/NotificationType"
          }
        },
        "security": [
          {
            "oauth2": [
              "notification.type:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get type by ID",
        "tags": [
          "Notification Types"
        ]
      },
      "put": {
        "description": "Change the triggering conditions and settings of a `draft` type, or update the `status` of an `active`\ntype to `deprecated`.\n",
        "operationId": "peach.cases.events.handlers.notifications.notification_type_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/notificationTypeId"
          },
          {
            "$ref": "#/components/parameters/version"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/NotificationType"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/NotificationType"
          }
        },
        "security": [
          {
            "oauth2": [
              "notification.type:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update type",
        "tags": [
          "Notification Types"
        ]
      }
    },
    "/operations/{operationId}": {
      "get": {
        "operationId": "peach.operation_status.handlers.operation_status_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/operationId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SingletonResponse"
                }
              }
            },
            "description": "Success"
          },
          "206": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SingletonResponse"
                }
              }
            },
            "description": "In progress"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SingletonResponse"
                }
              }
            },
            "description": "Not found"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SingletonResponse"
                }
              }
            },
            "description": "Operation failed"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get operation status",
        "tags": [
          "Operations"
        ]
      }
    },
    "/payment-processors": {
      "get": {
        "operationId": "peach.payment_processors.handlers.get_payment_processors",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/PaymentProcessor"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "payment.processor:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get payment processors",
        "tags": [
          "Payment Processors"
        ]
      },
      "post": {
        "operationId": "peach.payment_processors.handlers.create_payment_processor",
        "parameters": [
          {
            "$ref": "#/components/parameters/skipConnectionTest"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentProcessor"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PaymentProcessor"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Created"
          }
        },
        "security": [
          {
            "oauth2": [
              "payment.processor:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create payment processor",
        "tags": [
          "Payment Processors"
        ]
      }
    },
    "/payment-processors/{paymentProcessorId}": {
      "delete": {
        "operationId": "peach.payment_processors.handlers.delete_payment_processor",
        "parameters": [
          {
            "$ref": "#/components/parameters/paymentProcessorId"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          }
        },
        "security": [
          {
            "oauth2": [
              "payment.processor:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete payment processor",
        "tags": [
          "Payment Processors"
        ]
      },
      "get": {
        "operationId": "peach.payment_processors.handlers.get_one_payment_processor",
        "parameters": [
          {
            "$ref": "#/components/parameters/paymentProcessorId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PaymentProcessor"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "payment.processor:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get payment processor",
        "tags": [
          "Payment Processors"
        ]
      },
      "put": {
        "operationId": "peach.payment_processors.handlers.update_payment_processor",
        "parameters": [
          {
            "$ref": "#/components/parameters/paymentProcessorId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentProcessorUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PaymentProcessor"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Updated"
          }
        },
        "security": [
          {
            "oauth2": [
              "payment.processor:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update payment processor",
        "tags": [
          "Payment Processors"
        ]
      }
    },
    "/people": {
      "get": {
        "description": "Get borrowers filtering with optional parameters.\n",
        "operationId": "peach.people.handlers.borrowers_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/searchable"
          },
          {
            "$ref": "#/components/parameters/borrowerStatus"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/borrowerType"
          },
          {
            "$ref": "#/components/parameters/queryIds"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PersonPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "person:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get borrowers",
        "tags": [
          "Borrowers"
        ]
      },
      "post": {
        "description": "Create a new borrower.\n",
        "operationId": "peach.people.handlers.borrower_create",
        "requestBody": {
          "$ref": "#/components/requestBodies/PersonRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Person"
          }
        },
        "security": [
          {
            "oauth2": [
              "person:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create borrower",
        "tags": [
          "Borrowers"
        ]
      }
    },
    "/people/search": {
      "get": {
        "description": "Search for borrowers. Returns same resources\nas <a href=\"/api-docs/api-public/borrowers/peach.people.handlers.borrowers_list\">/people</a>.\n",
        "operationId": "peach.people.handlers.borrower_search",
        "parameters": [
          {
            "$ref": "#/components/parameters/_hasTheWords"
          },
          {
            "$ref": "#/components/parameters/_notTheWords"
          },
          {
            "$ref": "#/components/parameters/address"
          },
          {
            "$ref": "#/components/parameters/bankruptcyCourtCase"
          },
          {
            "$ref": "#/components/parameters/borrowerType"
          },
          {
            "$ref": "#/components/parameters/businessName"
          },
          {
            "$ref": "#/components/parameters/components-parameters-caseId"
          },
          {
            "$ref": "#/components/parameters/city"
          },
          {
            "$ref": "#/components/parameters/dateOfBirth"
          },
          {
            "$ref": "#/components/parameters/email"
          },
          {
            "$ref": "#/components/parameters/emailExact"
          },
          {
            "$ref": "#/components/parameters/employeeEmail"
          },
          {
            "$ref": "#/components/parameters/employeeEmailExact"
          },
          {
            "$ref": "#/components/parameters/employeePhone"
          },
          {
            "$ref": "#/components/parameters/employeeName"
          },
          {
            "$ref": "#/components/parameters/firstName"
          },
          {
            "$ref": "#/components/parameters/firstNamePartial"
          },
          {
            "$ref": "#/components/parameters/fullName"
          },
          {
            "$ref": "#/components/parameters/incorporatedState"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/components-parameters-interactionId"
          },
          {
            "$ref": "#/components/parameters/lastName"
          },
          {
            "$ref": "#/components/parameters/lastNamePartial"
          },
          {
            "$ref": "#/components/parameters/legalRepFirstName"
          },
          {
            "$ref": "#/components/parameters/legalRepLastName"
          },
          {
            "$ref": "#/components/parameters/legalRepEmail"
          },
          {
            "$ref": "#/components/parameters/legalRepPhone"
          },
          {
            "$ref": "#/components/parameters/parameters-loanId"
          },
          {
            "$ref": "#/components/parameters/loanIdPartial"
          },
          {
            "$ref": "#/components/parameters/maidenName"
          },
          {
            "$ref": "#/components/parameters/maidenNamePartial"
          },
          {
            "$ref": "#/components/parameters/middleName"
          },
          {
            "$ref": "#/components/parameters/middleNamePartial"
          },
          {
            "$ref": "#/components/parameters/paymentMethod"
          },
          {
            "$ref": "#/components/parameters/phone"
          },
          {
            "$ref": "#/components/parameters/postalCode"
          },
          {
            "$ref": "#/components/parameters/state"
          },
          {
            "$ref": "#/components/parameters/taxId"
          },
          {
            "$ref": "#/components/parameters/_forceIndex"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PersonSearchPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "person:search"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Search borrowers",
        "tags": [
          "Borrowers"
        ]
      }
    },
    "/people/{personId}": {
      "get": {
        "description": "Get an existing borrower by ID.\n",
        "operationId": "peach.people.handlers.borrower_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/includeIdentity"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Person"
          }
        },
        "security": [
          {
            "oauth2": [
              "person:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get borrower by ID",
        "tags": [
          "Borrowers"
        ]
      },
      "put": {
        "description": "Update an existing borrower.",
        "operationId": "peach.people.handlers.borrower_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/PersonPutRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PersonNoIdentity"
          }
        },
        "security": [
          {
            "oauth2": [
              "person:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update borrower",
        "tags": [
          "Borrowers"
        ]
      }
    },
    "/people/{personId}/can-interact": {
      "post": {
        "description": "Returns whether or not a communication is allowed with a borrower.\n\nIt uses past interactions, current borrower status, loan status,\nand relevant Compliance Guard rules to make a decision if it is\npermissable to communicate with a borrower.\n\nNote this endpoint always returns a 200 status code if we could successfully\ncalculate a result. (i.e., even if a communication is not permitted\nthis is a `200` response.)\n",
        "operationId": "peach.people.handlers.can_interact",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CanInteract"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CanInteract"
          }
        },
        "security": [
          {
            "oauth2": [
              "interaction:check"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Can interact",
        "tags": [
          "Compliance Guard"
        ]
      }
    },
    "/people/{personId}/cases": {
      "get": {
        "description": "Get all cases associated with a borrower.\n",
        "operationId": "peach.cases.handlers.list_cases_by_borrower",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "$ref": "#/components/parameters/expand"
          },
          {
            "$ref": "#/components/parameters/includeFields"
          },
          {
            "$ref": "#/components/parameters/associations"
          },
          {
            "$ref": "#/components/parameters/caseOutcome"
          },
          {
            "$ref": "#/components/parameters/caseStatus"
          },
          {
            "$ref": "#/components/parameters/caseStatuses"
          },
          {
            "$ref": "#/components/parameters/caseStatusUpdatedBefore"
          },
          {
            "$ref": "#/components/parameters/caseStatusUpdatedAfter"
          },
          {
            "$ref": "#/components/parameters/caseNumber"
          },
          {
            "$ref": "#/components/parameters/caseType"
          },
          {
            "$ref": "#/components/parameters/createdBefore"
          },
          {
            "$ref": "#/components/parameters/createdAfter"
          },
          {
            "$ref": "#/components/parameters/nupUpdatedNull"
          },
          {
            "$ref": "#/components/parameters/snoozedUntilBefore"
          },
          {
            "$ref": "#/components/parameters/snoozedUntilAfter"
          },
          {
            "$ref": "#/components/parameters/owningEmployeeId"
          },
          {
            "$ref": "#/components/parameters/loanTypes"
          },
          {
            "$ref": "#/components/parameters/filterInteractionStatus"
          },
          {
            "$ref": "#/components/parameters/filterInteractionChannel"
          },
          {
            "$ref": "#/components/parameters/filterInteractionScheduledAtFromBefore"
          },
          {
            "$ref": "#/components/parameters/filterInteractionScheduledAtFromAfter"
          },
          {
            "$ref": "#/components/parameters/filterInteractionScheduledAtToBefore"
          },
          {
            "$ref": "#/components/parameters/filterInteractionScheduledAtToAfter"
          },
          {
            "$ref": "#/components/parameters/associatedDocumentId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CasesPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "case:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get borrower cases",
        "tags": [
          "Cases"
        ]
      },
      "post": {
        "description": "Create a new case and associate it with a borrower using their ID.\n",
        "operationId": "peach.cases.handlers.create_case",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CasePost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Case"
          }
        },
        "security": [
          {
            "oauth2": [
              "case:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create borrower case",
        "tags": [
          "Cases"
        ]
      }
    },
    "/people/{personId}/cases/{caseId}": {
      "delete": {
        "description": "Remove association of an existing `case`, `interaction`, `loan`, or `file` objects from the case.\n",
        "operationId": "peach.cases.handlers.remove_case_association",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/caseId"
          },
          {
            "$ref": "#/components/parameters/removeObjectType"
          },
          {
            "$ref": "#/components/parameters/removeObjectId"
          },
          {
            "$ref": "#/components/parameters/relation"
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "case.association:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Remove association",
        "tags": [
          "Cases"
        ]
      },
      "get": {
        "operationId": "peach.cases.handlers.get_case_by_id",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/caseId"
          },
          {
            "$ref": "#/components/parameters/associations"
          },
          {
            "$ref": "#/components/parameters/includeFields"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Case"
          }
        },
        "security": [
          {
            "oauth2": [
              "case:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get borrower case by ID",
        "tags": [
          "Cases"
        ]
      },
      "post": {
        "description": "Associate an existing `case`, `interaction`, `loan`, or `file` objects to the case.\nThis way you can create comprehensive view of the case.\n",
        "operationId": "peach.cases.handlers.add_case_association",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/caseId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/AssociationPost"
        },
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "case.association:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Add association",
        "tags": [
          "Cases"
        ]
      },
      "put": {
        "description": "Update a case associated with a borrower.\n",
        "operationId": "peach.cases.handlers.update_case",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/caseId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CasePut"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Case"
          }
        },
        "security": [
          {
            "oauth2": [
              "case:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update case",
        "tags": [
          "Cases"
        ]
      }
    },
    "/people/{personId}/cases/{caseId}/do-not-interacts": {
      "get": {
        "description": "Get the all `DoNoInteract` instances associated with a case.\n",
        "operationId": "peach.cases.events.handlers.do_not_interact.do_not_interact_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/caseId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/DoNotInteractPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "dni:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get case do not interacts",
        "tags": [
          "Do Not Interact"
        ]
      },
      "post": {
        "operationId": "peach.cases.events.handlers.do_not_interact.do_not_interact_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/caseId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/DoNotInteractCreate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/DoNotInteract"
          }
        },
        "security": [
          {
            "oauth2": [
              "dni:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create do not interact",
        "tags": [
          "Do Not Interact"
        ]
      }
    },
    "/people/{personId}/cases/{caseId}/do-not-interacts/{doNotInteractId}": {
      "delete": {
        "description": "Update a `DoNotInteract` instance to have `inactive` status, and set the end date.\n",
        "operationId": "peach.cases.events.handlers.do_not_interact.do_not_interact_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/caseId"
          },
          {
            "$ref": "#/components/parameters/doNotInteractId"
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "dni:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Remove do not interact",
        "tags": [
          "Do Not Interact"
        ]
      },
      "get": {
        "description": "Get a single `DoNotInteract` object instance for the borrower using a unique ID.\n",
        "operationId": "peach.cases.events.handlers.do_not_interact.do_not_interact_get_by_id",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/caseId"
          },
          {
            "$ref": "#/components/parameters/doNotInteractId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/DoNotInteract"
          }
        },
        "security": [
          {
            "oauth2": [
              "dni:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get do not interact by ID",
        "tags": [
          "Do Not Interact"
        ]
      },
      "put": {
        "description": "Update a `DoNotInteract` instance with new information.\n",
        "operationId": "peach.cases.events.handlers.do_not_interact.do_not_interact_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/caseId"
          },
          {
            "$ref": "#/components/parameters/doNotInteractId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/DoNotInteractUpdate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/DoNotInteract"
          }
        },
        "security": [
          {
            "oauth2": [
              "dni:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update do not interact",
        "tags": [
          "Do Not Interact"
        ]
      }
    },
    "/people/{personId}/cases/{caseId}/escalations": {
      "get": {
        "description": "List case escalations\n",
        "operationId": "peach.cases.escalations.handlers.case_escalations_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/caseId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CaseEscalationPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "case:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List case escalations",
        "tags": [
          "Cases"
        ]
      },
      "post": {
        "description": "Escalate or de-escalate a case\n",
        "operationId": "peach.cases.escalations.handlers.case_escalations_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/caseId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CaseEscalationPost"
        },
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "case:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Escalate or de-escalate a case",
        "tags": [
          "Cases"
        ]
      }
    },
    "/people/{personId}/cases/{caseId}/escalations/{caseEscalationId}": {
      "get": {
        "description": "List case escalations\n",
        "operationId": "peach.cases.escalations.handlers.case_escalation_get_by_id",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/caseId"
          },
          {
            "$ref": "#/components/parameters/caseEscalationId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CaseEscalationDetailed"
          }
        },
        "security": [
          {
            "oauth2": [
              "case:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List case escalation by ID",
        "tags": [
          "Cases"
        ]
      }
    },
    "/people/{personId}/cases/{caseId}/notes": {
      "get": {
        "operationId": "peach.notes.handlers.list_case_notes",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/caseId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/noteCategories"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "description": "Include archived notes into the result",
            "in": "query",
            "name": "includeArchived",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "$ref": "#/components/parameters/notePinned"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/NewPaginator"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/NoteResponse"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "note:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get notes",
        "tags": [
          "Notes"
        ]
      },
      "post": {
        "operationId": "peach.notes.handlers.create_case_note",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/caseId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Note"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Note"
          }
        },
        "security": [
          {
            "oauth2": [
              "note:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create note",
        "tags": [
          "Notes"
        ]
      }
    },
    "/people/{personId}/cases/{caseId}/notes/{noteId}": {
      "get": {
        "operationId": "peach.notes.handlers.get_case_note",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/caseId"
          },
          {
            "description": "The note identifier.",
            "in": "path",
            "name": "noteId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Note"
          }
        },
        "security": [
          {
            "oauth2": [
              "note:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get note by ID",
        "tags": [
          "Notes"
        ]
      },
      "put": {
        "operationId": "peach.notes.handlers.update_case_note",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/caseId"
          },
          {
            "description": "The note identifier.",
            "in": "path",
            "name": "noteId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Note"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Note"
          }
        },
        "security": [
          {
            "oauth2": [
              "note:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update note",
        "tags": [
          "Notes"
        ]
      }
    },
    "/people/{personId}/cases/{caseId}/snooze": {
      "post": {
        "description": "Snooze the case or cancel the case snooze.\n",
        "operationId": "peach.cases.handlers.snooze_case",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/caseId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "snoozeFor": {
                    "description": "The number of days to snooze for. To cancel snoozing set to `null`.\nIf the current time has caught up to the `snoozedUntil` date then setting\nthis `snoozeFor` to `null` also causes the snooze to \"pop\" which initiates\na case review task into the task system.\n",
                    "minimum": 1,
                    "nullable": true,
                    "type": "integer"
                  }
                },
                "required": [
                  "snoozeFor"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "case:snooze"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Snooze case",
        "tags": [
          "Cases"
        ]
      }
    },
    "/people/{personId}/cases/{caseId}/views": {
      "post": {
        "description": "Mark a case as viewed by the current user\n",
        "operationId": "peach.cases.handlers.view_case",
        "parameters": [
          {
            "$ref": "#/components/parameters/caseId"
          },
          {
            "$ref": "#/components/parameters/personId"
          }
        ],
        "responses": {
          "204": {
            "description": "Successfully marked case as viewed"
          }
        },
        "security": [
          {
            "oauth2": [
              "case:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Mark a case as viewed",
        "tags": [
          "Cases"
        ]
      }
    },
    "/people/{personId}/consents": {
      "get": {
        "description": "Get all consent associated with a borrower.\n",
        "operationId": "peach.people.handlers.consent_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Consent"
          }
        },
        "security": [
          {
            "oauth2": [
              "consent:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get consents",
        "tags": [
          "Consent"
        ]
      },
      "put": {
        "description": "Update the consents\n",
        "operationId": "peach.people.handlers.consent_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/caseIdQuery"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/UpdateConsent"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Consent"
          }
        },
        "security": [
          {
            "oauth2": [
              "consent:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update consents",
        "tags": [
          "Consent"
        ]
      }
    },
    "/people/{personId}/contacts": {
      "get": {
        "description": "List contacts for a borrower.\n",
        "operationId": "peach.people.contact.handlers.list_contacts_for_borrower",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "$ref": "#/components/parameters/contactCollidesWithEmail"
          },
          {
            "$ref": "#/components/parameters/contactCollidesWithPhone"
          },
          {
            "$ref": "#/components/parameters/contactType"
          },
          {
            "$ref": "#/components/parameters/contactAffiliation"
          },
          {
            "$ref": "#/components/parameters/contactLabel"
          },
          {
            "$ref": "#/components/parameters/contactStatus"
          },
          {
            "$ref": "#/components/parameters/contactIncludeArchived"
          },
          {
            "$ref": "#/components/parameters/contactIncludeLegal"
          },
          {
            "$ref": "#/components/parameters/receiveTextMessages"
          },
          {
            "$ref": "#/components/parameters/contactValue"
          },
          {
            "$ref": "#/components/parameters/powerOfAttorney"
          },
          {
            "$ref": "#/components/parameters/authorizedThirdParty"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ContactInformationPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "contact:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List contact for borrower",
        "tags": [
          "Contact Information"
        ]
      },
      "post": {
        "description": "Create contact for a borrower.\n",
        "operationId": "peach.people.contact.handlers.create_contact_for_borrower",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/contactValidate"
          },
          {
            "$ref": "#/components/parameters/confirmationCode"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/ContactBody"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ContactInformation"
          }
        },
        "security": [
          {
            "oauth2": [
              "contact:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create contact",
        "tags": [
          "Contact Information"
        ]
      }
    },
    "/people/{personId}/contacts/{contactId}": {
      "delete": {
        "description": "Delete a borrower's contact.\n",
        "operationId": "peach.people.contact.handlers.delete_contact",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/contactId"
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "contact:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete contact",
        "tags": [
          "Contact Information"
        ]
      },
      "get": {
        "operationId": "peach.people.contact.handlers.get_contact_for_borrower",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/contactId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ContactInformation"
          }
        },
        "security": [
          {
            "oauth2": [
              "contact:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get contact by ID",
        "tags": [
          "Contact Information"
        ]
      },
      "put": {
        "description": "Update contact of a borrower.\n",
        "operationId": "peach.people.contact.handlers.update_contact_for_borrower",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/contactId"
          },
          {
            "$ref": "#/components/parameters/confirmationCode"
          },
          {
            "$ref": "#/components/parameters/contactValidate"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/ContactBody"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ContactInformation"
          }
        },
        "security": [
          {
            "oauth2": [
              "contact:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update contact",
        "tags": [
          "Contact Information"
        ]
      }
    },
    "/people/{personId}/contacts/{contactId}/clone": {
      "post": {
        "description": "Clones the borrower's contact information. \n\nThis copies all properties from the existing contact and applies \nthe passed properties. Sets `externalId` of the existing contact to `null`. \nSets the `status` of the existing contact to `archived`.\n\nReturns the new contact with a new Peach ID.\n",
        "operationId": "peach.people.contact.handlers.clone_contact",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/contactId"
          },
          {
            "$ref": "#/components/parameters/confirmationCode"
          },
          {
            "$ref": "#/components/parameters/contactValidate"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/ContactBody"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ContactInformation"
          }
        },
        "security": [
          {
            "oauth2": [
              "contact:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Clone contact",
        "tags": [
          "Contact Information"
        ]
      }
    },
    "/people/{personId}/do-not-interacts": {
      "get": {
        "description": "Get the all `DoNoInteract` instances associated with a borrower.\n",
        "operationId": "peach.people.do_not_interact.handlers.do_not_interact_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/DoNotInteractPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "dni:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get all do not interacts",
        "tags": [
          "Do Not Interact"
        ]
      }
    },
    "/people/{personId}/document-upload-links": {
      "get": {
        "operationId": "peach.docustore.handlers.document_upload_links.get_document_upload_links",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DocumentUploadLink"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "document-upload-link:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get document upload links",
        "tags": [
          "Documents"
        ]
      },
      "post": {
        "operationId": "peach.docustore.handlers.document_upload_links.create_document_upload_link",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentUploadLink"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentUploadLink"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "document-upload-link:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create document upload link",
        "tags": [
          "Documents"
        ]
      }
    },
    "/people/{personId}/document-upload-links/{documentUploadLinkId}": {
      "get": {
        "operationId": "peach.docustore.handlers.document_upload_links.get_document_upload_link",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/documentUploadLinkId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentUploadLink"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "document-upload-link:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get doc upload link by ID",
        "tags": [
          "Documents"
        ]
      }
    },
    "/people/{personId}/documents": {
      "get": {
        "operationId": "peach.docustore.handlers.list_person_documents",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "description": "The document type to select by.",
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "items": {
                "$ref": "#/components/schemas/DocumentType"
              },
              "type": "array"
            }
          },
          {
            "description": "The loan identifier to select by.",
            "in": "query",
            "name": "loanId",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Include archived documents into the result",
            "in": "query",
            "name": "includeArchived",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "description": "Show documents that were uploaded by a specific user. Use `borrower` to show documents uploaded only by the borrower.",
            "in": "query",
            "name": "uploadedBy",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "If `true` only include documents which are `autogenerated == true`, and likewise for\n`false`.\n",
            "in": "query",
            "name": "autogenerated",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "If `true` only include documents which are `isHumanBorrowerUpload == true`, and likewise for\n`false`.\n",
            "in": "query",
            "name": "isHumanBorrowerUpload",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DocumentDescriptorResponse"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "document:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get document descriptors",
        "tags": [
          "Documents"
        ]
      },
      "post": {
        "operationId": "peach.docustore.handlers.create_person_document",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentDescriptorCreate"
              }
            }
          },
          "description": "The new document descriptor",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDescriptorResponse"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Bad request"
          }
        },
        "security": [
          {
            "oauth2": [
              "document:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create new document descriptor",
        "tags": [
          "Documents"
        ]
      }
    },
    "/people/{personId}/documents/{documentDescriptorId}": {
      "delete": {
        "operationId": "peach.docustore.handlers.delete_document",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/documentDescriptorId"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "oauth2": [
              "document:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete document",
        "tags": [
          "Documents"
        ]
      },
      "get": {
        "operationId": "peach.docustore.handlers.get_person_document",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/documentDescriptorId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDescriptorResponse"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "document:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get document descriptor by ID",
        "tags": [
          "Documents"
        ]
      },
      "put": {
        "operationId": "peach.docustore.handlers.update_person_document",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/documentDescriptorId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentDescriptorUpdate"
              }
            }
          },
          "description": "Document descriptor fields",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDescriptorResponse"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Bad request"
          }
        },
        "security": [
          {
            "oauth2": [
              "document:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update document descriptor",
        "tags": [
          "Documents"
        ]
      }
    },
    "/people/{personId}/documents/{documentDescriptorId}/content": {
      "get": {
        "operationId": "peach.docustore.handlers.download_person_document_content",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/documentDescriptorId"
          },
          {
            "description": "The response content disposition to set.",
            "in": "query",
            "name": "disposition",
            "schema": {
              "enum": [
                "inline",
                "attachment"
              ],
              "type": "string"
            }
          },
          {
            "description": "Access token used to gain temporary access to the document.",
            "in": "query",
            "name": "token",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "If `true`, will return a URL to the content instead of redirecting to the content.",
            "in": "query",
            "name": "returnUrl",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "The document content"
          }
        },
        "security": [
          {
            "oauth2": [
              "document:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {
            "bearerAuthQuery": []
          }
        ],
        "summary": "Download document content",
        "tags": [
          "Documents"
        ]
      },
      "post": {
        "operationId": "peach.docustore.handlers.upload_person_document_content",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/documentDescriptorId"
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "properties": {
                  "file": {
                    "format": "binary",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "The document content",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDescriptorResponse"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Bad request"
          }
        },
        "security": [
          {
            "oauth2": [
              "document:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Upload document content",
        "tags": [
          "Documents"
        ]
      }
    },
    "/people/{personId}/documents/{documentDescriptorId}/convert": {
      "post": {
        "operationId": "peach.docustore.handlers.convert_person_document",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/documentDescriptorId"
          },
          {
            "description": "The document output format.",
            "in": "query",
            "name": "format",
            "required": true,
            "schema": {
              "enum": [
                "pdf"
              ],
              "type": "string"
            }
          },
          {
            "description": "Sign after conversion.",
            "in": "query",
            "name": "sign",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "$ref": "#/components/parameters/DeleteSource"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDescriptorResponse"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Bad request"
          }
        },
        "security": [
          {
            "oauth2": [
              "document:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Convert document to the specified format",
        "tags": [
          "Documents"
        ]
      }
    },
    "/people/{personId}/documents/{documentDescriptorId}/sign": {
      "post": {
        "operationId": "peach.docustore.handlers.sign_person_pdf_document",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/documentDescriptorId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDescriptorResponse"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Bad request"
          },
          "500": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Server misconfiguration or error"
          }
        },
        "security": [
          {
            "oauth2": [
              "document:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Digitally sign document",
        "tags": [
          "Documents"
        ]
      }
    },
    "/people/{personId}/identities": {
      "get": {
        "operationId": "peach.people.handlers.list_identities",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/includeArchivedIdentities"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/IdentityPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "person.identity:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get identities",
        "tags": [
          "Identity"
        ]
      },
      "post": {
        "operationId": "peach.people.handlers.create_identity",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/IdentityRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Identity"
          }
        },
        "security": [
          {
            "oauth2": [
              "person.identity:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create identity",
        "tags": [
          "Identity"
        ]
      }
    },
    "/people/{personId}/identities/{personIdentityId}": {
      "delete": {
        "description": "Primary identities cannot be archived.",
        "operationId": "peach.people.handlers.delete_identity",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/personIdentityId"
          },
          {
            "$ref": "#/components/parameters/caseIdQuery"
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          }
        },
        "security": [
          {
            "oauth2": [
              "person.identity:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Archive identity",
        "tags": [
          "Identity"
        ]
      },
      "get": {
        "operationId": "peach.people.handlers.get_identity",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/personIdentityId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Identity"
          }
        },
        "security": [
          {
            "oauth2": [
              "person.identity:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get identity by ID",
        "tags": [
          "Identity"
        ]
      },
      "put": {
        "description": "For primary identities, the `isArchived` field cannot be changed.\n",
        "operationId": "peach.people.handlers.update_identity",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/personIdentityId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/IdentityPutRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Identity"
          }
        },
        "security": [
          {
            "oauth2": [
              "person.identity:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update identity",
        "tags": [
          "Identity"
        ]
      }
    },
    "/people/{personId}/identity": {
      "get": {
        "operationId": "peach.people.handlers.get_primary_identity",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Identity"
          }
        },
        "security": [
          {
            "oauth2": [
              "person.identity:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get primary identity",
        "tags": [
          "Identity"
        ]
      }
    },
    "/people/{personId}/interaction-notes": {
      "get": {
        "operationId": "peach.notes.handlers.list_borrower_interaction_notes",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "description": "Include archived notes into the result",
            "in": "query",
            "name": "includeArchived",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "$ref": "#/components/parameters/notePinned"
          },
          {
            "description": "Only include notes for the interactions with the specified channels.",
            "in": "query",
            "name": "channels",
            "required": false,
            "schema": {
              "items": {
                "$ref": "#/components/schemas/InteractionChannel"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/NewPaginator"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/NoteResponse"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "note:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get interaction notes for a person",
        "tags": [
          "Notes"
        ]
      }
    },
    "/people/{personId}/interactions": {
      "get": {
        "operationId": "peach.people.interaction.handlers.interaction_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/channel"
          },
          {
            "$ref": "#/components/parameters/direction"
          },
          {
            "$ref": "#/components/parameters/status"
          },
          {
            "$ref": "#/components/parameters/statusDetails"
          },
          {
            "$ref": "#/components/parameters/agentOutcome"
          },
          {
            "$ref": "#/components/parameters/parameters-subject"
          },
          {
            "$ref": "#/components/parameters/theme"
          },
          {
            "$ref": "#/components/parameters/caseIds"
          },
          {
            "$ref": "#/components/parameters/contentContains"
          },
          {
            "$ref": "#/components/parameters/interactionsSortBy"
          },
          {
            "$ref": "#/components/parameters/parameters-includeFields"
          },
          {
            "$ref": "#/components/parameters/createdAtBefore"
          },
          {
            "$ref": "#/components/parameters/createdAtAfter"
          },
          {
            "$ref": "#/components/parameters/startedAtBefore"
          },
          {
            "$ref": "#/components/parameters/startedAtAfter"
          },
          {
            "$ref": "#/components/parameters/scheduledAtFromBefore"
          },
          {
            "$ref": "#/components/parameters/scheduledAtFromAfter"
          },
          {
            "$ref": "#/components/parameters/scheduledAtToBefore"
          },
          {
            "$ref": "#/components/parameters/scheduledAtToAfter"
          },
          {
            "$ref": "#/components/parameters/createdBy"
          },
          {
            "$ref": "#/components/parameters/hasVoicemail"
          },
          {
            "$ref": "#/components/parameters/hasRecording"
          },
          {
            "$ref": "#/components/parameters/sensitive"
          },
          {
            "$ref": "#/components/parameters/isExternal"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/InteractionsPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "interaction:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get borrower interactions",
        "tags": [
          "Interactions"
        ]
      },
      "post": {
        "description": "Creating interactions tracks the history of communication between lenders/servicers and borrowers.\n\nNote that this does NOT send a message—merely tracks that it occurred. If you need to send a message, use the\n`/communicator/send` endpoint.\n",
        "operationId": "peach.people.interaction.handlers.interaction_add",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/searchable"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/InteractionPost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Interaction"
          }
        },
        "security": [
          {
            "oauth2": [
              "interaction:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create interaction",
        "tags": [
          "Interactions"
        ]
      }
    },
    "/people/{personId}/interactions/{interactionId}": {
      "delete": {
        "description": "Delete an interaction. Only external interactions (interactions created\nby lenders via API) can be deleted.\n",
        "operationId": "peach.people.interaction.handlers.interaction_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/interactionId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "interaction:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete interaction",
        "tags": [
          "Interactions"
        ]
      },
      "get": {
        "operationId": "peach.people.interaction.handlers.interaction_get_by_id",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/interactionId"
          },
          {
            "$ref": "#/components/parameters/searchable"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Interaction"
          }
        },
        "security": [
          {
            "oauth2": [
              "interaction:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get interaction by ID",
        "tags": [
          "Interactions"
        ]
      },
      "put": {
        "operationId": "peach.people.interaction.handlers.interaction_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/interactionId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/InteractionPut"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Interaction"
          }
        },
        "security": [
          {
            "oauth2": [
              "interaction:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update interaction",
        "tags": [
          "Interactions"
        ]
      }
    },
    "/people/{personId}/interactions/{interactionId}/call-transcripts/summaries": {
      "get": {
        "operationId": "peach.ai.call_transcription.handlers.call_summary_results_get_by_interaction",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/interactionId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/callTranscriptionResultStatus"
          },
          {
            "$ref": "#/components/parameters/aICallTranscriptionResultIdFilter"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CallSummaryResultsPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "interaction:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get interaction call summaries",
        "tags": [
          "Interactions"
        ]
      }
    },
    "/people/{personId}/interactions/{interactionId}/cases": {
      "get": {
        "operationId": "peach.people.interaction.handlers.get_interaction_cases",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/interactionId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/offset"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CasesPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "case:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get cases associated with an interaction",
        "tags": [
          "Interactions"
        ]
      }
    },
    "/people/{personId}/interactions/{interactionId}/previous": {
      "get": {
        "description": "For this interaction, get all the previous interactions linked to it\nvia the `previousInteractionId` field.\n",
        "operationId": "peach.people.interaction.handlers.get_many_previous_interactions",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/interactionId"
          },
          {
            "$ref": "#/components/parameters/parameters-includeFields"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/InteractionsManyNoPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "interaction:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get previous interactions",
        "tags": [
          "Interactions"
        ]
      }
    },
    "/people/{personId}/interactions/{interactionId}/recording-content": {
      "get": {
        "operationId": "peach.people.interaction.handlers.interaction_download_recording",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/interactionId"
          },
          {
            "$ref": "#/components/parameters/disposition"
          },
          {
            "$ref": "#/components/parameters/returnUrl"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200ReturnUrl"
          },
          "302": {
            "$ref": "#/components/responses/302DownloadRecordedContents"
          }
        },
        "security": [
          {
            "oauth2": [
              "interaction:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Download interaction recording",
        "tags": [
          "Interactions"
        ]
      }
    },
    "/people/{personId}/interactions/{interactionId}/voicemail-content": {
      "get": {
        "operationId": "peach.people.interaction.handlers.interaction_download_voicemail",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/interactionId"
          },
          {
            "$ref": "#/components/parameters/disposition"
          },
          {
            "$ref": "#/components/parameters/returnUrl"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200ReturnUrl"
          },
          "302": {
            "$ref": "#/components/responses/302DownloadRecordedContents"
          }
        },
        "security": [
          {
            "oauth2": [
              "interaction:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Download interaction voicemail",
        "tags": [
          "Interactions"
        ]
      }
    },
    "/people/{personId}/legal-representatives": {
      "get": {
        "operationId": "peach.people.legal.handlers.legal_representative_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "description": "Include archived representatives into the result.",
            "in": "query",
            "name": "includeArchived",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/LegalRepresentativesPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "legal.representative:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get representatives",
        "tags": [
          "Legal Representation"
        ]
      },
      "post": {
        "operationId": "peach.people.legal.handlers.legal_representative_add",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/contactValidate"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LegalRepresentative"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/LegalRepresentative"
          }
        },
        "security": [
          {
            "oauth2": [
              "legal.representative:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create representative",
        "tags": [
          "Legal Representation"
        ]
      }
    },
    "/people/{personId}/legal-representatives/{legalRepresentativeId}": {
      "get": {
        "operationId": "peach.people.legal.handlers.legal_representative_get_by_id",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/legalRepresentativeId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/LegalRepresentative"
          }
        },
        "security": [
          {
            "oauth2": [
              "legal.representative:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get representative by ID",
        "tags": [
          "Legal Representation"
        ]
      },
      "put": {
        "operationId": "peach.people.legal.handlers.legal_representative_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/legalRepresentativeId"
          },
          {
            "$ref": "#/components/parameters/contactValidate"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LegalRepresentative"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/LegalRepresentative"
          }
        },
        "security": [
          {
            "oauth2": [
              "legal.representative:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update representative",
        "tags": [
          "Legal Representation"
        ]
      }
    },
    "/people/{personId}/loans": {
      "get": {
        "operationId": "peach.people.loans.handlers.loans_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/filterLoanStatus"
          },
          {
            "$ref": "#/components/parameters/loanTypeIdFilter"
          },
          {
            "$ref": "#/components/parameters/includeAdditionalBorrowers"
          },
          {
            "$ref": "#/components/parameters/chargeOffBalance"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoansPaging"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get borrower's loans",
        "tags": [
          "Loans"
        ]
      },
      "post": {
        "description": "Add a new loan.",
        "operationId": "peach.people.loans.handlers.loans_add",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/contactValidate"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanPost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Loan"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create loan",
        "tags": [
          "Loans"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}": {
      "get": {
        "operationId": "peach.people.loans.handlers.loan_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/includeAdditionalBorrowers"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Loan"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan by ID",
        "tags": [
          "Loans"
        ]
      },
      "put": {
        "operationId": "peach.people.loans.handlers.loan_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/contactValidate"
          },
          {
            "$ref": "#/components/parameters/forceLoanUpdate"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanUpdate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Loan"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update loan",
        "tags": [
          "Loans"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/accelerate": {
      "post": {
        "description": "The accelerate endpoint will change the status of an `active` loan to `accelerated`,\nand trigger any acceleration-related logic and accounting treatment.\n\nAcceleration is only valid for installment and line of credit loans.\n",
        "operationId": "peach.people.loans.handlers.loan_accelerate",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanAccelerate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanAccelerate"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:accelerate"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Accelerate loan",
        "tags": [
          "Loans"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/activate": {
      "post": {
        "operationId": "peach.people.loans.handlers.loan_activate",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/syncGeneric"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanActivate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanActivate"
          },
          "408": {
            "description": "Request Timeout"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Activate loan",
        "tags": [
          "Loans"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/advances": {
      "get": {
        "description": "Returns an installment loan's advances",
        "operationId": "peach.people.loans.installment_advances.handlers.get_loan_advances",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/advanceStatus"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "properties": {
                            "advances": {
                              "items": {
                                "$ref": "#/components/schemas/Advance"
                              },
                              "type": "array"
                            },
                            "totalAdvancedAmount": {
                              "description": "The total of advances amounts in `pending` or `settled` status. In other words, the total of advances that\nwere written to the ledger.\n",
                              "format": "float",
                              "type": "number"
                            },
                            "totalScheduledAmount": {
                              "description": "The total of advances amounts in `scheduled` status.",
                              "format": "float",
                              "type": "number"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.advance:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get advances",
        "tags": [
          "Installment Advances"
        ]
      },
      "post": {
        "operationId": "peach.people.loans.installment_advances.handlers.create_loan_advance",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/syncGeneric"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "required": [
                      "status",
                      "amount",
                      "advanceDate"
                    ],
                    "title": "Advance",
                    "type": "object"
                  },
                  {
                    "$ref": "#/components/schemas/Advance"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Advance"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Created"
          },
          "408": {
            "description": "Request Timeout"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.advance:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create advance",
        "tags": [
          "Installment Advances"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/advances/{advanceId}": {
      "get": {
        "description": "Returns an installment loan advance",
        "operationId": "peach.people.loans.installment_advances.handlers.get_loan_advance",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/advanceId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Advance"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.advance:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get advance by ID",
        "tags": [
          "Installment Advances"
        ]
      },
      "put": {
        "operationId": "peach.people.loans.installment_advances.handlers.update_loan_advance",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/advanceId"
          },
          {
            "$ref": "#/components/parameters/syncGeneric"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Advance"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Advance"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Updated"
          },
          "408": {
            "description": "Request Timeout"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.advance:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update advance",
        "tags": [
          "Installment Advances"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/amortize-preview": {
      "post": {
        "description": "This endpoint is used for previewing draw amortization. The draw must have non-due principal to be amortized.\n\nNote:\n- If the loan type is configured to accrue interest as `accrualMethod=compoundWithFees`, there is a\nknown limitation to the draw amortization calculation logic.\n- The draw amortization calculation will be done using the `compound` method and not `compoundWithFees`.\nTo ensure that the system calculates interest accurately, amortized draws should NOT include any fees.\n",
        "operationId": "peach.people.loans.draws.handlers.preview_draw_amortize",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "drawFee": {
                    "description": "The draw fee.",
                    "format": "float",
                    "type": "number"
                  },
                  "duration": {
                    "description": "The new duration of the draw as a number of `paymentFrequency` of the line of credit.\n\nIf this endpoint is called when the draw has already been active for some number of periods, the `duration` parameter\nwill generate `duration` _additional_ periods from the time at which the endpoint is called. For example, if a draw has\nduration 10, and it is amortized again in period 5 with `duration=10`, the result will be a draw with a total duration of 15.\n\nThe caller needs to pass one of the values only, `duration` or `recurringPaymentAmount`.\n",
                    "format": "int32",
                    "type": "integer"
                  },
                  "purchaseAmount": {
                    "description": "The total amount of the purchases for preview.",
                    "format": "float",
                    "type": "number"
                  },
                  "recurringAmount": {
                    "description": "The recurring payment amount. The system will calculate the needed duration. Pass one of the values only,\n`duration` or `recurringPaymentAmount`.\n",
                    "format": "float",
                    "type": "number"
                  },
                  "serviceFeeAmount": {
                    "description": "The service fee amount that will be charged recurrently. Only required if the service fee `chargeLogic` is `[loanPeriod, everyOtherLoanPeriod, calendarPeriod]` and\n`amountLogic` is configured as `type=passedAtOrigination`. In all other cases, the system will calculate the fee based on pre-configured logic.\n",
                    "format": "float",
                    "type": "number"
                  },
                  "serviceFeeCapAmount": {
                    "description": "The maximum amount of the service fee that can be charged over the life of the loan or draw. Only required if the service fee `chargeLogic` is\n`[loanPeriod, everyOtherLoanPeriod, calendarPeriod]` and `capLogic` is configured as `type=capPassedAtOrigination`. In all other cases, the system will calculate\nthe fee based on pre-configured logic.\n",
                    "format": "float",
                    "type": "number"
                  },
                  "startDate": {
                    "description": "The start date of the draw. The system will assume today if not specified.",
                    "format": "date",
                    "type": "string"
                  }
                },
                "required": [
                  "purchaseAmount"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/LoanSchedule"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          },
          "408": {
            "description": "Request Timeout"
          }
        },
        "security": [
          {
            "oauth2": [
              "draw:amortize"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Preview draw amortization",
        "tags": [
          "Line of Credit Draws"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/autopay": {
      "delete": {
        "operationId": "peach.people.loans.autopay.handlers.loan_autopay_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/autopayCancellationReason"
          },
          {
            "description": "The case object unique identifier.",
            "in": "query",
            "name": "caseId",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AnyId"
            }
          },
          {
            "description": "When set to `false`, the system will NOT send a `autopayCanceledBySystem` notice to the borrower.\n",
            "in": "query",
            "name": "sendNotice",
            "required": false,
            "schema": {
              "default": true,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "autopay:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Cancel Autopay plan",
        "tags": [
          "Autopay"
        ]
      },
      "get": {
        "operationId": "peach.people.loans.autopay.handlers.loan_autopay_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/autopayExpectedPaymentStatus"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Autopay"
          }
        },
        "security": [
          {
            "oauth2": [
              "autopay:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get Autopay plan",
        "tags": [
          "Autopay"
        ]
      },
      "post": {
        "operationId": "peach.people.loans.autopay.handlers.loan_autopay_post",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/AutopayPost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/AutopayPost"
          }
        },
        "security": [
          {
            "oauth2": [
              "autopay:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create Autopay plan",
        "tags": [
          "Autopay"
        ]
      },
      "put": {
        "operationId": "peach.people.loans.autopay.handlers.loan_autopay_put",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/AutopayPut"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/AutopayPut"
          }
        },
        "security": [
          {
            "oauth2": [
              "autopay:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update Autopay plan",
        "tags": [
          "Autopay"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/balances": {
      "get": {
        "operationId": "peach.people.loans.balances.handlers.loan_balances_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/isRounded"
          },
          {
            "$ref": "#/components/parameters/skipYtd"
          },
          {
            "$ref": "#/components/parameters/fast"
          },
          {
            "$ref": "#/components/parameters/toEffectiveDate"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Balances"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan balances",
        "tags": [
          "Balances"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/cancel": {
      "post": {
        "description": "The cancel loan endpoint will change the status of a loan to `canceled`, and\ntrigger any cancellation-related logic, such as removing a loan from active monitoring\nand handling the accounting treatment for canceled loans.\n\nAn installment loan must be in `originated` or `pending` status to be canceled.\n\nA line of credit loan can be canceled if it has no draws with active purchases.\n\nSpecial permission is required to cancel `active` loans.\n\nThe metro2 details may optionally be sent with the `accountStatusCode` to indicate\nwhat should be reported to credit agencies.\n",
        "operationId": "peach.people.loans.handlers.loan_cancel",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/forceLoanCancel"
          },
          {
            "$ref": "#/components/parameters/clearAllExternalIdsLoanCancel"
          },
          {
            "$ref": "#/components/parameters/syncLoanCancel"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanCancel"
        },
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          },
          "408": {
            "description": "Request Timeout"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:cancel"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Cancel loan",
        "tags": [
          "Loans"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/cancel-fees": {
      "post": {
        "operationId": "peach.people.loans.fees.handlers.fees_cancel",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/clearExternalIdGeneric"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "caseId": {
                    "description": "An identifier for an existing case.",
                    "type": "string"
                  },
                  "loanFeeIds": {
                    "items": {
                      "description": "The identifier of the loan fee",
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Canceled"
          },
          "423": {
            "$ref": "#/components/responses/LockedResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:cancel.dynamicfee"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Cancel dynamic fees",
        "tags": [
          "Fees"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/cards": {
      "get": {
        "operationId": "peach.card_issuers.handlers.cards_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/showPan"
          },
          {
            "$ref": "#/components/parameters/showCvv"
          },
          {
            "$ref": "#/components/parameters/refresh"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CardPagingResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "card:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get cards",
        "tags": [
          "Cards"
        ]
      },
      "post": {
        "description": "The card details.\n\nYou can pass either `issuerId` + corresponding `accountIdentifier` for the card (e.g. `accountIdentifiers.galileoCad`) attributes or the `cardDetails` object.\n\nIf `issuerId` + card `accountIdentifier` attributes are passed and `issuerEventsSubscriber` is set to `peach`, Peach will sync the card status, transactions and balances with the loan ledger seamlessly. Note: these attributes must be passed if `issuerEventsSubscriber` is set to `peach`, because Peach will need the identifying information to tie the issuer's events to the proper card.\n\nIf `cardDetails` is passed, the card details will be stored in the Peach system as read-only. The lender is responsible for updating the loan details based on the card usage. Note: if `cardDetails` is passed without `issuerId` and `accountIdentifier`, `issuerEventsSubscriber` cannot be set to `peach`.\n\nThe card `issuerId` and `accountIdentifier` attributes can be updated only if the loan status is originated or pending. After the loan is activated, the `issuerId` and `accountIdentifier` information cannot be changed.\n",
        "operationId": "peach.card_issuers.handlers.card_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CardPost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CardResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "card:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create card",
        "tags": [
          "Cards"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/cards/{cardId}": {
      "get": {
        "operationId": "peach.card_issuers.handlers.card_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/cardId"
          },
          {
            "$ref": "#/components/parameters/showPan"
          },
          {
            "$ref": "#/components/parameters/showCvv"
          },
          {
            "$ref": "#/components/parameters/refresh"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CardResponseWithPanAndCvv"
          }
        },
        "security": [
          {
            "oauth2": [
              "card:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get card",
        "tags": [
          "Cards"
        ]
      },
      "put": {
        "description": "The card details.\n\nYou can pass either `issuerId` + corresponding `accountIdentifier` for the card (e.g. `accountIdentifiers.galileoCad`) attributes or the `cardDetails` object.\n\nIf `issuerId` + card `accountIdentifier` attributes are passed and `issuerEventsSubscriber` is set to `peach`, Peach will sync the card status, transactions and balances with the loan ledger seamlessly. Note: these attributes must be passed if `issuerEventsSubscriber` is set to `peach`, because Peach will need the identifying information to tie the issuer's events to the proper card.\n\nIf `cardDetails` is passed, the card details will be stored in the Peach system as read-only. The lender is responsible for updating the loan details based on the card usage. Note: if `cardDetails` is passed without `issuerId` and `accountIdentifier`, `issuerEventsSubscriber` cannot be set to `peach`.\n\nThe card `issuerId` and `accountIdentifier` attributes can be updated only if the loan status is originated or pending. After the loan is activated, the `issuerId` and `accountIdentifier` information cannot be changed.\n",
        "operationId": "peach.card_issuers.handlers.card_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/cardId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CardPut"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CardResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "card:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update card",
        "tags": [
          "Cards"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/charge-off": {
      "post": {
        "description": "The charge-off endpoint will change the status of a loan to `chargedOff`, and trigger any\ncharge-off-related logic and accounting treatment.\n\nA loan must be in `accelerated` status before being moved to `chargedOff`. If an active loan\nis being charged off, this endpoint will handle moving the loan status to acceleration\nbefore charging off. Charge-off is only valid for installment and line of credit loans.\n",
        "operationId": "peach.people.loans.handlers.loan_charge_off",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanChargeOff"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanChargeOff"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:chargeoff"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Charge-off loan",
        "tags": [
          "Loans"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/close": {
      "post": {
        "description": "Closing a loan\n  - For line of credit - Prevents new draws from being opened and closes existing draws to block new purchases.\n  - For installment loan with multiple advances - Prevents new advances from being created and cancels existing scheduled advances.\n  - Stops further credit extension while maintaining existing balances and payment obligations.\n",
        "operationId": "peach.people.loans.handlers.loan_close",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "caseId": {
                    "description": "An identifier for an existing case.",
                    "type": "string"
                  },
                  "closeReason": {
                    "$ref": "#/components/schemas/CloseReason"
                  },
                  "closeReasonDetails": {
                    "$ref": "#/components/schemas/CloseReasonDetails"
                  },
                  "closeRequestedByBorrower": {
                    "$ref": "#/components/schemas/CloseRequestedByBorrower"
                  },
                  "sendNotice": {
                    "$ref": "#/components/schemas/LoanCloseSendNotice"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:close"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Close loan",
        "tags": [
          "Loans"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/collection-agency": {
      "delete": {
        "description": "This endpoint is used to \"unassign\" a loan from a collection agency. To keep the `servicedBy` value on the loan to `debtCollectionAgency`,\njust pass that value to this endpoint and the `servicedBy` will remain the same, while still clearing the collection agency assignment fields for the loan.\n",
        "operationId": "peach.collections.handlers.collection_agency_loan_details_unassign",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/servicedBy"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CollectionAgencyLoanDetailsResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Unassign loan collection agency",
        "tags": [
          "Loan Collection Agencies"
        ]
      },
      "get": {
        "operationId": "peach.collections.handlers.collection_agency_loan_details_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CollectionAgencyLoanDetailsResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan collection agency",
        "tags": [
          "Loan Collection Agencies"
        ]
      },
      "post": {
        "description": "This end point allows lenders to assign a loan to a debt collection agency.\nWhen a loan is assigned to a debt collection agency, the system will set `servicedBy=debtCollectionAgency`.\nOnce the loan is assigned, Peach system can only accept \"external\" transactions to update the loan balance (`isExternal=true`).\n",
        "operationId": "peach.collections.handlers.collection_agency_loan_details_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CollectionAgencyLoanDetailsPut"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CollectionAgencyLoanDetailsResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update loan collection agency",
        "tags": [
          "Loan Collection Agencies"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/credit-limit": {
      "get": {
        "operationId": "peach.people.loans.handlers.loan_get_credit_limit",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/effectiveDate"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CreditLimitProperties"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan credit limit",
        "tags": [
          "Loans"
        ]
      },
      "post": {
        "operationId": "peach.people.loans.handlers.loan_update_credit_limit",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditLimitProperties"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/LineOfCredit"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update loan credit limit",
        "tags": [
          "Loans"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/credit-reporting": {
      "get": {
        "operationId": "peach.credit_reporting.handlers.credit_reporting_statuses_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CreditReportingStatusPagingResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "credit.reporting.status:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get credit reporting statuses",
        "tags": [
          "Credit Reporting"
        ]
      },
      "post": {
        "description": "Sets the starting date to begin reporting credit history for the loan.",
        "operationId": "peach.credit_reporting.handlers.credit_reporting_status_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CreditReportingStatusPost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CreditReportingStatusResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "credit.reporting.status:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Start credit reporting",
        "tags": [
          "Credit Reporting"
        ]
      },
      "put": {
        "description": "Sets loan-level credit reporting fields",
        "operationId": "peach.credit_reporting.handlers.credit_reporting_fields_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CreditReportingFieldsPut"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Loan"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update reporting fields",
        "tags": [
          "Credit Reporting"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/credit-reporting/{creditAgencyId}/delete": {
      "post": {
        "operationId": "peach.credit_reporting.handlers.credit_reporting_status_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/creditAgencyId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CreditReportingStatusDelete"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CreditReportingStatusResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "credit.reporting.status:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete from credit reporting",
        "tags": [
          "Credit Reporting"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/custom-payment-plans": {
      "get": {
        "description": "Returns all payment plans associated with a loan.",
        "operationId": "peach.people.loans.handlers.loan_custom_payment_plan_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/customPaymentPlanStatusQuery"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanCustomPaymentPlans"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.custompaymentplan:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get payment plans",
        "tags": [
          "Payment Plans"
        ]
      },
      "post": {
        "description": "Creates a custom payment plan for the borrower. `numberOfPeriods` is required. If `paymentPlanType=fixedAmountAndFees`,\nthen the `amount` is required.\n\nOnly applicable to installment loans.\n",
        "operationId": "peach.people.loans.expected_payments.handlers.loan_custom_payment_plan_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanCustomPaymentPlan"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanCustomPaymentPlan"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.custompaymentplan:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create payment plan",
        "tags": [
          "Payment Plans"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/custom-payment-plans/{paymentPlanId}": {
      "get": {
        "description": "Return a single payment plan.",
        "operationId": "peach.people.loans.handlers.loan_custom_payment_plan_get_by_id",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/paymentPlanId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanCustomPaymentPlan"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.custompaymentplan:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get payment plan by id",
        "tags": [
          "Payment Plans"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/custom-payment-plans/{paymentPlanId}/cancel": {
      "post": {
        "description": "Use this endpoint to cancel a payment plan. Any existing payment plan must be canceled prior to creating a new payment plan.\nAfter canceling a payment plan, Peach's system will revert the loan schedule (from the current period onwards) to the previous\nrecurring payment amount and frequency prior to creating the payment plan.\n\nAs a result of cancellation, the loan duration and loan end date will be adjusted to match with the last non-zero expected payment,\nif required.\n",
        "operationId": "peach.people.loans.handlers.loan_custom_payment_plan_cancel",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/paymentPlanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanCustomPaymentPlanCancel"
        },
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.custompaymentplan:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Cancel payment plan",
        "tags": [
          "Payment Plans"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/defer-due-date": {
      "post": {
        "description": "Defer single due date takes the amount in a selected due date and defers the amount to another due date in the\nfuture. The deferral amount can be moved to an existing due date or alternatively, to a new due date added after\nthe last existing due date. These two options are mutually exclusive.\n\nFees associated with the amount in the period to be deferred will not be moved.\n\nLimitations:\n- Cannot defer due date which is due on the day of the request. e.g. Cannot defer 1/31 on 1/31\n- Only applicable to installment loans.\n",
        "operationId": "peach.people.loans.expected_payments.handlers.loan_due_date_defer",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanDeferDueDate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanDeferDueDate"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:duedate.defer"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Defer installment single due date",
        "tags": [
          "Expected Payments"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/defer-schedule": {
      "post": {
        "description": "Defer schedule allows lenders to shift the entire expected payments schedule. There are two use cases:\n\nDefer during the first period of the loan. In this scenario we \"extend\" the first period by\nthe requested buffer (while honoring frequency and specific days). As a result, the first due\ndate will be shifted in the future (and all subsequent due dates).\n\nDefer after the first period has passed. In this scenario, we defer all due dates that fall\nbetween \"today's date\" and \"today's date + buffer days\" to the end of the loan one by one.\nIt will extend the term of the loan by the number of periods equal to number of due dates that were deferred.\nIf the current date falls on a due date, it will not be deferred as the period has ended.\n\nOnly applicable to installment loans.\n",
        "operationId": "peach.people.loans.expected_payments.handlers.loan_schedule_defer",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanDeferSchedule"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanDeferSchedule"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:schedule.defer"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Defer installment schedule",
        "tags": [
          "Expected Payments"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/disputes": {
      "get": {
        "operationId": "peach.loans.purchase_disputes.handlers.purchase_disputes_list_for_loc",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PurchaseDisputePagingResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "purchase.dispute:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get line of credit purchase disputes",
        "tags": [
          "Line of Credit Purchases"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws": {
      "get": {
        "operationId": "peach.people.loans.draws.handlers.loan_draws_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/loanStatuses"
          },
          {
            "$ref": "#/components/parameters/isClosed"
          },
          {
            "$ref": "#/components/parameters/isAmortized"
          },
          {
            "$ref": "#/components/parameters/startedBefore"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/DrawsPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "draw:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get draws",
        "tags": [
          "Line of Credit Draws"
        ]
      },
      "post": {
        "operationId": "peach.people.loans.draws.handlers.loan_draws_post",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/DrawsPost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Draw"
          }
        },
        "security": [
          {
            "oauth2": [
              "draw:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create draw",
        "tags": [
          "Line of Credit Draws"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}": {
      "get": {
        "operationId": "peach.people.loans.draws.handlers.loan_draw_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Draw"
          }
        },
        "security": [
          {
            "oauth2": [
              "draw:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get draw by ID",
        "tags": [
          "Line of Credit Draws"
        ]
      },
      "put": {
        "operationId": "peach.people.loans.draws.handlers.draw_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/contactValidate"
          },
          {
            "$ref": "#/components/parameters/forceLoanUpdate"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/DrawUpdate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Draw"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update draw",
        "tags": [
          "Line of Credit Draws"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/activate": {
      "post": {
        "operationId": "peach.people.loans.draws.handlers.draw_activate",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/syncGeneric"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/DrawActivate"
          },
          "408": {
            "description": "Request Timeout"
          }
        },
        "security": [
          {
            "oauth2": [
              "draw:activate"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Activate draw",
        "tags": [
          "Line of Credit Draws"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/amortize": {
      "post": {
        "description": "This endpoint is used for draw amortization. The draw must have non-due principal to be reamortized.\n\nNote:\n- If the loan type is configured to accrue interest as `accrualMethod=compoundWithFees`, there is a\nknown limitation to the draw amortization calculation logic.\n- The draw amortization calculation will be done using the `compound` method and not `compoundWithFees`.\nTo ensure that the system calculates interest accurately, amortized draws should NOT include any fees.\n",
        "operationId": "peach.people.loans.draws.handlers.loan_draw_amortize",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "duration": {
                    "description": "The new duration of the draw as a number of `paymentFrequency` of the line of credit. Only applicable if the draw\nneeds to be amortized. The caller needs to pass one of the values only, `duration` or `recurringPaymentAmount`.\n\nIf this endpoint is called when the draw has already been active for some number of periods, the `duration` parameter\nwill generate `duration` _additional_ periods from the time at which the endpoint is called. For example, if a draw has\nduration 10, and it is amortized again in period 5 with `duration=10`, the result will be a draw with a total duration of 15.\n",
                    "format": "int32",
                    "type": "integer"
                  },
                  "previewMode": {
                    "default": false,
                    "description": "In `previewMode=true`, the draw doesn't change, and no changes are saved to the database.",
                    "type": "boolean"
                  },
                  "recurringAmount": {
                    "description": "The recurring payment amount. The system will calculate the needed duration. Pass one of the values only,\n`duration` or `recurringPaymentAmount`. This field is only valid when the amortizationMethod on the loan type is\n`equalPayments`.\n",
                    "format": "float",
                    "type": "number"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/LoanSchedule"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "draw:amortize"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Amortize draw",
        "tags": [
          "Line of Credit Draws"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/balances": {
      "get": {
        "operationId": "peach.people.loans.balances.handlers.draw_balances_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/isRounded"
          },
          {
            "$ref": "#/components/parameters/skipYtd"
          },
          {
            "$ref": "#/components/parameters/toEffectiveDate"
          },
          {
            "$ref": "#/components/parameters/skipInterestAccrual"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Balances"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get draw balances",
        "tags": [
          "Balances"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/cancel": {
      "post": {
        "description": "The cancel loan endpoint will change the status of a draw to `canceled`, and\ntrigger any cancellation-related logic.\n\nAn active draw can be canceled if it has no active purchases.\n",
        "operationId": "peach.people.loans.draws.handlers.draw_cancel",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/forceLoanCancel"
          },
          {
            "$ref": "#/components/parameters/clearAllExternalIdsLoanCancel"
          },
          {
            "$ref": "#/components/parameters/syncLoanCancel"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "cancellationReason": {
                    "description": "The cancellation reason:\n\n`technicalIssue` - loan was created due to a technical issue.\n\n`wrongLoanTerms` - loan was created with the wrong terms.\n\n`wrongBorrower` - loan was created on the wrong borrower.\n\n`other` - for any other reason requiring cancellation.\n",
                    "enum": [
                      "technicalIssue",
                      "wrongLoanTerms",
                      "wrongBorrower",
                      "other"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "draw:cancel"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Cancel draw",
        "tags": [
          "Line of Credit Draws"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/close": {
      "post": {
        "description": "Closing a draw means that the draw can no longer accept new purchases. Once all of its purchases are settled, its balance is\ndepleted and all payments are processed, the draw will transition to `paidOff` status.\n",
        "operationId": "peach.people.loans.draws.handlers.draw_close",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "caseId": {
                    "description": "An identifier for an existing case.",
                    "type": "string"
                  },
                  "closeRequestedByBorrower": {
                    "default": false,
                    "description": "Set to true if a borrower requested to close the account.",
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:close"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Close draw",
        "tags": [
          "Line of Credit Draws"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/credit-limit": {
      "get": {
        "operationId": "peach.people.loans.draws.handlers.draw_get_credit_limit",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/effectiveDate"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "allOf": [
                            {
                              "properties": {
                                "creditLimitAmount": {
                                  "description": "The credit limit amount.",
                                  "format": "float",
                                  "type": "number"
                                }
                              },
                              "type": "object"
                            },
                            {
                              "$ref": "#/components/schemas/CaseId"
                            }
                          ]
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get draw credit limit",
        "tags": [
          "Line of Credit Draws"
        ]
      },
      "post": {
        "operationId": "peach.people.loans.draws.handlers.draw_update_credit_limit",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "properties": {
                      "creditLimitAmount": {
                        "description": "The credit limit amount.",
                        "format": "float",
                        "type": "number"
                      },
                      "creditLimitPercentage": {
                        "$ref": "#/components/schemas/CreditLimitPercentage"
                      }
                    },
                    "type": "object"
                  },
                  {
                    "$ref": "#/components/schemas/CaseId"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/DrawResponse"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update draw credit limit",
        "tags": [
          "Line of Credit Draws"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/disputes": {
      "get": {
        "operationId": "peach.loans.purchase_disputes.handlers.purchase_disputes_list_for_draw",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PurchaseDisputePagingResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "purchase.dispute:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get draw purchase disputes",
        "tags": [
          "Line of Credit Purchases"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/dynamic-fees": {
      "put": {
        "description": "Allows lenders to add or remove dynamic fees from a draw going forward. This does not affect balances or fees in the past.\n",
        "operationId": "peach.people.loans.fees.handlers.draw_dynamic_fees_at_origination_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AtOriginationDynamicFees"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/DynamicFeesAtOrigination"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update draw fees",
        "tags": [
          "Line of Credit Draws"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/effective-rates": {
      "get": {
        "description": "This endpoint returns rates details of a draw for a given date(s).\nInterest rates:\nIf two or more interest rates are `active` on the same date (aka overlap), the Peach system selects the lowest rate (also called effective rate) to accrue interest.\nPromo rates:\nIf two or more promo rates are `active` on the same date (aka overlap), the Peach system sums up the rates as \"effective\" promo rate.\n",
        "operationId": "peach.people.loans.handlers.draw_effective_rates_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "description": "The from date. Pass the same value in the `fromDate` and `toDate` if you need to get the rates for a specific date.\n",
            "in": "query",
            "name": "fromDate",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "The to date. Pass the same value in the `fromDate` and `toDate` if you need to get the rates for a specific date.\n",
            "in": "query",
            "name": "toDate",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/effectiveRatesPeriodIdsQuery"
          },
          {
            "$ref": "#/components/parameters/effectiveRatesPeriodDueDatesQuery"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanEffectiveRatesResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "rates:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get draw effective rates",
        "tags": [
          "Rates"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/expected-payments": {
      "get": {
        "operationId": "peach.people.loans.expected_payments.handlers.draw_expected_payments_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ExpectedPayments"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get draw expected payments",
        "tags": [
          "Expected Payments"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/expected-payments/defer-remaining-balances": {
      "post": {
        "description": "Defer draw single or multiple due dates.\nThe selected due dates to defer can only be due dates for which\nthe statement was already generated.\nPast due dates should always have statements.\nUpcoming due date can only be selected if the statement was\nalready generated.\n",
        "operationId": "peach.people.loans.expected_payments.handlers.defer_remaining_draw_balances",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeferRemainingBalancesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeferRemainingBalancesResponse"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:defer.remaining.balances"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Defer remaining balances for a draw",
        "tags": [
          "Expected Payments"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/fees/draw": {
      "put": {
        "description": "This endpoint allows lenders to change the draw fee amount. The system will update the draw fee amount and replay the loan from the draw activation date.\n",
        "operationId": "peach.people.loans.handlers.update_draw_fee",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/syncGeneric"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "caseId": {
                    "description": "An identifier for an existing case.",
                    "type": "string"
                  },
                  "feeAmount": {
                    "description": "The updated amount of the draw fee. The new amount cannot be higher than the amount passed on draw creation in atOrigination.\n",
                    "type": "number"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update draw fee",
        "tags": [
          "Fees"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/future-balances": {
      "get": {
        "operationId": "peach.people.loans.balances.handlers.draw_future_balances_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/isRounded"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/FutureBalances"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get draw future balances",
        "tags": [
          "Balances"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/migration/period": {
      "get": {
        "operationId": "peach.loans.migration.migration_period.handlers.migration_period_draw_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationPeriodDrawDataResponse"
                }
              }
            },
            "description": "Migration period draw data"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.migration.period:get"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get migration period draw data",
        "tags": [
          "Line of Credit Migration"
        ]
      },
      "post": {
        "description": "This endpoint allows you to pass additional details about draws in preparation for migration.\n\nThe \"migration period\" is the period in which you execute the migration. This is the period from which the Peach system takes control over the line. This period is considered to be \"open\" at the time of the migration. The migration needs to be completed before the upcoming due date. To clarify, the upcoming due date corresponds to the previous period's statement date.\n\nThe \"Migration cutoff date\" is the most recent statement date relative to the day on which you execute the migration process. This date is also the `startDate` of the migration period.\n\nThe \"Migration at date\" is the actual date on which you execute the migration.\n\nFor example:\n- Migration period:\n  - startDate: Aug 1, 2024\n  - endDate: Aug 31, 2024\n  - statementDate: Sep 1, 2024\n  - dueDate: Sep 22, 2024\n- Previous period (also called 'past period'):\n  - startDate: Jul 1, 2024\n  - endDate: Jul 31, 2024\n  - statementDate: Aug 1, 2024\n  - dueDate: Aug 22, 2024\n- Notes:\n  - 'Migration cutoff date' is Aug 1, 2024.\n  - If you execute the migration on Aug 10, 2024, the 'migration at date' is Aug 10.\n  - Previous period's `dueDate`, Aug 22, 2024, falls in the 'migration period' that starts on Aug 1, 2024 and ends on Aug 31, 2024.\n  - The upcoming due date is Aug 22, 2024.\n  - If you didn't complete the migration before Aug 22, 2024, you need to cancel the loan and start the process again.\n",
        "operationId": "peach.loans.migration.migration_period.handlers.migration_period_draw_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MigrationPeriodDrawDataWithRequired"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationPeriodDrawDataResponse"
                }
              }
            },
            "description": "Migration period draw data"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.migration.period:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create migration period draw data",
        "tags": [
          "Line of Credit Migration"
        ]
      },
      "put": {
        "operationId": "peach.loans.migration.migration_period.handlers.migration_period_draw_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MigrationPeriodDrawData"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationPeriodDrawDataResponse"
                }
              }
            },
            "description": "Migration period draw data"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.migration.period:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update migration period draw data",
        "tags": [
          "Line of Credit Migration"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/min-payment-calculation": {
      "post": {
        "operationId": "peach.people.loans.draws.handlers.draw_min_payment_calculation_post",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "minPaymentCalculation": {
                    "$ref": "#/components/schemas/MinPaymentCalculation"
                  }
                },
                "required": [
                  "minPaymentCalculation"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "minPaymentCalculation": {
                      "$ref": "#/components/schemas/MinPaymentCalculation"
                    }
                  },
                  "required": [
                    "minPaymentCalculation"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update draw min pay calculation",
        "tags": [
          "Line of Credit Draws"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/obligations": {
      "get": {
        "operationId": "peach.obligations.handlers.draw_obligations_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/periodIdQuery"
          },
          {
            "$ref": "#/components/parameters/obligationStatusQuery"
          },
          {
            "$ref": "#/components/parameters/loanPeriodFromDate"
          },
          {
            "$ref": "#/components/parameters/loanPeriodToDate"
          },
          {
            "$ref": "#/components/parameters/dueDate"
          },
          {
            "$ref": "#/components/parameters/isOpen"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Obligations"
          }
        },
        "security": [
          {
            "oauth2": [
              "obligation:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get draw obligations",
        "tags": [
          "Obligations"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/obligations/{obligationId}": {
      "get": {
        "operationId": "peach.obligations.handlers.draw_obligation_get_by_id",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/obligationId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Obligation"
          }
        },
        "security": [
          {
            "oauth2": [
              "obligation:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get draw obligation by ID",
        "tags": [
          "Obligations"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/promo-programs": {
      "post": {
        "operationId": "peach.promo_programs.handlers.promo_program.promo_programs_draw_add",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/PromoProgramPost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PromoProgram"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.promoprogram:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create promo program for draw",
        "tags": [
          "Promo Programs"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/promo-programs/{promoProgramId}": {
      "delete": {
        "operationId": "peach.promo_programs.handlers.promo_program.promo_programs_draw_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/promoProgramId"
          },
          {
            "$ref": "#/components/parameters/promoCancelReason"
          },
          {
            "description": "When set to `true` the system will send a\n`promoProgramCanceled` notice to the borrower.\n",
            "in": "query",
            "name": "sendNotice",
            "required": false,
            "schema": {
              "default": true,
              "type": "boolean"
            }
          },
          {
            "description": "The case object unique identifier.",
            "in": "query",
            "name": "caseId",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AnyId"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PromoProgramDelete"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.promoprogram:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Cancel promo program for draw",
        "tags": [
          "Promo Programs"
        ]
      },
      "get": {
        "operationId": "peach.promo_programs.handlers.promo_program.promo_programs_draw_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/promoProgramId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PromoProgram"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.promoprogram:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get promo program for draw by ID",
        "tags": [
          "Promo Programs"
        ]
      },
      "put": {
        "description": "There a few restrictions on what can be updated.\n`promoTypeId` cannot be updated.\nIf `status=pending` - any attribute except for `status` can be\nupdated.\nTo activate use the `Activate promo program` endpoint.\nIf `status=active` - `promoType`, `status`, `promoDurationDays`\nand `promoStartDate` cannot be updated.\nIf `status=canceled` -  `promoType`, `promoDurationDays` and\n`promoStartDate` cannot be updated.\nIf `status=exercised` - no attributes can be updated.\n",
        "operationId": "peach.promo_programs.handlers.promo_program.promo_programs_draw_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/promoProgramId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/PromoProgramPutDraw"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PromoProgram"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.promoprogram:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update promo program for draw",
        "tags": [
          "Promo Programs"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/promo-programs/{promoProgramId}/activate": {
      "post": {
        "operationId": "peach.promo_programs.handlers.promo_program.promo_programs_draw_activate",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/promoProgramId"
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.promoprogram:activate"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Activate promo program for draw",
        "tags": [
          "Promo Programs"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/purchases": {
      "get": {
        "operationId": "peach.people.loans.purchases.handlers.draw_purchases_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/purchaseTypes"
          },
          {
            "$ref": "#/components/parameters/purchaseStatuses"
          },
          {
            "$ref": "#/components/parameters/fromEffectiveAt"
          },
          {
            "$ref": "#/components/parameters/toEffectiveAt"
          },
          {
            "$ref": "#/components/parameters/fromCreatedAt"
          },
          {
            "$ref": "#/components/parameters/toCreatedAt"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/sortByEffectiveAt"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/Purchase"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Purchases"
          }
        },
        "security": [
          {
            "oauth2": [
              "draw.purchase:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get draw purchases",
        "tags": [
          "Line of Credit Purchases"
        ]
      },
      "post": {
        "operationId": "peach.people.loans.purchases.handlers.draw_purchases_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/forcePurchaseOverCreditLimit"
          },
          {
            "$ref": "#/components/parameters/syncGeneric"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CreatePurchase"
                  },
                  {
                    "$ref": "#/components/schemas/PurchaseExtraInput"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Purchase"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Created"
          },
          "408": {
            "description": "Request Timeout"
          }
        },
        "security": [
          {
            "oauth2": [
              "draw.purchase:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create purchase",
        "tags": [
          "Line of Credit Purchases"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/purchases-timeline": {
      "get": {
        "description": "Get draw purchases timeline is designed to provide a sequential ordering of purchases using specific purchase timestamps passed to Peach as part of the query parameters. To generate the timeline, Peach \"inserts\" purchases using the first available timestamp provided in the query parameters. For example, if `effectiveAt` and `authorizedAt` are provided in that order, Peach will\n- check first for an `effectiveAt` timestamp. If it exists, insert into timeline using `effectiveAt` timestamp.\n- if `effectiveAt` does not exist, check for `authorizedAt`. If it exists, insert into timeline using `authorizedAt` timestamp.\n- if neither exist, insert purchase into timeline using createdAt.",
        "operationId": "peach.people.loans.purchases.handlers.draw_purchases_timeline_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/purchaseTypes"
          },
          {
            "$ref": "#/components/parameters/purchaseStatuses"
          },
          {
            "$ref": "#/components/parameters/fromEffectiveAt"
          },
          {
            "$ref": "#/components/parameters/toEffectiveAt"
          },
          {
            "$ref": "#/components/parameters/fromCreatedAt"
          },
          {
            "$ref": "#/components/parameters/toCreatedAt"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/timelineOrdering"
          },
          {
            "$ref": "#/components/parameters/timelineSortOrder"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/Purchase"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Purchases"
          }
        },
        "security": [
          {
            "oauth2": [
              "draw.purchase:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get draw purchases timeline",
        "tags": [
          "Line of Credit Purchases"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/purchases/{purchaseId}": {
      "get": {
        "operationId": "peach.people.loans.purchases.handlers.draw_purchase_get_one",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/purchaseId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Purchase"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "draw.purchase:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get purchase by ID",
        "tags": [
          "Line of Credit Purchases"
        ]
      },
      "put": {
        "operationId": "peach.people.loans.purchases.handlers.draw_purchase_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/purchaseId"
          },
          {
            "$ref": "#/components/parameters/forcePurchaseOverCreditLimit"
          },
          {
            "$ref": "#/components/parameters/syncGeneric"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PurchaseUpdateInternal"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Purchase"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Updated"
          },
          "408": {
            "description": "Request Timeout"
          },
          "423": {
            "$ref": "#/components/responses/LockedResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "draw.purchase:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update purchase",
        "tags": [
          "Line of Credit Purchases"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/purchases/{purchaseId}/disputes": {
      "get": {
        "operationId": "peach.loans.purchase_disputes.handlers.purchase_disputes_list_for_purchase",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/purchaseId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PurchaseDisputePagingResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "purchase.dispute:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get purchase disputes",
        "tags": [
          "Line of Credit Purchases"
        ]
      },
      "post": {
        "description": "Creates a new purchase dispute. Purchases in `authorized` status may not be disputed. They must first \nbe written to the ledger by changing the status of the purchase or creating a new purchase object in \npending or settled status. Once one of those steps have been taken, the purchase may be disputed.  \n",
        "operationId": "peach.loans.purchase_disputes.handlers.purchase_dispute_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/purchaseId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/PurchaseDisputePost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PurchaseDisputeResponse"
          },
          "423": {
            "$ref": "#/components/responses/LockedResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "purchase.dispute:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create purchase dispute",
        "tags": [
          "Line of Credit Purchases"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/purchases/{purchaseId}/disputes/{purchaseDisputeId}": {
      "get": {
        "operationId": "peach.loans.purchase_disputes.handlers.purchase_dispute_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/purchaseId"
          },
          {
            "$ref": "#/components/parameters/purchaseDisputeId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PurchaseDisputeResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "purchase.dispute:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get purchase dispute by ID",
        "tags": [
          "Line of Credit Purchases"
        ]
      },
      "put": {
        "operationId": "peach.loans.purchase_disputes.handlers.purchase_dispute_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/purchaseId"
          },
          {
            "$ref": "#/components/parameters/purchaseDisputeId"
          },
          {
            "$ref": "#/components/parameters/syncGeneric"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/PurchaseDisputePut"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PurchaseDisputeResponse"
          },
          "408": {
            "description": "Request Timeout"
          },
          "423": {
            "$ref": "#/components/responses/LockedResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "purchase.dispute:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update purchase dispute",
        "tags": [
          "Line of Credit Purchases"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/rate-caps": {
      "get": {
        "operationId": "peach.loans.rate_caps.handlers.draw_rate_caps_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RateCapsArray"
          },
          "404": {
            "$ref": "#/components/responses/DrawNotFound"
          }
        },
        "security": [
          {
            "oauth2": [
              "rates:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get draw rate caps",
        "tags": [
          "Rate Caps"
        ]
      },
      "post": {
        "description": "This endpoint is used for adding rate caps to a draw. If two or \nmore rate caps overlap on the same date, we will use the lowest value. \nThis defines the maximum interest rate that can accrue on a draw \nto ensure interest accrual never exceeds the cap. You can define the \n`startDate` and `endDate` for each rate cap.\n\nIf a rate cap is added for past periods and the interest rate exceeds the cap, \nwe will replay the loan to apply the capped rate. If a rate cap is added for \npast periods and the effective interest rate is unchanged, we will not replay the loan. \n\n- Example: A borrower on active duty needs their rate capped at 36% per \nMLA regulations. If no `rateCap` is set, an index rate change could increase \nthe loan rate beyond the regulatory limit. \n- Original rate: 28% `spread` + 5% index rate = 33% (under cap)\n- Updated rate: 28% `spread` + 9% index rate= 37% (over cap)\n",
        "operationId": "peach.loans.rate_caps.handlers.draw_rate_cap_add",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/RateCapAdd"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/RateCap"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/DrawNotFound"
          }
        },
        "security": [
          {
            "oauth2": [
              "rates:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Add draw rate cap",
        "tags": [
          "Rate Caps"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/rate-caps/{rateCapId}": {
      "delete": {
        "description": "This endpoint is used for removing a single rate cap on a draw. \n\nIf a draw rate was capped at the `maxRate` and removing this rate \ncap updates the effective interest rate, then we will replay the loan. If \na loan rate is not affected by the removal of this `maxRate`, \nthen we will not replay the loan. \n",
        "operationId": "peach.loans.rate_caps.handlers.draw_rate_cap_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/rateCapId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RateCapDeleted"
          },
          "404": {
            "$ref": "#/components/responses/DrawRateCapNotFound"
          }
        },
        "security": [
          {
            "oauth2": [
              "rates:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete draw rate cap",
        "tags": [
          "Rate Caps"
        ]
      },
      "put": {
        "description": "This endpoint is used for updating a single rate cap on a draw.\n\nIf a rate cap is updated on a draw for past periods and the draw \nrate exceeds the cap, we will replay the loan to apply the capped rate.\nIf a rate cap is added for past periods and the draw rate is not affected \nby the `maxRate` update, then we will not replay the loan. \n",
        "operationId": "peach.loans.rate_caps.handlers.draw_rate_cap_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/rateCapId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/RateCapUpdate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/RateCap"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/DrawRateCapNotFound"
          }
        },
        "security": [
          {
            "oauth2": [
              "rates:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update draw rate cap",
        "tags": [
          "Rate Caps"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/rates": {
      "get": {
        "operationId": "peach.people.loans.handlers.draw_rates_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanRatesResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "rates:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get draw rates",
        "tags": [
          "Rates"
        ]
      },
      "post": {
        "description": "This endpoint is used for adding rates. A draw can have multiple rates. If two or more `interestRate` overlap on the same date\nwe use the lowest value. If two or more `promoRate` overlap on the same date, we take the sum of the promo rates for the given\nday, and cap this rate at the maximum interest rate for the given day (to avoid accruing negative interest).\n\nThe added `interestRate` will default to the existing interest type set on the loan at the time of\norigination (see `atOrigination.interestRate.interestType` attribute).\nThe added `interestRate` must be within the bounds of any corresponding minimum and maximum rate range\nconfiguration that is found on the loan type (if any).\n",
        "operationId": "peach.people.loans.handlers.draw_rates_add",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanRateAdd"
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/CreateOrUpdateInterestRatesResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "rates:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Add draw rate",
        "tags": [
          "Rates"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/rates/{rateId}": {
      "delete": {
        "description": "This endpoint is used for removing a single `interest` or `promo` rate. The deletion of an\ninterest rate cannot lead to a gap in the loan where there is no reference rate.\n\nRates where setAtActivation is `true` can only be deleted with a special force permission.\n",
        "operationId": "peach.people.loans.handlers.draw_rates_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/rateId"
          },
          {
            "$ref": "#/components/parameters/caseFilter"
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "rates:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Remove draw rate",
        "tags": [
          "Rates"
        ]
      },
      "put": {
        "description": "This endpoint is used for updating a single `interest` or `promo` rate (don't pass both in the same call). The updating of an\ninterest rate cannot lead to a gap in the loan where there is no reference interest rate.\n",
        "operationId": "peach.people.loans.handlers.draw_rates_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          },
          {
            "$ref": "#/components/parameters/rateId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanRateUpdate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CreateOrUpdateInterestRatesResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "rates:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update draw rate",
        "tags": [
          "Rates"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/draws/{drawId}/reopen": {
      "post": {
        "description": "Reopen a closed draw. This will allow new purchases to be added to the draw. Draws in `paidOff` status cannot be reopened.\n",
        "operationId": "peach.people.loans.draws.handlers.draw_reopen",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/drawId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "caseId": {
                    "description": "An identifier for an existing case.",
                    "type": "string"
                  },
                  "reopenReason": {
                    "description": "The reason the loan is being reopened.",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:reopen"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Reopen draw",
        "tags": [
          "Line of Credit Draws"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/effective-rates": {
      "get": {
        "description": "This endpoint returns rates details of a loan for given date(s).\n\n## Interest rates:\n- If two or more interest rates are `active` on the same date (aka overlap), the Peach system selects the lowest rate (also called \"effective rate\") to accrue interest.\nPromo rates:\n- If two or more promo rates are `active` on the same date (aka overlap), the Peach system sums up the rates as \"effective\" promo rate.\n",
        "operationId": "peach.people.loans.handlers.loan_effective_rates_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "description": "The \"from\" date (inclusive).\n\nPass the same value in the `fromDate` and `toDate` if you need to get the rates for a specific date.\n",
            "in": "query",
            "name": "fromDate",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "The \"to\" date (inclusive).\n\nPass the same value in the `fromDate` and `toDate` if you need to get the rates for a specific date.\n",
            "in": "query",
            "name": "toDate",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/effectiveRatesPeriodIdsQuery"
          },
          {
            "$ref": "#/components/parameters/effectiveRatesPeriodDueDatesQuery"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanEffectiveRatesResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "rates:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan effective rates",
        "tags": [
          "Rates"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/expected-payments": {
      "get": {
        "operationId": "peach.people.loans.expected_payments.handlers.loan_expected_payments_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ExpectedPayments"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan expected payments",
        "tags": [
          "Expected Payments"
        ]
      },
      "post": {
        "description": "Change due date allows the customer to change the frequency of a loan and/or the specific day(s) that\ndue dates will fall on. This is not supported for loans with `periodCalculationType=statementDate`.\n\nFor accounts/loans with `frequency!=singleTerm` (aka non-single term), modifications to the expected payments schedule resulting\nfrom Change Due Date do not impact the current period. Changes are only effective starting in the next period.\n\nFor accounts/loans with `frequency=singleTerm`, only specific days can be modified. The change impacts the current (single)\nperiod of the loan. The caller must pass `dueDatesFrequency=singleTerm`.\n\n- Note: In certain circumstances when requesting a new `specificDays`, the first adjusted period (with the new `specificDays`) can be \npushed out an additional \"cycle\" in order to prevent the `dueDate` of the current period (with the current `specificDays`) from \nfalling outside the first adjusted period. To achieve this, the max `gapBetweenDueDates` may be exceeded. \n",
        "operationId": "peach.people.loans.expected_payments.handlers.loan_change_due_dates_schedule_post",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/DueDatesPost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ChangeSchedule"
          }
        },
        "security": [
          {
            "oauth2": [
              "due.date:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Change due dates schedule",
        "tags": [
          "Expected Payments"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/expected-payments/defer-remaining-balances": {
      "post": {
        "description": "Defer line of credit single or multiple due dates.\nThe system will defer amounts across the line of credit and all\ndraws.\nThe selected due dates to defer can only be due dates for which\nthe statement was already generated.\nPast due dates should always have statements.\nUpcoming due date can only be selected if the statement was\nalready generated.\n\nNote: If the line of credit has origination fee, unpaid\norigination fee cannot be deferred.\nOther balances can be deferred.\n",
        "operationId": "peach.people.loans.expected_payments.handlers.defer_remaining_loc_balances",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeferRemainingBalancesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeferRemainingBalancesResponse"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:defer.remaining.balances"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Defer remaining balances for all active draws",
        "tags": [
          "Expected Payments"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/fees": {
      "get": {
        "operationId": "peach.people.loans.fees.handlers.fees_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/includeDraws"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/NewPaginator"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/LoanFee"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:fees.list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get fees",
        "tags": [
          "Fees"
        ]
      },
      "post": {
        "operationId": "peach.people.loans.fees.handlers.fees_post",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/syncGeneric"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/FeesPost"
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/LoanFee"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          },
          "409": {
            "description": "Duplicate fee external id."
          },
          "412": {
            "$ref": "#/components/responses/FeeNotCharged"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:charge.dynamicfee"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Charge dynamic fee",
        "tags": [
          "Fees"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/fees/origination": {
      "put": {
        "description": "This endpoint allows lenders to change the origination fee amount. The system will update the origination fee amount and replay the loan from the activation date.\n",
        "operationId": "peach.people.loans.handlers.update_origination_fee",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/syncGeneric"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "caseId": {
                    "description": "An identifier for an existing case.",
                    "type": "string"
                  },
                  "feeAmount": {
                    "description": "The updated amount of the origination fee. The new amount cannot be higher than the amount passed on loan creation in atOrigination.\n",
                    "type": "number"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update origination fee",
        "tags": [
          "Fees"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/fees/{loanFeeId}": {
      "put": {
        "operationId": "peach.people.loans.fees.handlers.dynamic_fee_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/loanFeeId"
          },
          {
            "$ref": "#/components/parameters/syncUpdateDynamicFee"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "caseId": {
                    "description": "An identifier for an existing case.",
                    "type": "string"
                  },
                  "customDisplayName": {
                    "description": "A custom description of the fee. If provided, this value will be displayed in Peach UI/App and Statements\n(or can be used by lender in their App). If the value is not provided, the Peach UI/App and Statements\nlogic will use displayName attribute. To remind, the displayName is populated from the fee type configuration object.\n",
                    "nullable": true,
                    "type": "string"
                  },
                  "externalId": {
                    "description": "The lender's identifier for the fee.",
                    "nullable": true,
                    "type": "string"
                  },
                  "originalAmount": {
                    "description": "The updated amount of the dynamic fee. Only applies to dynamic fees. Only applicable if dynamic fee type\n`capLogic.annualAmountCaps.capAction` = `adjustAmount` and `capLogic.annualAmountCaps.type` in\n[`annualPercentageOfCreditLimitCap`].\n",
                    "type": "number"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Updated."
          },
          "409": {
            "description": "Duplicate fee external id."
          },
          "423": {
            "$ref": "#/components/responses/LockedResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:fees.update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update dynamic fee",
        "tags": [
          "Fees"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/fees/{loanFeeId}/cancel": {
      "post": {
        "operationId": "peach.people.loans.fees.handlers.fees_cancel_one",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/loanFeeId"
          },
          {
            "$ref": "#/components/parameters/clearExternalIdGeneric"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "caseId": {
                    "description": "An identifier for an existing case.",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "204": {
            "description": "Canceled"
          },
          "423": {
            "$ref": "#/components/responses/LockedResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:cancel.dynamicfee"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Cancel dynamic fee",
        "tags": [
          "Fees"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/freeze": {
      "post": {
        "description": "Freeze loan will change the status of an `active` loan to `frozen` effective as of the\ncurrent date. The loan will remain in a frozen status until the Unfreeze endpoint is\ncalled.\n",
        "operationId": "peach.people.loans.handlers.loan_freeze",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "caseId": {
                    "description": "An identifier for an existing case.",
                    "type": "string"
                  },
                  "sendNotice": {
                    "default": true,
                    "description": "When set to `false`, the system will NOT send a `loanFreeze` notice to the borrower.\n",
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:freeze"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Freeze loan",
        "tags": [
          "Loans"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/future-balances": {
      "get": {
        "operationId": "peach.people.loans.balances.handlers.loan_future_balances_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/isRounded"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/FutureBalances"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan future balances",
        "tags": [
          "Balances"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/interest": {
      "get": {
        "operationId": "peach.people.loans.handlers.loan_interest_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "description": "The draw identifier, if getting interest for a specific draw.",
            "in": "query",
            "name": "drawId",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AnyId"
            }
          },
          {
            "$ref": "#/components/parameters/fromEffectiveDate"
          },
          {
            "$ref": "#/components/parameters/toEffectiveDate"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Interest"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.interest:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan interest",
        "tags": [
          "Balances"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/investors": {
      "get": {
        "operationId": "peach.people.loans.handlers.loan_investors_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoanInvestorsPaging"
                }
              }
            },
            "description": "success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan investors",
        "tags": [
          "LoansInvestors"
        ]
      },
      "put": {
        "operationId": "peach.people.loans.handlers.loan_investors_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoanInvestors"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "updated"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.investors:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update loan investors",
        "tags": [
          "LoansInvestors"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/loc-payment-plan-scra": {
      "delete": {
        "description": "Removes a single SCRA interest rate (`interestType=AbsoluteScra`) on a line of credit loan.\n\nThe specified `rateId` must refer to an active SCRA interest rate on the loan.\n\n**Note:** This endpoint currently validates the request but does not yet remove an\nSCRA payment plan. Full plan removal will be added once the spec is finalized.\n",
        "operationId": "peach.people.loans.expected_payments.handlers.loc_change_terms_scra_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/scraRateId"
          },
          {
            "$ref": "#/components/parameters/scraSendNotice"
          },
          {
            "$ref": "#/components/parameters/scraCaseId"
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:paymentplan.scra.delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete line of credit loan terms SCRA",
        "tags": [
          "SCRA"
        ]
      },
      "post": {
        "description": "Creates SCRA (Servicemembers Civil Relief Act) terms for a line of credit loan.\n\nFor the SCRA period, the loan rate is lowered (default 6%) and fees may be canceled.\nOnly applicable to line of credit loans.\n\nThe `startDate` must be before or equal to `endDate`, and both must fall within\nthe loan's lifetime. The `annualRate` cannot exceed 6% per US federal regulations.\nOverlapping SCRA periods are not allowed.\n\n**Note:** This endpoint currently validates the request but does not yet create an\nSCRA payment plan. Full plan creation will be added once the spec is finalized.\n",
        "operationId": "peach.people.loans.expected_payments.handlers.loc_change_terms_scra_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/syncGeneric"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanChangeLoanTermsSCRA"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ChangeScheduleSCRA"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:paymentplan.scra.create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create line of credit loan terms SCRA",
        "tags": [
          "SCRA"
        ]
      },
      "put": {
        "description": "Modifies the start date or end date of a single SCRA interest rate (`interestType=AbsoluteScra`)\non a line of credit loan.\n\nThe new `startDate` must be before or equal to `endDate`, and both must fall within\nthe loan's lifetime. The modified SCRA period must not overlap with other SCRA plans.\n\n**Note:** This endpoint currently validates the request but does not yet modify an\nSCRA payment plan. Full plan modification will be added once the spec is finalized.\n",
        "operationId": "peach.people.loans.expected_payments.handlers.loc_change_terms_scra_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanChangeLoanTermsSCRAUpdate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ChangeScheduleSCRA"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:paymentplan.scra.update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Change line of credit loan terms SCRA",
        "tags": [
          "SCRA"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/lock-status": {
      "get": {
        "operationId": "peach.people.loans.handlers.get_lock_status",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/IsLocked"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Succeeded"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan lock status",
        "tags": [
          "Loans"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/migrate": {
      "post": {
        "operationId": "peach.loans.migration.handlers.loan_migrate",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/syncGeneric"
          }
        ],
        "responses": {
          "204": {
            "description": "Loan migration started"
          },
          "408": {
            "description": "Request Timeout"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:migrate"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Migrate loan",
        "tags": [
          "Loans"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/migration/past-periods": {
      "delete": {
        "description": "Deletes past period in preparation for migration.",
        "operationId": "peach.loans.migration.past_periods.handlers.past_periods_data_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/dueDateDelete"
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.migration.pastperiods:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete past period data",
        "tags": [
          "Line of Credit Migration"
        ]
      },
      "get": {
        "description": "Get past period in preparation for migration.",
        "operationId": "peach.loans.migration.past_periods.handlers.past_periods_data_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/dueDateGet"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/reportingToAgency"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/NewPaginator"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/PastPeriod"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Past period data"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.migration.pastperiods:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get past period data",
        "tags": [
          "Line of Credit Migration"
        ]
      },
      "post": {
        "description": "Creates past periods in preparation for migration.",
        "operationId": "peach.loans.migration.past_periods.handlers.past_periods_data_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "pastPeriods": {
                    "items": {
                      "$ref": "#/components/schemas/PastPeriodWithRequireds"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "pastPeriods"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/PastPeriod"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.migration.pastperiods:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create past periods data",
        "tags": [
          "Line of Credit Migration"
        ]
      },
      "put": {
        "description": "Updates past period in preparation for migration.",
        "operationId": "peach.loans.migration.past_periods.handlers.past_periods_data_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/dueDateUpdate"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PastPeriod"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PastPeriod"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.migration.pastperiods:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update past period data",
        "tags": [
          "Line of Credit Migration"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/migration/past-transaction": {
      "get": {
        "operationId": "peach.loans.migration.past_transactions.handlers.past_transaction_data_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/transactionStatuses"
          },
          {
            "$ref": "#/components/parameters/queryPaymentInstrumentId"
          },
          {
            "$ref": "#/components/parameters/transactionType"
          },
          {
            "$ref": "#/components/parameters/serviceCreditTypes"
          },
          {
            "$ref": "#/components/parameters/toEffectiveDateGeneric"
          },
          {
            "$ref": "#/components/parameters/fromEffectiveDateGeneric"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/sortByForTransactions"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PastTransactionsPaging"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.migration.pasttransaction:get"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get past transactions",
        "tags": [
          "Line of Credit Migration"
        ]
      },
      "post": {
        "description": "Creates past transaction in preparation for line of credit migration.",
        "operationId": "peach.loans.migration.past_transactions.handlers.past_transaction_data_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PastTransaction"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PastTransactionResponse"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Created"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.migration.pasttransaction:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create past transaction",
        "tags": [
          "Line of Credit Migration"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/migration/past-transaction/{transactionId}": {
      "get": {
        "operationId": "peach.loans.migration.past_transactions.handlers.past_transaction_data_get_one",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/transactionId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PastTransactionResponse"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.migration.pasttransaction:get"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get past transaction by ID",
        "tags": [
          "Line of Credit Migration"
        ]
      },
      "put": {
        "description": "Update past transaction in preparation for line of credit migration.\n\nNote: After migration, you should call the \"Update transaction\" endpoint.\n",
        "operationId": "peach.loans.migration.past_transactions.handlers.past_transaction_data_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/transactionId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PastTransactionUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PastTransactionResponse"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.migration.pasttransaction:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update past transaction",
        "tags": [
          "Line of Credit Migration"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/migration/period": {
      "get": {
        "operationId": "peach.loans.migration.migration_period.handlers.migration_period_loc_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationPeriodLOCDataResponse"
                }
              }
            },
            "description": "Migration period LOC data"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.migration.period:get"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get migration period LOC data",
        "tags": [
          "Line of Credit Migration"
        ]
      },
      "post": {
        "description": "This endpoint allows you to pass additional details about the line in preparation for migration.\n\nThe \"Migration period\" is the period in which you execute the migration. This is the period from which the Peach system takes control over the line. This period is considered to be \"open\" at the time of the migration. The migration needs to be completed before the upcoming due date. To clarify, the upcoming due date corresponds to the previous period's statement date.\n\n\"Migration cutoff date\" is the most recent statement date relative to the day on which you execute the migration process. This date is also the `startDate` of the migration period.\n\n\"Migration at date\" is the actual date on which you execute the migration.\n\nFor example:\n - Migration period:\n    - startDate: Aug 1, 2024\n    - endDate: Aug 31, 2024\n    - statementDate: Sep 1, 2024\n    - dueDate: Sep 22, 2024\n - Previous period (also called \"past period\"):\n    - startDate: Jul 1, 2024\n    - endDate: Jul 31, 2024\n    - statementDate: Aug 1, 2024\n    - dueDate: Aug 22, 2024\n - Notes:\n    - \"Migration cutoff date\" is Aug 1, 2024.\n    - If you execute the migration on Aug 10, 2024, the \"migration at date\" is Aug 10.\n    - Previous period's `dueDate`, Aug 22, 2024, falls in the \"migration period\" that starts on Aug 1, 2024 and ends on Aug 31, 2024.\n    - The upcoming due date is Aug 22, 2024.\n - If you didn't complete the migration before Aug 22, 2024, you need to cancel the loan and start the process again.\n",
        "operationId": "peach.loans.migration.migration_period.handlers.migration_period_loc_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MigrationPeriodLOCDataWithRequired"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationPeriodLOCDataResponse"
                }
              }
            },
            "description": "Migration period LOC data"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.migration.period:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create migration period LOC data",
        "tags": [
          "Line of Credit Migration"
        ]
      },
      "put": {
        "operationId": "peach.loans.migration.migration_period.handlers.migration_period_loc_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MigrationPeriodLOCData"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationPeriodLOCDataResponse"
                }
              }
            },
            "description": "Migration period LOC data"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.migration.period:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update migration period LOC data",
        "tags": [
          "Line of Credit Migration"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/obligations": {
      "get": {
        "operationId": "peach.obligations.handlers.obligations_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/periodIdQuery"
          },
          {
            "$ref": "#/components/parameters/obligationStatusQuery"
          },
          {
            "$ref": "#/components/parameters/loanPeriodFromDate"
          },
          {
            "$ref": "#/components/parameters/loanPeriodToDate"
          },
          {
            "$ref": "#/components/parameters/dueDate"
          },
          {
            "$ref": "#/components/parameters/isOpen"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/LOCObligations"
          }
        },
        "security": [
          {
            "oauth2": [
              "obligation:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan obligations",
        "tags": [
          "Obligations"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/obligations/{obligationId}": {
      "get": {
        "operationId": "peach.obligations.handlers.obligation_get_by_id",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/obligationId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/LOCObligation"
          }
        },
        "security": [
          {
            "oauth2": [
              "obligation:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan obligation by ID",
        "tags": [
          "Obligations"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/payment-plan": {
      "post": {
        "description": "Change loan terms creates a customer payment plan for the borrower. There are several options:\n\nThe first option is passing in `duration`, which we use to calculate the new recurring amount going forward.\nThe second option is passing in the `recurringAmount`, which we use to calculate the remaining duration of\nthe loan. The third option is not passing either `duration` or `recurringAmount`, in which case the behavior\nis similar to the Change Due Date endpoint. The fourth option is passing `duration` and `recurringAmount`, which\nwe use to calculate the final payment amount\n\nUnlike the Change Due Date endpoint, for the Change Loan Terms endpoint, any modifications to the `amount` in\nthe expected payments schedule resulting from Change Loan Terms are effective from the current period. But\nmodifications to the `dueDate` in the expected payments schedule are only effective starting in the next period.\n\nFor all four options, it is optional to specify a new frequency and/or specific days. Change loan terms will cancel any due date deferrals\nfor the current or future periods.\n\nOnly applicable to installment loans.\n",
        "operationId": "peach.people.loans.expected_payments.handlers.loan_change_terms",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanChangeLoanTerms"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ChangeSchedule"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:paymentplan.create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Change installment loan terms",
        "tags": [
          "Expected Payments"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/payment-plan-scra": {
      "delete": {
        "description": "This endpoint is used for removing a single SCRA interest rate (`interestType=AbsoluteScra`) on a loan. Only applicable to installment loans. \n\nIf the SCRA start date is in the past, this will replay the loan.\n\nWhen an existing SCRA plan is updated or deleted, the system determines whether fees should be canceled or revived based on the `isCancelFees` value from the original SCRA plan.\nFor example, if we are updating the SCRA plan:\n\nExpanding the SCRA period\n- If `isCancelFees` = `true`, we will cancel fees within the extended SCRA plan period.\n- If `isCancelFees` = `false`, we will not cancel any fees within the extended SCRA plan period.\n\nShrinking the SCRA period\n- If `isCancelFees` = `true`, we will revive any previously canceled fees within the portion of the SCRA plan period that is being removed.\n- If `isCancelFees` = `false`, we will not revive any fees since there were no fees canceled in the original SCRA plan.\n",
        "operationId": "peach.people.loans.expected_payments.handlers.loan_change_terms_scra_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/scraRateId"
          },
          {
            "$ref": "#/components/parameters/scraSendNotice"
          },
          {
            "$ref": "#/components/parameters/scraCaseId"
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:paymentplan.scra.delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete installment loan terms SCRA",
        "tags": [
          "SCRA"
        ]
      },
      "post": {
        "description": "Creates a customer payment plan for the borrower in accordance with SCRA regulations.\nOnly applicable to installment loans.\n",
        "operationId": "peach.people.loans.expected_payments.handlers.loan_change_terms_scra_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/syncGeneric"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanChangeLoanTermsSCRA"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ChangeScheduleSCRA"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:paymentplan.scra.create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create installment loan terms SCRA",
        "tags": [
          "SCRA"
        ]
      },
      "put": {
        "description": "This endpoint is used for modifying the start date or end date of a single SCRA interest rate (`interestType=AbsoluteScra`).\nOnly applicable to installment loans.\n\nIf the SCRA start date is in the past, this will replay the loan.\n\nWhen an existing SCRA plan is updated or deleted, the system determines whether fees should be canceled or revived based on the `isCancelFees` value from the original SCRA plan.\nFor example, if we are updating the SCRA plan:\n\nExpanding the SCRA period\n- If `isCancelFees` = `true`, we will cancel fees within the extended SCRA plan period.\n- If `isCancelFees` = `false`, we will not cancel any fees within the extended SCRA plan period.\n\nShrinking the SCRA period\n- If `isCancelFees` = `true`, we will revive any previously canceled fees within the portion of the SCRA plan period that is being removed.\n- If `isCancelFees` = `false`, we will not revive any fees since there were no fees canceled in the original SCRA plan.\n",
        "operationId": "peach.people.loans.expected_payments.handlers.loan_change_terms_scra_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanChangeLoanTermsSCRAUpdate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ChangeScheduleSCRA"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:paymentplan.scra.update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Change installment loan terms SCRA",
        "tags": [
          "SCRA"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/periods": {
      "get": {
        "description": "Returns loan's payment periods.",
        "operationId": "peach.people.loans.handlers.get_loan_periods",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/loanPeriodFromDate"
          },
          {
            "$ref": "#/components/parameters/loanPeriodToDate"
          },
          {
            "$ref": "#/components/parameters/dueDate"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanPeriodsResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan periods",
        "tags": [
          "Periods"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/periods/{loanPeriodId}": {
      "get": {
        "description": "Returns a single loan period",
        "operationId": "peach.people.loans.handlers.get_loan_period_by_id",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/loanPeriodId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanPeriodResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan period by id",
        "tags": [
          "Periods"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/periods/{periodId}/generate-statement": {
      "post": {
        "description": "Generates a statement, and if one already exists, replaces the older one as the active one.\nIf `sync=true` is passed, the server will try to wait up to 20 seconds for the statement\ncreation to finish. If it finishes in time, it will return the statement object.\nOtherwise, it will return nothing.\n",
        "operationId": "peach.statements.handlers.generate_statement",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/periodId"
          },
          {
            "$ref": "#/components/parameters/syncGeneric"
          },
          {
            "$ref": "#/components/parameters/sendNotice"
          },
          {
            "$ref": "#/components/parameters/statementReason"
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ProcessingCompleteGeneric"
                    },
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/schemas-Statement"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "statement:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Generate statement",
        "tags": [
          "Statements"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/promise-to-pay-plans": {
      "get": {
        "description": "Returns `Promise to Pay Plan`s for a given `Loan`.",
        "operationId": "peach.loans.promise_to_pays.handlers.get_promise_to_pay_plans_by_loan",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/parameters-status"
          },
          {
            "$ref": "#/components/parameters/isOverdue"
          },
          {
            "$ref": "#/components/parameters/startDateAfter"
          },
          {
            "$ref": "#/components/parameters/endDateBefore"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PromisetoPayPlansPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "promise.to.pay.plan:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get Promise to Pay Plans for a Loan",
        "tags": [
          "Promise to Pay Plans"
        ]
      },
      "post": {
        "description": "Creates a new `Promise to Pay Plan`.",
        "operationId": "peach.loans.promise_to_pays.handlers.create_promise_to_pay_plan",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/PromiseToPayPlanPost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PromiseToPayPlan",
            "description": "Successfully processed the request, but the resource was not created."
          },
          "201": {
            "$ref": "#/components/responses/PromiseToPayPlan",
            "description": "Successfully created a new Promise to Pay Plan."
          }
        },
        "security": [
          {
            "oauth2": [
              "promise.to.pay.plan:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create Promise to Pay Plan",
        "tags": [
          "Promise to Pay Plans"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/promise-to-pay-plans/{promiseToPayPlanId}": {
      "get": {
        "description": "Returns a `Promise to Pay Plan` for a given `Loan`.",
        "operationId": "peach.loans.promise_to_pays.handlers.get_promise_to_pay_plan",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/promiseToPayPlanId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PromiseToPayPlan",
            "description": "Successfully fetched the Promise to Pay Plan."
          }
        },
        "security": [
          {
            "oauth2": [
              "promise.to.pay.plan:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get Promise to Pay Plan",
        "tags": [
          "Promise to Pay Plans"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/promise-to-pay-plans/{promiseToPayPlanId}/cancel": {
      "put": {
        "description": "Cancels a `Promise to Pay Plan`.",
        "operationId": "peach.loans.promise_to_pays.handlers.cancel_promise_to_pay_plan",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/promiseToPayPlanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/PromiseToPayPlanCancel"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PromiseToPayPlan",
            "description": "Successfully canceled the Promise to Pay Plan."
          }
        },
        "security": [
          {
            "oauth2": [
              "promise.to.pay.plan:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Cancel Promise to Pay Plan",
        "tags": [
          "Promise to Pay Plans"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/promise-to-pay-plans/{promiseToPayPlanId}/evaluate": {
      "put": {
        "description": "Evaluates a `Promise to Pay Plan` and updates the `status` and `isOverdue` of the `Promise to Pay Plan`.",
        "operationId": "peach.loans.promise_to_pays.handlers.evaluate_promise_to_pay_plan",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/promiseToPayPlanId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PromiseToPayPlan",
            "description": "Successfully evaluated the Promise to Pay Plan."
          }
        },
        "security": [
          {
            "oauth2": [
              "promise.to.pay.plan:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Evaluate Promise to Pay Plan",
        "tags": [
          "Promise to Pay Plans"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/promo-programs": {
      "get": {
        "operationId": "peach.promo_programs.handlers.promo_program.promo_programs_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/promoEffectiveEndDateAfter"
          },
          {
            "$ref": "#/components/parameters/statuses"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PromoProgramPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.promoprogram:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get promo programs",
        "tags": [
          "Promo Programs"
        ]
      },
      "post": {
        "operationId": "peach.promo_programs.handlers.promo_program.promo_programs_add",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/PromoProgramPost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PromoProgram"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.promoprogram:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create promo program",
        "tags": [
          "Promo Programs"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/promo-programs/{promoProgramId}": {
      "delete": {
        "operationId": "peach.promo_programs.handlers.promo_program.promo_programs_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/promoProgramId"
          },
          {
            "$ref": "#/components/parameters/promoCancelReason"
          },
          {
            "description": "When set to `true` the system will send a\n`promoProgramCanceled` notice to the borrower.\n",
            "in": "query",
            "name": "sendNotice",
            "required": false,
            "schema": {
              "default": true,
              "type": "boolean"
            }
          },
          {
            "description": "The case object unique identifier.",
            "in": "query",
            "name": "caseId",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AnyId"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PromoProgramDelete"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.promoprogram:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Cancel promo program",
        "tags": [
          "Promo Programs"
        ]
      },
      "get": {
        "operationId": "peach.promo_programs.handlers.promo_program.promo_programs_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/promoProgramId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PromoProgram"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.promoprogram:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get promo program by ID",
        "tags": [
          "Promo Programs"
        ]
      },
      "put": {
        "description": "There a few restrictions on what can be updated.\n`promoTypeId` cannot be updated.\nIf `status=pending` - any attribute except for `status` can be\nupdated.\nTo activate use the `Activate promo program` endpoint.\nIf `status=active` - `promoType`, `status`, `promoDurationDays`\nand `promoStartDate` cannot be updated.\nIf `status=canceled` -  `promoType`, `promoDurationDays` and\n`promoStartDate` cannot be updated.\nIf `status=exercised` - no attributes can be updated.\n",
        "operationId": "peach.promo_programs.handlers.promo_program.promo_programs_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/promoProgramId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/PromoProgramPut"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PromoProgram"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.promoprogram:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update promo program",
        "tags": [
          "Promo Programs"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/promo-programs/{promoProgramId}/activate": {
      "post": {
        "operationId": "peach.promo_programs.handlers.promo_program.promo_programs_activate",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/promoProgramId"
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.promoprogram:activate"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Activate promo program",
        "tags": [
          "Promo Programs"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/purchases": {
      "get": {
        "operationId": "peach.people.loans.purchases.handlers.loan_purchases_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/purchaseTypes"
          },
          {
            "$ref": "#/components/parameters/purchaseStatuses"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/fromEffectiveAt"
          },
          {
            "$ref": "#/components/parameters/toEffectiveAt"
          },
          {
            "$ref": "#/components/parameters/fromCreatedAt"
          },
          {
            "$ref": "#/components/parameters/toCreatedAt"
          },
          {
            "$ref": "#/components/parameters/sortByEffectiveAt"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PurchasesPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "draw.purchase:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get line of credit purchases",
        "tags": [
          "Line of Credit Purchases"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/purchases-timeline": {
      "get": {
        "description": "Get line of credit purchases timeline is designed to provide a sequential ordering of purchases using specific purchase timestamps passed to Peach as part of the query parameters. To generate the timeline, Peach \"inserts\" purchases using the first available timestamp provided in the query parameters. For example, if `effectiveAt` and `authorizedAt` are provided in that order, Peach will\n- check first for an `effectiveAt` timestamp. If it exists, insert into timeline using `effectiveAt` timestamp.\n- if `effectiveAt` does not exist, check for `authorizedAt`. If it exists, insert into timeline using `authorizedAt` timestamp.\n- if neither exist, insert purchase into timeline using createdAt.",
        "operationId": "peach.people.loans.purchases.handlers.loan_purchases_timeline_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/purchaseTypes"
          },
          {
            "$ref": "#/components/parameters/purchaseStatuses"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/fromEffectiveAt"
          },
          {
            "$ref": "#/components/parameters/toEffectiveAt"
          },
          {
            "$ref": "#/components/parameters/fromCreatedAt"
          },
          {
            "$ref": "#/components/parameters/toCreatedAt"
          },
          {
            "$ref": "#/components/parameters/timelineOrdering"
          },
          {
            "$ref": "#/components/parameters/timelineSortOrder"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PurchasesPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "draw.purchase:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get line of credit purchases timeline",
        "tags": [
          "Line of Credit Purchases"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/rate-caps": {
      "get": {
        "operationId": "peach.loans.rate_caps.handlers.loan_rate_caps_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RateCapsArray"
          },
          "404": {
            "$ref": "#/components/responses/LoanNotFound"
          }
        },
        "security": [
          {
            "oauth2": [
              "rates:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan rate caps",
        "tags": [
          "Rate Caps"
        ]
      },
      "post": {
        "description": "This endpoint is used for adding rate caps to a loan. If two or \nmore rate caps overlap on the same date, we will use the lowest value. \nThis defines the maximum interest rate that can accrue on a loan \nto ensure interest accrual never exceeds the cap. You can define the \n`startDate` and `endDate` for each rate cap.\n\nIf a rate cap is added for past periods and the interest rate exceeds the cap, \nwe will replay the loan to apply the capped rate. If a rate cap is added for \npast periods and the effective interest rate is unchanged, we will not replay the loan. \n\n- Example: A borrower on active duty needs their rate capped at 36% per \nMLA regulations. If no `rateCap` is set, an index rate change could increase \nthe loan rate beyond the regulatory limit. \n- Original rate: 28% `spread` + 5% index rate = 33% (under cap)\n- Updated rate: 28% `spread` + 9% index rate= 37% (over cap)\n",
        "operationId": "peach.loans.rate_caps.handlers.loan_rate_cap_add",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/RateCapAdd"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/RateCap"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/LoanNotFound"
          }
        },
        "security": [
          {
            "oauth2": [
              "rates:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Add loan rate cap",
        "tags": [
          "Rate Caps"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/rate-caps/{rateCapId}": {
      "delete": {
        "description": "This endpoint is used for removing a single rate cap on a loan. \n\nIf a loan rate was capped at the `maxRate` and removing this rate \ncap updates the effective interest rate, then we will replay the loan. If \na loan rate is not affected by the removal of this `maxRate`, \nthen we will not replay the loan. \n",
        "operationId": "peach.loans.rate_caps.handlers.loan_rate_cap_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/rateCapId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RateCapDeleted"
          },
          "404": {
            "$ref": "#/components/responses/RateCapNotFound"
          }
        },
        "security": [
          {
            "oauth2": [
              "rates:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete loan rate cap",
        "tags": [
          "Rate Caps"
        ]
      },
      "put": {
        "description": "This endpoint is used for updating a single rate cap on a loan.\n\nIf a rate cap is updated on a loan for past periods and the \nloan rate exceeds the cap, we will replay the loan to apply \nthe capped rate. If a rate cap is added for past periods and the loan \nrate is not affected by the `maxRate` update, then we will not replay the loan. \n",
        "operationId": "peach.loans.rate_caps.handlers.loan_rate_cap_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/rateCapId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/RateCapUpdate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/RateCap"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/RateCapNotFound"
          }
        },
        "security": [
          {
            "oauth2": [
              "rates:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update loan rate cap",
        "tags": [
          "Rate Caps"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/rates": {
      "get": {
        "operationId": "peach.people.loans.handlers.loan_rates_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanRatesResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "rates:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan rates",
        "tags": [
          "Rates"
        ]
      },
      "post": {
        "description": "This endpoint is used for adding rates. A loan can have multiple rates. If two or more `interestRate`\noverlap on the same date we use the lowest value. If two or more `promoRate` overlap on the same date, we\ntake the sum of the promo rates for the given day, and cap this rate at the maximum interest rate for the\ngiven day (to avoid accruing negative interest).\n\nThe added `interestRate` will default to the existing interest type set on the loan at the time of\norigination (see `atOrigination.interestRate.interestType` attribute).\nThe added `interestRate` must be within the bounds of any corresponding minimum and maximum rate range\nconfiguration that is found on the loan type (if any).\n",
        "operationId": "peach.people.loans.handlers.loan_rates_add",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanRateAdd"
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/CreateOrUpdateInterestRatesResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "rates:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Add loan rate",
        "tags": [
          "Rates"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/rates/{rateId}": {
      "delete": {
        "description": "This endpoint is used for removing a single `interest` or `promo` rate. The deletion of an\ninterest rate cannot lead to a gap in the loan where there is no reference rate.\n\nRates where setAtActivation is `true` can only be deleted with a special force permission.\n",
        "operationId": "peach.people.loans.handlers.loan_rates_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/rateId"
          },
          {
            "$ref": "#/components/parameters/caseFilter"
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "rates:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Remove loan rate",
        "tags": [
          "Rates"
        ]
      },
      "put": {
        "description": "This endpoint is used for updating a single `interest` or `promo` rate. (don't pass both in the same call). The updating of an\ninterest rate cannot lead to a gap in the loan where there is no reference interest rate.\n",
        "operationId": "peach.people.loans.handlers.loan_rates_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/rateId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanRateUpdate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CreateOrUpdateInterestRatesResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "rates:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update loan rate",
        "tags": [
          "Rates"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/refresh": {
      "post": {
        "description": "In the case that a loan is out of sync, the refresh endpoint will make sure that\nobligations, expected payments, and interest accrual is brought into sync.\n\nRefresh loan is only valid for the statuses of `active`, `accelerate`, `paidOff`, and `chargedOff`.\n",
        "operationId": "peach.people.loans.handlers.loan_refresh",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:refresh"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Refresh loan",
        "tags": [
          "Loans"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/refunds": {
      "get": {
        "description": "Returns a list of all prior refunds for the loan, as well as the remaining eligible refund amount.\n",
        "operationId": "peach.people.loans.handlers.loan_refunds_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanRefundCollection"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.refund:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get refunds",
        "tags": [
          "Installment Refunds"
        ]
      },
      "post": {
        "description": "The refund endpoint will execute a full or partial refund according to the `refundAmount` specified.\nA full refund is equal to the `amountFinancedAtOrigination`. An `atFaultParty` must also be specified,\nin order to trigger the corresponding accounting entries related to billing for the refund.\n",
        "operationId": "peach.people.loans.handlers.loan_refunds_post",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanRefund"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanRefundPost"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.refund:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create refund",
        "tags": [
          "Installment Refunds"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/refunds-v2": {
      "post": {
        "description": "The refund endpoint will execute a full or partial refund according to the `refundAmount` specified.\nThe total of all refunds cannot exceed the `amountFinanced` (or `principalAmount`)  passed at origination.\n\nA refund is applied in the following way:\n- The system first depletes any non-due principal.\n  This amount will be stored as `refundDetails.refundNonDuePrincipalAmount`.\n- If any refund amount is left to apply, the system will create a transaction of type service credit and `serviceCreditType=refund`.\n  This transaction will be applied on the loan using the \"payment waterfall\".\n  This amount will be stored as `refundDetails.refundTransactionAmount`.\n- After the system applies the `serviceCreditType=refund`, if there is any remaining unapplied\n  refund amount, it will be recorded as credit to the borrower (also called `reimbursementAmount` or amount owed to borrower.)\n- The system will replay the loan from the `refundDate`.\n\nPlease consider the following before creating refunds:\n\n- If you want to fully refund the loan including interest and fees, pass the following:\n  - `refundDate` equals the activation date.\n  - `refundAmount` equals the amount financed.\n  - `isRefundOriginationFees`, `isRefundLateFees` and `isRefundOtherFees` set to `true`.\n  - `isRefundMDR` and `isRefundDownPayment` - set these attributes depending on your policy.\n- If you want to partially refund the loan with prorated interest and/or fees, set the following. Prorated interest means\n  the system will lower the principal from the activation date and re-accrue interest.\n  - `refundDate` equals the activation date.\n  - `refundAmount` equals a partial refund amount.\n  - `isRefundOriginationFees`, `isRefundLateFees` and `isRefundOtherFees` - set these values depending on your policy.\n  - `isRefundMDR` - set this attribute depending on your policy.\n  - `isRefundDownPayment` - set to `false`. To remind: this attribute can be `true` only for a full refund.\n- If you want to partially refund the loan without prorating interest and/or fees prior the refund date, set the following:\n  - `refundDate` equals an effective date of the refund (or keep empty to indicate \"today\").\n  - `refundAmount` equals a partial refund amount.\n  - `isRefundOriginationFees`, `isRefundLateFees` and `isRefundOtherFees` set to `false`.\n  - `isRefundMDR` - set to `false`. To remind: this attribute can be `true` only if `refundDate` equals the activation date.\n  - `isRefundDownPayment` - set to `false`. To remind: this attribute can be `true` only for a full refund.\n",
        "operationId": "peach.people.loans.handlers.loan_refunds_v2_post",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanRefundV2"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanRefundV2Post"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.refund:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create refund v2",
        "tags": [
          "Installment Refunds"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/refunds/{loanRefundId}/cancel": {
      "post": {
        "description": "Cancel a refund.\n",
        "operationId": "peach.people.loans.handlers.loan_refunds_cancel",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/loanRefundId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanRefundCancel"
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/LoanRefund"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Loan Refund"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.refund:cancel"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Cancel refund",
        "tags": [
          "Installment Refunds"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/reimburse": {
      "post": {
        "description": "The reimburse endpoint should be used when the lender owes money to a borrower on a given loan.\nThe endpoint will execute a reimbursement according to the specified `reimbursementAmount`. If the `reimbursementAmount` is greater than the amount owed to the borrower, the system will not process the reimbursement and return an error. Funds are reimbursed to a specified payment instrument. The endpoint will update the ledger and create a new transaction.\n\nIf the loan type is installment, the loan must be in `paidOff` status to process reimbursement.\nIf the loan type is line of credit, the loan can be in `active`, `accelerated`, `chargedOff` or `paidOff` status to process reimbursement.\n\nIf `paymentInstrumentId` is `isExternal=true`, the payment method can be of any type (e.g. bank account, card, etc.)\nIf `paymentInstrumentId` is `isExternal=false` and Peach is processing payments (per company configuration), the payment method must be a bank account.\n\nPlease note for external reimbursements, the lender is responsible for transitioning the transaction status.\n",
        "operationId": "peach.people.loans.handlers.loan_reimburse",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanReimburse"
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Transaction"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "created"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:reimburse"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Reimburse",
        "tags": [
          "Loans"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/reopen": {
      "post": {
        "description": "Reopen a closed loan. This will allow new draws to be added to a line of credit. Draws in `paidOff` status will not be reopened.\n",
        "operationId": "peach.people.loans.handlers.loan_reopen",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "caseId": {
                    "description": "An identifier for an existing case.",
                    "type": "string"
                  },
                  "reopenReason": {
                    "description": "The reason the loan is being reopened.",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:reopen"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Reopen a closed loan",
        "tags": [
          "Loans"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/reverse-accelerate": {
      "post": {
        "description": "A loan must be in `accelerated` status to be reversed.\n\nThe reverse accelerate endpoint will reverse a loan in `accelerated` status, and roll back any acceleration-related\nlogic and accounting treatment.\n\nReverse acceleration triggers a replay of the loan starting from the day of acceleration as if the loan was in `active`\nstatus. This means if the acceleration occurred on day 90 of the loan, and the reverse acceleration is triggered on day\n100, the loan will be replayed as an `active` loan with interest accrual between days 90-100. If the reversal is\ntriggered on day 90 (the same day of the acceleration), no additional interest is accrued. The result of a reverse\nacceleration is a loan in `active` status.\n\nThe `accelerationDueWithin` and `chargeOffDueWithin` configurations of the loan are still in force. So a loan could\npossibly go back to `accelerated` or `chargedOff` status during the next day if the balance is not paid on the day a\nreversal was made.\n",
        "operationId": "peach.people.loans.handlers.loan_accelerate_reverse",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CaseId"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanReverseAccelerate"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:accelerate.reverse"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Reverse accelerate",
        "tags": [
          "Loans"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/reverse-charge-off": {
      "post": {
        "description": "A loan must be in `chargedOff` status to be reversed.\n\nThe reverse charge-off endpoint will reverse a loan in `chargedOff` status, and roll back any charge-off-related logic\nand accounting treatment.\n\nReverse charge-off triggers a replay of the loan starting from the day of charge off as if the loan was in `active`\nstatus. This means if the charge-off occurred on day 120 of the loan, and the reverse charge-off is triggered on day\n130, the loan will be replayed as an `active` loan with interest accrual between days 120-130. If the reversal is\ntriggered on day 120 (the same day of the charge-off), no additional interest is accrued. The result of a reverse\ncharge-off is a loan in `active` status.\n\nThe `chargeOffDueWithin` configurations of the loan is still in force. So a loan could possibly go back to `chargedOff`\nstatus during the next day if the balance is not paid on the day a reversal was made.\n",
        "operationId": "peach.people.loans.handlers.loan_charge_off_reverse",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CaseId"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanReverseChargeOff"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:chargeoff.reverse"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Reverse charge-off",
        "tags": [
          "Loans"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/schedule-options": {
      "get": {
        "description": "Internal endpoint used by the front end to get relevant information for loan schedule changes\n",
        "operationId": "peach.people.loans.handlers.loan_schedule_options_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "description": "If True, will return due date options for autopay (does not respect min due date buffer)",
            "in": "query",
            "name": "isAutopay",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/LoanScheduleOptions"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan.scheduleoptions:get"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get loan schedule options"
      }
    },
    "/people/{personId}/loans/{loanId}/statements": {
      "get": {
        "operationId": "peach.statements.handlers.get_statements",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "$ref": "#/components/parameters/statementYear"
          },
          {
            "$ref": "#/components/parameters/includeAllVersions"
          },
          {
            "$ref": "#/components/parameters/includeTestVersions"
          },
          {
            "description": "List of document descriptor IDs to filter by",
            "in": "query",
            "name": "documentDescriptorIds",
            "required": false,
            "schema": {
              "items": {
                "$ref": "#/components/schemas/AnyId"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/StatementCollection"
          }
        },
        "security": [
          {
            "oauth2": [
              "statement:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get statements",
        "tags": [
          "Statements"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/statements/{statementId}": {
      "put": {
        "operationId": "peach.statements.handlers.update_statement",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/statementPubId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "documentDescriptorId": {
                    "description": "Identifier for the document descriptor to be attached to the statement.\nThis value can only be updated if `isCreateAndSendPDF` is set to false on the loan type configuration.\n",
                    "type": "string"
                  }
                },
                "required": [
                  "documentDescriptorId"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Statement"
          }
        },
        "security": [
          {
            "oauth2": [
              "statement:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update statement",
        "tags": [
          "Statements"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/statements/{statementId}/details": {
      "get": {
        "operationId": "peach.statements.handlers.get_statement_details",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/statementPubId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/StatementDetails"
          }
        },
        "security": [
          {
            "oauth2": [
              "statement:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get statement details",
        "tags": [
          "Statements"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/transactions": {
      "get": {
        "operationId": "peach.transactions.handlers.loan_transactions_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/transactionStatuses"
          },
          {
            "$ref": "#/components/parameters/queryPaymentInstrumentId"
          },
          {
            "$ref": "#/components/parameters/parameters_isExternal"
          },
          {
            "$ref": "#/components/parameters/isVirtual"
          },
          {
            "$ref": "#/components/parameters/transactionType"
          },
          {
            "$ref": "#/components/parameters/paymentReason"
          },
          {
            "$ref": "#/components/parameters/retryOriginalTransactionId"
          },
          {
            "$ref": "#/components/parameters/serviceCreditTypes"
          },
          {
            "$ref": "#/components/parameters/toEffectiveDateGeneric"
          },
          {
            "$ref": "#/components/parameters/fromEffectiveDateGeneric"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/sortByForTransactions"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/TransactionCollection"
          }
        },
        "security": [
          {
            "oauth2": [
              "transaction:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get transactions",
        "tags": [
          "Transactions"
        ]
      },
      "post": {
        "description": "Create a transaction. Permissions required depend on the object type passed:\n\n| type             | permission                            |\n|------------------|---------------------------------------|\n| One Time Payment | `transaction:create.onetimepayment`   |\n| Service Credit   | `transaction:create.servicecredit`    |\n| Down Payment     | `transaction:create.downpayment`      |\n\nOnce a loan has been onboarded to Peach's platform, valid loan statuses for each transaction type are as follows:\n\n| type             | valid loan statuses                       |\n|------------------|-------------------------------------------|\n| One Time Payment | `active`, `accelerated`, or `chargedOff`* |\n| Service Credit   | `active`, `accelerated`, or `chargedOff`* |\n| Down Payment     | `active`                                  |\n\n*=`chargedOff` is only valid when the loan type configuration `paymentAllowedWhenChargedOff` is `true`.\n\nDuring migration while a loan is in `prepMigration`, valid loan statuses for each transaction type are as follows:\n\n| type             | valid loan statuses                      |\n|------------------|------------------------------------------|\n| One Time Payment | `originated`                             |\n| Service Credit   | `originated`                             |\n| Down Payment     | `active`                                 |\n",
        "operationId": "peach.transactions.handlers.transactions_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/syncGeneric"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTransaction"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Transaction"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Created"
          },
          "408": {
            "description": "Request Timeout"
          },
          "423": {
            "$ref": "#/components/responses/LockedResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "transaction:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create transaction",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/transactions/fail": {
      "post": {
        "description": "This endpoint allows you to fail multiple transactions in one call. The system will mark applicable transactions as \n`failed` and replay the loan once (starting from the earliest effective date of the provided transactions).\n",
        "operationId": "peach.transactions.handlers.transactions_fail_multiple",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/syncGeneric"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/FailMultipleTransactions"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/FailMultipleTransactions"
          }
        },
        "security": [
          {
            "oauth2": [
              "transaction:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Fail multiple transactions",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/transactions/{transactionId}": {
      "get": {
        "operationId": "peach.transactions.handlers.transactions_get_by_id",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/transactionId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Transaction"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "success"
          }
        },
        "security": [
          {
            "oauth2": [
              "transaction:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get transaction by ID",
        "tags": [
          "Transactions"
        ]
      },
      "put": {
        "operationId": "peach.transactions.handlers.transactions_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/transactionId"
          },
          {
            "$ref": "#/components/parameters/syncGeneric"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionUpdateExternal"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Transaction"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Updated"
          },
          "408": {
            "description": "Request Timeout"
          }
        },
        "security": [
          {
            "oauth2": [
              "transaction:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update transaction",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/transactions/{transactionId}/backdate": {
      "post": {
        "description": "Backdate a transaction. Can only be applied to transactions with `status=succeeded` or `status=pending`. Can be applied to payments or service credits.",
        "operationId": "peach.transactions.handlers.transaction_backdate",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/transactionId"
          },
          {
            "$ref": "#/components/parameters/syncGeneric"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "caseId": {
                    "description": "The identifier of an existing case.",
                    "type": "string"
                  },
                  "effectiveDate": {
                    "description": "New effective date for the transaction.",
                    "format": "date",
                    "type": "string"
                  },
                  "effectiveTimeOfDay": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/TimeOfDay"
                      },
                      {
                        "description": "The effective time of day on effectiveDate in the product timezone. If the time of day is not provided, the Peach system will set the time of\nday based on the following logic:\n\n- If backdated to the loan activation date, the system will set the timestamp to the activation timestamp plus a few seconds.\n- If backdated to a loan non-activation date, the system will set the timestamp to a few minutes after the loan accrued interest on the effectiveDate.\n",
                        "type": "object"
                      }
                    ]
                  }
                },
                "required": [
                  "effectiveDate"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Backdated"
          },
          "408": {
            "description": "Request Timeout"
          },
          "423": {
            "$ref": "#/components/responses/LockedResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "transaction:backdate"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Backdate transaction",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/transactions/{transactionId}/cancel": {
      "post": {
        "operationId": "peach.transactions.handlers.transaction_cancel",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/transactionId"
          },
          {
            "$ref": "#/components/parameters/transactionCancelReason"
          },
          {
            "$ref": "#/components/parameters/clearExternalIdGeneric"
          }
        ],
        "responses": {
          "204": {
            "description": "canceled"
          }
        },
        "security": [
          {
            "oauth2": [
              "transaction:cancel"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Cancel transaction",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/transactions/{transactionId}/chargebacks": {
      "get": {
        "operationId": "peach.transactions.chargebacks.handlers.get_chargebacks",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/transactionId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Chargebacks"
          }
        },
        "security": [
          {
            "oauth2": [
              "transaction:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get transaction chargebacks",
        "tags": [
          "Transactions"
        ]
      },
      "post": {
        "description": "In some cases a borrower might chargeback/dispute a payment that they made in the past. Only transactions in `succeeded` status can be charged back.\n\nIf the payment/transaction `isExternal=true`, the caller can post chargeback in two ways:\n 1. Update status of the transaction to `inDispute` or `chargeback` directly. The chargeback amount defaults to the full amount of the transaction.\n    The system will create a chargeback object automatically. This option is the easiest way to tell the system about a chargeback.\n 1. Create chargeback(s) via `Create transaction chargeback` endpoint. This option allows the caller to provide more details about the chargeback.\n    This option should be used for multiple partial chargebacks. Keep in mind that a transaction can have multiple chargebacks and reversals.\n\nIt's important to not mix the options above because it can create edge cases and confusion.\n\nIf the payment/transaction is `isExternal=false`, the caller cannot change the transaction status to `inDispute` or `chargeback` nor create chargeback(s)\nvia `Create transaction chargeback` endpoint. Chargebacks will be received directly from the payment processor.\n",
        "operationId": "peach.transactions.chargebacks.handlers.transaction_chargeback",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/transactionId"
          },
          {
            "$ref": "#/components/parameters/syncGeneric"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/ChargebackPost"
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/Chargeback"
          },
          "408": {
            "description": "Request Timeout"
          }
        },
        "security": [
          {
            "oauth2": [
              "transaction:chargeback"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create transaction chargeback",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/transactions/{transactionId}/chargebacks/{chargebackId}": {
      "get": {
        "operationId": "peach.transactions.chargebacks.handlers.get_chargeback_by_id",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/transactionId"
          },
          {
            "$ref": "#/components/parameters/chargebackId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Chargeback"
          }
        },
        "security": [
          {
            "oauth2": [
              "transaction:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get chargeback by ID",
        "tags": [
          "Transactions"
        ]
      },
      "put": {
        "operationId": "peach.transactions.chargebacks.handlers.update_chargeback",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/transactionId"
          },
          {
            "$ref": "#/components/parameters/chargebackId"
          },
          {
            "$ref": "#/components/parameters/syncGeneric"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/ChargebackPut"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Chargeback"
          }
        },
        "security": [
          {
            "oauth2": [
              "transaction:chargeback"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update chargeback",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/transactions/{transactionId}/reverse": {
      "post": {
        "operationId": "peach.transactions.handlers.transaction_reverse",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          },
          {
            "$ref": "#/components/parameters/transactionId"
          },
          {
            "$ref": "#/components/parameters/syncGeneric"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/ReversalPost"
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/Transaction"
          },
          "408": {
            "description": "Request Timeout"
          },
          "423": {
            "$ref": "#/components/responses/LockedResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "transaction:reverse"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Reverse transaction",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/people/{personId}/loans/{loanId}/unfreeze": {
      "post": {
        "description": "The Unfreeze endpoint will change the status of a `frozen` loan back to `active`, `accelerated` or `chargedOff`.\n\nIf the account was overdue before it was frozen, the system will use the earliest overdue due date (before the freeze date)\nto count the number of days overdue and might accelerate or charge off the account (based on the loan type configurations) as\npart of the unfreeze process. After the unfreeze process is completed, you can reverse the chargedOff status and take\nadditional actions such as posting a payment to make the account current.\n",
        "operationId": "peach.people.loans.handlers.loan_unfreeze",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/loanId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/LoanUnfreeze"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ExpectedPayments"
          },
          "423": {
            "$ref": "#/components/responses/LockedResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "loan:unfreeze"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Unfreeze loan",
        "tags": [
          "Loans"
        ]
      }
    },
    "/people/{personId}/notes": {
      "get": {
        "operationId": "peach.notes.handlers.list_borrower_notes",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/noteCategories"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "description": "Include archived notes into the result",
            "in": "query",
            "name": "includeArchived",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "$ref": "#/components/parameters/notePinned"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/NewPaginator"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/NoteResponse"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "note:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get notes",
        "tags": [
          "Notes"
        ]
      },
      "post": {
        "operationId": "peach.notes.handlers.create_borrower_note",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Note"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Note"
          }
        },
        "security": [
          {
            "oauth2": [
              "note:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create note",
        "tags": [
          "Notes"
        ]
      }
    },
    "/people/{personId}/notes/{noteId}": {
      "get": {
        "operationId": "peach.notes.handlers.get_borrower_note",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "description": "The note identifier.",
            "in": "path",
            "name": "noteId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Note"
          }
        },
        "security": [
          {
            "oauth2": [
              "note:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get note by ID",
        "tags": [
          "Notes"
        ]
      },
      "put": {
        "operationId": "peach.notes.handlers.update_borrower_note",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "description": "The note identifier.",
            "in": "path",
            "name": "noteId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Note"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Note"
          }
        },
        "security": [
          {
            "oauth2": [
              "note:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update note",
        "tags": [
          "Notes"
        ]
      }
    },
    "/people/{personId}/payment-instruments": {
      "get": {
        "operationId": "peach.payment_instruments.handlers.person_payment_instrument_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/parameters_isExternal"
          },
          {
            "$ref": "#/components/parameters/parameters_includeDeleted"
          },
          {
            "$ref": "#/components/parameters/showFullAccountNumber"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Paging"
                    },
                    {
                      "properties": {
                        "count": {
                          "format": "int32",
                          "type": "integer"
                        },
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/PaymentInstrumentGet"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "count",
                        "data"
                      ],
                      "type": "object"
                    }
                  ],
                  "title": "Payment Instruments"
                }
              }
            },
            "description": "Payment Instruments"
          }
        },
        "security": [
          {
            "oauth2": [
              "payment.instrument:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get payment instruments",
        "tags": [
          "Payment Instruments"
        ]
      },
      "post": {
        "description": "Create a payment instrument.\n\nWhen creating a payment instrument using the Plaid Account option, two flows are supported:\n\n1) Pass only `accessToken` and `accountIds`. This will create a payment instrument with `status`=`inactive`.\nYou can then use <a href=\"./payment-instruments/peach.payment_instruments.handlers.person_payment_instrument_update\">Update payment instrument</a>\nendpoint to set the `accountHolderType`, and `accountHolderName` fields, and set the `status` to `active`.\n\n2) Pass the required fields as well as `accountHolderType`, and `accountHolderName`. This will create a payment\ninstrument with `status`=`active`. The payment instrument will then be ready to use.\n\n*Note: This endpoint returns an array containing a single payment instrument to allow future support for Plaid multi-account select.*\n",
        "operationId": "peach.payment_instruments.handlers.person_payment_instrument_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/forcePaymentInstrument"
          },
          {
            "$ref": "#/components/parameters/sync"
          },
          {
            "$ref": "#/components/parameters/allowDuplicates"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentInstrumentPost"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Paging"
                    },
                    {
                      "properties": {
                        "count": {
                          "format": "int32",
                          "type": "integer"
                        },
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/PaymentInstrument"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "count",
                        "data"
                      ],
                      "type": "object"
                    }
                  ],
                  "title": "Payment Instruments"
                }
              }
            },
            "description": "Payment Instruments"
          },
          "409": {
            "description": "Duplicate instrument"
          }
        },
        "security": [
          {
            "oauth2": [
              "payment.instrument:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create payment instrument",
        "tags": [
          "Payment Instruments"
        ]
      }
    },
    "/people/{personId}/payment-instruments/{paymentInstrumentId}": {
      "delete": {
        "operationId": "peach.payment_instruments.handlers.person_payment_instrument_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/paymentInstrumentId"
          }
        ],
        "responses": {
          "204": {
            "description": "Payment Instrument Deleted"
          }
        },
        "security": [
          {
            "oauth2": [
              "payment.instrument:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete payment instrument",
        "tags": [
          "Payment Instruments"
        ]
      },
      "get": {
        "operationId": "peach.payment_instruments.handlers.person_payment_instrument_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/paymentInstrumentId"
          },
          {
            "$ref": "#/components/parameters/showFullAccountNumber"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PaymentInstrumentGet"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Payment Instrument"
          }
        },
        "security": [
          {
            "oauth2": [
              "payment.instrument:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get payment instrument by ID",
        "tags": [
          "Payment Instruments"
        ]
      },
      "put": {
        "operationId": "peach.payment_instruments.handlers.person_payment_instrument_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/paymentInstrumentId"
          },
          {
            "$ref": "#/components/parameters/sync"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PaymentInstrumentMutable"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Payment Instrument Updated"
          }
        },
        "security": [
          {
            "oauth2": [
              "payment.instrument:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update payment instrument",
        "tags": [
          "Payment Instruments"
        ]
      }
    },
    "/people/{personId}/payment-instruments/{paymentInstrumentId}/account-link": {
      "delete": {
        "description": "Retrieve the data vendor link details for this payment instrument.",
        "operationId": "peach.payment_instruments.handlers.account_link_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/paymentInstrumentId"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          }
        },
        "security": [
          {
            "oauth2": [
              "payment.instrument:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete account link",
        "tags": [
          "Payment Instruments"
        ]
      },
      "post": {
        "description": "Add a data vendor link for this payment instrument. If one is already present, it is replaced.",
        "operationId": "peach.payment_instruments.handlers.account_link_post",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/paymentInstrumentId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountLink"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AccountLink"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Account Link created"
          }
        },
        "security": [
          {
            "oauth2": [
              "payment.instrument:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create account link",
        "tags": [
          "Payment Instruments"
        ]
      },
      "put": {
        "description": "Update record keeping details about the account link. This can not be used to set up a new account link.",
        "operationId": "peach.payment_instruments.handlers.account_link_put",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/paymentInstrumentId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountLinkUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AccountLink"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Account Link updated"
          }
        },
        "security": [
          {
            "oauth2": [
              "payment.instrument:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update account link",
        "tags": [
          "Payment Instruments"
        ]
      }
    },
    "/people/{personId}/payment-instruments/{paymentInstrumentId}/balance": {
      "get": {
        "description": "Get stored balance data for the account associated with the payment instrument.",
        "operationId": "peach.payment_instruments.handlers.balances_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/paymentInstrumentId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AccountLinkBalanceEntry"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "payment.instrument:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get balance data",
        "tags": [
          "Payment Instruments"
        ]
      },
      "post": {
        "description": "Fetch updated balance data from the account link associated with this payment instrument.",
        "operationId": "peach.payment_instruments.handlers.balances_post",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/paymentInstrumentId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AccountLinkBalanceEntry"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "payment.instrument:update.balances"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Refresh balance data",
        "tags": [
          "Payment Instruments"
        ]
      }
    },
    "/people/{personId}/payment-instruments/{paymentInstrumentId}/verify": {
      "post": {
        "operationId": "peach.payment_instruments.handlers.person_payment_instrument_verify",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/paymentInstrumentId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "deposit1": {
                    "type": "integer"
                  },
                  "deposit2": {
                    "type": "integer"
                  }
                },
                "required": [
                  "deposit1",
                  "deposit2"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "payment.instrument:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Verify amounts of microdeposits",
        "tags": [
          "Payment Instruments"
        ]
      }
    },
    "/people/{personId}/verifications": {
      "get": {
        "description": "Retrieve all verifications—optionally filtering. Note that unlike most Peach \"get all\" endpoints,\nthe verifications get all endpoint returns items in a reverse chronological list, since almost\nall interesting verifications are those which happened in the recent past.\n",
        "operationId": "peach.people.borrower_verification.handlers.borrower_verification_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/verificationStatus"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/VerificationsPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "verification:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get verifications",
        "tags": [
          "Verifications"
        ]
      },
      "post": {
        "description": "Start a borrower verification session. Newly created verifications\ninclude randomly selected questions about the borrower. The human must attempt\nto provide correct answers to these questions in order for the borrower verification\nto be successful.\n\nTo check if a verification can be started now without actually starting a verification,\nadd the query parameter `dryRun=true` to the URL. If a verification could be started now\nreturn successful (`204`), otherwise return an error response with\n`nextVerificationOkAt` indicating when the next verification can start.\n",
        "operationId": "peach.people.borrower_verification.handlers.borrower_verification_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/dryRun"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/VerificationPost",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Verification"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Successfully started verification"
          },
          "204": {
            "description": "A verification can be started now—only occurs with `dryRun=true` parameter"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "A description of the error.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "A verification is not possible"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "properties": {
                            "nextVerificationOkAt": {
                              "format": "date-time",
                              "type": "string"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "A verification cannot be started now—try again later"
          }
        },
        "security": [
          {
            "oauth2": [
              "verification:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Start verification",
        "tags": [
          "Verifications"
        ]
      }
    },
    "/people/{personId}/verifications/{verificationId}": {
      "get": {
        "operationId": "peach.people.borrower_verification.handlers.borrower_verification_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/verificationId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Verification"
          }
        },
        "security": [
          {
            "oauth2": [
              "verification:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get verification by ID",
        "tags": [
          "Verifications"
        ]
      }
    },
    "/people/{personId}/verifications/{verificationId}/attempts": {
      "post": {
        "operationId": "peach.people.borrower_verification.handlers.borrower_verification_answer_attempt_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/personId"
          },
          {
            "$ref": "#/components/parameters/verificationId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/VerificationAttemptPost"
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/VerificationAttempt"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Created"
          }
        },
        "security": [
          {
            "oauth2": [
              "verification:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Answer verification questions",
        "tags": [
          "Verifications"
        ]
      }
    },
    "/promise-to-pay-plans": {
      "get": {
        "description": "Returns `Promise to Pay Plan`s for a given company.",
        "operationId": "peach.loans.promise_to_pays.handlers.get_promise_to_pay_plans_by_company",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/parameters-status"
          },
          {
            "$ref": "#/components/parameters/isOverdue"
          },
          {
            "$ref": "#/components/parameters/startDateAfter"
          },
          {
            "$ref": "#/components/parameters/endDateBefore"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PromisetoPayPlansPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "promise.to.pay.plan:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get Promise to Pay Plans for a company",
        "tags": [
          "Promise to Pay Plans"
        ]
      }
    },
    "/routing-numbers/{routingNumber}": {
      "get": {
        "operationId": "peach.routing_numbers.handlers.get_routing_number",
        "parameters": [
          {
            "description": "The routing number. Routing number's length is 9 digits.",
            "in": "path",
            "name": "routingNumber",
            "required": true,
            "schema": {
              "pattern": "\\d{9}",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "properties": {
                            "bankName": {
                              "description": "The financial institution name.",
                              "example": "PEACH BANK AND TRUST",
                              "type": "string"
                            },
                            "lastUpdatedDate": {
                              "description": "Peach system receives a list of valid routing numbers published by the Federal Reserve Bank once or twice a month.\nThis is the date when Peach received the latest update.\n",
                              "type": "string"
                            },
                            "routingNumber": {
                              "description": "The routing number. If the institution has received a new routing number from The Fed,\nthis may differ from the input routing number. Otherwise, it will match to the input routing number.\n",
                              "example": 12345678,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Bank Details"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "properties": {
                            "lastUpdatedDate": {
                              "description": "Peach system receives a list of valid routing numbers published by the Federal Reserve Bank once or twice a month.\nThis is the date when Peach received the latest update.\n",
                              "type": "string"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": [
              "routing.numbers:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get routing number details",
        "tags": [
          "Routing Numbers"
        ]
      }
    },
    "/supercases": {
      "get": {
        "operationId": "peach.supercases.handlers.supercase_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/supercaseSortBy"
          },
          {
            "$ref": "#/components/parameters/supercaseType"
          },
          {
            "$ref": "#/components/parameters/femaDisasterNumber"
          },
          {
            "$ref": "#/components/parameters/statusFilter"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/SupercasePagingResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List supercases",
        "tags": [
          "Supercases"
        ]
      },
      "post": {
        "description": "Creates a new supercase.",
        "operationId": "peach.supercases.handlers.supercase_create",
        "requestBody": {
          "$ref": "#/components/requestBodies/SupercasePost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/SupercaseResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create supercase",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/members-template.csv": {
      "get": {
        "operationId": "peach.supercases.handlers.supercase_members_template_csv",
        "responses": {
          "200": {
            "content": {
              "text/csv": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get supercase members.csv template",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}": {
      "get": {
        "operationId": "peach.supercases.handlers.supercase_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/SupercaseResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get supercase by ID",
        "tags": [
          "Supercases"
        ]
      },
      "put": {
        "operationId": "peach.supercases.handlers.supercase_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/SupercasePut"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/SupercaseResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update supercase",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/bulk-create-do-not-interact": {
      "post": {
        "operationId": "peach.supercases.handlers.supercase_bulk_create_dni",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/DoNotInteractCreate"
        },
        "responses": {
          "202": {
            "$ref": "#/components/responses/BulkOperationResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:bulk.create.dni"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create Do Not Interact instances on all subcases",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/bulk-delete-do-not-interact": {
      "post": {
        "operationId": "peach.supercases.handlers.supercase_bulk_delete_dni",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          }
        ],
        "responses": {
          "202": {
            "$ref": "#/components/responses/BulkOperationResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:bulk.delete.dni"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete supercase related Do Not Interact instances on all subcases",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/bulk-operations": {
      "get": {
        "operationId": "peach.supercases.handlers.supercase_bulk_operation_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/searchable"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          },
          {
            "$ref": "#/components/parameters/operationTypes"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/NewPaginator"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/SupercaseBulkOperation"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List bulk operations on this supercase",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/bulk-operations/search": {
      "get": {
        "operationId": "peach.supercases.handlers.supercase_bulk_operation_search",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/SupercaseBulkOperation"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Search bulk operations on this supercase",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/bulk-operations/{supercaseBulkOperationId}": {
      "get": {
        "operationId": "peach.supercases.handlers.supercase_bulk_operation_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/searchable"
          },
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          },
          {
            "$ref": "#/components/parameters/supercaseBulkOperationId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupercaseBulkOperation"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get supercase bulk operation by ID",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/bulk-operations/{supercaseBulkOperationId}/member-bulk-operation-results": {
      "get": {
        "description": "Returns a list of member bulk operation results for the supercase bulk operation. Each member bulk operation result represents a member that was affected by the operation.\n",
        "operationId": "peach.supercases.handlers.get_member_bulk_operation_results_by_operation",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          },
          {
            "$ref": "#/components/parameters/supercaseBulkOperationId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "description": "Filter by status. Possible values are success, failed, ineligible, notProcessed.\n",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": [
                "success",
                "failed",
                "ineligible",
                "notProcessed"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Paging"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/MemberBulkOperationResult"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get member bulk operation results by operation",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/bulk-operations/{supercaseBulkOperationId}/target-populations": {
      "get": {
        "description": "Returns a list of target populations for the supercase bulk operation. Each target population represents a set of members that will be affected by the operation.\n",
        "operationId": "peach.supercases.handlers.get_bulk_operation_target_populations",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          },
          {
            "$ref": "#/components/parameters/supercaseBulkOperationId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Paging"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/TargetPopulation"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get target populations for the supercase bulk operation",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/bulk-send": {
      "post": {
        "operationId": "peach.supercases.handlers.supercase_bulk_send_message",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/BulkSendRequestBody"
        },
        "responses": {
          "202": {
            "$ref": "#/components/responses/BulkOperationResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:bulk.send"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Send a message to the borrowers on all subcases",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/bulk-update": {
      "post": {
        "operationId": "peach.supercases.handlers.supercase_bulk_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CasePut"
        },
        "responses": {
          "202": {
            "$ref": "#/components/responses/BulkOperationResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:bulk.update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update all subcases",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/case-count": {
      "get": {
        "operationId": "peach.supercases.handlers.supercase_case_count",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "properties": {
                            "caseCount": {
                              "description": "The number of cases associated with the supercase",
                              "type": "integer"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get the number of cases associated with the supercase",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/documents": {
      "get": {
        "operationId": "peach.supercases.handlers.documents.get_supercase_documents",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          },
          {
            "description": "If `true`, returns a list of document objects, if `false` - a list of document IDs.\n",
            "in": "query",
            "name": "fetchDetails",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/SupercaseDocumentsResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get the list of supercase documents",
        "tags": [
          "Supercases"
        ]
      },
      "post": {
        "operationId": "peach.supercases.handlers.documents.add_supercase_documents",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/SupercaseDocumentList"
        },
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Associate documents with the supercase",
        "tags": [
          "Supercases"
        ]
      },
      "put": {
        "operationId": "peach.supercases.handlers.documents.set_supercase_documents",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/SupercaseDocumentList"
        },
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Set the documents associated with the supercase",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/global-notes": {
      "get": {
        "operationId": "peach.supercases.handlers.notes.global_note_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "description": "Include archived notes into the result",
            "in": "query",
            "name": "includeArchived",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "$ref": "#/components/parameters/notePinned"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/NewPaginator"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/NoteResponse"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get global notes",
        "tags": [
          "Supercases"
        ]
      },
      "post": {
        "operationId": "peach.supercases.handlers.notes.global_note_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Note"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Note"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create global note",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/global-notes/{noteId}": {
      "get": {
        "operationId": "peach.supercases.handlers.notes.global_note_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          },
          {
            "$ref": "#/components/parameters/noteId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Note"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get global note by ID",
        "tags": [
          "Supercases"
        ]
      },
      "put": {
        "operationId": "peach.supercases.handlers.notes.global_note_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          },
          {
            "$ref": "#/components/parameters/noteId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Note"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Note"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update global note",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/notes": {
      "get": {
        "operationId": "peach.supercases.handlers.notes.private_note_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          },
          {
            "description": "Include archived notes into the result",
            "in": "query",
            "name": "includeArchived",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "$ref": "#/components/parameters/notePinned"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/NewPaginator"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/NoteResponse"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get private notes",
        "tags": [
          "Supercases"
        ]
      },
      "post": {
        "operationId": "peach.supercases.handlers.notes.private_note_create",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Note"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Note"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create private note",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/notes/{noteId}": {
      "get": {
        "operationId": "peach.supercases.handlers.notes.private_note_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          },
          {
            "$ref": "#/components/parameters/noteId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Note"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get private note by ID",
        "tags": [
          "Supercases"
        ]
      },
      "put": {
        "operationId": "peach.supercases.handlers.notes.private_note_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          },
          {
            "$ref": "#/components/parameters/noteId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Note"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Note"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update private note",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/populations": {
      "get": {
        "operationId": "peach.supercases.handlers.population_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PopulationPagingResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List populations",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/populations/draft": {
      "get": {
        "operationId": "peach.supercases.handlers.draft_population_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PopulationResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get draft population",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/populations/draft/commit": {
      "post": {
        "description": "Creates subcases for all members of the draft population and moves the population to the committed state.\n",
        "operationId": "peach.supercases.handlers.draft_population_commit",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Commit draft population",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/populations/draft/members": {
      "get": {
        "operationId": "peach.supercases.handlers.draft_population_members_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PopulationMemberCollectionResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get the draft population members",
        "tags": [
          "Supercases"
        ]
      },
      "post": {
        "description": "Add to the current population membership the members in this request.\n",
        "operationId": "peach.supercases.handlers.draft_population_members_add",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          },
          {
            "$ref": "#/components/parameters/publishReviewTask"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/PopulationMemberCollectionPost"
        },
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Add to the draft population membership",
        "tags": [
          "Supercases"
        ]
      },
      "put": {
        "description": "Set the draft population membership to the population in this request.\n(Removing all current members if they exist.)\n",
        "operationId": "peach.supercases.handlers.draft_population_members_set",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          },
          {
            "$ref": "#/components/parameters/publishReviewTask"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/PopulationMemberCollectionPut"
        },
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Set the draft population membership",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/populations/draft/members.csv": {
      "get": {
        "operationId": "peach.supercases.handlers.draft_population_members_list_csv",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PopulationMemberCollectionCSVResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get membership as CSV",
        "tags": [
          "Supercases"
        ]
      },
      "post": {
        "description": "Add to the current population membership with the population in this request.\nFormat is a CSV document.\n",
        "operationId": "peach.supercases.handlers.draft_population_members_add_csv",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/PopulationMemberCollectionCSVPost"
        },
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Add to membership with CSV",
        "tags": [
          "Supercases"
        ]
      },
      "put": {
        "description": "Set the current population membership to the population in this request. (Removing\nall current members if they exist.) Format is a CSV document.\n",
        "operationId": "peach.supercases.handlers.draft_population_members_set_csv",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/PopulationMemberCollectionCSVPut"
        },
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Set membership with CSV",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/populations/members.csv": {
      "get": {
        "operationId": "peach.supercases.handlers.committed_members_list_csv",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PopulationMemberCollectionCSVResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get committed membership as CSV",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/populations/{populationId}": {
      "get": {
        "operationId": "peach.supercases.handlers.population_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          },
          {
            "$ref": "#/components/parameters/populationId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PopulationResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get population by ID",
        "tags": [
          "Supercases"
        ]
      },
      "put": {
        "description": "Update the population.",
        "operationId": "peach.supercases.handlers.population_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          },
          {
            "$ref": "#/components/parameters/populationId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/PopulationPut"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PopulationResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update population",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/populations/{populationId}/bulk-send": {
      "post": {
        "operationId": "peach.supercases.handlers.population_bulk_send_message",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          },
          {
            "$ref": "#/components/parameters/populationId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/BulkSendRequestBody"
        },
        "responses": {
          "202": {
            "$ref": "#/components/responses/BulkOperationResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:bulk.send"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Send a message to the borrowers on all subcases of the population",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/populations/{populationId}/members": {
      "get": {
        "operationId": "peach.supercases.handlers.population_members_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          },
          {
            "$ref": "#/components/parameters/populationId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PopulationMemberCollectionResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get population membership",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/supercases/{supercaseId}/populations/{populationId}/members.csv": {
      "get": {
        "operationId": "peach.supercases.handlers.population_members_list_csv",
        "parameters": [
          {
            "$ref": "#/components/parameters/components-parameters-supercaseId"
          },
          {
            "$ref": "#/components/parameters/populationId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PopulationMemberCollectionCSVResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "supercase:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get membership as CSV",
        "tags": [
          "Supercases"
        ]
      }
    },
    "/teams": {
      "get": {
        "description": "Get all teams in a company\n",
        "operationId": "peach.employees.handlers.teams.teams_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/TeamsPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "team:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get teams",
        "tags": [
          "Teams"
        ]
      },
      "post": {
        "description": "Create a new team\n",
        "operationId": "peach.employees.handlers.teams.teams_create",
        "requestBody": {
          "$ref": "#/components/requestBodies/TeamPost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Team"
          }
        },
        "security": [
          {
            "oauth2": [
              "team:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create team",
        "tags": [
          "Teams"
        ]
      }
    },
    "/teams/{teamId}": {
      "delete": {
        "description": "Delete team\n",
        "operationId": "peach.employees.handlers.teams.team_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/teamId"
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "team:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete team",
        "tags": [
          "Teams"
        ]
      },
      "get": {
        "description": "Get team by ID\n",
        "operationId": "peach.employees.handlers.teams.team_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/teamId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Team"
          }
        },
        "security": [
          {
            "oauth2": [
              "team:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get team by ID",
        "tags": [
          "Teams"
        ]
      },
      "put": {
        "description": "Update team\n",
        "operationId": "peach.employees.handlers.teams.team_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/teamId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/TeamPost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Team"
          }
        },
        "security": [
          {
            "oauth2": [
              "team:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update",
        "tags": [
          "Teams"
        ]
      }
    },
    "/twilio/tasktype-availability": {
      "get": {
        "operationId": "peach.twilio.taskrouter.handlers.get_tasktype_availability",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "properties": {
                            "availableByDefault": {
                              "type": "object"
                            },
                            "availableByUserConfig": {
                              "type": "object"
                            },
                            "permitted": {
                              "type": "object"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "taskrouter.task:receive"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get task availability",
        "tags": [
          "Tasks"
        ]
      },
      "put": {
        "operationId": "peach.twilio.taskrouter.handlers.update_tasktype_availability",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "availableByUserConfig": {
                    "type": "object"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "properties": {
                            "availableByDefault": {
                              "type": "object"
                            },
                            "availableByUserConfig": {
                              "type": "object"
                            },
                            "permitted": {
                              "type": "object"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "ok"
          }
        },
        "security": [
          {
            "oauth2": [
              "taskrouter.task:receive"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update task type availability",
        "tags": [
          "Tasks"
        ]
      }
    },
    "/users": {
      "get": {
        "operationId": "peach.users.handlers.users_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "$ref": "#/components/parameters/userTypeQuery"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/UsersPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "user:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get users",
        "tags": [
          "Users"
        ]
      },
      "post": {
        "description": "Creates a user.\n\n`authType.email` or `authType.phone` is required depending on company configuration.\n\n`authType.password` is required unless the company is configured to `OneTimeCodeEmail` or `OneTimeCodeText` in which case sends an empty string.\n",
        "operationId": "peach.users.handlers.user_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/User"
          }
        },
        "security": [
          {
            "oauth2": [
              "user:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create user\n",
        "tags": [
          "Users"
        ]
      }
    },
    "/users/{userId}": {
      "get": {
        "operationId": "peach.users.handlers.user_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/userId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/User"
          }
        },
        "security": [
          {
            "oauth2": [
              "user:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get user",
        "tags": [
          "Users"
        ]
      },
      "put": {
        "operationId": "peach.users.handlers.user_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/userId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/User"
          }
        },
        "security": [
          {
            "oauth2": [
              "user:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update user",
        "tags": [
          "Users"
        ]
      }
    },
    "/users/{userId}/auth": {
      "put": {
        "description": "Replace the user's authentication values from scratch. The\nauthentication type is derived from the company config.\n",
        "operationId": "peach.security.handlers.user_auth_replace",
        "parameters": [
          {
            "$ref": "#/components/parameters/userId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewAuth"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SingletonResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/UserAuth"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "user:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Replace user's auth based on configured company auth type",
        "tags": [
          "Auth"
        ]
      }
    },
    "/users/{userId}/permissions": {
      "get": {
        "description": "Given\n",
        "operationId": "peach.users.handlers.user_get_permissions",
        "parameters": [
          {
            "$ref": "#/components/parameters/userId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "user:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get user's current permissions",
        "tags": [
          "Roles"
        ]
      }
    },
    "/users/{userId}/roles": {
      "get": {
        "operationId": "peach.roles.handlers.user_role_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/userId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RolesPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "role:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get user roles",
        "tags": [
          "Roles"
        ]
      }
    },
    "/users/{userId}/roles/{roleId}": {
      "delete": {
        "operationId": "peach.roles.handlers.user_role_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/roleId"
          },
          {
            "$ref": "#/components/parameters/userId"
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "role:unassign"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Remove role from user",
        "tags": [
          "Roles"
        ]
      },
      "put": {
        "operationId": "peach.roles.handlers.user_role_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/roleId"
          },
          {
            "$ref": "#/components/parameters/userId"
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          }
        },
        "security": [
          {
            "oauth2": [
              "role:assign"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Add role to user",
        "tags": [
          "Roles"
        ]
      }
    },
    "/v2/communicator/templates": {
      "get": {
        "description": "List all Templates Versions for all Template Descriptors.\n",
        "operationId": "peach.communicator.handlers.list_template_versions_modern",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          },
          {
            "$ref": "#/components/parameters/includeContextVars"
          },
          {
            "$ref": "#/components/parameters/includeContents"
          },
          {
            "$ref": "#/components/parameters/subjectFilterQuery"
          },
          {
            "$ref": "#/components/parameters/parameters-channel"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Paging"
                    },
                    {
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/TemplateVersion"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "oauth2": [
              "communicator.template:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List all template versions (v2)",
        "tags": [
          "Templates"
        ]
      }
    },
    "/verification-questions": {
      "get": {
        "description": "Retrieve all the questions which are available for use with verification types—i.e., the question bank.\n",
        "operationId": "peach.borrower_verification.handlers.borrower_verification_questions_get_all",
        "responses": {
          "200": {
            "$ref": "#/components/responses/VerificationQuestionsPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "verification:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get questions",
        "tags": [
          "Verification Types"
        ]
      }
    },
    "/verification-types": {
      "get": {
        "operationId": "peach.borrower_verification.handlers.borrower_verification_types_get_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/VerificationTypesPaging"
          }
        },
        "security": [
          {
            "oauth2": [
              "verification-type:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get verification types",
        "tags": [
          "Verification Types"
        ]
      },
      "post": {
        "description": "Create a new borrower verification type.\n\nThis represents one configuration of\nhow to perform borrower verifications. Later, when starting a new borrower verification,\nyou can then specify a particular verification type to use. This done by `POST`-ing to the\n`/people/{personId}/verifications` endpoint with a body like:\n\n```json\n{\n  \"verificationTypeId\": \"VT-7RKX-OKQZ\"\n}\n```\n### Using with CRM App UI\n\nIn order to specify that the CRM application should make use a particular\nverification type you must set the company config value: `config.borrowerVerification.crmDefaultTypeId`\nto the ID of the verification type ID of the verification type you wish to use.\n\ne.g., `config.borrowerVerification.crmDefaultTypeId = \"VT-7RKX-OKQZ\"`\n",
        "operationId": "peach.borrower_verification.handlers.borrower_verification_types_create",
        "requestBody": {
          "$ref": "#/components/requestBodies/VerificationTypePost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/VerificationType"
          }
        },
        "security": [
          {
            "oauth2": [
              "verification-type:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create verification type",
        "tags": [
          "Verification Types"
        ]
      }
    },
    "/verification-types/{verificationTypeId}": {
      "get": {
        "operationId": "peach.borrower_verification.handlers.borrower_verification_types_get_one",
        "parameters": [
          {
            "$ref": "#/components/parameters/verificationTypeId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/VerificationType"
          }
        },
        "security": [
          {
            "oauth2": [
              "verification-type:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get verification type by ID",
        "tags": [
          "Verification Types"
        ]
      },
      "put": {
        "operationId": "peach.borrower_verification.handlers.borrower_verification_types_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/verificationTypeId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/VerificationTypePost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/VerificationType"
          }
        },
        "security": [
          {
            "oauth2": [
              "verification-type:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update verification type",
        "tags": [
          "Verification Types"
        ]
      }
    },
    "/webhooks": {
      "get": {
        "operationId": "peach.webhooks.handlers.webhooks_list",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/startingAfter"
          },
          {
            "$ref": "#/components/parameters/endingBefore"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookSubscriptionPagingResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "webhook.subscription:list"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get webhooks",
        "tags": [
          "Webhooks"
        ]
      },
      "post": {
        "description": "Creates a new webhook subscription.",
        "operationId": "peach.webhooks.handlers.webhook_create",
        "parameters": [],
        "requestBody": {
          "$ref": "#/components/requestBodies/WebhookSubscriptionPost"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookSubscriptionResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "webhook.subscription:create"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create webhook subscription",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/webhooks/{webhookSubscriptionId}": {
      "delete": {
        "operationId": "peach.webhooks.handlers.webhook_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/webhookSubscriptionId"
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "webhook.subscription:delete"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete webhook subscription",
        "tags": [
          "Webhooks"
        ]
      },
      "get": {
        "operationId": "peach.webhooks.handlers.webhook_get",
        "parameters": [
          {
            "$ref": "#/components/parameters/webhookSubscriptionId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookSubscriptionResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "webhook.subscription:read"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get webhook subscription by ID",
        "tags": [
          "Webhooks"
        ]
      },
      "put": {
        "operationId": "peach.webhooks.handlers.webhook_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/webhookSubscriptionId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/WebhookSubscriptionPut"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookSubscriptionResponse"
          }
        },
        "security": [
          {
            "oauth2": [
              "webhook.subscription:update"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Update webhook subscription",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/webhooks/{webhookSubscriptionId}/ping": {
      "post": {
        "operationId": "peach.webhooks.handlers.webhook_ping",
        "parameters": [
          {
            "$ref": "#/components/parameters/webhookSubscriptionId"
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "oauth2": [
              "webhook.subscription:ping"
            ]
          },
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Test a webhook with static payload.",
        "tags": [
          "Webhooks"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AnyApiError": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/InvalidInput"
          },
          {
            "$ref": "#/components/schemas/BadRequest"
          },
          {
            "$ref": "#/components/schemas/InvalidJSON"
          },
          {
            "$ref": "#/components/schemas/InvalidSpecificDays"
          },
          {
            "$ref": "#/components/schemas/InvalidPublicId"
          },
          {
            "$ref": "#/components/schemas/UnprocessableEntity"
          },
          {
            "$ref": "#/components/schemas/Unauthorized"
          },
          {
            "$ref": "#/components/schemas/Forbidden"
          },
          {
            "$ref": "#/components/schemas/NotFound"
          },
          {
            "$ref": "#/components/schemas/UrlNotDefined"
          },
          {
            "$ref": "#/components/schemas/TemplateDisabled"
          },
          {
            "$ref": "#/components/schemas/NoSuitableContact"
          },
          {
            "$ref": "#/components/schemas/UndefinedTemplateVariable"
          },
          {
            "$ref": "#/components/schemas/BadExternalServiceCredentials"
          },
          {
            "$ref": "#/components/schemas/TemplateSyntax"
          },
          {
            "$ref": "#/components/schemas/Duplicate"
          },
          {
            "$ref": "#/components/schemas/ConfigMismatch"
          },
          {
            "$ref": "#/components/schemas/CompanyConfigMismatch"
          },
          {
            "$ref": "#/components/schemas/LoanLocked"
          },
          {
            "$ref": "#/components/schemas/CardLocked"
          },
          {
            "$ref": "#/components/schemas/InternalServerError"
          },
          {
            "$ref": "#/components/schemas/ReadReplicaNotReady"
          },
          {
            "$ref": "#/components/schemas/Timeout"
          },
          {
            "$ref": "#/components/schemas/MinPaymentConfiguration"
          },
          {
            "$ref": "#/components/schemas/MigratedLoanReverseAccelerationOrChargeOff"
          },
          {
            "$ref": "#/components/schemas/RulesCodeSyntaxError"
          },
          {
            "$ref": "#/components/schemas/InactiveCompany"
          }
        ],
        "x-tags": [
          "Error"
        ]
      },
      "Paging": {
        "description": "Represents a base object for paged results.\n",
        "properties": {
          "count": {
            "description": "Total number of items in this result.",
            "readOnly": true,
            "type": "integer"
          },
          "status": {
            "description": "HTTP status code.",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "CaseEscalation": {
        "description": "Mark a case as needing special attention from a particular team or employee.\nOnly one of `escalatedTeamId` or `escalatedEmployeeId` may be specified\nat one time.\n\nIf neither `escalatedTeamId` nor `escalatedEmployeeId` are specified then the\nlatest escalation is canceled.\n",
        "properties": {
          "escalatedEmployeeId": {
            "description": "Escalate the case to the employee specified by this employee ID.",
            "nullable": true,
            "type": "string"
          },
          "escalatedTeamId": {
            "description": "Escalate the case to the team specified by this team ID.",
            "nullable": true,
            "type": "string"
          },
          "isUrgent": {
            "default": false,
            "description": "If `true` this escalation is urgent and tasks related to this case escalation\nshould jump to the front of the agents' queues.\n",
            "nullable": true,
            "type": "boolean"
          },
          "note": {
            "description": "Create a case note with this content explaining why\nthe escalation or de-escalation took place\n",
            "nullable": true,
            "type": "string"
          }
        },
        "title": "Case Escalation",
        "type": "object"
      },
      "CaseEscalationDetailed": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CaseEscalation"
          },
          {
            "properties": {
              "caseId": {
                "description": "The ID of the escalated case.",
                "type": "string"
              },
              "caseName": {
                "description": "The friendly name given to a case.",
                "nullable": true,
                "type": "string"
              },
              "escalationTargetName": {
                "description": "The name of the team or employee the escalation was assigned to.",
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "description": "A Case Escalation with additional details.\n",
        "title": "Detailed Case Escalation"
      },
      "LoanTypeId": {
        "properties": {
          "loanTypeId": {
            "description": "The loan type identifier. This is created specifically for each lender's loan product by Peach.",
            "type": "string"
          }
        },
        "title": "Predefined Loan Type",
        "type": "object"
      },
      "AddressBase": {
        "additionalProperties": false,
        "description": "The mailing address.\n",
        "properties": {
          "POBox": {
            "description": "Post Office Box",
            "nullable": true,
            "type": "string"
          },
          "addressLine1": {
            "description": "Address line 1.\n\nIf `company.allowPartialAddress=false`, then this field is required, else it is not required\n",
            "maxLength": 100,
            "type": "string"
          },
          "addressLine2": {
            "description": "Address line 2.",
            "maxLength": 100,
            "nullable": true,
            "type": "string"
          },
          "city": {
            "description": "City.",
            "type": "string"
          },
          "country": {
            "description": "Country. English short name according to\n[ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.\n",
            "type": "string"
          },
          "countyOrRegion": {
            "description": "County or region.",
            "nullable": true,
            "type": "string"
          },
          "object": {
            "default": "address",
            "enum": [
              "address"
            ],
            "readOnly": true,
            "type": "string"
          },
          "postalCode": {
            "description": "Postal code. Also known as ZIP code.",
            "type": "string"
          },
          "state": {
            "description": "State/Province. This is a required field if the country is US or CA.",
            "maxLength": 5,
            "nullable": true,
            "type": "string"
          },
          "timezone": {
            "description": "Timezone for the address.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "Address": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AddressBase"
          },
          {
            "required": [
              "country",
              "postalCode"
            ],
            "type": "object"
          }
        ]
      },
      "AdvanceDetails": {
        "description": "The details of advance.",
        "nullable": true,
        "properties": {
          "categoryId": {
            "description": "The category identifier of the advance.",
            "nullable": true,
            "type": "string"
          },
          "description": {
            "default": "Advance",
            "description": "The description of the advance. Normally shown in Borrower Portal and on statements. At least one of the attributes, `description`\nor `merchantName` must be passed.\n",
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "description": "The merchant identifier that the advance was used for.",
            "nullable": true,
            "type": "string"
          },
          "merchantName": {
            "description": "The merchant name that the advance was used for. At least one of the attributes, `description` or `merchantName` must be passed.",
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "description": "Store any type of key/value pairs in the form of a JSON dictionary.",
            "nullable": true,
            "type": "object"
          },
          "pointOfSaleType": {
            "description": "- `online` - the advance was made online on a website or in a mobile application.\n- `physical` - the advance was made in a store with a physical card or instrument.\n- `recurring` - the advance was made as part of a subscription service.\n",
            "enum": [
              "online",
              "physical",
              "recurring"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "TimeOfDay": {
        "properties": {
          "hour": {
            "description": "The hour. Value range is 0-23. 0=Midnight...23=11 PM.",
            "maximum": 23,
            "minimum": 0,
            "type": "integer"
          },
          "minute": {
            "description": "The minute. Value range is 0-59.",
            "maximum": 59,
            "minimum": 0,
            "type": "integer"
          },
          "second": {
            "default": 0,
            "description": "The second. Value range is 0-59.",
            "maximum": 59,
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "hour",
          "minute"
        ],
        "type": "object"
      },
      "externalId": {
        "description": "A lender's identifier for a resource.\n\nAfter the resource is successfully created, a lender can use the Peach assigned ID OR\nthe `externalId` identifiers to fetch the resource.\n\n### Fetching with `externalId`:\n\nTo fetch a resource using an `externalId`, you MUST use the prefix `ext-` in the URL.\n\nFor example, a loan with an external identifier of `ABCDE` would be referenced like `/api/people/BO-FAKE-IDNT/loans/ext-ABCDE`.\n\n### Creating with `externalId`:\n\nTo create a resource with an external identifer, you MUST NOT use the prefix `ext-`.\n\nFor example, if the external identifier should be `ABCDE`, then pass\n`{ externalId: \"ABCDE\", ... }` in the request body.\n",
        "maxLength": 200,
        "nullable": true,
        "type": "string"
      },
      "Advance": {
        "properties": {
          "advanceDate": {
            "description": "The date of the advance in the product timezone. The date cannot be in the past or greater than the last due date.\n - If the advance is created in `pending` or `settled` status, the advance will be recorded in the ledger with an effective timestamp of\n   the Create advance call.\n - If the advance is created in `scheduled` status, the advance will be recorded in the ledger only when the status changes to `pending` or `settled`.\n",
            "format": "date",
            "type": "string"
          },
          "advanceDetails": {
            "$ref": "#/components/schemas/AdvanceDetails"
          },
          "advanceTimeOfDay": {
            "$ref": "#/components/schemas/TimeOfDay",
            "description": "The time of day that the advance is entered into the ledger in the product timezone."
          },
          "amount": {
            "description": "The amount of advance. The amount must be positive.",
            "format": "float",
            "type": "number"
          },
          "canceledBy": {
            "description": "Identifier of the `User` who canceled the advance.",
            "readOnly": true,
            "type": "string"
          },
          "externalId": {
            "$ref": "#/components/schemas/externalId",
            "description": "The external unique identifier of the purchase."
          },
          "id": {
            "description": "The unique identifier of the purchase.",
            "readOnly": true,
            "type": "string"
          },
          "metadata": {
            "description": "Store any type of key/value pairs in the form of a JSON dictionary.",
            "type": "object"
          },
          "originalAmount": {
            "description": "The original amount of the advance. The amount must be positive.",
            "format": "float",
            "readOnly": true,
            "type": "number"
          },
          "status": {
            "default": "settled",
            "description": "- `scheduled` - the advance was scheduled in the future. If the advance status doesn't change to `pending`, `settled` or `canceled` on the advance due\n   date, the system will automatically cancel the advance on the following calendar day (aka change the status to `canceled`).\n\n   For example: An advance was `scheduled` for May 27, 2021. On May 28, 2021, the advance status was still `scheduled`. The system will cancel the advance.\n\n- `settled` - the advance was settled and/or funded. `settled` advances increase the loan balance.\n\n- `pending` - the advance is pending. `pending` advances increases the loan balance similar to `settled`. `pending` status is used mainly for visuals\n   and normally shown in Borrower Portal.\n\n- `canceled` - the advance was canceled. `canceled` advances reduce the draw balance. A new advance cannot be created in `canceled` status.\n",
            "enum": [
              "scheduled",
              "settled",
              "pending",
              "canceled"
            ],
            "type": "string"
          },
          "timestamps": {
            "properties": {
              "canceledAt": {
                "format": "date-time",
                "readOnly": true,
                "type": "string"
              },
              "createdAt": {
                "format": "date-time",
                "readOnly": true,
                "type": "string"
              },
              "updatedAt": {
                "format": "date-time",
                "readOnly": true,
                "type": "string"
              }
            },
            "readOnly": true,
            "type": "object"
          }
        },
        "title": "Advance",
        "type": "object"
      },
      "AdvanceSchedule": {
        "description": "The advance schedule of the loan. Total amount of the advances must be equal to `amountFinanced`. If `advanceSchedule` is passed,\nthe system will calculate the APR based on the special formula provided in\n[Appendix J](https://www.ecfr.gov/cgi-bin/text-idx?SID=747961e095035658cdddba8b09d30a6f&mc=true&node=pt12.9.1026&rgn=div5#ap12.9.1026.0000_0nbspnbspnbsp.j)\n(see examples of loans with multiple advances).\n",
        "items": {
          "allOf": [
            {
              "required": [
                "status",
                "amount",
                "advanceDate"
              ],
              "title": "Advance",
              "type": "object"
            },
            {
              "$ref": "#/components/schemas/Advance"
            }
          ]
        },
        "nullable": true,
        "type": "array"
      },
      "AmountFinanced": {
        "description": "The amount of principal on origination or draw.",
        "format": "float",
        "type": "number"
      },
      "BufferToPushOutSchedule": {
        "description": "The number of calendar days that will be added to the activation date. The resulting date will be used to push out\ndue dates as if the loan was activated on that date (activation date + buffer). Interest will still be accrued\nnormally from the activation date. Not valid for the singleTerm frequency.\n",
        "format": "float",
        "nullable": true,
        "type": "number"
      },
      "OriginationFeeAmount": {
        "default": 0,
        "description": "The origination fee amount.",
        "format": "float",
        "nullable": true,
        "type": "number"
      },
      "InstallmentPaymentFrequency": {
        "description": "The payment frequency of the loan.\n\n`weekly`, `everyTwoWeeks`, `twiceMonthly`, `monthly` - are recurring.\n\n`singleTerm` - a single term loan (aka non-recurring). It will create one period only with a desired \"duration\" of 30, 60, 90, 120, X calendar days or a specific date that should be passed in specificDays. For example [90].\n",
        "enum": [
          "weekly",
          "everyTwoWeeks",
          "twiceMonthly",
          "monthly",
          "singleTerm"
        ],
        "type": "string"
      },
      "PeriodicPaymentAmount": {
        "description": "The amortized periodic payment amount excluding fees. Keep in mind that the last payment\ncan be different from the `periodicPaymentAmount`.\n",
        "format": "float",
        "nullable": true,
        "title": "Periodic Payment Amount",
        "type": "number"
      },
      "PrincipalAmount": {
        "description": "The amount of principal at origination. Lenders should only pass this value if `principalAmount` is different from `amountFinanced`.\nIf a value is provided, the system will use `principalAmount` as the loan principal for interest calculations and amortization. The value should be greater than `amountFinanced`.\nIf a value is not provided, the system will:\n- Set `principalAmount = amountFinanced`.\n- Use `amountFinanced` as the loan principal for interest calculations and amortization.\n",
        "format": "float",
        "nullable": true,
        "type": "number"
      },
      "SpecificDays": {
        "description": "Specific days designate the day(s) that due dates will fall on. The allowed values for specific\nday(s) depends on the `paymentFrequency`.\n\n`weekly` - provide one number in the valid range 1-7. 1=Monday...7=Sunday.\n\nFor example: [1].\n\n`everyTwoWeeks` - provide two inputs. The first input (required) is an integer in the valid range 1-7. 1=Monday...7=Sunday.\n\nThe second input is a date that indicates when to start the cycle. If the second input is not passed, the system will default\nto the first valid start date based on the first input (the day of week passed in). If this date is provided then it can override\nthe minimum due date gap specified on the loan type.\n\nFor example: [1, \"2020-09-16\"].\n\n`twiceMonthly` - provide two numbers in the valid range 1-31. 1=first day of a month. Use 31 to\nindicate the last day of a month.\n\nFor example: [1, 15] or [15, 31].\n\n`monthly` - provide one or two numbers, depending on the loan type `periodCalculationType` configuration:\n  - If `periodCalculationType=dueDate`, then provide one number in the valid range 1-31. This is the recurring due date. 1=first\n  day of a month. Use 31 to indicate the last day of a month. For example: [1].\n  - If `periodCalculationType=statementDate`, then provide one number in the valid range 1-31. This is the recurring statement date.\n  1=first day of a month. Use 31 to indicate the last day of a month. For example: [1].\n  - If `periodCalculationType=fixedStatementAndDueDates`, then provide two numbers. First number represents a recurring statement\n  date and the valid range is 1-31. Use 31 to indicate the last day of a month. Second number represents a recurring due date and\n  the valid range is 1-28. Two numbers must be different. For example: [1, 15] - statements are on 1st and due dates are on 15th.\n  Notes:\n    - If the due date precedes the statement day, it's pushed to the next month. For example: [20, 10] and today is Oct 1, 2024. The\n    first statement date is Oct 20, 2024 and the first due date is Nov 10th.\n    - For February in non-leap years, if the statement date is ≥ 29 and the due date is 28, the statement date becomes March 1st.\n\n`singleTerm` - provide one number to indicate duration as a number of calendar days or provide a valid calendar date in the\nfuture. This option is only valid for use on the installment type and at loan origination.\nFor example: [90] or [\"2020-09-16\"].\n\nFor `weekly`, `everyTwoWeeks`, `twiceMonthly`, `monthly`:\nIf specificDays is left null, then the system will calculate due dates according to the paymentFrequency relative\nto the origination or activation date (or use existing specific days in the case of change due date).\n\nFor `singleTerm`:\nThe specificDays is mandatory.\n",
        "items": {
          "anyOf": [
            {
              "nullable": true,
              "type": "string"
            },
            {
              "type": "integer"
            }
          ]
        },
        "nullable": true,
        "type": "array"
      },
      "GenericInstallmentOriginationPropertiesBase": {
        "properties": {
          "advanceSchedule": {
            "$ref": "#/components/schemas/AdvanceSchedule"
          },
          "amountFinanced": {
            "$ref": "#/components/schemas/AmountFinanced"
          },
          "bufferToPushOutSchedule": {
            "$ref": "#/components/schemas/BufferToPushOutSchedule"
          },
          "fees": {
            "properties": {
              "originationFeeAmount": {
                "$ref": "#/components/schemas/OriginationFeeAmount"
              }
            },
            "type": "object"
          },
          "paymentFrequency": {
            "$ref": "#/components/schemas/InstallmentPaymentFrequency"
          },
          "periodicPaymentAmount": {
            "$ref": "#/components/schemas/PeriodicPaymentAmount"
          },
          "principalAmount": {
            "$ref": "#/components/schemas/PrincipalAmount"
          },
          "specificDays": {
            "$ref": "#/components/schemas/SpecificDays"
          },
          "startDate": {
            "description": "The start date of the loan or line of credit. Passing in `\"today\"` will set the field to today's date. In the case of the predefined loan type configuration, `\"today\"` will be converted to the date in the product timezone.",
            "format": "date",
            "type": "string"
          }
        },
        "required": [
          "startDate",
          "amountFinanced",
          "paymentFrequency"
        ],
        "type": "object"
      },
      "DiscountProgramIds": {
        "properties": {
          "discountProgramIds": {
            "description": "The identifiers of the discount programs provided at origination. A discount program\nhas to be created before it can be applied to loans.\n",
            "items": {
              "type": "integer"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "title": "Discount Program Ids",
        "type": "object"
      },
      "AtOriginationDynamicFees": {
        "description": "Dynamic fees details.\n\nApplicable if your loan type has dynamic fee(s) pre-defined and fee(s) amount are different among loans.\n\nAlso, for a Line of Credit, this configuration is used to set a dynamic fee type on a selected draw when a dynamic fee type is\nconfigured with `appliedToDraws` is `True` and `drawApplicationLogic` is `selectedDraws`.\n\nCurrently, the following dynamic fee types are supported: `purchaseFee`, `foreignTransactionFee`, `lateFee`, `serviceFee`, `nsfFee`.\nPlease note `lateFee` and `nsfFee` can only be configured on a single draw.\n",
        "items": {
          "properties": {
            "apiName": {
              "description": "The API name of the dynamic fee. For example: `lateFee` or `breatherFee`.\nIf applicable, `purchaseFee` or `foreignTransactionFee` `apiName` must be included, so it is applied to a specific draw.\nPlease confirm configs with the Peach team to ensure purchase fees are correctly configured.\n",
              "type": "string"
            },
            "feeAmount": {
              "description": "The fee amount that will be charged recurrently. Only required if the dynamic fee `amountLogic` is configured as\n`type=passedAtOrigination`. In all other cases, the system will calculate the fee based on pre-configured logic.\n",
              "format": "float",
              "nullable": true,
              "type": "number"
            },
            "feeCapAmount": {
              "description": "The maximum amount of the dynamic fee that can be charged over the life of the loan or draw. Only required if the dynamic fee\n`capLogic` is configured as `type=capPassedAtOrigination`. In all other cases, the system will calculate the fee based on pre-configured\nlogic.\n",
              "format": "float",
              "nullable": true,
              "type": "number"
            }
          },
          "type": "object"
        },
        "nullable": true,
        "type": "array"
      },
      "ServiceFee": {
        "properties": {
          "fees": {
            "properties": {
              "dynamicFees": {
                "$ref": "#/components/schemas/AtOriginationDynamicFees"
              },
              "serviceFeeAmount": {
                "description": "**DEPRECATED ATTRIBUTE** Use `dynamicFees.feeAmount`.**\n\nThe service fee amount that will be charged recurrently. Only required if the service fee `amountLogic` is configured as\n`type=passedAtOrigination`. In all other cases, the system will calculate the fee based on pre-configured logic.\n",
                "format": "float",
                "type": "number"
              },
              "serviceFeeCapAmount": {
                "description": "**DEPRECATED ATTRIBUTE** Use `dynamicFees.feeCapAmount`.**\n\nThe maximum amount of the service fee that can be charged over the life of the loan or draw. Only required if the service fee\n`capLogic` is configured as `type=capPassedAtOrigination`. In all other cases, the system will calculate the fee based on pre-configured\nlogic.\n",
                "format": "float",
                "type": "number"
              }
            },
            "type": "object"
          }
        },
        "title": "Service Fee Origination Terms",
        "type": "object"
      },
      "PredefinedInstallmentLoanAtOriginationBase": {
        "allOf": [
          {
            "properties": {
              "address": {
                "$ref": "#/components/schemas/Address"
              },
              "personAddressId": {
                "description": "This is the existing identifier of a borrower's address contact information\n(Peach's unique or lender's external identifier). If passed during origination,\nthe address will be stored on the loan object as a reference. This field, or the\nmutually exclusive `personAddress` field containing an address directly, is\nrequired.\n",
                "pattern": "^ext-|^[A-Z]{2}-[A-Z0-9]+-[A-Z0-9]+|^\\d+$",
                "type": "string",
                "writeOnly": true
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/GenericInstallmentOriginationPropertiesBase"
          },
          {
            "$ref": "#/components/schemas/DiscountProgramIds"
          },
          {
            "$ref": "#/components/schemas/ServiceFee"
          }
        ]
      },
      "LoanDuration": {
        "description": "The duration of the loan as a number of `paymentFrequency` periods.\nFor example:\n- if `paymentFrequency=monthly` and `duration=6`, it's a loan with 6 months duration and will have 6 due dates.\n- if `paymentFrequency=weekly` and `duration=24`, it's a loan with 24 weeks duration and will have 24 due dates.\n",
        "title": "Duration of a Loan",
        "type": "integer"
      },
      "LoanInterestRatesAtOrigination": {
        "description": "Interest rates for the loan or the draw. Can be a single interest rate for the entire duration of the loan/draw.\nOr, it can be multiple interest rates for partial periods of the loan/draw. If draw-specific rates are not passed,\nthe draw will use the LOC rates.\n",
        "items": {
          "properties": {
            "days": {
              "description": "Number of calendar days the interest rate applies to. An entry with `days: null` is required\nat the end of the list to indicate that the interest rate applies to the end of the loan duration.\nFor example:\n\n`{\"days\": 30, \"rate\": 0.1},`\n\n`{\"days\": 60, \"rate\": 0.2},`\n\n`{\"days\": null, \"rate\": 0.25}`\n\nThe loan will accrue interest of 10% for the first 30 days. Between days 31-90\nthe loan will accrue interest of 20%. From day 91 until the end, the loan will accrue\ninterest of 25%.\n",
              "nullable": true,
              "type": "integer"
            },
            "interestType": {
              "default": "absolute",
              "description": "The interest type. The interest type cannot be changed after the loan or draw status changes to `originated` and onward.\n\n`absolute` - interest rates defined as `absolute` will use the value as provided here without adding the Index Interest Rate.\n  - Negative interest `rate` value is not allowed.\n  - If the provided `rate` is outside of the range defined on the loan type, the system will accept the `rate` but will return a warning in the response's object `ratesValidation`.\n\n`spread` - interest rates defined as `spread` will calculate an absolute rate by adding the relative loan rate (aka spread)\nprovided in the `rate` attribute to the Index Interest Rate effective on the date the interest is accrued.\nIn case the Index Interest Rate is not set, the system will assume that the Index Interest Rate value is zero on the date the interest is accrued.\n  - Negative interest spread `rate` value is allowed, but the system will default to zero if the addition of the Index Interest Rate still results in a negative rate.\n  - If the calculated absolute rate, `rate` (aka spread) plus Index Interest Rate, is outside of the range defined on the loan type, the system will accept the `rate` but will return a warning in the response's object `ratesValidation`.\n",
              "enum": [
                "absolute",
                "spread"
              ],
              "type": "string"
            },
            "rate": {
              "description": "The annual interest rate for the period defined. The format is decimal.\nFor example, 0.01 is a 1% annual rate, 0.2 is a 20% annual rate.\n",
              "format": "float",
              "type": "number"
            }
          },
          "required": [
            "days",
            "rate"
          ],
          "type": "object"
        },
        "type": "array"
      },
      "LoanPromoRatesAtOrigination": {
        "description": "The promotional interest rates (aka rate discounts) for the loan or the draw.\nCan be a single promo rate for the entire duration of the loan/draw.\nOr, it can be multiple promo rates for partial periods of the loan/draw.\n\nFor example, if the `interestRate` is 20% for the first 90 days and the `promoRate` has value\n5% for 30 days, then the effective rate for the first 30 days is 15%.\n\nThe promo rates are unconditional and will be applied regardless of the loan status.\n",
        "items": {
          "properties": {
            "days": {
              "description": "Number of calendar days the promo rate applies to. Use `null` to indicate that\nthe promo rate applies to the end of the loan duration.\nFor example:\n\n`{\"days\": 30 ,\"rate\": 0.1},`\n\n`{\"days\": null, \"rate\": 0.01}`\n\nThe loan will receive interest discount of 10% for the first 30 days.\nFrom day 31 until the end, the loan will receive interest discount of 1%.\n",
              "nullable": true,
              "type": "integer"
            },
            "rate": {
              "description": "The annual promo rate for the period defined. Loans cannot accrue negative interest rate.\nIf the promo rate is greater than the interest rate, a loan will accrue 0% interest rate.\nThe format is decimal. For example, 0.01 is a 1% annual rate, 0.15 is a 15% annual rate.\n",
              "format": "float",
              "type": "number"
            }
          },
          "type": "object"
        },
        "nullable": true,
        "type": "array"
      },
      "TotalInterestCapAmount": {
        "description": "The maximum amount of interest the borrower will ever pay. If not applicable, set to `null`.",
        "format": "float",
        "nullable": true,
        "title": "Total Interest Cap Amount",
        "type": "number"
      },
      "GenericInstallmentOriginationPropertiesRates": {
        "properties": {
          "duration": {
            "$ref": "#/components/schemas/LoanDuration"
          },
          "interestRates": {
            "$ref": "#/components/schemas/LoanInterestRatesAtOrigination"
          },
          "promoRates": {
            "$ref": "#/components/schemas/LoanPromoRatesAtOrigination"
          },
          "totalInterestCapAmount": {
            "$ref": "#/components/schemas/TotalInterestCapAmount"
          }
        },
        "required": [
          "duration",
          "interestRates"
        ],
        "type": "object"
      },
      "PredefinedInstallmentLoanAtOrigination": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PredefinedInstallmentLoanAtOriginationBase"
          },
          {
            "$ref": "#/components/schemas/GenericInstallmentOriginationPropertiesRates"
          }
        ]
      },
      "predefinedInstallmentLoanProperties": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanTypeId"
          },
          {
            "properties": {
              "atOrigination": {
                "$ref": "#/components/schemas/PredefinedInstallmentLoanAtOrigination"
              }
            },
            "required": [
              "atOrigination",
              "loanTypeId"
            ],
            "type": "object"
          }
        ],
        "title": "Predefined Installment Loan"
      },
      "LoanId": {
        "properties": {
          "loanId": {
            "description": "An identifier of a loan for which to track interactions\n",
            "type": "string"
          }
        },
        "title": "Loan ID",
        "type": "object"
      },
      "LOCPaymentFrequency": {
        "description": "The frequency of the due dates schedule. For line of credit, 'weekly' is not allowed.",
        "enum": [
          "everyTwoWeeks",
          "twiceMonthly",
          "monthly"
        ],
        "type": "string"
      },
      "GenericLOCOriginationProperties": {
        "properties": {
          "amountFinanced": {
            "$ref": "#/components/schemas/AmountFinanced"
          },
          "bufferToPushOutSchedule": {
            "$ref": "#/components/schemas/BufferToPushOutSchedule"
          },
          "fees": {
            "properties": {
              "originationFeeAmount": {
                "$ref": "#/components/schemas/OriginationFeeAmount"
              }
            },
            "type": "object"
          },
          "interestRates": {
            "$ref": "#/components/schemas/LoanInterestRatesAtOrigination"
          },
          "paymentFrequency": {
            "$ref": "#/components/schemas/LOCPaymentFrequency"
          },
          "promoRates": {
            "$ref": "#/components/schemas/LoanPromoRatesAtOrigination"
          },
          "specificDays": {
            "$ref": "#/components/schemas/SpecificDays"
          },
          "startDate": {
            "description": "The start date of the loan or line of credit. Passing in `\"today\"` will set the field to today's date. In the case of the predefined loan type configuration, `\"today\"` will be converted to the date in the product timezone.",
            "format": "date",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PersonAddressId": {
        "properties": {
          "personAddressId": {
            "description": "The address where a loan was originated. If an address was already created in Peach's system,\na lender can pass the borrower's contact information identifier. (Peach's unique or lender's\nexternal identifier). Alternatively, the lender can provide address details in the\n`personAddressAtOrigination` attribute.\n",
            "nullable": true,
            "pattern": "^ext-|^[A-Z]{2}-[A-Z0-9]+-[A-Z0-9]+|^\\d+$",
            "type": "string",
            "writeOnly": true
          }
        },
        "title": "Address where a loan was originated.",
        "type": "object",
        "writeOnly": true
      },
      "DrawProperties": {
        "properties": {
          "drawDuration": {
            "description": "The duration of the draw as a number of `dueDatesFrequency` periods.\nFor example:\n- if `dueDatesFrequency=monthly` and `duration=6`, it's a draw with 6 months duration and will have 6 due dates.\n",
            "type": "integer"
          },
          "drawStartDate": {
            "description": "The draw start date. Passing in `\"today\"` will set the field to today's date. In the case of the predefined loan type configuration, `\"today\"` will be converted to the date in the product timezone.",
            "format": "date",
            "type": "string"
          },
          "fees": {
            "properties": {
              "drawFeeAmount": {
                "default": 0,
                "description": "The draw fee amount.",
                "format": "float",
                "type": "number"
              }
            },
            "type": "object"
          },
          "paymentFrequency": {
            "$ref": "#/components/schemas/LOCPaymentFrequency"
          }
        },
        "type": "object"
      },
      "predefinedLineOfCreditLoanProperties": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanTypeId"
          },
          {
            "$ref": "#/components/schemas/LoanId"
          },
          {
            "properties": {
              "atOrigination": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/GenericLOCOriginationProperties"
                  },
                  {
                    "$ref": "#/components/schemas/PersonAddressId"
                  },
                  {
                    "properties": {
                      "address": {
                        "$ref": "#/components/schemas/Address"
                      }
                    },
                    "type": "object"
                  },
                  {
                    "$ref": "#/components/schemas/DiscountProgramIds"
                  },
                  {
                    "$ref": "#/components/schemas/DrawProperties"
                  },
                  {
                    "$ref": "#/components/schemas/ServiceFee"
                  }
                ],
                "required": [
                  "amountFinanced",
                  "drawDuration",
                  "drawStartDate"
                ]
              }
            },
            "required": [
              "atOrigination"
            ],
            "type": "object"
          }
        ],
        "title": "Predefined Line Of Credit"
      },
      "AmortUtilPeriodCalculationType": {
        "properties": {
          "periodCalculationType": {
            "default": "dueDate",
            "description": "`dueDate` - this configuration allows borrowers to have the same due date every month\n(for example, the 15th, 28th, or the last day of every month). In this configuration,\nthe statement date is calculated as an offset from the dueDate and might be a different day of the month every period.\nThe system will calculate the first period using the dueDate in reference to the following\nattributes: `dueDateType`, `dueDateAdjustment`, `atOrigination.paymentFrequency`, `atOrigination.specificDays` and\n`atOrigination.bufferToPushOutSchedule`. The subsequent periods are calculated as recurring due dates.\nUsing the calculated `dueDate` as an \"anchor\", the first `statementDate` will then be calculated as a\nnegative \"offset\" from the first due date. The \"offset\" is represented as a number of calendar days based on\nloan type `locStatementCreationDaysOffset` configuration.\n\n`statementDate` - this configuration allows borrowers to have the same statement date every month\n(for example, the 15th, 28th, or the last day of every month). In this configuration,\nthe due date might be a different day of the month every period.\nThe system will calculate the first period using the `statementDate` as an \"anchor\" and take the following attributes\ninto account: `atOrigination.paymentFrequency`, `atOrigination.specificDays` and `atOrigination.bufferToPushOutSchedule`.\nThe statement date can only be a calendar day, and it cannot be forced as a business day. Once the statement date is set,\nthe system will calculate the first due date based on the `dueDateType` and `dueDateAdjustment` attributes.\nThe first due date will be calculated as a positive \"offset\" from the first statement date.\nIf the `dueDateType=business`, then we might need to adjust the due date. The \"offset\" is represented as\nnumber of calendar days based on the loan type's `locStatementCreationDaysOffset` configuration.\nThe following periods are calculated as recurring statement dates (similar to the first period).\nOnly applies to line of credit, not installment loans.\n",
            "enum": [
              "dueDate",
              "statementDate"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "AccrualMethodWithoutCompoundWithFees": {
        "default": "simple",
        "description": "`simple` - the system will accrue interest on outstanding principal buckets/balances only.\n\n`compound` - the system will accrue interest on outstanding principal and interest buckets/balances.\n",
        "enum": [
          "simple",
          "compound"
        ],
        "type": "string"
      },
      "DueDatesGap": {
        "nullable": true,
        "properties": {
          "everyTwoWeeks": {
            "properties": {
              "max": {
                "default": 21,
                "type": "integer"
              },
              "min": {
                "default": 7,
                "type": "integer"
              }
            },
            "type": "object"
          },
          "monthly": {
            "properties": {
              "max": {
                "default": 46,
                "type": "integer"
              },
              "min": {
                "default": 10,
                "type": "integer"
              }
            },
            "type": "object"
          },
          "singleTerm": {
            "description": "Valid onlyfor installment loans.",
            "properties": {
              "max": {
                "default": 365,
                "type": "integer"
              },
              "min": {
                "default": 10,
                "type": "integer"
              }
            },
            "type": "object"
          },
          "twiceMonthly": {
            "properties": {
              "max": {
                "default": 23,
                "type": "integer"
              },
              "min": {
                "default": 7,
                "type": "integer"
              }
            },
            "type": "object"
          },
          "weekly": {
            "properties": {
              "max": {
                "default": 10,
                "type": "integer"
              },
              "min": {
                "default": 4,
                "type": "integer"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "FeeChargeLogic": {
        "default": "onTopPeriodicPayment",
        "description": "Indicates how to allow the fee.\n\n`onTopPeriodicPayment` - the fee will be added on top of the upcoming amortized payment. It means that the upcoming\npayment will be higher than others.\nFor example: first payment amount is $50 periodic payment plus $10 origination fee, total of $60. Second and onward payments' amount is $50.\n\n`blendWithPeriodicPayment` - the fee will part of the upcoming periodic payment. It means that all expected payments\nwill be equal (except for the last one.)\nFor example: first payment amount is $50, $10 of which is the origination fee and $40 is amortized payment. Second and onward payments' amount is $50.\n\n`chargedAtOrigination` - the fee was charged at time of the origination. The fee will not be allocated to future amortized payments.\n",
        "enum": [
          "onTopPeriodicPayment",
          "blendWithPeriodicPayment",
          "chargedAtOrigination"
        ],
        "nullable": true,
        "type": "string"
      },
      "GenericLoanConfigProperties": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AmortUtilPeriodCalculationType"
          },
          {
            "properties": {
              "accrualMethod": {
                "$ref": "#/components/schemas/AccrualMethodWithoutCompoundWithFees"
              },
              "dailyInterestCalculationMethod": {
                "default": 365,
                "description": "`360` - this loan amortization method assumes that there are 360 days a year and 30 days in each month.\nThe daily interest rates are calculated by taking the annual interest rate and dividing it by 360. This value\nmust be used if `periodType=fixed.`\n\n`365` - this loan amortization method assumes that there are 365 days a year and actual number of days between periods.\nThe daily interest rates are calculated by taking the annual interest rate and dividing it by 365.\n",
                "enum": [
                  360,
                  365
                ],
                "nullable": true,
                "type": "integer"
              },
              "dueDateAdjustment": {
                "default": "backward",
                "description": "When a due date falls on non-business date, the due date is moved `backward` or `forward` until it falls on\nthe closest business date. For example, a due date falls on Sunday the 06/16/2019. If `dueDateAdjustment=backward`,\nthe due date will be adjusted to 06/14/2019. If `dueDateAdjustment=forward`, the due date will be adjusted to 06/17/2019.\n",
                "enum": [
                  "backward",
                  "forward"
                ],
                "nullable": true,
                "type": "string"
              },
              "dueDateType": {
                "default": "business",
                "description": "`business` - means that due dates must fall on business date only. If a due date falls on non-business date,\nthe due dates will be adjusted in `dueDateAdjustment` direction.\n\n`calendar` - means that due dates can fall on any dates.\n",
                "enum": [
                  "business",
                  "calendar"
                ],
                "nullable": true,
                "type": "string"
              },
              "gapBetweenDueDates": {
                "$ref": "#/components/schemas/DueDatesGap"
              },
              "originationFeeAPRCalcOverride": {
                "default": "noOverride",
                "description": "If `noOverride` the APR will be calculated as if the origination fee will be calculated per the\n`originationFeeChargeLogic`. If `atOrigination` the APR will be calculated as if origination fee\nwas collected at origination regardless of the `originationFeeChargeLogic`.\n",
                "enum": [
                  "noOverride",
                  "atOrigination"
                ],
                "type": "string"
              },
              "originationFeeChargeLogic": {
                "$ref": "#/components/schemas/FeeChargeLogic"
              }
            },
            "type": "object"
          }
        ]
      },
      "AmortizationMethod": {
        "default": "equalPayments",
        "description": "Loan amortization method.\n\n`equalPayments` - the system will amortize the loan or draw making recurring payments equal (except maybe for the last payment).\nMost installment loans are expected to use this method.\n\n`interestPaymentsBalloonPrincipal` - the system will amortize the loan or draw making recurring payments equal to interest only\nand the last payment will include the entire principal. Keep in mind that if you set `interest.periodAccrualDurationType=actual`,\nthe recurring payment amounts will be different every period for monthly and twice monthly frequencies. This is because a month\ncan have 28, 29, 30 or 31 days and interest accrued will vary based on the number of days in the month.\n\nThere are additional limitations to be aware for `interestPaymentsBalloonPrincipal`. For installment loans, Autopay can only be\naligned to due dates. It means that `autoPay.allowedFrequency.isDueDatesAvailable` must be set to `false`. This way the system\nwill only allow Autopay to be aligned to the loan frequency and due dates.\n",
        "enum": [
          "equalPayments",
          "interestPaymentsBalloonPrincipal",
          "custom"
        ],
        "type": "string"
      },
      "LoanAssetType": {
        "description": "The generic asset types that are supported.",
        "enum": [
          "personalClosedEndUnsecured",
          "personalOpenEndUnsecured",
          "personalClosedEndSecured",
          "personalOpenEndSecured",
          "motorMVRISC",
          "motorDirect",
          "motorLease",
          "businessClosedEndUnsecured",
          "businessOpenEndUnsecured",
          "businessClosedEndSecured",
          "businessOpenEndSecured"
        ],
        "type": "string"
      },
      "GenericInstallmentOriginationProperties": {
        "allOf": [
          {
            "$ref": "#/components/schemas/GenericInstallmentOriginationPropertiesBase"
          },
          {
            "$ref": "#/components/schemas/GenericInstallmentOriginationPropertiesRates"
          }
        ]
      },
      "installmentLoanProperties": {
        "allOf": [
          {
            "$ref": "#/components/schemas/GenericLoanConfigProperties"
          },
          {
            "properties": {
              "amortizationMethod": {
                "$ref": "#/components/schemas/AmortizationMethod"
              },
              "assetType": {
                "$ref": "#/components/schemas/LoanAssetType",
                "readOnly": true
              },
              "atOrigination": {
                "$ref": "#/components/schemas/GenericInstallmentOriginationProperties"
              },
              "maxAPR": {
                "description": "Indicates whether the loan has a maximum APR\n",
                "format": "float",
                "nullable": true,
                "type": "number"
              },
              "periodAccrualDurationType": {
                "default": "actual",
                "description": "`fixed` - each period is assumed to be fixed number of calendar days.\nFor `monthly` frequency we assume 30 days between any two consecutive due dates.\nFor `twiceMonthly` frequency we assume 15 days between any two consecutive due dates.\nFor `overyTwoWeeks` frequency we assume 14 days between any two consecutive due dates.\nFor `weekly` frequency we assume 7 days between any two consecutive due dates.\n\n`actual` - we calculate actual number of days in a period. For example, for `monthly` frequency\nnumber days in a period can be 28, 29, 30 or 31.\n\nFor line of credit we only support `actual`.\n",
                "enum": [
                  "fixed",
                  "actual"
                ],
                "nullable": true,
                "type": "string"
              },
              "periodType": {
                "default": "periodEnd",
                "enum": [
                  "periodBegin",
                  "periodEnd"
                ],
                "type": "string"
              },
              "singleTermUnitPeriod": {
                "default": "days",
                "enum": [
                  "days",
                  "months",
                  "sixMonths",
                  "years"
                ],
                "type": "string"
              }
            },
            "required": [
              "atOrigination"
            ],
            "type": "object"
          }
        ],
        "title": "Generic Installment Loan"
      },
      "lineOfCreditLoanProperties": {
        "allOf": [
          {
            "$ref": "#/components/schemas/GenericLoanConfigProperties"
          },
          {
            "properties": {
              "amortizationMethod": {
                "$ref": "#/components/schemas/AmortizationMethod"
              },
              "assetType": {
                "$ref": "#/components/schemas/LoanAssetType",
                "readOnly": true
              },
              "atOrigination": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/GenericLOCOriginationProperties"
                  },
                  {
                    "$ref": "#/components/schemas/DrawProperties"
                  }
                ],
                "required": [
                  "startDate",
                  "amountFinanced",
                  "interestRates",
                  "paymentFrequency",
                  "drawDuration",
                  "drawStartDate"
                ]
              },
              "drawFeeChargeLogic": {
                "$ref": "#/components/schemas/FeeChargeLogic"
              },
              "statementCloseToDueDatePeriod": {
                "default": 14,
                "description": "Number of calendar days between statement close date and a due date.\nTypically, 14 or 21 days. Applicable for line of credit only.\n",
                "nullable": true,
                "type": "integer"
              }
            },
            "required": [
              "atOrigination"
            ],
            "type": "object"
          }
        ],
        "title": "Generic Line of Credit"
      },
      "AmortizableLoan": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/predefinedInstallmentLoanProperties"
          },
          {
            "$ref": "#/components/schemas/predefinedLineOfCreditLoanProperties"
          },
          {
            "$ref": "#/components/schemas/installmentLoanProperties"
          },
          {
            "$ref": "#/components/schemas/lineOfCreditLoanProperties"
          }
        ]
      },
      "SingletonResponse": {
        "properties": {
          "message": {
            "description": "Description of the server action or error.",
            "type": "string"
          },
          "status": {
            "description": "HTTP status code.",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "AmortizationLite": {
        "description": "Amortization details",
        "properties": {
          "fees": {
            "properties": {
              "originationFeeAmount": {
                "description": "The amount of the origination fee.\n",
                "format": "float",
                "nullable": true,
                "type": "number"
              },
              "totalOtherFeesAmount": {
                "description": "The total amount of non-origination fees that are expected to be charged on the loan.\n",
                "format": "float",
                "readOnly": true,
                "type": "number"
              }
            },
            "type": "object"
          },
          "interestRateBelowMinOrZero": {
            "description": "The interest rate is below the minimum annual interest rate.",
            "type": "boolean"
          },
          "interestRateExceedsMax": {
            "description": "The interest rate exceeds the maximum annual interest rate.",
            "type": "boolean"
          },
          "numberPayments": {
            "description": "The number of expected payment due dates.",
            "type": "integer"
          },
          "periodicPaymentAmount": {
            "description": "The amortized periodic payment amount expected to be paid by the borrower on due dates.",
            "format": "float",
            "type": "number"
          },
          "totalDiscountAmount": {
            "description": "The total amount of discount at origination as a result of promo rates.\n",
            "format": "float",
            "type": "number"
          },
          "totalInterestAmount": {
            "description": "The total amount of interest the loan should accrue. Because of rounding issues, the total of expected\npayments `interestAmount` might be different from `totalInterestAmount`.\n",
            "format": "float",
            "type": "number"
          },
          "totalPaymentsAmount": {
            "description": "The total amount of expected payments.",
            "format": "float",
            "type": "number"
          }
        },
        "type": "object"
      },
      "Amortization": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AmortizationLite"
          },
          {
            "properties": {
              "amountFinanced": {
                "$ref": "#/components/schemas/AmountFinanced"
              },
              "schedule": {
                "items": {
                  "properties": {
                    "amount": {
                      "description": "The amount of the expected payment.",
                      "format": "float",
                      "type": "number"
                    },
                    "date": {
                      "description": "The due date of the expected payment.",
                      "format": "date",
                      "type": "string"
                    },
                    "dynamicFeeDetails": {
                      "description": "When `paymentType`=`dynamicFee` this will contain details of the dynamic fee.\n",
                      "properties": {
                        "apiName": {
                          "description": "The API name of the dynamic fee. For example: 'lateFee' or 'breatherFee'.\n",
                          "type": "string"
                        },
                        "displayName": {
                          "description": "The display name of the dynamic fee as shown to the borrower in the UI. For example: `Late Fee` or `Breather Fee`.\n",
                          "type": "string"
                        },
                        "dynamicFeeTypeId": {
                          "description": "The dynamic fee type identifier in the system.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "interestAmount": {
                      "description": "The portion of the `amount` allocated to net interest.\nAvailable only for `paymentType=periodicPayment`.\n",
                      "format": "float",
                      "type": "number"
                    },
                    "interestBeforeDiscountAmount": {
                      "description": "The interest amount that was accrued before promo rate(s) or any discount.\nAvailable only for `paymentType=periodicPayment`.\n",
                      "format": "float",
                      "type": "number"
                    },
                    "paymentType": {
                      "description": "The payment type.",
                      "enum": [
                        "periodicPayment",
                        "originationFee",
                        "drawFee",
                        "dynamicFee",
                        "downPayment",
                        "discountCredit"
                      ],
                      "type": "string"
                    },
                    "principalAmount": {
                      "description": "The portion of the `amount` allocated to principal.\nAvailable only for `paymentType=periodicPayment`.\n",
                      "format": "float",
                      "type": "number"
                    },
                    "unroundedInterestAmount": {
                      "description": "The portion of the `amount` allocated to net interest. Available only for `paymentType=periodicPayment`.\nThis value is unrounded.\n",
                      "nullable": true,
                      "type": "string"
                    },
                    "unroundedInterestBeforeDiscountAmount": {
                      "description": "The interest amount that was accrued before promo rate(s) or any discount. Available only for\n`paymentType=periodicPayment`. This value is unrounded.\n",
                      "nullable": true,
                      "type": "string"
                    },
                    "unroundedPrincipalAmount": {
                      "description": "The portion of the `amount` allocated to principal. Available only for `paymentType=periodicPayment`.\nThis value is unrounded.\n",
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "InstallmentAmortization": {
        "allOf": [
          {
            "properties": {
              "aprEffective": {
                "description": "The calculated effective APR for the loan.",
                "format": "float",
                "type": "number"
              },
              "aprEffectiveExceedsMax": {
                "description": "The effective APR exceeds the maximum APR.",
                "type": "boolean"
              },
              "aprNominal": {
                "description": "The calculated nominal APR for the loan.",
                "format": "float",
                "type": "number"
              },
              "aprNominalExceedsMax": {
                "description": "The nominal APR exceeds the maximum APR.",
                "type": "boolean"
              },
              "forgoneInterestAmount": {
                "description": "Forgone interest amount due to the specified `interestCapAmount`.",
                "format": "float",
                "type": "number"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/Amortization"
          }
        ],
        "description": "Installment amortization details",
        "title": "Installment amortization details"
      },
      "LineOfCreditAmortization": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Amortization"
          }
        ],
        "description": "Line of Credit loan amortization details",
        "title": "Line of Credit amortization details"
      },
      "AmortizationResult": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/InstallmentAmortization"
          },
          {
            "$ref": "#/components/schemas/LineOfCreditAmortization"
          }
        ],
        "type": "object"
      },
      "Combinations": {
        "description": "The combinations of duration, interest rates, promo rates, and\nmaximum interest cap for the requested amount financed\n",
        "items": {
          "allOf": [
            {
              "properties": {
                "combinationId": {
                  "description": "The identifier of this specific amortization combination\nof duration, interest rates, promo rates and total\ninterest cap amount.\n",
                  "nullable": false,
                  "type": "string"
                }
              },
              "required": [
                "combinationId"
              ],
              "type": "object"
            },
            {
              "$ref": "#/components/schemas/GenericInstallmentOriginationPropertiesRates"
            }
          ]
        },
        "nullable": false,
        "type": "array"
      },
      "AmortizeCombinationsBody": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanTypeId"
          },
          {
            "properties": {
              "atOrigination": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PredefinedInstallmentLoanAtOriginationBase"
                  },
                  {
                    "properties": {
                      "combinations": {
                        "$ref": "#/components/schemas/Combinations"
                      }
                    },
                    "required": [
                      "combinations"
                    ],
                    "type": "object"
                  }
                ]
              }
            },
            "required": [
              "loanTypeId",
              "atOrigination"
            ],
            "type": "object"
          }
        ]
      },
      "AmortizationCombinationsResult": {
        "items": {
          "allOf": [
            {
              "properties": {
                "combinationId": {
                  "nullable": false,
                  "type": "string"
                }
              },
              "type": "object"
            },
            {
              "$ref": "#/components/schemas/AmortizationLite"
            },
            {
              "properties": {
                "forgoneInterestAmount": {
                  "description": "Forgone interest amount due to the specified\n`interestCapAmount`.\n",
                  "format": "float",
                  "type": "number"
                }
              },
              "type": "object"
            }
          ]
        },
        "nullable": false,
        "type": "array"
      },
      "AnyId": {
        "description": "Peach's unique or lender's external identifier.",
        "pattern": "^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\\d+$",
        "type": "string",
        "writeOnly": true
      },
      "UserPermissions": {
        "additionalProperties": {
          "description": "User permissions per company. An object keyed by `companyId`'s as strings.\nThe value for a given `companyId` is a list of strings indicating the permissions the user has within that company.\n",
          "items": {
            "description": "permissions",
            "type": "string"
          },
          "type": "array",
          "x-additionalPropertiesName": "companyId"
        },
        "type": "object"
      },
      "AuthSuccess": {
        "properties": {
          "token": {
            "type": "string"
          }
        },
        "required": [
          "token"
        ],
        "type": "object"
      },
      "AuthType": {
        "enum": [
          "basic",
          "google",
          "oneTimeCodeEmail",
          "oneTimeCodeText",
          "SAML"
        ],
        "type": "string"
      },
      "AuthValueType": {
        "enum": [
          "email",
          "username",
          "phone",
          "samlSubjectNameId"
        ],
        "type": "string"
      },
      "UserInfo": {
        "properties": {
          "data": {
            "properties": {
              "firstName": {
                "description": "The user's first name.",
                "type": "string"
              },
              "lastName": {
                "description": "The user's last name.",
                "type": "string"
              },
              "username": {
                "type": "string"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "AppDomainType": {
        "enum": [
          "borrower",
          "agent",
          "help",
          "admin"
        ],
        "type": "string"
      },
      "CompanyConfigBrandAssets": {
        "description": "Brand assets and colors",
        "properties": {
          "colors": {
            "nullable": true,
            "properties": {
              "button": {
                "description": "Hex color string (#000ccc) representing the button color",
                "nullable": true,
                "type": "string"
              },
              "lighten": {
                "description": "Hex color string (#000ccc) representing the lighten color",
                "nullable": true,
                "type": "string"
              },
              "link": {
                "description": "Hex color string (#000ccc) representing the link color",
                "nullable": true,
                "type": "string"
              },
              "primary": {
                "description": "Hex color string (#000ccc) representing the primary color",
                "nullable": true,
                "type": "string"
              },
              "secondButton": {
                "description": "Hex color string (#000ccc) representing the second button foreground color",
                "nullable": true,
                "type": "string"
              },
              "secondButtonBackground": {
                "description": "Hex color string (#000ccc) representing the second button background color",
                "nullable": true,
                "type": "string"
              },
              "secondary": {
                "description": "Hex color string (#000ccc) representing the secondary color",
                "nullable": true,
                "type": "string"
              },
              "tertiary": {
                "description": "Hex color string (#000ccc) representing the tertiary color",
                "nullable": true,
                "type": "string"
              }
            },
            "type": "object"
          },
          "copies": {
            "nullable": true,
            "properties": {
              "consent": {
                "description": "HTML of the consent appearing in the footer",
                "nullable": true,
                "type": "string"
              },
              "disclosures": {
                "description": "HTML of the disclosures appearing in the footer",
                "nullable": true,
                "type": "string"
              }
            },
            "type": "object"
          },
          "logos": {
            "nullable": true,
            "properties": {
              "appCompactNavigation": {
                "description": "URL for the compact/mobile navigation logo. Recommended dimensions: 200×32px.",
                "nullable": true,
                "type": "string"
              },
              "appLargeCentered": {
                "description": "URL for the large centered logo (e.g. login, document upload). Recommended dimensions: 400×64px.",
                "nullable": true,
                "type": "string"
              },
              "appRegularNavigation": {
                "description": "URL for the desktop navigation logo. Recommended dimensions: 304×48px.",
                "nullable": true,
                "type": "string"
              },
              "primary": {
                "description": "URL To the primary logo",
                "nullable": true,
                "type": "string"
              },
              "small": {
                "description": "URL to the small logo",
                "nullable": true,
                "type": "string"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "CompanyConfigEmailStringOrObject": {
        "oneOf": [
          {
            "description": "The email address",
            "example": "jondoe@example.com",
            "title": "Plain Email",
            "type": "string"
          },
          {
            "example": {
              "email": "jondoe@example.com",
              "name": "Jon Doe"
            },
            "properties": {
              "email": {
                "type": "string"
              },
              "name": {
                "description": "Name associated with email address",
                "nullable": true,
                "type": "string"
              }
            },
            "title": "Name + Email",
            "type": "object"
          },
          {
            "example": {
              "email": "jondoe@example.com",
              "name": "Jon Doe"
            },
            "properties": {
              "address": {
                "example": "jondoe@example.com",
                "type": "string"
              },
              "name": {
                "description": "Name associated with email address",
                "nullable": true,
                "type": "string"
              }
            },
            "title": "Name + Address",
            "type": "object"
          }
        ]
      },
      "CompanyConfigCommunication": {
        "properties": {
          "address_from": {
            "$ref": "#/components/schemas/AddressBase",
            "description": "The from address of letters sent out."
          },
          "email_from": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CompanyConfigEmailStringOrObject"
              },
              {
                "description": "Configure email addresses from which to send email messages",
                "properties": {
                  "non_transactional_from": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/CompanyConfigEmailStringOrObject"
                      },
                      {
                        "description": "The email address from which all non-transactional emails are sent.\n\nA non-transactional email are those which are sent manually by\nan agent in the CRM.\n"
                      }
                    ]
                  },
                  "non_transactional_reply_to": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/CompanyConfigEmailStringOrObject"
                      },
                      {
                        "description": "The email address marked as `reply-to` for sent non-transactional emails.\n\nA non-transactional email are those which are sent manually by\nan agent in the CRM.\n"
                      }
                    ]
                  },
                  "skipCGRules": {
                    "description": "can-interact will return `true` for this company without checking Compliance Guard rules",
                    "type": "boolean"
                  },
                  "transactional_from": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/CompanyConfigEmailStringOrObject"
                      },
                      {
                        "description": "The email address from which all transactional emails are sent.\n\nA transactional email are those which are NOT sent manually by\nan agent in the CRM.\n"
                      }
                    ]
                  },
                  "transactional_reply_to": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/CompanyConfigEmailStringOrObject"
                      },
                      {
                        "description": "The email address marked as `reply-to` for sent transactional emails.\n\nA transactional email are those which are NOT sent manually by\nan agent in the CRM.\n"
                      }
                    ]
                  }
                },
                "title": "From and Reply-To",
                "type": "object"
              }
            ]
          },
          "email_inbound": {
            "description": "Configure email addresses which may be used to receive messages.",
            "properties": {
              "monitored_emails": {
                "description": "Array of email addresses which can receive incoming email messages.\n\nAn incoming email message will create a Taskrouter Task:\n`HandleInboundInteraction` or `HandleUnboundInboundInteraction`.\n",
                "items": {
                  "$ref": "#/components/schemas/CompanyConfigEmailStringOrObject"
                },
                "type": "array"
              },
              "reject_others": {
                "default": false,
                "description": "If set to `true` then all email messages received by the email system\nwhich are NOT present in `monitored_emails` are considered\n\"unmonitored email addresses\".\n\nUnmonitored email addresses:\n- when receiving an email message DO NOT create Taskrouter Tasks.\n- when an email message is received, automatically reply with\n  an email saying that they have messaged an \"unmonitored\" email.\n",
                "type": "boolean"
              }
            },
            "type": "object"
          },
          "enableInboundVoiceCall": {
            "description": "Set to `true` to enable inbound voice calls. Otherwise, inbound callers\nare read a voicemail is currently disabled message.\n\n(Note that other configuration settings must be set for voice calls\nto work properly.)\n",
            "type": "boolean"
          },
          "enableInboundWebChat": {
            "description": "Set to `true` to enable inbound webchats.\n\nWhen set to `true` the Contact Us page will display a link to start a webchat\nfor logged-in borrowers.\n\nNote that `openHours` must also be configured for inbound webchats to work.\n",
            "type": "boolean"
          },
          "enable_two_way_texting": {
            "description": "Set to `true` to enable inbound text receipt and responses. Otherwise, texter\nreceive response saying \"This number is not monitored...\".\n\n(To configure the autoresponse message see the config setting `support.textSupportDisabledMessage`)\n\nInbound text messages will generate `replyToNewText`-type tasks.\n",
            "type": "boolean"
          },
          "text_from_number": {
            "description": "The phone number to send text messages from.",
            "example": "+18085551234",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CompanyConfigEvidence": {
        "properties": {
          "captureScreenshot": {
            "description": "If `true`, capture payment screenshot for evidence collection.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "CompanyConfigLinks": {
        "properties": {
          "eSignDisclosureUrl": {
            "description": "URL of lender's eSign Disclosure page",
            "format": "url",
            "nullable": true,
            "type": "string"
          },
          "helpUrl": {
            "description": "URL of lender's help page",
            "format": "url",
            "nullable": true,
            "type": "string"
          },
          "privacyPolicyUrl": {
            "description": "URL of lender's Privacy Policy page",
            "format": "url",
            "nullable": true,
            "type": "string"
          },
          "termsOfUseUrl": {
            "description": "URL of lender's Terms of Use page",
            "format": "url",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CompanyConfigOpenHours": {
        "description": "An object describing the times in which this company is \"open\".\n\nThis is used in multiple places:\n- This is displayed on the contact us page.\n- When closed, phone calls are sent to voicemail or rejected.\n- When closed, webchats cannot be started.\n",
        "nullable": true,
        "properties": {
          "businessHours": {
            "nullable": true,
            "properties": {
              "holidays": {
                "description": "The list of holidays on which the company has special open hours. Holiday\nhours supercede the \"normal\" weekly hours.\n",
                "items": {
                  "oneOf": [
                    {
                      "description": "An object describing the holiday.\n\nNote that repeating, annual holidays cannot currently be specified; you must\nspecify each year's holiday.\n",
                      "properties": {
                        "date": {
                          "description": "An ISO 8601 date (not date-time) on which this holiday occurs\n",
                          "example": "2024-04-01",
                          "type": "string"
                        },
                        "hours": {
                          "description": "The hours in which the company is open on this holiday",
                          "example": "09:00-15:00",
                          "type": "string"
                        },
                        "name": {
                          "description": "The name of the holiday",
                          "example": "April Fools Day",
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "title": "Custom Holiday",
                      "type": "object"
                    },
                    {
                      "description": "An object indicating this company should match \"standard\" holidays\nfor the country indicated.\n\nNote that adding this will add multiple holidays to your open hours\nconfiguration.\n",
                      "properties": {
                        "hours": {
                          "description": "The hours in which the company is open on these holidays",
                          "example": "Closed",
                          "type": "string"
                        },
                        "matchCountry": {
                          "description": "The ISO 3166 2 or 3 character country code of the country to match.\n\nSee: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes\n\nThe list of holidays for a country matches those used by the python\npackage \"Holidays\".\n\nSee: https://python-holidays.readthedocs.io/\n",
                          "example": "GB",
                          "type": "string"
                        }
                      },
                      "required": [
                        "matchCountry"
                      ],
                      "title": "Match Country Holidays",
                      "type": "object"
                    }
                  ]
                },
                "nullable": true,
                "type": "array"
              },
              "normal": {
                "description": "A specially formatted string describing the open hours of the company.\n\nA day-time descriptor is a day or days of the week followed by a space \" \"\nand an \"hours\". With a \"day\" being the first three letters of the day of\nthe week. With \"hours\" being either `Closed`, `24hours`, or\na 24-hour time range like `9:00-18:00`.\n\nFor example:\n- `\"Mon-Wed 3:00-13:00\"` indicates an open time from 3am to 1pm on\n  Monday, Tuesday, and Wednesday.\n- `\"Fri 24hrs\"` indicates that on Friday the company is open for 24 hours.\n- `\"Thu closed\"` indicates on Thursday the company is closed all day.\n\nDay-time descriptors can be combined with a `;` to fully define a week\nof open times.\n\nIf no open hours are configured the company is considered always closed.\n",
                "example": "Mon 24hrs; Tue-Fri 9:00-18:00; Sat-Sun Closed",
                "nullable": true,
                "type": "string"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "CompanyConfigPaymentTypes": {
        "description": "Controls what payment instrument types are allowed.",
        "properties": {
          "ach": {
            "default": false,
            "type": "boolean"
          },
          "achVerification": {
            "properties": {
              "microdeposit": {
                "description": "Microdeposit verification is required when creating bank accounts without using Plaid.",
                "type": "boolean"
              },
              "plaid": {
                "description": "Plaid account creation is allowed.",
                "type": "boolean"
              }
            },
            "type": "object"
          },
          "balanceCheck": {
            "properties": {
              "plaid": {
                "description": "Allow Plaid balance checks.",
                "type": "boolean"
              }
            },
            "type": "object"
          },
          "check": {
            "default": false,
            "type": "boolean"
          },
          "creditCard": {
            "default": false,
            "type": "boolean"
          },
          "debitCard": {
            "default": false,
            "type": "boolean"
          },
          "moneyOrder": {
            "default": false,
            "type": "boolean"
          },
          "paymentNetwork": {
            "default": false,
            "type": "boolean"
          },
          "payroll": {
            "default": false,
            "type": "boolean"
          },
          "wire": {
            "default": false,
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "CompanyConfigStatements": {
        "properties": {
          "defaultStatementChannel": {
            "enum": [
              "email",
              "mail"
            ],
            "type": "string"
          },
          "isMailStatementAllowed": {
            "description": "Whether borrowers can choose mail as their delivery method for statements.\n",
            "type": "boolean"
          },
          "overdueAmountInMinPaymentOverride": {
            "description": "If true, include the overdue amount in the min payment calculation during statement generation. This is also the default.\n\nIf false, do not include the overdue amount in the min payment calculation during statement generation.\n",
            "nullable": true,
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "CompanyConfigSupport": {
        "description": "Customer support",
        "properties": {
          "departmentName": {
            "nullable": true,
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "enableVoicemailWhenClosed": {
            "description": "Set to `true` to enable the leaving of voicemails when a customer calls\nwhile phone support is closed.\n",
            "type": "boolean"
          },
          "enableVoicemailWhenNoAgents": {
            "description": "Set to `true` to enable leaving of voicemails when a customer calls\nwhen there are no agents available to answer the call.\n\nIf `false` or left unset the caller will remain on hold indefinitely until\nan agent makes themselves available.\n",
            "type": "boolean"
          },
          "mailingAddress": {
            "$ref": "#/components/schemas/AddressBase",
            "description": "The mailing address of the support department.",
            "nullable": true
          },
          "outboundCallRecordingConsentScript": {
            "description": "Message to read to caller when making an outbound call to obtain consent\nto record the call.\n",
            "type": "string"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          },
          "phoneSupportClosedLeaveVoicemailMessage": {
            "description": "Message to read to caller when phone support is closed, and they may leave a message.\n",
            "type": "string"
          },
          "phoneSupportClosedMessage": {
            "description": "Message to read to caller when phone support is closed (and voicemails\ncannot be left because `enableVoicemailWhenClosed=false`)\n",
            "type": "string"
          },
          "phoneSupportDisabledMessage": {
            "description": "Message to read in response to an inbound call when phone support is disabled.\n(Phone support is disabled with the company config setting: `communication.enableInboundVoiceCall=false`)\n",
            "type": "string"
          },
          "phoneSupportNoAgentsLeaveVoicemailMessage": {
            "description": "Message to read to caller when there are no agents available, and\nthey may leave a message.\n",
            "type": "string"
          },
          "phoneSupportPleaseHoldMessage": {
            "description": "Message to read to inbound callers when being put on hold. This message is read\nafter the recording consent message.\n",
            "type": "string"
          },
          "privacyPolicyUrl": {
            "description": "URL of the privacy policy notice.",
            "nullable": true,
            "type": "string"
          },
          "recordAllInboundVoiceCalls": {
            "description": "Set to `true` to record all inbound voice calls. Otherwise, calls can\nbe manually recorded on an individual basis by an agent.\n",
            "type": "boolean"
          },
          "recordAllOutboundVoiceCalls": {
            "description": "Set to `true` to record all outbound voice calls. Otherwise, calls can\nbe manually recorded on an individual basis by an agent.\n",
            "type": "boolean"
          },
          "textSupportClosedPleaseWaitMessage": {
            "description": "Message to send in response to initial inbound text message which starts a text message\nconversation when phone support is closed.\n",
            "type": "string"
          },
          "textSupportDisabledMessage": {
            "description": "Message to send in response to an inbound text message when text support is disabled.\n(Text support is disabled with the company config setting: `communication.enable_two_way_texting=false`)\n",
            "type": "string"
          },
          "textSupportFindNewAgentPleaseWaitMessage": {
            "description": "Message to send in response to an inbound text message to an already active conversation,\nin which there is NOT already an agent.\n",
            "type": "string"
          },
          "textSupportPleaseWaitMessage": {
            "description": "Message to send in response to initial inbound text message which starts a text message\nconversation.\n",
            "type": "string"
          },
          "textSupportRejectUnknownNumberMessage": {
            "description": "Message to send in response to an inbound text message when rejecting contact from\nan unknown number.\n",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CompanyConfigTimezone": {
        "description": "The timezone of the company.\n\nIt can be any IANA timezone from the [timezone database](https://data.iana.org/time-zones/releases/).\n\nNote that this value should be a timezone and *NOT* a UTC Offset. A timezone is associated with\na geographic place / political entity (e.g., \"America/Los_Angeles\"), a UTC Offset\nis just a count of number of hours difference from UTC.\n",
        "nullable": true,
        "type": "string"
      },
      "HiddenOrNull": {
        "enum": [
          "hidden"
        ],
        "nullable": true,
        "type": "string"
      },
      "AgentDashboardTools": {
        "properties": {
          "dashboardToolDetails": {
            "description": "The details required for Peach to expose the agent tools to agents.",
            "items": {
              "properties": {
                "name": {
                  "description": "The name of the tool displayed to the agent.",
                  "type": "string"
                },
                "url": {
                  "description": "The url associated with the agent tool. This controls the destination where the agent is taken when they access\nthe tool.\n\nNote: when creating the url, there are parameters that the system will be able to parse and automatically\nfill in. They are {borrowerId}, {externalBorrowerId}, {loanId}, {loanExternalId}, {loanPeachPublicId}, and\n{borrowerPeachPublicId}\n",
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "enabled": {
            "default": false,
            "description": "Determines whether agent tools will be shown in the loan options menu to the agent.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ShownOrNull": {
        "enum": [
          "shown"
        ],
        "nullable": true,
        "type": "string"
      },
      "CompanyConfigUi": {
        "description": "Configure UI, including the visibility or ordering of various UI\nelements.\nEach element is either hidden or visible by default.\nFor elements shown by default, hide them by setting their value\nto `hidden`.\nFor elements hidden by default, show them by setting their value\nto `show`.\n\nThese elements are hidden by default:\n\n- directPaymentToDraw\n\nAll other elements are shown by default.\n",
        "properties": {
          "accountSettings": {
            "$ref": "#/components/schemas/HiddenOrNull"
          },
          "accountSettingsPage": {
            "properties": {
              "additionalContacts": {
                "$ref": "#/components/schemas/HiddenOrNull"
              },
              "commPreferences": {
                "$ref": "#/components/schemas/HiddenOrNull"
              },
              "contactInformation": {
                "$ref": "#/components/schemas/HiddenOrNull"
              },
              "paymentMethods": {
                "$ref": "#/components/schemas/HiddenOrNull"
              },
              "profile": {
                "$ref": "#/components/schemas/HiddenOrNull"
              }
            },
            "type": "object"
          },
          "accountSummaryPage": {
            "properties": {
              "balancesDetails": {
                "$ref": "#/components/schemas/HiddenOrNull"
              },
              "cardDetails": {
                "$ref": "#/components/schemas/HiddenOrNull"
              },
              "loanTerms": {
                "$ref": "#/components/schemas/HiddenOrNull"
              },
              "merchantDetails": {
                "$ref": "#/components/schemas/HiddenOrNull"
              },
              "promotions": {
                "$ref": "#/components/schemas/HiddenOrNull"
              },
              "summary": {
                "$ref": "#/components/schemas/HiddenOrNull"
              }
            },
            "type": "object"
          },
          "agentDashboardTools": {
            "$ref": "#/components/schemas/AgentDashboardTools"
          },
          "analyticsScript": {
            "description": "The HTML portion of script codes that loads analytics related code. The code is merged at the bottom of the main HTML page. Double quotes (\") should be encoded by prefixing it with a \"\\\\\" (backslash).",
            "type": "string"
          },
          "caseTypeOrdering": {
            "description": "Definitions for case type selection dropdown grouping and\nordering. Categories and tasks are ordered as given.\n",
            "items": {
              "properties": {
                "caseTypes": {
                  "description": "Array of case type Peach IDs",
                  "items": {
                    "$ref": "#/components/schemas/AnyId"
                  },
                  "type": "array"
                },
                "category": {
                  "description": "Category name",
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "contactUs": {
            "$ref": "#/components/schemas/HiddenOrNull"
          },
          "dashboard": {
            "description": "Configuration for the embedded Metabase dashboards displayed in CRM.\n",
            "properties": {
              "cases": {
                "$ref": "#/components/schemas/HiddenOrNull",
                "description": "Hide the cases embedded Metabase dashboard in CRM."
              },
              "interactions": {
                "$ref": "#/components/schemas/HiddenOrNull",
                "description": "Hide the interactions embedded Metabase dashboard in CRM."
              }
            },
            "type": "object"
          },
          "directPaymentToDraw": {
            "$ref": "#/components/schemas/ShownOrNull",
            "description": "Allow customers to direct manual payments toward a specific draw.\nOnly applicable to LOC.\n"
          },
          "eSignDisclosure": {
            "$ref": "#/components/schemas/HiddenOrNull"
          },
          "favicon": {
            "description": "URL of the company favicon.",
            "nullable": true,
            "type": "string"
          },
          "headScripts": {
            "description": "The HTML portion that is loaded at the top of the tag of the main HTML page. Can be used to inject additional scripts that must be loaded at the start, like UserWay's ADA compliance widget.",
            "type": "string"
          },
          "help": {
            "$ref": "#/components/schemas/HiddenOrNull"
          },
          "loanOptions": {
            "properties": {
              "changeDueDate": {
                "$ref": "#/components/schemas/HiddenOrNull"
              },
              "changeNickname": {
                "$ref": "#/components/schemas/HiddenOrNull"
              },
              "drawFunds": {
                "$ref": "#/components/schemas/HiddenOrNull"
              },
              "getPayoffStatement": {
                "$ref": "#/components/schemas/HiddenOrNull"
              },
              "makePayment": {
                "$ref": "#/components/schemas/HiddenOrNull"
              },
              "manageAutopay": {
                "$ref": "#/components/schemas/HiddenOrNull"
              },
              "managePaymentMethods": {
                "$ref": "#/components/schemas/HiddenOrNull"
              }
            },
            "type": "object"
          },
          "loginPage": {
            "properties": {
              "fallbackAuthLink": {
                "$ref": "#/components/schemas/HiddenOrNull",
                "description": "If `hidden`, the UI will hide hide the \"Try another way to login\" link.\n"
              }
            },
            "type": "object"
          },
          "makePaymentPage": {
            "properties": {
              "remainingBalance": {
                "$ref": "#/components/schemas/HiddenOrNull"
              }
            },
            "type": "object"
          },
          "manageAutopayPage": {
            "properties": {
              "minimumPaymentDue": {
                "$ref": "#/components/schemas/HiddenOrNull"
              },
              "statementBalance": {
                "$ref": "#/components/schemas/HiddenOrNull"
              }
            },
            "type": "object"
          },
          "managePaymentMethodsPage": {
            "properties": {
              "agent": {
                "properties": {
                  "check": {
                    "$ref": "#/components/schemas/HiddenOrNull"
                  },
                  "creditCard": {
                    "$ref": "#/components/schemas/HiddenOrNull"
                  },
                  "debitCard": {
                    "$ref": "#/components/schemas/HiddenOrNull"
                  },
                  "deleteButton": {
                    "$ref": "#/components/schemas/HiddenOrNull"
                  },
                  "moneyOrder": {
                    "$ref": "#/components/schemas/HiddenOrNull"
                  },
                  "paymentNetwork": {
                    "$ref": "#/components/schemas/HiddenOrNull"
                  },
                  "payroll": {
                    "$ref": "#/components/schemas/HiddenOrNull"
                  },
                  "wire": {
                    "$ref": "#/components/schemas/HiddenOrNull"
                  }
                },
                "type": "object"
              },
              "borrower": {
                "properties": {
                  "check": {
                    "$ref": "#/components/schemas/HiddenOrNull"
                  },
                  "creditCard": {
                    "$ref": "#/components/schemas/HiddenOrNull"
                  },
                  "debitCard": {
                    "$ref": "#/components/schemas/HiddenOrNull"
                  },
                  "deleteButton": {
                    "$ref": "#/components/schemas/HiddenOrNull"
                  },
                  "moneyOrder": {
                    "$ref": "#/components/schemas/HiddenOrNull"
                  },
                  "paymentNetwork": {
                    "$ref": "#/components/schemas/HiddenOrNull"
                  },
                  "payroll": {
                    "$ref": "#/components/schemas/HiddenOrNull"
                  },
                  "wire": {
                    "$ref": "#/components/schemas/HiddenOrNull"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "mobileDisclosures": {
            "$ref": "#/components/schemas/HiddenOrNull",
            "description": "Hide the borrower portal disclosures on mobile devices.\n"
          },
          "mobileFooter": {
            "$ref": "#/components/schemas/HiddenOrNull",
            "description": "Hide the borrower portal footer on mobile devices.\n"
          },
          "mobileHeader": {
            "$ref": "#/components/schemas/HiddenOrNull",
            "description": "Hide the borrower portal header on mobile devices.\n"
          },
          "privacyPolicy": {
            "$ref": "#/components/schemas/HiddenOrNull"
          },
          "projectSlug": {
            "description": "The company project slug used to serve the UI. Please do NOT change it without coordinating with engineering.",
            "type": "string"
          },
          "signOut": {
            "$ref": "#/components/schemas/HiddenOrNull"
          },
          "termsOfUse": {
            "$ref": "#/components/schemas/HiddenOrNull"
          },
          "websiteTitle": {
            "description": "The title that will be shown when the front end loads before the rest of the code loads.",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "UserType": {
        "description": "The type of the user.",
        "enum": [
          "agent",
          "borrower",
          "service"
        ],
        "type": "string"
      },
      "FrontendPreauthBootstrap": {
        "properties": {
          "appDomainType": {
            "$ref": "#/components/schemas/AppDomainType"
          },
          "authType": {
            "$ref": "#/components/schemas/AuthType"
          },
          "authValueType": {
            "$ref": "#/components/schemas/AuthValueType"
          },
          "company": {
            "description": "`IMPORTANT:` The values in here _DO NOT directly correspond_ to the values returned\nby the `/api/companies/{companyId}` endpoint. These values are _similar_ but\ntransformed for public consumption.\n",
            "properties": {
              "agentAuthType": {
                "$ref": "#/components/schemas/AuthType"
              },
              "agentAuthValueType": {
                "$ref": "#/components/schemas/AuthValueType"
              },
              "borrowerAuthType": {
                "$ref": "#/components/schemas/AuthType"
              },
              "borrowerAuthValueType": {
                "$ref": "#/components/schemas/AuthValueType"
              },
              "brandAssets": {
                "$ref": "#/components/schemas/CompanyConfigBrandAssets"
              },
              "brandName": {
                "type": "string"
              },
              "communication": {
                "$ref": "#/components/schemas/CompanyConfigCommunication"
              },
              "defaultVerificationTypeId": {
                "type": "string"
              },
              "domainName": {
                "type": "string"
              },
              "evidence": {
                "$ref": "#/components/schemas/CompanyConfigEvidence"
              },
              "forceCaseIdOnAgentActions": {
                "type": "boolean"
              },
              "id": {
                "type": "string"
              },
              "legalName": {
                "type": "string"
              },
              "links": {
                "$ref": "#/components/schemas/CompanyConfigLinks"
              },
              "name": {
                "type": "string"
              },
              "openHours": {
                "$ref": "#/components/schemas/CompanyConfigOpenHours"
              },
              "paymentTypes": {
                "$ref": "#/components/schemas/CompanyConfigPaymentTypes"
              },
              "shortDomainName": {
                "type": "string"
              },
              "showPoweredByPeach": {
                "nullable": true,
                "type": "boolean"
              },
              "statements": {
                "$ref": "#/components/schemas/CompanyConfigStatements"
              },
              "support": {
                "$ref": "#/components/schemas/CompanyConfigSupport"
              },
              "tasks": {
                "properties": {
                  "enableCaseOwnership": {
                    "type": "boolean"
                  }
                },
                "type": "object"
              },
              "timezone": {
                "$ref": "#/components/schemas/CompanyConfigTimezone"
              },
              "ui": {
                "$ref": "#/components/schemas/CompanyConfigUi"
              }
            },
            "type": "object"
          },
          "ssoLoginUrl": {
            "description": "The SSO login URL to send the requester to if this is an SSO-authenticated application,\notherwise return `null`.\n",
            "nullable": true,
            "type": "string"
          },
          "userType": {
            "$ref": "#/components/schemas/UserType"
          }
        },
        "type": "object"
      },
      "NewPaginator": {
        "properties": {
          "count": {
            "description": "Number of items returned by the current request.",
            "readOnly": true,
            "type": "integer"
          },
          "nextUrl": {
            "description": "URL of the next set of results.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "previousUrl": {
            "description": "URL of the previous set of results.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "status": {
            "description": "HTTP status code.",
            "type": "integer"
          },
          "total": {
            "description": "Total number of items in this result.",
            "readOnly": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "BaseMixin": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "BaseWithExternalIdMixin": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "externalId": {
                "description": "A lender's identifier for an object.\n\nAfter the object is successfully created, a lender can use ID or externalId identifiers to fetch the object.\n\nTo fetch the object using externalId you need to add `ext-` to the URL.\n\nNote: Don't add ext- to the identifier value. For example: if the external identifier is `ABCDE`, then pass externalId=ABCDE and NOT ext-ABCDE when creating the object.\n",
                "maxLength": 200,
                "minLength": 1,
                "nullable": true,
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "BulkSenderInteractionChannel": {
        "description": "The channel to which the bulk sender will send.\n\nIf no channel is specified the campaign will send to all channels with a defined template.\n\n**WARNING**: Only `mail`, `text`, and `email` are compatible with the campaigns system.\n",
        "enum": [
          "voice",
          "email",
          "fax",
          "text",
          "chat",
          "mail",
          "gui",
          "document"
        ],
        "nullable": true,
        "type": "string"
      },
      "InteractionSubject": {
        "description": "The subject of the interaction. The subject identifies the category of the content\nin the message.\n\nMost subjects have an associated implicit theme. e.g., `loanOverdueFirstNotice` has\na theme of `opsCollDebt`. For these subjects it is not necessary to specify a theme.\n\nSome subjects like `freeForm` and `custom<N>` do not have an implicit theme. When\nusing these subjects you must specify a `theme`.\n\n**DEPRECATED**: `locStatementGenerated` and `locStatementRegenerated` are deprecated.\nThey will be automatically converted into `statementGenerated` and `statementRegenerated`\nrespectively. You should switch to use those subjects directly.\n\n**DEPRECATED**: `failedSettlementPeach` is deprecated. This was always a subject used by \nthe Peach application internally, and will no longer be used. Attempts to set this\nsubject will be rejected with a 400 error.\n",
        "enum": [
          "annualPrivacyPolicyNotice",
          "autopayAgreement",
          "autopayAmountChanged",
          "autopayCanceledBySystem",
          "autopayEnabled",
          "autopayEnableReminder",
          "autopayPaymentCanceled",
          "autopayPaymentMethodUpdated",
          "autopayPaymentReminder",
          "autopayPaymentRescheduled",
          "cardExpiresReminder",
          "caseEscalation",
          "ceaseCommunicationAcknowledgement",
          "ceaseCommunicationRefuseToPay",
          "confirmationCode",
          "contactTakeover",
          "creditNegativeInfoReported",
          "creditPositiveInfoReported",
          "custom1",
          "custom2",
          "custom3",
          "custom4",
          "custom5",
          "custom6",
          "custom7",
          "custom8",
          "custom9",
          "custom10",
          "custom11",
          "custom12",
          "custom13",
          "custom14",
          "custom15",
          "custom16",
          "custom17",
          "custom18",
          "custom19",
          "custom20",
          "debtValidationNotice",
          "debtValidationNoticeArizona",
          "debtValidationNoticeAutomatic",
          "debtValidationNoticeNYCYonkers",
          "debtValidationNoticePuertoRico",
          "deceasedConfirmationOfPayoff",
          "deceasedNoticeToRepresentative",
          "deceasedNotificationUponDeath",
          "disputeOfDebtConfirmed",
          "disputeOfDebtSubmitDocumentation",
          "disputeOfDebtSubmitDocumentationReminder",
          "disputeOfDebtUnableToConfirm",
          "disputeOfDebtUnableToResolve",
          "documentUploadFailed",
          "downpaymentFailed",
          "drawFundsDisclosure",
          "electronicConsentOptOut",
          "failedSettlementInvestor",
          "failedSettlementPeach",
          "freeForm",
          "freeFormBranded",
          "futurepayCanceled",
          "futurepayPaymentDueReminder",
          "identityTheftIncompleteDocumentation",
          "identityTheftNotValidated",
          "identityTheftSubmitDocumentation",
          "identityTheftSubmitDocumentationFirstReminder",
          "identityTheftSubmitDocumentationSecondReminder",
          "identityTheftValidated",
          "letterReturnedToSender",
          "loanAccelerated",
          "loanCanceled",
          "loanChargedOffUnsecured",
          "loanDetails",
          "loanFeeCharged",
          "loanFreeze",
          "loanManualPaymentDisclosure",
          "loanOverdueFifthNotice",
          "loanOverdueFirstNotice",
          "loanOverdueFourthNotice",
          "loanOverdueSecondNotice",
          "loanOverdueSixthNotice",
          "loanOverdueThirdNotice",
          "loanPaidOff",
          "loanPaymentScheduleChanged",
          "loanPayoffStatement",
          "loanRefundProcessed",
          "loanRightToCurePersonalUnsecured",
          "loanRightToCurePersonalUnsecuredColorado",
          "loanRightToCurePersonalUnsecuredDC",
          "loanRightToCurePersonalUnsecuredIowa",
          "loanRightToCurePersonalUnsecuredKansas",
          "loanRightToCurePersonalUnsecuredMaine",
          "loanRightToCurePersonalUnsecuredMissouri",
          "loanRightToCurePersonalUnsecuredSouthCarolina",
          "loanRightToCurePersonalUnsecuredWestVirginia",
          "loanRightToCurePersonalUnsecuredWisconsin",
          "loanTermsChangeAgreement",
          "loanUnfreeze",
          "locCreditLimitChanged",
          "locInterestRateChanged",
          "locLineClosed",
          "locStatementGenerated",
          "locStatementRegenerated",
          "loginFirstPaymentReminder",
          "microdepositFailed",
          "microdepositProcessing",
          "microdepositReminder",
          "oneTimeCode",
          "paydayConsumerRightsNotice",
          "paydayFirstPaymentWithdrawal",
          "paymentDisputed",
          "paymentDueDateReminder",
          "paymentFailed",
          "paymentMethodAdded",
          "paymentMethodUpdated",
          "paymentProcessing",
          "paymentRescheduled",
          "paymentReversalFailed",
          "paymentReversalProcessing",
          "paymentSuccessful",
          "payoffStatementDocument",
          "promiseToPayPeriodKept",
          "promiseToPayPeriodMissed",
          "promiseToPayPlanCanceled",
          "promiseToPayPlanCreated",
          "promoProgramCanceled",
          "promoProgramEligibilityAtRisk",
          "promoProgramExercised",
          "promoProgramReminder",
          "reimbursementFailed",
          "reimbursementProcessed",
          "reimbursementScheduled",
          "scraApplicationDenied",
          "scraBenefitsApplied",
          "scraBenefitsExpiringNotice",
          "scraCGFlaggedDocumentRequest",
          "scraServicemanNotifiedDocumentRequest",
          "settlementOffer",
          "settlementOfferFirstReminder",
          "statement",
          "statementLOC",
          "statementGenerated",
          "statementRegenerated",
          "unmonitoredEmailAddress",
          "updateBankAccountConnection"
        ],
        "type": "string"
      },
      "InteractionTheme": {
        "description": "The reason why an interaction occurred.\n\nFor example:\n- An outbound debt collection call should be marked as `opsCollDebt`.\n- An annual privacy policy update email should be marked as `opsServicing`.\n- A customer service response to borrower's inquiry should be marked as `opsServicing`.\n\n**DEPRECATED**: `inbBug`, `inbHumanLove`, and `opsServicingNegativeCreditReportNotice` are deprecated:\nyou cannot create or update interactions to have these values.\n",
        "enum": [
          "agentNotification",
          "opsCollDebt",
          "opsCollLocateBorrower",
          "opsCollVerifyEmployment",
          "opsCollContactEmployerNotice",
          "opsServicingDebtValidation",
          "opsServicingNegativeCreditReportNotice",
          "opsServicingTimeBarredNotice",
          "opsServicing",
          "opsAccountCredentials",
          "inbMissingFeature",
          "inbEducation",
          "inbBug",
          "inbRequest",
          "inbHumanLove",
          "inbUnknown",
          "inbOther",
          "inbServicing",
          "inbCollections",
          "inbPayments",
          "inbFraud",
          "inbGeneralInquiry"
        ],
        "nullable": true,
        "type": "string"
      },
      "BulkSender": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseWithExternalIdMixin"
          },
          {
            "properties": {
              "interactionChannel": {
                "$ref": "#/components/schemas/BulkSenderInteractionChannel"
              },
              "interactionSubject": {
                "$ref": "#/components/schemas/InteractionSubject"
              },
              "interactionTheme": {
                "$ref": "#/components/schemas/InteractionTheme"
              }
            },
            "type": "object"
          }
        ]
      },
      "BulkSenderCreate": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseWithExternalIdMixin"
          },
          {
            "properties": {
              "interactionChannel": {
                "$ref": "#/components/schemas/BulkSenderInteractionChannel"
              },
              "interactionSubject": {
                "$ref": "#/components/schemas/InteractionSubject"
              },
              "interactionTheme": {
                "$ref": "#/components/schemas/InteractionTheme"
              }
            },
            "required": [
              "interactionSubject"
            ],
            "type": "object"
          }
        ]
      },
      "LoansFromCollCase": {
        "description": "If `true`, look up the associated collections case for this borrower,\nand, if it exists, use the loans in collections as input to this endpoint.\n\nThis cannot be used in conjunction with `loanId` or `loanIds` fields.\n\nIf there are no loans in collections for this borrower (i.e., no collections case), \nthen this endpoint executes normally as if `loanIds` were not provided.\n\nNote:\n- Borrowers may only have one collections case at a time.\n- This will mostly only be useful with collections-related themes: `opsCollDebt`,\n  `opsCollLocateBorrower`, `opsCollVerifyEmployment`, and `opsCollContactEmployerNotice`,\n  but it is permissible to use with other themes.\n",
        "type": "boolean"
      },
      "ContactExporter": {
        "description": "A contact exporter represents instructions on how to transform a\ncampaign run into a finalized list.\n",
        "properties": {
          "checkCanInteractData": {
            "description": "If set, screen contacts through Compliance Guard using provided data.\n",
            "nullable": true,
            "properties": {
              "isAutodialed": {
                "default": false,
                "description": "`true` if an autodialed call. If no value is passed, we'll assume\nisAutodialed=`false`—meaning a manual call was performed.\n\nFor more information on why this is important reference the\nTelephone Consumer Protection Act (TCPA).\n",
                "nullable": true,
                "type": "boolean"
              },
              "loansFromCollCase": {
                "$ref": "#/components/schemas/LoansFromCollCase"
              },
              "theme": {
                "$ref": "#/components/schemas/InteractionTheme"
              }
            },
            "type": "object"
          },
          "columnSettings": {
            "description": "A list of dictionaries where each dictionary specifies a field to include as a column in the result\nfile along with optional output column name.\n",
            "items": {
              "properties": {
                "field": {
                  "description": "The field name of the data source.\n\nAll fields are relative to _the contact_. i.e., the `id` field is the contact's ID, and not\nthe associated borrower's ID.\n\nNote that fields prefixed with `borrower...` are fields which will always return information\nabout this contact's associated borrower. For example, if the contact has `affiliation=spouse`,\nthe `borrowerDateOfBirth` field will contain the borrower's date of birth, and NOT contain the\nborrower's spouse's date of birth.\n\nOnly the following values are currently supported:\n\n## Contact Metadata\n\n- `affiliation` - This contact's affiliation with the borrower. For example, if this were a borrower's\n  lawyer contact, this value will be `legal`; Or, if this were a borrower's own contact it would be `self`.\n- `externalId` - This contact's external ID, or `null` if it does not have one.\n- `id` - This contact's ID—starts with `CT-...`\n- `label` - This contact's label—one of: `personal`, `home`, `work`, `military`\n- `name` - This contact's full name.\n- `status` - This contact's status—one of: `primary`, `secondary`, `additional`, `archived`\n\n## Associated Borrower Metadata\n\n- `borrowerCrmUrl` - The associated borrower's management page URL in the Peach CRM\n- `borrowerDateOfBirth` - The associated borrower's date of birth, formatted like YYYY/MM/DD\n- `borrowerFirstName` - The associated borrower's first name.\n- `borrowerId` - The associated borrower's ID—starts with `BO-...`.\n- `borrowerLastName` - The associated borrower's last name.\n- `borrowerMaidenLastName` - The associated borrower's maiden name.\n- `borrowerMiddleName` - The associated borrower's middle name.\n- `borrowerPortalUrl` - The associated borrower's loan portal page URL\n- `borrowerPreferredFirstName` - The associated borrower's preferred first name.\n- `borrowerPrimaryAddress` - The primary address for the associated borrower.\n\n## Collections Related\n\n- `collectionsAmountOverdue` - The total amount overdue for the active collections case, or\n  blank if there is no active case. (This is the same value as in the `totalAmounts.overdue`\n  field of the active collections case.)\n- `collectionsCaseCrmUrl` - A URL to the active collection case in the Peach CRM for the\n  associated borrower; or blank if there is no active case.\n- `consentsToAutodialedColl` — The value for the `AutodialedColl` consent. This consent\n  identifies if the associated borrower has consented to received autodialed collection\n  calls. If consent has been granted this value is `\"consented\"`, otherwise `\"revoked\"`. (If\n  there was an error fetching this information this field could be `\"error\"`.) See\n  <a href=\"/tags/Consent\">Consents</a> for more information on consents.\n",
                  "type": "string"
                },
                "outputName": {
                  "description": "Name of the column to use in exported CSV file. If not specified, then\nuse the `field` name.\n",
                  "nullable": true,
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "contactMatchingCriteria": {
            "description": "Settings for selecting a person's contact information to include in export data. An empty attribute\nis not allowed. Multiple attributes act as \"AND\" filters. E.g., a contact must\nhave an affiliation of \"self\" AND a label of \"home\" in order to match. If multiple\nvalues are specified for an attribute, the values act as \"OR\" conditions within that attribute.\n",
            "properties": {
              "affiliation": {
                "description": "Array of person's contact affiliations. If multiple values are provided, values act as OR condition.\n",
                "items": {
                  "enum": [
                    "self",
                    "spouse",
                    "parent",
                    "guardian",
                    "executer",
                    "administrator",
                    "otherRelative",
                    "legal",
                    "businessOwner",
                    "businessExecutive",
                    "businessEmployee"
                  ],
                  "type": "string"
                },
                "type": "array"
              },
              "contactType": {
                "description": "Array of person's contact types. Currently only \"Phone\" is supported.\n",
                "items": {
                  "enum": [
                    "phone"
                  ],
                  "type": "string"
                },
                "type": "array"
              },
              "label": {
                "description": "Array of person's contact labels. If multiple values are provided, values act as OR condition.\n",
                "items": {
                  "enum": [
                    "personal",
                    "home",
                    "work",
                    "military"
                  ],
                  "type": "string"
                },
                "type": "array"
              },
              "status": {
                "description": "Array of person's contact statuses. The values of this enumeration are used for getting the contact\nwith the highest priority. Items with lower number have higher priority. If multiple values are\nprovided, values act as OR condition.\n",
                "items": {
                  "enum": [
                    "primary",
                    "secondary",
                    "additional",
                    "archived"
                  ],
                  "type": "string"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "BorrowerCampaign": {
        "description": "A borrower campaign is part of a system for exporting contact information\nfor borrowers or sending communications to borrowers in bulk.\n\nA borrower campaign objects represents this campaign. It contains the information specifying from\nwhere a campaign derives its input borrower list, a schedule for execution, and the format\nfor exporting that list.\n\nThe input borrowers list is defined by a Redash query. See `redashQueryUrl` for details.\n",
        "properties": {
          "bulkSenderId": {
            "description": "The ID of an existing bulk sender to use for this campaign.\n",
            "nullable": true,
            "type": "string"
          },
          "contactExporterId": {
            "description": "The ID of an existing contact exporter to use for this campaign.\n",
            "nullable": true,
            "type": "string"
          },
          "redashApiKey": {
            "description": "The API key to use for querying Redash.\n\nYou can find your API key at https://{YOUR_REDASH_DOMAIN}/users/me.\n",
            "nullable": true,
            "type": "string"
          },
          "redashQueryUrl": {
            "anyOf": [
              {
                "description": "The URL of the Redash query from which to build the input.\n\nThe URL should look like https://{YOUR_REDASH_DOMAIN}/queries/{QUERY_ID}.\n\nThe output of this query is fed into the campaign system as input for\neach new campaign run. (Note that the query is re-run on each campaign run.)\n\nThe query must produce a query result with at least the column `borrowerId`, e.g.:\n\n```\nborrowerId\n4,\n5,\n...\n````\n\nNote that it is valid to use either public IDs (like `BO-XXXX-XXXX`) or internal\ndatabase IDs (integers).\n\nFor a detailed description of how to format your query result see other options\nfor this `redashQueryUrl` property.\n",
                "example": "https://acme-rd.peach.finance/queries/48",
                "maxLength": 150,
                "nullable": true,
                "title": "General",
                "type": "string"
              },
              {
                "description": "Running a campaign with a bulk sender.\n\nThe campaign bulk sender takes a Redash query result and maps\neach row to a call to\n<a href=\"#peach.communicator.handlers.handle_send\">the `/communcator/send` endpoint</a>.\n\n## Passing Custom Context Variables\n\nTo pass data to the `context` field of the `/communcator/send` endpoint, you can\ninclude `context.<...>` prefixed fields in the query result.\n\nA query result which looks like this:\n\n```\nborrowerId,context.animal,context.utensil\n100,bear,spoon\n103,beaver,fork\n...\n```\n\n...will end up in requests to `/communicator/send` endpoint like:\n\n```\n{\n  \"borrowerId\": \"BO-XXXX-XXXX\", // 100\n  \"context\": {\n    \"animal\": \"bear\",\n    \"utensil\": \"spoon\"\n  }\n}\n```\n\nand\n\n```\n{\n  \"borrowerId\": \"BO-YYYY-YYYY\",  // 103\n  \"context\": {\n    \"animal\": \"beaver\",\n    \"utensil\": \"fork\"\n  }\n}\n```\n\n## Calculated Context Variables\n\nCertain preconfigured interaction subjects will\nautomatically have their contexts populated if they are provided\nwith the appropriate input data.\n\nFor instance, a bulk sender with `autopayEnableReminder` subject will\nautomatically have these variables calculated and passed as context to\n`/communicator/send`: `paymentDate`, `paymentAmount` and `overdueAmount`.\n\nFor details on an individual interaction subject's requirements see the other\noptions for this `redashQueryUrl` property.\n",
                "maxLength": 150,
                "nullable": true,
                "title": "bulkSender",
                "type": "string"
              },
              {
                "description": "Running a campaign with a bulk sender subject of `paymentDueDateReminder`:\n\nThese messages are intended to remind a borrower they have a payment due.\n\n## Query Result Formatting\nThe Redash query results should look like:\n\n```\nborrowerId,loanId,loanPeriodId,\n100,200,300,\n103,205,305,\n...\n```\n\n> Note that it is valid to use either public IDs (like `BO-XXXX-XXXX`) or internal\ndatabase IDs (integers).\n\n## Calculated Context Variables\n\nThe following context variables are automatically calculated and passed to the\n`context` field of `/communcator/send`: `overdueAmount`, `paymentDate`, `paymentDays`, `paymentAmount`, `fulfilledAmount`, `remainingAmount`.\n\n## Targeting\nYou may select any borrower-loan and loan period. You MUST only select\nloan periods in the future.\n\n*WARNING:* Minimal sanity-checking is performed on which borrower-loan and\nloan periods are selected. If you select invalid values, e.g., a loan period ID\nin the past, then a message may still be sent.\n",
                "maxLength": 150,
                "nullable": true,
                "title": "bulkSender: paymentDueDateReminder",
                "type": "string"
              },
              {
                "description": "Running a campaign with a bulk sender subject of `loanOverdue{Nth}Notice`:\n\nThese messages are intended to remind a borrower of overdue loans.\n\n## Query Result Formatting\nThe Redash query results should look like:\n\n```\nborrowerId,loanId\n100,200,\n103,205,\n...\n```\n\n> Note that it is valid to use either public IDs (like `BO-XXXX-XXXX`) or internal\ndatabase IDs (integers).\n\n## Calculated Context Variables\n\nThe following context variables are automatically calculated and passed to the\n`context` field of `/communcator/send`: `overdueAmount`, `daysOverdue`.\n\n## Targeting\nYou MUST select borrower-loans which are in an overdue state.\n\n*WARNING:* Minimal sanity-checking is performed on which borrower-loan you are targeting.\nIf you select an invalid borrower-loan, e.g., a loan that is not overdue\nthen a message may still be sent.\n",
                "maxLength": 150,
                "nullable": true,
                "title": "bulkSender: loanOverdueNthNotice",
                "type": "string"
              },
              {
                "description": "Running a campaign with a bulk sender subject of `autopayPaymentReminder`:\n\nThese messages are intended to remind borrowers of upcoming payments\nscheduled via the autopay system.\n\n## Query Result Formatting\nThe Redash query results should look like:\n\n```\nborrowerId,loanId\n100,200,\n103,205,\n...\n```\n\n> Note that it is valid to use either public IDs (like `BO-XXXX-XXXX`) or internal\ndatabase IDs (integers).\n\n## Calculated Context Variables\n\nThe following context variables are automatically calculated and passed to the\n`context` field of `/communcator/send`: `overdueAmount`, `paymentDate`, `paymentDays`, `paymentAmount`, `fulfilledAmount`, `remainingAmount`.\n\n## Targeting\nYou MUST provide any target borrower-loans. For performance reasons you\nshould try to target loans which have autopay enabled.\n\nIf autopay is enabled for the given borrower-loan combination specified in\nthe query results row, then a message is sent if and only if there is\nan upcoming scheduled payment configured. A message is only sent for the *next*\nupcoming scheduled payment. The message will send regardless of how far in the future\nthe next upcoming payment date is.\n\n*WARNING:* Minimal sanity-checking is performed on which borrower-loan you are targeting.\nIf you select an invalid borrower-loan, e.g., a loan paid in full, a message\nmay still be sent.\n",
                "maxLength": 150,
                "nullable": true,
                "title": "bulkSender: autopayPaymentReminder",
                "type": "string"
              },
              {
                "description": "Running a campaign with a bulk sender subject of `loginFirstPaymentReminder`:\n\nThese messages are intended to remind borrowers of their first\nupcoming payment if they have not yet logged into the borrower\nportal.\n\n## Query Result Formatting\nThe Redash query results should look like:\n\n```\nborrowerId,loanId\n100,200,\n103,205,\n...\n```\n\n> Note that it is valid to use either public IDs (like `BO-XXXX-XXXX`) or internal\ndatabase IDs (integers).\n\n## Calculated Context Variables\n\nNo context variables are automatically calculated.\n\n## Targeting\nYou MUST provide any target borrower-loans.\n\n*WARNING:* Minimal sanity-checking is performed on which borrower-loan you are targeting.\nIf you select an invalid borrower-loan, e.g., a loan with payments already made, a message\nmay still be sent.\n",
                "maxLength": 150,
                "nullable": true,
                "title": "bulkSender: loginFirstPaymentReminder",
                "type": "string"
              },
              {
                "description": "Running a campaign with a bulk sender subject of `autopayEnableReminder`:\n\nThese messages remind borrowers to enable autopay.\n\n## Query Result Formatting\nThe Redash query results should look like:\n\n```\nborrowerId,loanId\n100,200,\n103,205,\n...\n```\n\n> Note that it is valid to use either public IDs (like `BO-XXXX-XXXX`) or internal\ndatabase IDs (integers).\n\n## Calculated Context Variables\n\nNo context variables are automatically calculated.\n\n## Targeting\nYou MUST provide any target borrower-loans.\n\n*WARNING:* No sanity-checking is performed on which borrower-loan you are targeting.\nIf you select a borrower that has already enabled autopay, they will still receive\na message here.\n",
                "maxLength": 150,
                "nullable": true,
                "title": "bulkSender: autopayEnableReminder",
                "type": "string"
              },
              {
                "description": "Running a campaign with a bulk sender subject of `autopayAmountChanged`:\n\nThese messages inform borrowers that the amount of their\n*next* autopayment has increased.\n\n## Query Result Formatting\nThe Redash query results should look like:\n\n```\nborrowerId,loanId\n100,200,\n103,205,\n...\n```\n\n> Note that it is valid to use either public IDs (like `BO-XXXX-XXXX`) or internal\ndatabase IDs (integers).\n\n## Calculated Context Variables\n\nThe following context variables are automatically calculated and passed to the\n`context` field of `/communcator/send`: `extraCharge`, `paymentDueDate`, `paymentAmount`.\n\n## Targeting\nYou MUST provide any target borrower-loans.\n\nLoans will be skipped if they do not have an upcoming autopay or it is detected\nthat `extraCharge == 0`.\n",
                "maxLength": 150,
                "nullable": true,
                "title": "bulkSender: autopayAmountChanged",
                "type": "string"
              },
              {
                "description": "Running a campaign with a bulk sender subject of `futurepayPaymentDueReminder`:\n\nThese messages inform borrowers that there is an upcoming\nfuture payment scheduled. (Note that \"autopay\" is a separate concept from\nscheduled future payment. e.g., a borrower can schedule a single future payment\ninstead of enabling autopay.)\n\n## Query Result Formatting\nThe Redash query results should look like (targetPaymentDate is optional):\n\n```\nborrowerId,loanId,targetPaymentDate\n100,200,2023-01-01,\n103,205,,\n...\n```\n\n> Note that it is valid to use either public IDs (like `BO-XXXX-XXXX`) or internal\n> database IDs (integers).\n> Note that `targetPaymentDate` is optional and if it is `null` or not included\n> then the message will be sent for only the *next* upcoming scheduled payment.\n\n## Calculated Context Variables\n\nThe following context variables are automatically calculated and passed to the\n`context` field of `/communcator/send`: `paymentDate`, `paymentAmount`, `overdueAmount`\n\n## Targeting\nYou MUST provide any target borrower-loans.\n\nLoans will be skipped if they do not have an scheduled future payment.\n",
                "maxLength": 150,
                "nullable": true,
                "title": "bulkSender: futurepayPaymentDueReminder",
                "type": "string"
              },
              {
                "description": "Running a campaign with a bulk sender subject of `loanRightToCurePersonalUnsecured`:\n\nThese messages inform borrowers that their loan is overdue and they need to\ntake action to prevent charge-off.\n\n## Query Result Formatting\nThe Redash query results should look like:\n\n```\nborrowerId,loanId\n100,200,\n103,205,\n...\n```\n\n> Note that it is valid to use either public IDs (like `BO-XXXX-XXXX`) or internal\n> database IDs (integers).\n\n## Calculated Context Variables\n\nThe following context variables are automatically calculated and passed to the\n`context` field of `/communcator/send`: `chargeOffDate`,`daysOverdue`,`daysToChargeOff`,`overdueBalance`.\n\n## Targeting\nYou MUST provide any target borrower-loans.\n\nLoans will be skipped if it is not overdue. Loans will be skipped if they are already\nin a `chargedOff` state.\n",
                "maxLength": 150,
                "nullable": true,
                "title": "bulkSender: loanRightToCurePersonalUnsecured",
                "type": "string"
              },
              {
                "description": "Running a campaign with a bulk sender subject of `cardExpiresReminder`:\n\nThese messages inform borrowers that their payment card will expire.\n\n## Query Result Formatting\nThe Redash query results should look like (lastFour is optional):\n\n```\nborrowerId,loanId,lastFour\n100,200,1234\n103,205,5678\n...\n```\n\n> Note that it is valid to use either public IDs (like `BO-XXXX-XXXX`) or internal\n> database IDs (integers).\n> Note that `lastFour` is an optional column\n\n## Calculated Context Variables\n\nThe following context variables are automatically calculated and passed to the\n`context` field of `/communcator/send`: `month`, `year`.\n\n## Targeting\nYou MUST provide any target borrower-loans.\n\nLoans will be skipped if there are no cards associated with the loan which are\nexpiring *in the future*. If there are multiple cards associated with a loan expiring,\nthen the *next* expiring card is selected.\n\nYou MAY optionally provide a `lastFour` column in your query results, in which\ncase a card's last four digits must match that, or the loan will be skipped.\n",
                "maxLength": 150,
                "nullable": true,
                "title": "bulkSender: cardExpiresReminder",
                "type": "string"
              }
            ]
          },
          "schedule": {
            "description": "The schedule to run a campaign on, given in Peachy crontab time\nspecification format.\n\nPeachy crontab is an extension to crontab(5) that adds a\ntime specification value 'P', which means \"Peach\ndecides\". Currently, the minute and hour fields must be 'P' (i.e.,\nyou can not specify the time of the day), and the\nday-of-month, month, and day-of-week fields must NOT be 'P'.\n\nSome examples of Peachy crontabs:\n  `P P 1,15 * *`: Run on the 1st and 15th of every month\n  `P P * * wed`: Run every Wednesday\n  `P P * 10 *`: Run every day in October\n\nSee https://crontab.guru/ for an expression builder.\n\nIf `null` the campaign does not run on a schedule (and therefore\nmust be run manually).\n",
            "nullable": true,
            "type": "string"
          },
          "sftpSettings": {
            "description": "The SFTP settings to be used to upload the results of a campaign run.\n\nAt the completion of a campaign run, if these settings are specified, they\nare used to SFTP upload the files created as a result of the run.\n\nThese files include the exporter contacts .csv file and the log file.\n\nThe file names for these files will be:\n- `{CAMPAIGN_ID}_{TIMESTAMP}_query_results.csv`\n- `{CAMPAIGN_ID}_{EXPORTER_ID}_{TIMESTAMP}.csv`\n- `{CAMPAIGN_ID}_{EXPORTER_ID}_{TIMESTAMP}.csv`\n- `{CAMPAIGN_ID}_{EXPORTER_ID}_{TIMESTAMP}_log.txt`\n",
            "nullable": true,
            "properties": {
              "cdDir": {
                "description": "The directory to change to (via `cd`) on the server before performing the\nfile upload.\n",
                "type": "string"
              },
              "host": {
                "description": "Host of the SFTP server with which to connect.\n\nThis may be specified like `{hostname}` or `{hostname}:{port}`.\n\nIf no port is specified the default SFTP port of 22 is assumed.\n",
                "example": "sftp.acme.com:23",
                "type": "string"
              },
              "password": {
                "description": "Note: the password field is encrypted-at-rest using the secure tokenizer.\n",
                "type": "string"
              },
              "username": {
                "type": "string"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "BorrowerCampaignFull": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseWithExternalIdMixin"
          },
          {
            "$ref": "#/components/schemas/BorrowerCampaign"
          }
        ]
      },
      "BorrowerCampaignRunStatus": {
        "description": "The status of a campaign run",
        "enum": [
          "failed",
          "success",
          "processing",
          "initializing"
        ],
        "type": "string"
      },
      "BorrowerCampaignRun": {
        "description": "A borrower campaign \"run\" is an object representing an execution of a campaign.\nIt contains metadata about the status of the execution of the run and the results\nof the run, which are generally exported contact lists and logs.\n",
        "properties": {
          "availableFiles": {
            "description": "The list of files currently available for download via this campaign run's `.../download` endpoint.\n",
            "items": {
              "enum": [
                "query_results.csv",
                "campaign_input.json",
                "contacts.csv",
                "log.txt"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "borrowerCampaignId": {
            "description": "The ID of the borrower campaign to which this campaign run belongs.",
            "type": "string"
          },
          "campaignInputFileId": {
            "type": "string",
            "writeOnly": true
          },
          "contactsOutputFileId": {
            "type": "string",
            "writeOnly": true
          },
          "logFileId": {
            "type": "string",
            "writeOnly": true
          },
          "queryResultsFileId": {
            "type": "string",
            "writeOnly": true
          },
          "status": {
            "$ref": "#/components/schemas/BorrowerCampaignRunStatus"
          }
        },
        "type": "object"
      },
      "BaseCardIssuerPut": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "companyId": {
                "description": "The unique company identifier.\n",
                "readOnly": true,
                "type": "string"
              },
              "issuerEventsSubscriber": {
                "description": "Defines whether Peach or the lender will subscribe to the card issuer's events. This is usually decided based on which party will be involved in the authorization flow. Regardless of which option is selected, the lender should provide accountIdentifier information on the card object in order for Peach to be able to get information from the issuer required for servicing the loan.\n- `peach` - Peach will consume card issuer events in order to manage the card on behalf of the lender. Peach may provide the issuer information necessary to make approve/decline decisions as part of the auth flow, but the lender and issuer can still be entirely responsible for card authorization.\n- `lender` - Lender will consume issuer events and make API calls to Peach to ensure balances remain in sync between issuer and servicer. Using this option, the lender and/or issuer are responsible for card authorization.\n",
                "enum": [
                  "peach",
                  "lender"
                ],
                "type": "string"
              },
              "status": {
                "description": "The status of the card issuer.\n\n`draft` - the card issuer is in the process of being configured and is not yet ready to be used.\n\n`active` - the card issuer is ready to manage cards. Only one `cardIssuer` (e.g. `marqeta`) can be `active`.\n\n`deprecated` - the payment issuer was deprecated, and new cards cannot be managed.\n",
                "enum": [
                  "draft",
                  "active",
                  "deprecated"
                ],
                "type": "string"
              },
              "syncCardDetails": {
                "default": true,
                "description": "If `true`, Peach will sync the card details from the card issuer automatically. If `false`, the lender will update the card details manually.\n",
                "type": "boolean"
              }
            },
            "type": "object"
          }
        ]
      },
      "MarqetaCardIssuer": {
        "properties": {
          "cardIssuerType": {
            "description": "The name of the card issuer/vendor.\n\n`marqeta` - Peach system will use the Marqeta API to manage cards.\n\n`lithic` - Peach system will use the Lithic API to manage cards.\n\n`galileo` - Peach system will use the Galileo API to manage cards.\n",
            "enum": [
              "marqeta"
            ],
            "type": "string"
          },
          "marqetaAdminAccessToken": {
            "description": "The Marqeta admin access token.",
            "type": "string",
            "writeOnly": true
          },
          "marqetaApplicationToken": {
            "description": "The Marqeta application token.",
            "type": "string",
            "writeOnly": true
          },
          "marqetaJitFundingEnabled": {
            "default": false,
            "description": "If enabled, configures a JIT funding source on Marqeta and uses Peach for authorizations. Only applies to credit cards.",
            "type": "boolean"
          },
          "marqetaJitFundingSourceToken": {
            "description": "The Marqeta JIT funding source token. Only applies to credit cards.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "marqetaApplicationToken",
          "marqetaAdminAccessToken"
        ],
        "type": "object"
      },
      "VirtualCardIssuerPut": {
        "type": "object"
      },
      "VirtualCardIssuer": {
        "allOf": [
          {
            "$ref": "#/components/schemas/VirtualCardIssuerPut"
          },
          {
            "properties": {
              "cardType": {
                "description": "The type of card issued.\n",
                "enum": [
                  "virtualCard"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "MarqetaVirtualCardIssuer": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseCardIssuerPut"
          },
          {
            "$ref": "#/components/schemas/MarqetaCardIssuer"
          },
          {
            "$ref": "#/components/schemas/VirtualCardIssuer"
          }
        ],
        "title": "Marqeta Virtual Card"
      },
      "UsageRestrictions": {
        "properties": {
          "countries": {
            "description": "The list of countries where the card cannot be used. Any attempt to authorize the card for a\npurchase with a country in this list will be declined.\n",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "currencies": {
            "description": "The list of invalid currencies for card transactions. Any attempt to authorize the card for a\npurchase made in a currency in this list will be declined.\n",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "merchantCategoryCodes": {
            "description": "The list of merchant category codes to restrict. Any attempt to authorize the card for a purchase\nwith a merchant category code in the list will be declined.\n",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "merchantIds": {
            "description": "The list of specific merchant ID's where the card cannot be used. Any attempt to authorize\nthe card for a purchase with a merchant ID in the list will be declined.\n",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "merchantNamesRegex": {
            "description": "The list of merchant names where the card cannot be used. The format is a regular expression.\nPlease contact the Peach team to see examples of the merchant names.\nPeach will use matching logic using the regex value to decline transactions for merchants included in this list.\nLenders need to carefully assess this restriction because of the challenge in matching names in this\nlist to the merchant names provided during authorization.\n",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "CreditCardIssuerPut": {
        "properties": {
          "program": {
            "properties": {
              "auth": {
                "properties": {
                  "authLogic": {
                    "description": "Only applicable if `authManagedBy = peach`",
                    "properties": {
                      "authCustomFunctionId": {
                        "description": "The identifier of the authorization code referenced for executing auth logic. This is a custom function. Please coordinate with Peach before passing a value.\nOnly applicable if `authLogic = custom`\n",
                        "type": "string"
                      },
                      "authThresholdAmount": {
                        "description": "The amount over which the `creditLimit` may be exceeded. If provided, the system will approve a purchase that exceeds the `creditLimit` by `authThresholdAmount` amount. Keep in mind that Draw can have a credit limit (it's optional as Line of Credit always has a credit limit). If a draw has a credit limit, this threshold will be also checked on the draw level. Keep empty/null if not applicable.\n\nFor example:\n- Credit limit is $1000.00.\n- Current utilization is $980.00.\n- `authThresholdAmount` is $20.00.\n- Purchase of $33.00 will be approved. $980.00 + $33.00 < $1000.00 + $20.00.\n\nBoth `authThresholdAmount` and `authThresholdPercentage` values can be provided.\n",
                        "type": "integer"
                      },
                      "authThresholdPercentage": {
                        "description": "The percentage over which the `creditLimit` may be exceeded. If provided, the system will approve a purchase that exceeds the `creditLimit` by `authThresholdPercentage` percentage. Keep in mind that Draw can have a credit limit (it's optional as Line of Credit always has a credit limit). If a draw has a credit limit, this threshold will be also checked on the draw level. Keep empty/null if not applicable.\nThe format is decimal. For example, 0.01 is 1% and 0.15 is 15%.\n\nFor example:\n- Credit limit is $1000.00.\n- Current utilization is $980.00.\n- `authThresholdPercentage` is 0.05 (aka 5.00%).\n- Purchase of $33.00 will be approved. $980.00 + $33.00 < $1000.00 * (1 + 0.05).\n\nBoth `authThresholdAmount` and `authThresholdPercentage` values can be provided.\n",
                        "format": "float",
                        "type": "number"
                      }
                    },
                    "type": "object"
                  },
                  "authManagedBy": {
                    "default": "lender",
                    "description": "Indicates who is responsible for purchase authorization logic.\n",
                    "enum": [
                      "lender",
                      "peach"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "drawMappingEnabled": {
                "description": "Enables lenders to allow Peach to automatically associate purchases with specific draws based on the `drawType` selected\nduring draw creation.\n\nFor example, if `drawMappingEnabled` is `true`, Peach is receiving card issuer events, and a draw is created with\n`drawType=\"cashAdvance\"`, Peach will automatically associate specific transaction types with the `cashAdvance` draw based\non internal mapping logic.\n\nIf `drawMappingEnabled` is `false` and there is more than one draw on the card credit product, Peach's system will add\nthe purchase to an arbitrarily chosen draw.\n",
                "nullable": true,
                "type": "boolean"
              },
              "usageRestrictions": {
                "allOf": [
                  {
                    "description": "Details on restrictions applied to the card product. Leaving the attributes blank indicates that the card can be used in any capacity. Including data for any of the attributes indicates that card usage should be restricted and NOT used in that capacity. E.g. currencies = USD means that purchases may NOT be made using USD currency.\n"
                  },
                  {
                    "$ref": "#/components/schemas/UsageRestrictions"
                  }
                ]
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "CreditCardIssuer": {
        "allOf": [
          {
            "properties": {
              "cardType": {
                "description": "The type of card issued.\n",
                "enum": [
                  "creditCard"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/CreditCardIssuerPut"
          }
        ]
      },
      "MarqetaCreditCardIssuer": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseCardIssuerPut"
          },
          {
            "$ref": "#/components/schemas/MarqetaCardIssuer"
          },
          {
            "$ref": "#/components/schemas/CreditCardIssuer"
          }
        ],
        "title": "Marqeta Credit Card"
      },
      "LithicCardIssuer": {
        "properties": {
          "cardIssuerType": {
            "description": "The name of the card issuer/vendor.\n\n`marqeta` - Peach system will use the Marqeta API to manage cards.\n\n`lithic` - Peach system will use the Lithic API to manage cards.\n\n`galileo` - Peach system will use the Galileo API to manage cards.\n",
            "enum": [
              "lithic"
            ],
            "type": "string"
          },
          "lithicApiKey": {
            "description": "The Lithic API key.",
            "type": "string",
            "writeOnly": true
          },
          "lithicAsaWebhookSecret": {
            "description": "The Lithic ASA webhook secret.",
            "type": "string",
            "writeOnly": true
          },
          "lithicEventsWebhookSecret": {
            "description": "The Lithic events webhook secret.",
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "lithicApiKey"
        ],
        "type": "object"
      },
      "LithicCreditCardIssuer": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseCardIssuerPut"
          },
          {
            "$ref": "#/components/schemas/LithicCardIssuer"
          },
          {
            "$ref": "#/components/schemas/CreditCardIssuer"
          }
        ],
        "title": "Lithic Credit Card"
      },
      "GalileoCardIssuer": {
        "properties": {
          "cardIssuerType": {
            "description": "The name of the card issuer/vendor.\n\n`marqeta` - Peach system will use the Marqeta API to manage cards.\n\n`lithic` - Peach system will use the Lithic API to manage cards.\n\n`galileo` - Peach system will use the Galileo API to manage cards.\n",
            "enum": [
              "galileo"
            ],
            "type": "string"
          },
          "galileoApiLogin": {
            "description": "The Galileo API login.",
            "type": "string",
            "writeOnly": true
          },
          "galileoApiTransKey": {
            "description": "The Galileo API key.",
            "type": "string",
            "writeOnly": true
          },
          "galileoBaseUrl": {
            "description": "The Galileo base URL.",
            "type": "string"
          },
          "galileoProviderId": {
            "description": "The Galileo provider ID.",
            "type": "string"
          }
        },
        "required": [
          "galileoApiLogin",
          "galileoApiTransKey",
          "galileoProviderId",
          "galileoBaseUrl"
        ],
        "type": "object"
      },
      "GalileoVirtualCardIssuer": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseCardIssuerPut"
          },
          {
            "$ref": "#/components/schemas/GalileoCardIssuer"
          },
          {
            "$ref": "#/components/schemas/VirtualCardIssuer"
          }
        ],
        "title": "Galileo Virtual Card"
      },
      "GalileoCreditCardIssuer": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseCardIssuerPut"
          },
          {
            "$ref": "#/components/schemas/GalileoCardIssuer"
          },
          {
            "$ref": "#/components/schemas/CreditCardIssuer"
          }
        ],
        "title": "Galileo Credit Card"
      },
      "QoloCardIssuer": {
        "properties": {
          "cardIssuerType": {
            "description": "The name of the card issuer/vendor.\n\n`marqeta` - Peach system will use the Marqeta API to manage cards.\n\n`lithic` - Peach system will use the Lithic API to manage cards.\n\n`galileo` - Peach system will use the Galileo API to manage cards.\n\n`qolo` - Peach system will use the Qolo API to manage cards.\n",
            "enum": [
              "qolo"
            ],
            "type": "string"
          },
          "qoloApiKey": {
            "description": "The Qolo API Key.",
            "type": "string",
            "writeOnly": true
          },
          "qoloLoginId": {
            "description": "The Qolo login ID.",
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "qoloLoginId",
          "qoloApiKey"
        ],
        "type": "object"
      },
      "QoloCreditCardIssuer": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseCardIssuerPut"
          },
          {
            "$ref": "#/components/schemas/QoloCardIssuer"
          },
          {
            "$ref": "#/components/schemas/CreditCardIssuer"
          }
        ],
        "title": "Qolo Credit Card"
      },
      "CardIssuer": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/MarqetaVirtualCardIssuer"
          },
          {
            "$ref": "#/components/schemas/MarqetaCreditCardIssuer"
          },
          {
            "$ref": "#/components/schemas/LithicCreditCardIssuer"
          },
          {
            "$ref": "#/components/schemas/GalileoVirtualCardIssuer"
          },
          {
            "$ref": "#/components/schemas/GalileoCreditCardIssuer"
          },
          {
            "$ref": "#/components/schemas/QoloCreditCardIssuer"
          }
        ]
      },
      "MarqetaCardIssuerPut": {
        "properties": {
          "cardIssuerType": {
            "description": "The name of the card issuer/vendor.\n\n`marqeta` - Peach system will use the Marqeta API to manage cards.\n\n`lithic` - Peach system will use the Lithic API to manage cards.\n\n`galileo` - Peach system will use the Galileo API to manage cards.\n",
            "enum": [
              "marqeta"
            ],
            "readOnly": true,
            "type": "string"
          },
          "marqetaApplicationToken": {
            "description": "The Marqeta application token.",
            "type": "string",
            "writeOnly": true
          },
          "marqetaJitFundingEnabled": {
            "default": false,
            "description": "If enabled, configures a JIT funding source on Marqeta and uses Peach for authorizations.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "MarqetaVirtualCardIssuerPut": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseCardIssuerPut"
          },
          {
            "$ref": "#/components/schemas/MarqetaCardIssuerPut"
          },
          {
            "$ref": "#/components/schemas/VirtualCardIssuerPut"
          }
        ],
        "title": "Marqeta Virtual Card"
      },
      "MarqetaCreditCardIssuerPut": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseCardIssuerPut"
          },
          {
            "$ref": "#/components/schemas/MarqetaCardIssuerPut"
          },
          {
            "$ref": "#/components/schemas/CreditCardIssuerPut"
          }
        ],
        "title": "Marqeta Credit Card"
      },
      "LithicCardIssuerPut": {
        "properties": {
          "lithicApiKey": {
            "description": "The Lithic API key.",
            "type": "string",
            "writeOnly": true
          },
          "lithicAsaWebhookSecret": {
            "description": "The Lithic ASA webhook secret.",
            "type": "string",
            "writeOnly": true
          },
          "lithicEventsWebhookSecret": {
            "description": "The Lithic events webhook secret.",
            "type": "string",
            "writeOnly": true
          }
        },
        "type": "object"
      },
      "LithicCreditCardIssuerPut": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseCardIssuerPut"
          },
          {
            "$ref": "#/components/schemas/LithicCardIssuerPut"
          },
          {
            "$ref": "#/components/schemas/CreditCardIssuerPut"
          }
        ],
        "title": "Lithic Credit Card"
      },
      "GalileoCardIssuerPut": {
        "properties": {
          "galileoApiLogin": {
            "description": "The Galileo API login.",
            "type": "string",
            "writeOnly": true
          },
          "galileoApiTransKey": {
            "description": "The Galileo API key.",
            "type": "string",
            "writeOnly": true
          },
          "galileoBaseUrl": {
            "description": "The Galileo base URL.",
            "type": "string"
          },
          "galileoProviderId": {
            "description": "The Galileo provider ID.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GalileoVirtualCardIssuerPut": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseCardIssuerPut"
          },
          {
            "$ref": "#/components/schemas/GalileoCardIssuerPut"
          },
          {
            "$ref": "#/components/schemas/VirtualCardIssuerPut"
          }
        ],
        "title": "Galileo Virtual Card"
      },
      "GalileoCreditCardIssuerPut": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseCardIssuerPut"
          },
          {
            "$ref": "#/components/schemas/GalileoCardIssuerPut"
          },
          {
            "$ref": "#/components/schemas/CreditCardIssuerPut"
          }
        ],
        "title": "Galileo Credit Card"
      },
      "QoloCardIssuerPut": {
        "properties": {
          "qoloApiKey": {
            "description": "The Qolo API Key.",
            "type": "string",
            "writeOnly": true
          },
          "qoloLoginId": {
            "description": "The Qolo login ID.",
            "type": "string",
            "writeOnly": true
          }
        },
        "type": "object"
      },
      "QoloCreditCardIssuerPut": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseCardIssuerPut"
          },
          {
            "$ref": "#/components/schemas/QoloCardIssuerPut"
          },
          {
            "$ref": "#/components/schemas/CreditCardIssuerPut"
          }
        ],
        "title": "Qolo Credit Card"
      },
      "CardIssuerPut": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/MarqetaVirtualCardIssuerPut"
          },
          {
            "$ref": "#/components/schemas/MarqetaCreditCardIssuerPut"
          },
          {
            "$ref": "#/components/schemas/LithicCreditCardIssuerPut"
          },
          {
            "$ref": "#/components/schemas/GalileoVirtualCardIssuerPut"
          },
          {
            "$ref": "#/components/schemas/GalileoCreditCardIssuerPut"
          },
          {
            "$ref": "#/components/schemas/QoloCreditCardIssuerPut"
          }
        ]
      },
      "VersionedMixin": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "companyId": {
                "description": "The company identifier of the type.\n",
                "readOnly": true,
                "type": "string"
              },
              "createdBy": {
                "nullable": true,
                "readOnly": true,
                "type": "integer"
              },
              "deprecatedAt": {
                "format": "date-time",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "deprecatedBy": {
                "nullable": true,
                "readOnly": true,
                "type": "integer"
              },
              "deprecationMessage": {
                "maxLength": 100,
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "derivedFromTypeId": {
                "default": "0",
                "description": "The type identifier that this type was derived from.\n",
                "readOnly": true,
                "type": "string"
              },
              "description": {
                "default": "",
                "description": "The description for instances of that type. The description could be shown in UI.\n",
                "maxLength": 500,
                "type": "string"
              },
              "name": {
                "default": "",
                "description": "The default name for instances of that type. The name could be shown in UI.\n",
                "maxLength": 50,
                "type": "string"
              },
              "publishedAt": {
                "format": "date-time",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "publishedBy": {
                "nullable": true,
                "readOnly": true,
                "type": "integer"
              },
              "status": {
                "default": "draft",
                "description": "The type status. A new type is normally created in the `draft` status. After you finish\nwith the type configurations and ready to create instances of that type, update the status to `active`.\n\nYou can also update an existing type. Each update will create a new version of the type.\nOnly one version of the type can be `active`. We'll automatically change the previous version to `deprecated`.\nInstances in-flight will continue to use the previous version(s).\nNew instances will be created using the `active` version.\n",
                "enum": [
                  "draft",
                  "active",
                  "deprecated"
                ],
                "type": "string"
              },
              "version": {
                "default": 1,
                "description": "The type version.\n",
                "readOnly": true,
                "type": "integer"
              }
            },
            "type": "object"
          }
        ]
      },
      "CaseTypeAssociation": {
        "description": "Objects are related to `CaseType`, and may have an optional label.\n",
        "properties": {
          "objectId": {
            "description": "Peach unique identifier for the associated object.",
            "type": "integer"
          },
          "objectType": {
            "description": "Types of objects that can be associated with the case.",
            "enum": [
              "doNotInteractType",
              "notificationType",
              "loanType"
            ],
            "type": "string"
          }
        },
        "title": "objectAssociation",
        "type": "object"
      },
      "DataType": {
        "description": "The field type of data. Used for properly parsing the field value.",
        "enum": [
          "integer",
          "real",
          "string",
          "boolean",
          "dateTime"
        ],
        "type": "string"
      },
      "FieldName": {
        "description": "Name of the field as known in the API (e.g. `typeId` not `type_id`).\n",
        "type": "string"
      },
      "CustomFieldSchema": {
        "properties": {
          "dataType": {
            "$ref": "#/components/schemas/DataType"
          },
          "default": {
            "anyOf": [
              {
                "nullable": true,
                "type": "number"
              },
              {
                "nullable": true,
                "type": "string"
              },
              {
                "nullable": true,
                "type": "boolean"
              }
            ],
            "description": "The default value of the field."
          },
          "description": {
            "default": "",
            "description": "A helpful description of what the field is and does. Displayed in UI.",
            "maxLength": 500,
            "type": "string"
          },
          "displayOrder": {
            "description": "Desired order of the field appearance in UI. Use whole numbers. For example, `3` will be placed after `1`.",
            "nullable": true,
            "type": "integer"
          },
          "displayPostfix": {
            "description": "A postfix to display after the field value. For example, a field `amount` can have a postfix `USD` to display `100 USD`.\n",
            "nullable": true,
            "type": "string"
          },
          "displayPrefix": {
            "description": "A prefix to display before the field value. For example, a field `amount` can have a prefix `$` to display `$100`.\n",
            "nullable": true,
            "type": "string"
          },
          "fieldName": {
            "$ref": "#/components/schemas/FieldName"
          },
          "name": {
            "default": "",
            "description": "Field name as displayed in UI.",
            "maxLength": 50,
            "type": "string"
          },
          "required": {
            "default": false,
            "description": "Indicates whether this field is required on a new case creation.",
            "type": "boolean"
          },
          "validation": {
            "description": "Validation rules",
            "properties": {
              "enum": {
                "description": "The list of valid values. Applicable to `dataType=string`, `integer` and `real`.",
                "example": [
                  1,
                  10,
                  100
                ],
                "items": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    }
                  ]
                },
                "type": "array"
              },
              "length": {
                "description": "The length of the field if applicable. For example, `string` can be limited to 50 characters.",
                "minimum": 1,
                "nullable": true,
                "type": "integer"
              },
              "maxValue": {
                "description": "The maximum value. Applicable to `dataType=integer` and `real`.",
                "example": 100,
                "type": "number"
              },
              "minValue": {
                "description": "The minimum value. Applicable to `dataType=integer` and `real`.",
                "example": 0,
                "type": "number"
              }
            },
            "type": "object"
          }
        },
        "required": [
          "name",
          "fieldName",
          "dataType"
        ],
        "title": "customFieldSchema",
        "type": "object"
      },
      "CaseType": {
        "allOf": [
          {
            "$ref": "#/components/schemas/VersionedMixin"
          },
          {
            "properties": {
              "associations": {
                "description": "Associated objects to the case.",
                "items": {
                  "$ref": "#/components/schemas/CaseTypeAssociation"
                },
                "readOnly": true,
                "type": "array"
              },
              "customFieldSchemas": {
                "description": "Array of custom fields definitions.\n",
                "items": {
                  "$ref": "#/components/schemas/CustomFieldSchema"
                },
                "nullable": true,
                "type": "array"
              },
              "loanTypeId": {
                "description": "The optional identifier of a loan type. This is useful when a\nlender has two or more financial products and need different case types per product.\n",
                "type": "string"
              },
              "object": {
                "default": "caseType",
                "enum": [
                  "caseType"
                ],
                "readOnly": true,
                "type": "string"
              },
              "smartReviews": {
                "properties": {
                  "config": {
                    "description": "Configuration fields for when to create reminder\ntasks. Varies per case-type. See <a\nhref=\"/api-docs/api-public/smart-reviews\">Smart Reviews</a> for more\nin-depth documentation.\n",
                    "nullable": true,
                    "type": "object"
                  },
                  "enable": {
                    "description": "Enable or disable using these settings to create reminder tasks.\n",
                    "type": "boolean"
                  }
                },
                "type": "object"
              },
              "workflowTypeId": {
                "description": "The optional identifier of a workflow type. Instances of the workflow\ntype are created for processing cases of this type.\n",
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "caseType"
      },
      "BaseCaseType": {
        "enum": [
          "generic",
          "bankruptcy",
          "ceaseCommunication",
          "collection",
          "deceased",
          "disputeOfDebt",
          "federalEmergency",
          "identityTheft",
          "legalAction",
          "militaryDuty",
          "debtValidation",
          "oFACSanctionedIndividual",
          "disputeOfPurchase",
          "creditBureauDispute"
        ],
        "type": "string"
      },
      "CaseTypePostOnly": {
        "allOf": [
          {
            "properties": {
              "caseType": {
                "$ref": "#/components/schemas/BaseCaseType",
                "description": "The base case type for your case. If you choose any special type, except for `generic`, your case\ntype will inherit all the attributes of that special type.\n"
              },
              "copyOf": {
                "description": "The ID of case type to copy and advance the version number\n",
                "type": "integer"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/CaseType"
          }
        ],
        "title": "caseType"
      },
      "InteractionStatus": {
        "description": "The status of an interaction.\n\n`status` is important, as it can impact future interactions.\nFor instance, in jurisdictions which cap the number\nof outbound collection communications to a borrower,\n`status=failed` interactions do not count against the legal allotment.\n\nInteraction `status` can be updated as the interaction status changes.\nFor example, when an email is sent, set the status to `attempted`. If\nthe email is opened, set the status to `succeeded`. If the email bounces,\nset the status to `failed`. `attempted` is assumed to be a successful\ninteraction. Optionally, you can also use 'statusDetails' to provide\nadditional details about status.\n\n## In-Progress interactions\n\nSome interactions—like an email—take place at a single point in time, others\nmight be ongoing for many minutes—like a phone call.\n\nOngoing interactions like voice and chat may have their status set to `inProgress`.\n\n## Scheduled interactions\n\nSome interactions might be scheduled for the future. These interactions\nhave a status of `scheduled`. If this scheduled interaction is unscheduled\nthen it has a status of `canceled`.\n\n## Null\n\nNote that `null` is not a valid status name but rather can be used to specify a\nquery for interactions with a `status` of `null`\n",
        "enum": [
          "attempted",
          "succeeded",
          "failed",
          "scheduled",
          "canceled",
          "inProgress",
          "null"
        ],
        "type": "string"
      },
      "InteractionChannel": {
        "description": "The channel where interactions with a borrower occur. For example, an\noutbound call with a borrower is considered a `voice` interaction.\n\n**DEPRECATED**: The `fax` channel is deprecated: new interactions\ncannot be created with the `fax` channel. It will be removed\nfrom completely in the future.\n",
        "enum": [
          "voice",
          "email",
          "fax",
          "text",
          "chat",
          "mail",
          "gui",
          "document"
        ],
        "nullable": true,
        "type": "string"
      },
      "ObjectAssociation": {
        "description": "Objects are related to case.\n",
        "properties": {
          "objectId": {
            "description": "Peach unique identifier for the associated object.",
            "type": "string"
          },
          "objectType": {
            "description": "Types of objects that can be associated with the case.",
            "enum": [
              "document",
              "interaction",
              "loan",
              "case",
              "transaction"
            ],
            "type": "string"
          }
        },
        "title": "objectAssociation",
        "type": "object"
      },
      "CaseAssociation": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ObjectAssociation"
          },
          {
            "properties": {
              "relation": {
                "default": "related",
                "description": "This is only applicable to `objectType=case` associations.\n\nThe way to read the relation is: `caseId` `relation` `objectId`.\nFor example:\n\n- There is an existing `caseId=111` `caseType=identityTheft`.\n- There is an existing `caseId=222` `caseType=debtValidation`.\n- The identity theft case is blocking verification of debt. To represent that relation:\n- `caseId=111` in path parameter.\n- `relation=blocks` in body.\n- `objectId=222` in body.\n",
                "enum": [
                  "related",
                  "causes",
                  "blocks",
                  "duplicate"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "description": "Objects are related to case, and may have an optional label.\n",
        "title": "caseAssociation"
      },
      "CaseConfigType": {
        "description": "Summary information about the case type configuration which produced the case.\n",
        "properties": {
          "base": {
            "type": "string"
          },
          "derivedFromTypeId": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          }
        },
        "readOnly": true,
        "title": "caseConfigType",
        "type": "object"
      },
      "UserActionInfo": {
        "nullable": true,
        "properties": {
          "descriptor": {
            "description": "Short description of the user who performed the action.\nDifferent systems may have different data available for a given user. The descriptor\ngives the best available short description of the user. It prefers names, then email addresses,\nthen related IDs.\n\ne.g.,\n- \"Borrower Tim Jones\"\n- \"Borrower BO-ABCD-1234\"\n- \"Peach Service User\"\n- \"Agent Abigail Smith\"\n- \"Agent bob@acme.com\"\n- \"Agent EM-ABCD-1234\"\n",
            "example": "Agent bob@acme.com",
            "nullable": true,
            "type": "string"
          },
          "employee": {
            "nullable": true,
            "properties": {
              "id": {
                "description": "The employee's ID",
                "type": "string"
              }
            },
            "type": "object"
          },
          "id": {
            "description": "The unique identifier of the user who performed the action.",
            "type": "string"
          },
          "name": {
            "description": "The name of the user who performed the action.",
            "nullable": true,
            "type": "string"
          },
          "userType": {
            "$ref": "#/components/schemas/UserType"
          }
        },
        "readOnly": true,
        "type": "object"
      },
      "CaseCreationProcedure": {
        "description": "The field indicating which procedure originally created this case.\n\nThis is used to mark when a system like, for instance, Compliance Guard \nautomatically created a case, which allows a case to be \ndifferentiated from, for instance, manually created ones.\n",
        "enum": [
          "automatedCollectionsDetection",
          "automatedOfacDetection",
          "automatedBankruptcyDetection",
          "automatedDeceasedDetection",
          "automatedScraDetection",
          "supercasePopulationCommit"
        ],
        "nullable": true,
        "type": "string"
      },
      "CustomFields": {
        "additionalProperties": true,
        "description": "Custom fields are JSON key-value mappings. They are described by a `customFieldSchemas` property in the corresponding\n`caseType`. This means that arbitrary fields cannot be added to in-flight cases.\n",
        "nullable": true,
        "title": "customFields",
        "type": "object"
      },
      "MatchDetails": {
        "description": "The fields that are for what levels the person is matched to a monitoring hit (i.e. bankruptcy)\n",
        "properties": {
          "addressMatch": {
            "enum": [
              "match",
              "partialMatch",
              "noMatch",
              "notApplicable"
            ],
            "type": "string"
          },
          "dateOfBirthMatch": {
            "enum": [
              "match",
              "partialMatch",
              "noMatch",
              "notApplicable"
            ],
            "type": "string"
          },
          "externalMatchCode": {
            "nullable": true,
            "type": "string"
          },
          "last4SSNMatch": {
            "enum": [
              "match",
              "partialMatch",
              "noMatch",
              "notApplicable"
            ],
            "type": "string"
          },
          "matchDoneBy": {
            "enum": [
              "dataVendor",
              "peach"
            ],
            "type": "string"
          },
          "nameMatch": {
            "enum": [
              "match",
              "partialMatch",
              "noMatch",
              "notApplicable"
            ],
            "type": "string"
          },
          "ssnMatch": {
            "enum": [
              "match",
              "partialMatch",
              "noMatch",
              "notApplicable"
            ],
            "type": "string"
          }
        },
        "title": "matchDetails",
        "type": "object"
      },
      "MetaData": {
        "description": "Store any type of key/value pairs in the form of a JSON dictionary.",
        "nullable": true,
        "type": "object"
      },
      "ProcessOutcome": {
        "description": "The outcome of a process, case, complaint, or dispute.\n- If found to be valid, set value to `approved`.\nThis might impact debt collection efforts.\n- If dismissed, set value to `denied`.\nThis will have no further impact on debt collection efforts.\n- If found to be a false positive, set value to `falsePositive`.\n- If completed without an outcome (or no outcome was needed), set to `noOutcome`.\n",
        "enum": [
          "approved",
          "denied",
          "falsePositive",
          "noOutcome"
        ],
        "nullable": true,
        "title": "outcome",
        "type": "string"
      },
      "ProcessStatus": {
        "description": "The status of a process. This can be updated by a lender or by Peach.\n\n`initiated` - The lender was notified by a borrower, but no documents or\nevidence have been provided yet. A grace period can be set.\n\n`processing` - Peach matched the borrower to an external data source, or the\nlender started an internal process to handle a case, complaint or dispute.\n\n`completed` - The lender completed an internal process, case, complaint or\ndispute. For example:\n- A borrower reported identity theft, and the lender reviewed documents\nand approved the claim.\n- A borrower requested a verification of debt in writing, and the lender sent an email with\ndetails.\n- Peach notified the lender about a new bankruptcy, and the lender reviewed\nthe case and deemed it to be a false positive.\n\n`canceled` - The lender couldn't complete an internal process and canceled\nit. This can happen for various reasons, such as lack of\nsufficient documentation.\n\n`reopened` - The lender re-opened the case.\n",
        "enum": [
          "initiated",
          "processing",
          "completed",
          "canceled",
          "reopened"
        ],
        "title": "status",
        "type": "string"
      },
      "CaseAttributes": {
        "properties": {
          "associations": {
            "description": "Associated objects of the case.",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ObjectAssociation"
                },
                {
                  "$ref": "#/components/schemas/CaseAssociation"
                }
              ]
            },
            "nullable": true,
            "type": "array"
          },
          "autoCreated": {
            "description": "True if the case was created by some automated method—i.e., not by a human.\n",
            "type": "boolean"
          },
          "borrowerIds": {
            "description": "List of borrower IDs associated with case",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "caseTypeMeta": {
            "$ref": "#/components/schemas/CaseConfigType"
          },
          "companyId": {
            "description": "The company's ID",
            "readOnly": true,
            "type": "string"
          },
          "createReviewTask": {
            "description": "If `true` create a task of type `reviewAutoCreatedCase`. Note: this field is NOT saved\non the case resource; it just creates a task.\n",
            "type": "boolean",
            "writeOnly": true
          },
          "createdByUser": {
            "$ref": "#/components/schemas/UserActionInfo",
            "description": "Details of the user responsible for creating the case.\nCan be an agent or automated system process.\n"
          },
          "creatingSupercaseId": {
            "description": "The ID of the supercase if the case was created by one.",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "creationProcedure": {
            "$ref": "#/components/schemas/CaseCreationProcedure"
          },
          "customFields": {
            "$ref": "#/components/schemas/CustomFields"
          },
          "escalatedAt": {
            "description": "Timestamp of when the case was escalated.\n",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "escalatedEmployeeId": {
            "description": "The ID of the Employee to which the case should be escalated.",
            "nullable": true,
            "type": "string"
          },
          "escalatedTeamId": {
            "description": "The ID of the Team to which the case should be escalated.",
            "nullable": true,
            "type": "string"
          },
          "escalationIsUrgent": {
            "description": "Boolean representing if this escalation is urgent. `null` if there\nis no escalation.\n",
            "nullable": true,
            "type": "boolean"
          },
          "externalId": {
            "$ref": "#/components/schemas/externalId"
          },
          "lastSubresourceUpdatedAt": {
            "description": "The date-time at which the case or it's subresources were last updated.\n\nA case or case's subresources are considered updated when:\n\n- an attribute of a Case is changed directly—e.g., it's name.\n- a Snooze, Do Not Interact, Document Upload Link, or Note is created, deleted or updated.\n- an Interaction, Document, Loan, or Transaction is associated or\n  unassociated with the case.\n",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "lastSubresourceUpdatedBy": {
            "$ref": "#/components/schemas/UserActionInfo",
            "description": "Details of the user responsible for last updating a case or a case's subresources.\nCan be an agent or automated system process. \n\nSee `lastSubresourceUpdatedAt` for a description of subresources.\n"
          },
          "lastViewedAt": {
            "description": "The date-time at which the case was last viewed. \n\ni.e., when this case last had this request made:\n`POST /api/people/{borrowerId}/cases/{caseId}/views`\n",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "lastViewedBy": {
            "$ref": "#/components/schemas/UserActionInfo",
            "description": "Details of the user responsible for last viewing the case.\n\ni.e., the user which last made the request:\n`POST /api/people/{borrowerId}/cases/{caseId}/views`\n"
          },
          "lenderAck": {
            "default": false,
            "description": "The lender has acknowledged the auto-generated case.\n",
            "nullable": true,
            "type": "boolean"
          },
          "matchDetails": {
            "$ref": "#/components/schemas/MatchDetails"
          },
          "matchToDataSource": {
            "description": "`true` if the person's details have been matched to an external data source.\n",
            "nullable": true,
            "type": "boolean"
          },
          "metaData": {
            "$ref": "#/components/schemas/MetaData"
          },
          "name": {
            "description": "The case name. If a name is not provided, the case name is taken from the case type.\nFor example, Identity Theft.\n",
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "object": {
            "default": "case",
            "enum": [
              "case"
            ],
            "readOnly": true,
            "type": "string"
          },
          "openedAt": {
            "description": "Represents the original date-time a case was created, either within \nPeach or in an external system. For cases created directly in Peach CRM, `openedAt` is identical to `createdAt`,\nmarking the initiation within Peach. Conversely, for cases migrated from external sources, `openedAt` reflects \nthe time the case was originally established in the external system. The timestamp must include a timezone (or UTC offset).\n",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "outcome": {
            "$ref": "#/components/schemas/ProcessOutcome"
          },
          "outcomeUpdatedAt": {
            "description": "Timestamp of last outcome update.\n",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "outcomeUpdatedBy": {
            "$ref": "#/components/schemas/UserActionInfo",
            "description": "Details of the user responsible for last updating the case outcome.\nCan be an agent or automated system process.\n"
          },
          "owningEmployee": {
            "description": "Metadata about the owning employee of the case. The owning employee is the\npreferred employee to process tasks relating to this case.\n",
            "nullable": true,
            "properties": {
              "displayName": {
                "description": "The display name of the employee that owns this case. The display name is the full name \nof the employee or, if not available, the employee's email.\n",
                "readOnly": true,
                "type": "string"
              },
              "id": {
                "description": "The ID of the employee that owns this case.",
                "readOnly": true,
                "type": "string"
              },
              "twilioWorkerSid": {
                "description": "The Twilio worker SID of the employee that owns this case.",
                "readOnly": true,
                "type": "string"
              }
            },
            "readOnly": true,
            "type": "object"
          },
          "owningEmployeeId": {
            "description": "The ID of the employee that owns this case. The case owner is the\npreferred employee to process tasks relating to this case.\n\nCase ownership must be enabled via setting\n`tasks.enableCaseOwnership` to `true` in the company configuration.\n",
            "nullable": true,
            "type": "string"
          },
          "people": {
            "description": "List of borrower IDs associated with case",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "snoozedAt": {
            "description": "Time when the case was snoozed.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "snoozedUntil": {
            "description": "Date until the case is snoozed.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ProcessStatus"
          },
          "statusUpdatedAt": {
            "description": "Timestamp of the last status update.\n",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "statusUpdatedBy": {
            "$ref": "#/components/schemas/UserActionInfo",
            "description": "Details of the user responsible for last updating the case status.\nCan be an agent or automated system process.\n"
          },
          "workflowId": {
            "description": "The ID of the workflow instance assigned to this case.",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "Bankruptcy": {
        "description": "Keyword parameters unique to bankruptcies.",
        "properties": {
          "anticipatedCaseCompletionDate": {
            "description": "In a bankruptcy chapter that leverages a reorganization and a new\npayment plan (i.e. Chapter 13), record when the last payment is\nexpected to be received. This will trigger reminders to close out\nthe case.\n",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "caseType": {
            "enum": [
              "bankruptcy"
            ],
            "type": "string"
          },
          "courtCaseChapter": {
            "description": "The bankruptcy chapter code. One of four common types we support at\nthis time.\n",
            "enum": [
              "chapter7",
              "chapter11",
              "chapter12",
              "chapter13",
              "unknown"
            ],
            "type": "string"
          },
          "courtCaseClosedDate": {
            "description": "Date the bankruptcy case closed, and the case is no longer on the court docket.\n",
            "format": "date",
            "type": "string"
          },
          "courtCaseDebtorDisposition": {
            "description": "The outcome of the bankruptcy case decided by the court.\n",
            "enum": [
              "dismissed",
              "discharged",
              "reinstated"
            ],
            "type": "string"
          },
          "courtCaseDebtorDispositionDate": {
            "description": "Date on which the disposition was decided by the court.\n",
            "format": "date",
            "type": "string"
          },
          "courtCaseFiledDate": {
            "description": "The bankruptcy court filing date. This is also when 'automatic stay'\nis invoked and creditors must stop calling borrowers or making\nattempts to collect on his or her debt.\n",
            "format": "date",
            "type": "string"
          },
          "courtCaseLastStatus": {
            "description": "The latest-reported bankruptcy case status, not case outcome, as it\nappears in the court.\n",
            "enum": [
              "filed",
              "dismissed",
              "discharged",
              "conversion",
              "reinstated",
              "closedFiledInError",
              "closedTransferredOut",
              "closedDischargeNA",
              "closedUndeterminedReason"
            ],
            "type": "string"
          },
          "courtCaseLastStatusUpdatedDate": {
            "description": "Date on which the latest status of the bankruptcy case was updated.\n",
            "format": "date",
            "type": "string"
          },
          "courtCaseNumber": {
            "description": "The unique identifier the courts use during the filing and review of\nthe bankruptcy.\n",
            "type": "string"
          },
          "creditorClaimDeadlineDate": {
            "description": "The date a lender has to file a claim to be eligible for any bankruptcy proceeds.\n",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "listedOutstandingDebt": {
            "description": "When a bankruptcy is filed, the borrower lists all the creditors/loans\nhe/she knows to be outstanding. Sometimes he/she may forget to list\na loan/creditor, in which case the creditor may want to file a claim\nto ensure that the loan is added to the list of accounts to include\nin the bankruptcy.\n",
            "type": "boolean"
          }
        },
        "title": "bankruptcy",
        "type": "object"
      },
      "CeaseCommunication": {
        "properties": {
          "caseType": {
            "enum": [
              "ceaseCommunication"
            ],
            "type": "string"
          },
          "interactionId": {
            "description": "ID for the interaction that resulted in the case being opened",
            "type": "integer"
          },
          "noticeReceivedDate": {
            "description": "The written notification date, or oral notice as mandated by each state, of the cease communications. This is when the legal timeline begins.\n",
            "format": "date",
            "type": "string"
          }
        },
        "title": "ceaseCommunication",
        "type": "object"
      },
      "Name": {
        "description": "Name of the person.",
        "nullable": true,
        "properties": {
          "createdAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "current": {
            "default": true,
            "description": "Name is flagged as current.",
            "readOnly": true,
            "type": "boolean"
          },
          "deletedAt": {
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "effectiveAt": {
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "firstName": {
            "description": "A person's first name.",
            "maxLength": 50,
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "string"
          },
          "lastName": {
            "description": "A person's last name.",
            "maxLength": 50,
            "type": "string"
          },
          "maidenLastName": {
            "description": "A person's maiden name, if applicable.",
            "nullable": true,
            "type": "string"
          },
          "middleName": {
            "description": "A person's middle name.",
            "maxLength": 50,
            "nullable": true,
            "type": "string"
          },
          "object": {
            "default": "name",
            "enum": [
              "name"
            ],
            "readOnly": true,
            "type": "string"
          },
          "originalValue": {
            "description": "The original value for name before an update.",
            "readOnly": true,
            "type": "object"
          },
          "preferredFirstName": {
            "description": "A person's preferred first name. This name will be used for interactions\nlike emails, text messages, outbound calls, online portal, etc.\nIf no preferred name is provided, `firstName` will be used.\n",
            "nullable": true,
            "type": "string"
          },
          "prefix": {
            "description": "A person's name prefix.",
            "nullable": true,
            "type": "string"
          },
          "source": {
            "enum": [
              "peach",
              "lender",
              "externalAPI"
            ],
            "readOnly": true,
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "inactive"
            ],
            "readOnly": true,
            "type": "string"
          },
          "suffix": {
            "description": "A person's name suffix.",
            "maxLength": 5,
            "nullable": true,
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "firstName",
          "lastName"
        ],
        "type": "object"
      },
      "ContactAffiliation": {
        "description": "\nAll contacts are associated with one borrower. Sometimes the contact represents information\nabout the borrower person themselves—e.g., the borrower's address. Sometimes the contact\nrepresents information about a person affiliated with the borrower.\n\n`self` - denotes contact information about the borrower. All `self` contacts are considered to be **first-party**.\n\n`spouse`, `parent`, `guardian`, `executor`, `administrator`, `legal` and `otherRelative` - are\nconsidered to be a **third-party**. Some regulations define these to be the **consumer** (aka the person)\nfor purposes of debt collection efforts. This means that a debt collector may communicate about the debt\nwith the consumer's spouse, parent (if the consumer is a minor), guardian,\nexecutor, or administrator (or with the attorney of any of these people).\n\nAutomated text messages (e.g. payment reminder) can only be sent to contactType=`phone`,\nlabel=`personal` and affiliation=`self`.\n",
        "enum": [
          "self",
          "spouse",
          "parent",
          "guardian",
          "executor",
          "administrator",
          "otherRelative",
          "legal",
          "businessOwner",
          "businessExecutive",
          "businessEmployee"
        ],
        "type": "string"
      },
      "ContactType": {
        "description": "The type of contact.\n\n`phone` and `whatsApp` should be provided in _[E.164](https://en.wikipedia.org/wiki/E.164)_ format.\n\n`email` should be provided in *aaa@bbb.com* format.\n\n`address` is the mailing address.\n\n`fbMessenger` can be phone or email.\n",
        "enum": [
          "phone",
          "email",
          "address",
          "whatsApp",
          "fbMessenger"
        ],
        "type": "string"
      },
      "ContactLabel": {
        "description": "The contact label.\n\nA person's mobile phone should be labeled as `personal`.\n\nA person's home address should be labeled as `home`.\n\nA servicemember's military unit or commander contact should be labeled as `military`.\n\nAutomated text messages (e.g. payment reminder) can only be sent to contactType=`phone`,\nlabel=`personal` and affiliation=`self`.\n",
        "enum": [
          "personal",
          "home",
          "work",
          "military"
        ],
        "type": "string"
      },
      "ContactStatus": {
        "description": "Describes the contact status as primary, secondary, additional or archived.\nWithin a set of contacts with the same `contactType` and `affilation`\nonly one `primary` and only one `secondary` contacts are allowed. There may\nbe multiple `additional` and `archived` contacts.\n\nIf a new contact is created as `primary` and there is an existing\n`primary` contact with the same `contactType` and `affilation`,\nthe status of the existing contact will be automatically changed to\n`additional`.\n\nIf a new contact is created as `secondary` and there is an existing\n`secondary` contact with the same `contactType` and `affilation`,\nthe status of the existing contact will be automatically changed to\n`additional`.\n",
        "enum": [
          "primary",
          "secondary",
          "additional",
          "archived"
        ],
        "type": "string"
      },
      "ContactInformationInternal": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "description": "The contact details. A contact can be email, phone, address,\netc. The `name` attribute is optional, and is useful for third-party contacts such as\nspouse, attorney, etc.\n",
            "properties": {
              "address": {
                "$ref": "#/components/schemas/Address",
                "nullable": true
              },
              "affiliation": {
                "$ref": "#/components/schemas/ContactAffiliation"
              },
              "authorizedThirdParty": {
                "default": false,
                "description": "Signifies an individual authorized by the borrower to make purchases and\nchanges against the account that is the subject of the collection efforts.\nThis attribute is not applicable to contacts with affiliation `self`.\n",
                "type": "boolean"
              },
              "companyId": {
                "description": "The unique company identifier.",
                "readOnly": true,
                "type": "string"
              },
              "contactType": {
                "$ref": "#/components/schemas/ContactType"
              },
              "externalId": {
                "description": "A lender's identifier for an object. After the object is successfully created, a lender can use ID or externalId identifiers to fetch the object.\n\nTo fetch the object using externalId you need to add `ext-` to the URL.\n\nNote: Don't add ext- to the identifier value. For example: if the external identifier is `ABCDE`, then pass externalId=ACBCE and NOT ext-ABCDE when creating the object.\n",
                "maxLength": 255,
                "minLength": 1,
                "nullable": true,
                "type": "string"
              },
              "label": {
                "$ref": "#/components/schemas/ContactLabel"
              },
              "name": {
                "description": "Full name of a third-party contact. Only applicable for third-party contacts, such as `spouse`, `parent`, etc.\n",
                "maxLength": 50,
                "minLength": 0,
                "nullable": true,
                "type": "string"
              },
              "object": {
                "default": "contact",
                "enum": [
                  "contact"
                ],
                "readOnly": true,
                "type": "string"
              },
              "personId": {
                "description": "Identifier of the borrower to which the `contact` belongs.",
                "readOnly": true,
                "type": "string"
              },
              "phoneDisconnectionDetails": {
                "properties": {
                  "disconnectionStatus": {
                    "description": "The disconnect status of a check that was performed on `lastDisconnectCheckDate`. If the value is empty, the disconnect check was not performed on the number. Applicable only to `contactType=phone`.\n\n`disconnected` - the number is contained in the Reassigned Numbers Database (RND) and it has been disconnected since the `lastKnownConnectionDate`.\n`connected` - the number is contained in the Reassigned Numbers Database, and it has NOT been disconnected since the `lastKnownConnectionDate`.\n`noData` - the number and a permanent disconnect date are not contained in the Reassigned Numbers Database. `noData` value is treated as `disconnected` value in the rules related to outbound communications.\n",
                    "enum": [
                      "disconnected",
                      "connected",
                      "noData"
                    ],
                    "nullable": true,
                    "type": "string"
                  },
                  "lastDisconnectCheckDate": {
                    "description": "The date when the system performed a disconnect check against the Reassigned Numbers Database.\nIf the value is empty, the disconnect check was not performed on the number. Applicable only to `contactType=phone`.\n",
                    "format": "date",
                    "nullable": true,
                    "type": "string"
                  },
                  "lastKnownConnectionDate": {
                    "description": "The date obtained by the borrower to contact them or a past date in which the lender is\nreasonably certain that the borrower could still be reached at that number. When contact\nis created the `lastKnownConnectionDate` is equal to `createdAt::date`. This date is used\nto monitor the disconnect status in the Reassigned Numbers Database (RND).\n",
                    "format": "date",
                    "nullable": true,
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "powerOfAttorney": {
                "default": false,
                "description": "Designated an individual with power of attorney. This attribute can only\nbe set by agents upon receiving appropriate documents from the borrower\nor their attorney. This attribute is not applicable to contacts with affiliation `self`.\n",
                "type": "boolean"
              },
              "receiveTextMessages": {
                "default": false,
                "description": "Allows using a `phone` type contact for text messaging.\n",
                "type": "boolean"
              },
              "receiveTextMessagesLastConsentAt": {
                "description": "The date when the `receiveTextMessages` consent was obtained (aka set to `true`).",
                "format": "date-time",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "status": {
                "$ref": "#/components/schemas/ContactStatus"
              },
              "valid": {
                "default": true,
                "description": "Identifies a contact as valid or invalid. A contact can become invalid for multiple reasons, such as wrong format,\ninvalid email domain, etc. This attribute can be changed by you or by Peach. If no value is provided, we will assume valid=`true`.\n",
                "type": "boolean"
              },
              "value": {
                "description": "The value of a contact. This attribute should be used for all contact types\nexcept for address, which has dedicated attributes such as\n`addressLine1`, `addressCity`, etc. You should use either `value`\nor `address` attributes depending on the contact type. For example,\n`+14155552671` for a contact type=`phone`. Or, `john.smith@domain.com`\nfor a contact type=`email`. We'll validate the format based on the contact type.\n",
                "nullable": true,
                "type": "string"
              },
              "verified": {
                "default": false,
                "description": "Identifies a contact as verified or unverified. Contact can be verified\nvia a verification code, verification link or a first-party outbound call.\nThe value can be changed by you or by Peach. If no value is provided, we\nwill assume verified=`false`.\n",
                "type": "boolean"
              }
            },
            "type": "object"
          }
        ],
        "title": "contactInformation"
      },
      "ContactInformation": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ContactInformationInternal"
          },
          {
            "properties": {
              "phoneDisconnectionDetails": {
                "properties": {
                  "disconnectionStatus": {
                    "readOnly": true
                  },
                  "lastDisconnectCheckDate": {
                    "readOnly": true
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          }
        ],
        "title": "contactInformation"
      },
      "Deceased": {
        "description": "Object describing a deceased borrower case",
        "properties": {
          "caseType": {
            "enum": [
              "deceased"
            ],
            "type": "string"
          },
          "dateOfBirth": {
            "description": "The date of birth as reported by the data source.",
            "format": "date",
            "type": "string"
          },
          "dateOfDeath": {
            "description": "The date of death as reported by the data source.",
            "format": "date",
            "type": "string"
          },
          "dateOfDeathByAgent": {
            "description": "The date of death as recorded by the agent.",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "deceasedAddress": {
            "$ref": "#/components/schemas/Address",
            "description": "The address as reported by the data source."
          },
          "deceasedName": {
            "$ref": "#/components/schemas/Name",
            "description": "The name as reported by the data source."
          },
          "deceasedNoticeReceivedDate": {
            "description": "The date we became aware of the consumer's death. This is not the date of death.\nThis notice is received from our internal system.\n",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "deceasedNoticeReceivedDateByAgent": {
            "description": "The date you became aware of the consumer's death. This is not the date of death.\n",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "exactDateOfDeathUnknown": {
            "description": "In some cases, the exact date of death is unknown. When `exactDateOfDeathUnknown` is true, the `dateOfDeath` is only accurate to the month and year specified.",
            "type": "boolean"
          },
          "representativeOfEstateContact": {
            "$ref": "#/components/schemas/ContactInformation",
            "description": "Contact details of the legal representative.",
            "readOnly": true
          },
          "representativeOfEstateContactId": {
            "description": "Decedent account holder's contact ID. It can be a legal representative,\nor an appointed representative by the deceased.\n",
            "nullable": true,
            "type": "string"
          }
        },
        "title": "deceased",
        "type": "object"
      },
      "DisputeOfDebt": {
        "properties": {
          "caseType": {
            "enum": [
              "disputeOfDebt"
            ],
            "type": "string"
          },
          "disputeConfirmedReason": {
            "description": "The dispute confirmed reason is only used when a case is confirmed as disputed.",
            "enum": [
              "APR",
              "outstandingBalance",
              "monthlyBalance",
              "incorrectAtCreditBureau",
              "other"
            ],
            "type": "string"
          },
          "disputeNotice": {
            "description": "ID for the interaction that resulted in the dispute case being opened",
            "nullable": true,
            "type": "string"
          },
          "noticeReceivedDate": {
            "description": "The first time a Direct Dispute Notice was received from the borrower.\nThis is when the legal timeline begins.\n",
            "format": "date",
            "type": "string"
          },
          "reasonForDispute": {
            "description": "The reason for the dispute of debt.\n",
            "enum": [
              "inaccurateOrIncompleteDetails",
              "loanAlreadyPaidInFull",
              "missingCreditedPayments",
              "fundsNeverReceived",
              "coercedDebt",
              "other"
            ],
            "type": "string"
          },
          "scopeOfDispute": {
            "description": "Scope of the dispute.",
            "enum": [
              "entireLoan",
              "remainingLoanAmount",
              "interestRate",
              "fees",
              "otherTerms"
            ],
            "type": "string"
          }
        },
        "title": "disputeOfDebt",
        "type": "object"
      },
      "FederalEmergencyDisaster": {
        "properties": {
          "declarationDate": {
            "description": "Date the disaster was declared.\n",
            "format": "date-time",
            "type": "string"
          },
          "declaredCountyArea": {
            "description": "The name or phrase describing the U.S. county that was\nincluded in the declaration.\n",
            "maxLength": 50,
            "type": "string"
          },
          "disasterCloseOutDate": {
            "description": "Date all financial transactions for all programs are completed.\n",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "disasterNumber": {
            "description": "Sequentially assigned number used to designate an event or incident\ndeclared as a disaster. For more information on the disaster\nprocess, www.fema.gov.\n",
            "type": "integer"
          },
          "disasterType": {
            "description": "Two character code that defines if the disaster is a Major Disaster\nDeclaration (DR), Emergency Declaration (EM), Fire Management\nAssistance Declaration (FM), or Fire Suppression Authorization (FS).\nFor more information on the disaster process,\nplease visit: www.fema.gov.\n",
            "maxLength": 2,
            "minLength": 2,
            "type": "string"
          },
          "femaId": {
            "maxLength": 25,
            "type": "string"
          },
          "fyDeclared": {
            "description": "The fiscal year the disaster was declared.\n",
            "type": "integer"
          },
          "hmProgramDeclared": {
            "description": "Denotes whether the Hazard Mitigation program was declared for this\ndisaster. For more information on the program,\nplease visit: www.fema.gov.\n",
            "type": "boolean"
          },
          "iaProgramDeclared": {
            "description": "Denotes whether the Individual Assistance program was declared\nfor this disaster. For more information on the program,\nplease visit: www.fema.gov.\n",
            "type": "boolean"
          },
          "ihProgramDeclared": {
            "description": "Denotes whether the Individuals and Households program was declared\nfor this disaster. For more information on the program,\nplease visit: www.fema.gov.\n",
            "type": "boolean"
          },
          "incidentBeginDate": {
            "description": "Date the incident itself began.\n",
            "format": "date-time",
            "type": "string"
          },
          "incidentEndDate": {
            "description": "Date the incident itself ended.\n",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "incidentType": {
            "description": "Type of incident such as fire or flood. The incident type will\naffect the types of assistance available. For more information on\nincident types, please visit: www.fema.gov.\n",
            "maxLength": 100,
            "type": "string"
          },
          "lastRefresh": {
            "description": "Date the record was last updated in the FEMA API data store.\n",
            "format": "date-time",
            "type": "string"
          },
          "paProgramDeclared": {
            "description": "Denotes whether the Public Assistance program was declared for this\ndisaster. For more information on the program,\nplease visit: www.fema.gov.\n",
            "type": "boolean"
          },
          "placeCode": {
            "description": "A unique code system FEMA uses internally to recognize\nlocations that takes the numbers \"99\" + the 3-digit county\nFIPS code. There are some declared locations that don't have\nrecognized FIPS county codes in which case we assigned a\nunique identifier.\n\nWe map person's home zip code to FIPS code.\n",
            "type": "string"
          },
          "stateCode": {
            "description": "The name or phrase describing the U.S. state, district, or territory.\n",
            "maxLength": 2,
            "minLength": 2,
            "type": "string"
          }
        },
        "type": "object"
      },
      "FederalEmergency": {
        "properties": {
          "caseType": {
            "enum": [
              "federalEmergency"
            ],
            "type": "string"
          },
          "disaster": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FederalEmergencyDisaster"
              },
              {
                "readOnly": true,
                "type": "object"
              }
            ]
          },
          "disasterId": {
            "description": "ID of the FEMA disaster\n",
            "type": "integer",
            "writeOnly": true
          }
        },
        "title": "federalEmergency",
        "type": "object"
      },
      "GenericCase": {
        "properties": {
          "caseType": {
            "enum": [
              "generic"
            ],
            "type": "string"
          }
        },
        "title": "generic",
        "type": "object"
      },
      "IdentityTheft": {
        "properties": {
          "caseType": {
            "enum": [
              "identityTheft"
            ],
            "type": "string"
          },
          "claimRejectedReason": {
            "description": "The rejected claim reason is only used when a case is deemed\n'not validated.' Only one reason is associated with a set of associated loans.\n",
            "enum": [
              "requestedInformationNotReceived",
              "invalidDocumentation",
              "insufficientDocumentation",
              "householdResponsible",
              "namedOnAccount",
              "other"
            ],
            "type": "string"
          },
          "reportReceivedDate": {
            "description": "The first time an identity theft report was received from the borrower.\nThis is when the legal timeline begins.\n",
            "format": "date",
            "type": "string"
          }
        },
        "title": "identityTheft",
        "type": "object"
      },
      "LegalAction": {
        "properties": {
          "caseType": {
            "enum": [
              "legalAction"
            ],
            "type": "string"
          },
          "legalActionInitiatedDate": {
            "description": "Date the legal action initiated",
            "format": "date",
            "type": "string"
          },
          "legalJudgmentEffectiveDate": {
            "description": "Legal judgment effective date",
            "format": "date",
            "type": "string"
          }
        },
        "title": "legalAction",
        "type": "object"
      },
      "MilitaryDuty": {
        "description": "Object describing an active military duty case.",
        "properties": {
          "caseType": {
            "enum": [
              "militaryDuty"
            ],
            "type": "string"
          },
          "claimingSCRArights": {
            "description": "The borrower is claiming SCRA rights and protections",
            "nullable": true,
            "type": "boolean"
          },
          "dutyCertificateFile": {
            "description": "The unique identifier for the downloaded certificate file from monitoring service.",
            "nullable": true,
            "type": "string"
          },
          "dutyCertificateId": {
            "description": "The certificate identifier used to locate a certificate in the certificate file.\n",
            "type": "string"
          },
          "dutyEndDate": {
            "description": "The duty end date. This is normally populated when duty ends. During ongoing duty, the\nvalue will remain empty.\n",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "dutyServiceComponent": {
            "description": "DoD's classification of service positions\n",
            "type": "string"
          },
          "dutyServiceComponentDescription": {
            "description": "Description of DoD's classification of service positions\n",
            "nullable": true,
            "type": "string"
          },
          "dutyServiceMatchDate": {
            "description": "The date that DMDC completed the SCRA match.\n",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "dutyStartDate": {
            "description": "The duty start date. This is populated when Peach gets the first hit from the SCRA database.\n",
            "format": "date",
            "type": "string"
          },
          "memberOfPennsylvaniaNationalGuard": {
            "description": "The borrower is a member of Pennsylvania National Guard.",
            "type": "boolean"
          },
          "onDutyProtectionEligibility": {
            "description": "The borrower's eligibility for the federal SCRA and/or state protections",
            "enum": [
              "federal",
              "state",
              "federalAndState"
            ],
            "nullable": true,
            "type": "string"
          }
        },
        "title": "militaryDuty",
        "type": "object"
      },
      "DebtValidation": {
        "description": "Debt validation case",
        "properties": {
          "caseType": {
            "enum": [
              "debtValidation"
            ],
            "type": "string"
          },
          "currentStateResidence": {
            "description": "Borrower's current state of residence. Use two character US state name abbreviations.\n",
            "type": "string"
          },
          "newYorkStateCity": {
            "description": "If the borrower is a New York state resident, specify the city.\n",
            "enum": [
              "newYorkCity",
              "yonkers",
              "other"
            ],
            "nullable": true,
            "type": "string"
          },
          "requestDate": {
            "description": "Date the debt validation was requested.",
            "format": "date",
            "type": "string"
          }
        },
        "title": "debtValidation",
        "type": "object"
      },
      "Collection": {
        "description": "Collection case",
        "properties": {
          "attemptsToContactByPhone": {
            "properties": {
              "attempted": {
                "description": "The number of attempted case-associated phone interactions\nwith the borrower. Attempted statuses are those not in the\nlist of `scheduled`, `canceled`, `inProgress`, or\n`succeeded`.\n",
                "type": "integer"
              },
              "successful": {
                "description": "The number of successful case-associated phone interactions\nwith the borrower.\n",
                "type": "integer"
              }
            },
            "readOnly": true,
            "type": "object"
          },
          "caseType": {
            "enum": [
              "collection"
            ],
            "type": "string"
          },
          "collectionReachOuts": {
            "properties": {
              "capacities": {
                "items": {
                  "properties": {
                    "count": {
                      "description": "How many contacts were made in the last period, ending\ntoday.\n",
                      "type": "integer"
                    },
                    "left": {
                      "description": "How many contacts are left according to the intensity\nconfiguration. `null` if this is not configured.\n",
                      "nullable": true,
                      "type": "integer"
                    },
                    "period": {
                      "description": "The length of the time period, in days.\n",
                      "type": "integer"
                    }
                  },
                  "type": "object"
                },
                "type": "array"
              },
              "contacts": {
                "items": {
                  "properties": {
                    "count": {
                      "description": "How many contacts were made on the given day.\n",
                      "type": "integer"
                    },
                    "date": {
                      "description": "The date on the contacts were made.\n",
                      "format": "date",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": "array"
              },
              "intensity": {
                "description": "The borrower's collection intensity rate.",
                "enum": [
                  "light",
                  "normal",
                  "heavy"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "daysOverdue": {
            "description": "Maximum number of days overdue among overdue or accelerated loans.",
            "readOnly": true,
            "type": "integer"
          },
          "isFirstTimeCollection": {
            "description": "Indicates if this is the first time a collections case-type has\nbeen created for this borrower. Canceled cases are not\nconsidered.\n",
            "readOnly": true,
            "type": "boolean"
          },
          "lastSuccessfulPayment": {
            "properties": {
              "amount": {
                "description": "The amount of the last successful payment (transaction).",
                "format": "float",
                "type": "number"
              },
              "date": {
                "description": "The date of the last successful payment (transaction) among overdue and accelerated loans.",
                "format": "date",
                "type": "string"
              }
            },
            "readOnly": true,
            "type": "object"
          },
          "loansReportedToBureaus": {
            "enum": [
              "yes",
              "no",
              "some"
            ],
            "readOnly": true,
            "type": "string"
          },
          "nextPayment": {
            "description": "Closest upcoming payment due of overdue and accelerated loans.",
            "properties": {
              "amount": {
                "description": "Upcoming payment amount.",
                "format": "float",
                "type": "number"
              },
              "date": {
                "description": "Upcoming payment date.",
                "format": "date",
                "type": "string"
              }
            },
            "readOnly": true,
            "type": "object"
          },
          "numberOfLoansOverdueOrAccelerated": {
            "description": "Number of associated overdue or accelerated loans.",
            "readOnly": true,
            "type": "integer"
          },
          "overdueOrAcceleratedLoanCount": {
            "description": "**DEPRECATED ATTRIBUTE** Use `numberOfLoansOverdueOrAccelerated`.\n\nNumber of associated overdue or accelerated loans.\n",
            "readOnly": true,
            "type": "integer"
          },
          "paymentCount": {
            "description": "**DEPRECATED ATTRIBUTE** Use `paymentCounts`.\n",
            "properties": {
              "failed": {
                "description": "The number of failed payments (transactions) among overdue and accelerated loans.",
                "type": "integer"
              },
              "total": {
                "description": "The total number of payment attempts (transactions) among overdue and accelerated loans.",
                "type": "integer"
              }
            },
            "readOnly": true,
            "type": "object"
          },
          "paymentCounts": {
            "properties": {
              "failed": {
                "description": "The number of failed payments (transactions) among overdue and accelerated loans.",
                "type": "integer"
              },
              "total": {
                "description": "The total number of payment attempts (transactions) among overdue and accelerated loans.",
                "type": "integer"
              }
            },
            "readOnly": true,
            "type": "object"
          },
          "totalAmounts": {
            "properties": {
              "expected": {
                "description": "Total amount expected to be paid on overdue and accelerated loans.",
                "format": "float",
                "type": "number"
              },
              "overdue": {
                "description": "Total amount overdue on overdue or accelerated loans.",
                "format": "float",
                "type": "number"
              },
              "paid": {
                "description": "Total amount paid on overdue and accelerated loans.",
                "format": "float",
                "type": "number"
              }
            },
            "readOnly": true,
            "type": "object"
          }
        },
        "title": "collection",
        "type": "object"
      },
      "OFACAddress": {
        "properties": {
          "address": {
            "description": "The address.",
            "type": "string"
          },
          "cityStateProvincePostalCode": {
            "description": "City, state, province, or postal code.",
            "type": "string"
          },
          "country": {
            "description": "The country.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "OFACSanctionedIndividual": {
        "description": "Keyword parameters unique to OFAC sanctioned individuals.",
        "properties": {
          "caseType": {
            "enum": [
              "oFACSanctionedIndividual"
            ],
            "type": "string"
          },
          "ofacActionsRequired": {
            "description": "The list of standard punitive actions.",
            "items": {
              "enum": [
                "blockTransaction",
                "rejectTransaction",
                "closeAccount",
                "blockAssets"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "ofacActionsRequiredOther": {
            "description": "Additional punitive actions.",
            "type": "string"
          },
          "sdnAddressList": {
            "description": "List of addresses.",
            "items": {
              "$ref": "#/components/schemas/OFACAddress"
            },
            "type": "array"
          },
          "sdnAkaList": {
            "description": "List of AKA's, in the format of \"LASTNAME, Firstname\".",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "sdnDateOfBirthList": {
            "description": "Dates of birth. The date may be partial. For example: 10 Dec 1948 or 1959.\n",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "sdnName": {
            "description": "Name of the Specially Designated National.\n",
            "properties": {
              "firstName": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "sdnNationalityList": {
            "description": "List of nationalities. For example: Tunisia.\n",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "sdnPlaceOfBirthList": {
            "description": "Places of birth. For example: Cuba.\n",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "sdnProgramList": {
            "description": "List of sanction program names. For example: SDNTK or SDGT.\n",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "sdnRemarks": {
            "description": "Specially Designated National remarks.\n",
            "type": "string"
          },
          "sdnUid": {
            "description": "Unique record identifier/unique listing identifier.\n",
            "type": "string"
          }
        },
        "title": "oFACSanctionedIndividual",
        "type": "object"
      },
      "PurchaseDispute": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseWithExternalIdMixin"
          },
          {
            "properties": {
              "caseId": {
                "description": "Peach identifier of the case. The case object contains more details about the dispute, e.g. evidence information such as supporting documents.\n",
                "type": "string"
              },
              "companyId": {
                "description": "The unique company identifier.\n",
                "readOnly": true,
                "type": "string"
              },
              "disputedAmount": {
                "description": "The disputed amount. Can be less than the original purchase amount. Sum of disputed amounts cannot exceed the original purchase amounts (regardless of disputes outcomes).\n",
                "format": "float",
                "type": "number"
              },
              "metadata": {
                "additionalProperties": true,
                "type": "object"
              },
              "repostedPurchaseId": {
                "description": "The identifier of the reposted purchase. When a borrower loses a dispute, the lender normally creates a new purchase in the amount of the dispute.\n",
                "type": "string"
              },
              "status": {
                "default": "unsubmitted",
                "description": "The status of the dispute. `unsubmitted` is the only valid status for a new purchase dispute.\n\n`unsubmitted` - The dispute is pending submission to a processor/network.\n\n`submitted` - The dispute has been submitted to a processor/network.\n\n`expired` - The dispute has expired.\n\n`won` - The dispute is won.\n\n`lost` - The dispute is lost.\n\n`canceled` - The dispute was canceled. Only `unsubmitted` disputes can be canceled.\n",
                "enum": [
                  "unsubmitted",
                  "submitted",
                  "expired",
                  "won",
                  "lost",
                  "canceled"
                ],
                "type": "string"
              },
              "timestamps": {
                "properties": {
                  "expiredAt": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "lostAt": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "submittedAt": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "wonAt": {
                    "format": "date-time",
                    "type": "string"
                  }
                },
                "readOnly": true,
                "type": "object"
              }
            },
            "type": "object"
          }
        ]
      },
      "CanceledDetails": {
        "properties": {
          "cancelPolicyProvided": {
            "description": "Whether the borrower was provided with a cancellation policy by the merchant.\n",
            "type": "boolean"
          },
          "cancelReason": {
            "description": "Reason for canceling the order.\n",
            "type": "string"
          },
          "canceledDate": {
            "description": "Date when the order was canceled.",
            "format": "date",
            "type": "string"
          },
          "expectedDate": {
            "description": "Date the borrower expected to receive the order.\n",
            "format": "date",
            "type": "string"
          },
          "productDescription": {
            "description": "Description of the merchandise or service that was purchased.\n",
            "type": "string"
          },
          "productType": {
            "description": "Type of product purchased.\n\n`merchandise` - Tangible goods such as appliances.\n\n`service` - Intangible goods such as ski lessons or internet subscription.\n",
            "enum": [
              "merchandise",
              "service"
            ],
            "type": "string"
          },
          "returnStatus": {
            "description": "Result of borrower's attempt to return the product.\n\n`succeeded` - The merchant accepted the return.\n\n`merchantRejected` - The merchant rejected the return.\n",
            "enum": [
              "succeeded",
              "merchantRejected"
            ],
            "type": "string"
          },
          "returnedDate": {
            "description": "Date when the order was returned or attempted to be returned.",
            "format": "date",
            "type": "string"
          }
        },
        "title": "canceledDetails",
        "type": "object"
      },
      "DuplicateDetails": {
        "properties": {
          "cardStatementDocumentId": {
            "description": "Copy of the card statement showing that the product had already been paid for.\n",
            "type": "string"
          },
          "cashReceiptDocumentId": {
            "description": "Copy of the receipt showing that the product had been paid for in cash.\n",
            "type": "string"
          },
          "checkImageDocumentId": {
            "description": "Image of the front and back of the check that was used to pay for the product.\n",
            "type": "string"
          },
          "originalPurchaseExternalId": {
            "description": "External Purchase identifier that the disputed purchase is a duplicate of. If the two or more purchases that are copies of each other (aka have exact same details), this is the original undisputed one.\n",
            "type": "string"
          }
        },
        "title": "duplicateDetails",
        "type": "object"
      },
      "MerchandiseNotAsDescribedDetails": {
        "properties": {
          "receivedDate": {
            "description": "Date when the product was received.",
            "format": "date",
            "type": "string"
          },
          "returnDescription": {
            "description": "Description of the borrower's attempt to return the product.",
            "type": "string"
          },
          "returnStatus": {
            "description": "Result of borrower's attempt to return the product.\n\n`succeeded` - The merchant accepted the return.\n\n`merchantRejected` - The merchant rejected the return.\n",
            "enum": [
              "succeeded",
              "merchantRejected"
            ],
            "type": "string"
          }
        },
        "title": "merchandiseNotAsDescribedDetails",
        "type": "object"
      },
      "NotReceivedDetails": {
        "properties": {
          "expectedDate": {
            "description": "Date the borrower expected to receive the order.\n",
            "format": "date",
            "type": "string"
          },
          "productDescription": {
            "description": "Description of the merchandise or service that was purchased.\n",
            "type": "string"
          },
          "productType": {
            "description": "Type of product purchased.\n\n`merchandise` - Tangible goods such as appliances.\n\n`service` - Intangible goods such as ski lessons or internet subscription.\n",
            "enum": [
              "merchandise",
              "service"
            ],
            "type": "string"
          }
        },
        "title": "notReceivedDetails",
        "type": "object"
      },
      "OtherDetails": {
        "properties": {
          "productDescription": {
            "description": "Description of the merchandise or service that was purchased.\n",
            "type": "string"
          },
          "productType": {
            "description": "Type of product purchased.\n\n`merchandise` - Tangible goods such as appliances.\n\n`service` - Intangible goods such as ski lessons or internet subscription.\n",
            "enum": [
              "merchandise",
              "service"
            ],
            "type": "string"
          }
        },
        "title": "otherDetails",
        "type": "object"
      },
      "ServiceNotAsDescribedDetails": {
        "properties": {
          "cancelReason": {
            "description": "Reason for canceling the order.\n",
            "type": "string"
          },
          "canceledDate": {
            "description": "Date when the order was canceled.",
            "format": "date",
            "type": "string"
          },
          "receivedDate": {
            "description": "Date when the product was received.",
            "format": "date",
            "type": "string"
          }
        },
        "title": "serviceNotAsDescribedDetails",
        "type": "object"
      },
      "EvidenceDetails": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/CanceledDetails"
          },
          {
            "$ref": "#/components/schemas/DuplicateDetails"
          },
          {
            "$ref": "#/components/schemas/MerchandiseNotAsDescribedDetails"
          },
          {
            "$ref": "#/components/schemas/NotReceivedDetails"
          },
          {
            "$ref": "#/components/schemas/OtherDetails"
          },
          {
            "$ref": "#/components/schemas/ServiceNotAsDescribedDetails"
          }
        ]
      },
      "PurchaseDeclineReason": {
        "description": "The reason the purchase was declined",
        "properties": {
          "mainExternalReasonCode": {
            "description": "The external decline reason code",
            "type": "string"
          },
          "mainScriptForRep": {
            "description": "The main decline reason script that a customer service agent can provide to the borrower.",
            "type": "string"
          },
          "mainText": {
            "description": "The main decline reason text that is shown to the borrower",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PurchaseMigrationDetails": {
        "description": "Purchase migration related details. This object should be used for lines that are migrated from another system to Peach.\n",
        "properties": {
          "originalDrawId": {
            "description": "The draw identifier. Can be Peach or lender's external identifier.\n\nAll past purchases prior to the \"migration cutoff date\" will be posted on the \"migration\" draw. After the \"migration cutoff date\",\na lender can have multiple draws (e.g. Purchases, Cash Withdrawals, etc.) Use this attribute to indicate the original draw ID\nthat the purchase was posted on in another system. In case of a dispute created after the \"migration cutoff date\", the `originalDrawId`\nwill be used to adjust the draw balance. The `originalDrawId` is required for all purchases that are migrated from another system.\n",
            "nullable": true,
            "pattern": "^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\\d+$",
            "type": "string"
          }
        },
        "required": [
          "originalDrawId"
        ],
        "type": "object"
      },
      "PurchaseDetails": {
        "description": "The details of purchase.",
        "properties": {
          "categoryId": {
            "description": "The category identifier of the purchase.",
            "nullable": true,
            "type": "string"
          },
          "conversionRate": {
            "description": "The conversion rate that was used to convert the purchase amount from the `originalCurrencyCode` to the line of credit main currency.\nFor example:\n   - Line of credit main currency code = `USD`\n   - `originalCurrencyCode=GBP`\n   - `originalCurrencyAmount=200.45`\n   - `conversionRate=1.33`\n\nThen `amount = 200.45 * 1.33 = 266.59`.\n",
            "format": "float",
            "type": "number"
          },
          "description": {
            "default": "Purchase",
            "description": "The description of the purchase. Purchases in authorized status are shown in borrower portal but NOT on statements.\nPurchases in `pending` or `succeeded` status are shown in borrower portal and on statements.  At least one of the attributes,\n`description` or `merchantName` must be passed\n",
            "nullable": true,
            "type": "string"
          },
          "externalCardId": {
            "description": "The card identifier that was used for the purchase.",
            "nullable": true,
            "type": "string"
          },
          "isValidMerchantId": {
            "description": "`true` - if the merchant ID exists in Peach Merchants table.\n\n`false` - if the merchant ID doesn't exist in Peach Merchants table.\nCredit card lenders normally should not create merchants details in Peach and `isMerchantIdValid` attribute can be ignored.\nPoint of sale lenders normally have merchants details in Peach and can use `isMerchantIdValid` attribute as needed.\n",
            "readOnly": true,
            "type": "boolean"
          },
          "merchantCategoryCode": {
            "description": "The merchant category code of the card acceptor (merchant).",
            "nullable": true,
            "type": "string"
          },
          "merchantCity": {
            "description": "The city of the merchant.",
            "nullable": true,
            "type": "string"
          },
          "merchantCountry": {
            "description": "The country of the merchant.",
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "description": "The merchant identifier where the purchase was made.",
            "nullable": true,
            "type": "string"
          },
          "merchantName": {
            "description": "The merchant name where the purchase was made. At least one of the attributes, `description` or `merchantName` must be passed.",
            "nullable": true,
            "type": "string"
          },
          "merchantState": {
            "description": "The state of the merchant.",
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "description": "Store any type of key/value pairs in the form of a JSON dictionary.",
            "nullable": true,
            "type": "object"
          },
          "originalCurrencyAmount": {
            "description": "The amount of the purchase before currency conversion.",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "originalCurrencyCode": {
            "description": "The currency in which the purchase was made before currency conversion. Three letters according to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).",
            "nullable": true,
            "pattern": "[A-Z]{3}",
            "type": "string"
          },
          "pointOfSaleType": {
            "description": "- `online` - the purchase was made online on a website or in a mobile application.\n- `physical` - the purchase was made in a store with a physical card or instrument.\n- `recurring` - the purchase was made as part of a subscription service.\n",
            "enum": [
              "online",
              "physical",
              "recurring"
            ],
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PurchaseStatus": {
        "description": "The status of the purchase.\n\n- `authorized` - the purchase is authorized and not yet `settled`. Authorized purchases are included in `utilizationAmount`, `openToBuy` and `availableCreditAmount` calculations; however, authorizations are not written to the ledger and are not included in total outstanding loan balances.\n- `settled` - the purchase was settled.\n- `pending` - the purchase is pending. `pending` purchases increases the draw balance similar to `settled`. Pending status is used mainly\n    for visuals and normally shown in Borrower Portal and on statements.\n- `canceled` - the purchase was canceled. `canceled` purchases reduce the draw balance. A new purchase cannot be created in `canceled` status.\n- `declined` - the purchase was declined. `declined` purchases reduce the draw balance if the status changes from `pending` to `declined`. A new purchase can be created in `declined` status for record purposes (it will not impact the draw balance).\n- `disputed` - The purchase was disputed for full or partial amount. `disputed` status is a terminal state and once set cannot be changed to another status. This status can not be set manually. Submitting a purchase dispute will set the purchase's status to `disputed`.\n\nThe following status transitions are allowed:\n- `authorized` -> `pending`\n- `authorized` -> `settled`\n- `authorized` -> `canceled`\n- `pending` -> `settled`\n- `pending` -> `canceled`\n- `pending` -> `declined`\n- `declined` -> `authorized`\n- `settled` -> `canceled`\n- `settled` -> `disputed` (only by calling \"Create purchase dispute\")\n",
        "enum": [
          "authorized",
          "pending",
          "settled",
          "canceled",
          "declined",
          "disputed"
        ],
        "type": "string"
      },
      "CreatePurchase": {
        "properties": {
          "amount": {
            "description": "The amount of the purchase. The amount can be updated only if the purchase status is `pending` or `authorized`. The amount and status of a purchase may be changed on the same call.\n",
            "format": "float",
            "minimum": 0,
            "type": "number"
          },
          "authorizationPurchaseId": {
            "description": "Peach's unique (or lender's external identifier) for the authorization purchase. This attribute is used to reference an initial authorization, so\nlenders know which captures (purchase object(s) in Peach) are related to the original authorization.\n",
            "nullable": true,
            "type": "string"
          },
          "declineReason": {
            "$ref": "#/components/schemas/PurchaseDeclineReason",
            "description": "The reason the purchase was declined",
            "nullable": true
          },
          "displayId": {
            "description": "The purchase ID to show in the UI (Peach public or external).",
            "readOnly": true,
            "type": "string"
          },
          "drawId": {
            "description": "The unique identifier of the draw that the purchase belongs to.",
            "readOnly": true,
            "type": "string"
          },
          "eligibleDisputeAmount": {
            "description": "The maximum amount eligible to be disputed. The amount is dynamic and can change depending on past disputes. Sum of disputed amounts cannot exceed the original purchase amounts (regardless of disputes outcomes).\n",
            "format": "float",
            "readOnly": true,
            "type": "number"
          },
          "externalId": {
            "$ref": "#/components/schemas/externalId",
            "description": "The external unique identifier of the purchase."
          },
          "id": {
            "description": "The unique identifier of the purchase.",
            "readOnly": true,
            "type": "string"
          },
          "lineOfCreditId": {
            "description": "The unique identifier of the line of credit that the purchase belongs to.",
            "readOnly": true,
            "type": "string"
          },
          "metadata": {
            "description": "Store any type of key/value pairs in the form of a JSON dictionary.",
            "nullable": true,
            "type": "object"
          },
          "migration": {
            "$ref": "#/components/schemas/PurchaseMigrationDetails",
            "nullable": true
          },
          "originalAmount": {
            "description": "The original amount of the purchase when it was created. If the purchase amount changes after creation, `originalAmount` will not change.\n",
            "format": "float",
            "readOnly": true,
            "type": "number"
          },
          "originalPurchaseId": {
            "$ref": "#/components/schemas/AnyId",
            "description": "Peach's unique or lender's external identifier. Typically used for purchases of type `refund` which allows the lender to\nreference the original purchase being refunded. For authorizations, please see `authorizationPurchaseId` attribute.\n",
            "nullable": true
          },
          "purchaseDate": {
            "description": "The date of a purchase. This attribute can be passed only during the line of credit migration process.\nDon't use this attribute after the migration process was successfully completed.\n\n- The value must be before or equal to today, and cannot be greater than the \"migration at date\" (aka the actual date on which you run the migration.)\n- If you pass `purchaseDate` you cannot pass `authorizedAt` and/or `effectiveAt`.\n- If `purchaseDate` is passed, the system will set `authorizedAt` and `effectiveAt` to `purchaseDate` at 6:00 AM in the product timezone.\n- If you `purchaseDate` is not passed, you must pass both `authorizedAt` and `effectiveAt`. `authorizedAt` cannot be greater than `effectiveAt`.\n\nFor non-migrated purchases:\n- The value is equal to the date part of the `authorizedAt` converted to the product timezone (e.g. Eastern or Pacific).\n  If `authorizedAt` is null, this value is equal to the date part of the purchase's `createdAt` converted to the product timezone.\n\nThe `purchaseDate` is returned in Get endpoints for both migrated and non-migrated purchases.\n",
            "format": "date",
            "type": "string"
          },
          "purchaseDetails": {
            "$ref": "#/components/schemas/PurchaseDetails"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PurchaseStatus"
              },
              {
                "default": "settled"
              }
            ]
          },
          "timestamps": {
            "properties": {
              "authorizedAt": {
                "description": "The timestamp when the purchase was `authorized`. This value can be set by lenders at the time of purchase creation.\nIf the value is not set by the lender, it will be populated based on `authorizedAt` (if it is non-null) otherwise `createdAt` for the corresponding `authorizationPurchaseId`.\nIf the value is not set by the lender and no `authorizationPurchaseId` is set, this value corresponds to `purchase.authorized` event.\nIf the purchase was never in `authorized` status and none of the prior conditions are met, this value will be null.\n",
                "format": "date-time",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "createdAt": {
                "format": "date-time",
                "readOnly": true,
                "type": "string"
              },
              "effectiveAt": {
                "description": "The effective timestamp when the purchase was applied in the ledger. `effectiveAt` is equal to the timestamp when the purchase is set to\n`pending` or `settled` status, whichever comes first. Changing the `effectiveAt` via the `Update purchase` endpoint will trigger a replay\nof the line of credit. Keep in mind that an existing statement might've included the purchase based on the existing `effectiveAt` value\nand the interest was accrued based on the existing `effectiveAt`. `effectiveAt` can be updated only if the purchase is in `settled` or `pending` status.\n",
                "format": "date-time",
                "readOnly": true,
                "type": "string"
              },
              "settledAt": {
                "description": "The timestamp when the purchase was `settled`. Corresponds to `purchase.settled` event.",
                "format": "date-time",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "updatedAt": {
                "format": "date-time",
                "readOnly": true,
                "type": "string"
              }
            },
            "readOnly": true,
            "type": "object"
          },
          "type": {
            "description": "- `regular` - a regular purchase made by the borrower. Increases draw's balance.\n- `refund` - a refund of the purchase made in the past. Decreases draw's balance.\n- `cashBack` - cash back given to the borrower by the issuing institution.\n",
            "enum": [
              "regular",
              "refund",
              "cashBack"
            ],
            "type": "string"
          }
        },
        "required": [
          "amount"
        ],
        "title": "Purchase",
        "type": "object"
      },
      "InternalRefundDetails": {
        "description": "The details of how a refund was applied:\n\n - The system will first deplete any non-due principal. This amount will be stored as `refundNonDuePrincipalAmount`.\n - If any refund amount is left to apply, the system will create a transaction of type `serviceCredit` and\n`serviceCreditType=refund`. This transaction will be applied on the Draw level first and any leftover amount will\n be applied on the LOC level (based on the loan type waterfall configuration for payments). This amount will be stored as\n  `refundTransactionAmount`.\n - Any unapplied refund amount will be recorded as credit to the borrower (also called `reimbursementAmount`.)\n",
        "properties": {
          "refundNonDuePrincipalAmount": {
            "description": "Amount of refund that was applied to reduce the non-due principal of the draw.\nThe total amount of refund is equal to `refundNonDuePrinicpalAmount + refundTransactionAmount`.\n",
            "format": "float",
            "type": "number"
          },
          "refundTransactionAmount": {
            "description": "Amount of refund that was applied to as a transaction to reduce other balances of the draw and potentially other draws.\nThe total amount of refund is equal to `refundNonDuePrinicpalAmount + refundTransactionAmount`.\n",
            "format": "float",
            "type": "number"
          },
          "refundTransactionId": {
            "description": "Reference to the transaction ID of type service credit and serviceCreditType=refund. This is Peach Public ID.",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "Purchase": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CreatePurchase"
          },
          {
            "properties": {
              "refundDetails": {
                "$ref": "#/components/schemas/InternalRefundDetails",
                "nullable": true,
                "readOnly": true
              }
            },
            "type": "object"
          }
        ]
      },
      "DisputeOfPurchase": {
        "properties": {
          "caseType": {
            "enum": [
              "disputeOfPurchase"
            ],
            "type": "string"
          },
          "dispute": {
            "$ref": "#/components/schemas/PurchaseDispute"
          },
          "disputeReason": {
            "description": "The reason for filing the dispute.\n\n`canceled` - Service or merchandise was canceled.\n\n`serviceNotAsDescribed` - The service was not as described.\n\n`merchandiseNotAsDescribed` - The merchandise was not as described.\n\n`duplicate` - There were multiple copies of a charge for a single purchase, or the charge was paid by other means.\n\n`fraudulent` - The borrower did not make the purchase.\n\n`notReceived` - Merchandise or service was not received.\n\n`other` - All other types of disputes.\n",
            "enum": [
              "canceled",
              "serviceNotAsDescribed",
              "merchandiseNotAsDescribed",
              "duplicate",
              "fraudulent",
              "notReceived",
              "other"
            ],
            "type": "string"
          },
          "disputeStatus": {
            "description": "**DEPRECATED ATTRIBUTE** Use `dispute.status`.\n",
            "enum": [
              "unsubmitted",
              "submitted",
              "expired",
              "won",
              "lost"
            ],
            "readOnly": true,
            "type": "string"
          },
          "evidenceDetails": {
            "$ref": "#/components/schemas/EvidenceDetails"
          },
          "evidenceDocumentId": {
            "description": "Additional document supporting the dispute.",
            "type": "string"
          },
          "evidenceExplanation": {
            "description": "Description of why the borrower disputes the purchase.",
            "type": "string"
          },
          "purchase": {
            "$ref": "#/components/schemas/Purchase"
          },
          "purchaseDisputeId": {
            "description": "Peach identifier of the dispute object that belongs to the purchase.\n",
            "type": "string"
          },
          "purchaseExternalId": {
            "description": "The external identifier of the disputed purchase.",
            "type": "string"
          },
          "purchaseId": {
            "description": "Peach identifier of the disputed purchase. You must supply this field or the `purchaseExternalId` when creating a case.",
            "type": "string"
          }
        },
        "title": "disputeOfPurchase",
        "type": "object"
      },
      "CreditBureauDisputeCodes": {
        "enum": [
          "notMine",
          "belongsToAnotherWithSimilarName",
          "notAwareOfCollection",
          "settlementOrPartialPaymentAccepted",
          "claimsPaidCreditorBeforeCollectionOrChargeOff",
          "creditLimitOrLoanAmountIncorrect",
          "includedInTheBankruptcyOfAnother",
          "claimsAccountClosed",
          "claimsAccoutClosedByConsumer",
          "contractCanceledOrRescinded",
          "accountIncludedInBankruptcy",
          "claimsActiveMilitaryDuty",
          "insuranceClaimDelayed",
          "accountInvolvedInLitigation",
          "claimsVictimOfNaturalOrDeclaredDisaster",
          "claimsAccountDeferred",
          "notLiable",
          "accountReaffirmedOrNotIncludedInBankruptcy",
          "claimsTrueIdentityFraud",
          "claimsAccountTakeOver",
          "disputesPresentPreviousAccountStatusPaymentRatingAccountHistory",
          "disputesPortfolioTypeAccountTypeOrTermsDurationFrequency",
          "claimsCompanyWillChange",
          "claimsCompanyWillDelete",
          "consumerStatesInaccurateInformation",
          "disputesDateOpenedDateOfLastPaymentOrDateClosed",
          "disputesDateOfFirstDeliquency",
          "disputesComplianceConditions",
          "disputesSpecialCommentCodeAndOrNarrativeRemarks",
          "disputesCurrentBalanceAndOrAmountPastDue",
          "disputesOriginalChargeOffPaymentOrScheduledPaymentAmount",
          "consumerDisputesDeceasedECOA"
        ],
        "type": "string"
      },
      "CreditBureauDisputeResponseCodes": {
        "enum": [
          "informationAccurateAsOfReportDate",
          "deleteAccount",
          "misroutedACDV",
          "deleteDueToFraud",
          "updateDisputedAccountInfoOnly",
          "updateDisputedAndAdditionalAccountInfo",
          "disputedInformationAccurateUpdatedAdditionalInfo",
          "consumersDisputeNotSpecific",
          "other"
        ],
        "type": "string"
      },
      "CreditBureauDispute": {
        "properties": {
          "bureauDisputeNotice": {
            "description": "ID for the interaction that resulted in the dispute case being opened",
            "type": "string"
          },
          "caseType": {
            "enum": [
              "creditBureauDispute"
            ],
            "type": "string"
          },
          "disputeCode1": {
            "$ref": "#/components/schemas/CreditBureauDisputeCodes",
            "description": "The nature of the consumer's dispute."
          },
          "disputeCode2": {
            "$ref": "#/components/schemas/CreditBureauDisputeCodes",
            "description": "Optional second dispute reason.",
            "nullable": true
          },
          "disputeReceivedDate": {
            "description": "The date the dispute was received. This is the date the ACDV was\nplaced in the data furnisher's queue.\n",
            "format": "date",
            "type": "string"
          },
          "fcraInfo": {
            "description": "Contains a description of the FCRA-mandated relevant information\nreceived from the consumer pertaining to this dispute. This is a\nfree-form text area.\n",
            "nullable": true,
            "type": "string"
          },
          "responseCode": {
            "$ref": "#/components/schemas/CreditBureauDisputeResponseCodes",
            "description": "A code that indicates the action the data furnisher wants the\noriginating agency to take in response to the dispute.\n"
          },
          "responseDueDate": {
            "description": "The date by which an ACDV response must be received from a data\nfurnisher. After this date, the ACDV is removed from the queue\nand the originating agency will take action per the\nspecifications of the Fair Credit Reporting Act (FCRA).\n",
            "format": "date",
            "nullable": true,
            "type": "string"
          }
        },
        "title": "creditBureauDispute",
        "type": "object"
      },
      "CasePut": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "$ref": "#/components/schemas/CaseAttributes"
          },
          {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Bankruptcy"
              },
              {
                "$ref": "#/components/schemas/CeaseCommunication"
              },
              {
                "$ref": "#/components/schemas/Deceased"
              },
              {
                "$ref": "#/components/schemas/DisputeOfDebt"
              },
              {
                "$ref": "#/components/schemas/FederalEmergency"
              },
              {
                "$ref": "#/components/schemas/GenericCase"
              },
              {
                "$ref": "#/components/schemas/IdentityTheft"
              },
              {
                "$ref": "#/components/schemas/LegalAction"
              },
              {
                "$ref": "#/components/schemas/MilitaryDuty"
              },
              {
                "$ref": "#/components/schemas/DebtValidation"
              },
              {
                "$ref": "#/components/schemas/Collection"
              },
              {
                "$ref": "#/components/schemas/OFACSanctionedIndividual"
              },
              {
                "$ref": "#/components/schemas/DisputeOfPurchase"
              },
              {
                "$ref": "#/components/schemas/CreditBureauDispute"
              }
            ]
          }
        ],
        "title": "case"
      },
      "Case": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CasePut"
          },
          {
            "properties": {
              "typeId": {
                "description": "Unique identifier of the case type.\n",
                "type": "string"
              }
            },
            "required": [
              "typeId"
            ],
            "type": "object"
          }
        ],
        "title": "case"
      },
      "OverrideTemplateId": {
        "description": "The template version ID (like `TV-AAAA-BBBB`) *or* template descriptor ID (like `TD-AAAA-BBBB`)\nto use.\n\nIf a template descriptor is given, then the current template descriptor's `activeVersionId` is\nused.\n\nThis should be used in special cases where you do not want to use the implicit template selected \nby the `subject` and `channel` fields.\n",
        "example": "TV-AAAA-BBBB",
        "nullable": true,
        "type": "string"
      },
      "InteractionStatusDetails": {
        "description": "Provides more details about the status of an interaction.\n\nNote that `statusDetails` related to the \"technical\" status of an interaction: e.g., Did it connect?\nDid it fail to send? Was it blocked by Compliance Guard?\n\nFor the \"human\" outcome of an interaction see `agentOutcome`: e.g., Did you talk the person you intended\nto? Did the other chat recipient become unresponsive?\n\n## Status\n\nCertain status details must have a particular `status` associated with them; attempting to use them\notherwise will result in an error.\n\n### Succeeded\n\nThe following status details are considered `status=succeeded`\n\n- `emailDelivered` - The email was successfully delivered\n- `emailOpened` - The email was opened\n- `emailClick` - A link in the email was clicked\n- `letterDelivered` - The letter is successfully delivered\n- `chatRead` - The chat message was read\n\nThe following status detail is only available for `mail` interactions sent with `mailIsCertified=true`.\n\n- `letterPickUpAvailable` - Letter is available for pickup at carrier location\n\n### Attempted\n\nThe following status details are considered `status=attempted`.\n\n- `voiceReceivedOutsideOpenHours` - Caller tried to contact the lender outside designated business hours\n- `voiceConnected` - Voice call connected successfully\n- `voiceDisconnectedBeforeQueue` - Inbound call was disconnected before entering the queue.\n- `emailSent` - Email was sent, but delivery cannot be confirmed\n- `letterCreated` - Letter is successfully created\n- `letterRenderedPdf` - Letter's PDF proof is successfully rendered\n- `letterRenderedThumbnails` - Letter's thumbnails are successfully rendered\n- `letterInTransit` - Letter received an \"In Transit\" event\n- `letterInLocalArea` - Letter is in the local area\n- `letterProcessedForDelivery` - Letter is in the local area\n- `letterRerouted` - Letter is re-routed\n- `chatPosted` - Chat message sent\n- `textConvoTimeoutAutoclose` - This text conversation was closed automatically due to a timeout.\n- `textConvoClosedStale` - (**DEPRECATED**) An open but outdated text conversation was closed automatically when a new text conversation was started. New text conversations should never enter into this state, but old conversations may be in this state.\n- `textConvoClosedByAgent` - The agent manually marked the text conversation as ended.\n\nThe following status details are only available for `mail` interactions sent with `mailIsCertified=true`.\n\n- `letterAccepted` - Letter has been accepted into the carrier network for delivery\n- `letterArrived` - Letter has arrived at an intermediate location in the carrier network\n- `letterContactCarrier` - Letter has non-failure condition that requires contacting the carrier\n- `letterDamaged` - Letter has been damaged; contact carrier for more details\n- `letterDelayed` - Letter has been delayed\n- `letterDeliveryAttempted` - Carrier attempted to deliver letter; contact carrier to ensure delivery\n- `letterDeliveryRescheduled` - Delivery of letter has been rescheduled\n- `letterDeparted` - Letter has departed from an intermediate location in the carrier network\n- `letterHeld` - Letter held at carrier location; contact carrier for more details\n- `letterNoticeLeft` - Carrier left notice during attempted delivery; follow instructions on notice\n- `letterProcessed` - Letter has been processed at an intermediate location\n- `letterProcessing` - Letter is processing at an intermediate location in the carrier network\n- `letterOther` - Peach's mail partner received an unrecognized status that does not have a predefined code\n\n### Failed\n\nThe following status details are considered `status=failed`.\n\nGenerally an interaction is `failed` if some part of connecting or completing the interaction failed\ndue to a technical failure, misconfiguration, or attempt to communicate in a way disallowed by\nrules.\n\n- `emailBlocked` - Receiving server could not or would not accept the message temporarily\n- `emailBounced` - Receiving server could not or would not accept mail to this recipient permanently\n- `emailDropped` - Email rejected for a number of reasons: rejected as SPAM, Unsubscribed Address, Bounced Address, Email Invalid\n- `emailFailedToSend` - _Not currently in use - reserved for future use_\n- `emailReportedAsSpam` - Email was delivered, but later reported as SPAM by recipient\n- `letterDeleted` - Letter is successfully canceled\n- `letterFailedToCreate` - Request to create the letter failed. Provider did not return 200 OK status code\n- `letterReturnedToSender` - Letter is returned to the sender\n- `textA2PCampaignUnregistered` - The text was not sent because the lender has not registered this phone number with an A2P campaign.\n- `textAccountSuspended` - The account was suspended between message queuing and delivery.\n- `textCarrierViolation` - The message was flagged as 'objectionable' or 'spam' by the phone carrier and was blocked.\n- `textConvoUnknownNumberRejected` - This text was received from an unknown number, and so was rejected.\n- `textDeviceUnreachable` - The destination phone number temporarily could not be reached - it was turned off, out of service area, etc.\n- `textLandlineOrUnreachableCarrier` - The destination phone number could not receive the message. Reasons include the destination number being a landline phone or the carrier being temporarily unavailable.\n- `textLenderDisabledInboundTexts` - The inbound text was not received because the lender does not have inbound texting enabled.\n- `textMessageBlocked` - The destination phone number is blocked from receiving the message.\n- `textMessagePriceExceedsMax` - The price of the message exceeds the max price parameter.\n- `textMissingSegment` - One or more parts of a multipart message were not received.\n- `textNumberDisconnected` - The destination phone number could not be reached and may be disconnected.\n- `textQueueOverflow` - Too many messages were queued to be sent, and some were dropped as a result.\n- `textRegionInvalid` - Permission to send an SMS or MMS has not been enabled for the region indicated by the 'To' number\n- `textUnknownError` - An unknown error occurred when attempting to send the message.\n- `textUnsubscribedRecipient` - The person you are trying to message has opted out of receiving messages from your Twilio phone number, Channels sender, or Messaging Service.\n- `voiceFailedToInitiate` - Outbound voice call could not start for some reason; Or the inbound call was disconnected before entering the queue.\n- `voiceLenderDisabledInboundCalls` - Inbound call received while lender has inbound voice call disabled\n- `voiceNumberDisconnected` - Outbound voice call to disconnected phone number\n- `voiceNumberInvalid` - Invalid 'To' Phone Number\n- `voiceReceivedNoAgentsAvailable` - Inbound call received while lender had no agents to answer it\n\nThe following status details are only available for `mail` interactions sent with `mailIsCertified=true`.\n\n- `letterAddressIssue` - Address information is incorrect; contact carrier to ensure delivery\n- `letterDisposed` - Letter disposed by carrier\n- `letterLocationInaccessible` - Delivery location inaccessible to carrier; contact carrier to ensure delivery\n- `letterLost` - Letter has been lost; contact carrier for more details\n- `letterRescheduleDelivery` - Contact carrier to reschedule delivery\n- `letterUnclaimed` - Letter is unclaimed\n- `letterUndeliverable` - Letter was unable to be delivered\n\n## Channels\n\n- Most status details can only be used with their respective channels. e.g., `voiceNumberDisconnected`\n  can only be used for interactions with `channel=voice`. Using them otherwise will result in an error\n- `invalidContact` and `blockedByComplianceGuard` are valid for all channels\n\n## Direction\n\nCertain status details are only valid with certain `direction` settings. Using them with\nan invalid `direction` will result in an error. For example...\n- `voiceReceivedNoAgentsAvailable` can only be set for `inbound` phone calls\n- `voiceNumberDisconnected` can only be set for `outbound` phone calls\n- `voiceUnexpectedDisconnect` can be set for either direction\n\n## Null\n\nNote that `null` is not a valid status name but rather can be used to specify a\nquery for interactions with a `status` of `null`\n",
        "enum": [
          "voiceSpokeWithFirstParty",
          "voiceSpokeWithThirdParty",
          "voiceLeftVoicemailFirstParty",
          "voiceLeftVoicemailThirdParty",
          "voiceLeftVoicemail",
          "voiceLineBusyNoRing",
          "voiceReachedVoicemailNoMessageLeft",
          "voiceRangNoPickup",
          "voicePickedHungUp",
          "voiceFailedToInitiate",
          "voiceNumberDisconnected",
          "voiceReceivedOutsideOpenHours",
          "voiceUnexpectedDisconnect",
          "voiceDisconnectedBeforeQueue",
          "voiceDisconnectedWhileQueuedOnHold",
          "voiceReceivedNoAgentsAvailable",
          "voiceLenderDisabledInboundCalls",
          "voiceConnected",
          "voiceNumberInvalid",
          "emailSent",
          "emailDelivered",
          "emailBlocked",
          "emailBounced",
          "emailOpened",
          "emailClick",
          "emailDropped",
          "emailFailedToSend",
          "emailReportedAsSpam",
          "letterCreated",
          "letterFailedToCreate",
          "letterRenderedPdf",
          "letterRenderedThumbnails",
          "letterProcessedForDelivery",
          "letterRerouted",
          "letterInLocalArea",
          "letterInTransit",
          "letterDelivered",
          "letterReturnedToSender",
          "letterDeleted",
          "letterAccepted",
          "letterArrived",
          "letterProcessing",
          "letterProcessed",
          "letterDeparted",
          "letterPickUpAvailable",
          "letterAddressIssue",
          "letterContactCarrier",
          "letterDelayed",
          "letterDeliveryAttempted",
          "letterDeliveryRescheduled",
          "letterLocationInaccessible",
          "letterNoticeLeft",
          "letterDamaged",
          "letterDisposed",
          "letterHeld",
          "letterLost",
          "letterUnclaimed",
          "letterUndeliverable",
          "letterRescheduleDelivery",
          "letterOther",
          "chatPosted",
          "chatRead",
          "chatBorrowerInactivity",
          "chatReceivedOutsideOpenHours",
          "textConvoTimeoutAutoclose",
          "textConvoClosedStale",
          "textConvoUnknownNumberRejected",
          "textConvoClosedByAgent",
          "textLenderDisabledInboundTexts",
          "textUnsubscribedRecipient",
          "textQueueOverflow",
          "textAccountSuspended",
          "textDeviceUnreachable",
          "textMessageBlocked",
          "textNumberDisconnected",
          "textLandlineOrUnreachableCarrier",
          "textCarrierViolation",
          "textUnknownError",
          "textMissingSegment",
          "textMessagePriceExceedsMax",
          "textA2PCampaignUnregistered",
          "textRegionInvalid",
          "blockedByComplianceGuard",
          "invalidContact",
          "null"
        ],
        "nullable": true,
        "type": "string"
      },
      "BaseTwilioMinimalInteraction": {
        "properties": {
          "borrowerSelectedTheme": {
            "$ref": "#/components/schemas/InteractionTheme"
          },
          "channel": {
            "type": "string"
          },
          "contactId": {
            "type": "string"
          },
          "content": {},
          "id": {
            "type": "string"
          },
          "metaData": {
            "$ref": "#/components/schemas/MetaData"
          },
          "personId": {
            "description": "The ID of the borrower to which this interaction is associated",
            "nullable": true,
            "type": "string"
          },
          "scheduledAtFrom": {
            "description": "Time to start the scheduled interaction.\n",
            "format": "date-time",
            "type": "string"
          },
          "scheduledAtTo": {
            "description": "Time to end the scheduled interaction.\n",
            "format": "date-time",
            "type": "string"
          },
          "startedAt": {
            "description": "Start time of the interaction. If not provided we'll assume it's\na timestamp of the API call.  If time of day is not required\nprovide only date.\n\nFor CRM-managed `voice` interactions, an `inbound` call is\nconsidered started when the CRM system answers the call, and an\n`outbound` call is considered started when the CRM system\ninitiates the call.\n",
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/InteractionStatus"
          },
          "statusDetails": {
            "$ref": "#/components/schemas/InteractionStatusDetails"
          },
          "subject": {
            "$ref": "#/components/schemas/InteractionSubject"
          },
          "theme": {
            "$ref": "#/components/schemas/InteractionTheme"
          }
        },
        "type": "object"
      },
      "InteractionAgentOutcome": {
        "description": "Provides details on the outcome of the interaction according to an agent.\n\nNote this captures the \"human\" outcome of an interaction: e.g., Did you talk the person you intended\nto? Did the other chat recipient become unresponsive?\n\nFor the \"technical\" status of an interaction, see `statusDetails`. e.g., : Did it fail to\nsend? Was it blocked by Compliance Guard?\n\n- `voiceSpokeWithFirstParty` - Agent spoke with borrower\n- `voiceSpokeWithThirdParty` - Agent spoke with someone other than the borrower\n- `voiceLeftVoicemail` - Agent left voicemail\n- `voiceReachedVoicemailNoMessageLeft` - Agent reached voicemail but did not leave a message\n- `voiceRangNoPickup` - Phone rang, no voicemail was reached, and the call ended, or the agent hung up\n- `voiceLineBusyNoRing` - Agent reached busy phone line\n- `voicePickedHungUp` - Agent heard call pick up and immediate hang up\n- `voiceDisconnectedWhileQueuedOnHold` - Caller hung up while on hold\n- `voiceUnexpectedDisconnect` - The call was unexpectedly disconnected\n- `voiceFailedToInitiate` - Outbound voice call could not start for some reason\n- `voiceNumberDisconnected` - Outbound voice call to disconnected phone number\n",
        "enum": [
          "voiceSpokeWithFirstParty",
          "voiceSpokeWithThirdParty",
          "voiceLeftVoicemail",
          "voiceLineBusyNoRing",
          "voiceReachedVoicemailNoMessageLeft",
          "voiceRangNoPickup",
          "voicePickedHungUp",
          "voiceFailedToInitiate",
          "voiceNumberDisconnected",
          "voiceUnexpectedDisconnect"
        ],
        "nullable": true,
        "type": "string"
      },
      "InteractionIntensityCollDebt": {
        "default": "normal",
        "description": "Defines the maximum number of interactions per period(s) on a compliance\nlevel related to FDCPA or state debt collection rules. Lenders can configure intensities\nbased on their business needs. For example, prime borrowers can be defined as `light`,\nand a lender can define the maximum number of attempts or successful interactions to be\n2 in any 7-calendar-day period.\n",
        "enum": [
          "light",
          "normal",
          "heavy"
        ],
        "type": "string"
      },
      "UserBase": {
        "properties": {
          "companyId": {
            "readOnly": true,
            "type": "string"
          },
          "externalId": {
            "nullable": true,
            "type": "string"
          },
          "roleIds": {
            "description": "List of role IDs associated with this user.\n",
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "status": {
            "enum": [
              "active",
              "inactive"
            ],
            "type": "string"
          },
          "type": {
            "description": "The type of user to create:\n\n- `borrower` - This user allows a borrower to log in to the system.\n- `agent` - This user allows an agent to log in to the system.\n- `service` - This user is used in conjunction with an API key to perform background tasks.\n",
            "enum": [
              "borrower",
              "agent",
              "service"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "UserAuth": {
        "properties": {
          "authType": {
            "$ref": "#/components/schemas/AuthType"
          },
          "authValueType": {
            "$ref": "#/components/schemas/AuthValueType"
          },
          "value": {
            "type": "string"
          }
        },
        "readOnly": true,
        "type": "object"
      },
      "UserAuthList": {
        "items": {
          "$ref": "#/components/schemas/UserAuth"
        },
        "readOnly": true,
        "type": "array"
      },
      "UserBasic": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "$ref": "#/components/schemas/UserBase"
          },
          {
            "properties": {
              "auths": {
                "$ref": "#/components/schemas/UserAuthList"
              },
              "object": {
                "default": "user",
                "enum": [
                  "user"
                ],
                "readOnly": true,
                "type": "string"
              },
              "userId": {
                "description": "The ID of the associated user",
                "type": "number"
              },
              "userName": {
                "readOnly": true,
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "BasePersonNoIdentity": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "description": "\nRepresents various users such as a borrower,\nco-borrower, co-signer, etc. A lender can choose to provide PII or not.\nIf no PII is provided, Peach cannot monitor for bankruptcy, deceased and\nSCRA.\n",
            "properties": {
              "borrowerType": {
                "default": "person",
                "description": "The type of borrower.",
                "enum": [
                  "person",
                  "business"
                ],
                "type": "string"
              },
              "collectionsIntensity": {
                "$ref": "#/components/schemas/InteractionIntensityCollDebt"
              },
              "commPreferences": {
                "description": "The borrower's communication preferences.",
                "properties": {
                  "sendRemindersWhenCurrent": {
                    "default": true,
                    "description": "When set to `true`, the system sends payment reminders when the loan is current.\nWhen set to `false` the system sends payment reminders only when the loan is overdue.\n",
                    "type": "boolean"
                  },
                  "statementDeliveryChannels": {
                    "description": "A list of channels that loan statements will be delivered.\nIf value(s) are not passed, the system will use the statement default channel from company's configuration.\nBorrower can modify their preferences later.\n",
                    "items": {
                      "enum": [
                        "email",
                        "mail"
                      ],
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              },
              "companyId": {
                "description": "The unique company identifier.\n",
                "type": "string"
              },
              "displayId": {
                "description": "The loan ID to show in the UI (Peach public or external).",
                "readOnly": true,
                "type": "string"
              },
              "externalId": {
                "description": "A lender's identifier for a borrower. After the object is successfully created, a lender can use ID or externalId identifiers to fetch the object.\n\nTo fetch the object using externalId you need to add `ext-` to the URL.\n\nNote: Don't add ext- to the identifier value. For example: if the external identifier is `ABCDE`, then pass externalId=ACBCE and NOT ext-ABCDE when creating the object.\n",
                "nullable": true,
                "type": "string"
              },
              "metaData": {
                "$ref": "#/components/schemas/MetaData"
              },
              "monitorStartDate": {
                "description": "This attribute is only applicable to lenders who use Compliance Guard Monitor to monitor borrowers without active loans.\n`monitorStartDate` is currently used for Bankruptcy monitoring only in the following way.\n\nBankruptcy:\n\nThe system will return only bankruptcy cases that were filed on or after the `monitorStartDate`.\nIf date is passed (recommended), any bankruptcy cases filed prior to the date will be filtered and not returned.\nWe recommend lenders to pass origination date of the earliest active loan in their system.\nIf date is not passed, the system will set the date equal the borrower creation date.\n",
                "format": "date",
                "nullable": true,
                "type": "string"
              },
              "status": {
                "default": "active",
                "description": "When a new borrower object is created, we set the value to\n`active` by default. Set to `inactive` at any time.\n",
                "enum": [
                  "active",
                  "inactive"
                ],
                "type": "string"
              },
              "statusUpdatedAt": {
                "description": "The time of a status update.",
                "format": "date-time",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "user": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/UserBasic"
                  },
                  {
                    "readOnly": true
                  }
                ]
              }
            },
            "type": "object"
          }
        ]
      },
      "InteractionDirection": {
        "enum": [
          "outbound",
          "inbound"
        ],
        "type": "string"
      },
      "TaskType": {
        "enum": [
          "answerInboundVoiceCall",
          "handleInboundInteraction",
          "handleUnboundInboundInteraction",
          "makeScheduledCall",
          "replyToNewConvo",
          "replyToNewText",
          "replyToNewWebChat",
          "replyToAbandonedWebChat",
          "reviewEscalatedCaseAgent",
          "reviewEscalatedCaseAgentUrgent",
          "reviewEscalatedCaseTeam",
          "reviewEscalatedCaseTeamUrgent",
          "reviewDocumentUpload",
          "reviewSnoozedCase",
          "reviewAutoCreatedCase",
          "reviewAutoUpdatedCase",
          "reviewCaseInstructions",
          "reviewVoicemail",
          "smartReviewCase"
        ],
        "type": "string"
      },
      "AssociatedLoanId": {
        "description": "The ID of a Loan. This marks a particular loan as associated with this interaction.\n",
        "example": "LN-AAAA-BBBB",
        "type": "string"
      },
      "AssociatedLoanIds": {
        "description": "The IDs of several loans. This marks several loans as associated with this interaction.",
        "example": [
          "LN-AAAA-BBBB",
          "LB-CCCC-DDDD"
        ],
        "items": {
          "type": "string"
        },
        "type": "array"
      },
      "BaseInteraction": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "$ref": "#/components/schemas/BaseTwilioMinimalInteraction"
          },
          {
            "properties": {
              "agentOutcome": {
                "$ref": "#/components/schemas/InteractionAgentOutcome"
              },
              "agentOutcomeUpdatedAt": {
                "description": "The datetime of the last `agentOutcome` update.",
                "format": "date-time",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "borrower": {
                "$ref": "#/components/schemas/BasePersonNoIdentity"
              },
              "companyId": {
                "description": "The unique company identifier.\n",
                "readOnly": true,
                "type": "string"
              },
              "complianceGuardRuleId": {
                "description": "The Compliance Guard rule identifier that blocked the interaction.\nOnly applicable if the `statusDetails=blockedByComplianceGuard` and a rule actually blocked the interaction.\nIn some cases the interaction can be blocked before rules are checked (e.g. a borrower is missing an address).\nIn such a case the `complianceGuardRuleId` will be empty/null.\n",
                "nullable": true,
                "type": "string"
              },
              "contact": {
                "$ref": "#/components/schemas/ContactInformation"
              },
              "contactExternalId": {
                "description": "The lender's identifier of the contact information.\n\nThis should not include any `ext-` prefix as we know this is an external ID field.\n",
                "nullable": true,
                "type": "string",
                "writeOnly": true
              },
              "createdBy": {
                "$ref": "#/components/schemas/UserActionInfo",
                "description": "Details of the user responsible for initiating the interaction.\nCan be an agent or automated system process.\n"
              },
              "direction": {
                "$ref": "#/components/schemas/InteractionDirection"
              },
              "endedAt": {
                "description": "End time of the interaction. This attribute is optional and is used\nfor logging only.\n\nFor CRM-managed `voice` interactions, a call is considered ended\nwhen either the borrower or the agent disconnects.\n",
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "externalId": {
                "description": "The lender's identifier for the interaction.\n\nAfter the object is successfully created, a lender can use ID or externalId identifiers to fetch the object.\n\nTo fetch the object using externalId you need to add `ext-` to the URL.\n\nNote: Don't add ext- to the identifier value. For example: if the external identifier is `ABCDE`, then pass externalId=ACBCE and NOT ext-ABCDE when creating the object.\n",
                "maxLength": 255,
                "minLength": 1,
                "nullable": true,
                "type": "string"
              },
              "failureDescriptionLong": {
                "description": "Detailed text describing the failure reason and any appropriate actions the user may take to fix the issue.\n",
                "nullable": true,
                "type": "string"
              },
              "failureDescriptionShort": {
                "description": "Short text describing the failure reason. Normally displayed in UI.\n",
                "nullable": true,
                "type": "string"
              },
              "isExternal": {
                "description": "Boolean indicating the source of an Interaction. If `true`, the\ninteraction was supplied by the lender via API. If `false`,\nthe interaction was created by Peach.\n",
                "type": "boolean"
              },
              "isTransactional": {
                "description": "`true` when this interaction is considered \"transactional\".\n\nTransactional interactions are those which are sent via an automated system in response\nto an event or some action taken. e.g., an email sent to confirm a payment was made is transactional;\nlikewise an email sent to confirm a password change is transacrtional. Examples of\nnon-transactional messages would be: those sent by an agent in response to a customer request,\nfor collections, or for marketing.\n\nIt's important to mark these messages correctly, because different laws may apply to messages\ndepending on if they're considered \"transactional\".\n\nNote: Can be `null` for interactions sent before the transactional-ness was added to the API.\n",
                "nullable": true,
                "type": "boolean"
              },
              "lastTaskMeta": {
                "description": "The last task that was terminated (completed or canceled) for this interaction.\n",
                "nullable": true,
                "properties": {
                  "assignedEmployee": {
                    "properties": {
                      "firstName": {
                        "description": "The first name of the employee which was assigned to this task.\n",
                        "nullable": true,
                        "type": "string"
                      },
                      "id": {
                        "description": "The ID of the employee which was assigned to this task.\n",
                        "nullable": true,
                        "type": "string"
                      },
                      "lastName": {
                        "description": "The last name of the employee which was assigned to this task.\n",
                        "nullable": true,
                        "type": "string"
                      },
                      "userId": {
                        "description": "The ID of the user of the employee which was assigned to this task.\n",
                        "nullable": true,
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "assignmentStatus": {
                    "description": "The status of the task assignment.\n",
                    "enum": [
                      "completed",
                      "canceled"
                    ],
                    "type": "string"
                  },
                  "sid": {
                    "description": "The SID of the task",
                    "type": "string"
                  },
                  "taskInitAt": {
                    "description": "The time the task was originally created. (If an original task was marked as \"Unable to Complete\",\nand a new task was created, this will be the time of the original task.)\n",
                    "format": "date-time",
                    "type": "string"
                  },
                  "taskType": {
                    "$ref": "#/components/schemas/TaskType"
                  }
                },
                "type": "object"
              },
              "loanId": {
                "$ref": "#/components/schemas/AssociatedLoanId"
              },
              "loanIds": {
                "$ref": "#/components/schemas/AssociatedLoanIds"
              },
              "object": {
                "default": "interaction",
                "enum": [
                  "interaction"
                ],
                "readOnly": true,
                "type": "string"
              },
              "personId": {
                "description": "The ID of the borrower to which this interaction is associated",
                "nullable": true,
                "type": "string"
              },
              "previousInteractionId": {
                "description": "If a previous interaction identifier is provided, the current and\nprevious interactions will be linked. This can either be Peach's or a lender's\nexternal identifier.\n",
                "nullable": true,
                "type": "string"
              },
              "sendAt": {
                "description": "If set, records the time that the associated notification was Scheduled\nto be sent.\n",
                "format": "date-time",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "sensitive": {
                "default": false,
                "description": "Set this flag if this interaction has sensitive information. The flag\nis used for proper authorization of access to the information.\n",
                "nullable": true,
                "type": "boolean"
              },
              "sensitiveBorrowerOnly": {
                "default": false,
                "nullable": true,
                "readOnly": true,
                "type": "boolean"
              },
              "statusDetailsUpdatedAt": {
                "description": "The datetime of the last `statusDetails` update.",
                "format": "date-time",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "statusUpdatedAt": {
                "description": "The time of a status update.",
                "format": "date-time",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "supercaseBulkOperationId": {
                "description": "If a `SupercaseBulkOperation` created this interaction, this is that ID",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "templateVersionId": {
                "description": "Peach internal template identifier that was used to render the interaction.",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "twilioErrorCode": {
                "description": "Raw error code from Twilio SMS service. The full list of codes\ncan be found at https://www.twilio.com/docs/api/errors .\n",
                "maxLength": 10,
                "nullable": true,
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "BaseInteraction"
      },
      "GenericInteraction": {
        "allOf": [
          {
            "properties": {
              "channel": {
                "description": "The channel by which an interaction occurs.\n",
                "enum": [
                  "fax",
                  "gui",
                  "document"
                ],
                "type": "string"
              },
              "content": {
                "description": "The content and attributes of the message sent. Normally in JSON format.",
                "nullable": true,
                "type": "object"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/BaseInteraction"
          }
        ],
        "title": "GenericInteraction"
      },
      "PhoneNumber": {
        "description": "An E.164 formatted phone number—a phone number prefixed with a `+` and\na country code. (Note that in the United States this is `+1`)\n",
        "example": "+12024561111",
        "type": "string"
      },
      "VoiceInteraction": {
        "allOf": [
          {
            "properties": {
              "channel": {
                "description": "The channel by which an interaction occurs—always `voice` for `VoiceInteraction`\n",
                "enum": [
                  "voice"
                ],
                "type": "string"
              },
              "content": {
                "properties": {
                  "from": {
                    "$ref": "#/components/schemas/PhoneNumber"
                  },
                  "to": {
                    "$ref": "#/components/schemas/PhoneNumber"
                  }
                },
                "type": "object"
              },
              "holdDuration": {
                "default": null,
                "description": "The amount of time the inbound caller was on hold before\nspeaking to an agent, in seconds. `null` if the caller wasn't on\nhold.\n",
                "nullable": true,
                "type": "number"
              },
              "inboundCallAcceptedBy": {
                "$ref": "#/components/schemas/UserActionInfo",
                "description": "Details of the user responsible for accepting the inbound call task.\n"
              },
              "isAutodialed": {
                "default": false,
                "description": "`true` if an autodialed call. If no value is passed, we'll assume\nisAutodialed=`false`—meaning a manual call was performed.\n\nFor more information on why this is important reference the\nTelephone Consumer Protection Act (TCPA).\n",
                "nullable": true,
                "type": "boolean"
              },
              "recordingConsentGiven": {
                "default": false,
                "description": "`true` if the borrower has given consent to record the call.\n",
                "nullable": true,
                "type": "boolean"
              },
              "recordingDuration": {
                "description": "The duration of the recording of this voice call in seconds, or `null` if there\nis no recording.\n",
                "nullable": true,
                "type": "integer"
              },
              "recordingStartedAt": {
                "description": "The date-time at which the recording of this voice call started, or `null`\nif there is no recording.\n",
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "twilioConferenceFriendlyName": {
                "description": "The Twilio conference friendly name for this voice interaction.\n",
                "nullable": true,
                "type": "string"
              },
              "twilioConferenceSid": {
                "description": "The Twilio conference SID for this voice interaction.\n",
                "nullable": true,
                "type": "string"
              },
              "voicemailDuration": {
                "description": "The duration of the voicemail of this voice call in seconds, or `null` if there\nis no voicemail.\n",
                "nullable": true,
                "type": "integer"
              },
              "voicemailStartedAt": {
                "description": "The date-time at which the voicemail left for this call started, or `null`\nif there is no voicemail.\n",
                "format": "date-time",
                "nullable": true,
                "type": "string"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/BaseInteraction"
          }
        ],
        "title": "VoiceInteraction"
      },
      "EmailObj": {
        "description": "Email information",
        "properties": {
          "email": {
            "description": "The email address—must include an `@` symbol.\n\nThe email must be formatted like the string `abby@example.com`—it cannot be like the\nstring `Abby Doe <abby@example.com>`.\n",
            "type": "string"
          },
          "name": {
            "description": "The name associated with the email address",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "EmailInteraction": {
        "allOf": [
          {
            "properties": {
              "channel": {
                "description": "The channel by which an interaction occurs—always `email` for `EmailInteraction`.\n",
                "enum": [
                  "email"
                ],
                "type": "string"
              },
              "content": {
                "properties": {
                  "content": {
                    "description": "The content of the email.\n\nThis is `null` when the interaction is marked as `sensitive=true` and the requesting user\ndoes not have permission to read sensitive content.\n",
                    "items": {
                      "anyOf": [
                        {
                          "properties": {
                            "type": {
                              "enum": [
                                "text/html"
                              ],
                              "type": "string"
                            },
                            "value": {
                              "description": "The HTML body of the email.\n\n**WARNING**: The HTML content of the email could be received from untrusted\nsources. Caution should be used rendering it into a webpage. The data should\nbe sanitized and/or escaped. See https://owasp.org/www-community/attacks/xss/.\n",
                              "type": "string"
                            }
                          },
                          "title": "HTML email body",
                          "type": "object"
                        },
                        {
                          "properties": {
                            "type": {
                              "enum": [
                                "text/plain"
                              ],
                              "type": "string"
                            },
                            "value": {
                              "description": "The plain text of the email body.\n",
                              "type": "string"
                            }
                          },
                          "title": "Plain text email body",
                          "type": "object"
                        }
                      ]
                    },
                    "nullable": true,
                    "type": "array"
                  },
                  "from": {
                    "allOf": [
                      {
                        "description": "The email information of the sender",
                        "type": "object"
                      },
                      {
                        "$ref": "#/components/schemas/EmailObj"
                      }
                    ]
                  },
                  "personalizations": {
                    "items": {
                      "properties": {
                        "bcc": {
                          "items": {
                            "$ref": "#/components/schemas/EmailObj"
                          },
                          "type": "array"
                        },
                        "cc": {
                          "items": {
                            "$ref": "#/components/schemas/EmailObj"
                          },
                          "type": "array"
                        },
                        "to": {
                          "items": {
                            "$ref": "#/components/schemas/EmailObj"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "subject": {
                    "description": "The subject of the email.",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "emailInReplyTo": {
                "description": "The contents of the `In-Reply-To` header, the unique [RFC5322\nemail message\nID](https://www.ietf.org/rfc/rfc5322.html#section-3.6.4)\nassociated with the email being replied to. `null` if the header\nwasn't present in the email.\n",
                "nullable": true,
                "type": "string"
              },
              "emailMessageId": {
                "description": "The contents of the `Message-ID` header, the unique [RFC5322\nemail message\nID](https://www.ietf.org/rfc/rfc5322.html#section-3.6.4)\nassociated with this email. `null` if the header wasn't present\nin the email.\n",
                "nullable": true,
                "type": "string"
              },
              "emailReferences": {
                "description": "The contents of the `References` header, a structured string of\n[RFC5322 email message\nIDs](https://www.ietf.org/rfc/rfc5322.html#section-3.6.4) that\nidentify the messages making up the email thread. `null` if the\nheader wasn't present in the email.\n",
                "nullable": true,
                "type": "string"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/BaseInteraction"
          }
        ],
        "title": "EmailInteraction"
      },
      "ConvoMessage": {
        "properties": {
          "author": {
            "type": "string"
          },
          "body": {
            "nullable": true,
            "type": "string"
          },
          "date_created": {
            "format": "date-time",
            "type": "string"
          },
          "participant_sid": {
            "description": "SID of the participant that sent the message",
            "type": "string"
          },
          "sent_with_attachments": {
            "type": "boolean"
          },
          "sid": {
            "description": "SID of the message",
            "type": "string"
          }
        },
        "title": "Conversation Message",
        "type": "object"
      },
      "TextConvoParticipant": {
        "properties": {
          "attributes": {
            "properties": {
              "borrowerId": {
                "description": "If this is a borrower participant, the borrower ID of the borrower.",
                "nullable": true,
                "type": "string"
              },
              "contactId": {
                "description": "Always `null` for webchat type participants.",
                "nullable": true,
                "type": "string"
              },
              "employeeId": {
                "description": "If this is an employee participant, the employee ID of the employee.",
                "nullable": true,
                "type": "string"
              }
            },
            "type": "object"
          },
          "identity": {
            "description": "A unique string tracking the user in the Twilio chat system",
            "type": "string"
          },
          "messaging_binding": {
            "description": "Always `null` for webchat type participants.",
            "nullable": true,
            "type": "object"
          },
          "sid": {
            "description": "The SID of the participant",
            "type": "string"
          }
        },
        "title": "Text Conversation Participant",
        "type": "object"
      },
      "TextInteraction": {
        "allOf": [
          {
            "properties": {
              "channel": {
                "description": "The channel by which an interaction occurs—always `text` for `TextInteraction``.\n",
                "enum": [
                  "text"
                ],
                "type": "string"
              },
              "content": {
                "anyOf": [
                  {
                    "nullable": true,
                    "properties": {
                      "body": {
                        "description": "Body of the text message",
                        "type": "string"
                      },
                      "from": {
                        "allOf": [
                          {
                            "nullable": true,
                            "type": "object"
                          },
                          {
                            "$ref": "#/components/schemas/PhoneNumber"
                          }
                        ]
                      },
                      "from_name": {
                        "description": "Name of the text sender",
                        "nullable": true,
                        "type": "string"
                      },
                      "to": {
                        "$ref": "#/components/schemas/PhoneNumber"
                      }
                    },
                    "title": "Outbound text interactions",
                    "type": "object"
                  },
                  {
                    "nullable": true,
                    "properties": {
                      "messages": {
                        "items": {
                          "$ref": "#/components/schemas/ConvoMessage"
                        },
                        "type": "array"
                      },
                      "participants": {
                        "additionalProperties": {
                          "$ref": "#/components/schemas/TextConvoParticipant"
                        },
                        "description": "Each \"property name\" of this object is a participant SID and each value is an object\ndescribing the participant.\n",
                        "type": "object"
                      }
                    },
                    "title": "Inbound text interactions",
                    "type": "object"
                  }
                ]
              },
              "twilioConvoSid": {
                "description": "The Twilio conversation SID associated with this interaction. (Only valid for interactions with a channel of text or chat)\n",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/BaseInteraction"
          }
        ],
        "title": "TextInteraction"
      },
      "ChatConvoParticipant": {
        "properties": {
          "attributes": {
            "properties": {
              "borrowerId": {
                "description": "If this is a borrower participant, the borrower ID of the borrower.",
                "nullable": true,
                "type": "string"
              },
              "contactId": {
                "description": "Always `null` for webchat type participants.",
                "nullable": true,
                "type": "string"
              },
              "employeeId": {
                "description": "If this is an employee participant, the employee ID of the employee.",
                "nullable": true,
                "type": "string"
              }
            },
            "type": "object"
          },
          "identity": {
            "description": "A unique string tracking the user in the Twilio chat system",
            "type": "string"
          },
          "messaging_binding": {
            "description": "Always `null` for webchat type participants.",
            "nullable": true,
            "type": "object"
          },
          "sid": {
            "description": "The SID of the participant",
            "type": "string"
          }
        },
        "title": "Webchat Conversation Participant",
        "type": "object"
      },
      "ChatInteraction": {
        "allOf": [
          {
            "properties": {
              "channel": {
                "description": "The channel by which an interaction occurs—always `chat` for `ChatInteraction`\n",
                "enum": [
                  "chat"
                ],
                "type": "string"
              },
              "content": {
                "nullable": true,
                "properties": {
                  "messages": {
                    "items": {
                      "$ref": "#/components/schemas/ConvoMessage"
                    },
                    "type": "array"
                  },
                  "participants": {
                    "additionalProperties": {
                      "$ref": "#/components/schemas/ChatConvoParticipant"
                    },
                    "description": "Each key of this object is a participant SID and each value is an object\ndescribing the participant.\n",
                    "type": "object"
                  }
                },
                "type": "object"
              },
              "twilioConvoSid": {
                "description": "The Twilio conversation SID associated with this interaction. (Only valid for interactions with a channel of text or chat)\n",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/BaseInteraction"
          }
        ],
        "title": "ChatInteraction"
      },
      "MailInteraction": {
        "allOf": [
          {
            "properties": {
              "channel": {
                "description": "The channel by which an interaction occurs—always `mail` for `MailInteraction`\n",
                "enum": [
                  "mail"
                ],
                "type": "string"
              },
              "mailIsCertified": {
                "default": false,
                "description": "Whether or not this mail interaction is sent as [USPS Certified\nMail](https://faq.usps.com/s/article/Certified-Mail-The-Basics). Certified\nmail provides proof of mailing and has more granular tracking\nevents, but incurs additional cost. Please refer to your order\nform for more pricing information.\n\nNOTE: Sending as certified mail is currently only supported for\nthe following subjects:\n  - `loanRightToCurePersonalUnsecured`\n  - `loanRightToCurePersonalUnsecuredColorado`\n  - `loanRightToCurePersonalUnsecuredDC`\n  - `loanRightToCurePersonalUnsecuredIowa`\n  - `loanRightToCurePersonalUnsecuredKansas`\n  - `loanRightToCurePersonalUnsecuredMaine`\n  - `loanRightToCurePersonalUnsecuredMissouri`\n  - `loanRightToCurePersonalUnsecuredSouthCarolina`\n  - `loanRightToCurePersonalUnsecuredWestVirginia`\n  - `loanRightToCurePersonalUnsecuredWisconsin`\n",
                "type": "boolean"
              },
              "mailNumberOfPages": {
                "nullable": true,
                "type": "integer"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/BaseInteraction"
          }
        ],
        "title": "MailInteraction"
      },
      "Interaction": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/GenericInteraction"
          },
          {
            "$ref": "#/components/schemas/VoiceInteraction"
          },
          {
            "$ref": "#/components/schemas/EmailInteraction"
          },
          {
            "$ref": "#/components/schemas/TextInteraction"
          },
          {
            "$ref": "#/components/schemas/ChatInteraction"
          },
          {
            "$ref": "#/components/schemas/MailInteraction"
          }
        ]
      },
      "CompanyAppDomain": {
        "properties": {
          "companyId": {
            "description": "The company ID",
            "readOnly": true,
            "type": "string"
          },
          "domain": {
            "description": "The company app domain",
            "type": "string"
          },
          "id": {
            "description": "The app domain ID",
            "readOnly": true,
            "type": "string"
          },
          "type": {
            "enum": [
              "borrower",
              "agent",
              "help",
              "admin"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "CompanyConfigSamlAuth": {
        "properties": {
          "metadataUrl": {
            "oneOf": [
              {
                "description": "The metadata URL to use for all SAML authentication",
                "example": "https://example.com/app123/samlmetadata",
                "type": "string"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "admin": {
                    "description": "The metadata URL for the admin login SAML authentication",
                    "example": "https://example.com/federationmetadata.xml?appid=123",
                    "type": "string"
                  },
                  "agent": {
                    "description": "The metadata URL for the agent login SAML authentication",
                    "type": "string"
                  },
                  "borrower": {
                    "description": "The metadata URL for the borrower login SAML authentication",
                    "example": "https://example.com/federationmetadata.xml?appid=234",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            ]
          },
          "nameIdFormat": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "CompanyConfigBorrowerVerification": {
        "properties": {
          "crmDefaultTypeId": {
            "description": "The ID of the borrower verification type used when an agent initiates a borrower verification via the CRM.\nThe borrower verification type is the configuration which specifies how many of a particular type of verification question to ask when an agent verifies a borrower's identity.",
            "example": "VT-1234-ABDE",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CompanyConfigCollections": {
        "properties": {
          "autoClose": {
            "properties": {
              "closeOnlyWhenPaidOff": {
                "default": false,
                "description": "If true, keep the collection case open even when the overdue loan is charged off or frozen.",
                "type": "boolean"
              },
              "enabled": {
                "default": false,
                "type": "boolean"
              }
            },
            "type": "object"
          },
          "autoInitiate": {
            "properties": {
              "collectionCaseTypeId": {
                "description": "Public ID of the case type to be used when creating a new collection case.",
                "type": "string"
              },
              "enableReviewTask": {
                "default": true,
                "description": "By default, when a collection case is created automatically, a task of type `reviewAutoCreatedCase`\nis created in taskrouter—the assumption being that usually a human should\nreview automatically created cases.\n\nTo disable the creation of this task set this config to `false`.\n",
                "type": "boolean"
              },
              "enabled": {
                "default": false,
                "type": "boolean"
              },
              "inspectionProcName": {
                "description": "The name of the inspection procedure to run on the borrower's account.",
                "type": "string"
              },
              "interactionDaysPassedThreshold": {
                "description": "Number of days to wait after the last loan overdue notification\nwas sent. The number depends on the loan's due dates frequency.\n",
                "properties": {
                  "everyTwoWeeks": {
                    "type": "integer"
                  },
                  "monthly": {
                    "type": "integer"
                  },
                  "twiceMonthly": {
                    "type": "integer"
                  },
                  "weekly": {
                    "type": "integer"
                  }
                },
                "type": "object"
              },
              "loanDaysOverdueThreshold": {
                "description": "Number of days to wait before creating a new collection case.\nThe number depends on the loan's due dates frequency.\n",
                "properties": {
                  "everyTwoWeeks": {
                    "type": "integer"
                  },
                  "monthly": {
                    "type": "integer"
                  },
                  "twiceMonthly": {
                    "type": "integer"
                  },
                  "weekly": {
                    "type": "integer"
                  }
                },
                "type": "object"
              },
              "nOverdueNoticesRequired": {
                "description": "The number of different loan overdue notices required to be sent\nbefore a new collection case is created.\n",
                "type": "integer"
              },
              "nPastCollectionsThreshold": {
                "description": "Create a collection case if the number of past collections exceeds\nthis number.\n",
                "type": "integer"
              },
              "totalOverdueAmountThreshold": {
                "description": "The sum of overdue amounts of all overdue loans has to exceed this\nvalue for the collection case to be created.\n",
                "type": "integer"
              }
            },
            "type": "object"
          },
          "intensityLimits": {
            "additionalProperties": {
              "properties": {
                "heavy": {
                  "type": "integer"
                },
                "light": {
                  "type": "integer"
                },
                "normal": {
                  "type": "integer"
                }
              },
              "type": "object"
            },
            "description": "Keys are strings where each number is a period in days",
            "type": "object"
          }
        },
        "type": "object"
      },
      "CompanyConfigDataOutbox": {
        "properties": {
          "compressionFormat": {
            "default": "gzip",
            "description": "Compression format of files delivered.\n",
            "enum": [
              "gzip",
              "snappy"
            ],
            "type": "string"
          },
          "deliveryFrequency": {
            "default": "1h",
            "description": "Frequency of data deliveries.\n",
            "enum": [
              "15m",
              "1h",
              "1d"
            ],
            "type": "string"
          },
          "destinationBucket": {
            "description": "The name of the bucket to use for data outbox.\n",
            "type": "string"
          },
          "destinationProvider": {
            "default": "gcp",
            "description": "The provider of the bucket to use for data outbox.\n",
            "enum": [
              "gcp",
              "aws",
              "azure"
            ],
            "type": "string"
          },
          "destinationRegion": {
            "description": "The region of the bucket to use for data outbox. This is only required if the destination provider is `gcp` or `aws`.\n",
            "type": "string"
          },
          "fileFormat": {
            "default": "parquet",
            "description": "Format of files delivered. Currently, only Parquet is supported.\n",
            "enum": [
              "parquet",
              "avro"
            ],
            "type": "string"
          },
          "googleServiceAccount": {
            "description": "The Google Cloud service account to use for data outbox.\n",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CompanyConfigMonitoring": {
        "properties": {
          "criteria": {
            "description": "The criteria used to determine whether monitoring should be enabled for a borrower.\n\nMonitoring will be enabled:\n- `borrowerStatus`: if the borrower `status` is `active`\n- `borrowerAndLoanStatus`: if the borrower `status` is `active` and the borrower has loans with `status`=`active`\n",
            "enum": [
              "borrowerStatus",
              "borrowerAndLoanStatus"
            ],
            "type": "string"
          },
          "scraCaseCreationCriteria": {
            "description": "The criteria used to determine whether a SCRA case should be created for a borrower.\n\nA SCRA case will be created:\n- `borrowerOnly`: Upon borrower identity match, SCRA case will be created even if there are no loans that are qualified per\n                  SCRA regs. If there are eligible loans, the case will associate them.\n- `borrowerAndLoan`: Upon borrower identity match, SCRA case will be created only if there are qualified loans per SCRA regs.\n",
            "enum": [
              "borrowerOnly",
              "borrowerAndLoan"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "CompanyConfigPaymentExternalTransaction": {
        "properties": {
          "statusTransition": {
            "description": "Enables lenders to control whether Peach's system will automatically intervene and transition the status of `pending` transactions to `successful` according to the `transitionLogic` configuration.\n\n- `auto` - Peach's system will automatically transition `pending` transactions to `succeeded` after a specified period of time as defined by `externalTransactions.transitionLogic`\n- `manual` - Lender is responsible for transitioning the status of external transactions via API.\n",
            "enum": [
              "auto",
              "manual"
            ],
            "type": "string"
          },
          "transactionType": {
            "enum": [
              "ach",
              "debitCard",
              "creditCard",
              "check",
              "payroll",
              "moneyOrder",
              "wire",
              "paymentNetwork"
            ],
            "type": "string"
          },
          "transitionLogic": {
            "description": "Required for statusTransition = `auto`. Defines the logic used to determine when the external transaction's status will transition from `pending` to `succeeded`, assuming no other status changes occur in the meantime.\n\n- `numDays`` - Peach's system will wait a specified amount of time in order to automatically transition the status of the transaction from `pending` to `succeeded`.\n  **NOTE**: any transactions whose status is not pending will be excluded from the logic to automatically transition the status of a payment.\n\n- `holdDays`` - Peach's system will adhere to the holdDaysEndDate on the transaction and automatically transition the status of the transaction from `pending` to `succeeded` at the end of the hold day period.\n  **NOTE**: Peach will only transition transactions with status = `pending`.\n",
            "properties": {
              "dayType": {
                "description": "Defines whether the system should calculate the automatic status transition based on calendar or business days. NOTE: this is a required attribute for products whose statusTransition is set to `auto` AND the transitionLogic is set to `numDays`.\nThis value cannot be set when type=holdDays.\n",
                "enum": [
                  "calendar",
                  "business"
                ],
                "type": "string"
              },
              "numDays": {
                "description": "Defines how many days the system will wait to automatically update the transaction's status if transitionLogic.type = numDays.\nThis value cannot be set when transitionLogic.type=`holdDays`.\nThe system will transition the status of the transaction on the Nth day.\nFor example, if a transaction is created on Jan 1 and numDays = 3, the\ntransaction's status will automatically transition on Jan 4.\n",
                "type": "integer"
              },
              "type": {
                "enum": [
                  "numDays",
                  "holdDays"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "CompanyConfigTasks": {
        "properties": {
          "channelCapacities": {
            "description": "The capacity configured for each task for channel type.\n\nThe default capacity for:\n- `default` is `2` (i.e., tasks without a channel)\n- `voice` is `1`\n- `chat` is `3`\n",
            "properties": {
              "chat": {
                "minimum": 0,
                "nullable": true,
                "type": "integer"
              },
              "default": {
                "minimum": 0,
                "nullable": true,
                "type": "integer"
              },
              "email": {
                "minimum": 0,
                "nullable": true,
                "type": "integer"
              },
              "text": {
                "minimum": 0,
                "nullable": true,
                "type": "integer"
              },
              "voice": {
                "minimum": 0,
                "nullable": true,
                "type": "integer"
              }
            },
            "type": "object"
          },
          "disableTaskRouter": {
            "description": "If `true` disable all task routing features.\n\ni.e., Agents will not log in to task system. Tasks will not be created.\n",
            "type": "boolean"
          },
          "disableTaskTypes": {
            "description": "List of task types to disable.\n\nWhen a task type is disabled the system functions as normal except no task\nis created.\n\nNote that some task types which are allowed to be disabled here probably would be\nbetter served disabled elsewhere. For instance, disabling `answerInboundVoiceCall`\nwould mean that incoming voice calls are still able to be received by the Peach\nsystem, but cannot be answered by agents! In this case, it would be better to\nset the config `communication.enableInboundVoiceCall=false`.\n",
            "items": {
              "$ref": "#/components/schemas/TaskType"
            },
            "type": "array"
          },
          "enableCaseOwnership": {
            "description": "Enable optionally assigning an owner to Case objects. This will be\nused during task routing to prefer to match tasks relating to cases\nwith their owners.\n",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "CompanyConfigWebhooks": {
        "properties": {
          "requestTimeoutSeconds": {
            "description": "The number of seconds the system will wait for a response\nfrom a webhook before timing out.\n",
            "maximum": 300,
            "minimum": 30,
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "CompanyConfigZendeskSSO": {
        "properties": {
          "sso": {
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "sharedSecretToken": {
                "description": "The shared secret token.",
                "type": "string"
              },
              "subdomain": {
                "description": "Subdomain of the remote log in URL.",
                "type": "string"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "CompanyConfig": {
        "description": "The company configuration object is the main location to store configuration\nsettings to control the functionality and appearance of the Peach\napplications which this company users.\n",
        "properties": {
          "addressValidation": {
            "default": "smartyStreets",
            "description": "Vendor to use for address validation.",
            "enum": [
              "smartyStreets",
              "googleMaps"
            ],
            "type": "string"
          },
          "allowPartialAddress": {
            "default": false,
            "description": "If `true`, Address Line 1 is Optional, otherwise it is required for loans managed by Peach\n",
            "type": "boolean"
          },
          "auth": {
            "properties": {
              "saml": {
                "$ref": "#/components/schemas/CompanyConfigSamlAuth"
              }
            },
            "type": "object"
          },
          "borrowerVerification": {
            "$ref": "#/components/schemas/CompanyConfigBorrowerVerification"
          },
          "brandAssets": {
            "$ref": "#/components/schemas/CompanyConfigBrandAssets",
            "nullable": true
          },
          "collections": {
            "$ref": "#/components/schemas/CompanyConfigCollections"
          },
          "communication": {
            "$ref": "#/components/schemas/CompanyConfigCommunication",
            "nullable": true
          },
          "compliance": {
            "description": "Compliance guard related configuration parameters",
            "properties": {
              "no_review_task_for_autocreated_cases": {
                "description": "If `true` then assume that cases automatically created via Compliance\nGuard do not need to be reviewed by a human. If `false` or unset, then\nwhenever Compliance Guard automatically creates a case, create a\ncorresponding task for an agent to review the newly created case.\n",
                "type": "boolean"
              },
              "no_review_task_for_autoupdated_cases": {
                "description": "If `true` then assume that cases automatically updated via Compliance\nGuard do not need to be reviewed by a human. If `false` or unset, then\nwhenever Compliance Guard automatically updates certain cases, create a\ncorresponding task for an agent to review the updated case.\nNote that only a subset of automatically updated cases will generate a\nreview task even with this setting enabled. Those are `bankruptcy` and\n`militaryDuty`.\n",
                "type": "boolean"
              },
              "rndCompanyId": {
                "description": "Reassigned Numbers Database Company ID",
                "type": "string"
              }
            },
            "type": "object"
          },
          "creditCounselingServicesNumber": {
            "type": "string"
          },
          "dataOutbox": {
            "$ref": "#/components/schemas/CompanyConfigDataOutbox"
          },
          "documents": {
            "description": "Document processing related configuration parameters.",
            "properties": {
              "signer_contact": {
                "description": "Signer's contact information to be added to the signature.",
                "type": "string"
              },
              "signer_location": {
                "description": "Signer's location (e.g. \"Oakland, CA, USA\")",
                "type": "string"
              },
              "signing_key": {
                "description": "Document signing key in PKCS 12 format.",
                "type": "string"
              },
              "signing_key_password_token": {
                "description": "Token corresponding to the signing key password.",
                "type": "string"
              }
            },
            "type": "object"
          },
          "evidence": {
            "$ref": "#/components/schemas/CompanyConfigEvidence"
          },
          "forceCaseIdOnAgentActions": {
            "default": true,
            "description": "If true, a loan action made by an agent must come with a case ID.",
            "type": "boolean"
          },
          "links": {
            "$ref": "#/components/schemas/CompanyConfigLinks",
            "nullable": true
          },
          "monitoring": {
            "$ref": "#/components/schemas/CompanyConfigMonitoring"
          },
          "openHours": {
            "$ref": "#/components/schemas/CompanyConfigOpenHours",
            "nullable": true
          },
          "payment": {
            "description": "Payment processing configuration.",
            "properties": {
              "allowedCreditCardTx": {
                "description": "Controls how credit cards can be used.",
                "properties": {
                  "downPayment": {
                    "default": true,
                    "description": "If true, down payments are allowed with credit cards.",
                    "type": "boolean"
                  },
                  "payment": {
                    "default": false,
                    "description": "If true, regular loan payments are allowed with credit cards.",
                    "type": "boolean"
                  }
                },
                "type": "object"
              },
              "bypassCollisionCheck": {
                "description": "Allow the creation of multiple payment instruments with the same details within the same company.",
                "type": "boolean"
              },
              "disablePaymentProcessing": {
                "default": false,
                "description": "When set to `true`, Peach will not process payments or allow creation of transactions where `isExternal=false`.\nExisting internal transactions will be canceled on their scheduled date. Lenders can continue to create and process external transactions.\nUse `scheduleAutopayTransactions` to control whether external autopay transactions will automatically be created by Peach.\n",
                "type": "boolean"
              },
              "externalTransactions": {
                "description": "Enables lenders to configure treatment of external transactions by Peach's system.\n",
                "items": {
                  "$ref": "#/components/schemas/CompanyConfigPaymentExternalTransaction"
                },
                "type": "array"
              },
              "maxNumberNewPaymentMethodsIn30Days": {
                "description": "If a borrower has created a Payment Instrument this many times in the past 30 days,\nthey will be blocked from creating anymore. This does not apply to `external` instruments, or instruments created with `force=true`.\n",
                "type": "number"
              },
              "processedByPeach": {
                "description": "Whether Peach handles payment processing for this company.",
                "type": "boolean"
              },
              "scheduleAutopayTransactions": {
                "default": false,
                "description": "Only applicable if `processedByPeach=false`.\n`true` - the system will create transactions in scheduled status based on Autopay plan expected payments (aka AEPs).\n`false` - the system will not create Autopay transactions based on Autopay plan expected payments. In this case, the lender is expected to create applicable transactions.\n",
                "type": "boolean"
              },
              "transactionLimitAmount": {
                "default": 100000,
                "description": "Maximum amount for a single transaction",
                "type": "integer"
              }
            },
            "type": "object"
          },
          "paymentTypes": {
            "$ref": "#/components/schemas/CompanyConfigPaymentTypes"
          },
          "requireBorrowerIdentity": {
            "default": true,
            "description": "Require new borrowers to have identity information.",
            "type": "boolean"
          },
          "search": {
            "properties": {
              "indexing": {
                "properties": {
                  "enabled": {
                    "default": true,
                    "description": "If false, data will not be indexed in elastic search",
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "statements": {
            "$ref": "#/components/schemas/CompanyConfigStatements"
          },
          "support": {
            "$ref": "#/components/schemas/CompanyConfigSupport",
            "nullable": true
          },
          "tasks": {
            "$ref": "#/components/schemas/CompanyConfigTasks"
          },
          "timezone": {
            "$ref": "#/components/schemas/CompanyConfigTimezone",
            "nullable": true
          },
          "ui": {
            "$ref": "#/components/schemas/CompanyConfigUi",
            "nullable": true
          },
          "webhooks": {
            "$ref": "#/components/schemas/CompanyConfigWebhooks"
          },
          "zendesk": {
            "$ref": "#/components/schemas/CompanyConfigZendeskSSO"
          }
        },
        "title": "Company Config",
        "type": "object"
      },
      "Company": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "agentAuthType": {
                "$ref": "#/components/schemas/AuthType",
                "description": "Type of agent authentication, e.g. `basic` or `google`"
              },
              "agentAuthValueType": {
                "$ref": "#/components/schemas/AuthValueType",
                "description": "When using `authType=basic` (i.e., user/password authentication), require this method of authentication (e.g. `email`)"
              },
              "appDomains": {
                "items": {
                  "$ref": "#/components/schemas/CompanyAppDomain"
                },
                "type": "array"
              },
              "bankruptcyPolicy": {
                "type": "boolean"
              },
              "bankruptcyServiceId": {
                "description": "The service that will be used for bankruptcy monitoring (no monitoring if is null)",
                "type": "integer"
              },
              "borrowerAuthType": {
                "$ref": "#/components/schemas/AuthType",
                "description": "Type of borrower authentication, e.g. `basic` or `google`"
              },
              "borrowerAuthValueType": {
                "$ref": "#/components/schemas/AuthValueType",
                "description": "When using `authType=basic` (i.e., user/password authentication), require this method of authentication (e.g. `email`)"
              },
              "brandName": {
                "description": "The name of the company for presentation to the end consumer—e.g., in emails.\n",
                "nullable": true,
                "type": "string"
              },
              "config": {
                "$ref": "#/components/schemas/CompanyConfig"
              },
              "deceasedPolicy": {
                "type": "boolean"
              },
              "deceasedServiceId": {
                "description": "The service that will be used for deceased monitoring (no monitoring if is null)",
                "type": "integer"
              },
              "domainName": {
                "description": "Base web domain being used in communications/email/etc",
                "type": "string"
              },
              "femaPolicy": {
                "description": "If set to `true`, automatically create Supercases when a disaster is detected in the region\nof a borrower's address.\n",
                "type": "boolean"
              },
              "femaServiceId": {
                "description": "The service that will be used for FEMA disaster monitoring (no monitoring if is null)",
                "type": "integer"
              },
              "legalName": {
                "description": "Legal name of the company",
                "type": "string"
              },
              "name": {
                "description": "Alternate name for the company",
                "type": "string"
              },
              "object": {
                "enum": [
                  "company"
                ],
                "readOnly": true,
                "type": "string"
              },
              "ofacServiceId": {
                "description": "The service that will be used for OFAC monitoring (no monitoring if is null)",
                "type": "integer"
              },
              "rndServiceId": {
                "description": "The service that will be used for OFAC monitoring (no monitoring if is null)",
                "type": "integer"
              },
              "scraServiceId": {
                "description": "The service that will be used for SCRA military monitoring (no monitoring if is null)",
                "type": "integer"
              },
              "shortDomainName": {
                "description": "Base web domain being used in communications/email/etc",
                "type": "string"
              },
              "slug": {
                "description": "A slug to be used to match this company in other environments (dev/sandbox/etc).\nIt will also be used for FE hosting and the default DNS entries created for it.\n",
                "maxLength": 50,
                "minLength": 1,
                "type": "string"
              },
              "status": {
                "default": "active",
                "description": "The status of the company.",
                "enum": [
                  "active",
                  "activeChurning",
                  "inactive"
                ],
                "type": "string"
              },
              "timezone": {
                "$ref": "#/components/schemas/CompanyConfigTimezone",
                "nullable": true
              },
              "tokenizationKeyId": {
                "type": "integer"
              },
              "type": {
                "description": "Type enumerator for companies",
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "description": "The company object represents a company of Peach which uses some of Peach's applications.\n\nIt contains metadata about the company and configuration settings for how the applications\nshould function.\n"
      },
      "BaseMixinWithoutTimestamps": {
        "properties": {
          "id": {
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PersonType": {
        "description": "A relation type between a borrower and a loan.\n\nUse `coBorrower` as the value if there are two or more borrowers.\n",
        "enum": [
          "coBorrower",
          "coSigner",
          "applicant"
        ],
        "type": "string"
      },
      "CancellationReason": {
        "description": "The cancellation reason:\n\n`technicalIssue` - loan was created due to a technical issue.\n\n`wrongLoanTerms` - loan was created with the wrong terms.\n\n`wrongBorrower` - loan was created on the wrong borrower.\n\n`other` - for any other reason requiring cancellation.\n",
        "enum": [
          "technicalIssue",
          "wrongLoanTerms",
          "wrongBorrower",
          "other"
        ],
        "type": "string"
      },
      "LoanLabel": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseWithExternalIdMixin"
          },
          {
            "properties": {
              "companyId": {
                "description": "The unique company identifier.\n",
                "readOnly": true,
                "type": "string"
              },
              "description": {
                "description": "An optional description of the loan label. Typically used to store additional details or\nan explanation about the label. Not displayed in any user interfaces.\n",
                "type": "string"
              },
              "name": {
                "description": "The name of the label. This is the name that will appear in the agent (and admin, if applicable) portals.\n",
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "BaseLoanMixin": {
        "properties": {
          "additionalBorrowers": {
            "items": {
              "properties": {
                "externalId": {
                  "description": "The borrower's external ID if this related borrower has one, otherwise `null`",
                  "readOnly": true,
                  "type": "string"
                },
                "id": {
                  "description": "ID of the related borrower",
                  "type": "string"
                },
                "name": {
                  "description": "The related borrower's full name (or business's name if this is a business).",
                  "readOnly": true,
                  "type": "string"
                },
                "relationType": {
                  "$ref": "#/components/schemas/PersonType"
                }
              },
              "type": "object"
            },
            "nullable": true,
            "type": "array"
          },
          "assetDisplayName": {
            "description": "The asset display name. For example: Loan, Line of Credit, Lease, Credit Card.\n",
            "readOnly": true,
            "type": "string"
          },
          "cancellationReason": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CancellationReason",
                "nullable": true
              },
              {
                "readOnly": true
              }
            ]
          },
          "declineReason": {
            "description": "The reason(s) why the loan application or the draw request was declined.",
            "nullable": true,
            "properties": {
              "mainExternalReasonCode": {
                "description": "A Lender's external main decline reason code.",
                "type": "string"
              },
              "mainScriptForRep": {
                "description": "The main decline reason script that a customer service agent can provide to the borrower.",
                "type": "string"
              },
              "mainText": {
                "description": "The main decline reason text that was shown to the borrower.",
                "type": "string"
              },
              "subReasons": {
                "items": {
                  "properties": {
                    "externalReasonCode": {
                      "description": "A Lender's external decline reason code.",
                      "type": "string"
                    },
                    "reasonText": {
                      "description": "The decline reason text that was shown to the borrower.",
                      "type": "string"
                    },
                    "scriptForRep": {
                      "description": "The decline reason script that a customer service agent can provide to the borrower.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": "array"
              }
            },
            "type": "object"
          },
          "displayId": {
            "description": "The loan ID to show in the UI (Peach public or external).",
            "readOnly": true,
            "type": "string"
          },
          "endDate": {
            "description": "The end date of the loan in the product timezone, if amortized.",
            "format": "date",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "externalId": {
            "description": "A lender's identifier for a loan or a draw.\n\nAfter the object is successfully created, a lender can use ID or externalId identifiers to fetch the object.\n\nTo fetch the object using externalId you need to add `ext-` to the URL.\n\nNote: Don't add ext- to the identifier value. For example: if the external identifier is `ABCDE`, then pass externalId=ACBCE and NOT ext-ABCDE when creating the object.\n",
            "minLength": 1,
            "nullable": true,
            "type": "string"
          },
          "labels": {
            "items": {
              "$ref": "#/components/schemas/LoanLabel"
            },
            "type": "array"
          },
          "metaData": {
            "$ref": "#/components/schemas/MetaData"
          },
          "timestamps": {
            "description": "Various loan timestamps.",
            "properties": {
              "acceleratedAt": {
                "description": "The timestamp of the effective date of the acceleration of a loan or draw. A\npreviously accelerated loan that has been reversed will be marked as null.\n",
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "activatedAt": {
                "description": "The timestamp when the loan or the draw was activated.",
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "canceledAt": {
                "description": "The timestamp of when the loan was canceled",
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "chargedOffAt": {
                "description": "The timestamp of the effective date of the charge-off of a loan or draw. A\npreviously accelerated loan that has been reversed will be marked as null.\n",
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "closedAt": {
                "description": "The date LOC or Draw was closed.",
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "createdAt": {
                "format": "date-time",
                "readOnly": true,
                "type": "string"
              },
              "deletedAt": {
                "format": "date-time",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "frozenAt": {
                "description": "The timestamp of the most recent freeze date of a loan or draw. A previously frozen\nloan that has been reversed will be marked as null.\n",
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "lastAmortizedAt": {
                "description": "The most recent date when the loan or the draw was amortized. Due dates schedule change\ncan cause to re-amortization.\n",
                "format": "date-time",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "migratedAt": {
                "description": "The timestamp of when the loan completed loan migration.",
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "originatedAt": {
                "description": "The timestamp when the loan or draw was originated.",
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "paidOffAt": {
                "description": "The timestamp of the effective date when a loan or draw is paidOff.\n",
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "startedAt": {
                "description": "The timestamp when the loan or the draw was activated.",
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "updatedAt": {
                "format": "date-time",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "OldConsumerAccountNumber": {
        "description": "The old Account Number that was assigned to this account in the other system\n(not Peach) prior to migration. The new Account Number that will be reported\nis the loan `externalId` or Peach Public ID.\n\nDo not include embedded blanks or special characters. If\n`changeIndicator=2`, this field should be left empty or blank filled.\n",
        "maxLength": 30,
        "minLength": 1,
        "nullable": false,
        "type": "string"
      },
      "MigrationL2SegmentCANOnly": {
        "properties": {
          "changeIndicator": {
            "description": "The change indicator field.\n\n- `1` = Consumer Account Number Change ONLY.\n- `2` = Identification Number Change ONLY.\n- `3` = Consumer Account Number AND Identification Number Change.\n",
            "enum": [
              "1"
            ],
            "type": "string"
          },
          "oldConsumerAccountNumber": {
            "$ref": "#/components/schemas/OldConsumerAccountNumber"
          }
        },
        "required": [
          "changeIndicator",
          "oldConsumerAccountNumber"
        ],
        "type": "object"
      },
      "OldIdentificationNumber": {
        "description": "The old Identification Number that was used in the other system (not Peach)\nprior to migration. The new Identification Number that will be reported is\nas configured in Peach.\n\nDo not include embedded blanks or special characters. If\n`changeIndicator=1`, this field should be left empty or blank filled.\n",
        "maxLength": 20,
        "minLength": 1,
        "nullable": false,
        "type": "string"
      },
      "MigrationL2SegmentIDNOnly": {
        "properties": {
          "changeIndicator": {
            "description": "The change indicator field.\n\n- `1` = Consumer Account Number Change ONLY.\n- `2` = Identification Number Change ONLY.\n- `3` = Consumer Account Number AND Identification Number Change.\n",
            "enum": [
              "2"
            ],
            "type": "string"
          },
          "oldIdentificationNumber": {
            "$ref": "#/components/schemas/OldIdentificationNumber"
          }
        },
        "required": [
          "changeIndicator",
          "oldIdentificationNumber"
        ],
        "type": "object"
      },
      "MigrationL2SegmentBoth": {
        "nullable": true,
        "properties": {
          "changeIndicator": {
            "description": "The change indicator field.\n\n- `1` = Consumer Account Number Change ONLY.\n- `2` = Identification Number Change ONLY.\n- `3` = Consumer Account Number AND Identification Number Change.\n",
            "enum": [
              "3"
            ],
            "type": "string"
          },
          "oldConsumerAccountNumber": {
            "$ref": "#/components/schemas/OldConsumerAccountNumber"
          },
          "oldIdentificationNumber": {
            "$ref": "#/components/schemas/OldIdentificationNumber"
          }
        },
        "required": [
          "changeIndicator",
          "oldConsumerAccountNumber",
          "oldIdentificationNumber"
        ],
        "type": "object"
      },
      "MigrationL2Segment": {
        "description": "The L1 Segment provides an automated method for changing the\nConsumer Account Number and/or Identification Number and should be\nreported only one time per record to affect the change.\n\nIf you migrate an account to Peach, and want to include the L1\nsegment, you need to pass all the applicable attributes in this\nobject.\n",
        "discriminator": {
          "mapping": {
            "1": "#/components/schemas/MigrationL2SegmentCANOnly",
            "2": "#/components/schemas/MigrationL2SegmentIDNOnly",
            "3": "#/components/schemas/MigrationL2SegmentBoth"
          },
          "propertyName": "changeIndicator"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/MigrationL2SegmentCANOnly"
          },
          {
            "$ref": "#/components/schemas/MigrationL2SegmentIDNOnly"
          },
          {
            "$ref": "#/components/schemas/MigrationL2SegmentBoth"
          }
        ]
      },
      "Migration": {
        "description": "Loan migration details. This structure should be used for loans that are migrated from another system to Peach.\nTo migrate a loan (see migration guidance for full details):\n  1. Create a new loan in `pending` or `originated` status. The loan must be in `originated` before proceeding to the next step.\n  2. Call relevant endpoints to create past payments, refunds, etc.\n  3. Call `Migrate loan` endpoint.\n",
        "properties": {
          "activatedDate": {
            "description": "The activation date of the migrated loan in the product timezone. The date must be in the past.",
            "format": "date",
            "type": "string",
            "writeOnly": true
          },
          "activatedTimeOfDay": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TimeOfDay"
              },
              {
                "description": "The effective time of day on `activatedDate` in the product timezone.",
                "type": "object"
              }
            ],
            "writeOnly": true
          },
          "creditReporting": {
            "description": "Instructions to the Peach system on how to report a migrated account.",
            "properties": {
              "dateOfFirstDelinquency": {
                "description": "The date of first delinquency as of the \"migration cutoff\ndate\". This attribute is required to accurately report delinquency\ndata. If the migrated account is delinquent (based on the Metro2\ndefinition) or was delinquent in the past, then you must pass the\n`dateOfFirstDelinquency`.\n\nFor more details of how to determine this value, please refer to the\nmost recent Metro2 Credit Reporting Resource Guide.\n",
                "format": "date",
                "nullable": true,
                "type": "string"
              },
              "k2Segment": {
                "description": "The K2 Segment may be used to report the name of the company from\nwhich the account was purchased or the name of the company to which\nthe account was sold.\n\nIf you migrate an account to Peach, and want to include the K2\nsegment, you need to pass all the applicable attributes in this\nobject.\n\nPlease review the notes below per the Metro2 Credit Reporting Resource Guide:\n\n  - If the company that purchased the accounts will not report the\n    prior history, the seller must report the accounts as sold to\n    reflect the final status.\n\n  - If the account is delinquent or derogatory, it is imperative\n    that you provide the date of the first delinquency that led to\n    the account being sold to the debt purchaser.\n\n  - If the company that purchased the accounts is converting the\n    account history to their system, the seller should not report\n    the accounts as sold. In this situation, the seller and\n    purchaser should work together with the data representatives at\n    the consumer reporting agencies, who will assist you with\n    conversion of the accounts.\n\n  - If the lender who sold the accounts reported them as \"purchased\n    by another company\" or the history cannot be verified for the\n    account prior to purchase, report the Base and K2 Segment\n    fields.\n\n    - If the new lender is unable to obtain the Date of First\n      Delinquency with the original lender, do not report the\n      account.\n\n    - Payment history that occurred with the previous lender, which\n      is already on the consumer's file, must not be reported by the\n      new lender.\n\n  - If the previous lender's account history is being converted to\n    the new lender's system and the account history can be verified,\n    report the Base, K2 Segment and L1 Segment fields.\n\n    - If the new lender is unable to obtain the Date of First\n      Delinquency with the original lender, do not report the\n      account.\n\n    - Make sure to configure the Identification Number to be the\n      same as reported by the previous lender.\n\n    - Make sure to pass loan `externalId` as the Account Number\n      reported by the previous lender.\n",
                "nullable": true,
                "properties": {
                  "purchasedFromName": {
                    "description": "Contains the name of the company from which the account was\npurchased.\n",
                    "maxLength": 30,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "purchasedFromName"
                ],
                "type": "object"
              },
              "l1Segment": {
                "$ref": "#/components/schemas/MigrationL2Segment"
              },
              "paymentHistoryProfile": {
                "description": "The payment history profile of the account prior to the migration date.\n\nThe format of this attribute is a string of exactly 24\ncharacters. Peach will use the provided history profile of the\naccount to report the history up to 24 months. After the migration\ncutoff date, Peach will start reporting \"new/current\" payment\nbehavior and use part of the `paymentHistoryProfile` data.\n\nFor example:\n  Migration from date = Jan 11, 2022 (this is also a statement date)\n  paymentHistoryProfile = `000011000000EEEE0000BBBB`\n\n  Data represents, from left to right, 12/31/2021 back through\n  01/31/2020. The E's indicate that the account was current with a\n  zero balance in 12/2020, 11/2020, 10/2020 and 09/2020. The B's\n  indicate that no payment history was available prior to 05/2020,\n  which was most likely the date account was opened.\n\nPeach will first report the account on Feb 1, 2022:\n  Date of Account Information = 01/31/2022 (represents the reporting period of 01/01/2022 through 01/31/2022)\n  Account Status Code = 11\n  Peach will report the PHP field as is - `000011000000EEEE0000BBBB`.\n\nPeach will report the account again on Mar 1, 2022:\n  Date of Account Information = 02/31/2022 (represents the reporting period of 02/01/2022 through 02/28/2022)\n  Peach will use part of the original value passed in the `paymentHistoryProfile` and report the PHP field as `0000011000000EEEE0000BBB`. Note that Peach didn't use the last \"B\" from the original value that was passed.\n\nFor more details of how to determine this value, please refer to the\nmost recent Metro2 Credit Reporting Resource Guide. The below was\ncopied from the Metro2 2022 Credit Reporting Resource Guide:\n\n> Contains up to 24 months of consecutive payment activity for the\n   previous 24 reporting periods prior to the Date of Account\n   Information (Field 24) being reported. Report one month's payment\n   history in each byte from the left to right in most recent to\n   least recent order. The first byte should represent the Account\n   Status Code reported in the previous reporting period. Refer to\n   Exhibit 5 for examples of reporting payment history, which\n   includes examples for month-end reporters, as well as examples\n   for reporters who submit data on other days of the month (e.g.,\n   1st, 15th, etc.).\n>\n> `0` = 0 payments past due (current account)\n> `1` = 30 - 59 days past due date\n> `2` = 60 - 89 days past due date\n> `3` = 90 - 119 days past due date\n> `4` = 120 - 149 days past due date\n> `5` = 150 - 179 days past due date\n> `6` = 180 or more days past due date\n> `B` = No payment history available prior to this time – either because the account was not open or because the payment history cannot be furnished. A \"B\" may not be embedded within other values.\n> `D` = No payment history reported/available this month. \"D\" may be embedded in the payment history profile.\n> Note: Code \"D\" should not be used as a default value or reported to remove accurately-reported history.\n> `E` = Zero balance and Account Status 11 – Current (0-29 days past the due date)(Applies to Credit Cards and Lines of Credit)\n> `G` = Collection\n> `H` = Foreclosure Completed\n> `J` = Voluntary Surrender\n> `K` = Repossession\n> `L` = Charge-off\n>\n> No other values are acceptable in this field.\n\nIf this value is not provided, Peach will report PHP as \"unknown\"\nfrom the \"activation date\" until the \"migration cutoff date\" using a\nspecial code `B` based on the Metro2 Credit Reporting Resource\nGuide.\n",
                "maxLength": 24,
                "minLength": 24,
                "nullable": true,
                "pattern": "^[0123456BDEGHJKL]{24}$",
                "type": "string"
              }
            },
            "type": "object",
            "writeOnly": true
          },
          "migrationStatus": {
            "default": "nonMigrated",
            "description": "The loan migration status. This attribute can be updated by the Peach system only.\n\n  - `nonMigrated` - this is a non-migrated loan. Most loans are expected to be `nonMigrated`.\n  - `prepMigration` - the lender can add objects to the loan in the past.\n  - `migrating` - the system is migrating the loan. Objects cannot be modified or added.\n  - `completed` - the loan was successfully migrated. After a successful migration the loan status will be changed to one of the following statuses: `active`, `accelerated`, `chargedOff` or `paidOff`.\n  - `failed` - the loan migration attempt failed. The loan will remain in the `pending` status. You can update the loan details and try to migrate again by calling `Migrate loan` endpoint.\n",
            "enum": [
              "nonMigrated",
              "prepMigration",
              "migrating",
              "completed",
              "failed"
            ],
            "type": "string"
          }
        },
        "title": "Migration",
        "type": "object"
      },
      "SharedInstallmentAndLoc": {
        "properties": {
          "assetType": {
            "$ref": "#/components/schemas/LoanAssetType",
            "readOnly": true
          },
          "chargedOffReason": {
            "description": "The reason for loan charge off. Can be updated via the Update Loan endpoint when the loan status is `chargedOff`.\n\n`term` means the loan was charged off per loan type configuration after X days overdue.\n\n`fraudulent` means the loan was charged off for fraudulent reason. If the loan is reported to one or more credit bureaus, the system will automatically send a special request to each bureau to delete the tradeline due to confirmed fraud. This is the only reason that the system will automatically trigger a request to delete the tradeline. For other reasons, if you need to delete the tradeline please call the `Delete from credit reporting` endpoint or use an agent tool.\n\n`bankruptcy` means the loan was charged off because of bankruptcy.\n\n`legal` means the loan was charged off because of some legal reason.\n",
            "enum": [
              "term",
              "fraudulent",
              "bankruptcy",
              "legal"
            ],
            "nullable": true,
            "type": "string"
          },
          "companyId": {
            "description": "The unique company identifier.\n",
            "readOnly": true,
            "type": "string"
          },
          "mainBorrowerId": {
            "description": "The identifier of the main borrower of the loan",
            "nullable": true,
            "type": "string"
          },
          "migration": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Migration"
              },
              {
                "required": [
                  "migrationStatus",
                  "activatedDate",
                  "activatedTimeOfDay"
                ],
                "type": "object"
              }
            ]
          }
        },
        "type": "object"
      },
      "PersonId": {
        "description": "A borrower's unique identifier (who owns the loan). Can be Peach\nor a lender's external identifier.\n",
        "type": "string",
        "writeOnly": true
      },
      "PersonLoan": {
        "description": "Represents a borrower attached to a loan. A borrower can be an applicant,\nmain borrower, co-borrower, etc.\n",
        "properties": {
          "loanRelationType": {
            "$ref": "#/components/schemas/PersonType"
          },
          "object": {
            "default": "personLoan",
            "enum": [
              "personLoan"
            ],
            "readOnly": true,
            "type": "string"
          },
          "personId": {
            "$ref": "#/components/schemas/PersonId"
          }
        },
        "type": "object"
      },
      "AmountsValidation": {
        "description": "This object contains information on whether the total of `expectedPayments` match to various amounts of the loan.\n",
        "properties": {
          "amountFinancedMatch": {
            "description": "`true` if the sum of `amountFinanced + originationFeeAmount` equals to `principalAmount`.\nWe allow up to 1 cent difference in the match because of potential rounding issues. Only applicable if both\n`amountFinanced` and `principalAmount` are passed during origination; null otherwise.\n"
          },
          "feesMatch": {
            "description": "`true` if the sum of `expectedPayments` fees portion is equal to `originationFeeAmount` + `totalOtherFeesAmount`. Only applicable\nwhen `expectedPayments` was passed during origination; `null` otherwise.\n",
            "nullable": true,
            "type": "boolean"
          },
          "interestMatch": {
            "description": "`true` if the sum of `expectedPayments` interest portion is equal to `totalInterestAmount`. We allow up 1 cent different in\nthe match because of potential rounding issues. Only applicable when `expectedPayments` was passed during origination; `null`\notherwise.\n",
            "nullable": true,
            "type": "boolean"
          },
          "principalMatch": {
            "description": "`true` if the sum of `expectedPayments` principal portion is equal to `amountFinanced`. We allow up 1 cent different in\nthe match because of potential rounding issues. Only applicable when `expectedPayments` was passed during origination; `null`\notherwise.\n",
            "nullable": true,
            "type": "boolean"
          },
          "recurringAmountsMatch": {
            "description": "`true` if `atOrigination.periodicPaymentAmount` (aka recurring amount) equals the first expected payment's recurring amount.\nOtherwise, `false`. `null` if `atOrigination.periodicPaymentAmount` or expected payments schedule is not passed at origination.\n",
            "nullable": true,
            "type": "boolean"
          },
          "totalAdvancesMatch": {
            "description": "`true` if the sum of `advanceSchedule` amounts is equal to `amountFinanced`. Only applicable when `advanceSchedule` was passed during\norigination; `null` otherwise.\n",
            "nullable": true,
            "type": "boolean"
          }
        },
        "readOnly": true,
        "type": "object"
      },
      "ChargeDate": {
        "description": "**This attribute can be used only during the migration process of loans from another system to Peach. Any value passed for new loans\nthat are created and activated from day zero (`nonMigrated` loans) on the Peach system will be ignored.**\n\nThe effective date on which the fee was charged in the product timezone. In other words, this is when the fee was booked and written to the ledger.\nThe charge date of the fee is different from the due date of the fee. The due date of the fee is `expectedPayments.date`. The `chargeDate` must be\nbetween the first and last dates (inclusive) of the period represented by `expectedPayments.date` (aka the due date).\nIf the `chargeDate` is provided, you can also provide the `chargeTimeOfDay`.\nIf the `chargeDate` is not provided, the system will charge the fee on the first day of the period.\n",
        "format": "date",
        "type": "string"
      },
      "ExpectedPaymentsAtActivation": {
        "description": "Expected payments schedule for the loan at activation.\n",
        "items": {
          "description": "The payment schedule at activation",
          "properties": {
            "amount": {
              "description": "The total amount of the payment. The total amount is equal to: `principalAmount` + `interestAmount`\n",
              "format": "float",
              "type": "number"
            },
            "date": {
              "description": "Due date.",
              "format": "date",
              "type": "string"
            },
            "dynamicFeeDetails": {
              "description": "When `paymentType`=`dynamicFee` this will contain details of the dynamic fee.\n",
              "properties": {
                "chargeDate": {
                  "$ref": "#/components/schemas/ChargeDate"
                },
                "chargeTimeOfDay": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/TimeOfDay"
                    },
                    {
                      "description": "See description of the `chargeDate`. The value can be provided only if the `chargeDate` attribute is passed. If `chargeTimeOfDay` is not provided,\nthe Peach system will determine and set the time of day.\n",
                      "type": "object"
                    }
                  ]
                },
                "dynamicFeeTypeId": {
                  "description": "The dynamic fee type identifier in the system.",
                  "nullable": true,
                  "type": "string"
                }
              },
              "type": "object"
            },
            "interestAmount": {
              "description": "The portion of `amount` allocated to interest (before any promo date(s) or discount). Required when `paymentType`\nis `periodicPayment`\n",
              "format": "float",
              "type": "number"
            },
            "interestBeforeDiscountAmount": {
              "description": "The amount of interest discount.",
              "format": "float",
              "type": "number"
            },
            "isForcedAmount": {
              "default": false,
              "description": "Only applicable to `paymentType=periodicPayment`.\nIf set to `true`, the system will honor the amount and will not update it on loan recalculations.\nIf set to `false` and the amount is less than the `periodicPaymentAmount`, the system can increase the amount when\nthe loan is being recalculated.\nIn most of the cases, the lender should set the value to `false` (aka the default value.) If you need more\nexplanation or advice on your use case, please contact the Peach team.\n",
              "type": "boolean"
            },
            "paymentType": {
              "description": "The payment type.",
              "enum": [
                "periodicPayment",
                "originationFee",
                "drawFee",
                "dynamicFee",
                "downPayment",
                "discountCredit"
              ],
              "type": "string"
            },
            "principalAmount": {
              "description": "The portion of the `amount` allocated to principal. Required when `paymentType` is `periodicPayment`\n",
              "format": "float",
              "type": "number"
            },
            "unroundedInterestAmount": {
              "description": "The portion of the `amount` allocated to net interest. Available only for `paymentType=periodicPayment`.\nThis value is unrounded.\n",
              "nullable": true,
              "type": "string"
            },
            "unroundedInterestBeforeDiscountAmount": {
              "description": "The interest amount that was accrued before promo rate(s) or any discount. Available only for\n`paymentType=periodicPayment`. This value is unrounded.\n",
              "nullable": true,
              "type": "string"
            },
            "unroundedPrincipalAmount": {
              "description": "The portion of the `amount` allocated to principal. Available only for `paymentType=periodicPayment`.\nThis value is unrounded.\n",
              "nullable": true,
              "type": "string"
            }
          },
          "required": [
            "date",
            "paymentType",
            "amount"
          ],
          "type": "object"
        },
        "nullable": true,
        "type": "array"
      },
      "ExpectedPaymentsAtOrigination": {
        "description": "Expected payments schedule for the loan at origination. The dates and amounts\nare exactly what a borrower agreed to and signed.\n",
        "items": {
          "description": "The payment schedule at origination or draw",
          "properties": {
            "amount": {
              "description": "The total amount of the payment. The total amount is equal to: `principalAmount` + `interestAmount`\n",
              "format": "float",
              "type": "number"
            },
            "date": {
              "description": "Due date.",
              "format": "date",
              "type": "string"
            },
            "dynamicFeeDetails": {
              "description": "When `paymentType`=`dynamicFee` this will contain details of the dynamic fee.\n",
              "properties": {
                "chargeDate": {
                  "$ref": "#/components/schemas/ChargeDate"
                },
                "chargeTimeOfDay": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/TimeOfDay"
                    },
                    {
                      "description": "See description of the `chargeDate`. The value can be provided only if the `chargeDate` attribute is passed. If `chargeTimeOfDay` is not provided,\nthe Peach system will determine and set the time of day.\n",
                      "type": "object"
                    }
                  ]
                },
                "dynamicFeeTypeId": {
                  "description": "The dynamic fee type identifier in the system.",
                  "nullable": true,
                  "type": "string"
                }
              },
              "type": "object"
            },
            "interestAmount": {
              "description": "The portion of `amount` allocated to interest (before any promo date(s) or discount). Required when `paymentType`\nis `periodicPayment`\n",
              "format": "float",
              "type": "number"
            },
            "interestBeforeDiscountAmount": {
              "description": "The amount of interest discount.",
              "format": "float",
              "type": "number"
            },
            "isForcedAmount": {
              "default": false,
              "description": "Only applicable to `paymentType=periodicPayment`.\nIf set to `true`, the system will honor the amount and will not update it on loan recalculations.\nIf set to `false` and the amount is less than the `periodicPaymentAmount`, the system can increase the amount when\nthe loan is being recalculated.\nIn most of the cases, the lender should set the value to `false` (aka the default value.) If you need more\nexplanation or advice on your use case, please contact the Peach team.\n",
              "type": "boolean"
            },
            "paymentType": {
              "description": "The payment type.",
              "enum": [
                "periodicPayment",
                "originationFee",
                "drawFee",
                "dynamicFee",
                "downPayment",
                "discountCredit"
              ],
              "type": "string"
            },
            "principalAmount": {
              "description": "The portion of the `amount` allocated to principal. Required when `paymentType` is `periodicPayment`\n",
              "format": "float",
              "type": "number"
            },
            "unroundedInterestAmount": {
              "description": "The portion of the `amount` allocated to net interest. Available only for `paymentType=periodicPayment`.\nThis value is unrounded.\n",
              "nullable": true,
              "type": "string"
            },
            "unroundedInterestBeforeDiscountAmount": {
              "description": "The interest amount that was accrued before promo rate(s) or any discount. Available only for\n`paymentType=periodicPayment`. This value is unrounded.\n",
              "nullable": true,
              "type": "string"
            },
            "unroundedPrincipalAmount": {
              "description": "The portion of the `amount` allocated to principal. Available only for `paymentType=periodicPayment`.\nThis value is unrounded.\n",
              "nullable": true,
              "type": "string"
            }
          },
          "required": [
            "date",
            "paymentType",
            "amount"
          ],
          "type": "object"
        },
        "nullable": true,
        "type": "array"
      },
      "LoanInvestor": {
        "properties": {
          "investorId": {
            "description": "The Investor's unique identifier, internal or lender's external.",
            "type": "string"
          },
          "metro2": {
            "properties": {
              "reportK2Segment": {
                "default": false,
                "description": "Only applicable to loans that are reported to credit bureaus.\n\nIf `true`, the system will report the K2 segment in the Metro2 file\nto indicate that the loan has been sold to a new investor. Peach\nwill continue to report the loan.\n\nIf `false`, the system will not report the K2 segment in the Metro2\nfile. Peach will continue to report the loan.\n",
                "nullable": false,
                "type": "boolean"
              }
            },
            "type": "object"
          },
          "share": {
            "description": "The ownership percentage of the loan. The format is decimal. For example, 0.01 is 1% ownership and 0.15 is 15% ownership.\n",
            "format": "float",
            "type": "number"
          }
        },
        "required": [
          "investorId",
          "share"
        ],
        "title": "Loan Investor Association",
        "type": "object"
      },
      "LoanInvestorGet": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanInvestor"
          },
          {
            "properties": {
              "effectiveDate": {
                "description": "The date at which this ownership structure came into effect.",
                "format": "date",
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "LoanInvestorsGet": {
        "items": {
          "$ref": "#/components/schemas/LoanInvestorGet"
        },
        "type": "array"
      },
      "MerchantDiscountRateObj": {
        "description": "This object represents optional configurations for the MDR (Merchant Discount Rate). When POS (point of sale)\nlenders issue loans, the merchant pays some percentage of the financed amount - called the MDR.\n",
        "nullable": true,
        "properties": {
          "amortizationPeriod": {
            "description": "Number of calendar days. If a value is passed, the system will amortize the `mdrAmount` over the `amortizationPeriod`\nnumber of calendar days.\n\nIf a value is not passed or the value exceeds the loan life, the system will amortize the MDR amount over the life of\nthe loan. For Line of Credit, it is required to provide the `amortizationPeriod`. For Installment loans, it is\nrecommended to leave the value empty.\n",
            "nullable": true,
            "type": "number"
          },
          "isAmortized": {
            "default": true,
            "description": "`true` to amortize the `mdrAmount` using the straight-line amortization method over the life of the loan.\n`false` to recognize the `mdrAmount` as revenue in full on the day when the loan is activated.\n",
            "nullable": true,
            "type": "boolean"
          },
          "mdrAmount": {
            "description": "The Merchant Discount Amount.",
            "format": "float",
            "nullable": true,
            "type": "number"
          }
        },
        "type": "object"
      },
      "MerchantDiscountRateObjWithRate": {
        "allOf": [
          {
            "properties": {
              "mdrRate": {
                "description": "The Merchant Discount Rate (MDR). The format is decimal. For example, 0.03 is a 3% annual rate, 0.2 is a\n20% annual rate. If `mdrAmount` is not passed, the system will calculate the `mdrAmount` by multiplying\nthe `amountFinanced` by the `mdrRate`.\n",
                "format": "float",
                "nullable": true,
                "type": "number"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/MerchantDiscountRateObj"
          }
        ]
      },
      "LoanOriginationLicense": {
        "description": "The license that was used to originate the loan.",
        "enum": [
          "nationalBank",
          "stateLicense",
          "bankSubsidiary",
          "stateBank"
        ],
        "type": "string"
      },
      "RateCapMaxRate": {
        "description": "The maximum spread interest rate that can accrue. \n\nIf the calculated rate on a given day is greater than `maxRate`, then the system will\ncap the rate and accrue a maximum of `maxRate` on the loan. Else, we will use the calculated rate. \n\nFormat is decimal. For example, 0.36 is 36% annual rate cap.\n",
        "format": "float",
        "minimum": 0,
        "type": "number"
      },
      "RateCapReason": {
        "default": "other",
        "description": "The reason for `maxRate`. This is not used for any compliance logic, only for informational purposes. \n\n- `MLA` - Military Lending Act (36% cap for active duty military)\n- `SCRA` - Servicemembers Civil Relief Act\n- `federal` - Other federal regulations\n- `state` - State-specific regulations\n- `other` - Other regulatory or business reasons\n",
        "enum": [
          "MLA",
          "SCRA",
          "federal",
          "state",
          "other"
        ],
        "type": "string"
      },
      "RateCapAtOrigination": {
        "description": "A rate cap definition for loan origination. Uses days-based duration instead of specific dates.\nRate caps prevent calculated rates (spread + index) from exceeding regulatory limits.\nWhen multiple rate caps overlap, the system uses the lowest value.\n",
        "properties": {
          "days": {
            "description": "Number of calendar days the rate cap applies from loan origination. \nIf null, the rate cap applies for the entire loan term.\n\nFor example:\n\n```\n[{\"days\": 30, \"maxRate\": 0.1},\n{\"days\": 60, \"maxRate\": 0.2},\n{\"days\": null, \"maxRate\": 0.25}]\n```\n\nThe loan will accrue interest with a rate cap of 10% for the first 30 days. \nBetween days 31-90 the loan will accrue interest with a rate cap of 20%. \nFrom day 91 until the end, the loan will accrue interest with a rate cap of 25%.\n",
            "nullable": true,
            "type": "number"
          },
          "maxRate": {
            "$ref": "#/components/schemas/RateCapMaxRate"
          },
          "rateCapReason": {
            "$ref": "#/components/schemas/RateCapReason"
          }
        },
        "required": [
          "maxRate",
          "days",
          "rateCapReason"
        ],
        "title": "Rate Cap At Origination",
        "type": "object"
      },
      "RateCapsAtOriginationLoan": {
        "description": "Rate caps that should apply to the loan at origination. \n\nWhen the loan is created these rate caps are created and \napplied to the loan. They will be accessible via the `.../rate-caps` endpoint.\n",
        "items": {
          "$ref": "#/components/schemas/RateCapAtOrigination"
        },
        "nullable": true,
        "title": "Rate Caps At Origination",
        "type": "array"
      },
      "InstallmentAtOrigination": {
        "description": "This object contains loan details and terms as they were shown to a borrower at origination.",
        "properties": {
          "advanceSchedule": {
            "$ref": "#/components/schemas/AdvanceSchedule"
          },
          "amortizationMethod": {
            "description": "Loan amortization method.\n\n`equalPayments` - the system will amortize the loan or draw making recurring payments equal (except maybe for the last payment).\nMost installment loans are expected to use this method.\n\n`interestPaymentsBalloonPrincipal` - the system will amortize the loan or draw making recurring payments equal to interest only\nand the last payment will include the entire principal. Keep in mind that if you set `interest.periodAccrualDurationType=actual`,\nthe recurring payment amounts will be different every period for monthly and twice monthly frequencies. This is because a month\ncan have 28, 29, 30 or 31 days and interest accrued will vary based on the number of days in the month.\n\nThere are additional limitations to be aware for `interestPaymentsBalloonPrincipal`. For installment loans, Autopay can only be\naligned to due dates. It means that `autoPay.allowedFrequency.isDueDatesAvailable` must be set to `false`. This way the system\nwill only allow Autopay to be aligned to the loan frequency and due dates.\n",
            "enum": [
              "equalPayments",
              "interestPaymentsBalloonPrincipal",
              "custom"
            ],
            "readOnly": true,
            "type": "string"
          },
          "amountFinanced": {
            "description": "The amount financed. The amount of money a borrower received from the lender, minus the upfront fees (e.g. origination fee) the lender is charging the borrower.\n",
            "format": "float",
            "type": "number"
          },
          "aprEffective": {
            "description": "The effective APR of the loan at origination. Pass both `aprNominal` and `aprEffective` even if they are equal.\n",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "aprNominal": {
            "description": "The nominal APR of the loan at origination. Pass both `aprNominal` and `aprEffective` even if they are equal.\n",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "bufferToPushOutSchedule": {
            "$ref": "#/components/schemas/BufferToPushOutSchedule"
          },
          "discountProgramIds": {
            "description": "The identifiers of the discount programs provided at origination. A discount program\nhas to be created before it can be applied to loans.\n",
            "items": {
              "type": "integer"
            },
            "nullable": true,
            "type": "array"
          },
          "downPaymentAmount": {
            "description": "The amount of down payment made when the loan was originated. The value should be equal to what a\nborrower agreed to and signed at origination.\n",
            "format": "float",
            "type": "number"
          },
          "duration": {
            "description": "The duration of the loan as a number of `paymentFrequency` periods.\nFor example:\n- if `paymentFrequency=monthly` and `duration=6`, it is a loan with 6 months duration and will have 6 due dates.\n- if `paymentFrequency=weekly` and `duration=24`, it is a loan with 24 weeks duration and will have 24 due dates.\n",
            "type": "number"
          },
          "enforcedEndDate": {
            "description": "The enforced end date of the loan in the product timezone. If the `enforcedEndDate` is not provided, it will be set at `activation`.\nIf `enforcedEndDate` and `expectedPayments` are provided, the last\npayment due date MUST match `enforcedEndDate`.\n",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "expectedPayments": {
            "$ref": "#/components/schemas/ExpectedPaymentsAtOrigination"
          },
          "fees": {
            "description": "The loan fees.",
            "properties": {
              "dynamicFees": {
                "$ref": "#/components/schemas/AtOriginationDynamicFees"
              },
              "originationFeeAmount": {
                "description": "The amount of the origination fee.",
                "format": "float",
                "nullable": true,
                "type": "number"
              },
              "serviceFeeAmount": {
                "description": "**DEPRECATED ATTRIBUTE** Use `dynamicFees.feeAmount`.\n\nThe service fee amount that will be charged recurrently. Only required if the service fee `amountLogic` is configured as\n`type=passedAtOrigination`. In all other cases, the system will calculate the fee based on pre-configured logic.\n",
                "format": "float",
                "type": "number"
              },
              "serviceFeeCapAmount": {
                "description": "**DEPRECATED ATTRIBUTE** Use `dynamicFees.feeCapAmount`.\n\nThe maximum amount of the service fee that can be charged over the life of the loan or draw. Only required if the service fee\n`capLogic` is configured as `type=capPassedAtOrigination`. In all other cases, the system will calculate the fee based on pre-configured\nlogic.\n",
                "format": "float",
                "type": "number"
              },
              "totalOtherFeesAmount": {
                "description": "The total amount of non-origination fees that are expected to be charged on the loan. The value should be\nequal to what a borrower agreed to and signed at origination.\n",
                "format": "float",
                "nullable": true,
                "type": "number"
              }
            },
            "type": "object"
          },
          "interestRates": {
            "$ref": "#/components/schemas/LoanInterestRatesAtOrigination"
          },
          "investors": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LoanInvestorsGet"
              }
            ],
            "description": "A list of the investors who owned the loan at origination.\nIf none are provided, it defaults to the default investor configured for the lender.\n"
          },
          "isValidMerchantId": {
            "description": "`true` - if the merchant ID exists in Peach Merchants table.\n\n`false` - if the merchant ID doesn't exist in Peach Merchants table.\nCredit card lenders normally should not create merchants details in Peach and `isMerchantIdValid` attribute can be ignored.\nPoint of sale lenders normally have merchants details in Peach and can use `isMerchantIdValid` attribute as needed.\n",
            "readOnly": true,
            "type": "boolean"
          },
          "itemsOrServicesFinanced": {
            "description": "Merchandise, services or other value provided in exchange for the debt. For example: refrigerator\nor kitchen renovation. This description is used in communications with the borrower, when needed.\n",
            "nullable": true,
            "type": "string"
          },
          "mdr": {
            "$ref": "#/components/schemas/MerchantDiscountRateObjWithRate"
          },
          "merchantId": {
            "description": "A lender's identifier for the merchant.\n",
            "nullable": true,
            "type": "string"
          },
          "originatingCreditorName": {
            "description": "The name of an entity that originated the loan. For example: Bank of Mars. This name will be\nused in communications with the borrower when needed.\n",
            "type": "string"
          },
          "originationLicense": {
            "$ref": "#/components/schemas/LoanOriginationLicense"
          },
          "paymentFrequency": {
            "description": "The payment frequency of the loan.\n\n`weekly`, `everyTwoWeeks`, `twiceMonthly`, `monthly` - are recurring.\n\n`singleTerm` - a single term loan (aka non-recurring). It will create one period only with a desired \"duration\" of 30,\n60, 90, 120, X calendar days or a specific date that should be passed in specificDays. For example [90].\n",
            "enum": [
              "weekly",
              "everyTwoWeeks",
              "twiceMonthly",
              "monthly",
              "singleTerm"
            ],
            "type": "string"
          },
          "periodicPaymentAmount": {
            "description": "The amortized periodic payment amount excluding fees. Keep in mind that the last payment\ncan be different from the `periodicPaymentAmount`. Required when passing in `expectedPayments`\nat origination.\n",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "personAddress": {
            "$ref": "#/components/schemas/Address"
          },
          "personAddressId": {
            "description": "This is the existing identifier of a borrower's address contact information (Peach's\nunique or lender's external identifier). If passed during origination, the address will be stored\non the loan object as a reference. Alternatively, the address can be directly provided\nin `personAddress`, in which case, `personAddressId` should not be sent.\n",
            "pattern": "^ext-|^[A-Z]{2}-[A-Z0-9]+-[A-Z0-9]+|^\\d+$",
            "type": "string",
            "writeOnly": true
          },
          "principalAmount": {
            "description": "The amount of principal at origination. Lenders should only pass this value if `principalAmount` is different from `amountFinanced`.\nIf a value is provided, the system will use `principalAmount` as the loan principal for interest calculations and amortization. The value should be greater than `amountFinanced`.\nIf a value is not provided, the system will:\n- Set `principalAmount = amountFinanced`.\n- Use `amountFinanced` as the loan principal for interest calculations and amortization.\n",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "promoRates": {
            "$ref": "#/components/schemas/LoanPromoRatesAtOrigination",
            "nullable": true
          },
          "rateCaps": {
            "$ref": "#/components/schemas/RateCapsAtOriginationLoan"
          },
          "skipCreditReporting": {
            "default": false,
            "description": "Set to `true` if the loan should not be reported to the credit agencies when activated.\n",
            "type": "boolean"
          },
          "specificDays": {
            "$ref": "#/components/schemas/SpecificDays"
          },
          "totalDiscountAmount": {
            "description": "The total amount of discount at origination as a result of promo rates. The value should be equal to what\na borrower agreed to and signed at origination.\n",
            "format": "float",
            "type": "number"
          },
          "totalInterestAmount": {
            "description": "The total amount of interest the loan should accrue. The value should be equal to what a borrower agreed\nto and signed at origination. Because of rounding issues, the total of expected payments `interestAmount`\nmight be different from `totalInterestAmount`.\n",
            "format": "float",
            "type": "number"
          },
          "totalInterestCapAmount": {
            "description": "The maximum amount of interest the borrower will ever pay.\nIf not applicable, set to `null`.\n",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "validAddress": {
            "default": false,
            "description": "Identifies the address at origination as valid or invalid.",
            "readOnly": true,
            "type": "boolean"
          }
        },
        "title": "Installment",
        "type": "object"
      },
      "PromoEndDate": {
        "description": "The promotional program end-date without a potential grace\nperiod.\nIf `promoEndDate` is passed, the system will calculate the\n`promoDurationDays`.\nPass only one of the attributes, `promoEndDate` or\n`promoDurationDays`.\n\nThis date field should be in the product timezone.\n",
        "format": "date",
        "type": "string"
      },
      "PromoGracePeriodDays": {
        "description": "The promotional program grace period as a number of calendar days.\nGrace period allows the borrower to exercise the promotional program\nfor an additional number of days after it expires.\n\nIf you don't pass a value, the system will assume zero (aka no grace\nperiod).\n",
        "type": "integer"
      },
      "PromoStartDate": {
        "description": "The `promoStartDate` date marks the start date from which a\npromotional program is valid and will be evaluated to be exercised.\nWhen a promo program is created with `promoDurationDays` specified,\nthe `promoStartDate` is also used to calculate the `promoEndDate`. \n\nFor installment loans:\n\n- The `promoStartDate` can be a date in the future but not after the\n  loan's last due date.\n  The promotion is valid and evaluated after it has been activated\n  and the `promoStartDate` arrived.\n- The `promoStartDate` can be a date in the past but not before the\n  loan's activation date.\n- The `promoStartDate` is optional.\n  If the value is not passed, the system will set the promoStartDate\n  to the loan activation date.\n- For `Same as Cash` promo programs, the waiving of interest benefit\n  will be added from the loan activation date for the entire life of\n  the loan for installment loans, regardless of the\n  `promoStartDate`.\n\nFor Line of Credit draws:\n\n- The `promoStartDate` can be a date in the future.\n  The promotion is valid and evaluated after it has been activated\n  and the `promoStartDate` arrived.\n- The `promoStartDate` cannot be a date in the past.\n\nIf a value is not passed, the system will set the `promoStartDate`\nto be the date of the activation.\n\nThis date value should be in the product timezone.\n",
        "format": "date",
        "type": "string"
      },
      "PromoProgramFields": {
        "properties": {
          "disqualifyOverdueDays": {
            "description": "The number of loan overdue days that would disqualify the\npromotional program.\nAny occurrence of `disqualifyOverdueDays` or more of number\ndays overdue during the promotional period would disqualify\n(aka cancel) the promotional program.\n",
            "type": "integer"
          },
          "externalId": {
            "description": "A lender's unique identifier for a specific promotional\nprogram.\n",
            "type": "string"
          },
          "metaData": {
            "description": "Store any type of key/value pairs in the form of a JSON\ndictionary.\n",
            "nullable": true,
            "type": "object"
          },
          "promoDurationDays": {
            "description": "The promotional program duration as a number of calendar\ndays.\nIf `promoDurationDays` is passed, the system will calculate\nthe `promoEndDate`.\nPass only one of the attributes, `promoEndDate` or\n`promoDurationDays`.\n",
            "type": "integer"
          },
          "promoEndDate": {
            "$ref": "#/components/schemas/PromoEndDate"
          },
          "promoGracePeriodDays": {
            "$ref": "#/components/schemas/PromoGracePeriodDays"
          },
          "promoStartDate": {
            "$ref": "#/components/schemas/PromoStartDate"
          },
          "promoTypeId": {
            "description": "The promotional program type's unique identifier.",
            "type": "string"
          },
          "status": {
            "description": "The promotional program status.\n\n  `pending` - the promotion was created but was not activated yet.\n\n  `active` - the promotion is active.\n\nFor promo program creation, `installment` loans can be\ncreated in either `pending` or `active` status. \n\nFor line of credit / draws, a promo program can only be\ncreated in `pending` status and transitioned to `active`\nstatus via the promo program activate endpoint.\n",
            "enum": [
              "pending",
              "active"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "PromoProgramCreate": {
        "allOf": [
          {
            "required": [
              "promoTypeId",
              "status"
            ]
          },
          {
            "$ref": "#/components/schemas/PromoProgramFields"
          },
          {
            "properties": {
              "id": {
                "description": "The promotional program's unique identifier.",
                "readOnly": true,
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "description": "Create a promo program"
      },
      "PromoProgramAtOrigination": {
        "properties": {
          "promoPrograms": {
            "description": "The list of promotional programs that the loan is eligible for.",
            "items": {
              "$ref": "#/components/schemas/PromoProgramCreate"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "InterestRateValidation": {
        "properties": {
          "interestRateAtOrigBelowMin": {
            "description": "`true` if the interest rate at origination is below the minimum interest rate.\n",
            "type": "boolean"
          },
          "interestRateAtOrigExceedsMax": {
            "description": "`true` if the interest rate at origination exceeds the maximum interest rate.\n",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "AprValidation": {
        "properties": {
          "aprEffectiveAtActExceedsMax": {
            "description": "`true` if the effective APR at activation exceeds the maximum APR.\n",
            "type": "boolean"
          },
          "aprEffectiveAtOrigExceedsMax": {
            "description": "`true` if the effective APR at origination exceeds the maximum APR.\n",
            "type": "boolean"
          },
          "aprNominalAtActExceedsMax": {
            "description": "`true` if the nominal APR at activation exceeds the maximum APR.\n",
            "type": "boolean"
          },
          "aprNominalAtOrigExceedsMax": {
            "description": "`true` if the nominal APR at origination exceeds the maximum APR.\n",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "RatesValidation": {
        "allOf": [
          {
            "$ref": "#/components/schemas/InterestRateValidation"
          },
          {
            "$ref": "#/components/schemas/AprValidation"
          }
        ],
        "description": "This object contains information on whether actual rates exceed the rate ranges defined on the loan type.",
        "readOnly": true
      },
      "LoanServicer": {
        "description": "The entity type that services the loan.\n\n`creditor`, `thirdPartyServicer` - means that the loan is serviced on the Peach platform.\n\n`debtCollectionAgency` - means that the loan is no longer serviced on the Peach platform. The loan can be still visible in Borrower Portal. To clarify, the loan is not deleted from the Peach platform.\n",
        "enum": [
          "creditor",
          "thirdPartyServicer",
          "debtCollectionAgency"
        ],
        "type": "string"
      },
      "LoanStatus": {
        "description": "The current status of the loan. New loans must be created in `pending`, `originated` or `declined` status.\n\n`pending` - the loan is in the application stage. Loan `atOrigination` details and terms can be changed (via API).\n\n`originated` - the loan was signed by the borrower and originated by the lender. Loan `atOrigination` details cannot be changed. Originated loans do not start accruing interest until activated.\n\n`declined` - an application was declined. This is a terminal state.\n\n`active` - the loan is active. Most loans are expected to be active.\n\n`frozen` - the loan is temporarily frozen. The loan will not accrue any interest, no payments can be processed, and no notifications are sent to the borrower.\n\n`accelerated` - the loan was accelerated. The loan will not accrue any additional interest and the entire balance is due.\n\n`chargedOff` - the loan was charged off.\n\n`paidOff` - the loan was successfully paid off.\n\n`canceled` - the loan was canceled. Canceled loans are not shown in UI. This is a terminal state.\n",
        "enum": [
          "pending",
          "originated",
          "declined",
          "active",
          "frozen",
          "accelerated",
          "chargedOff",
          "paidOff",
          "canceled"
        ],
        "type": "string"
      },
      "Installment": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixinWithoutTimestamps"
          },
          {
            "properties": {
              "loanTypeId": {
                "description": "The loan type identifier. This is created specifically for each lender's loan product by Peach.\n",
                "type": "string"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/BaseLoanMixin"
          },
          {
            "$ref": "#/components/schemas/SharedInstallmentAndLoc"
          },
          {
            "properties": {
              "additionalPeople": {
                "description": "For loans with multiple people attached, use this field to add additional people.\nYou do not need to include the main borrower, who will be created from the url parameter.\n",
                "items": {
                  "$ref": "#/components/schemas/PersonLoan"
                },
                "type": "array",
                "writeOnly": true
              },
              "amountsValidation": {
                "$ref": "#/components/schemas/AmountsValidation"
              },
              "aprEffectiveAtActivation": {
                "description": "The APR that was calculated by Peach at loan activation. The format is decimal. For\nexample, 0.01 is 1%, 0.2 is 20%. If the origination and activation dates are the same,\nthe `aprEffective` is equal to the `aprEffectiveAtActivation`.\nIf the origination and activation dates are different, the\n`aprEffective` might be different from the `aprEffectiveAtActivation`. `aprEffective` is\n`null` if it could not be computed.\n",
                "format": "float",
                "nullable": true,
                "readOnly": true,
                "type": "number"
              },
              "aprNominalAtActivation": {
                "description": "The APR that was calculated by Peach at loan activation. The format is decimal. For\nexample, 0.01 is 1%, 0.2 is 20%. If the origination and activation dates are the same,\nthe `aprNominal` is equal to the `aprNominalAtActivation`.\nIf the origination and activation dates are different, the\n`aprNominal` might be different from the `aprNominalAtActivation`.`aprEffective` is\n`null` if it could not be computed.\n",
                "format": "float",
                "nullable": true,
                "readOnly": true,
                "type": "number"
              },
              "atActivation": {
                "description": "This object contains loan details and terms at the time of loan activation.",
                "properties": {
                  "expectedPayments": {
                    "$ref": "#/components/schemas/ExpectedPaymentsAtActivation"
                  }
                },
                "readOnly": true,
                "title": "Installment",
                "type": "object"
              },
              "atOrigination": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/InstallmentAtOrigination"
                  },
                  {
                    "$ref": "#/components/schemas/PromoProgramAtOrigination"
                  }
                ]
              },
              "current": {
                "allOf": [
                  {
                    "properties": {
                      "autopayEnabled": {
                        "description": "Whether Autopay is enabled for this loan.\n",
                        "type": "boolean"
                      },
                      "duration": {
                        "$ref": "#/components/schemas/LoanDuration"
                      },
                      "paymentFrequency": {
                        "$ref": "#/components/schemas/InstallmentPaymentFrequency"
                      },
                      "periodicPayment": {
                        "description": "The most recent amortized periodic payment that was calculated on `lastAmortizedAt`.\n",
                        "format": "float",
                        "type": "number"
                      },
                      "specificDays": {
                        "$ref": "#/components/schemas/SpecificDays"
                      }
                    },
                    "type": "object"
                  }
                ],
                "description": "This object contains some loan details that were modified after origination.",
                "readOnly": true
              },
              "isClosed": {
                "description": "Indicates whether the loan with multiple advances is closed. If `true` and the loan type installment with multiple advances, new Advances\ncannot be created, and the advance schedule cannot be updated.\n",
                "type": "boolean"
              },
              "muteLoanNotices": {
                "description": "Indicates whether the system should stop/pause sending loan related notices to the borrower. Set to true if you want to mute all loan related notices (e.g. loanDetails. autopayEnabled, paymentFailed, etc.) Keep in mind that it will also stop all notices related to the loan that are sent from Peach Agent Portal by an agent.\nNote: this is not the only attribute that can stop notices from being sent. Compliance Guard and Cases Do Not Interact can also block communications.\n",
                "type": "boolean"
              },
              "nickname": {
                "description": "The loan's nickname. Nickname is a friendly name of the loan and is displayed in the UI.\nNickname is different from loan ID. Nickname can be changed by a borrower.\n",
                "nullable": true,
                "type": "string"
              },
              "object": {
                "enum": [
                  "installment"
                ],
                "readOnly": true,
                "type": "string"
              },
              "ratesValidation": {
                "$ref": "#/components/schemas/RatesValidation"
              },
              "servicedBy": {
                "$ref": "#/components/schemas/LoanServicer"
              },
              "status": {
                "$ref": "#/components/schemas/LoanStatus"
              },
              "type": {
                "enum": [
                  "installment"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "Installment"
      },
      "LOCMinPaymentCalculation": {
        "description": "The logic to calculate the minimum payment amount when a statement is created. All interest accrued in the period and fees are always part\nof the minimum payment amount plus a `percentageOfPrincipal` for each draw.\n\nIf `includeOverLimitAmount` is set to true at the draw level, the minimum payment amount will include the over limit amount at the time of\nstatement generation as part of the required minimum payment for each draw. The overlimit amount will be distributed/allocated according to\nthe `paymentWaterfall.multi.loansOrder` configuration at the loanType level (e.g. `highestInterestRate`).\n\nStatement logic adds up all draws calculated minimum payment amounts (including overlimit amounts, if applicable) and adds all unpaid fees\nto set the total statement minimum amount. If the `loanType.statement` object is configured such that `includeOverdueAmountInMinPayment=true`,\nthe statement minimum payment amount will include the overdue amount as part of the required minimum payment displayed on the statement.\n",
        "properties": {
          "minAmount": {
            "description": "The minimum periodic amount. For example: $35.00. The minimum will be only enforced if draws on the line of credit do not have an amortized amount.\n\nExample:\nAssume `minAmount` on the loan-level is set to $35.00.\nDraw 1 outstanding principal is $100.00.\nDraw 1 percentageOfPrincipal=0.01 (aka 1%).\nDraw 1 interest rate is 2% per month.\nDraw 1 interest amount per month is: $100.00 * 2% = $2.00.\nDraw 1 minimum amount is: $2 + $100.00 * 1% = $3.00.\n\nDraw 2 outstanding principal is $200.00.\nDraw 2 percentageOfPrincipal=0.02 (aka 2%).\nDraw 2 interest rate is 3% per month.\nDraw 2 interest amount per month is: $200.00 * 3% = $6.00.\nDraw 2 minimum amount is: $6 + $200.00 * 1% = $8.00.\n\nLoan level fees: Fee 1 is $5.00, Fee 2 is $7.50. Both are unpaid.\n\nLoan-level minimum payment calculation is max($35.00, [$3.00 (draw 1 minimum) + $8.00 (draw 2 minimum) + $5.00 (fee 1) + $7.50 (fee 2)]) = max($35, $23.50) = $35\nThe minimum payment will be set to $35.00 and not $23.50. The split between principal, interest, and fees will be fees=$12.50, interest=$8.00 and principal=$14.50.\nPrincipal will be allocated first according to the `percentageOfPrincipal` on each draw (e.g., $1 for draw 1 and $2 for draw 2 in the example above). The remaining\nprincipal amount ($11.50 in the example) will be allocated to draws based on the `loansOrder` as part of the `multi` waterfall configuration at the loanType level.\nIn the example above, assuming draw 1 is ordered before draw 2, the $11.50 will be allocated to draw 1. Draw 1 minimum amount will increase to ($3.00 + $11.50) = $14.50.\n",
            "format": "float",
            "type": "number"
          }
        },
        "type": "object"
      },
      "LineOfCreditAtOrigination": {
        "description": "This object contains loan details and terms as they were shown to a borrower at origination.",
        "properties": {
          "aprEffective": {
            "description": "**DEPRECATED ATTRIBUTE**\n\nThe effective APR of the loan at origination. Pass both `aprNominal` and `aprEffective` even if they are equal.\n\nThis field is deprecated for Line of Credit and Draw. You can still pass the value, and it will be stored on the object.\nHowever, it will not be used/displayed anywhere. The system will use the interest rate values of Line of Credit and Draws\nand show them as the APR (for example, on the statement.)\n",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "aprNominal": {
            "description": "**DEPRECATED ATTRIBUTE**\n\nThe nominal APR of the loan at origination. Pass both `aprNominal` and `aprEffective` even if they are equal.\n\nThis field is deprecated for Line of Credit and Draw. You can still pass the value, and it will be stored on the object.\nHowever, it will not be used/displayed anywhere. The system will use the interest rate values of Line of Credit and Draws\nand show them as the APR (for example, on the statement.)\n",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "aprVariableRange": {
            "description": "The APR range if the loan has variable APR/interest rate. If the loan has a fixed APR/interest rate, keep this attribute empty.\n\nThis attribute is only used to be displayed on emails, Borrower Portal, statements and other UI elements. If `aprVariableRange` is\npassed, the statement will show `(v) = Variable Rate` next to the APR values. The range should not change after the loan was originated.\nThe interest rate (also called the current effective APR) can change using Loans Management Rates endpoints. Keep in mind that this range\nis applicable to all Draws. Draw object doesn't have its own aprVariableRange attribute.\n\nThe format is decimal up to 4 decimal places. First value is minimum rate (inclusive). Second value is maximum rate (inclusive).\n\nFor example:\n  - [0.1999, 0.2999] - is 19.99% - 29.99% APR.\n  - [0.01, 0.03] - is 1.00% - 3.00% APR.\n",
            "example": [
              0.1999,
              0.2999
            ],
            "items": {
              "format": "float",
              "type": "number"
            },
            "maxItems": 2,
            "minItems": 2,
            "nullable": true,
            "type": "array"
          },
          "bufferToPushOutSchedule": {
            "$ref": "#/components/schemas/BufferToPushOutSchedule"
          },
          "creditLimitAmount": {
            "description": "The credit limit amount.",
            "format": "float",
            "type": "number"
          },
          "discountProgramIds": {
            "items": {
              "description": "The identifiers of the discount programs provided at origination. A discount program\nhas to be created before it can be applied to loans.\n",
              "type": "integer"
            },
            "nullable": true,
            "type": "array"
          },
          "downPaymentAmount": {
            "description": "The amount of down payment made when the loan was originated.",
            "format": "float",
            "type": "number"
          },
          "fees": {
            "description": "The loan fees.",
            "properties": {
              "dynamicFees": {
                "$ref": "#/components/schemas/AtOriginationDynamicFees"
              },
              "originationFeeAmount": {
                "description": "The amount of the origination fee.",
                "format": "float",
                "nullable": true,
                "type": "number"
              },
              "serviceFeeAmount": {
                "description": "**DEPRECATED ATTRIBUTE** Use `dynamicFees.feeAmount`.\n\nThe service fee amount that will be charged recurrently. Only required if the service fee `amountLogic` is configured as\n`type=passedAtOrigination`. In all other cases, the system will calculate the fee based on pre-configured logic.\n",
                "format": "float",
                "type": "number"
              },
              "serviceFeeCapAmount": {
                "description": "**DEPRECATED ATTRIBUTE** Use `dynamicFees.feeCapAmount`.\n\nThe maximum amount of the service fee that can be charged over the life of the loan or draw. Only required if the service fee\n`capLogic` is configured as `type=capPassedAtOrigination`. In all other cases, the system will calculate the fee based on pre-configured\nlogic.\n",
                "format": "float",
                "type": "number"
              }
            },
            "type": "object"
          },
          "gracePeriod": {
            "description": "The logic to handle grace period benefit. The grace period benefit allows the borrower to not accrue any interest on line/draws\nas long as they pay the required balance every period.\n\nThe grace period benefit can work in two ways in Peach:\n1. Line level - in this case, the loan/line and all draws must meet the grace period repayment requirement. If one of the draws\ndidn't meet the repayment requirement (in other words the entire line didn't meet the repayment requirement), all applicable/enrolled\ndraws would lose the grace period benefit and accrue interest.\n2. Draw level - in this case each applicable/enrolled draw needs to meet its own grace period repayment requirements. If one of the\napplicable/enrolled draws didn't meet the repayment requirements, other draws might still be eligible for the grace period benefit\n(as long as they meet their own requirements).\n\nLine level configuration:\n- You need to pass the `gracePeriod` object with `isGracePeriodApplicable=true` and other attributes when you create the line/loan.\n- You need to pass a draw-level `gracePeriod` object. Please read more details about the `gracePeriod` object in the `Create draw`\nendpoint. If the loan/line `isGracePeriodApplicable=true`, all draws of the line participate in the evaluation of the loan/line grace\nperiod benefit eligibility. But not all draws have to receive the grace period benefit - you can decide what draws should accrue interest\neven if the line is eligible for the benefit.  For example, amortized draws can participate in the grace period benefit eligibility, but\nare not designed to be eligible for grace period benefit (in other words, amortized draws are expected to accrue interest if an interest\nrate greater than zero was set on the draw).\n\nDraw level configuration:\n- Don't pass the `gracePeriod` object or set `isGracePeriodApplicable=false` when you create the line/loan.\n- You can enroll applicable draws in the grace period benefit by passing draw-level `gracePeriod` object. Please read more details about\nthe `gracePeriod` object in the `Create draw` endpoint.\n\nImportant: the grace period attributes cannot be changed after the line is activated.\n",
            "properties": {
              "isGracePeriodApplicable": {
                "default": false,
                "description": "The type of the grace period benefit.\n\n`true` -  the grace period benefit is on the loan/line level.\n- The loan/line and all draws must meet the grace period repayment requirement. If one of the draws didn't meet the repayment requirement\n(in other words the entire line didn't meet the repayment requirement), all draws eligible for the grace period benefit would lose the\ngrace period benefit and accrue interest.\n- You need to pass details of how draws are evaluated in the grace period benefit - read more details about the `gracePeriod` object in\nthe `Create draw` endpoint.\n\n`false` - the grace period benefit can be set on a draw level.\n- Each applicable draw needs to meet its own grace period repayment requirements. If one of the applicable draws didn't meet the repayment\nrequirements, other draws might still be eligible for the grace period benefit (as long as they meet their own requirements).\n- You can enroll individual draws in the grace period benefit - read more details about the `gracePeriod` object in the `Create draw`\nendpoint. If the grace period benefit is not applicable to your program, don't enroll in any draws.\n",
                "type": "boolean"
              },
              "numPeriodsToRestoreGrace": {
                "default": 1,
                "description": "Number of periods to wait after the grace period benefit was revoked before the line/loan can become eligible again.\nTo take advantage of the grace period, the borrower must pay their account balance according to the grace period benefit requirements on time for the number of billing periods provided.\n\nIf this attribute is passed, it will be used to set the draw-level `numPeriodsToRestoreGrace` for any draw that is enrolled in the grace period benefit (aka `isGracePeriodApplicable=true`).\nThis will ensure that the line and all draws have the same `numPeriodsToRestoreGrace` values.\n\nThis attribute is required to be passed if `isGracePeriodApplicable=true` and must be greater than zero.\nThis attribute is not required and won't be used if the `gracePeriod` object is not passed or `isGracePeriodApplicable=false`.\n",
                "minimum": 1,
                "type": "integer"
              }
            },
            "type": "object"
          },
          "interestRates": {
            "$ref": "#/components/schemas/LoanInterestRatesAtOrigination"
          },
          "investors": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LoanInvestorsGet"
              }
            ],
            "description": "A list of the investors who owned the loan at origination.\nIf none are provided, it defaults to the default investor configured for the lender.\n"
          },
          "isValidMerchantId": {
            "description": "`true` - if the merchant ID exists in Peach Merchants table.\n\n`false` - if the merchant ID doesn't exist in Peach Merchants table.\nCredit card lenders normally should not create merchants details in Peach and `isMerchantIdValid` attribute can be ignored.\nPoint of sale lenders normally have merchants details in Peach and can use `isMerchantIdValid` attribute as needed.\n",
            "readOnly": true,
            "type": "boolean"
          },
          "itemsOrServicesFinanced": {
            "description": "Merchandise, services or other value provided in exchange for the debt. For example: refrigerator\nor kitchen renovation. This description is used in communications with the borrower, when needed.\n",
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "description": "A lender's identifier for the merchant.\n",
            "nullable": true,
            "type": "string"
          },
          "minPaymentCalculation": {
            "$ref": "#/components/schemas/LOCMinPaymentCalculation"
          },
          "originatingCreditorName": {
            "description": "The name of an entity that originated the loan. For example: Bank of Mars. This name will be\nused in communications with the borrower when needed.\n",
            "type": "string"
          },
          "originationLicense": {
            "$ref": "#/components/schemas/LoanOriginationLicense"
          },
          "paymentFrequency": {
            "enum": [
              "weekly",
              "everyTwoWeeks",
              "twiceMonthly",
              "monthly"
            ],
            "type": "string"
          },
          "personAddress": {
            "$ref": "#/components/schemas/Address"
          },
          "personAddressId": {
            "description": "This is the existing identifier of a borrower's address contact information (Peach's\nunique or lender's external identifier). If passed during origination, the address will be stored\non the loan object as a reference. Alternatively, the address can be directly provided\nin `personAddress`, in which case, `personAddressId` should not be sent.\n",
            "pattern": "^ext-|^[A-Z]{2}-[A-Z0-9]+-[A-Z0-9]+|^\\d+$",
            "type": "string",
            "writeOnly": true
          },
          "promoRates": {
            "$ref": "#/components/schemas/LoanPromoRatesAtOrigination",
            "nullable": true
          },
          "rateCaps": {
            "$ref": "#/components/schemas/RateCapsAtOriginationLoan"
          },
          "skipCreditReporting": {
            "default": false,
            "description": "Set to `true` if the loan should not be reported to the credit agencies when activated.\n",
            "type": "boolean"
          },
          "specificDays": {
            "$ref": "#/components/schemas/SpecificDays"
          },
          "validAddress": {
            "default": false,
            "description": "Identifies the address at origination as valid or invalid.",
            "readOnly": true,
            "type": "boolean"
          }
        },
        "title": "Line of Credit",
        "type": "object"
      },
      "PaymentHoldDays": {
        "description": "Determines how long the lender wants to wait until a payment affects the openToBuy amount in the\nGet balances endpoint.\n",
        "nullable": true,
        "properties": {
          "holdDayType": {
            "description": "Determines what type of day should be used to calculate the `holdDaysEndDate` on the transaction.\n",
            "enum": [
              "calendar",
              "business"
            ],
            "type": "string"
          },
          "numHoldDays": {
            "description": "The number of days Peach's system will wait until the loan's balance reflects the amount of payment.\n\nFor example, if `holdDayType=calendar` and a borrower makes a one time payment on October 10th (and\nthe payment status is `initiated` or `pending`):\n\n`numHoldDays = 0`, the payment will increase the `openToBuyAmount` on the 10th.\n\n`numHoldDays = 1`, the payment will increase the `openToBuyAmount` on the 11th.\n\n`numHoldDays = 2`, the payment will increase the `openToBuyAmount` on the 12th.\n",
            "type": "integer"
          }
        },
        "required": [
          "holdDayType",
          "numHoldDays"
        ],
        "type": "object"
      },
      "LineOfCredit": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixinWithoutTimestamps"
          },
          {
            "properties": {
              "loanTypeId": {
                "description": "The loan type identifier. This is created specifically for each lender's loan product by Peach.\n",
                "type": "string"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/BaseLoanMixin"
          },
          {
            "$ref": "#/components/schemas/SharedInstallmentAndLoc"
          },
          {
            "properties": {
              "additionalPeople": {
                "description": "**DEPRECATED ATTRIBUTE** use the `additionalBorrowers` field instead.\n\nFor loans with multiple people attached, use this field to add additional people.\nYou do not need to include the main borrower, who will be created from the url parameter.\n",
                "items": {
                  "$ref": "#/components/schemas/PersonLoan"
                },
                "type": "array",
                "writeOnly": true
              },
              "atOrigination": {
                "$ref": "#/components/schemas/LineOfCreditAtOrigination"
              },
              "current": {
                "properties": {
                  "autopayEnabled": {
                    "description": "Is autopay enabled for this loan?",
                    "type": "boolean"
                  },
                  "creditLimitAmount": {
                    "description": "The credit limit amount for the line or draw. Only applicable to line of credit or installment loan with multiple\nadvances. For installment loans with multi-advances, it is the amount financed set at origination.\n",
                    "format": "float",
                    "type": "number"
                  }
                },
                "readOnly": true,
                "type": "object"
              },
              "isClosed": {
                "description": "Indicates whether the LOC is closed. If `true`, new Draws or Purchases cannot be created. The system will continue to create\nstatements as long as there is unpaid balance.\n",
                "type": "boolean"
              },
              "muteLoanNotices": {
                "description": "Indicates whether the system should stop/pause sending loan related notices to the borrower. Set to true if you want to mute all loan related notices (e.g. loanDetails. autopayEnabled, paymentFailed, etc.) Keep in mind that it will also stop all notices related to the loan that are sent from Peach Agent Portal by an agent.\nNote: this is not the only attribute that can stop notices from being sent. Compliance Guard and Cases Do Not Interact can also block communications.\n",
                "type": "boolean"
              },
              "newDrawsAllowed": {
                "description": "Indicates if the borrower can make additional draws on the line.",
                "type": "boolean"
              },
              "nickname": {
                "description": "The loan's nickname. Nickname is a friendly name of the loan and is displayed in the UI.\nNickname is different from loan ID. Nickname can be changed by a borrower.\n",
                "nullable": true,
                "type": "string"
              },
              "object": {
                "enum": [
                  "lineOfCredit"
                ],
                "readOnly": true,
                "type": "string"
              },
              "paymentHoldDays": {
                "$ref": "#/components/schemas/PaymentHoldDays"
              },
              "ratesValidation": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/InterestRateValidation"
                  }
                ],
                "description": "This object contains information on whether actual rates exceed the rate ranges defined on the loan type.",
                "readOnly": true
              },
              "servicedBy": {
                "$ref": "#/components/schemas/LoanServicer"
              },
              "status": {
                "$ref": "#/components/schemas/LoanStatus"
              },
              "type": {
                "enum": [
                  "lineOfCredit"
                ],
                "type": "string"
              }
            },
            "required": [
              "newDrawsAllowed"
            ],
            "type": "object"
          }
        ],
        "title": "Line of Credit"
      },
      "Loan": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/Installment"
          },
          {
            "$ref": "#/components/schemas/LineOfCredit"
          }
        ],
        "description": "Represents a loan. A loan always belongs to a borrower, and most of\nthe interactions between a lender and a borrower are associated with a\nparticular loan.\n",
        "title": "Loan"
      },
      "IsLocked": {
        "properties": {
          "isLocked": {
            "description": "If true, the loan is in the middle of being updated or replayed. The returned data are not consistent. The caller should poll\non the `Get loan lock status` endpoint. Once `isLocked`` becomes `false`, the caller should call this endpoint again to get consistent data.\n",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "AuthorizedAmount": {
        "description": "The total amount of purchases in `authorized` status.\n\n`authorizedAmount` is used in the calculation of the following amounts: `availableCreditAmount`, `openToBuyAmount`, `utilizationAmount`.\n\n`authorizedAmount` is NOT used in the calculations of the following amounts: `overLimitAmount`.\n\nOnly applicable to lines of credit.\n",
        "format": "float",
        "type": "number"
      },
      "DueBalances": {
        "description": "Due balances represent balances that are currently due.",
        "properties": {
          "dueDrawFeesAmount": {
            "description": "The draw fees portion of `dueFeesAmount`.",
            "format": "float",
            "type": "number"
          },
          "dueFeesAmount": {
            "description": "The fees portion of the `dueTotalAmount`.\n\n`dueFeesAmount` is the sum of `dueOriginationFeesAmount`, `dueDrawFeesAmount`, `dueLateFeesAmount`, `dueModificationFeesAmount`, and `dueMembershipFeesAmount`.\n",
            "format": "float",
            "readOnly": true,
            "type": "number"
          },
          "dueInterestAmount": {
            "description": "The interest portion of the `dueTotalAmount`.",
            "format": "float",
            "type": "number"
          },
          "dueLateFeesAmount": {
            "description": "The late fees portion of `dueFeesAmount`.",
            "format": "float",
            "type": "number"
          },
          "dueMembershipFeesAmount": {
            "description": "The membership fees portion of `dueFeesAmount`.",
            "format": "float",
            "type": "number"
          },
          "dueModificationFeesAmount": {
            "description": "The modification fees portion of `dueFeesAmount`.",
            "format": "float",
            "type": "number"
          },
          "dueOriginationFeesAmount": {
            "description": "The origination fees portion of `dueFeesAmount`.",
            "format": "float",
            "type": "number"
          },
          "duePrincipalAmount": {
            "description": "The principal portion of the `dueTotalAmount`.",
            "format": "float",
            "type": "number"
          },
          "dueTotalAmount": {
            "description": "The total due balance sums due principal, interest, and fees.",
            "format": "float",
            "readOnly": true,
            "type": "number"
          }
        },
        "type": "object"
      },
      "NonDueBalances": {
        "description": "Non-due balances represent balances that are not yet due.",
        "properties": {
          "nonDueDrawFeesAmount": {
            "description": "The draw fees portion of `nonDueFeesAmount`.",
            "format": "float",
            "type": "number"
          },
          "nonDueFeesAmount": {
            "description": "The fees portion of the `nonDueTotalAmount`.\n\n`nonDueFeesAmount` is the sum of `nonDueOriginationFeesAmount`, `nonDueDrawFeesAmount`, `nonDueLateFeesAmount`, `nonDueModificationFeesAmount`, and `nonDueMembershipFeesAmount`.\n",
            "format": "float",
            "readOnly": true,
            "type": "number"
          },
          "nonDueInterestAmount": {
            "description": "The interest portion of the `nonDueTotalAmount`.",
            "format": "float",
            "type": "number"
          },
          "nonDueLateFeesAmount": {
            "description": "The late fees portion of `nonDueFeesAmount`.",
            "format": "float",
            "type": "number"
          },
          "nonDueMembershipFeesAmount": {
            "description": "The membership fees portion of `nonDueFeesAmount`.",
            "format": "float",
            "type": "number"
          },
          "nonDueModificationFeesAmount": {
            "description": "The modification fees portion of `nonDueFeesAmount`.",
            "format": "float",
            "type": "number"
          },
          "nonDueOriginationFeesAmount": {
            "description": "The origination fees portion of `nonDueFeesAmount`.",
            "format": "float",
            "type": "number"
          },
          "nonDuePrincipalAmount": {
            "description": "The principal portion of the `nonDueTotalAmount`.",
            "format": "float",
            "type": "number"
          },
          "nonDueTotalAmount": {
            "description": "The total non-due balance sums non-due principal, interest, and fees.",
            "format": "float",
            "readOnly": true,
            "type": "number"
          }
        },
        "type": "object"
      },
      "OpenToBuyAmount": {
        "description": "The amount of available credit a borrower has based on the `utilizationAmount` and transactions' hold day end date.\nThe difference between `availableCreditAmount` and the `openToBuyAmount` is that `availableCreditAmount` doesn't\ntake into account transactions' hold days. In other words, `availableCreditAmount` is more optimistic.\n\nFor lines of credit only:\n  - `openToBuyAmount` takes into account `authorizedAmount`. Authorized purchases decrease the `openToBuyAmount`.\n\nOnly applicable to lines of credit.\n",
        "format": "float",
        "type": "number"
      },
      "OverLimitAmount": {
        "description": "The amount of credit used above the `creditLimitAmount` for the line of credit or draw.\nCalculation is `max(0, utilizationAmount - authorizedAmount - creditLimitAmount)`,  meaning\nthat the over limit amount will only be > 0 if utilization (without authorized purchases)\nis greater than credit limit. Otherwise, `overLimitAmount` will always be 0.\n\nFor lines of credit only:\n  - `overLimitAmount` doesn't take into account `authorizedAmount`. Authorized purchases don't impact the `overLimitAmount`.\n\nOnly applicable to line of credits.\n",
        "format": "float",
        "type": "number"
      },
      "OverdueBalances": {
        "description": "Overdue balances represent balances that are overdue.",
        "properties": {
          "overdueDrawFeesAmount": {
            "description": "The draw fees portion of `overdueFeesAmount`.",
            "format": "float",
            "type": "number"
          },
          "overdueFeesAmount": {
            "description": "The fees portion of the `overdueTotalAmount`.\n\n`overdueFeesAmount` is the sum of `overdueOriginationFeesAmount`, `overdueDrawFeesAmount`, `overdueLateFeesAmount`, `overdueModificationFeesAmount`, and `overdueMembershipFeesAmount`.\n",
            "format": "float",
            "readOnly": true,
            "type": "number"
          },
          "overdueInterestAmount": {
            "description": "The overdue interest portion of the `overdueTotalAmount`.",
            "format": "float",
            "type": "number"
          },
          "overdueLateFeesAmount": {
            "description": "The late fees portion of `overdueFeesAmount`.",
            "format": "float",
            "type": "number"
          },
          "overdueMembershipFeesAmount": {
            "description": "The membership fees portion of `overdueFeesAmount`.",
            "format": "float",
            "type": "number"
          },
          "overdueModificationFeesAmount": {
            "description": "The modification fees portion of `overdueFeesAmount`.",
            "format": "float",
            "type": "number"
          },
          "overdueOriginationFeesAmount": {
            "description": "The origination fees portion of `overdueFeesAmount`.",
            "format": "float",
            "type": "number"
          },
          "overduePrincipalAmount": {
            "description": "The overdue principal portion of the `overdueTotalAmount`.",
            "format": "float",
            "type": "number"
          },
          "overdueTotalAmount": {
            "description": "The total overdue balance sums overdue principal, interest, and fees.",
            "format": "float",
            "readOnly": true,
            "type": "number"
          }
        },
        "type": "object"
      },
      "UtilizationAmount": {
        "description": "The loan or draw utilization amount. In other words, the amount of credit used by the borrower.\n\nFor lines of credit only:\n  - The amount is calculated based on the loan type `creditLimit.utilizationCalculation` configuration.\n    For example: line of credit utilization can be calculated as the sum of principal buckets only without any interest or fees.\n  - `utilizationAmount` takes into account `authorizedAmount`. Authorized purchases increase the `utilizationAmount`.\n  - The amount can be negative. Negative amount happens only when the total amount of payments made by the borrower plus\n    the total amount of service credits exceeds the line or draw balance. Any future purchases will first deplete the\n    overpayment amount (also called `reimbursementAmount`).\n\nOnly applicable to line of credits or installment loans with multi-advances.\n",
        "format": "float",
        "type": "number"
      },
      "Balances": {
        "allOf": [
          {
            "$ref": "#/components/schemas/IsLocked"
          },
          {
            "description": "The up-to-date loan balances as of the time of inquiry.",
            "properties": {
              "authorizedAmount": {
                "$ref": "#/components/schemas/AuthorizedAmount"
              },
              "availableCreditAmount": {
                "description": "The available credit amount to use. If the borrower exceeded their credit limit, the `availableCreditAmount` will be zero.\n\nFor lines of credit only:\n  - `availableCreditAmount` takes into account `authorizedAmount`. Authorized purchases decrease the `availableCreditAmount`.\n  - The amount can be greater than `creditLimitAmount`. It happens only when the total amount of payments made by the borrower\n    plus the total amount of service credits exceeds the line or draw balance. Any future purchases will first deplete the\n    overpayment amount (also called `reimbursementAmount`).\n\nOnly applicable to lines of credit or installment loans with multi-advances.\n",
                "format": "float",
                "type": "number"
              },
              "calculatedAt": {
                "description": "Timestamp when the balances were calculated.",
                "format": "date-time",
                "type": "string"
              },
              "chargedOffBalances": {
                "description": "Charged-off balances represent balances that are charged-off.",
                "properties": {
                  "chargedOffFeesAmount": {
                    "description": "The fees portion of the `chargedOffTotalAmount`.",
                    "format": "float",
                    "type": "number"
                  },
                  "chargedOffInterestAmount": {
                    "description": "The interest portion of the `chargedOffTotalAmount`.",
                    "format": "float",
                    "type": "number"
                  },
                  "chargedOffPrincipalAmount": {
                    "description": "The principal portion of the `chargedOffTotalAmount`.",
                    "format": "float",
                    "type": "number"
                  },
                  "chargedOffTotalAmount": {
                    "description": "The total charged-off balance sums charged-off principal, interest, and fees.",
                    "format": "float",
                    "type": "number"
                  }
                },
                "type": "object"
              },
              "creditLimitAmount": {
                "description": "The credit limit amount for the line or draw. Only applicable to line of credit or installment loan with multiple\nadvances. For installment loans with multi-advances, it is the amount financed set at origination.\n",
                "format": "float",
                "type": "number"
              },
              "dueBalances": {
                "$ref": "#/components/schemas/DueBalances"
              },
              "interestAndFeesAmounts": {
                "description": "Interest and fees amounts",
                "properties": {
                  "deferredInterestAccruedTotalAmount": {
                    "description": "The total deferred interest accrued.\n\n- If the deferred interest promotion is exercised, the deferred\n  interest is foregone and therefore this attribute will have a\n  value of zero.\n  In this scenario, the deferred interest amount will \"move\" to\n  the `forgoneInterestDeferredAmount` attribute.\n- If the deferred interest promotion is not executed, the\n  deferred interest is recognized as regular interest and\n  therefore this attribute will have a value of zero.\n  In this scenario, the deferred interest amount will \"move\"\n  to the `interestAccruedTotalAmount` attribute.\n",
                    "format": "float",
                    "type": "number"
                  },
                  "deferredInterestDiscountTotalAmount": {
                    "description": "The total deferred interest discount.\n",
                    "format": "float",
                    "type": "number"
                  },
                  "feesChargedYearToDateAmount": {
                    "description": "The amount of fees charged year-to-date.\n",
                    "format": "float",
                    "type": "number"
                  },
                  "forgoneInterestCapAmount": {
                    "description": "The amount of foregone interest that exceeded the interest cap amount. This is only\napplicable to loans that had `totalInterestCapAmount` set to `true` at loan origination.\n",
                    "format": "float",
                    "type": "number"
                  },
                  "forgoneInterestDeferredAmount": {
                    "description": "The amount of interest that was foregone because of deferred\ninterest promotions.\nThis is only applicable to loans with deferred interest\npromotions that were not executed.\n",
                    "format": "float",
                    "type": "number"
                  },
                  "forgoneInterestRoundingAmount": {
                    "description": "The amount of interest that was forgone because of rounding. Applicable only to:\n 1. Lines of credit (and draws) with minimum payments\n 1. Lines of credit (and draws) with balloon amortization\n 1. Installment loans with balloon amortization\n",
                    "format": "float",
                    "type": "number"
                  },
                  "interestAccruedTotalAmount": {
                    "description": "The total interest accrued - net of interest discount and foregone interest - from the start of the loan to the date of inquiry.",
                    "format": "float",
                    "type": "number"
                  },
                  "interestAccruedYearToDateAmount": {
                    "description": "The amount of interest accrued year-to-date not including interest discounts and forgone interest.\n",
                    "format": "float",
                    "type": "number"
                  },
                  "interestAccruedYearToDateForStatementAmount": {
                    "description": "This amount should be used for statements. The amount of interest accrued year-to-date not including\ninterest discounts and forgone interest.\n\nThe Peach system accrues interest on a \"following\" day based on the principal balance at the end-of-day of a prior day.\nThe interest effective date is the \"following\" day. For example, interest that accrues on `2022-01-01` is based on the\nprincipal balance at the end-of-day of `2021-12-13`. The interest is effectively booked to the ledger on `2022-01-01`.\n\nWhen summarizing year to date interest for a statement, the interest that was accrued effectively on `2022-01-01` should\nbe part of the 2021 year (in the example above). This is the main difference between the `interestAccruedYearToDateAmount`\nand `interestAccruedYearToDateForStatementAmount` fields.\n",
                    "format": "float",
                    "type": "number"
                  },
                  "interestDiscountTotalAmount": {
                    "description": "The total interest discount from the start of the loan to the date of inquiry.",
                    "format": "float",
                    "type": "number"
                  }
                },
                "type": "object"
              },
              "loanStatus": {
                "$ref": "#/components/schemas/LoanStatus"
              },
              "nonAccrualBalances": {
                "description": "Non-accrual balances represent balances that are non-accrual.",
                "properties": {
                  "nonAccrualFeesAmount": {
                    "description": "The fees portion of the `nonAccrualTotalAmount`.",
                    "format": "float",
                    "type": "number"
                  },
                  "nonAccrualInterestAmount": {
                    "description": "The interest portion of the `nonAccrualTotalAmount`.",
                    "format": "float",
                    "type": "number"
                  },
                  "nonAccrualPrincipalAmount": {
                    "description": "The principal portion of the `nonAccrualTotalAmount`.",
                    "format": "float",
                    "type": "number"
                  },
                  "nonAccrualTotalAmount": {
                    "description": "The total non-accrual balance sums non-accrual principal, interest, and fees.",
                    "format": "float",
                    "type": "number"
                  }
                },
                "type": "object"
              },
              "nonDueBalances": {
                "$ref": "#/components/schemas/NonDueBalances"
              },
              "openToBuyAmount": {
                "$ref": "#/components/schemas/OpenToBuyAmount"
              },
              "outstandingBalances": {
                "description": "When a loan is `active`, outstanding balances combine non-due, due, and overdue balances. When a loan is\n`accelerated`, outstanding balances are equal to non-accrual balances. When a loan is `chargedOff`,\noutstanding balances are equal to charged-off balances.\n",
                "properties": {
                  "outstandingDrawFeesAmount": {
                    "description": "The draw fees portion of `outstandingFeesAmount`.",
                    "format": "float",
                    "type": "number"
                  },
                  "outstandingFeesAmount": {
                    "description": "The fees portion of the `outstandingTotalAmount`.\n\n`outstandingFeesAmount` is the sum of `outstandingOriginationFeesAmount`, `outstandingDrawFeesAmount`, `outstandingLateFeesAmount`, `outstandingModificationFeesAmount`, and `outstandingMembershipFeesAmount`.\n",
                    "format": "float",
                    "type": "number"
                  },
                  "outstandingInterestAmount": {
                    "description": "The interest portion of the `outstandingTotalAmount`.",
                    "format": "float",
                    "type": "number"
                  },
                  "outstandingLateFeesAmount": {
                    "description": "The late fees portion of `outstandingFeesAmount`.",
                    "format": "float",
                    "type": "number"
                  },
                  "outstandingMembershipFeesAmount": {
                    "description": "The membership fees portion of `outstandingFeesAmount`.",
                    "format": "float",
                    "type": "number"
                  },
                  "outstandingModificationFeesAmount": {
                    "description": "The modification fees portion of `outstandingFeesAmount`.",
                    "format": "float",
                    "type": "number"
                  },
                  "outstandingOriginationFeesAmount": {
                    "description": "The origination fees portion of `outstandingFeesAmount`.",
                    "format": "float",
                    "type": "number"
                  },
                  "outstandingPrincipalAmount": {
                    "description": "The principal portion of the `outstandingTotalAmount`.",
                    "format": "float",
                    "type": "number"
                  },
                  "outstandingTotalAmount": {
                    "description": "The total outstanding balance sums outstanding principal, interest, and fees. Also called the loan payoff amount.\n\nIf the loan is charged off, the outstanding totalAmount will be equal to the `chargedOffTotalAmount`.\n",
                    "format": "float",
                    "type": "number"
                  }
                },
                "type": "object"
              },
              "outstandingBalancesWithPromo": {
                "description": "Promotional balances represent various balances needed to be paid in order to exercise the same-as-cash or\nother promotional program.\n",
                "properties": {
                  "outstandingTotalAmount": {
                    "description": "The remaining amount needed to be paid in order to exercise the same-as-cash or other promotional program.\n",
                    "format": "float",
                    "nullable": true,
                    "type": "number"
                  }
                },
                "type": "object"
              },
              "overLimitAmount": {
                "$ref": "#/components/schemas/OverLimitAmount"
              },
              "overdueBalances": {
                "$ref": "#/components/schemas/OverdueBalances"
              },
              "overdueNumberDays": {
                "description": "If the loan is currently overdue, this represents the number of days the loan has been overdue.",
                "type": "integer"
              },
              "paidBalances": {
                "description": "Paid balances represent the amounts paid to date.",
                "properties": {
                  "paidCreditsAmount": {
                    "description": "The total amount of service credits applied to the loan until today.",
                    "format": "float",
                    "type": "number"
                  },
                  "paidFeesAmount": {
                    "description": "The total amount of fees paid until today.",
                    "format": "float",
                    "type": "number"
                  },
                  "paidInterestAmount": {
                    "description": "The total amount of interest paid until today.",
                    "format": "float",
                    "type": "number"
                  },
                  "paidOverAmount": {
                    "description": "Stores any excess amount that was not allocated to principal, interest or fees.",
                    "format": "float",
                    "type": "number"
                  },
                  "paidPaymentsAmount": {
                    "description": "The total amount of payments applied to the loan until today, excluding reimbursements.",
                    "format": "float",
                    "type": "number"
                  },
                  "paidPrincipalAmount": {
                    "description": "The total amount of principal paid until today.",
                    "format": "float",
                    "type": "number"
                  },
                  "paidReimbursementsAmount": {
                    "description": "The total amount of reimbursements applied to the loan until today.",
                    "format": "float",
                    "type": "number"
                  },
                  "paidTotalAmount": {
                    "description": "The total payment and service credits made from the start of the loan to the date of inquiry. Excludes reimbursements.",
                    "format": "float",
                    "type": "number"
                  }
                },
                "type": "object"
              },
              "reimbursementAmount": {
                "description": "The total amount that a lender owes to the borrower. After a reimbursement is processed, the amount is reduced accordingly.\n",
                "format": "float",
                "type": "number"
              },
              "utilizationAmount": {
                "$ref": "#/components/schemas/UtilizationAmount"
              }
            },
            "type": "object"
          }
        ]
      },
      "FutureBalances": {
        "allOf": [
          {
            "$ref": "#/components/schemas/IsLocked"
          },
          {
            "description": "The projected loan balances as of the time of inquiry.",
            "properties": {
              "expectedTotalAmount": {
                "description": "The total amount the borrower is projected to pay under the assumption of continued on-time payments.\n",
                "format": "float",
                "type": "number"
              },
              "projectedPayoffDate": {
                "description": "Date for when the loan is expected to be paid off, assuming current balances and expected payments or autopays.\n",
                "format": "date",
                "type": "string"
              },
              "projectedTotalDueBalanceTenDays": {
                "description": "This is the projected loan total due balance in 10 calendar days from today. The difference between today's\n`outstandingTotalBalance` and the estimate in 10 days is only the interest that would accrue on the loan.\n",
                "format": "float",
                "type": "number"
              }
            },
            "type": "object"
          }
        ]
      },
      "LoanTypeCompanyConfigOverride": {
        "additionalProperties": false,
        "description": "Same as the company config, but stored on a loan type object, allowing\nfor overriding a subset of global settings on a per-loan-type basis.\nIf a value is not configured at the loan type level, the system will\nfall back to the company-level configuration.\n\n**Note**: Any property can be set to `null` to clear the override and\nfall back to the company-level configuration for that specific property.\n",
        "properties": {
          "brandAssets": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CompanyConfigBrandAssets"
              }
            ],
            "nullable": true
          },
          "brandName": {
            "description": "The name of the company for presentation to the end consumer\n(same as company.brandName)\n",
            "nullable": true,
            "type": "string"
          },
          "collections": {
            "additionalProperties": false,
            "nullable": true,
            "properties": {
              "autoInitiate": {
                "additionalProperties": false,
                "nullable": true,
                "properties": {
                  "enableReviewTask": {
                    "description": "By default, when a collection case is created automatically,\na task of type `reviewAutoCreatedCase` is created in\ntaskrouter—the assumption being that usually a human should\nreview automatically created cases.\n\nTo disable the creation of this task set this config to `false`.\n",
                    "nullable": true,
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "legalName": {
            "description": "Legal name of the company (same as company.legalName)",
            "nullable": true,
            "type": "string"
          },
          "links": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CompanyConfigLinks"
              }
            ],
            "nullable": true
          },
          "openHours": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CompanyConfigOpenHours"
              }
            ],
            "nullable": true
          },
          "showPoweredByPeach": {
            "description": "Corresponds to /bootstrap.company.showPoweredByPeach.\nControls whether to show \"Powered by Peach\" branding.\n",
            "nullable": true,
            "type": "boolean"
          },
          "support": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CompanyConfigSupport"
              }
            ],
            "nullable": true
          },
          "timezone": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CompanyConfigTimezone"
              }
            ],
            "nullable": true
          },
          "ui": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CompanyConfigUi"
              }
            ],
            "nullable": true
          }
        },
        "title": "Loan Type Company Config Override",
        "type": "object"
      },
      "CreditAgenciesIdentifiers": {
        "description": "You can report to one or more credit reporting agencies. Make sure to set identifiers for each agency you\nplan to report in the `metro2` object.\n\nThis endpoint sets identifiers for loans with the same `loanTypeId` (aka portfolio). If you have more than\none loan type (meaning different portfolios), you need to create identifiers for each `loanTypeId`.\n\nIn addition, you need to create file upload details using `Create credit agency` for each credit agency.\nThe file upload details need to be set once per credit agency, and all `loanTypeId` (aka all portfolios)\nwill be uploaded to the same location.\n",
        "properties": {
          "isCreditReportingAllowed": {
            "type": "boolean"
          },
          "metro2": {
            "properties": {
              "accountType": {
                "description": "Account type.\n\nInstallment:\n00–05,10,11,13,17,20,90,91,95,0A, 3A, 6A, 9A, 7B, 0F\n\nLOC:\n15, 43, 47, 7A, 9B\n",
                "maxLength": 2,
                "type": "string"
              },
              "creditorClassification": {
                "description": "Creditor Classification.\n\n01=Retail\n02=Medical/Health Care\nRequired when reporting medical debts and returned checks from providers of medical services, products or devices\n03=Oil Company\n04=Government\n05=Personal Services\n06=Insurance\n07=Educational\n08=Banking\n09=Rental/Leasing\n10=Utilities\n11=Cable/Cellular\n12=Financial\n(other non-banking financial institutions)\n13=Credit Union\n14=Automotive\n15=Check Guarantee\n",
                "enum": [
                  "01",
                  "02",
                  "03",
                  "04",
                  "05",
                  "06",
                  "07",
                  8,
                  9,
                  "10",
                  "11",
                  "12",
                  "13",
                  "14",
                  "15"
                ],
                "maxLength": 2,
                "type": "string"
              },
              "equifaxIdentificationNumber": {
                "description": "Equifax Identification number.\n",
                "maxLength": 20,
                "type": "string"
              },
              "equifaxProgramIdentifier": {
                "description": "Equifax program identifier.\nThis is a String of 10 chars.\n",
                "maxLength": 10,
                "type": "string"
              },
              "experianIdentificationNumber": {
                "description": "Experian Identification number.\n",
                "maxLength": 20,
                "type": "string"
              },
              "experianProgramIdentifier": {
                "description": "Experian program identifier.\nThis is a String of 5 chars.\n",
                "maxLength": 5,
                "type": "string"
              },
              "innovisIdentificationNumber": {
                "description": "Innovis Identification number.\n",
                "maxLength": 20,
                "type": "string"
              },
              "innovisProgramIdentifier": {
                "description": "Innovis program identifier.\nThis is a String of 10 chars.\n",
                "maxLength": 10,
                "type": "string"
              },
              "interestTypeIndicator": {
                "description": "Interest type indicator.\n\n`F` - means that the interest is reported as fixed.\n\n`V` - means that the interest is reported as variable/adjustable\n",
                "maxLength": 1,
                "type": "string"
              },
              "microBiltPrbcProgramIdentifier": {
                "description": "MicroBilt/PRBC program identifier.\n",
                "maxLength": 10,
                "type": "string"
              },
              "portfolioType": {
                "description": "Portfolio type.\n\nC=Line of Credit\n\nI=Installment\n\nM=Mortgage\n\nO=Open\n\nR=Revolving\n",
                "enum": [
                  "C",
                  "I",
                  "M",
                  "O",
                  "R"
                ],
                "maxLength": 1,
                "type": "string"
              },
              "reporterAddress": {
                "description": "Reporter address.\nThis is a String of 96 chars.\n",
                "maxLength": 96,
                "type": "string"
              },
              "reporterName": {
                "description": "Reporter name.\nThis is a String of 40 chars.\n",
                "maxLength": 40,
                "type": "string"
              },
              "reporterTelephoneNumber": {
                "description": "Reporter telephone number.\n",
                "maxLength": 10,
                "type": "string"
              },
              "roundingMethod": {
                "default": "roundDownWhole",
                "description": "Monetary fields are reported in whole dollars only in Metro2.\n\n- `roundUpWhole` - an amount will be rounded up to the nearest dollar. For example: $4.02 -> $5.\n- `roundDownWhole` - an amount will be rounded down to the nearest dollar with one exception:\n  If the amount is less than one dollar, the system will report it as one dollar vs. zero.\n  For example: $1.98 -> $1, $0.03 -> $1.\n",
                "enum": [
                  "roundDownWhole",
                  "roundUpWhole"
                ],
                "type": "string"
              },
              "skipSegments": {
                "description": "Segments excluded from Metro2. The reported data depends on the\nloan type configuration. If the loan type specifies a segment to\nbe skipped, the segment will not be reported even if the loan\ndetails include it.\n\nFor example: If a lender sets `metro2.reportK2Segment`= `true`\nwhen a loan is assigned to a debt collection agency or investor\nhas changed but `skipSegments` includes `k2Segment`, the K2\nsegment won't be reported\n",
                "items": {
                  "enum": [
                    "header",
                    "baseSegment",
                    "k1Segment",
                    "k2Segment",
                    "l1Segment"
                  ],
                  "type": "string"
                },
                "type": "array"
              },
              "softwareVendorName": {
                "default": "Peach Finance Inc.",
                "description": "Software vendor name.\n",
                "maxLength": 40,
                "type": "string"
              },
              "softwareVersionNumber": {
                "default": "1.1",
                "description": "Software version number.\n",
                "maxLength": 5,
                "type": "string"
              },
              "transunionIdentificationNumber": {
                "description": "TransUnion Identification number.\n",
                "maxLength": 20,
                "type": "string"
              },
              "transunionProgramIdentifier": {
                "description": "TransUnion program identifier.\nThis is a String of 10 chars.\n",
                "maxLength": 10,
                "type": "string"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "DayType": {
        "description": "Whether day field refers to weekends and holidays or only business days.",
        "enum": [
          "business",
          "calendar"
        ],
        "type": "string"
      },
      "BalanceCheck": {
        "description": "Balance check configuration",
        "nullable": true,
        "properties": {
          "checkOffsetDays": {
            "description": "Number of days before payment to check for the balance",
            "minimum": 0,
            "type": "integer"
          },
          "debitLogic": {
            "items": {
              "properties": {
                "action": {
                  "description": "`debit` - Debit the account. \\\n`reschedule` - The system will reschedule the payment to \"payment due date + `rescheduleBufferInDays`\". \\\n`cancel` - Cancel the payment.\n",
                  "enum": [
                    "cancel",
                    "debit",
                    "reschedule"
                  ],
                  "type": "string"
                },
                "condition": {
                  "description": "`balanceNA` - means that the payment method used cannot check balances. \\\nFor example: debit card or bank account that was never connected to a balance check (or was disconnected manually by the borrower).\nIt means that \"account link\" status is \"inactive\" or the account link object is empty.\n\n`balanceBroken` - there is a balance connection object, but it's broken - due to an error. \\\n  It means that \"account link\" status is \"active\", but there is an errorCode exists.\n\n`balanceGreen` - account balance is more than `balanceYellow` and significantly more than the scheduled amount.\n",
                  "enum": [
                    "balanceNA",
                    "balanceBroken",
                    "balanceRed",
                    "balanceYellow",
                    "balanceGreen"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "enabled": {
            "description": "If enabled, balance check will be performed based on the configuration prior to processing bank account payments.",
            "type": "boolean"
          },
          "rescheduleBufferDayType": {
            "$ref": "#/components/schemas/DayType"
          },
          "rescheduleBufferInDays": {
            "description": "Number of days buffer to reschedule the payment.",
            "type": "integer"
          },
          "thresholds": {
            "items": {
              "properties": {
                "value": {
                  "description": "The percentage value for the specified zone (1 = 100% of the scheduled payment, 1.2 = 120% of the scheduled payment, etc.).\n",
                  "format": "float",
                  "type": "number"
                },
                "zone": {
                  "description": "Thresholds represented as multiple of the scheduled payment amount.\n\n`balanceRed` - account balance is less than scheduled amount. \\\n`balanceYellow` - account balance is more than the scheduled amount but not by much. \\\n",
                  "enum": [
                    "balanceRed",
                    "balanceYellow"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "MultiLoanPaymentWaterfall": {
        "properties": {
          "loansOrder": {
            "description": "`highestInterestRate` - the loan or draw with the highest interest rate\n\n`lowestInterestRate` - the loan or draw with the lowest interest rate\n\n`oldestLoanDate` - the oldest loan or draw\n\n`newestLoanDate` - the newest loan or draw\n\n`highestOutstandingBalance` - the loan or draw with the highest outstanding balance\n\n`lowestOutstandingBalance` - the loan or draw with the lowest outstanding balance\n",
            "items": {
              "enum": [
                "highestInterestRate",
                "lowestInterestRate",
                "oldestLoanDate",
                "newestLoanDate",
                "highestOutstandingBalance",
                "lowestOutstandingBalance",
                "activeFirst",
                "chargedOffFirst"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "transactionType": {
            "description": "The transaction type.\n\n`payment` - payment made by the borrower or by a service agent per borrower request.\nCan be one-time payment, future payment or Autopay.\nSuccessful payments reduce loan balance.\n\n`serviceCredit` - service credit issued by a service agent or supervisor. Successful service\ncredits reduce loan balance.\n",
            "enum": [
              "payment",
              "serviceCredit"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "BalancesEnum": {
        "enum": [
          "overdueFee",
          "overdueAccruedInterest",
          "overduePrincipal",
          "dueFee",
          "dueAccruedInterest",
          "duePrincipal",
          "nonDueFee",
          "nonDueAccruedInterest",
          "nonDuePrincipal",
          "chargedOffPrincipal",
          "chargedOffAccruedInterest",
          "chargedOffFee",
          "nonAccrualFee",
          "nonAccrualInterest",
          "nonAccrualPrincipal"
        ],
        "type": "string"
      },
      "SingleLoanPaymentWaterfall": {
        "properties": {
          "balancesOrder": {
            "description": "When loan is in `active` status, the following buckets are relevant for waterfall:\n`overdueFee`, `overdueAccruedInterest`, `overduePrincipal`, `dueFee`, `dueAccruedInterest`, `duePrincipal`, `nonDueFee`, `nonDueAccruedInterest`, `nonDuePrincipal`.\n\nWhen loan is in `chargedOff` status, the following buckets are relevant for waterfall:\n`chargedOffPrincipal`, `chargedOffAccruedInterest`, `chargedOffFee`\n\nWhen loan is in `accelerated` status, the following buckets are relevant for waterfall:\n`nonAccrualPrincipal`, `nonAccrualInterest`, `nonAccrualFee`\n\nDuring payment application, when any fee bucket is reached (nonDueFee, dueFee, etc.), fees in that bucket are paid\nbased on the order defined by the `feesOrder` attribute.\n",
            "items": {
              "$ref": "#/components/schemas/BalancesEnum"
            },
            "type": "array"
          },
          "feesOrder": {
            "description": "The order of fees during payment application. When any fee bucket is reached\n(nonDueFee, dueFee, etc.) during payment application, fees in that bucket are\npaid down in the order defined by `feesOrder`.\n\nPlease note that `modificationFee` bucket includes the following fee types:\n`foreignTransactionFee`, `modificationFee`, `purchaseFee`, `serviceFee`, `nsfFee`.\n\nIf `feesOrder` is omitted or an empty list, the default order is applied:\n`originationFee`, `drawFee`, `modificationFee`, `lateFee`, `membershipFee`.\n",
            "items": {
              "enum": [
                "originationFee",
                "drawFee",
                "modificationFee",
                "lateFee",
                "membershipFee"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "loanStatus": {
            "enum": [
              "active",
              "accelerated",
              "chargedOff"
            ],
            "type": "string"
          },
          "transactionType": {
            "description": "The transaction type.\n\n`payment` - payment made by the borrower or by a service agent per borrower request.\nCan be one-time payment, future payment or Autopay.\nSuccessful payments reduce loan balance.\n\n`serviceCredit` - service credit issued by a service agent or supervisor. Successful service\ncredits reduce loan balance.\n",
            "enum": [
              "payment",
              "serviceCredit"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "PaymentWaterfall": {
        "properties": {
          "multi": {
            "description": "Multiple loans (or draws for Line-of-Credit loans) payment waterfall application\n",
            "items": {
              "$ref": "#/components/schemas/MultiLoanPaymentWaterfall"
            },
            "type": "array"
          },
          "single": {
            "description": "Single loan payment waterfall application.\n",
            "items": {
              "$ref": "#/components/schemas/SingleLoanPaymentWaterfall"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "LoanType": {
        "description": "A Loan Configuration is a representation of a Loan Product and its specific\nsettings and configurations\n",
        "properties": {
          "assetDisplayName": {
            "description": "The asset display name. For example: Loan, Line of Credit, Lease, Credit Card.\n",
            "maxLength": 50,
            "minLength": 0,
            "type": "string"
          },
          "assetType": {
            "$ref": "#/components/schemas/LoanAssetType"
          },
          "automatedDebtValidationNotification": {
            "description": "Some states require automatic debt validation notices to be sent to borrowers. We are aware of in the following states: Illinois, Maryland, Massachusetts, Minnesota, Nevada, Tennessee, Wyoming, Arizona, Puerto Rico, DC.\nPeach can automatically send the debt validation notices based on two triggers:\n\n  1. On loan activation event - `loanActivation`:\n    The notice will be sent (once) when a loan is activated.\n  2. On first overdue event - `loanFirstOverdue`:\n    The notice will be sent (once) when a loan becomes overdue for the first time.\n\nPlease configure which of the states you'd like to elect into receiving the automatic debt validation notice. Use the option where the state is left blank to specify the default option for remaining states (or remove the \"catch all\" entirely).\nBelow is an example with a list of states and corresponding templates:\n\n```\n[\n  [\"IL\", \"US\", \"debtValidationNoticeAutomatic\", \"loanActivation\"],\n  [\"MD\", \"US\", \"debtValidationNoticeAutomatic\", \"loanActivation\"],\n  [\"MA\", \"US\", \"debtValidationNoticeAutomatic\", \"loanFirstOverdue\"],\n  [\"MN\", \"US\", \"debtValidationNoticeAutomatic\", \"loanFirstOverdue\"],\n  [\"NV\", \"US\", \"debtValidationNoticeAutomatic\", \"loanFirstOverdue\"],\n  [\"TN\", \"US\", \"debtValidationNoticeAutomatic\", \"loanActivation\"],\n  [\"WY\", \"US\", \"debtValidationNoticeAutomatic\", \"loanActivation\"],\n  [\"AZ\", \"US\", \"ArizonaDebtValidationNotice\", \"loanActivation\"],\n  [\"PR\", \"US\", \"PuertoRicoDebtValidationNotice\", \"loanFirstOverdue\"],\n  [\"\", \"US\", \"debtValidationNoticeAutomatic\", \"loanFirstOverdue\"],\n]\n```\n",
            "items": {
              "description": "An array of three or four elements mapping a state to a debt validation notice template and trigger.\n\nIf only three elements are included the fourth is assumed to be `\"loanActivation\"`\n",
              "example": [
                "IL",
                "US",
                "debtValidationNoticeAutomatic",
                "loanActivation"
              ],
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "type": "array"
          },
          "companyConfigOverride": {
            "$ref": "#/components/schemas/LoanTypeCompanyConfigOverride",
            "description": "The company config override for this loan type. This field is only\npopulated when `?include=companyConfigOverride` is specified in the\nquery parameters. Otherwise, it will be `null`.\n",
            "nullable": true
          },
          "creditReporting": {
            "$ref": "#/components/schemas/CreditAgenciesIdentifiers"
          },
          "currency": {
            "default": "USD",
            "description": "The currency used in loans of this type.",
            "type": "string"
          },
          "description": {
            "description": "An optional description for the loan product",
            "nullable": true,
            "type": "string"
          },
          "externalId": {
            "description": "An optional client unique identifier for the loan product",
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "extraFields": {
            "additionalProperties": true,
            "nullable": true,
            "type": "object"
          },
          "fees": {
            "properties": {
              "originationFeeAPRCalcOverride": {
                "default": "noOverride",
                "description": "If `noOverride` the APR will be calculated as if the origination fee will be calculated per the\n`originationFeeChargeLogic`. If `atOrigination` the APR will be calculated as if origination fee\nwas collected at origination regardless of the `originationFeeChargeLogic`.\n",
                "enum": [
                  "noOverride",
                  "atOrigination"
                ],
                "type": "string"
              },
              "originationFeeChargeLogic": {
                "$ref": "#/components/schemas/FeeChargeLogic"
              },
              "originationFeeDisplayName": {
                "default": "Origination Fee",
                "description": "The display name of the origination fee as shown to the borrower in the UI. For example: \"Origination fee\" or \"Set up fee\".\n",
                "type": "string"
              }
            },
            "type": "object"
          },
          "futurePay": {
            "properties": {
              "achDebitTiming": {
                "enum": [
                  "initiateOnDueDate",
                  "hitOnDueDate"
                ],
                "type": "string"
              },
              "achDebitTimingShiftOnNonBusinessDay": {
                "description": "Controls ACH transaction creation timing when `autoPay.achDebitTiming=\"hitOnDueDate\"`.\nNot applicable for transaction types other than ACH or when `autoPay.achDebitTiming=\"initiateOnDueDate\"`.\n",
                "enum": [
                  "forward",
                  "backward"
                ],
                "type": "string"
              },
              "balanceCheck": {
                "$ref": "#/components/schemas/BalanceCheck"
              },
              "overpaymentAmountLimitFactor": {
                "default": 1.5,
                "description": "The multiplier will be used to calculate the maximum amount allowed to be scheduled as one-time payment.\nFor example:\n\nIf the value is 1.2 and the current outstanding balance is $200.00. The maximum amount that a one-time payment is allowed is $200.00 * 1.2 = $240.00\n",
                "format": "float",
                "minimum": 1,
                "type": "number"
              }
            },
            "type": "object"
          },
          "managedByPeach": {
            "description": "If true, this loan will be completely managed by the system including amortization, interest accrual etc.",
            "type": "boolean"
          },
          "name": {
            "description": "An optional name for the loan product",
            "maxLength": 255,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "openToBuyCalculation": {
            "description": "Defines the lender's configuration to determine the \"Open to Buy\" amount. Only applicable to `lineOfCredit`.\n",
            "nullable": true,
            "properties": {
              "calculationType": {
                "description": "This calculation determines whether transactions' `status` and/or `holdDaysEndDate` are used when calculating open-to-buy.\n\ntransactionStatus - open-to-buy will take into account transaction status only. Open-to-buy will not be adjusted if the\ntransaction status is in [initiated, pending] regardless of the transaction's `holdDaysEndDate`.\n\ntransactionHoldDays - open-to-buy will take into account transaction hold days only. Open-to-buy will not be adjusted\nif the transaction status is in [initiated, pending, succeeded] AND the transaction is within holdDaysEndDate.\n\ntransactionStatusAndHoldDays - Open-to-buy will take into account transaction status and hold days period. Open-to-buy\nwill not be adjusted if the transaction status is in [initiated, pending] AND the transaction is within hold days periods.\n\nopenToBuyCalculation=transactionStatus\n\n| tx status   | within hold days window   | after hold days window    |\n|-------------|---------------------------|---------------------------|\n| Initiated   | Open-to-buy not adjusted  | Open-to-buy not adjusted  |\n| Pending     | Open-to-buy not adjusted  | Open-to-buy not adjusted  |\n| Succeeded   | Open-to-buy adjusted      | Open-to-buy adjusted      |\n\n\nopenToBuyCalculation=transactionHoldDays\n\n| tx status   | within hold days window   | after hold days window    |\n|-------------|---------------------------|---------------------------|\n| Initiated   | Open-to-buy not adjusted  | Open-to-buy adjusted      |\n| Pending     | Open-to-buy not adjusted  | Open-to-buy adjusted      |\n| Succeeded   | Open-to-buy not adjusted  | Open-to-buy adjusted      |\n\n\nopenToBuyCalculation=transactionStatusAndHoldDays\n\n| tx status   | within hold days window   | after hold days window    |\n|-------------|---------------------------|---------------------------|\n| Initiated   | Open-to-buy not adjusted  | Open-to-buy adjusted      |\n| Pending     | Open-to-buy not adjusted  | Open-to-buy adjusted      |\n| Succeeded   | Open-to-buy adjusted      |Open-to-buy adjusted       |\n",
                "enum": [
                  "transactionStatus",
                  "transactionHoldDays",
                  "transactionStatusAndHoldDays"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "paydayNotices": {
            "properties": {
              "sendConsumerRightsNotice": {
                "default": false,
                "description": "Indicates if the system should send Payday Consumer Rights Notice to the Borrower via email after two consecutive\nfailed debit attempts.\n",
                "type": "boolean"
              },
              "sendFirstPaymentWithdrawalNotice": {
                "default": false,
                "description": "Indicates if the system should send Payday First Payment Withdrawal Notice to the Borrower via email and text message at\nleast 3 business days prior to the scheduled payment.\n",
                "type": "boolean"
              }
            },
            "type": "object"
          },
          "paymentAllowedWhenChargedOff": {
            "default": false,
            "type": "boolean"
          },
          "paymentHoldDays": {
            "$ref": "#/components/schemas/PaymentHoldDays"
          },
          "paymentWaterfall": {
            "$ref": "#/components/schemas/PaymentWaterfall"
          },
          "refunds": {
            "properties": {
              "isRefundAllowed": {
                "description": "Whether a borrower can receive a refund.",
                "type": "boolean"
              }
            },
            "type": "object"
          },
          "snapshots": {
            "description": "Loan daily snapshots",
            "properties": {
              "reportDaysWhenPaidOff": {
                "default": 10,
                "minimum": 10,
                "type": "integer"
              }
            },
            "type": "object"
          },
          "status": {
            "description": "The status of the loan type",
            "enum": [
              "inactive",
              "active"
            ],
            "type": "string"
          },
          "timezone": {
            "description": "The optional timezone configuration for the loan type, represented as a valid tz code\nstring such as \"UTC\" or \"America/Los_Angeles\". If `null`, the timezone defaults to the\ntimezone configuration on the company.\n",
            "nullable": true,
            "type": "string"
          },
          "txDescriptorAssetDisplayName": {
            "default": "Loan",
            "description": "Text that will be used in transaction descriptor.\nThe descriptor is shown in customer online bank account or statement.\nThe text must be limited to 4 characters. If more than 4 characters are set, the logic will trim the text and use only first 4 characters.\nFor example: LOAN, LINE, CARD, PLAN, etc. The full description will look like: LOAN PYMT, CARD PYMT.\n",
            "type": "string"
          },
          "useExternalIdInUI": {
            "type": "boolean"
          }
        },
        "required": [
          "assetType",
          "assetDisplayName"
        ],
        "type": "object"
      },
      "NameNotNullable": {
        "description": "Name of the person.",
        "nullable": false,
        "properties": {
          "createdAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "current": {
            "default": true,
            "description": "Name is flagged as current.",
            "readOnly": true,
            "type": "boolean"
          },
          "deletedAt": {
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "effectiveAt": {
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "firstName": {
            "description": "A person's first name.",
            "maxLength": 50,
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "string"
          },
          "lastName": {
            "description": "A person's last name.",
            "maxLength": 50,
            "type": "string"
          },
          "maidenLastName": {
            "description": "A person's maiden name, if applicable.",
            "nullable": true,
            "type": "string"
          },
          "middleName": {
            "description": "A person's middle name.",
            "maxLength": 50,
            "nullable": true,
            "type": "string"
          },
          "object": {
            "default": "name",
            "enum": [
              "name"
            ],
            "readOnly": true,
            "type": "string"
          },
          "originalValue": {
            "description": "The original value for name before an update.",
            "readOnly": true,
            "type": "object"
          },
          "preferredFirstName": {
            "description": "A person's preferred first name. This name will be used for interactions\nlike emails, text messages, outbound calls, online portal, etc.\nIf no preferred name is provided, `firstName` will be used.\n",
            "nullable": true,
            "type": "string"
          },
          "prefix": {
            "description": "A person's name prefix.",
            "nullable": true,
            "type": "string"
          },
          "source": {
            "enum": [
              "peach",
              "lender",
              "externalAPI"
            ],
            "readOnly": true,
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "inactive"
            ],
            "readOnly": true,
            "type": "string"
          },
          "suffix": {
            "description": "A person's name suffix.",
            "maxLength": 5,
            "nullable": true,
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "firstName",
          "lastName"
        ],
        "type": "object"
      },
      "PersonNoIdentity": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePersonNoIdentity"
          },
          {
            "properties": {
              "dateOfBirth": {
                "description": "The date of birth. All times are in UTC.",
                "format": "date",
                "nullable": true,
                "type": "string"
              },
              "name": {
                "$ref": "#/components/schemas/NameNotNullable"
              },
              "object": {
                "default": "person",
                "enum": [
                  "person"
                ],
                "readOnly": true,
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "Person"
      },
      "IdentityBase": {
        "description": "The borrower's identifier. For example, the Social Security number.\n",
        "properties": {
          "createdAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "customIdentityTypeName": {
            "description": "The name of a personal or business ID. Required if `identityType=customID`. This needs to be \"one word\"\nonly US (a-zA-Z) letters. No numbers.\n\nFor example: Metrica Consular Card for Mexicans living abroad.\n- `identityType=customID`\n- `customIdentityTypeName=metricaConsularCard`\n",
            "maxLength": 50,
            "minLength": 1,
            "pattern": "^[a-zA-Z]+$",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "expirationDate": {
            "description": "Date the identification expires.\n",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "string"
          },
          "identityType": {
            "description": "Personal and business identifiers that are supported.\n`customID` can be used for personal or business IDs that are not explicitly listed as one of the enum values.\nIf you pass `identityType=customID`, a `customIdentityTypeName` is also required.\n\nFor example: Metrica Consular Card for Mexicans living abroad.\n- `identityType=customID`\n- `customIdentityTypeName=metricaConsularCard`\n",
            "enum": [
              "SSN",
              "ITIN",
              "passport",
              "driversLicense",
              "taxID",
              "FEIN",
              "stateID",
              "customID"
            ],
            "type": "string"
          },
          "issueDate": {
            "description": "Date the identification was issued.\n",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "issuingCountry": {
            "default": "",
            "description": "Country that issued the identification. English short name according to ISO 3166-1 standard.\n",
            "type": "string"
          },
          "object": {
            "default": "identity",
            "enum": [
              "identity"
            ],
            "readOnly": true,
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "valid": {
            "default": true,
            "description": "Whether the identity is valid.\n",
            "type": "boolean"
          },
          "value": {
            "description": "The value of a personal identifier. For example, *123456789*.\n",
            "type": "string"
          }
        },
        "type": "object"
      },
      "IdentityPut": {
        "allOf": [
          {
            "$ref": "#/components/schemas/IdentityBase"
          },
          {
            "properties": {
              "isArchived": {
                "description": "Determines whether the identity has been archived. By default, only non-archived\nidentities are shown. Cannot be changed for primary identities.\n",
                "type": "boolean"
              }
            },
            "type": "object"
          }
        ]
      },
      "Identity": {
        "allOf": [
          {
            "$ref": "#/components/schemas/IdentityPut"
          },
          {
            "properties": {
              "isPrimary": {
                "default": false,
                "description": "Whether the identity is the borrower's primary identity or not. A borrower may\nonly have one primary identity. Primary identities can be created when\ncreating a borrower, or separately.\n",
                "type": "boolean"
              }
            },
            "type": "object"
          }
        ]
      },
      "Person": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PersonNoIdentity"
          },
          {
            "properties": {
              "identities": {
                "items": {
                  "$ref": "#/components/schemas/Identity"
                },
                "readOnly": true,
                "type": "array"
              },
              "identity": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/IdentityBase"
                  },
                  {
                    "required": [
                      "identityType",
                      "value"
                    ],
                    "type": "object",
                    "writeOnly": true
                  }
                ]
              }
            },
            "required": [
              "name"
            ],
            "type": "object"
          }
        ],
        "title": "Person"
      },
      "BusinessDetails": {
        "description": "The business details.",
        "properties": {
          "businessLegalName": {
            "description": "The business' legal name.",
            "type": "string"
          },
          "businessName": {
            "description": "The business' name or DBA.",
            "type": "string"
          },
          "businessType": {
            "description": "The business type.",
            "enum": [
              "LLC",
              "cCorporation",
              "sCorporation",
              "generalPartnership",
              "limitedPartnership",
              "soleProprietor",
              "nonProfit",
              "other",
              "cooperative",
              "independentContractor",
              "selfEmployed",
              "veteransOrganization",
              "tribalBusiness",
              "soleTrader",
              "incorporatedAssociation",
              "unincorporatedAssociation",
              "trust",
              "unitTrust",
              "appointorTrust"
            ],
            "type": "string"
          },
          "incorporatedCountry": {
            "description": "The country where the business was incorporated or organized. English short name according to ISO 3166-1 standard.",
            "type": "string"
          },
          "incorporatedState": {
            "description": "The state or province code (not full name) where the business was incorporated or organized. For example: CA.\n",
            "type": "string"
          }
        },
        "required": [
          "businessType",
          "businessName",
          "businessLegalName"
        ],
        "type": "object"
      },
      "BusinessNoIdentity": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePersonNoIdentity"
          },
          {
            "properties": {
              "businessDetails": {
                "$ref": "#/components/schemas/BusinessDetails"
              },
              "object": {
                "default": "business",
                "enum": [
                  "business"
                ],
                "readOnly": true,
                "type": "string"
              }
            },
            "required": [
              "businessDetails"
            ],
            "type": "object"
          }
        ],
        "title": "Business"
      },
      "Business": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BusinessNoIdentity"
          },
          {
            "properties": {
              "identities": {
                "items": {
                  "$ref": "#/components/schemas/Identity"
                },
                "readOnly": true,
                "type": "array"
              },
              "identity": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/IdentityBase"
                  },
                  {
                    "required": [
                      "identityType",
                      "value"
                    ],
                    "type": "object",
                    "writeOnly": true
                  }
                ]
              }
            },
            "type": "object"
          }
        ],
        "title": "Business"
      },
      "Borrower": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/Person"
          },
          {
            "$ref": "#/components/schemas/Business"
          }
        ]
      },
      "TransactionCancelReason": {
        "default": "canceledByUser",
        "description": "Why the transaction was canceled.",
        "enum": [
          "invalidPaymentMethod",
          "paymentMethodRemoved",
          "tooManyFailedAttempts",
          "loanFrozen",
          "loanAccelerated",
          "loanChargedOff",
          "loanPaidOff",
          "canceledByUser",
          "loanTermsChanged",
          "balanceCheckThresholdExceeded"
        ],
        "nullable": true,
        "type": "string"
      },
      "HoldDaysEndDate": {
        "description": "Allows lenders to configure the `openToBuyAmount` calculation. Peach's system will not include the transaction in\nthe `openToBuyAmount` calculation until this date (in the product timezone). For example, if a transaction's `holdDaysEndDate` is tomorrow or\nlater, the transaction will NOT be included in the `openToBuyAmount` calculation.\nSetting this value will override `loan.paymentHoldDays.numHoldDays` and `loanType.paymentHoldDays.numHoldDays`.\n\nIf `holdDaysEndDate` is not set upon transaction create, the `holdDaysEndDate` will be calculated based on\n`loan.paymentHoldDays.numHoldDays`.\n\nIf `loan.paymentHoldDays.numHoldDays` is not set, `holdDaysEndDate` will be calculated based on\n`loanType.paymentHoldDays.numHoldDays`.\nThis will only apply to borrower payments and is not applicable for other types of transactions (e.g. service credits)\n",
        "format": "date",
        "nullable": true,
        "type": "string"
      },
      "TransactionStatus": {
        "description": "The transaction status.\n\n - `scheduled` - payment or credit was scheduled for a future date that has not arrived yet. The payment has not applied to a loan yet.\n - `initiated` - payment was initiated and sent to a payment processor. The payment is applied to a loan. This status is used normally for ACH.\n - `pending` - payment was acknowledged by the payment processor and is being processed. For ACH the payment can be in pending status for a few days.\n - `succeeded` - payment was completed successfully.\n - `failed` - payment failed and was removed from the loan effective as of `initiated`, `pending` or `succeeded` status effective date. The system replays the loan as if the payment never happened.\n    It will also re-accrue interest since then.\n - `inDispute` - payment is in dispute (typically because of chargeback). The payment is removed from the loan effective as of `initiated`, `pending` or `succeeded` status effective date. The system replays the loan as if the payment never happened.\n   It will also re-accrue interest since then. Disputed payment can be for partial amount.\n - `canceled` - payment or credit was canceled. Payment can be canceled only if the current status is `scheduled`.\n - `chargeback` - payment was disputed and ruled against the lender. The payment was returned to the original payment instrument. Chargeback payment can be for partial amount.\n\nIn order to create or update transactions to have status `inDispute` or `chargeback`, the `Create transaction chargeback` and `Update chargeback` endpoints should be used.\n",
        "enum": [
          "scheduled",
          "initiated",
          "pending",
          "succeeded",
          "failed",
          "canceled"
        ],
        "type": "string"
      },
      "BaseTransaction": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseWithExternalIdMixin"
          },
          {
            "properties": {
              "achConfirmed": {
                "description": "Applies to ACH transactions processed by Peach. Set to `true` when the originating bank has confirmed receipt of the transaction.\n",
                "nullable": true,
                "readOnly": true,
                "type": "boolean"
              },
              "achProcessedSameDay": {
                "description": "The transaction was processed with ACH Same Day.\n",
                "nullable": true,
                "readOnly": true,
                "type": "boolean"
              },
              "achReturnCode": {
                "description": "The ACH return code indicating the reason the transaction failed.",
                "maxLength": 5,
                "type": "string"
              },
              "achSameDay": {
                "description": "Attempt to process this transaction with ACH Same Day processing.\n",
                "nullable": true,
                "readOnly": true,
                "type": "boolean"
              },
              "actualAmount": {
                "description": "The actual amount that was processed. The system never debits\nmore than the loan outstanding balance.\n",
                "format": "float",
                "type": "number"
              },
              "avsResult": {
                "maxLength": 1,
                "minLength": 1,
                "type": "string"
              },
              "cancelLongDescription": {
                "description": "More detailed reason why the transaction was canceled.\n",
                "readOnly": true,
                "type": "string"
              },
              "cancelReason": {
                "$ref": "#/components/schemas/TransactionCancelReason"
              },
              "cancelShortDescription": {
                "description": "Brief reason why the transaction was canceled.\n",
                "readOnly": true,
                "type": "string"
              },
              "createdBy": {
                "$ref": "#/components/schemas/UserActionInfo",
                "description": "Details of the user responsible for creating the transaction.\nCan be an borrower, agent, or automated system process.\n"
              },
              "currency": {
                "description": "Currency of the transaction.",
                "pattern": "[A-Z]{3}",
                "type": "string"
              },
              "customDisplayName": {
                "description": "A friendly description of the transaction. If provided, this value will be displayed in Peach UI/App and Statements (or can be used by lender in their App). If the value is not provided, the Peach UI/App and Statements logic will render the transaction name based on type and status. Make sure you provide value that makes sense to the borrower.\nThis is NOT what the borrower will see in their online bank or card account.\n",
                "nullable": true,
                "type": "string"
              },
              "failureDescriptionLong": {
                "description": "Detailed text describing the failure reason and any appropriate actions the user may take to fix the issue.\n",
                "readOnly": true,
                "type": "string"
              },
              "failureDescriptionShort": {
                "description": "Short text describing the failure reason. Normally displayed in UI.\n",
                "readOnly": true,
                "type": "string"
              },
              "failureReason": {
                "description": "The transaction failure reason.",
                "enum": [
                  "insufficientFunds",
                  "chargeback",
                  "accountClosed",
                  "invalidAccount",
                  "unknownReason",
                  "invalidCvv",
                  "invalidExpirationDate",
                  "avsFailed",
                  "networkError",
                  "cardDeclined",
                  "accountFrozen",
                  "deceased",
                  "invalidRouting",
                  "paymentStopped",
                  "incorrectNumber",
                  "fraudulent",
                  "unauthorizedDebit"
                ],
                "type": "string"
              },
              "holdDaysEndDate": {
                "$ref": "#/components/schemas/HoldDaysEndDate"
              },
              "metaData": {
                "description": "Store any type of key/value pairs in the form of a JSON dictionary.",
                "nullable": true,
                "type": "object"
              },
              "parentTransactionId": {
                "description": "The ID of the real transactions that created this virtual transaction. Only relevant for virtual transactions.",
                "type": "string"
              },
              "paymentDetails": {
                "description": "Payment details.",
                "properties": {
                  "fromInstrument": {
                    "oneOf": [
                      {
                        "properties": {
                          "accountNumberLastFour": {
                            "description": "The last two, three or four digits of the account number.\nNormally, you should expect four digits. Two or three digits are returned when four digits are not available.\n",
                            "pattern": "^[0-9]{2,4}",
                            "readOnly": true,
                            "type": "string"
                          },
                          "instrumentType": {
                            "enum": [
                              "bankAccount"
                            ],
                            "type": "string"
                          }
                        },
                        "title": "Bank Account",
                        "type": "object"
                      },
                      {
                        "properties": {
                          "cardNumberLastFour": {
                            "description": "The last two, three or four digits of the card number.\nNormally, you should expect four digits. Two or three digits are returned when four digits are not available.\n",
                            "example": "1111",
                            "pattern": "^[0-9]{2,4}",
                            "readOnly": true,
                            "type": "string"
                          },
                          "cardType": {
                            "description": "The type of card. Requires permission `payment.instrument:force`.",
                            "enum": [
                              "credit",
                              "debit"
                            ],
                            "type": "string"
                          },
                          "instrumentType": {
                            "enum": [
                              "card"
                            ],
                            "type": "string"
                          }
                        },
                        "title": "Card",
                        "type": "object"
                      },
                      {
                        "properties": {
                          "accountNumberLastFour": {
                            "description": "The last two, three or four digits of the account number.\nNormally, you should expect four digits. Two or three digits are returned when four digits are not available.\n",
                            "pattern": "^[0-9]{2,4}",
                            "readOnly": true,
                            "type": "string"
                          },
                          "checkNumber": {
                            "description": "The check number",
                            "example": "1025",
                            "readOnly": true,
                            "type": "string"
                          },
                          "instrumentType": {
                            "enum": [
                              "check"
                            ],
                            "type": "string"
                          },
                          "routingNumber": {
                            "description": "The check routing number",
                            "example": "000000000",
                            "readOnly": true,
                            "type": "string"
                          }
                        },
                        "title": "Check",
                        "type": "object"
                      },
                      {
                        "properties": {
                          "employerName": {
                            "description": "The employer name",
                            "type": "string"
                          },
                          "instrumentType": {
                            "enum": [
                              "payroll"
                            ],
                            "type": "string"
                          }
                        },
                        "title": "Payroll",
                        "type": "object"
                      },
                      {
                        "properties": {
                          "instrumentType": {
                            "enum": [
                              "paymentNetwork"
                            ],
                            "type": "string"
                          },
                          "paymentNetworkMemberId": {
                            "description": "The borrower identifier in the payment network system.",
                            "type": "string"
                          },
                          "paymentNetworkName": {
                            "description": "The payment network name",
                            "type": "string"
                          }
                        },
                        "title": "Payment Network",
                        "type": "object"
                      },
                      {
                        "properties": {
                          "instrumentType": {
                            "enum": [
                              "wire"
                            ],
                            "type": "string"
                          },
                          "routingNumber": {
                            "description": "The wire routing number",
                            "type": "string"
                          },
                          "wireNumberLastFour": {
                            "description": "The last two, three or four digits of the wire number. Normally, you should expect four digits. Two or three digits are returned when four digits are not available.",
                            "pattern": "^[0-9]{2,4}",
                            "readOnly": true,
                            "type": "string"
                          }
                        },
                        "title": "Wire",
                        "type": "object"
                      },
                      {
                        "properties": {
                          "instrumentType": {
                            "enum": [
                              "moneyOrder"
                            ],
                            "type": "string"
                          },
                          "routingNumber": {
                            "description": "The money order routing number",
                            "type": "string"
                          },
                          "serialNumberLastFour": {
                            "description": "The last two, three or four digits of the money order serial number. Normally, you should expect four digits. Two or three digits are returned when four digits are not available.",
                            "pattern": "^[0-9]{2,4}",
                            "type": "string"
                          }
                        },
                        "title": "Money Order",
                        "type": "object"
                      }
                    ]
                  },
                  "fromInstrumentId": {
                    "description": "The identifier of the payment instrument that was charged.",
                    "pattern": "^ext-|^\\d+$",
                    "type": "string"
                  },
                  "reason": {
                    "description": "The reason why the payment was created.",
                    "enum": [
                      "autoPay",
                      "oneTimePayment",
                      "settlement",
                      "reversal",
                      "reimbursement"
                    ],
                    "type": "string"
                  },
                  "toInstrument": {
                    "oneOf": [
                      {
                        "properties": {
                          "accountNumberLastFour": {
                            "description": "The last two, three or four digits of the account number.\nNormally, you should expect four digits. Two or three digits are returned when four digits are not available.\n",
                            "pattern": "^[0-9]{2,4}",
                            "readOnly": true,
                            "type": "string"
                          },
                          "instrumentType": {
                            "enum": [
                              "bankAccount"
                            ],
                            "type": "string"
                          }
                        },
                        "title": "Bank Account",
                        "type": "object"
                      },
                      {
                        "properties": {
                          "accountNumberLastFour": {
                            "description": "The last two, three or four digits of the account number.\nNormally, you should expect four digits. Two or three digits are returned when four digits are not available.\n",
                            "pattern": "^[0-9]{2,4}",
                            "readOnly": true,
                            "type": "string"
                          },
                          "instrumentType": {
                            "enum": [
                              "check"
                            ],
                            "type": "string"
                          }
                        },
                        "title": "Check",
                        "type": "object"
                      },
                      {
                        "properties": {
                          "employerName": {
                            "description": "The employer name",
                            "type": "string"
                          },
                          "instrumentType": {
                            "enum": [
                              "payroll"
                            ],
                            "type": "string"
                          }
                        },
                        "title": "Payroll",
                        "type": "object"
                      },
                      {
                        "properties": {
                          "instrumentType": {
                            "enum": [
                              "paymentNetwork"
                            ],
                            "type": "string"
                          },
                          "paymentNetworkMemberId": {
                            "description": "The borrower identifier in the payment network system.",
                            "type": "string"
                          },
                          "paymentNetworkName": {
                            "description": "The payment network name",
                            "type": "string"
                          }
                        },
                        "title": "Payment Network",
                        "type": "object"
                      },
                      {
                        "properties": {
                          "instrumentType": {
                            "enum": [
                              "wire"
                            ],
                            "type": "string"
                          },
                          "routingNumber": {
                            "description": "The wire routing number",
                            "type": "string"
                          },
                          "wireNumberLastFour": {
                            "description": "The last two, three or four digits of the wire number.\nNormally, you should expect four digits. Two or three digits are returned when four digits are not available.\n",
                            "pattern": "^[0-9]{2,4}",
                            "readOnly": true,
                            "type": "string"
                          }
                        },
                        "title": "Wire",
                        "type": "object"
                      },
                      {
                        "properties": {
                          "instrumentType": {
                            "enum": [
                              "moneyOrder"
                            ],
                            "type": "string"
                          },
                          "routingNumber": {
                            "description": "The money order routing number",
                            "type": "string"
                          },
                          "serialNumberLastFour": {
                            "description": "The last two, three or four digits of the money order serial number.\nNormally, you should expect four digits. Two or three digits are returned when four digits are not available.\n",
                            "pattern": "^[0-9]{2,4}",
                            "type": "string"
                          }
                        },
                        "title": "Money Order",
                        "type": "object"
                      }
                    ]
                  },
                  "toInstrumentId": {
                    "description": "The identifier of the payment instrument that was credited.",
                    "pattern": "^ext-|^\\d+$",
                    "type": "string"
                  },
                  "type": {
                    "description": "The payment type.",
                    "enum": [
                      "ach",
                      "debitCard",
                      "creditCard",
                      "check",
                      "cash",
                      "payroll",
                      "paymentNetwork",
                      "moneyOrder",
                      "wire"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "processingFeeAmount": {
                "description": "Transaction processing fees that are charged by a payment processor.",
                "type": "number"
              },
              "processingFeeType": {
                "description": "Describes whether the processing fees are net or gross.\nIf it is a net fee, the amount of the fee is deducted from the amount of the transaction 'en route'.\nIf it is a gross fee, the amount of the fee is charged by the processor at the end the month.\n",
                "enum": [
                  "net",
                  "gross"
                ],
                "type": "string"
              },
              "processorFailureDetails": {
                "description": "The error details returned by the payment processor."
              },
              "processorFailureReason": {
                "description": "The raw failure reason returned by the payment processor.",
                "type": "string"
              },
              "processorMerchantId": {
                "description": "Applies to card transactions processed by Peach. The merchant ID used for processing a card transaction.\n",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "processorReconciliationId": {
                "type": "string"
              },
              "processorReversalId": {
                "type": "string"
              },
              "processorTransactionId": {
                "type": "string"
              },
              "retryAttempt": {
                "description": "Number of attempts to retry processing a failed transaction.\n",
                "nullable": true,
                "type": "integer"
              },
              "retryOriginalTransactionId": {
                "description": "The Peach identifier for the original transaction for which this is a retry.\n",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "reversedAmount": {
                "description": "The total amount of reversals associated with this transaction. See `reversedByTransactionIds` for reversal transaction details.\nThis amount is calculated by Peach and cannot be set or updated via API.\n",
                "format": "float",
                "readOnly": true,
                "type": "number"
              },
              "reversedByTransactionExternalId": {
                "description": "**DEPRECATED ATTRIBUTE** Use `reversedByTransactionIds` to obtain external IDs of all reversing transactions\n\nLender's external identifier of the transaction that reverses this one.\n",
                "pattern": "^ext-|^\\d+$",
                "readOnly": true,
                "type": "string"
              },
              "reversedByTransactionId": {
                "description": "**DEPRECATED ATTRIBUTE** Use `reversedByTransactionIds` to obtain IDs of all reversing transactions.\n\nPeach identifier of the transaction that reverses this one.\n",
                "readOnly": true,
                "type": "string"
              },
              "reversedByTransactionIds": {
                "description": "Identifier(s) of the transaction(s) that reverse this one",
                "items": {
                  "properties": {
                    "externalId": {
                      "description": "Lender's external identifier of the transaction that reverses this one.",
                      "pattern": "^ext-|^\\d+$",
                      "type": "string"
                    },
                    "id": {
                      "description": "Peach identifier of the transaction that reverses this one",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "readOnly": true,
                "type": "array"
              },
              "reversesTransactionExternalId": {
                "description": "The `externalId` of the original transaction that is being fully or partially reversed by this transaction.",
                "readOnly": true,
                "type": "string"
              },
              "reversesTransactionId": {
                "description": "The `id` of the original transaction that is being fully or partially reversed by this transaction.",
                "readOnly": true,
                "type": "string"
              },
              "scheduledAmount": {
                "description": "The scheduled amount. The actual amount charged can be lower from the\nscheduled amount. It cannot be higher.\n",
                "format": "float",
                "type": "number"
              },
              "status": {
                "$ref": "#/components/schemas/TransactionStatus"
              },
              "timestamps": {
                "description": "Timestamps of the transaction statuses.",
                "properties": {
                  "appliedAt": {
                    "description": "The effective date and time the transaction was applied to the loan.\nThis matches the effective date and time of the ledger entries resulting from applying the transaction.\nIf this value is null, the transaction has not been applied.\n",
                    "format": "date-time",
                    "readOnly": true,
                    "type": "string"
                  },
                  "canceledAt": {
                    "description": "The date and time the transaction transitioned to the `canceled` status.\nSee `status` for more information.\n",
                    "format": "date-time",
                    "type": "string"
                  },
                  "chargebackAt": {
                    "description": "The date and time the transaction transitioned to the `chargeback` status.\nSee `status` for more information.\n",
                    "format": "date-time",
                    "type": "string"
                  },
                  "createdAt": {
                    "description": "The date and time the transaction was created.\n",
                    "format": "date-time",
                    "readOnly": true,
                    "type": "string"
                  },
                  "deletedAt": {
                    "description": "If this field is not null, the transaction is considered deleted. The date and time the transaction was deleted.\n",
                    "format": "date-time",
                    "nullable": true,
                    "readOnly": true,
                    "type": "string"
                  },
                  "displayDate": {
                    "description": "The display date of the transaction in the product timezone.\nThis determines the placement of the transaction on the timeline displayed in the borrower portal.\nIn some instances, this will differ from the `effectiveDate` of the transaction. For example, when a reversal transaction is created,\nthe `effectiveDate` of the reversal matches the original transaction, but the `displayDate` of the reversal is the date on which the reversal was processed.\n",
                    "format": "date",
                    "type": "string"
                  },
                  "effectiveDate": {
                    "description": "The effective date of the transaction in the product timezone. Updated when a transaction is backdated.",
                    "format": "date",
                    "type": "string"
                  },
                  "failedAt": {
                    "description": "The date and time the transaction transitioned to the `failed` status.\nSee `status` for more information.\n",
                    "format": "date-time",
                    "type": "string"
                  },
                  "inDisputeAt": {
                    "description": "The date and time the transaction transitioned to the `inDispute` status.\nSee `status` for more information.\n",
                    "format": "date-time",
                    "type": "string"
                  },
                  "initiatedAt": {
                    "description": "The date and time the transaction transitioned to the `initiated` status.\nSee `status` for more information.\n",
                    "format": "date-time",
                    "type": "string"
                  },
                  "originalDisplayDate": {
                    "format": "date",
                    "readOnly": true,
                    "type": "string"
                  },
                  "originalEffectiveDate": {
                    "description": "The original effective date of the transaction in the product timezone, prior to any backdating of the transaction.",
                    "format": "date",
                    "readOnly": true,
                    "type": "string"
                  },
                  "pendingAt": {
                    "description": "The date and time the transaction transitioned to the `pending` status.\nSee `status` for more information.\n",
                    "format": "date-time",
                    "type": "string"
                  },
                  "scheduledDate": {
                    "description": "The scheduled date of the transaction in the product timezone.\nTransactions to be processed by peach will be processed on this date.\n",
                    "format": "date",
                    "type": "string"
                  },
                  "succeededAt": {
                    "description": "The date and time the transaction transitioned to the `succeeded` status.\nSee `status` for more information.\n",
                    "format": "date-time",
                    "type": "string"
                  },
                  "updatedAt": {
                    "description": "The date and time the transaction was last updated.\n",
                    "format": "date-time",
                    "nullable": true,
                    "readOnly": true,
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "transactionType": {
                "description": "The transaction type.\n\n`payment` - payment made by the borrower or by a service agent per borrower request.\nCan be one-time payment, future payment or Autopay.\nSuccessful payments reduce loan balance.\n\n`serviceCredit` - service credit issued by a service agent or supervisor. Successful service\ncredits reduce loan balance.\n",
                "enum": [
                  "payment",
                  "serviceCredit"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "Transaction"
      },
      "ChargebackStatus": {
        "default": "open",
        "description": "The status of the chargeback.\n  - `open` -  the chargeback was opened and is currently in dispute. The system assumes that the chargeback amount is temporarily taken and the\n    `effectiveAmount` of the transaction is reduced by the chargeback amount. This might trigger a replay.\n  - `closed` - the chargeback dispute period has closed, and the chargeback has been upheld. This is a terminal state and the chargeback cannot\n    be reopened. The system assumes that the chargeback amount is permanently taken and the `effectiveAmount` of the transaction is reduced.\n  - `reversed` - the chargeback dispute period has closed, and the chargeback has been reversed. The system assumes that the chargeback amount\n    is permanently returned and the `effectiveAmount` of the transaction is increased back. This might trigger a replay.\n\nThe chargeback status impacts the transaction status is the following way:\n\nFor a transaction with a single chargeback, the chargeback status dictates the transaction status:\n  - chargeback`status:open` → transaction `status:inDispute`\n  - chargeback`status:closed` → transaction `status:chargeback`\n  - chargeback`status:reversed` → transaction `status:succeeded`\n\nFor a transaction with multiple chargebacks, the following logic applied:\n  - Any of the chargebacks in `status:open` → transaction `status:inDispute`\n  - No chargebacks are in `status:open`, and any chargebacks are in `status:closed` → transaction `status:chargeback`\n  - All chargebacks are in `status:reversed`→ transaction `status:succeeded`\n",
        "enum": [
          "open",
          "closed",
          "reversed"
        ],
        "type": "string"
      },
      "Chargeback": {
        "properties": {
          "amount": {
            "description": "The amount of the chargeback. Defaults to the `actualAmount` of the transaction.",
            "format": "float",
            "type": "number"
          },
          "caseId": {
            "description": "The identifier of an existing case.",
            "type": "string"
          },
          "category": {
            "description": "The chargeback category as received from the payment processor.",
            "type": "string"
          },
          "description": {
            "description": "The description of the chargeback as received from the payment processor.",
            "type": "string"
          },
          "externalCaseNumber": {
            "description": "The external case number of the chargeback in the payment processor system.",
            "type": "string"
          },
          "externalId": {
            "description": "The lender's identifier of the chargeback.",
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "The identifier of the chargeback.",
            "readOnly": true,
            "type": "string"
          },
          "reasonCode": {
            "description": "The reason code as received from the payment processor.",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ChargebackStatus"
          }
        },
        "type": "object"
      },
      "serviceCreditTypes": {
        "enum": [
          "serviceAgent",
          "serviceSupervisor",
          "settlementOfDebt",
          "balanceTransfer",
          "rewards",
          "fraud",
          "badDebt",
          "bankruptcy",
          "deceased",
          "usuryCap",
          "refund",
          "interestAdjustment",
          "rounding"
        ],
        "type": "string"
      },
      "NormalTransaction": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseTransaction"
          },
          {
            "properties": {
              "chargebackAmount": {
                "description": "The total amount of all Open and Closed chargebacks on this transaction.\n",
                "format": "float",
                "nullable": true,
                "readOnly": true,
                "type": "number"
              },
              "chargebackDetails": {
                "items": {
                  "$ref": "#/components/schemas/Chargeback"
                },
                "readOnly": true,
                "type": "array"
              },
              "effectiveAmount": {
                "description": "The net/effective amount of the transaction after taking into account chargebacks, reversals, and disputes. The amount is calculated as:\n`effectiveAmount = actualAmount - reversedAmount - chargebackAmount`\nThis amount is calculated by Peach and cannot be set or updated via API.\n",
                "format": "float",
                "readOnly": true,
                "type": "number"
              },
              "isExternal": {
                "type": "boolean"
              },
              "isVirtual": {
                "type": "boolean"
              },
              "paidFeesAmount": {
                "format": "float",
                "type": "number"
              },
              "paidInterestAmount": {
                "format": "float",
                "type": "number"
              },
              "paidOverAmount": {
                "format": "float",
                "type": "number"
              },
              "paidPrincipalAmount": {
                "format": "float",
                "type": "number"
              },
              "serviceCreditDetails": {
                "description": "Information about credit.",
                "properties": {
                  "reason": {
                    "description": "The reason why the payment was created.",
                    "enum": [
                      "oneTimePayment",
                      "reversal"
                    ],
                    "type": "string"
                  },
                  "sponsor": {
                    "description": "Sponsor of the credit. Mainly used for ledger/accounting.\n\nIf `loanOwner`, the credit is recorded as expense in ledger/accounting.\n\nIf `loanServicer`, the credit is recorded as liability from the servicer.\n\nIf `merchant`, the credit is recorded as liability from the merchant.\n",
                    "enum": [
                      "loanOwner",
                      "loanServicer",
                      "merchant"
                    ],
                    "type": "string"
                  },
                  "type": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/serviceCreditTypes"
                      },
                      {
                        "description": "Type of the credit. Credit types are recorded differently in ledger/accounting."
                      }
                    ]
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          }
        ]
      },
      "Transaction": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NormalTransaction"
          },
          {
            "properties": {
              "autopayPaymentIds": {
                "description": "Peach identifiers of the autopay expected payments.",
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              "autopayPlanId": {
                "description": "Peach identifier of the autopay plan.",
                "type": "string"
              },
              "consentDocumentId": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AnyId"
                  },
                  {
                    "writeOnly": false
                  },
                  {
                    "description": "The document ID of a one-time payment consent given by the\nborrower to debit their payment instrument.  The document is\nstored in the HTML format and contains the disclosure shown to\nthe borrower at the time of the payment.  Required if\n`previewMode=false` and Peach is processing payments (aka\n`isExternal=false`) on behalf of the lender.\n"
                  }
                ]
              },
              "drawId": {
                "description": "The draw identifier for the transaction.\n",
                "type": "string"
              },
              "enablePrepayments": {
                "description": "**DEPRECATED ATTRIBUTE**\n`true` if the borrower opts to apply any overpayment amount to prepayment of future obligations.\n`false` if the borrower opts to apply overpayments to the current obligation.\n\nIf this field is not passed, we reference the `allowPrepayments` configuration on the loan type.\n",
                "type": "boolean"
              },
              "evidenceDocumentId": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AnyId"
                  },
                  {
                    "writeOnly": false
                  },
                  {
                    "description": "The document ID of a one-time payment consent screenshot\ncaptured when a borrower made the payment.  Only applicable when\nPeach App is used and company's\n`config.evidence.captureScreenshot=true`.\n"
                  }
                ]
              },
              "initiatingBorrowerId": {
                "description": "The ID of the borrower who initiated the transaction.\n",
                "nullable": true,
                "type": "string"
              },
              "isExternal": {
                "description": "A transaction marked `isExternal=true` is for record purposes only. A transaction with\nan external `paymentInstrument` is automatically marked external.\n"
              },
              "isVirtual": {
                "description": "A transaction marked `isVirtual=true` is not a real transaction, but represents a part of another transaction.\nThis is used to store the principal/interest split on draws in Line of Credits as well as splits between multiple\ninstallment loans that were applied as a single payment.\n"
              },
              "loanId": {
                "description": "The unique identifier of the Loan.\n",
                "type": "string"
              },
              "mainBorrowerId": {
                "description": "The Peach identifier for the main borrower on the loan.\n",
                "type": "string"
              },
              "paidFeesAmount": {
                "description": "The paid rounded amount allocated to fees\n"
              },
              "paidInterestAmount": {
                "description": "The paid rounded amount allocated to interest\n"
              },
              "paidOverAmount": {
                "description": "Stores any excess rounded amount that was not allocated to principal, interest or fees.\n"
              },
              "paidPrincipalAmount": {
                "description": "The paid rounded amount allocated to principal\n"
              },
              "unroundedPaidFeesAmount": {
                "description": "The paid unrounded amount allocated to fees\n",
                "format": "float",
                "type": "number"
              },
              "unroundedPaidInterestAmount": {
                "description": "The paid unrounded amount allocated to interest\n",
                "format": "float",
                "type": "number"
              },
              "unroundedPaidOverAmount": {
                "description": "Stores any excess unrounded amount that was not allocated to principal, interest or fees.\n",
                "format": "float",
                "type": "number"
              },
              "unroundedPaidPrincipalAmount": {
                "description": "The paid unrounded amount allocated to principal\n",
                "format": "float",
                "type": "number"
              }
            },
            "type": "object"
          }
        ]
      },
      "ContextVarLoanDataSource": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Loan"
          },
          {
            "properties": {
              "autopayData": {
                "description": "Autopay payment information. (Schema TBD)",
                "type": "object"
              },
              "balances": {
                "$ref": "#/components/schemas/Balances"
              },
              "creditReporting": {
                "description": "Credit reporting data",
                "properties": {
                  "creditAgencies": {
                    "items": {
                      "properties": {
                        "agencyName": {
                          "description": "Name of the credit agency",
                          "type": "string"
                        },
                        "reportingStartDate": {
                          "description": "Date the loan started reporting to the agency",
                          "format": "date",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "isReporting": {
                    "type": "boolean"
                  }
                },
                "type": "object"
              },
              "daysOverdue": {
                "description": "Number of days the loan is overdue",
                "type": "integer"
              },
              "daysToChargeOff": {
                "description": "Number of days to charge off the loan",
                "type": "integer"
              },
              "futureBalances": {
                "$ref": "#/components/schemas/FutureBalances"
              },
              "investors": {
                "description": "List of loan investors. (Schema TBD)",
                "items": {
                  "type": "object"
                },
                "type": "array"
              },
              "loanType": {
                "$ref": "#/components/schemas/LoanType"
              },
              "overdueAmount": {
                "description": "Amount overdue",
                "type": "integer"
              },
              "overdueSummary": {
                "description": "Summary of overdue information",
                "properties": {
                  "daysOverdue": {
                    "description": "Number of days the loan is overdue",
                    "type": "integer"
                  },
                  "isOverdue": {
                    "description": "Is the loan overdue",
                    "type": "boolean"
                  },
                  "overdueAmount": {
                    "description": "Amount overdue",
                    "type": "integer"
                  }
                },
                "type": "object"
              },
              "people": {
                "description": "List of people associated with the loa",
                "items": {
                  "$ref": "#/components/schemas/Borrower"
                },
                "type": "array"
              },
              "transactions": {
                "items": {
                  "$ref": "#/components/schemas/Transaction"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "ContextVarPaymentAmount": {
        "description": "The amount of the payment",
        "multipleOf": 0.01,
        "type": "number"
      },
      "ContextVarPaymentDueDate": {
        "description": "The due date of the payment",
        "format": "date",
        "type": "string"
      },
      "ContextVarPaymentMethod": {
        "description": "The payment method",
        "enum": [
          "bankAccount",
          "card",
          "check",
          "payroll",
          "paymentNetwork",
          "moneyOrder",
          "wire"
        ],
        "type": "string"
      },
      "ContextVarPaymentMethodLastFour": {
        "description": "The last four digits of the payment method",
        "type": "string"
      },
      "ContextVarPerson": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Borrower"
          },
          {
            "properties": {
              "address": {
                "$ref": "#/components/schemas/Address"
              }
            },
            "type": "object"
          }
        ]
      },
      "AvailableTemplateContextSubjectAutopayAmountChanged": {
        "description": "### Sent When\n- Trigger: Autopay amount increased more then X%\n- When: 9am PST\n  \nThe context variables included by system when it sends `autopayAmountChanged`\n",
        "properties": {
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "extraCharge": {
            "description": "The additional charge above the original autopay amount.\n",
            "type": "number"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "paymentAmount": {
            "$ref": "#/components/schemas/ContextVarPaymentAmount"
          },
          "paymentDueDate": {
            "$ref": "#/components/schemas/ContextVarPaymentDueDate"
          },
          "paymentMethod": {
            "$ref": "#/components/schemas/ContextVarPaymentMethod"
          },
          "paymentMethodLastFour": {
            "$ref": "#/components/schemas/ContextVarPaymentMethodLastFour"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "autopayAmountChanged",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AutopayCancelReason": {
        "description": "Why the autopay was canceled.",
        "enum": [
          "invalidPaymentMethod",
          "paymentMethodRemoved",
          "tooManyFailedAttempts",
          "loanFrozen",
          "loanAccelerated",
          "loanChargedOff",
          "loanPaidOff",
          "canceledByUser",
          "loanTermsChanged"
        ],
        "nullable": true,
        "type": "string"
      },
      "AvailableTemplateContextSubjectAutopayCanceledBySystem": {
        "description": "### Sent When\n- Trigger: Autopay was canceled by the system because payment instrument became invalid or loan terms changed.\n- When: Immediately\n  \nThe context variables included by system when it sends `autopayCanceledBySystem`\n",
        "properties": {
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "paymentMethod": {
            "$ref": "#/components/schemas/ContextVarPaymentMethod"
          },
          "paymentMethodLastFour": {
            "$ref": "#/components/schemas/ContextVarPaymentMethodLastFour"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          },
          "reason": {
            "$ref": "#/components/schemas/AutopayCancelReason"
          }
        },
        "title": "autopayCanceledBySystem",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "ContextVarPaymentSchedule": {
        "description": "The dates and amounts of payments to be made",
        "items": {
          "properties": {
            "amount": {
              "type": "number"
            },
            "date": {
              "format": "date",
              "type": "string"
            }
          },
          "type": "object"
        },
        "type": "array"
      },
      "AvailableTemplateContextSubjectAutopayEnabled": {
        "description": "### Sent When\n- Trigger: Borrower or agent turned on Autopay.\n- When: Immediately\n  \nThe context variables included by system when it sends `autopayEnabled`\n",
        "properties": {
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "paymentMethod": {
            "$ref": "#/components/schemas/ContextVarPaymentMethod"
          },
          "paymentMethodLastFour": {
            "$ref": "#/components/schemas/ContextVarPaymentMethodLastFour"
          },
          "paymentSchedule": {
            "$ref": "#/components/schemas/ContextVarPaymentSchedule"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "autopayEnabled",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectAutopayEnableReminder": {
        "description": "### Sent When\n- Trigger: Borrower has not enabled autopay X days before the due date.\n- When: 9am PST\n  \nThe context variables included by system when it sends `autopayEnableReminder`\n",
        "properties": {
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "nextDueDate": {
            "description": "The due date of the next payment.",
            "format": "date",
            "type": "string"
          },
          "paymentDays": {
            "description": "The number of days to the due date.",
            "type": "integer"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "autopayEnableReminder",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectAutopayPaymentCanceled": {
        "description": "### Sent When\n- Trigger: Autopay scheduled payment was canceled (eg: due to low balance per Plaid check)\n- When: 1-2am Product Timezone\n  \nThe context variables included by system when it sends `autopayPaymentCanceled`\n",
        "properties": {
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "paymentAmount": {
            "$ref": "#/components/schemas/ContextVarPaymentAmount"
          },
          "paymentDate": {
            "$ref": "#/components/schemas/ContextVarPaymentDueDate"
          },
          "paymentMethod": {
            "$ref": "#/components/schemas/ContextVarPaymentMethod"
          },
          "paymentMethodLastFour": {
            "$ref": "#/components/schemas/ContextVarPaymentMethodLastFour"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "autopayPaymentCanceled",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectAutopayPaymentMethodUpdated": {
        "description": "### Sent When\n- Trigger: Borrower or agent updated payment method on an existing Autopay plan.\n- When: Immediately\n  \nThe context variables included by system when it sends `autopayPaymentMethodUpdated`\n",
        "properties": {
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "paymentMethod": {
            "$ref": "#/components/schemas/ContextVarPaymentMethod"
          },
          "paymentMethodLastFour": {
            "$ref": "#/components/schemas/ContextVarPaymentMethodLastFour"
          },
          "paymentSchedule": {
            "$ref": "#/components/schemas/ContextVarPaymentSchedule"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "autopayPaymentMethodUpdated",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "ContextVarExpectedPaymentIds": {
        "description": "The IDs of the expected payments objects representing payments not yet made.",
        "items": {
          "example": "XP-L9BN-5J52",
          "type": "string"
        },
        "type": "array"
      },
      "ContextVarOverdueAmount": {
        "description": "The overdue amount",
        "multipleOf": 0.01,
        "type": "number"
      },
      "AvailableTemplateContextSubjectAutopayPaymentReminder": {
        "description": "### Sent When\n- Trigger: Autopay payment reminder sent X days before the Autopay date, sent when autopay is on.\n- When: 9am PST\n  \nThe context variables included by system when it sends `autopayPaymentReminder`\n",
        "properties": {
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "expectedPaymentIds": {
            "$ref": "#/components/schemas/ContextVarExpectedPaymentIds"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "overdueAmount": {
            "$ref": "#/components/schemas/ContextVarOverdueAmount"
          },
          "paymentAmount": {
            "$ref": "#/components/schemas/ContextVarPaymentAmount"
          },
          "paymentDate": {
            "$ref": "#/components/schemas/ContextVarPaymentDueDate"
          },
          "paymentMethod": {
            "$ref": "#/components/schemas/ContextVarPaymentMethod"
          },
          "paymentMethodLastFour": {
            "$ref": "#/components/schemas/ContextVarPaymentMethodLastFour"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "autopayPaymentReminder",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "ContextVarNewPaymentDate": {
        "description": "The new payment date",
        "format": "date",
        "type": "string"
      },
      "ContextVarOldPaymentDate": {
        "description": "The old payment date",
        "format": "date",
        "type": "string"
      },
      "AvailableTemplateContextSubjectAutopayPaymentRescheduled": {
        "description": "### Sent When\n- Trigger: Autopay scheduled payment was rescheduled (eg: due to low balance per Plaid check).\n- When: 1-2am Product Timezone\n  \nThe context variables included by system when it sends `autopayPaymentRescheduled`\n",
        "properties": {
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "newPaymentDate": {
            "$ref": "#/components/schemas/ContextVarNewPaymentDate"
          },
          "oldPaymentDate": {
            "$ref": "#/components/schemas/ContextVarOldPaymentDate"
          },
          "paymentAmount": {
            "$ref": "#/components/schemas/ContextVarPaymentAmount"
          },
          "paymentMethod": {
            "$ref": "#/components/schemas/ContextVarPaymentMethod"
          },
          "paymentMethodLastFour": {
            "$ref": "#/components/schemas/ContextVarPaymentMethodLastFour"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "autopayPaymentRescheduled",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectCardExpiresReminder": {
        "description": "### Sent When\n- Trigger: Card payment method is expiring soon.\n- When: 9am PST\n  \nThe context variables included by system when it sends `cardExpiresReminder`\n",
        "properties": {
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "month": {
            "description": "The full name of the month the card expires (e.g., October, not Oct).",
            "type": "string"
          },
          "paymentMethod": {
            "$ref": "#/components/schemas/ContextVarPaymentMethod"
          },
          "paymentMethodLastFour": {
            "$ref": "#/components/schemas/ContextVarPaymentMethodLastFour"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          },
          "year": {
            "description": "The year the card expires.",
            "type": "integer"
          }
        },
        "title": "cardExpiresReminder",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "ContextVarCase": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Case"
          },
          {
            "properties": {
              "associatedLoanIds": {
                "description": "The IDs of the loans associated with this case.\n",
                "type": "string"
              },
              "associatedLoans": {
                "description": "The loans associated with this case.\n",
                "items": {
                  "$ref": "#/components/schemas/ContextVarLoanDataSource"
                },
                "type": "array"
              },
              "isReportingAssociatedLoans": {
                "description": "If any of the associated loans are reporting to credit agencies (`isReporting=true` in the API),\nthis will be `true`.\n",
                "type": "boolean"
              }
            },
            "type": "object"
          }
        ]
      },
      "AvailableTemplateContextSubjectCeaseCommunicationAcknowledgement": {
        "description": "### Sent When\n- Trigger: Manual (Agent can send via CRM associated with Cease Communications Case Type)\n- When: Immediately\n  \nThe context variables included by system when it sends `ceaseCommunicationAcknowledgement`\n",
        "properties": {
          "case": {
            "$ref": "#/components/schemas/ContextVarCase"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "ceaseCommunicationAcknowledgement",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectCeaseRefuseToPay": {
        "description": "### Sent When\n- Trigger: Manual (Agent can send via CRM associated with Cease Communications Case Type)\n- When: Immediately\n  \nThe context variables included by system when it sends `ceaseCommunicationRefuseToPay`\n",
        "properties": {
          "case": {
            "$ref": "#/components/schemas/ContextVarCase"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "ceaseCommunicationRefuseToPay",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectConfirmationCode": {
        "description": "### Sent When\n- Trigger: Manual (One time verification code sent to verify email or phone ownership.)\n- When: Immediately\n  \nThe context variables included by system when it sends `confirmationCode`\n",
        "properties": {
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "confirmationCode": {
            "description": "The confirmation code to be sent.",
            "maxLength": 6,
            "minLength": 6,
            "type": "string"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "confirmationCode",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectContactTakeover": {
        "description": "### Sent When\n- Trigger: Another borrower \"claimed\" email or phone number.\n- When: Immediately\n  \nThe context variables included by system when it sends `contactTakeover`\n",
        "properties": {
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "contactType": {
            "description": "The type of contact that was taken over. Only email and phone\ncan be taken over.\n",
            "enum": [
              "email",
              "phone"
            ],
            "type": "string"
          },
          "emailMasked": {
            "description": "The email address of the phone number which was taken over,\nwith most of the characters replaced with `*`.\n",
            "type": "string"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          },
          "phoneNumberLastFour": {
            "description": "The last four digits of the phone number which was taken over.",
            "maxLength": 4,
            "minLength": 4,
            "type": "string"
          }
        },
        "title": "contactTakeover",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectCustomX": {
        "description": "### Sent When\n- Trigger: Manual (Agent can send via CRM, once configured.)\n- When: Immediately\n  \nThe context variables included by system when it sends `customX` (`custom1` - `custom20`)\n",
        "properties": {
          "case": {
            "$ref": "#/components/schemas/ContextVarCase"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "customX",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectDebtValidationNotice": {
        "description": "### Sent When\n- Trigger: Manual (Agent can send via CRM when a new loan is created.)\n- When: Immediately\n  \nThe context variables included by system when it sends `debtValidationNotice`\n",
        "properties": {
          "case": {
            "$ref": "#/components/schemas/ContextVarCase"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "debtValidationNotice",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectDebtValidationNoticeArizona": {
        "description": "### Sent When\n- Trigger: Can be configured on loan type to be sent upon loanActivation or loanFirstOverdue.\n- When: Immediately\n  \nThe context variables included by system when it sends `debtValidationNoticeArizona`\n",
        "properties": {
          "case": {
            "$ref": "#/components/schemas/ContextVarCase"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "debtValidationNoticeArizona",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectDebtValidationNoticeAutomatic": {
        "description": "### Sent When\n- Trigger: Can be configured on loan type to be sent upon loanActivation or loanFirstOverdue.\n- When: Immediately\n  \nThe context variables included by system when it sends `debtValidationNoticeAutomatic`\n",
        "properties": {
          "case": {
            "$ref": "#/components/schemas/ContextVarCase"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "debtValidationNoticeAutomatic",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectDebtValidationNoticeNYCYonkers": {
        "description": "### Sent When\n- Trigger: Manual (Agent can send via CRM when a new loan is created.)\n- When: Immediately\n  \nThe context variables included by system when it sends `debtValidationNoticeNYCYonkers`\n",
        "properties": {
          "case": {
            "$ref": "#/components/schemas/ContextVarCase"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "debtValidationNoticeNYCYonkers",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectDebtValidationNoticePuertoRico": {
        "description": "### Sent When\n- Trigger: Can be configured on loan type to be sent upon loanActivation or loanFirstOverdue.\n- When: Immediately\n  \nThe context variables included by system when it sends `debtValidationNoticePuertoRico`\n",
        "properties": {
          "case": {
            "$ref": "#/components/schemas/ContextVarCase"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "debtValidationNoticePuertoRico",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectDeceasedConfirmationOfPayoff": {
        "description": "### Sent When\n- Trigger: Manual (Agent can send via CRM with an associated Deceased Case.)\n- When: Immediately\n  \nThe context variables included by system when it sends `deceasedConfirmationOfPayoff`\n",
        "properties": {
          "case": {
            "$ref": "#/components/schemas/ContextVarCase"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "deceasedConfirmationOfPayoff",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectDeceasedNoticeToRepresentative": {
        "description": "### Sent When\n- Trigger: Manual (Agent can send via CRM with an associated Deceased Case.)\n- When: Immediately\n  \nThe context variables included by system when it sends `deceasedNoticeToRepresentative`\n",
        "properties": {
          "case": {
            "$ref": "#/components/schemas/ContextVarCase"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "deceasedNoticeToRepresentative",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectDeceasedNotificationUponDeath": {
        "description": "### Sent When\n- Trigger: Manual (Agent can send via CRM with an associated Deceased Case.)\n- When: Immediately\n  \nThe context variables included by system when it sends `deceasedNotificationUponDeath`\n",
        "properties": {
          "case": {
            "$ref": "#/components/schemas/ContextVarCase"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "deceasedNotificationUponDeath",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectDisputeOfDebtSubmitDocumentation": {
        "description": "### Sent When\n- Trigger: Manual (Agent can send via CRM with an associated Dispute Of Debt Case.)\n- When: Immediately\n  \nThe context variables included by system when it sends `disputeOfDebtSubmitDocumentation`\n",
        "properties": {
          "case": {
            "$ref": "#/components/schemas/ContextVarCase"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "disputeOfDebtSubmitDocumentation",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectDisputeOfDebtConfirmed": {
        "description": "### Sent When\n- Trigger: Manual (Agent can send via CRM with an associated Dispute Of Debt Case.)\n- When: Immediately\n  \nThe context variables included by system when it sends `disputeOfDebtConfirmed`\n",
        "properties": {
          "case": {
            "$ref": "#/components/schemas/ContextVarCase"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "disputeOfDebtConfirmed",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectDisputeOfDebtSubmitDocumentationReminder": {
        "description": "### Sent When\n- Trigger: Manual (Agent can send via CRM with an associated Dispute Of Debt Case.)\n- When: Immediately\n  \nThe context variables included by system when it sends `disputeOfDebtSubmitDocumentationReminder`\n",
        "properties": {
          "case": {
            "$ref": "#/components/schemas/ContextVarCase"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "disputeOfDebtSubmitDocumentationReminder",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectDisputeOfDebtUnableToConfirm": {
        "description": "### Sent When\n- Trigger: Manual (Agent can send via CRM with an associated Dispute Of Debt Case.)\n- When: Immediately\n  \nThe context variables included by system when it sends `disputeOfDebtUnableToConfirm`\n",
        "properties": {
          "case": {
            "$ref": "#/components/schemas/ContextVarCase"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "disputeOfDebtUnableToConfirm",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectDisputeOfDebtUnableToResolve": {
        "description": "### Sent When\n- Trigger: Manual (Agent can send via CRM with an associated Dispute Of Debt Case.)\n- When: Immediately\n  \nThe context variables included by system when it sends `disputeOfDebtUnableToResolve`\n",
        "properties": {
          "case": {
            "$ref": "#/components/schemas/ContextVarCase"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "disputeOfDebtUnableToResolve",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectElectronicConsentOptOut": {
        "description": "### Sent When\n- Trigger: System (Agent revoked consent to electronic communication per borrower request.)\n- When: Immediately\n  \nThe context variables included by system when it sends `electronicConsentOptOut`\n",
        "properties": {
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "electronicConsentOptOut",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectFailedSettlementInvestor": {
        "description": "### Sent When\n- Trigger: System (Settlement of funds failed.)\n- When: Immediately\n  \nThe context variables included by system when it sends `failedSettlementInvestor`\n",
        "properties": {
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "companyName": {
            "description": "The name of the company.",
            "type": "string"
          },
          "investorContactName": {
            "description": "The name of the investor.",
            "type": "string"
          },
          "paymentMethod": {
            "$ref": "#/components/schemas/ContextVarPaymentMethod"
          },
          "paymentMethodLastFour": {
            "$ref": "#/components/schemas/ContextVarPaymentMethodLastFour"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "failedSettlementInvestor",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectFreeFormBranded": {
        "description": "### Sent When\n- Trigger: Manual (Agent can send via CRM.)\n- When: Immediately\n  \nThe context variables included by system when it sends `freeFormBranded`\n",
        "properties": {
          "case": {
            "$ref": "#/components/schemas/ContextVarCase"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "freeFormBranded",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectFuturepayCanceled": {
        "description": "### Sent When\n- Trigger: Manual (Agent can send via CRM.)\n- When: Immediately\n  \nThe context variables included by system when it sends `futurepayCanceled`\n",
        "properties": {
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "futurepayCanceledf",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectFuturepayPaymentDueReminder": {
        "description": "### Sent When\n- Trigger: Manual (Agent can send via CRM.)\n- When: 9am PST\n  \nThe context variables included by system when it sends `futurepayPaymentDueReminder`\n",
        "properties": {
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "futurepayPaymentDueReminder",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectIdentityTheftIncompleteDocumentation": {
        "description": "### Sent When\n- Trigger: Manual (Agent can send via CRM associated with Identity Theft Case Type)\n- When: Immediately\n  \nThe context variables included by system when it sends `identityTheftIncompleteDocumentation`\n",
        "properties": {
          "case": {
            "$ref": "#/components/schemas/ContextVarCase"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "identityTheftIncompleteDocumentation",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectIdentityTheftSubmitDocumentationFirstReminder": {
        "description": "### Sent When\n- Trigger: Manual (Agent can send via CRM associated with Identity Theft Case Type)\n- When: Immediately\n  \nThe context variables included by system when it sends `identityTheftSubmitDocumentationFirstReminder`\n",
        "properties": {
          "case": {
            "$ref": "#/components/schemas/ContextVarCase"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "identityTheftSubmitDocumentationFirstReminder",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectIdentityTheftSubmitDocumentation": {
        "description": "### Sent When\n- Trigger: Manual (Agent can send via CRM associated with Identity Theft Case Type)\n- When: Immediately\n  \nThe context variables included by system when it sends `identityTheftSubmitDocumentation`\n",
        "properties": {
          "case": {
            "$ref": "#/components/schemas/ContextVarCase"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "identityTheftSubmitDocumentation",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectIdentityTheftSubmitDocumentationSecondReminder": {
        "description": "### Sent When\n- Trigger: Manual (Agent can send via CRM associated with Identity Theft Case Type)\n- When: Immediately\n  \nThe context variables included by system when it sends `identityTheftSubmitDocumentationSecondReminder`\n",
        "properties": {
          "case": {
            "$ref": "#/components/schemas/ContextVarCase"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "identityTheftSubmitDocumentationSecondReminder",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectIdentityTheftValidated": {
        "description": "### Sent When\n- Trigger: Manual (Agent can send via CRM associated with Identity Theft Case Type)\n- When: Immediately\n  \nThe context variables included by system when it sends `identityTheftValidated`\n",
        "properties": {
          "case": {
            "$ref": "#/components/schemas/ContextVarCase"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "identityTheftValidated",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectIdentityTheftNotValidated": {
        "description": "### Sent When\n- Trigger: Manual (Agent can send via CRM associated with Identity Theft Case Type)\n- When: Immediately\n  \nThe context variables included by system when it sends `identityTheftNotValidated`\n",
        "properties": {
          "case": {
            "$ref": "#/components/schemas/ContextVarCase"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "identityTheftNotValidated",
        "type": "object",
        "x-tags": [
          "System Sent Messages"
        ]
      },
      "AvailableTemplateContextSubjectAutopayAgreement": {
        "description": "### Displayed When\nAutopay agreement shown to a borrower when they turn on Autopay.\n  \nThe context variables included by system when it displays `autopayAgreement`\n",
        "properties": {
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "loan": {
            "$ref": "#/components/schemas/ContextVarLoanDataSource"
          },
          "paymentMethod": {
            "$ref": "#/components/schemas/ContextVarPaymentMethod"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "autopayAgreement",
        "type": "object",
        "x-tags": [
          "System Documents & UI"
        ]
      },
      "AvailableTemplateContextSubjectDrawFundsDisclosure": {
        "description": "### Displayed When\nDislosure/consent shown to a borrower when they request to draw additional funds on line of credit.\n  \nThe context variables included by system when it displays `drawFundsDisclosure`\n",
        "properties": {
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "drawAmount": {
            "description": "The amount of additional funds drawn.\n",
            "type": "number"
          },
          "institutionName": {
            "description": "The name of the institution from which the funds are drawn.\n",
            "type": "string"
          },
          "paymentMethod": {
            "$ref": "#/components/schemas/ContextVarPaymentMethod"
          },
          "paymentMethodLastFour": {
            "$ref": "#/components/schemas/ContextVarPaymentMethodLastFour"
          },
          "person": {
            "$ref": "#/components/schemas/ContextVarPerson"
          }
        },
        "title": "drawFundsDisclosure",
        "type": "object",
        "x-tags": [
          "System Documents & UI"
        ]
      },
      "ContextObject": {
        "anyOf": [
          {
            "description": "The data used to render the template. Provided in JSON format, it must be a mapping \nof context variables to values. \n\nThe context variables of `borrower`, `loan`, `case` and `statement` \ndo not need to be provided since the system will automatically add these objects\nto context assuming you provide `personId`, `loanId`, `caseId` and `statementId` to \nthe endpoint.\n\nFor example if your provided the context...\n\n```\n{\n  \"dateSigned\": \"Aug 27, 2021\"\n  \"lenderName\": \"Peachy Lender\"\n  \"paymentMethod\": \"bankAccount\"\n  \"paymentMethodLastFour\": \"1110\"\n  \"supportEmail\": \"support@peach.com\"\n  \"supportPhone\": \"888-888-8888\"\n}\n```\n\n...then a template like `Hello from {{lenderName}}!` would render like `Hello from Peachy Lender!`\n",
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectAutopayAmountChanged"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectAutopayCanceledBySystem"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectAutopayEnabled"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectAutopayEnableReminder"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectAutopayPaymentCanceled"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectAutopayPaymentMethodUpdated"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectAutopayPaymentReminder"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectAutopayPaymentRescheduled"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectCardExpiresReminder"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectCeaseCommunicationAcknowledgement"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectCeaseRefuseToPay"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectConfirmationCode"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectContactTakeover"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectCustomX"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectDebtValidationNotice"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectDebtValidationNoticeArizona"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectDebtValidationNoticeAutomatic"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectDebtValidationNoticeNYCYonkers"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectDebtValidationNoticePuertoRico"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectDeceasedConfirmationOfPayoff"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectDeceasedNoticeToRepresentative"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectDeceasedNotificationUponDeath"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectDisputeOfDebtSubmitDocumentation"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectDisputeOfDebtConfirmed"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectDisputeOfDebtSubmitDocumentationReminder"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectDisputeOfDebtUnableToConfirm"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectDisputeOfDebtUnableToResolve"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectElectronicConsentOptOut"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectFailedSettlementInvestor"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectFreeFormBranded"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectFuturepayCanceled"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectFuturepayPaymentDueReminder"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectFreeFormBranded"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectFuturepayCanceled"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectFuturepayPaymentDueReminder"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectIdentityTheftIncompleteDocumentation"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectIdentityTheftSubmitDocumentationFirstReminder"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectIdentityTheftSubmitDocumentation"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectIdentityTheftSubmitDocumentationSecondReminder"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectIdentityTheftValidated"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectIdentityTheftNotValidated"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectAutopayAgreement"
          },
          {
            "$ref": "#/components/schemas/AvailableTemplateContextSubjectDrawFundsDisclosure"
          }
        ],
        "x-peach-hacks": "remove-available-template-context-subjects"
      },
      "TemplateRender": {
        "properties": {
          "caseId": {
            "description": "The unique identifier of the Case. Can be Peach or lender's external identifier. The case attributes will be used as dynamic fields in the template.\n",
            "type": "string"
          },
          "channel": {
            "description": "Templates with the same subject can have multiple versions per channel. For example: `paymentFailed` can have `email` and `text` message (aka SMS) versions.\n",
            "enum": [
              "email",
              "text",
              "mail",
              "gui",
              "document"
            ],
            "type": "string"
          },
          "context": {
            "$ref": "#/components/schemas/ContextObject"
          },
          "loanId": {
            "description": "The unique identifier of the Loan. Can be Peach or lender's external identifier. The loan attributes will be used as dynamic fields in the template.\n",
            "type": "string"
          },
          "overrideTemplateId": {
            "$ref": "#/components/schemas/OverrideTemplateId"
          },
          "personId": {
            "description": "The unique identifier of the Borrower. Can be Peach or a lender's external identifier. The borrower attributes will be used as dynamic fields in the template.\n",
            "type": "string"
          },
          "subject": {
            "$ref": "#/components/schemas/InteractionSubject"
          }
        },
        "type": "object"
      },
      "SendIsTransactional": {
        "description": "If `true`, then sent this interaction as \"transactional\". \n\nTransactional interactions are those which are sent via an automated system in response \nto an event or some action taken. e.g., an email sent to confirm a payment was made is transactional;\nlikewise an email sent to confirm a password change is transacrtional. Examples of\nnon-transactional messages would be: those sent by an agent in response to a customer request,\nfor collections, or for marketing.\n\nIt's important to mark these messages correctly, because different laws may apply to messages\ndepending on if they're considered \"transactional\".\n\nAdditionally, a transactional interaction may be sent with different \"From:\" and \"Reply-To:\" fields depending on configuration.\nThe purpose here being that it may be desirable to send messages from an email address\nthat is clearly marked as \"unmonitored\", so that recipients do not try to respond\ndirectly to those email addresses.\n",
        "type": "boolean"
      },
      "SendIsTransactionalDefaultTrue": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SendIsTransactional"
          },
          {
            "default": true,
            "type": "boolean"
          }
        ]
      },
      "schemas-AssociatedLoanId": {
        "description": "The ID of a Loan. This marks a particular loan as associated with this interaction.\n\nHydrates to the `loan` context variable for use in the template\n",
        "example": "LN-AAAA-BBBB",
        "type": "string"
      },
      "schemas-AssociatedLoanIds": {
        "description": "The IDs of several loans. This marks several loans as associated with this interaction.\n\nHydrates to the `loans` context variable for use in the template\n",
        "example": [
          "LN-AAAA-BBBB",
          "LB-CCCC-DDDD"
        ],
        "items": {
          "type": "string"
        },
        "type": "array"
      },
      "CommunicatorSend": {
        "properties": {
          "attachments": {
            "description": "List of document IDs for documents to attach to the outgoing email.\n",
            "items": {
              "description": "A document descriptor ID.",
              "type": "string"
            },
            "type": "array"
          },
          "caseId": {
            "description": "Mark a particular case as associated with this message.\n\nHydates to the `case` context variable for use in the template\nbeing rendered for send.\n",
            "example": "CS-AAAA-BBBB",
            "type": "string"
          },
          "channel": {
            "description": "Specifies the channel(s) to send the message on. \n\nIf an array is provided then the message will be sent to the most appropriate contact\nfor each specified channel. As long as at least one contact is found, the message\nwill be sent, if at least one contact could be found then an error will be returned.\n",
            "oneOf": [
              {
                "$ref": "#/components/schemas/InteractionChannel"
              },
              {
                "items": {
                  "$ref": "#/components/schemas/InteractionChannel"
                },
                "type": "array"
              }
            ]
          },
          "contactId": {
            "description": "The Contact ID of the borrower to which this message should be sent.\n\nIf not provided then the system will try to select an appropriate\ncontact based on the type of message being sent. (e.g., if this\nis an email select the primary email address; if this is a\ntext message select the borrower's mobile phone.)\n",
            "example": "BO-AAAA-BBBB",
            "type": "string"
          },
          "context": {
            "$ref": "#/components/schemas/ContextObject"
          },
          "interactionExternalId": {
            "description": "The external ID of the interaction that will be created as a\nresult of this request. Subsequent attempts to send with the\nsame external ID will be blocked.\n",
            "maxLength": 50,
            "type": "string"
          },
          "isTransactional": {
            "$ref": "#/components/schemas/SendIsTransactionalDefaultTrue"
          },
          "loanId": {
            "$ref": "#/components/schemas/schemas-AssociatedLoanId"
          },
          "loanIds": {
            "$ref": "#/components/schemas/schemas-AssociatedLoanIds"
          },
          "overrideRecipient": {
            "description": "The recipient to which this message should be sent. This should be used in special\ncases where you cannot create a `Contact` and use `contactId`.\n\nWARNING: It is not recommended to use this field. Instead use `contactId` to specify the contact.\n\nYou can only use this field if:\n- The interaction channel is `email`\n- A `borrowerId` is specified\n- A `previousInteractionId` is specified, to an email interaction belonging to that borrower\n- That previous interaction was sent \"from:\" the same email address as the one you want to send to.\nCurrently only email addresses are supported for this field.\n",
            "minLength": 1,
            "nullable": true,
            "type": "string"
          },
          "overrideTemplateId": {
            "$ref": "#/components/schemas/OverrideTemplateId"
          },
          "personId": {
            "description": "The Borrower ID of the borrower to which this message should be sent.\n\nHydates to the `person` context variable for use in the template\nbeing rendered for send.\n",
            "example": "BO-AAAA-BBBB",
            "type": "string"
          },
          "previousInteractionId": {
            "type": "string"
          },
          "sendAt": {
            "description": "This attribute determines when the message should be sent.\nIf set to `null`, and the message's timing conflicts with\nCompliance Guard's time-of-day restrictions, Communicator\nwill automatically reschedule it to an allowable time.\nIf this auto-rescheduling occurs, the sendAt field in the\nInteraction response will show the new scheduled time, and\nthe Interaction status will be marked as `scheduled`.\n\nTo bypass auto-rescheduling, input the current time for\n`sendAt` when calling the endpoint.\n\n**Additional Information:**\n- Regardless of when the message is scheduled to send, its\ncontent will be generated immediately upon calling this endpoint.\n- You can manually set a future send time of up to 7 days in the future.\n",
            "format": "date-time",
            "type": "string"
          },
          "sendJitter": {
            "description": "The maximum number of seconds to add to the send time for this communication.\nThe actual time added will be between 0 and this value.\nThis is useful for spreading out the delivery\nof a large batch of messages over a period of time in order\nto avoid delaying other time-sensitive communcations.\n",
            "format": "int32",
            "type": "integer"
          },
          "statementId": {
            "description": "Mark a particular statement as associated with this message.",
            "example": "SM-AAAA-BBBB",
            "type": "string"
          },
          "strictUndefined": {
            "default": false,
            "description": "If `true` an error will be returned if the template contains\na variable that is not defined in the context. For historical\nreasons this is `false` by default, but it is recommended\nto set this to `true`.\n",
            "type": "boolean"
          },
          "subject": {
            "$ref": "#/components/schemas/InteractionSubject"
          },
          "supercaseBulkOperationId": {
            "type": "string"
          },
          "theme": {
            "$ref": "#/components/schemas/InteractionTheme"
          },
          "useTemplate": {
            "default": true,
            "description": "Only applicable when `channel=mail`. If `false`, will not generate content from a template and will instead\nonly use the documents referenced in the `attachments` field.\n",
            "type": "boolean"
          }
        },
        "required": [
          "subject",
          "personId"
        ],
        "type": "object"
      },
      "SendIsTransactionalDefaultFalse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SendIsTransactional"
          },
          {
            "default": false,
            "type": "boolean"
          }
        ]
      },
      "language": {
        "default": "en",
        "description": "The ISO 639-1 two character code of the email language.",
        "example": "en",
        "maxLength": 2,
        "minLength": 2,
        "type": "string"
      },
      "SubjectDescriptor": {
        "properties": {
          "agentCanSend": {
            "description": "If set to `true`, agent can send message with this subject from CRM.",
            "type": "boolean"
          },
          "caseTypes": {
            "items": {
              "$ref": "#/components/schemas/BaseCaseType"
            },
            "type": "array"
          },
          "previewOnly": {
            "description": "If `true`, the output of templates with this subject must be edited before sending.\n",
            "type": "boolean"
          },
          "subject": {
            "allOf": [
              {
                "readOnly": true
              },
              {
                "$ref": "#/components/schemas/InteractionSubject"
              }
            ]
          },
          "theme": {
            "$ref": "#/components/schemas/InteractionTheme"
          },
          "title": {
            "description": "** DEPRECATED ATTRIBUTE **\n\nThe title to use when showing in the UI.\n",
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CompanyId": {
        "example": "CP-AAAA-BBBB",
        "pattern": "CP-[A-Z0-9]{4}-[A-Z0-9]{4}",
        "type": "string"
      },
      "TemplateVersionId": {
        "example": "TV-AAAA-BBBB",
        "pattern": "TV-[A-Z0-9]{4}-[A-Z0-9]{4}",
        "type": "string"
      },
      "ActiveTemplateVersionId": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TemplateVersionId"
          },
          {
            "description": "The ID of the active version of the template. This is the version that will be used when rendering the template.\n",
            "nullable": true,
            "type": "string"
          }
        ]
      },
      "TemplateDescriptorId": {
        "description": "ID of the Template Descriptor",
        "example": "TD-AAAA-BBBB",
        "pattern": "TD-[A-Z0-9]{4}-[A-Z0-9]{4}",
        "type": "string"
      },
      "LoanTypeIdNullable": {
        "description": "The Loan Type ID to which this template is associated. By configuring\na Loan Type for a Template Descriptor it is possible to use completely different \ntemplates for different types of loans.\n",
        "example": "LT-AAAA-BBBB",
        "nullable": true,
        "pattern": "LT-[A-Z0-9]{4}-[A-Z0-9]{4}",
        "type": "string"
      },
      "TemplateSubject": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/InteractionSubject"
          },
          {
            "enum": [
              "base1",
              "base2",
              "base3"
            ],
            "type": "string"
          }
        ],
        "description": "The subject of the template",
        "type": "string"
      },
      "TemplateDescriptorMutate": {
        "additionalProperties": false,
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/InteractionChannel"
          },
          "enabled": {
            "default": true,
            "description": "If `true`, then this template is disabled. Attempts to send messages with this\ntemplate will be rejected. (Return `400` responses from the API.)\n",
            "type": "boolean"
          },
          "language": {
            "$ref": "#/components/schemas/language"
          },
          "name": {
            "description": "An optional human-friendly name for templates. Only the `Custom1`-`Custom20`\nfamily of subjects can have a custom name.\n",
            "maximum": 100,
            "minimum": 1,
            "type": "string"
          },
          "productId": {
            "$ref": "#/components/schemas/LoanTypeIdNullable"
          },
          "sensitive": {
            "default": false,
            "description": "If `true`, then all interactions and documents created from this template will have \nthe `sensitive` field set to `true`. Such interaction and documents cannot have their \ncontent viewed except with a special permission (`interaction:read.sensitive`). \n\nUsually this would be used to prevent employees without need to access \nprivate information from accessing it.\n",
            "type": "boolean"
          },
          "subject": {
            "$ref": "#/components/schemas/TemplateSubject"
          }
        },
        "type": "object"
      },
      "TemplateDescriptor": {
        "allOf": [
          {
            "properties": {
              "activeVersionId": {
                "$ref": "#/components/schemas/ActiveTemplateVersionId",
                "description": "The ID of the active version of the template. This is the version that will be used when rendering the template.\n",
                "example": "TV-AAAA-BBBB"
              },
              "companyId": {
                "$ref": "#/components/schemas/CompanyId"
              },
              "id": {
                "$ref": "#/components/schemas/TemplateDescriptorId"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/TemplateDescriptorMutate"
          }
        ]
      },
      "ContentHtmlTemplate": {
        "description": "A valid Jinja template to use for the content HTML body. This is used, for instance,\nfor the body of an HTML email.\n\nThis is simply ignored when the channel does not need HTML content.\n\nThe context variables available to this template are the same as the context available to \n`contentTextTemplate`\n",
        "example": "Hello,<br/><p>{{foobar}}</p>",
        "nullable": true,
        "type": "string"
      },
      "ContentTextTemplate": {
        "description": "A valid Jinja template to use for the content text body. This is used, for instance,\nfor the body of a plain text email or text message.\n",
        "example": "Hello {{foobar}}",
        "nullable": true,
        "type": "string"
      },
      "TemplateVersionStatus": {
        "enum": [
          "draft",
          "deployed",
          "deprecated"
        ],
        "type": "string"
      },
      "SubjectLineTemplate": {
        "description": "A valid Jinja template to use for the subject line. This is used, for instance,\nfor the subject line when sending emails.\n\nThis is simply ignored when the channel does not need a subject.\n\nThe context variables available to this template are the same as the context available to \n`contentTextTemplate`\n",
        "example": "Hello {{foobar}}",
        "nullable": true,
        "type": "string"
      },
      "TemplateVersionMutate": {
        "additionalProperties": false,
        "properties": {
          "contentHtmlTemplate": {
            "$ref": "#/components/schemas/ContentHtmlTemplate"
          },
          "contentTextTemplate": {
            "$ref": "#/components/schemas/ContentTextTemplate"
          },
          "descriptorId": {
            "$ref": "#/components/schemas/TemplateDescriptorId"
          },
          "status": {
            "$ref": "#/components/schemas/TemplateVersionStatus"
          },
          "subjectLineTemplate": {
            "$ref": "#/components/schemas/SubjectLineTemplate"
          }
        }
      },
      "TemplateVersion": {
        "allOf": [
          {
            "properties": {
              "id": {
                "$ref": "#/components/schemas/TemplateVersionId"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/TemplateVersionMutate"
          }
        ]
      },
      "OneTimeCodeChannel": {
        "description": "The channel via which to send the one time code through.\n",
        "enum": [
          "email",
          "text",
          "voice"
        ],
        "type": "string"
      },
      "CollectionAgencyCreate": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseWithExternalIdMixin"
          },
          {
            "properties": {
              "companyId": {
                "description": "The unique company identifier.\n",
                "readOnly": true,
                "type": "string"
              },
              "contactEmail": {
                "description": "The third party debt collection agency email address that the charged-off loan was assigned to.\n",
                "type": "string"
              },
              "contactPhone": {
                "description": "The third party debt collection agency primary phone that the charged-off loan was assigned to. Should be provided in E.164 format.\n",
                "type": "string"
              },
              "legalName": {
                "description": "The third party debt collection agency name that the charged-off loan was assigned to.\n",
                "type": "string"
              },
              "mailingAddress": {
                "$ref": "#/components/schemas/AddressBase",
                "description": "The third party debt collection agency mailing address that the charged-off loan was assigned to.\n"
              }
            },
            "type": "object"
          }
        ]
      },
      "CollectionAgency": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CollectionAgencyCreate"
          },
          {
            "properties": {
              "isArchived": {
                "description": "Set to true if the debt collection agency no longer active. Loans that were assigned to that agency will keep the reference, but new loans cannot be assigned.\n",
                "type": "boolean"
              }
            },
            "type": "object"
          }
        ]
      },
      "CollectionAgencyPost": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CollectionAgencyCreate"
          },
          {
            "properties": {
              "mailingAddress": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AddressBase"
                  },
                  {
                    "required": [
                      "addressLine1",
                      "city",
                      "state",
                      "postalCode",
                      "country"
                    ],
                    "type": "object"
                  }
                ]
              }
            },
            "type": "object"
          }
        ]
      },
      "AgencyName": {
        "description": "The credit agency name.\n",
        "enum": [
          "experian",
          "equifax",
          "transUnion",
          "innovis"
        ],
        "type": "string"
      },
      "CreditAgency": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "agencyName": {
                "$ref": "#/components/schemas/AgencyName"
              },
              "companyId": {
                "description": "The unique company identifier.\n",
                "readOnly": true,
                "type": "string"
              },
              "country": {
                "description": "The credit agency country.",
                "maxLength": 2,
                "type": "string"
              },
              "dataFormat": {
                "description": "The format of the reported data and file.",
                "enum": [
                  "metro2"
                ],
                "type": "string"
              },
              "encryptionMethod": {
                "description": "The encryption method that Peach system with use to encrypt the files.\n",
                "enum": [
                  "GPG"
                ],
                "nullable": true,
                "type": "string"
              },
              "fileNamePrefix": {
                "description": "The file name prefix. Must be provided if `agencyName=experian` and `nameFilePerAgencyConvention=true`. Only used if `agencyName=experian` and `nameFilePerAgencyConvention=true`.\n",
                "type": "string"
              },
              "isPeachAggregator": {
                "default": false,
                "description": "**DEPRECATED ATTRIBUTE**\n\nThis field is deprecated, and is only included to remain backward compatible. Only send `false`.\n",
                "type": "boolean"
              },
              "nameFilePerAgencyConvention": {
                "default": true,
                "description": "If `true` Peach system will name the file based on the credit agency convention.\n\n**Equifax**: Company legal name + Company ID + Credit agency name + today's date YYYYMMDD + .txt.\nFor example: `PEACHFINANCEINCCPYL69X5Z1EQUIFAX20211021.txt`.\n\n**Experian**: `fileNamePrefix` + `.` + today's date MMDDYYYY + .txt.\nFor example: MKFRT.10262021.txt.\n\n**TransUnion**: Company legal name + Company ID + Credit agency name + today's date YYYYMMDD + .txt.\nFor example: `PEACHFINANCEINCCPYL69X5Z1TRANSUNION20211213.txt`.\n\nIf `false` Peach system will name the file as:\nCompany legal name + Company ID + Credit agency name + today's date YYYYMMDD + .txt\nFor example: `PEACHFINANCEINCCPYL69X5Z1EXPERIAN20211021.txt`\n",
                "type": "boolean"
              },
              "publicKey": {
                "description": "The lender's public key to use to encrypt the files. A value must be passed if encryptionMethod is set.",
                "nullable": true,
                "type": "string"
              },
              "sftpAccessMethod": {
                "default": "usernamePassword",
                "description": "If `usernamePassword`, then `sftpUsername` and `sftpPassword` must be provided.\n\nIf `keys`, then `sftpSSHPeachPrivateKey` and `sftpSSHPeachPublicKey` will be created by peach.\n",
                "enum": [
                  "usernamePassword",
                  "keys"
                ],
                "type": "string"
              },
              "sftpCdDir": {
                "description": "Change directory into this folder before performing the upload.\n",
                "type": "string"
              },
              "sftpHostname": {
                "description": "The SFTP hostname. If SFTP hostname, username, and password are set, they will be used instead of the default credit bureau credentials.\nHost name should not contain a scheme, so don't put `sftp://` on the front. You may optionally specify a port like so: `example.com:222`.\nIf no port is supplied a default of 22 will be used.\n",
                "nullable": true,
                "pattern": "^[^/]+$",
                "type": "string"
              },
              "sftpPassword": {
                "description": "The password for SFTP.\n",
                "nullable": true,
                "type": "string"
              },
              "sftpUsername": {
                "description": "The username for SFTP.\n",
                "nullable": true,
                "type": "string"
              },
              "specificDays": {
                "description": "Specific days designate the day(s) when to upload the credit reporting file. Only the 1st day of the month is currently supported.\n\nThe allowed values for specific day(s) depends on the uploadFrequency.\n`monthly` - provide one number in the valid range 1-31. 1=first day of a month. Use 31 to indicate the last day of a month.\n\nFor example: [1].\n",
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              "uploadFrequency": {
                "description": "The credit reporting file creation frequency. Only monthly is currently supported.",
                "enum": [
                  "monthly"
                ],
                "type": "string"
              },
              "useLoanExternalId": {
                "default": true,
                "description": "Indicates what identifier to use as an account identifier for credit reporting.\n\nIf `true`, the system will use loan `externalId` as an account identifier for credit reporting. If `externalId` doesn't exist the system will use loan Peach Public ID.\n\nIf `false`, the system will use loan Peach Public ID (e.g. LN-JFU3-ER3S) as an account identifier for credit reporting.\n",
                "type": "boolean"
              }
            },
            "type": "object"
          }
        ]
      },
      "CallSummaryResultStatus": {
        "description": "The status of the call summary result.",
        "enum": [
          "pending",
          "completed",
          "failed"
        ],
        "type": "string"
      },
      "CallSummaryResult": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseWithExternalIdMixin"
          },
          {
            "properties": {
              "companyId": {
                "description": "The unique company identifier.",
                "type": "string"
              },
              "object": {
                "default": "AICallSummaryResult",
                "enum": [
                  "AICallSummaryResult"
                ],
                "type": "string"
              },
              "status": {
                "$ref": "#/components/schemas/CallSummaryResultStatus"
              },
              "summary": {
                "description": "The summary of the call.",
                "nullable": true,
                "type": "string"
              },
              "transcriptionResultId": {
                "description": "The unique identifier for the call transcription result.",
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "description": "Represents the result of a call summary."
      },
      "CallSummaryResultsPaging": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NewPaginator"
          },
          {
            "properties": {
              "data": {
                "items": {
                  "$ref": "#/components/schemas/CallSummaryResult"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "InteractionsManyNoPaging": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Interaction"
            },
            "type": "array"
          },
          "message": {
            "type": "string"
          },
          "status": {
            "description": "HTTP status code.",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "InvestorImmutableFields": {
        "properties": {
          "currency": {
            "description": "The currency that the investor will receive settlements in. Use ISO currency codes.\n\nSet to `USD` for all investors, other currencies are not supported yet.\n",
            "readOnly": true,
            "type": "string"
          },
          "externalId": {
            "description": "A lender's identifier for the investor.",
            "type": "string"
          },
          "id": {
            "description": "The investor ID",
            "readOnly": true,
            "type": "string"
          },
          "legalName": {
            "description": "The legal name of the investor.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ValidAddress": {
        "description": "Identifies the address as valid or invalid.",
        "readOnly": true,
        "type": "boolean"
      },
      "InvestorMutableFields": {
        "properties": {
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "contactEmail": {
            "description": "The email of the investor's primary contact person.",
            "format": "email",
            "type": "string"
          },
          "contactName": {
            "description": "The name of the investor's primary contact person.",
            "type": "string"
          },
          "contactPhone": {
            "description": "The phone number of the investor's primary contact person.",
            "maxLength": 15,
            "type": "string"
          },
          "default": {
            "default": false,
            "description": "Mark this investor as the default investor.\n\nAt loan creation, if no investors are specified in the `atOrigination.investors` attribute, the investor with `default=true` is\nadded with `shares=1` (100%).\n\nIf a new investor is created and there is another investor with `default=true`, the system will set `default=false` for the other investor.\n",
            "type": "boolean"
          },
          "validAddress": {
            "$ref": "#/components/schemas/ValidAddress"
          }
        },
        "type": "object"
      },
      "Investor": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "$ref": "#/components/schemas/InvestorImmutableFields"
          },
          {
            "$ref": "#/components/schemas/InvestorMutableFields"
          }
        ],
        "required": [
          "legalName"
        ],
        "title": "Investor"
      },
      "InvestorMutable": {
        "allOf": [
          {
            "$ref": "#/components/schemas/InvestorMutableFields"
          }
        ],
        "title": "Investor"
      },
      "PaymentInstrumentImmutableFields": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "activeAt": {
                "description": "The date and time at which the instrument was set to `active`.",
                "format": "date-time",
                "readOnly": true,
                "type": "string"
              },
              "id": {
                "description": "Unique identifier of the instrument.",
                "readOnly": true,
                "type": "string"
              },
              "inactiveAt": {
                "description": "The date and time at which the instrument was set to `inactive`.",
                "format": "date-time",
                "readOnly": true,
                "type": "string"
              },
              "isExternal": {
                "description": "A payment instrument marked `isExternal=true` is not verified and creates transactions for record purposes only. The `payment.instrument:external` permission is required to set this flag.",
                "type": "boolean"
              },
              "pendingAt": {
                "description": "The date and time at which the instrument was set to `pending`.",
                "format": "date-time",
                "nullable": true,
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "TransactionFailureReason": {
        "description": "The transaction failure reason.",
        "enum": [
          "insufficientFunds",
          "chargeback",
          "accountClosed",
          "invalidAccount",
          "unknownReason",
          "invalidCvv",
          "invalidExpirationDate",
          "avsFailed",
          "networkError",
          "cardDeclined",
          "accountFrozen",
          "deceased",
          "invalidRouting",
          "paymentStopped",
          "microdepositsFailed",
          "microdepositsAttemptFailed",
          "incorrectNumber",
          "fraudulent",
          "unauthorizedDebit"
        ],
        "type": "string"
      },
      "PaymentInstrumentFailureReasons": {
        "properties": {
          "failureDescriptionLong": {
            "description": "Detailed text describing the failure reason and any appropriate actions the borrower may take to fix the issue.\nNormally displayed in UI.\n",
            "readOnly": true,
            "type": "string"
          },
          "failureDescriptionShort": {
            "description": "Short text describing the failure reason. Normally displayed in UI.\n",
            "readOnly": true,
            "type": "string"
          },
          "failureReason": {
            "$ref": "#/components/schemas/TransactionFailureReason",
            "description": "A failure code for the most recent transaction failure using this instrument.\n",
            "nullable": true
          }
        },
        "type": "object"
      },
      "PaymentInstrumentMutableFields": {
        "properties": {
          "externalId": {
            "description": "A lender's identifier for the instrument.\n\nAfter the object is successfully created, a lender can use ID or externalId identifiers to fetch the object.\n\nTo fetch the object using externalId you need to add `ext-` to the URL.\n\nNote: Don't add ext- to the identifier value. For example: if the external identifier is `ABCDE`, then pass externalId=ACBCE and NOT ext-ABCDE when creating the object.\n",
            "minLength": 1,
            "nullable": true,
            "type": "string"
          },
          "inactiveReason": {
            "description": "The reason the instrument is inactive. Required when setting status=`inactive`.\n",
            "enum": [
              "fraudAlert",
              "updated",
              "notVerified",
              "expired",
              "failed",
              "deleted"
            ],
            "type": "string"
          },
          "nickname": {
            "description": "A nickname for the instrument. The nickname can be displayed in UI.",
            "type": "string"
          },
          "status": {
            "default": "pending",
            "description": "Status of the instrument. Can only be set if `isExternal=true`.\n\nStatuses:\n\n- `active` - the instrument can be charged.\n- `pending` - the instrument is pending to be verified.\n- `inactive` - the instrument is not active and cannot be charged.\n\nWhen updating this field, only the following state transitions are allowed.\n\n```\nactive --> inactive\npending --> active (only for payment instrument with isExternal=true)\npending --> inactive (only for payment instrument with isExternal=true)\ninactive --> active (only for payment instrument with isExternal=true)\ninactive --> pending (only for payment instrument with isExternal=true)\n```\n\nNote: if you update the status from `inactive` to `active` or `pending`,\nthe system will clear the following attributes: `inactiveReason`, `deletedAt`, `failureReason`,\n`failureDescriptionShort`, `failureDescriptionLong`.\n",
            "enum": [
              "active",
              "inactive",
              "pending"
            ],
            "type": "string"
          },
          "verified": {
            "default": false,
            "description": "Indicates whether the instrument has been verified.\n\nUser must have the `payment.instrument:skip.verification` permission to set this value to `true`, or\nthe payment instrument must be marked `isExternal=true`.\n",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "BankAccountImmutableFields": {
        "properties": {
          "accountNumberLastFour": {
            "description": "The last two, three or four digits of the account number.\nNormally, you should expect four digits. Two or three digits are returned when four digits are not available.\n",
            "pattern": "^[0-9]{2,4}$",
            "readOnly": true,
            "type": "string"
          },
          "instrumentType": {
            "enum": [
              "bankAccount"
            ],
            "type": "string"
          },
          "routingNumber": {
            "description": "The routing number.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AccountLinkError": {
        "properties": {
          "errorCodeByVendor": {
            "description": "The error code as received from the vendor.",
            "type": "string"
          },
          "errorDescriptionBorrower": {
            "description": "The error description as received from the vendor for presentation to the borrower.",
            "type": "string"
          },
          "errorDescriptionInternal": {
            "description": "The internal error description as received from the vendor.",
            "type": "string"
          },
          "errorType": {
            "description": "The error type. This describes the appropriate way to handle the error.",
            "enum": [
              "retry",
              "relink",
              "outage"
            ],
            "type": "string"
          },
          "errorTypeByVendor": {
            "description": "The error type as received from the vendor.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AccountLink": {
        "description": "An object representing a link with a third party vendor (e.g. Plaid) that allows fetching additional account details.",
        "properties": {
          "accessToken": {
            "description": "The vendor's access token for initial access. With Plaid, this can be the `public_token` provided by Plaid Link, or the `access_token` provided after exchanging the public token.",
            "type": "string"
          },
          "accountId": {
            "description": "The identifier used to identify an account with the data vendor.",
            "type": "string"
          },
          "dataServices": {
            "default": [
              "accountInfo"
            ],
            "description": "A list of data services available with this link.",
            "items": {
              "enum": [
                "accountInfo",
                "balance"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "errorCommunicationsSent": {
            "description": "The number of times the user has been notified that the account link has failed and needs to be recreated.",
            "readOnly": true,
            "type": "integer"
          },
          "itemId": {
            "description": "The vendor's item identifier. With Plaid, this is the `item_id`.",
            "type": "string"
          },
          "lastErrorCommunicationAt": {
            "description": "The date and time that the most recent error notification was sent to the user.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "recentError": {
            "allOf": [
              {
                "description": "The most recent error that occurred while fetching data from this link."
              },
              {
                "$ref": "#/components/schemas/AccountLinkError"
              }
            ]
          },
          "status": {
            "description": "The status of the account link.",
            "enum": [
              "active",
              "inactive"
            ],
            "type": "string"
          },
          "vendor": {
            "description": "The data vendor identifier.",
            "enum": [
              "plaid"
            ],
            "type": "string"
          }
        },
        "required": [
          "vendor",
          "accessToken",
          "accountId"
        ],
        "type": "object"
      },
      "BankAccountMutableFields": {
        "properties": {
          "accountHolderName": {
            "description": "For `personal` accounts, the full name of the account holder. For `business` accounts, the business name.\n\n<strong style=\"color: red\">This is not an account nickname. It should match the name on file for the account with the bank.</strong>\n",
            "type": "string"
          },
          "accountHolderType": {
            "description": "Type of entity that is the account holder.",
            "enum": [
              "business",
              "personal"
            ],
            "type": "string"
          },
          "accountLink": {
            "$ref": "#/components/schemas/AccountLink"
          },
          "accountType": {
            "description": "Type of the account.",
            "enum": [
              "checking",
              "savings"
            ],
            "type": "string"
          },
          "institutionName": {
            "description": "The name of the financial institution where this account resides. If empty, will default to the name associated\nwith the routing number.\n",
            "maxLength": 36,
            "type": "string"
          }
        },
        "type": "object"
      },
      "BankAccount": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaymentInstrumentImmutableFields"
          },
          {
            "$ref": "#/components/schemas/PaymentInstrumentFailureReasons"
          },
          {
            "$ref": "#/components/schemas/PaymentInstrumentMutableFields"
          },
          {
            "$ref": "#/components/schemas/BankAccountImmutableFields"
          },
          {
            "$ref": "#/components/schemas/BankAccountMutableFields"
          }
        ],
        "required": [
          "accountHolderName",
          "accountHolderType",
          "accountNumber",
          "accountType",
          "instrumentType",
          "routingNumber"
        ],
        "title": "Bank Account"
      },
      "bankAccountAccountNumber": {
        "properties": {
          "accountNumber": {
            "description": "The account number.\nIf `isExternal=true` then the last two, three, or four digits of the account number can be provided.\nProvide four digits if available, otherwise provide two or three digits.\n",
            "pattern": "^[0-9]+$",
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "accountNumber"
        ],
        "type": "object"
      },
      "SettlementInstrument": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BankAccount"
          },
          {
            "$ref": "#/components/schemas/bankAccountAccountNumber"
          },
          {
            "properties": {
              "investorId": {
                "description": "Public ID of the investor.",
                "readOnly": true,
                "type": "string"
              },
              "verified": {
                "readOnly": true
              }
            },
            "type": "object"
          }
        ]
      },
      "BankAccountMutable": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaymentInstrumentMutableFields"
          },
          {
            "$ref": "#/components/schemas/BankAccountMutableFields"
          }
        ],
        "title": "Bank Account"
      },
      "SettlementInstrumentMutable": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BankAccountMutable"
          },
          {
            "type": "object"
          }
        ]
      },
      "LoanIdsResponse": {
        "properties": {
          "loanIds": {
            "description": "The list of loans which have the specified label(s) and match the path and query parameters.\n",
            "items": {
              "type": "string"
            },
            "maxItems": 100,
            "type": "array"
          }
        },
        "type": "object"
      },
      "LoanIdsRequest": {
        "properties": {
          "loanIds": {
            "description": "The unique identifier of the loans. Can be Peach or lender's external identifier.\n",
            "items": {
              "type": "string"
            },
            "maxItems": 100,
            "type": "array"
          }
        },
        "type": "object"
      },
      "LoanTapeFields": {
        "items": {
          "enum": [
            "reportDate",
            "investorId",
            "investorLegalName",
            "investorOwnershipPercentage",
            "secondInvestorId",
            "secondInvestorLegalName",
            "secondInvestorOwnershipPercentage",
            "loanId",
            "loanStatus",
            "loanExternalId",
            "loanType",
            "loanTypeId",
            "mainBorrowerId",
            "mainBorrowerExternalId",
            "currentCreditLimit",
            "activationDate",
            "lastDueDate",
            "effectiveAPR",
            "interestRate",
            "indexRate",
            "promoRate",
            "interestType",
            "contractualRecurringAmount",
            "amountFinanced",
            "firstDueDateExpectedAmount",
            "firstDueDatePaymentAmountByDueDate",
            "upcomingDueDate",
            "upcomingDueDateExpectedAmount",
            "outstandingBalanceTotalAmount",
            "outstandingBalancePrincipalAmount",
            "outstandingBalanceInterestAmount",
            "outstandingBalanceFeesAmount",
            "creditsAppliedTotalAmount",
            "paymentsMadeTotalAmount",
            "paymentsMadePrincipalAmount",
            "paymentsMadeInterestAmount",
            "paymentsMadeFeesAmount",
            "paymentsMadeOverAmount",
            "paymentsMadeReimbursementsAmount",
            "lastSuccessfulPaymentEffectiveDate",
            "lastSuccessfulPaymentTotalAmount",
            "lastSuccessfulPaymentPrincipalAmount",
            "lastSuccessfulPaymentInterestAmount",
            "lastSuccessfulPaymentFeesAmount",
            "isAutopayOn",
            "recentAutopayAuthorizationDate",
            "isOverdue",
            "overdueNumberDays",
            "overdueBalanceTotalAmount",
            "overdueBalancePrincipalAmount",
            "overdueBalanceInterestAmount",
            "overdueBalanceFeesAmount",
            "nonDueBalanceTotalAmount",
            "nonDueBalancePrincipalAmount",
            "nonDueBalanceInterestAmount",
            "nonDueBalanceFeesAmount",
            "dailyInterestAccruedAmount",
            "dailyInterestDiscountAmount",
            "dailyForgoneInterestCapAmount",
            "dueBalanceTotalAmount",
            "dueBalancePrincipalAmount",
            "dueBalanceInterestAmount",
            "dueBalanceFeesAmount",
            "timesOverdue15Days",
            "timesOverdue30Days",
            "timesOverdue60Days",
            "timesOverdue90Days",
            "timesOverdue120Days",
            "isChargedOff",
            "chargedOffDate",
            "chargedOffPrincipalAmount",
            "chargedOffInterestAmount",
            "chargedOffFeesAmount",
            "chargedOffTotalAmount",
            "chargedOffReason",
            "netInterestAccruedTotalAmount",
            "interestDiscountTotalAmount",
            "forgoneInterestCapAmount",
            "reimbursementAmount",
            "mainBorrowerFirstName",
            "mainBorrowerLastName",
            "mainBorrowerDateOfBirth",
            "mainBorrowerIdentityType",
            "mainBorrowerIdentityValue",
            "mainBorrowerIdentityIssuingCountry",
            "mainBorrowerIdentityIssueDate",
            "mainBorrowerIdentityExpirationDate",
            "mainBorrowerBusinessLegalName",
            "mainBorrowerBusinessType",
            "isInSCRAStatus",
            "activeDutyStartDate",
            "activeDutyEndDate",
            "isInBankruptcy",
            "bankruptcyFiledDate",
            "bankruptcyCourtCaseNumber",
            "bankruptcyLastStatus",
            "bankruptcyDisposition",
            "bankruptcyChapter",
            "currentAddressState",
            "currentAddressPostalCode",
            "currentAddressLine1",
            "currentAddressLine2",
            "currentAddressCity",
            "currentAddressCountry",
            "currentEmail",
            "currentPhone",
            "refundedAmount",
            "merchantId",
            "merchantBusinessName",
            "originalDuration",
            "originalPaymentFrequency",
            "currentPaymentFrequency",
            "currentRecurringAmount",
            "paidOffDate",
            "loanMetaData",
            "isLoanModified",
            "principalAmount",
            "projectedPayoffDate",
            "remainingDuration",
            "dataStatus",
            "overdueOver30DaysBalanceTotalAmount",
            "overdueOver60DaysBalanceTotalAmount",
            "overdueOver90DaysBalanceTotalAmount",
            "overdueOver120DaysBalanceTotalAmount",
            "overdueOver150DaysBalanceTotalAmount",
            "overdueOver180DaysBalanceTotalAmount",
            "nonDueBalanceOriginationFeesAmount",
            "nonDueBalanceDrawFeesAmount",
            "nonDueBalanceLateFeesAmount",
            "nonDueBalanceModificationFeesAmount",
            "dueBalanceOriginationFeesAmount",
            "dueBalanceDrawFeesAmount",
            "dueBalanceLateFeesAmount",
            "dueBalanceModificationFeesAmount",
            "originationFeeAmount",
            "overdueBalanceOriginationFeesAmount",
            "overdueBalanceDrawFeesAmount",
            "overdueBalanceLateFeesAmount",
            "overdueBalanceModificationFeesAmount",
            "outstandingBalanceOriginationFeesAmount",
            "outstandingBalanceDrawFeesAmount",
            "outstandingBalanceLateFeesAmount",
            "outstandingBalanceModificationFeesAmount",
            "nonDueBalanceMembershipFeesAmount",
            "dueBalanceMembershipFeesAmount",
            "overdueBalanceMembershipFeesAmount",
            "outstandingBalanceMembershipFeesAmount"
          ],
          "type": "string"
        },
        "title": "Loan Tape Fields",
        "type": "array"
      },
      "PaymentTapeFields": {
        "items": {
          "enum": [
            "reportDate",
            "loanId",
            "loanExternalId",
            "investorId",
            "investorLegalName",
            "investorOwnershipPercentage",
            "secondInvestorId",
            "secondInvestorLegalName",
            "secondInvestorOwnershipPercentage",
            "transactionId",
            "transactionExternalId",
            "status",
            "effectiveDate",
            "totalAmount",
            "principalAmount",
            "interestAmount",
            "feesAmount",
            "unappliedAmount",
            "paymentMethodType",
            "processingFeeType",
            "processingFeeAmount",
            "isReversal",
            "isReimbursement",
            "reversingTransactionId",
            "reversingTransactionExternalId",
            "settlementId",
            "settlementDate"
          ],
          "type": "string"
        },
        "title": "Payment Tape Fields",
        "type": "array"
      },
      "BaseLoanTapeType": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "actionOnMissingData": {
                "default": "excludeFromTape",
                "description": "Due to various circumstances, it is possible that not all data needed to produce a given loan tape\nwill be available at the time of tape generation.\n\nIn this situation, there are two options for how these records will be represented in a tape:\n\n- `includeIDsAndEmptyData` (recommended) - The tape will include records that have missing data\n  (only `reportDate`, `loanId`, `mainBorrowerId`, `mainBorrowerExternalId`, `loanExternalId`,\n  and `dataStatus` columns will be populated, assuming they are configured).\n\n- `excludeFromTape` - Records with missing data will be dropped completely from the tape.\n  By choosing `excludeFromTape` lenders will be responsible for validating number of loans included within tapes.\n",
                "enum": [
                  "includeIDsAndEmptyData",
                  "excludeFromTape"
                ],
                "type": "string"
              },
              "compressionType": {
                "default": "gzip",
                "description": "Compression type used for result file.\n",
                "enum": [
                  "noCompression",
                  "gzip",
                  "zip"
                ],
                "type": "string"
              },
              "fieldNameMappings": {
                "description": "Mapping of fields from `fields` to field names used in the bank/investor's system.\n\nFor example: `{\"investorId\": \"investor_id\", \"isChargedOff\": \"loan_charged_off\"}`\n",
                "type": "object"
              },
              "fields": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/LoanTapeFields"
                  },
                  {
                    "$ref": "#/components/schemas/PaymentTapeFields"
                  }
                ],
                "description": "A list of fields to be included in a specific tape. There are two `tapeType` available - `loans` and `payments`.\nWhen you choose a list of fields, make sure to include only the values corresponding to `tapeType`.\nFor example: `tapeType=loans` cannot have an attribute `paymentMethodType` because that field is only relevant to `tapeType=payments`.\n\n`loanMetaData` - is a special field. If included, the caller must provide the `loanMetaDataFields` attribute.\n\n`mainBorrowerIdentityValue` - is the borrower's identity number such as SSN, ITIN, tax ID, FEIN, etc.\nThis value is encrypted in Peach system. If you want to export that value in loan tapes, you must have `encryptionMethod`\nand `publicKey` set when you call \"Create loan tape\". In other words, loan tape must be encrypted in order to\npopulate `mainBorrowerIdentityValue`.\n"
              },
              "loanMetaDataFields": {
                "default": [],
                "description": "A list of loan's `metaData` keys/values to be included in a specific tape.\nLoan's `metaData` attribute consists of key/value pairs in the form of a JSON dictionary.\nThe `loanMetaDataFields` value must be provided if `loanMetaData` is included in the fields list.\nIf the key cannot be found in the loan's `metaData` attribute, the tape will populate the column name\n(aka key) but will not populate the value (aka the value will be empty).\nIf found, each column name will be the \"key\" + \"LoanMetaData\" and the value will be the \"value\".\nThe search/look up of the `loanMetaDataFields` key in the loan's `metaData` attribute is case-sensitive.\nPeach doesn't know what data is provided in the loan's `metaData` attribute, and we don't check validity of the key/value pairs.\nIt's lender/caller responsibility to make sure that the loan's `metaData` attribute has valid and formatted values.\n",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "moneyUnit": {
                "default": "subUnit100",
                "description": "If `subUnit100`, the amount fields in loan tapes will be in pennies. For example: 100 means $1.00 (one dollar).\n\nIf `fullUnit`, the amount fields in loan tapes will be in decimal format with 2 places after the decimal point.\nFor example: 32.45 is thirty-two dollars and forty-five cents.\n",
                "enum": [
                  "fullUnit",
                  "subUnit100"
                ],
                "type": "string"
              },
              "reportDaysWhenPaidOff": {
                "default": 10,
                "description": "Number of days to report a loan after it was changed to `paidOff`.\nMake sure you check that your loan types are configured to generate snapshots for number of days that is greater than reportDaysWhenPaidOff for loans that are in paidOff status.\nIf your company has many loan types, please check them all.\nLoans without snapshots data cannot be reported in the loan tape\n",
                "minimum": 10,
                "type": "integer"
              },
              "shouldReportDrawsSeparately": {
                "default": false,
                "description": "Indicates whether LOC Draws should be reported as separate rows in loan tape. LOC will always be reported on an aggregated level.\n",
                "type": "boolean"
              },
              "tapeName": {
                "description": "A friendly name for the tape.\n",
                "type": "string"
              },
              "tapeOutputFormat": {
                "default": "CSV",
                "description": "The tape output format.",
                "enum": [
                  "CSV"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "TapeType": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseLoanTapeType"
          },
          {
            "properties": {
              "tapeType": {
                "description": "The loan tape type.\n\n`loans` - the tape includes information about accounts (e.g. loans).\n\n`payments` - the tape includes information about payments made by borrowers.\n",
                "enum": [
                  "loans",
                  "payments"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "LoanTape": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "customFileName": {
                "description": "If provided, will override the default file name for new loan tape files created.\n[Date and time placeholders](https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes) may be used, along with the following placeholders:\n\n- `{{loanTapeId}}` the loan tape ID.\n- `{{loanTapeTypeId}}` the loan tape type ID.\n\nFor example, a value of `loan_tape_{{loanTapeId}}_%m_%d_%Y.csv` might look like `loan_tape_TA-DJEK-CVDE_02_12_2022.csv` when generated.\n",
                "nullable": true,
                "type": "string"
              },
              "dateForCustomFileName": {
                "default": "dateOfGeneration",
                "description": "Controls the date value for the `customFileName` field. Options:\n\n- `reportDate`: Uses the `reportDate` of the loan tape record\n- `dateOfGeneration`: Uses the date when the loan tape record was generated\n",
                "enum": [
                  "reportDate",
                  "dateOfGeneration"
                ],
                "nullable": true,
                "type": "string"
              },
              "encryptionMethod": {
                "description": "The encryption method that Peach system with use to encrypt the files.\n",
                "enum": [
                  "GPG"
                ],
                "nullable": true,
                "type": "string"
              },
              "investorId": {
                "description": "The investor ID.",
                "nullable": true,
                "type": "string"
              },
              "loanTapeTypeId": {
                "description": "The loan tape type ID.",
                "type": "string"
              },
              "publicKey": {
                "description": "The lender's public key to use to encrypt the files. A value must be passed if encryptionMethod is set.",
                "nullable": true,
                "type": "string"
              },
              "sftpAccessMethod": {
                "default": "usernamePassword",
                "description": "If `usernamePassword`, then `sftpUsername` and `sftpPassword` must be provided.\n\nIf `keys`, then `sftpSSHPeachPrivateKey` and `sftpSSHPeachPublicKey` will be created by peach.\n",
                "enum": [
                  "usernamePassword",
                  "keys"
                ],
                "type": "string"
              },
              "sftpCdDir": {
                "description": "Change directory into this folder before performing the upload.\n",
                "nullable": true,
                "type": "string"
              },
              "sftpHostname": {
                "description": "The hostname for SFTP.\nHost name should not contain a scheme, so don't put `sftp://` on the front. You may optionally specify a port like so: `example.com:222`.\nIf no port is supplied a default of 22 will be used.\n",
                "pattern": "^[^/]+$",
                "type": "string"
              },
              "sftpPassword": {
                "description": "The password for SFTP.",
                "type": "string"
              },
              "sftpSSHPeachPublicKey": {
                "description": "Peach public key to be used when log into `sftpHostname`.\nThe value can be only be set by the Peach team.\n",
                "readOnly": true,
                "type": "string"
              },
              "sftpUsername": {
                "description": "The username for SFTP.",
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "RepaymentNotificationTrigger": {
        "description": "A description of the conditions that trigger a communication. NOTE: `autopayExpectedPaymentChangedAmount` will never occur for LOC,\nbecause autopays are finalized after the statement date and not updated again.\n",
        "enum": [
          "autopayFirstPayment",
          "autopayExpectedPayment",
          "autopayExpectedPaymentChangedAmount",
          "cardExpiration",
          "expectedPayment",
          "futurePayment",
          "loginFirstPayment",
          "loanOverdue",
          "loanRightToCure",
          "promoProgramReminder",
          "promoProgramEligibilityAtRisk"
        ],
        "example": "expectedPayment",
        "readOnly": true,
        "type": "string"
      },
      "RepaymentEngineInteractionSubject": {
        "description": "The `InteractionSubject` for the notification that is sent to the borrower.",
        "enum": [
          "autopayAmountChanged",
          "autopayEnableReminder",
          "autopayPaymentReminder",
          "cardExpiresReminder",
          "futurepayPaymentDueReminder",
          "loanOverdueFirstNotice",
          "loanOverdueSecondNotice",
          "loanOverdueThirdNotice",
          "loanOverdueFourthNotice",
          "loanOverdueFifthNotice",
          "loanOverdueSixthNotice",
          "loanRightToCurePersonalUnsecured",
          "loginFirstPaymentReminder",
          "paymentDueDateReminder",
          "promoProgramReminder",
          "promoProgramEligibilityAtRisk"
        ],
        "example": "paymentDueDateReminder",
        "type": "string"
      },
      "ValidInteractionChannel": {
        "enum": [
          "email",
          "text",
          "mail"
        ],
        "type": "string"
      },
      "DaysOffsetDueDate": {
        "oneOf": [
          {
            "description": "The number of days offset from the due date that a notification is sent. Should be negative for reminders and positive for\noverdue notices.\n\nWhen `subject=loanRightToCurePersonalUnsecured`, then `loanType.rightToCureBuffer` will be used to\ncompute the offset.\n\nWhen `subject=autopayAmountChanged`, then `loanType.autopay.amountChangeNotificationBuffer` will be used\nto compute the offset.\n\nWhen `subject=promoProgramReminder` or `promoProgramEligibilityAtRisk`, the reminder will trigger `daysOffsetDueDate`\nafter the `PromoProgram` end date, which is why the value should be negative for the reminder and positive for `promoProgramEligibilityAtRisk`.\n",
            "example": -5,
            "nullable": true,
            "type": "integer"
          },
          {
            "description": "This object controls the exact date on which the loanOverdue reminder is sent. Note that the offsets are absolute.\n",
            "properties": {
              "everyTwoWeeks": {
                "description": "If the notification type has `trigger=loanOverdue` and `isDueDatesAvailableEveryTwoWeeks` is true on this loan type,\nthen this offset will be used for loans with payments that are due every two weeks.\n",
                "type": "integer"
              },
              "monthly": {
                "description": "If the notification type has `trigger=loanOverdue` and `isDueDatesAvailableTwiceMonthly` is true on this loan type,\nthen this offset will be used for loans with monthly payments.\n",
                "type": "integer"
              },
              "singleTerm": {
                "description": "If the notification type has `trigger=loanOverdue` and `isDueDatesAvailableSingleTerm` is true on this loan type,\nthen this offset will be used for loans with a single term payment.\n",
                "type": "integer"
              },
              "twiceMonthly": {
                "description": "If the notification type has `trigger=loanOverdue` and `isDueDatesAvailableTwiceMonthly` is true on this loan type,\nthen this offset will be used for loans with twice monthly payments.\n",
                "type": "integer"
              },
              "weekly": {
                "description": "If the notification type has `trigger=loanOverdue` and `isDueDatesAvailableWeekly` is true on this loan type,\nthen this offset will be used for loans with weekly payments.\n",
                "type": "integer"
              }
            },
            "type": "object"
          }
        ]
      },
      "RepaymentNotificationTypeWithoutSubject": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "companyId": {
                "description": "The company identifier for this notification type.",
                "readOnly": true,
                "type": "string"
              },
              "dayType": {
                "$ref": "#/components/schemas/DayType"
              },
              "daysOffsetDueDate": {
                "$ref": "#/components/schemas/DaysOffsetDueDate"
              },
              "loanOverdueWindow": {
                "description": "**DEPRECATED ATTRIBUTE** Window in which to start sending this notification. Only used for `trigger=loanOverdue`.\n",
                "properties": {
                  "from": {
                    "description": "Days after the loan is overdue to start sending this notification type.\n",
                    "example": 0,
                    "type": "integer"
                  },
                  "to": {
                    "description": "Days after the loan is overdue to stop sending this notification type.\n",
                    "example": 30,
                    "type": "integer"
                  }
                },
                "readOnly": true,
                "required": [
                  "from",
                  "to"
                ],
                "type": "object"
              },
              "loanTypeAssetName": {
                "type": "string"
              },
              "productId": {
                "type": "string"
              },
              "promoType": {
                "description": "Only used for notifications with subject `promoProgramReminder` and `promoProgramEligibilityAtRisk`",
                "enum": [
                  "sameAsCash"
                ],
                "nullable": true,
                "type": "string"
              },
              "sendChannels": {
                "default": [
                  "email",
                  "text"
                ],
                "description": "The channels to send the notification to. By default, the notification is sent to `text` and `email`\nchannels.\n\nThe system always attempts to send to *all* specified channels. As long as at least one contact of the \nspecified channels is available to send to then the notification will considered successful. An error is\nthrown if all three channels are unavailable for the borrower.\n",
                "items": {
                  "$ref": "#/components/schemas/ValidInteractionChannel"
                },
                "type": "array"
              },
              "status": {
                "enum": [
                  "active",
                  "inactive"
                ],
                "type": "string"
              },
              "trigger": {
                "$ref": "#/components/schemas/RepaymentNotificationTrigger"
              }
            },
            "type": "object"
          }
        ]
      },
      "RepaymentNotificationType": {
        "allOf": [
          {
            "properties": {
              "subject": {
                "$ref": "#/components/schemas/RepaymentEngineInteractionSubject"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/RepaymentNotificationTypeWithoutSubject"
          }
        ]
      },
      "ResponseEndDate": {
        "description": "The end date of the promise to pay plan, equal to the `dueDate` of plan's last promise period.\n",
        "format": "date",
        "type": "string"
      },
      "ExternalId": {
        "description": "A lender's identifier for a promise to pay plan.\nAfter the object is successfully created, a lender can use ID or externalId identifiers to fetch the object.\nTo fetch the object using externalId you need to add `ext-` to the URL.\nNote: Don't add ext- to the identifier value. For example: if the external identifier is `ABCDE`, then pass \nexternalId=ACBCE and NOT ext-ABCDE when creating the object.\n",
        "nullable": true,
        "type": "string"
      },
      "ResponseStartDate": {
        "description": "The start date of the promise to pay plan, equal to the `startDate` of plan's first promise period.\n",
        "format": "date",
        "type": "string"
      },
      "PromiseToPayPlan": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "cancellationReason": {
                "description": "The reason for canceling the promise to pay plan.\n\n`canceledByUser` - Promise to pay plan was canceled by an agent or borrower.\n`loanChargedOff` - loan was charged off during the promise period.\n`loanAccelerated` - loan was accelerated during the promise period.\n`otherPromisePlanOffered` - another promise plan was offered.\n`other` - for any other reason requiring cancellation.\n",
                "enum": [
                  "canceledByUser",
                  "loanChargedOff",
                  "loanAccelerated",
                  "otherPromisePlanOffered",
                  "other"
                ],
                "nullable": true,
                "type": "string"
              },
              "caseId": {
                "description": "The ID of the case associated with the promise to pay plan.",
                "nullable": true,
                "type": "string"
              },
              "companyId": {
                "description": "The unique company identifier.",
                "type": "string"
              },
              "endDate": {
                "$ref": "#/components/schemas/ResponseEndDate"
              },
              "externalId": {
                "$ref": "#/components/schemas/ExternalId"
              },
              "id": {
                "description": "The promise to pay plan ID.",
                "type": "string"
              },
              "isOverdue": {
                "description": "The borrower has not met one or more promised amounts by the promised due date.",
                "type": "boolean"
              },
              "loanId": {
                "description": "The unique loan identifier that the promise belongs to.",
                "type": "string"
              },
              "object": {
                "default": "promiseToPayPlan",
                "enum": [
                  "promiseToPayPlan"
                ],
                "readOnly": true,
                "type": "string"
              },
              "reasonDetails": {
                "description": "Additional details about the reason for canceling the promise to pay plan.",
                "nullable": true,
                "type": "string"
              },
              "schedule": {
                "description": "Promise to pay plan periodId(s) and amount(s).",
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/BaseMixin"
                    },
                    {
                      "properties": {
                        "amount": {
                          "description": "Amount of the promise to pay period.",
                          "format": "float",
                          "type": "number"
                        },
                        "dueDate": {
                          "description": "The due date of the promised amount.",
                          "format": "date",
                          "type": "string"
                        },
                        "object": {
                          "default": "promisePeriod",
                          "enum": [
                            "promisePeriod"
                          ],
                          "readOnly": true,
                          "type": "string"
                        },
                        "periodId": {
                          "description": "Unique identifier of the period created for the promise to pay plan.",
                          "type": "string"
                        },
                        "startDate": {
                          "description": "The period start date.",
                          "format": "date",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "startDate": {
                "$ref": "#/components/schemas/ResponseStartDate"
              },
              "status": {
                "description": "The status of the promise to pay plan. \n\n`scheduled` - promise to pay has been created but has not yet started. Typically used when the lender wants to \nstart a promise as of a specific date. Communications will not be triggered and tasks will not be assigned to \nagents for promise to pay plans in `scheduled` status. Peach's system will transition the status of the promise\nto pay plan to `active` on the `startDate` unless the lender cancels the promise to pay beforehand. \n\n`active` - promise to pay plan is in effect. To check if the borrower is on and behind the schedule, see the `\nisOverdue` attribute.\n\n`kept` - promise to pay final period end date has passed and the borrower has met the promised amount(s) by the \npromise's final period end date. This status is a terminal state.\n\n`broken` - promise to pay final period end date has passed and the borrower has not met the promised amount(s) \nby the promise's final period end date. This status is a terminal state.\n\n`canceled` - promise to pay plan was canceled. This status is a terminal state.\n",
                "enum": [
                  "scheduled",
                  "active",
                  "kept",
                  "broken",
                  "canceled"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "Merchant": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "address": {
                "$ref": "#/components/schemas/AddressBase",
                "description": "The mailing address."
              },
              "businessName": {
                "description": "The business name of the merchant. Can be displayed in UI.\n",
                "type": "string"
              },
              "businessTypeDisplayName": {
                "description": "The business type/description as shown to borrowers. For\nexample: 'Merchant', 'Dealer', or 'Venue'. Defaults to\n'Merchant' if no value is provided.\n",
                "type": "string"
              },
              "disputesContactEmail": {
                "description": "The email of the merchant's disputes department.\n",
                "maxLength": 320,
                "type": "string"
              },
              "disputesContactName": {
                "description": "The name of the merchant's disputes department.\n",
                "maxLength": 256,
                "type": "string"
              },
              "disputesContactPhone": {
                "description": "The phone number of the merchant's disputes department.\n",
                "maxLength": 15,
                "type": "string"
              },
              "externalId": {
                "description": "A lender's identifier for the merchant.\n",
                "type": "string"
              },
              "parentMerchantId": {
                "description": "The parent merchant identifier. Used to represent hierarchy of merchant sub entities.\nCan be Peach or lender's external identifier.\n",
                "nullable": true,
                "type": "string"
              },
              "primaryContactEmail": {
                "description": "The email of the merchant's primary contact person or department.\n",
                "maxLength": 320,
                "type": "string"
              },
              "primaryContactName": {
                "description": "The name of the merchant's primary contact person or department.\n",
                "maxLength": 256,
                "type": "string"
              },
              "primaryContactPhone": {
                "description": "The phone number of the merchant's primary contact person or department.\n",
                "maxLength": 15,
                "type": "string"
              },
              "subEntityname": {
                "description": "The sub entity business name of the merchant. For example: Online Sephora.\n",
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "fileName": {
        "description": "The name of the ACH file.\n",
        "minLength": 1,
        "type": "string"
      },
      "AchFileUploadDetails": {
        "allOf": [
          {
            "properties": {
              "uploadFailedAt": {
                "description": "The datetime when the upload of the ACH file failed.\n",
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "uploadNumberOfRetries": {
                "default": 0,
                "description": "The number of upload retries for the ACH file.\n",
                "minimum": 0,
                "nullable": true,
                "type": "integer"
              },
              "uploadStartedAt": {
                "description": "The datetime when the upload of the ACH file began.\n",
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "uploadSucceededAt": {
                "description": "The datetime when the upload of the ACH file finished successfully.\n",
                "format": "date-time",
                "nullable": true,
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "AchFileMutableFields": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "fileName": {
                "$ref": "#/components/schemas/fileName"
              },
              "gcp": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AchFileUploadDetails"
                  }
                ],
                "description": "GCP Storage upload details"
              },
              "isSettlement": {
                "default": false,
                "description": "- If true, the file contains only settlement transactions with investors.\n- If false, the file contains only transactions with borrowers.\n",
                "type": "boolean"
              },
              "numberOfMicrodeposits": {
                "default": 0,
                "description": "The number of microdeposits included in this ACH file.\n",
                "minimum": 0,
                "type": "integer"
              },
              "numberOfTransactions": {
                "default": 0,
                "description": "The number of transactions included in this ACH file.\n",
                "minimum": 0,
                "type": "integer"
              },
              "sftp": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AchFileUploadDetails"
                  }
                ],
                "description": "SFTP Server upload details"
              }
            },
            "type": "object"
          }
        ]
      },
      "AchFile": {
        "allOf": [
          {
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/AchFileMutableFields"
          }
        ],
        "required": [
          "fileName"
        ],
        "title": "ACH File"
      },
      "FundingInstrument": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BankAccount"
          },
          {
            "properties": {
              "verified": {
                "readOnly": true
              }
            },
            "type": "object"
          }
        ]
      },
      "FundingInstrumentMutable": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BankAccountMutable"
          },
          {
            "type": "object"
          }
        ]
      },
      "WorkflowStepStatus": {
        "enum": [
          "due",
          "approved",
          "rejected",
          "skipped"
        ],
        "type": "string"
      },
      "CaseApprovalConditions": {
        "description": "Set of steps' statuses that must be met before case outcome can be set\nto approved. Currently, we support \"and\" only between the steps.\n",
        "items": {
          "properties": {
            "stepStatus": {
              "$ref": "#/components/schemas/WorkflowStepStatus"
            },
            "stepTypeRefId": {
              "format": "uuid",
              "type": "string"
            }
          },
          "type": "object"
        },
        "nullable": true,
        "type": "array"
      },
      "DecisionQuestionType": {
        "enum": [
          "yesNo",
          "approveReject"
        ],
        "type": "string"
      },
      "StatusChangeHistory": {
        "description": "The status change history of workflow steps and work items.\n",
        "items": {
          "additionalProperties": false,
          "properties": {
            "status": {
              "type": "string"
            },
            "time": {
              "format": "date-time",
              "type": "string"
            },
            "user": {
              "type": "integer"
            }
          },
          "type": "object"
        },
        "type": "array"
      },
      "StepVisibility": {
        "enum": [
          "normal",
          "closingApproved",
          "closingDenied",
          "closingFalsePositive",
          "closingNoOutcome"
        ],
        "type": "string"
      },
      "WorkflowWorkitemStatus": {
        "enum": [
          "due",
          "completed",
          "skipped"
        ],
        "type": "string"
      },
      "WorkflowWorkitem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "completedAt": {
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "descriptionLong": {
                "nullable": true,
                "type": "string"
              },
              "descriptionShort": {
                "type": "string"
              },
              "history": {
                "$ref": "#/components/schemas/StatusChangeHistory"
              },
              "object": {
                "default": "workflowWorkitem",
                "enum": [
                  "workflowWorkitem"
                ],
                "readOnly": true,
                "type": "string"
              },
              "skippedAt": {
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "status": {
                "$ref": "#/components/schemas/WorkflowWorkitemStatus"
              },
              "updatedBy": {
                "$ref": "#/components/schemas/UserActionInfo",
                "description": "Details of the user who last updated this work item.\nCan be an agent or automated system process.\n"
              },
              "workflowStepId": {
                "type": "string"
              },
              "workflowWorkitemTypeId": {
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "WorkflowStep": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "completedAt": {
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "decisionQuestion": {
                "description": "Decision question that leads to the outcome of the step.\n",
                "type": "string"
              },
              "decisionQuestionType": {
                "$ref": "#/components/schemas/DecisionQuestionType"
              },
              "descriptionLong": {
                "description": "Additional details on how to complete the step.\n",
                "nullable": true,
                "type": "string"
              },
              "descriptionShort": {
                "description": "A short description of the step. Displayed to agents in the UI.\n",
                "type": "string"
              },
              "history": {
                "$ref": "#/components/schemas/StatusChangeHistory"
              },
              "mandatory": {
                "type": "boolean"
              },
              "object": {
                "default": "workflowStep",
                "enum": [
                  "workflowStep"
                ],
                "readOnly": true,
                "type": "string"
              },
              "skippedAt": {
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "status": {
                "$ref": "#/components/schemas/WorkflowStepStatus"
              },
              "updatedBy": {
                "$ref": "#/components/schemas/UserActionInfo",
                "description": "Details of the user who last updated this workflow step.\nCan be an agent or automated system process.\n"
              },
              "visibility": {
                "$ref": "#/components/schemas/StepVisibility"
              },
              "workItems": {
                "description": "List of work items that comprise this workflow step.\n",
                "items": {
                  "$ref": "#/components/schemas/WorkflowWorkitem"
                },
                "type": "array"
              },
              "workflowId": {
                "type": "string"
              },
              "workflowStepTypeId": {
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "Workflow": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "approvalConditions": {
                "$ref": "#/components/schemas/CaseApprovalConditions"
              },
              "completedAt": {
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "description": {
                "description": "Description of the workflow.",
                "type": "string"
              },
              "name": {
                "description": "Short name of the workflow.\n",
                "type": "string"
              },
              "object": {
                "default": "workflow",
                "enum": [
                  "workflow"
                ],
                "readOnly": true,
                "type": "string"
              },
              "steps": {
                "description": "List of workflow steps that comprise the workflow.\n",
                "items": {
                  "$ref": "#/components/schemas/WorkflowStep"
                },
                "type": "array"
              },
              "workflowTypeId": {
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "LoanInvestorsPaging": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Paging"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/LoanInvestorsGet"
              }
            },
            "type": "object"
          }
        ]
      },
      "PromoProgramTypeFields": {
        "properties": {
          "description": {
            "description": "A legal description of the promotional program as it should\nbe communicated and shown to borrowers.\nIf the description is provided, borrowers will see the\ndescription in the App / Borrower Portal and/or on\nstatements.\n",
            "maxLength": 10000,
            "type": "string"
          },
          "displayName": {
            "description": "The promotional program name as it is shown to borrowers in\nthe App / Borrower Portal and/or on statements.\n",
            "type": "string"
          },
          "externalId": {
            "description": "A lender's unique identifier for a specific promotional\nprogram type.\n",
            "type": "string"
          },
          "id": {
            "description": "The promotional program type's unique identifier.",
            "readOnly": true,
            "type": "string"
          },
          "metaData": {
            "description": "Store any type of key/value pairs in the form of a JSON\ndictionary.\n",
            "nullable": true,
            "type": "object"
          },
          "status": {
            "default": "draft",
            "description": "The promo type status.\nA new type is normally created in the `draft` status.\nWhen you are ready to offer the promotional program type on\nloans, update the status to `active`.\n\nIf the status changes to `deprecated`, the promotional\nprogram cannot be used on new loans.\nLoans in-flight will continue to be eligible to the\ndeprecated promotional program.\n",
            "enum": [
              "draft",
              "active",
              "deprecated"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "PromoProgramTypePaging": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Paging"
          },
          {
            "properties": {
              "data": {
                "items": {
                  "$ref": "#/components/schemas/PromoProgramTypeFields"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "PromoType": {
        "description": "The promotional program type.\n\n`sameAsCash` - presently only available for installment loans.\n\n`deferredInterest` - presently only available for Lines of\nCredit / Draws.\n",
        "enum": [
          "sameAsCash",
          "deferredInterest"
        ],
        "type": "string"
      },
      "PromoProgramTypePost": {
        "allOf": [
          {
            "required": [
              "promoType",
              "displayName"
            ]
          },
          {
            "properties": {
              "promoType": {
                "$ref": "#/components/schemas/PromoType"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/PromoProgramTypeFields"
          }
        ],
        "description": "Create a promo program type"
      },
      "PromoProgramTypePut": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PromoProgramTypeFields"
          }
        ],
        "description": "Create a promo program type"
      },
      "SupercaseType": {
        "description": "The different types of supercases.\n\nNote that `supercaseType` is different from `subcaseType`. A `supercaseType` describes\nthe type of the supercase and cannot be changed after supercase creation.\n",
        "enum": [
          "generic",
          "federalEmergency"
        ],
        "type": "string"
      },
      "TaskWorkerPairingConfig": {
        "properties": {
          "companyId": {
            "readOnly": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "externalId": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "string"
          },
          "isDefault": {
            "description": "If `true` this pairing config is the default for the company. Only one pairing config\ncan be the default at a time.\n",
            "readOnly": true,
            "type": "boolean"
          },
          "name": {
            "description": "A human-readable name for this pairing config.\n",
            "type": "string"
          },
          "object": {
            "readOnly": true,
            "type": "string"
          },
          "overrideTwilioTaskWorkflowExpression": {
            "description": "If the characteristics of the tasks you wish to match cannot be fully described by the \n`taskMatch` object, you can override the Twilio \"TaskRouter expression\" used\nto match the workers by settings this field. (In which case you will see the\nvalue set here in the field `twilioTaskWorkflowExpression` as well.)\n\nThis field's syntax must conform to the Twilio \"TaskRouter Expression\" syntax[1].\n\nSince this syntax is not validated here, it may be difficult to debug invalid\nexpressions; as such, it is recommended you use the `taskMatch` object when possible.\n\nSome useful expression examples for TaskRouter task attributes:\n  \n- Matching a task with an email interaction which was sent to the email\n  address `support@loans.acme.com`.\n  `interaction.channel = \"email\" AND \"support@loans.acme.com\" IN interactionMeta.recipients.emails`\n- Matching an inbound phone call to a particular support phone number `+15555555555`: \n  `interaction.channel = \"voice\" AND interactionMeta.to.phone = \"+15555555555\"`\n\n[1] https://www.twilio.com/docs/taskrouter/expression-syntax\n",
            "type": "string"
          },
          "overrideTwilioWorkerQueueExpression": {
            "description": "If the characteristics of the workers you wish to match cannot be fully described by the \n`workerMatch` object, you can override the Twilio \"TaskRouter expression\" used\nto match the workers by settings this field. (In which case you will see the\nvalue set here in the field `twilioWorkerQueueExpression` as well.)\n\nThis field's syntax must conform to the Twilio \"TaskRouter Expression\" syntax[1].\n\nSince this syntax is not validated here, it may be difficult to debug invalid\nexpressions; as such, it is recommended you use the `workerMatch` object when possible.\n\n[1] https://www.twilio.com/docs/taskrouter/expression-syntax\n",
            "type": "string"
          },
          "priority": {
            "description": "The order in which this pairing config should be evaluated. Higher numbers are evaluated first.\n\nNote that the default pairing config is always evaluated LAST (and it's `priority` is always `null`.)\n",
            "nullable": true,
            "type": "integer"
          },
          "taskMatch": {
            "properties": {
              "case": {
                "properties": {
                  "autocreated": {
                    "description": "If `true` only match tasks with autocreated cases. If `false` match not-autocreated cases. If `null` match any.\n",
                    "nullable": true,
                    "type": "boolean"
                  },
                  "caseTypeEnums": {
                    "description": "List of `caseType`; match any task with a case with a case type matching in the list.\nNote this field is different from `caseTypeIds`, which matches on specific case type instance rather than the case type enum. If `null` match any case.\n",
                    "items": {
                      "$ref": "#/components/schemas/BaseCaseType"
                    },
                    "nullable": true,
                    "type": "array"
                  },
                  "caseTypeIds": {
                    "description": "List of case type IDs; match any task with a case with a case type present in the list.\nNote this field is different from `caseTypeEnums`, which matches on case type enum rather than a specific case type instance. If `null` match any.\n",
                    "items": {
                      "type": "string"
                    },
                    "nullable": true,
                    "type": "array"
                  }
                },
                "type": "object"
              },
              "interaction": {
                "properties": {
                  "channels": {
                    "description": "List of `interactionChannel`. Match any task with an `interaction` which has an `channel` present in the list. If `null` match any.\n",
                    "items": {
                      "$ref": "#/components/schemas/InteractionChannel"
                    },
                    "nullable": true,
                    "type": "array"
                  },
                  "directions": {
                    "description": "List of `interactionDirections`. Match any task with an `interaction` which has an `direction` present in the list. If `null` match any.\n",
                    "items": {
                      "$ref": "#/components/schemas/InteractionDirection"
                    },
                    "nullable": true,
                    "type": "array"
                  },
                  "subjects": {
                    "description": "List of `interactionSubject`. Match any task with an `interaction` which has an `subject` present in the list. If `null` match any.\n",
                    "items": {
                      "$ref": "#/components/schemas/InteractionSubject"
                    },
                    "nullable": true,
                    "type": "array"
                  },
                  "themes": {
                    "description": "List of `interactionTheme`. Match any task with an `interaction` which has an `theme` present in the list. If `null` match any.\n",
                    "items": {
                      "$ref": "#/components/schemas/InteractionTheme"
                    },
                    "nullable": true,
                    "type": "array"
                  }
                },
                "type": "object"
              },
              "not": {
                "description": "If `true` then match tasks NOT matching those specified in this `taskMatch` object.\n\n(Look in the `twilioWorkerQueueExpression` to see each individual expression clause\n`NOT`-ed when this is set.)\n",
                "nullable": true,
                "type": "boolean"
              },
              "supercase": {
                "properties": {
                  "supercaseTypeEnums": {
                    "description": "List of `supercaseType`; match any task with a supercase with a supercase type matching in the list.\nIf `null` match any task.\n",
                    "items": {
                      "$ref": "#/components/schemas/SupercaseType"
                    },
                    "nullable": true,
                    "type": "array"
                  }
                },
                "type": "object"
              },
              "taskTypes": {
                "items": {
                  "$ref": "#/components/schemas/TaskType"
                },
                "nullable": true,
                "type": "array"
              }
            },
            "type": "object"
          },
          "twilioTaskWorkflowExpression": {
            "description": "The Twilio \"TaskRouter Expression\" string used to match tasks.\n\nThis field is read-only because it's generated by configuring\nthe `taskMatch` object, or it's set via the `overrideTwilioTaskWorkflowExpression`\nfield.\n",
            "readOnly": true,
            "type": "string"
          },
          "twilioWorkerQueueExpression": {
            "description": "The Twilio \"TaskRouter expression\" string used to match workers.\n\nThis field is read-only because it's generated by configuring\nthe `workerMatch` object, or it is set via the `overrideTwilioWorkerQueueExpression`\nfield.\n",
            "readOnly": true,
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "workerMatch": {
            "description": "An object describing the characteristics of the workers to match to the tasks \nmatched in `taskMatch`.\n\nThe settings here are translated into Twilio \"expression syntax\"[1] and matched against\nthe workers' attributes. You can see the generated expression in the field \n`twilioWorkerQueueExpression`.\n\n[1] https://www.twilio.com/docs/taskrouter/expression-syntax\n",
            "properties": {
              "isManager": {
                "description": "If `true` match only manager employees. If `false` match only non-manager employees. If `null`\nmatch any.\n",
                "nullable": true,
                "type": "boolean"
              },
              "roleIds": {
                "description": "List of role IDs; match any employee which belongs to at least one of these roles. If `null` match any.\n",
                "items": {
                  "type": "string"
                },
                "nullable": true,
                "type": "array"
              },
              "teamIds": {
                "description": "List of team IDs; match any employee which belongs to at least one of these teams. If `null` match any.\n",
                "items": {
                  "type": "string"
                },
                "nullable": true,
                "type": "array"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "TaskWorkerPairingConfigPaging": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Paging"
          },
          {
            "properties": {
              "data": {
                "items": {
                  "$ref": "#/components/schemas/TaskWorkerPairingConfig"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "QueueWaitSplitInnerStatistics": {
        "properties": {
          "above": {
            "properties": {
              "reversations_accepted": {
                "type": "number"
              },
              "tasks_canceled": {
                "type": "number"
              }
            },
            "type": "object"
          },
          "below": {
            "properties": {
              "reversations_accepted": {
                "type": "number"
              },
              "tasks_canceled": {
                "type": "number"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "QueueWaitSplitStatistics": {
        "nullable": true,
        "properties": {
          "5": {
            "$ref": "#/components/schemas/QueueWaitSplitInnerStatistics"
          },
          "10": {
            "$ref": "#/components/schemas/QueueWaitSplitInnerStatistics"
          }
        },
        "type": "object"
      },
      "QueueWaitDurationStatistics": {
        "properties": {
          "avg": {
            "type": "number"
          },
          "max": {
            "type": "number"
          },
          "min": {
            "type": "number"
          },
          "total": {
            "type": "number"
          }
        },
        "type": "object"
      },
      "QueueActivityStatistics": {
        "properties": {
          "friendly_name": {
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "workers": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "TaskQueueData": {
        "properties": {
          "account_sid": {
            "type": "string"
          },
          "assignment_activity_name": {
            "nullable": true,
            "type": "string"
          },
          "assignment_activity_sid": {
            "nullable": true,
            "type": "string"
          },
          "cumulative_statistics": {
            "properties": {
              "avg_task_acceptance_time": {
                "type": "number"
              },
              "end_time": {
                "format": "date-time",
                "type": "string"
              },
              "reservations_accepted": {
                "type": "integer"
              },
              "reservations_canceled": {
                "type": "integer"
              },
              "reservations_created": {
                "type": "integer"
              },
              "reservations_rejected": {
                "type": "integer"
              },
              "reservations_rescinded": {
                "type": "integer"
              },
              "reservations_timed_out": {
                "type": "integer"
              },
              "split_by_wait_time": {
                "$ref": "#/components/schemas/QueueWaitSplitStatistics"
              },
              "start_time": {
                "format": "date-time",
                "type": "string"
              },
              "tasks_canceled": {
                "type": "integer"
              },
              "tasks_completed": {
                "type": "integer"
              },
              "tasks_deleted": {
                "type": "integer"
              },
              "tasks_entered": {
                "type": "integer"
              },
              "tasks_moved": {
                "type": "integer"
              },
              "wait_duration_in_queue_until_accepted": {
                "$ref": "#/components/schemas/QueueWaitDurationStatistics"
              },
              "wait_duration_until_accepted": {
                "$ref": "#/components/schemas/QueueWaitDurationStatistics"
              },
              "wait_duration_until_canceled": {
                "$ref": "#/components/schemas/QueueWaitDurationStatistics"
              }
            },
            "type": "object"
          },
          "date_created": {
            "format": "date-time",
            "type": "string"
          },
          "date_updated": {
            "format": "date-time",
            "type": "string"
          },
          "friendly_name": {
            "type": "string"
          },
          "max_reserved_workers": {
            "type": "integer"
          },
          "real_time_statistics": {
            "properties": {
              "activity_statistics": {
                "items": {
                  "$ref": "#/components/schemas/QueueActivityStatistics"
                },
                "type": "array"
              },
              "longest_relative_task_age_in_queue": {
                "type": "integer"
              },
              "longest_relative_task_sid_in_queue": {
                "nullable": true,
                "type": "string"
              },
              "longest_task_waiting_age": {
                "type": "integer"
              },
              "longest_task_waiting_sid": {
                "nullable": true,
                "type": "string"
              },
              "tasks_by_priority": {
                "type": "object"
              },
              "tasks_by_status": {
                "properties": {
                  "assigned": {
                    "type": "integer"
                  },
                  "canceled": {
                    "type": "integer"
                  },
                  "pending": {
                    "type": "integer"
                  },
                  "reserved": {
                    "type": "integer"
                  },
                  "wrapping": {
                    "type": "integer"
                  }
                },
                "type": "object"
              },
              "total_available_workers": {
                "type": "integer"
              },
              "total_eligible_workers": {
                "type": "integer"
              },
              "total_tasks": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "reservation_activity_name": {
            "nullable": true,
            "type": "string"
          },
          "reservation_activity_sid": {
            "nullable": true,
            "type": "string"
          },
          "sid": {
            "nullable": true,
            "type": "string"
          },
          "target_workers": {
            "nullable": true,
            "type": "string"
          },
          "task_order": {
            "type": "string"
          },
          "workspace_sid": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "TaskAssignmentStatus": {
        "enum": [
          "pending",
          "reserved",
          "assigned",
          "wrapping",
          "completed",
          "canceled"
        ],
        "type": "string"
      },
      "TaskAttributesBase": {
        "description": "The attributes of the task. These are the \"content\" of the task, which describe\nthe work to be done.\n",
        "properties": {
          "task_init_at": {
            "description": "The date and time the original task was created. This is the time the original task was created, not \nthe time the task was re-created, if it was re-created.\n",
            "type": "string"
          },
          "task_lifelong_id": {
            "description": "A unique identifier for the task that is guaranteed to be the same over the lifetime of the task\nevent if the task is re-created via the \"Unable To Complete\" functionality.\n",
            "type": "string"
          }
        },
        "type": "object"
      },
      "LoanTypesForTask": {
        "items": {
          "properties": {
            "ids": {
              "example": [
                "LT-AAAA-BBBB"
              ],
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "names": {
              "example": [
                "Foobar Installment Loan"
              ],
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "types": {
              "items": {
                "enum": [
                  "installment",
                  "lineOfCredit"
                ],
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "type": "array"
      },
      "BorrowerForTask": {
        "description": "The metadata of the borrower about which this task is the subject.\n",
        "properties": {
          "id": {
            "description": "The unique identifier for the borrower.\n",
            "example": "BO-AAAA-BBBB",
            "type": "string"
          },
          "loanTypes": {
            "$ref": "#/components/schemas/LoanTypesForTask",
            "description": "Type information about ALL the loans associated with this borrower.\n"
          },
          "name": {
            "description": "The full name of the borrower.\n",
            "type": "string"
          }
        },
        "type": "object"
      },
      "TwilioMinimalInteraction": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseTwilioMinimalInteraction"
          },
          {
            "properties": {
              "previousInteractionSubject": {
                "$ref": "#/components/schemas/InteractionSubject"
              },
              "previousInteractionTheme": {
                "$ref": "#/components/schemas/InteractionTheme"
              }
            },
            "type": "object"
          }
        ]
      },
      "TaskAttributesAnswerInboundVoiceCall": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TaskAttributesBase"
          },
          {
            "properties": {
              "account_sid": {
                "type": "string"
              },
              "api_version": {
                "type": "string"
              },
              "borrower": {
                "allOf": [
                  {
                    "nullable": true,
                    "type": "object"
                  },
                  {
                    "$ref": "#/components/schemas/BorrowerForTask"
                  }
                ]
              },
              "call_sid": {
                "type": "string"
              },
              "called": {
                "type": "string"
              },
              "called_city": {
                "type": "string"
              },
              "called_country": {
                "type": "string"
              },
              "called_state": {
                "type": "string"
              },
              "called_zip": {
                "type": "string"
              },
              "caller": {
                "type": "string"
              },
              "caller_city": {
                "type": "string"
              },
              "caller_country": {
                "type": "string"
              },
              "caller_state": {
                "type": "string"
              },
              "caller_zip": {
                "type": "string"
              },
              "case": {
                "description": "Always `null`",
                "nullable": true,
                "type": "object"
              },
              "direction": {
                "type": "string"
              },
              "from": {
                "type": "string"
              },
              "from_city": {
                "type": "string"
              },
              "from_country": {
                "type": "string"
              },
              "from_state": {
                "type": "string"
              },
              "from_zip": {
                "type": "string"
              },
              "interaction": {
                "$ref": "#/components/schemas/TwilioMinimalInteraction"
              },
              "task_type": {
                "enum": [
                  "answerInboundVoiceCall"
                ],
                "type": "string"
              },
              "to": {
                "type": "string"
              },
              "to_city": {
                "type": "string"
              },
              "to_country": {
                "type": "string"
              },
              "to_state": {
                "type": "string"
              },
              "to_zip": {
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "CaseForTask": {
        "description": "The case object associated with this task.\n\nNote that this represents the case data at the moment the task was published,\nif subsequent changes have been made to the case, they will not be reflected here.\n",
        "properties": {
          "autoCreated": {
            "type": "boolean"
          },
          "borrowerIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "caseType": {
            "$ref": "#/components/schemas/BaseCaseType"
          },
          "caseTypeMeta": {
            "description": "Metadata about the case type object.\n",
            "properties": {
              "base": {
                "type": "string"
              },
              "derivedFromTypeId": {
                "nullable": true,
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "version": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "companyId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "escalatedEmployeeId": {
            "nullable": true,
            "type": "string"
          },
          "escalatedTeamId": {
            "description": "The ID of the team to which this case is escalated.",
            "nullable": true,
            "type": "string"
          },
          "escalationIsUrgent": {
            "description": "If `true` then the case is considered \"urgent\" and should be handled with priority.\n",
            "nullable": true,
            "type": "boolean"
          },
          "id": {
            "description": "ID of the case.",
            "type": "string"
          },
          "loanTypes": {
            "$ref": "#/components/schemas/LoanTypesForTask",
            "description": "Type information about just the loans associated with this case.\n",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "outcome": {
            "$ref": "#/components/schemas/ProcessOutcome"
          },
          "owningUserId": {
            "nullable": true,
            "type": "string"
          },
          "people": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "relatedLoansSummary": {
            "properties": {
              "isAnyOverdue": {
                "type": "boolean"
              },
              "maxDaysOverdue": {
                "type": "integer"
              },
              "totalOverdueAmount": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "status": {
            "type": "string"
          },
          "typeId": {
            "description": "ID of the case type.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "TaskAttributesHandleInboundInteraction": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TaskAttributesBase"
          },
          {
            "properties": {
              "borrower": {
                "$ref": "#/components/schemas/BorrowerForTask"
              },
              "case": {
                "$ref": "#/components/schemas/CaseForTask",
                "nullable": true
              },
              "interaction": {
                "$ref": "#/components/schemas/TwilioMinimalInteraction"
              },
              "task_type": {
                "enum": [
                  "handleInboundInteraction"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "TaskAttributesHandleUnboundInboundInteraction": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TaskAttributesBase"
          },
          {
            "properties": {
              "borrower": {
                "description": "Always `null`",
                "nullable": true,
                "type": "object"
              },
              "case": {
                "$ref": "#/components/schemas/CaseForTask",
                "nullable": true
              },
              "interaction": {
                "$ref": "#/components/schemas/TwilioMinimalInteraction"
              },
              "task_type": {
                "enum": [
                  "handleUnboundInboundInteraction"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "TaskAttributesMakeScheduledCall": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TaskAttributesBase"
          },
          {
            "properties": {
              "borrower": {
                "$ref": "#/components/schemas/BorrowerForTask"
              },
              "case": {
                "allOf": [
                  {
                    "nullable": true,
                    "type": "object"
                  },
                  {
                    "$ref": "#/components/schemas/CaseForTask"
                  }
                ]
              },
              "interaction": {
                "$ref": "#/components/schemas/TwilioMinimalInteraction"
              },
              "task_type": {
                "enum": [
                  "makeScheduledCall"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "TaskAttributesReplyToNewText": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TaskAttributesBase"
          },
          {
            "properties": {
              "borrower": {
                "allOf": [
                  {
                    "nullable": true,
                    "type": "object"
                  },
                  {
                    "$ref": "#/components/schemas/BorrowerForTask"
                  }
                ]
              },
              "case": {
                "description": "Always `null`",
                "nullable": true,
                "type": "object"
              },
              "interaction": {
                "$ref": "#/components/schemas/TwilioMinimalInteraction"
              },
              "task_type": {
                "enum": [
                  "replyToNewText"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "TaskAttributesReplyToNewWebChat": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TaskAttributesBase"
          },
          {
            "properties": {
              "borrower": {
                "$ref": "#/components/schemas/BorrowerForTask"
              },
              "case": {
                "description": "Always `null`",
                "nullable": true,
                "type": "object"
              },
              "interaction": {
                "$ref": "#/components/schemas/TwilioMinimalInteraction"
              },
              "task_type": {
                "enum": [
                  "replyToNewWebChat"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "TaskAttributesReplyToAbandonedWebChat": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TaskAttributesBase"
          },
          {
            "properties": {
              "borrower": {
                "$ref": "#/components/schemas/BorrowerForTask"
              },
              "case": {
                "allOf": [
                  {
                    "nullable": true,
                    "type": "object"
                  },
                  {
                    "$ref": "#/components/schemas/CaseForTask"
                  }
                ]
              },
              "interaction": {
                "$ref": "#/components/schemas/TwilioMinimalInteraction"
              },
              "task_type": {
                "enum": [
                  "replyToAbandonedWebChat"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "TaskAttributesReviewEscalatedCaseAgent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TaskAttributesBase"
          },
          {
            "properties": {
              "borrower": {
                "allOf": [
                  {
                    "nullable": true,
                    "type": "object"
                  },
                  {
                    "$ref": "#/components/schemas/BorrowerForTask"
                  }
                ]
              },
              "case": {
                "$ref": "#/components/schemas/CaseForTask"
              },
              "interaction": {
                "description": "Always `null`",
                "nullable": true,
                "type": "object"
              },
              "task_type": {
                "enum": [
                  "reviewEscalatedCaseAgent"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "TaskAttributesReviewEscalatedCaseAgentUrgent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TaskAttributesBase"
          },
          {
            "properties": {
              "borrower": {
                "allOf": [
                  {
                    "nullable": true,
                    "type": "object"
                  },
                  {
                    "$ref": "#/components/schemas/BorrowerForTask"
                  }
                ]
              },
              "case": {
                "$ref": "#/components/schemas/CaseForTask"
              },
              "interaction": {
                "description": "Always `null`",
                "nullable": true,
                "type": "object"
              },
              "task_type": {
                "enum": [
                  "reviewEscalatedCaseAgentUrgent"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "TaskAttributesReviewEscalatedCaseTeam": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TaskAttributesBase"
          },
          {
            "properties": {
              "borrower": {
                "allOf": [
                  {
                    "nullable": true,
                    "type": "object"
                  },
                  {
                    "$ref": "#/components/schemas/BorrowerForTask"
                  }
                ]
              },
              "case": {
                "$ref": "#/components/schemas/CaseForTask"
              },
              "interaction": {
                "description": "Always `null`",
                "nullable": true,
                "type": "object"
              },
              "task_type": {
                "enum": [
                  "reviewEscalatedCaseTeam"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "TaskAttributesReviewEscalatedCaseTeamUrgent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TaskAttributesBase"
          },
          {
            "properties": {
              "borrower": {
                "allOf": [
                  {
                    "nullable": true,
                    "type": "object"
                  },
                  {
                    "$ref": "#/components/schemas/BorrowerForTask"
                  }
                ]
              },
              "case": {
                "$ref": "#/components/schemas/CaseForTask"
              },
              "interaction": {
                "description": "Always `null`",
                "nullable": true,
                "type": "object"
              },
              "task_type": {
                "enum": [
                  "reviewEscalatedCaseTeamUrgent"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "TaskAttributesReviewDocumentUpload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TaskAttributesBase"
          },
          {
            "properties": {
              "borrower": {
                "$ref": "#/components/schemas/BorrowerForTask"
              },
              "case": {
                "allOf": [
                  {
                    "nullable": true,
                    "type": "object"
                  },
                  {
                    "$ref": "#/components/schemas/CaseForTask"
                  }
                ]
              },
              "interaction": {
                "description": "Always `null`",
                "nullable": true,
                "type": "object"
              },
              "task_type": {
                "enum": [
                  "reviewDocumentUpload"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "TaskAttributesReviewSnoozedCase": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TaskAttributesBase"
          },
          {
            "properties": {
              "borrower": {
                "allOf": [
                  {
                    "nullable": true,
                    "type": "object"
                  },
                  {
                    "$ref": "#/components/schemas/BorrowerForTask"
                  }
                ]
              },
              "case": {
                "$ref": "#/components/schemas/CaseForTask"
              },
              "interaction": {
                "description": "Always `null`",
                "nullable": true,
                "type": "object"
              },
              "task_type": {
                "enum": [
                  "reviewSnoozedCase"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "TaskAttributesReviewAutoCreatedCase": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TaskAttributesBase"
          },
          {
            "properties": {
              "borrower": {
                "allOf": [
                  {
                    "nullable": true,
                    "type": "object"
                  },
                  {
                    "$ref": "#/components/schemas/BorrowerForTask"
                  }
                ]
              },
              "case": {
                "$ref": "#/components/schemas/CaseForTask"
              },
              "interaction": {
                "description": "Always `null`",
                "nullable": true,
                "type": "object"
              },
              "task_type": {
                "enum": [
                  "reviewAutoCreatedCase"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "TaskAttributesReviewAutoUpdatedCase": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TaskAttributesBase"
          },
          {
            "properties": {
              "borrower": {
                "allOf": [
                  {
                    "nullable": true,
                    "type": "object"
                  },
                  {
                    "$ref": "#/components/schemas/BorrowerForTask"
                  }
                ]
              },
              "case": {
                "$ref": "#/components/schemas/CaseForTask"
              },
              "interaction": {
                "description": "Always `null`",
                "nullable": true,
                "type": "object"
              },
              "task_type": {
                "enum": [
                  "reviewAutoUpdatedCase"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "TaskAttributesReviewCaseInstructions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TaskAttributesBase"
          },
          {
            "properties": {
              "borrower": {
                "allOf": [
                  {
                    "nullable": true,
                    "type": "object"
                  },
                  {
                    "$ref": "#/components/schemas/BorrowerForTask"
                  }
                ]
              },
              "case": {
                "$ref": "#/components/schemas/CaseForTask"
              },
              "interaction": {
                "description": "Always `null`",
                "nullable": true,
                "type": "object"
              },
              "task_type": {
                "enum": [
                  "reviewCaseInstructions"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "TaskAttributesReviewVoicemail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TaskAttributesBase"
          },
          {
            "properties": {
              "borrower": {
                "allOf": [
                  {
                    "nullable": true,
                    "type": "object"
                  },
                  {
                    "$ref": "#/components/schemas/BorrowerForTask"
                  }
                ]
              },
              "case": {
                "description": "Always `null`",
                "nullable": true,
                "type": "object"
              },
              "interaction": {
                "$ref": "#/components/schemas/TwilioMinimalInteraction"
              },
              "task_type": {
                "enum": [
                  "reviewVoicemail"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "TaskAttributesSmartReviewCase": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TaskAttributesBase"
          },
          {
            "properties": {
              "borrower": {
                "allOf": [
                  {
                    "nullable": true,
                    "type": "object"
                  },
                  {
                    "$ref": "#/components/schemas/BorrowerForTask"
                  }
                ]
              },
              "case": {
                "$ref": "#/components/schemas/CaseForTask"
              },
              "interaction": {
                "description": "Always `null`",
                "nullable": true,
                "type": "object"
              },
              "task_type": {
                "enum": [
                  "smartReviewCase"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "Task": {
        "properties": {
          "account_sid": {
            "description": "The unique identifier for the Twilio account.",
            "type": "string"
          },
          "addons": {
            "description": "Currently unused.",
            "type": "string"
          },
          "age": {
            "description": "Time since this task was created in seconds.\n",
            "type": "integer"
          },
          "assignment_status": {
            "$ref": "#/components/schemas/TaskAssignmentStatus"
          },
          "attributes": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TaskAttributesAnswerInboundVoiceCall"
              },
              {
                "$ref": "#/components/schemas/TaskAttributesHandleInboundInteraction"
              },
              {
                "$ref": "#/components/schemas/TaskAttributesHandleUnboundInboundInteraction"
              },
              {
                "$ref": "#/components/schemas/TaskAttributesMakeScheduledCall"
              },
              {
                "$ref": "#/components/schemas/TaskAttributesReplyToNewText"
              },
              {
                "$ref": "#/components/schemas/TaskAttributesReplyToNewWebChat"
              },
              {
                "$ref": "#/components/schemas/TaskAttributesReplyToAbandonedWebChat"
              },
              {
                "$ref": "#/components/schemas/TaskAttributesReviewEscalatedCaseAgent"
              },
              {
                "$ref": "#/components/schemas/TaskAttributesReviewEscalatedCaseAgentUrgent"
              },
              {
                "$ref": "#/components/schemas/TaskAttributesReviewEscalatedCaseTeam"
              },
              {
                "$ref": "#/components/schemas/TaskAttributesReviewEscalatedCaseTeamUrgent"
              },
              {
                "$ref": "#/components/schemas/TaskAttributesReviewDocumentUpload"
              },
              {
                "$ref": "#/components/schemas/TaskAttributesReviewSnoozedCase"
              },
              {
                "$ref": "#/components/schemas/TaskAttributesReviewAutoCreatedCase"
              },
              {
                "$ref": "#/components/schemas/TaskAttributesReviewAutoUpdatedCase"
              },
              {
                "$ref": "#/components/schemas/TaskAttributesReviewCaseInstructions"
              },
              {
                "$ref": "#/components/schemas/TaskAttributesReviewVoicemail"
              },
              {
                "$ref": "#/components/schemas/TaskAttributesSmartReviewCase"
              }
            ]
          },
          "date_created": {
            "description": "The date and time the task was created. (Potentially this differs from the `task_init_at` field in \nthe task's attributes, since when a task is re-created via the \"Unable To Complete\" functionality, \nthis value will be the time the task was re-created.)\n",
            "format": "date-time",
            "type": "string"
          },
          "date_updated": {
            "format": "date-time",
            "type": "string"
          },
          "priority": {
            "description": "The priority of the task. A higher priority task jumps the queue ahead of lower priority tasks.\nBy default, tasks have a priority of 0. For example, inbound texts and chats may be configured\nto have a higher priority. And usually, calls will have an even higher priority.\n",
            "type": "integer"
          },
          "reason": {
            "description": "Reason for task cancellation or completion, if applicable.",
            "nullable": true,
            "type": "string"
          },
          "reservation": {
            "nullable": true,
            "type": "string"
          },
          "sid": {
            "description": "The unique identifier for the task.",
            "type": "string"
          },
          "task_channel_sid": {
            "description": "The SID of the channel this task is associated with.",
            "type": "string"
          },
          "task_channel_unique_name": {
            "description": "The unique name of the channel this task is associated with.",
            "type": "string"
          },
          "task_queue_entered_date": {
            "description": "The date and time the task entered the queue.",
            "format": "date-time",
            "type": "string"
          },
          "task_queue_friendly_name": {
            "description": "A human-readable name for the task queue.",
            "type": "string"
          },
          "task_queue_sid": {
            "description": "The SID of the queue this task is associated with.",
            "type": "string"
          },
          "timeout": {
            "description": "The timeout value in seconds for task assignment. After this time, the task will be reassigned\nto another agent.\n",
            "type": "integer"
          },
          "workflow_friendly_name": {
            "description": "A human-readable name for the workflow.",
            "type": "string"
          },
          "workflow_sid": {
            "description": "The SID of the workflow this task is associated with.",
            "type": "string"
          },
          "workspace_sid": {
            "description": "The SID of the workspace this task belongs to.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "VersionStatus": {
        "enum": [
          "draft",
          "active",
          "deprecated"
        ],
        "type": "string"
      },
      "WorkflowStepType": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "additionalProperties": false,
            "properties": {
              "companyId": {
                "description": "The company identifier.",
                "readOnly": true,
                "type": "string"
              },
              "createdBy": {
                "description": "User identifier who created the workflow step type.",
                "readOnly": true,
                "type": "string"
              },
              "decisionQuestion": {
                "description": "Decision question is what leads to the \"accepted\" or \"rejected\" outcome\nof the step. This question is displayed to an agent next to the outcome\nof the step. The questions can lead to accept/reject or to yes/no answers.\n",
                "type": "string"
              },
              "decisionQuestionType": {
                "$ref": "#/components/schemas/DecisionQuestionType"
              },
              "descriptionLong": {
                "description": "Additional details on how to complete the step. Normally displayed\nto an agent when clicked on \"more info\" or \"?\" or \"i\" icons.\n",
                "nullable": true,
                "type": "string"
              },
              "descriptionShort": {
                "description": "A short description of the step. Displayed to agents in the UI.\nCan be a sentence.\n",
                "type": "string"
              },
              "mandatory": {
                "type": "boolean"
              },
              "refId": {
                "description": "The globally unique identifier of the workflow step type.",
                "format": "uuid",
                "type": "string"
              },
              "updatedBy": {
                "description": "User identifier who last updated the workflow step type.",
                "readOnly": true,
                "type": "string"
              },
              "version": {
                "description": "Version of the workflow step type.",
                "type": "integer"
              },
              "versionStatus": {
                "$ref": "#/components/schemas/VersionStatus"
              },
              "visibility": {
                "$ref": "#/components/schemas/StepVisibility"
              },
              "workItems": {
                "description": "List of work item types that comprise this workflow step type.\n",
                "items": {
                  "description": "Work item type ID.",
                  "type": "string"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "WorkflowType": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "additionalProperties": false,
            "properties": {
              "approvalConditions": {
                "$ref": "#/components/schemas/CaseApprovalConditions"
              },
              "companyId": {
                "description": "The company identifier.",
                "readOnly": true,
                "type": "string"
              },
              "createdBy": {
                "description": "User identifier who created the workflow type.",
                "readOnly": true,
                "type": "string"
              },
              "description": {
                "description": "Description of the workflow type. Used internally.",
                "type": "string"
              },
              "name": {
                "description": "A short name of workflow. For example: bankruptcy or identity theft.\n",
                "type": "string"
              },
              "refId": {
                "description": "The globally unique identifier of the workflow type.",
                "format": "uuid",
                "type": "string"
              },
              "steps": {
                "description": "List of step types that comprise a workflow of this type.\n",
                "items": {
                  "description": "Step type ID.",
                  "type": "string"
                },
                "type": "array"
              },
              "updatedBy": {
                "description": "User identifier who last updated the workflow type.",
                "readOnly": true,
                "type": "string"
              },
              "version": {
                "description": "Version of the workflow type.",
                "type": "integer"
              },
              "versionStatus": {
                "$ref": "#/components/schemas/VersionStatus"
              }
            },
            "type": "object"
          }
        ]
      },
      "WorkflowWorkitemType": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "additionalProperties": false,
            "properties": {
              "companyId": {
                "description": "The company identifier.",
                "readOnly": true,
                "type": "string"
              },
              "createdBy": {
                "description": "User identifier who created the workflow item type.",
                "readOnly": true,
                "type": "string"
              },
              "descriptionLong": {
                "description": "Additional information required to complete the work item.\n",
                "nullable": true,
                "type": "string"
              },
              "descriptionShort": {
                "description": "A short description of the work item. Displayed to agents in the UI.\nCan be a sentence.\n",
                "type": "string"
              },
              "refId": {
                "description": "The globally unique identifier of the workflow workitem type.",
                "format": "uuid",
                "type": "string"
              },
              "updatedBy": {
                "description": "User identifier who last updated the workflow item type.",
                "readOnly": true,
                "type": "string"
              },
              "version": {
                "description": "Version of the work item type.",
                "type": "integer"
              },
              "versionStatus": {
                "$ref": "#/components/schemas/VersionStatus"
              }
            },
            "type": "object"
          }
        ]
      },
      "Code": {
        "allOf": [
          {
            "$ref": "#/components/schemas/VersionedMixin"
          },
          {
            "properties": {
              "code": {
                "description": "Base64 of the compiled binary code",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "codeText": {
                "description": "The source code to compile",
                "type": "string"
              },
              "compilationVersion": {
                "description": "The compile version",
                "maxLength": 20,
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "lastCompiledAt": {
                "description": "Timestamp of last compile",
                "format": "date-time",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "name": {
                "description": "The name of the code",
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "code"
      },
      "CodePaging": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Paging"
          },
          {
            "properties": {
              "data": {
                "items": {
                  "$ref": "#/components/schemas/Code"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ],
        "title": "code"
      },
      "CodeExecution": {
        "description": "Execution of code requires that all arguments to the function be submitted as key-value pairs.\nRunning compiled code will produce a single value output.\n",
        "properties": {
          "parameters": {
            "type": "object",
            "writeOnly": true
          },
          "result": {
            "readOnly": true
          }
        },
        "type": "object"
      },
      "DoNotInteractChannel": {
        "description": "Channel(s) for which outbound interactions with a borrower are blocked. Use value `all`\nfor all channels. At least one of the attributes, `channel` or `theme`,\nmust be provided.\n",
        "enum": [
          "all",
          "voice",
          "email",
          "fax",
          "text",
          "chat",
          "mail"
        ],
        "type": "string"
      },
      "onCondition": {
        "description": "Array of conditions for case fields values. `and` operator is used if multiple conditions\nare provided. For example:\n- A `bankruptcy` case has two fields, `chapter` and `dispositionCode`.\n- If two conditions are created: first `chapter=chapter17`, second `dispositionCode=dismissed`.\n- The logical condition will look like: `chapter=chapter17` **and** `dispositionCode=dismissed`.\n",
        "items": {
          "properties": {
            "dataType": {
              "$ref": "#/components/schemas/DataType"
            },
            "fieldName": {
              "$ref": "#/components/schemas/FieldName"
            },
            "operator": {
              "default": "eq",
              "description": "The value of the case `fieldName` is compared to `value` using this logical operator.\nFor example, bankruptcy case `fieldName=chapter` can be compared with `value=dismissed` using `eq` (equal operator).\n\n`eq`=equal, `gt`=greater than, `ge`=greater or equal, `lt`=less than, `le`=less or equal, `ne`=not equal.\n",
              "enum": [
                "eq",
                "gt",
                "ge",
                "lt",
                "le",
                "ne"
              ],
              "type": "string"
            },
            "value": {
              "description": "The value to compare with.\n"
            }
          },
          "type": "object"
        },
        "nullable": true,
        "type": "array"
      },
      "DoNotInteractTheme": {
        "description": "Theme(s) for which outbound interactions with a borrower are blocked. Use value\n`all` for all themes. `all` doesn't include `opsAccountCredentials`.\nFor example, use `opsCollDebt` to stop debt collection interactions.\nAt least one of the attributes, `channel` or `theme`, must be provided.\n",
        "enum": [
          "all",
          "opsCollDebt",
          "opsCollLocateBorrower",
          "opsCollVerifyEmployment",
          "opsCollContactEmployerNotice",
          "opsServicingDebtValidation",
          "opsServicingNegativeCreditReportNotice",
          "opsServicingTimeBarredNotice",
          "opsServicing"
        ],
        "type": "string"
      },
      "DoNotInteractType": {
        "allOf": [
          {
            "$ref": "#/components/schemas/VersionedMixin"
          },
          {
            "properties": {
              "channel": {
                "$ref": "#/components/schemas/DoNotInteractChannel",
                "description": "Channel(s) for which outbound interactions with a borrower are blocked.\nUse value `all` for all channels.\n"
              },
              "duration": {
                "default": 0,
                "description": "Number of days during which the interactions will be blocked.\nWe start counting from the day conditions are met.\n",
                "minimum": 0,
                "nullable": true,
                "type": "integer"
              },
              "object": {
                "default": "doNotInteractType",
                "enum": [
                  "doNotInteractType"
                ],
                "readOnly": true,
                "type": "string"
              },
              "onCondition": {
                "$ref": "#/components/schemas/onCondition"
              },
              "onOutcome": {
                "$ref": "#/components/schemas/ProcessOutcome"
              },
              "onStatus": {
                "$ref": "#/components/schemas/ProcessStatus"
              },
              "theme": {
                "$ref": "#/components/schemas/DoNotInteractTheme",
                "description": "Theme(s) for which outbound interactions with a borrower are blocked. Use value\n`all` for all themes. `all` doesn't include `opsAccountCredentials`.\nFor example, use `opsCollDebt` to stop debt collection interactions.\n"
              },
              "unit": {
                "description": "Indicates how to count days provided in `duration`.",
                "enum": [
                  "calendarDays",
                  "businessDays"
                ],
                "nullable": true,
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "doNotInteractHandler"
      },
      "DocumentStatus": {
        "description": "The document status. The status can be displayed in UI.\n\n`draft` - the document was rendered or created but has not accepted or rejected yet.\n\n`accepted` - the document was determined to be valid and was accepted.\n\n`rejected` - the document was determined to be invalid and was rejected.\n",
        "enum": [
          "draft",
          "accepted",
          "rejected"
        ],
        "type": "string"
      },
      "DocumentDescriptorFields": {
        "properties": {
          "archived": {
            "default": false,
            "description": "Set to `true` if the document has been archived.\n",
            "type": "boolean"
          },
          "autogenerated": {
            "description": "`true` if this document is generated automatically by a Peach system, `false` if this\ndocument is created and uploaded manually by a human. If left blank then this value is\nguessed from the document type.\n",
            "nullable": true,
            "type": "boolean"
          },
          "contentId": {
            "description": "The document content identifier. Use this identifier to get the document content.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "contentLength": {
            "description": "The document content length in bytes.",
            "minimum": 0,
            "readOnly": true,
            "type": "integer"
          },
          "contentType": {
            "description": "The document content type. For example, PDF or JPEG.",
            "readOnly": true,
            "type": "string"
          },
          "conversionSourceId": {
            "description": "The original document identifier that was used as a source for conversion to a specific format.",
            "readOnly": true,
            "type": "string"
          },
          "description": {
            "description": "The description for the document. Normally displayed in UI.",
            "type": "string"
          },
          "evidenceId": {
            "description": "The evidence document identifier. For example: when a borrower enables Autopay, the evidence\ndocument will be the snapshot of UI page.\n",
            "nullable": true,
            "type": "string"
          },
          "fileName": {
            "description": "The file name of the document. If the document is rendered from a template by the Peach system,\nthe file name will be generated automatically.\nIf the document is created from a file, it will be the name of the file that was uploaded.\nNormally displayed in UI.\n",
            "type": "string"
          },
          "isHumanBorrowerUpload": {
            "description": "`true` if this document was uploaded by a human borrower--meaning that a borrower (or\ntheir representative) used a browser to upload this document directly. To put this\nanother way, this document was *not* uploaded by an agent and was *not* uploaded by any\nautomated system.\n",
            "readOnly": true,
            "type": "boolean"
          },
          "loanId": {
            "description": "The loan identifier that the documents belongs to.",
            "nullable": true,
            "type": "string"
          },
          "metaData": {
            "$ref": "#/components/schemas/MetaData"
          },
          "personId": {
            "description": "The borrower's identifier that the documents belongs to.",
            "readOnly": true,
            "type": "string"
          },
          "rejectionReason": {
            "description": "The reason why the document was rejected. This is a free text. Normally displayed in UI.",
            "type": "string"
          },
          "sensitiveData": {
            "description": "Set this flag to `true` if this document has sensitive information, such as PII. The flag is used for\nproper authorization of access to the information.\n",
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/DocumentStatus"
          },
          "templateVersionId": {
            "description": "Peach internal template identifier that was used to render the document.",
            "nullable": true,
            "type": "string"
          },
          "updatedBy": {
            "$ref": "#/components/schemas/UserActionInfo",
            "description": "Details of the user who last updated the document.\nCan be an borrower, agent, or automated system process.\n"
          },
          "uploadedAt": {
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "uploadedBy": {
            "$ref": "#/components/schemas/UserActionInfo",
            "description": "Details of the user responsible for uploading the document.\nCan be an borrower, agent, or automated system process.\n"
          },
          "verifiedAt": {
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "verifiedBy": {
            "$ref": "#/components/schemas/UserActionInfo",
            "description": "Details of the user responsible for verifing the document.\nCan be an agent or automated system process.\n"
          }
        },
        "type": "object"
      },
      "DocumentType": {
        "description": "The document type.",
        "enum": [
          "loanTermsAgreementOnly",
          "loanTILDisclosureOnly",
          "loanTermsAndTILCombined",
          "loanTermsChangeAgreement",
          "loanAutopayAgreement",
          "loanStatement",
          "loanSettlementAgreement",
          "privacyPolicyLender",
          "privacyPolicyServicer",
          "termsOfServiceLender",
          "termsOfServiceServicer",
          "caseDocument",
          "disclosure",
          "evidence",
          "otherStatement",
          "other"
        ],
        "type": "string"
      },
      "DocumentDescriptorCreate": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseWithExternalIdMixin"
          },
          {
            "$ref": "#/components/schemas/DocumentDescriptorFields"
          },
          {
            "properties": {
              "type": {
                "$ref": "#/components/schemas/DocumentType"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        ]
      },
      "DocumentDescriptorResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseWithExternalIdMixin"
          },
          {
            "$ref": "#/components/schemas/DocumentDescriptorFields"
          },
          {
            "properties": {
              "type": {
                "$ref": "#/components/schemas/DocumentType"
              }
            },
            "type": "object"
          }
        ]
      },
      "EmployeeBase": {
        "properties": {
          "firstName": {
            "description": "The employee's first name.",
            "maxLength": 50,
            "minLength": 1,
            "type": "string"
          },
          "lastName": {
            "description": "The employee's last name.",
            "maxLength": 50,
            "minLength": 1,
            "type": "string"
          }
        },
        "type": "object"
      },
      "Team": {
        "description": "A team is a named grouping of Employees",
        "properties": {
          "email": {
            "description": "The group email (or listserve) associated with this team.",
            "nullable": true,
            "type": "string"
          },
          "employeeCount": {
            "description": "The number of employees on this team.",
            "readOnly": true,
            "type": "integer"
          },
          "externalId": {
            "description": "The lender's external identifier of the team.",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "string"
          },
          "name": {
            "description": "The name of the team—e.g., \"Engineering\", \"Operations\", \"Customer Support\". Must be unique.",
            "minLength": 1,
            "type": "string"
          }
        },
        "type": "object"
      },
      "Employee": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "$ref": "#/components/schemas/EmployeeBase"
          },
          {
            "description": "An employee in the company",
            "properties": {
              "assignedInvestorIds": {
                "description": "The unique identifiers of the investors assigned to the employee.\n",
                "items": {
                  "$ref": "#/components/schemas/AnyId"
                },
                "readOnly": true,
                "type": "array"
              },
              "availableAndPermittedTasktypes": {
                "$ref": "#/components/schemas/TaskType"
              },
              "companyId": {
                "description": "The unique company identifier.",
                "readOnly": true,
                "type": "string"
              },
              "displayName": {
                "description": "The agent's first and last name, if set. Otherwise, their email\naddress.\n",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "email": {
                "description": "The employee's email address.",
                "maxLength": 100,
                "minLength": 1,
                "nullable": true,
                "type": "string"
              },
              "externalId": {
                "description": "The lender's external identifier for the employee.",
                "nullable": true,
                "type": "string"
              },
              "id": {
                "description": "A unique identifier for the employee",
                "readOnly": true,
                "type": "string"
              },
              "jobName": {
                "description": "The name of position in the company—e.g., \"CEO\", \"Agent\", \"Supervisor\"",
                "maxLength": 100,
                "minLength": 1,
                "nullable": true,
                "type": "string"
              },
              "managerEmployeeId": {
                "$ref": "#/components/schemas/AnyId",
                "description": "The ID of the employee's manager",
                "nullable": true
              },
              "object": {
                "default": "Employee",
                "enum": [
                  "Employee"
                ],
                "readOnly": true,
                "type": "string"
              },
              "phone": {
                "description": "The employee's phone number.",
                "maxLength": 16,
                "minLength": 1,
                "nullable": true,
                "type": "string"
              },
              "teams": {
                "items": {
                  "$ref": "#/components/schemas/Team"
                },
                "type": "array"
              },
              "user": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/UserBasic"
                  },
                  {
                    "readOnly": true
                  }
                ],
                "description": "The user associated with this employee"
              },
              "userId": {
                "description": "The ID of the user associated with this employee",
                "type": "string",
                "writeOnly": true
              }
            },
            "type": "object"
          }
        ]
      },
      "EmailSignatureUpdate": {
        "description": "An email signature for an employee",
        "properties": {
          "contentHtml": {
            "description": "The HTML email signature content",
            "maxLength": 10000,
            "minLength": 0,
            "nullable": true,
            "type": "string"
          },
          "enabled": {
            "description": "Whether the email signature is enabled. If true, new emails should include the signature\nwhen drafted.\n",
            "nullable": false,
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "EmailSignature": {
        "allOf": [
          {
            "$ref": "#/components/schemas/EmailSignatureUpdate"
          },
          {
            "description": "An email signature for an employee",
            "properties": {
              "contentText": {
                "description": "The plain text version of the email signature content. This is generated from the `contentHtml` field\nand cannot be set.\n",
                "nullable": false,
                "readOnly": true,
                "type": "string"
              },
              "employeeId": {
                "description": "The ID of the employee associated with this email signature.",
                "readOnly": true,
                "type": "string"
              },
              "lastUpdatedAt": {
                "description": "The last time the email signature was updated.",
                "format": "date-time",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "personId": {
        "description": "A Borrower's unique identifier.",
        "type": "string"
      },
      "readOnlyExternalId": {
        "nullable": true,
        "readOnly": true,
        "type": "string"
      },
      "loanId": {
        "description": "Loan's unique identifier.",
        "type": "string"
      },
      "BaseEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "companyId": {
                "description": "Company's unique identifier.",
                "type": "string"
              },
              "creatingMessageId": {
                "description": "The message ID responsible for creating this event.",
                "type": "string"
              },
              "discriminator": {
                "description": "String indicating the type of the parent object.",
                "type": "string"
              },
              "effectiveAt": {
                "description": "The date and time at which the event was effective. This may differ from the date of creation.",
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "Event's unique identifier.",
                "type": "string"
              },
              "parentId": {
                "description": "Unique identifier of the parent object for the event.",
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "LoanEvent": {
        "allOf": [
          {
            "properties": {
              "borrowerId": {
                "$ref": "#/components/schemas/personId"
              },
              "loanExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              },
              "loanId": {
                "$ref": "#/components/schemas/loanId"
              },
              "personExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/BaseEvent"
          }
        ]
      },
      "condition": {
        "enum": [
          "balanceNA",
          "balanceBroken",
          "balanceRed",
          "balanceYellow",
          "balanceGreen"
        ],
        "type": "string"
      },
      "periodId": {
        "description": "Period's unique identifier.",
        "type": "string"
      },
      "AutopayPaymentRescheduledEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "condition": {
                "$ref": "#/components/schemas/condition"
              },
              "eventType": {
                "enum": [
                  "autopay.payment.rescheduled"
                ],
                "type": "string"
              },
              "periodId": {
                "$ref": "#/components/schemas/periodId"
              }
            },
            "type": "object"
          }
        ],
        "title": "autopay.payment.rescheduled"
      },
      "AutopayPaymentCanceledEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "condition": {
                "$ref": "#/components/schemas/condition"
              },
              "eventType": {
                "enum": [
                  "autopay.payment.canceled"
                ],
                "type": "string"
              },
              "periodId": {
                "$ref": "#/components/schemas/periodId"
              }
            },
            "type": "object"
          }
        ],
        "title": "autopay.payment.canceled"
      },
      "autopayCancellationReason": {
        "enum": [
          "invalidPaymentMethod",
          "paymentMethodRemoved",
          "tooManyFailedAttempts",
          "loanFrozen",
          "loanAccelerated",
          "loanChargedOff",
          "loanPaidOff",
          "canceledByUser",
          "loanTermsChanged"
        ],
        "type": "string"
      },
      "CancelAutopayScheduleEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "cancellationReason": {
                "$ref": "#/components/schemas/autopayCancellationReason"
              },
              "eventType": {
                "enum": [
                  "autopay.schedule.cancel"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "autopay.schedule.cancel"
      },
      "AutopayScheduleChangedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "autopay.schedule.changed"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "autopay.schedule.changed"
      },
      "cardId": {
        "description": "Card's unique identifier.",
        "type": "string"
      },
      "CardReplacementRequestedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "cardId": {
                "$ref": "#/components/schemas/cardId"
              },
              "eventType": {
                "enum": [
                  "card.replacement.requested"
                ],
                "type": "string"
              },
              "loanId": {
                "$ref": "#/components/schemas/loanId"
              }
            },
            "type": "object"
          }
        ],
        "title": "card.replacement.requested"
      },
      "CardCreatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "cardId": {
                "$ref": "#/components/schemas/cardId"
              },
              "eventType": {
                "enum": [
                  "card.created"
                ],
                "type": "string"
              },
              "loanId": {
                "$ref": "#/components/schemas/loanId"
              }
            },
            "type": "object"
          }
        ],
        "title": "card.created"
      },
      "cardStatus": {
        "description": "The status of the card.",
        "enum": [
          "inactive",
          "pendingActivation",
          "pendingFulfillment",
          "active",
          "paused",
          "suspended",
          "terminated",
          "canceled",
          "expired",
          "invalid"
        ],
        "type": "string"
      },
      "cardStatusChangeReasonCode": {
        "enum": [
          "cardCanceled",
          "cardExpired",
          "cardInvalid",
          "cardClosed",
          "cardDamaged",
          "cardFraudulent",
          "cardInactive",
          "cardLost",
          "cardPFraud",
          "cardSuspended",
          "cardUnauthorized",
          "cardAcceptorActivityQuestionable",
          "cardStolen"
        ],
        "type": "string"
      },
      "CardStatusChangedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "cardId": {
                "$ref": "#/components/schemas/cardId"
              },
              "eventType": {
                "enum": [
                  "card.status.changed"
                ],
                "type": "string"
              },
              "loanId": {
                "$ref": "#/components/schemas/loanId"
              },
              "newStatus": {
                "$ref": "#/components/schemas/cardStatus"
              },
              "oldStatus": {
                "$ref": "#/components/schemas/cardStatus"
              },
              "statusChangeReasonCode": {
                "$ref": "#/components/schemas/cardStatusChangeReasonCode"
              }
            },
            "type": "object"
          }
        ],
        "title": "card.status.changed"
      },
      "caseId": {
        "description": "Case's unique identifier.",
        "type": "string"
      },
      "CaseEvent": {
        "allOf": [
          {
            "properties": {
              "borrowerId": {
                "$ref": "#/components/schemas/personId"
              },
              "caseExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              },
              "caseId": {
                "$ref": "#/components/schemas/caseId"
              },
              "personExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/BaseEvent"
          }
        ]
      },
      "associatedId": {
        "description": "Associated object's unique identifier.",
        "type": "string"
      },
      "associatedObject": {
        "description": "Associated object type.",
        "type": "string"
      },
      "CaseAssociationAddedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CaseEvent"
          },
          {
            "properties": {
              "associatedId": {
                "$ref": "#/components/schemas/associatedId"
              },
              "associatedObject": {
                "$ref": "#/components/schemas/associatedObject"
              },
              "eventType": {
                "enum": [
                  "case.association.added"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "case.association.added"
      },
      "CaseAssociationRemovedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CaseEvent"
          },
          {
            "properties": {
              "associatedId": {
                "$ref": "#/components/schemas/associatedId"
              },
              "associatedObject": {
                "$ref": "#/components/schemas/associatedObject"
              },
              "eventType": {
                "enum": [
                  "case.association.removed"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "case.association.removed"
      },
      "CaseDoNotInteractCreatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CaseEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "case.donotinteract.created"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "case.donotinteract.created"
      },
      "CaseDoNotInteractDeletedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CaseEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "case.donotinteract.deleted"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "case.donotinteract.deleted"
      },
      "CaseDoNotInteractUpdatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CaseEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "case.donotinteract.updated"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "case.donotinteract.updated"
      },
      "JSONPatchOpAddReplaceTest": {
        "properties": {
          "op": {
            "enum": [
              "add",
              "replace",
              "test"
            ],
            "type": "string"
          },
          "value": {}
        },
        "required": [
          "op",
          "value"
        ],
        "type": "object"
      },
      "JSONPatchOpMoveCopy": {
        "properties": {
          "from": {
            "type": "string"
          },
          "op": {
            "enum": [
              "move",
              "copy"
            ],
            "type": "string"
          }
        },
        "required": [
          "op",
          "from"
        ],
        "type": "object"
      },
      "JSONPatchOpRemove": {
        "properties": {
          "op": {
            "enum": [
              "remove"
            ],
            "type": "string"
          }
        },
        "required": [
          "op"
        ],
        "type": "object"
      },
      "JSONPatchOp": {
        "allOf": [
          {
            "properties": {
              "path": {
                "type": "string"
              }
            },
            "required": [
              "path"
            ],
            "type": "object"
          },
          {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JSONPatchOpAddReplaceTest"
              },
              {
                "$ref": "#/components/schemas/JSONPatchOpMoveCopy"
              },
              {
                "$ref": "#/components/schemas/JSONPatchOpRemove"
              }
            ]
          }
        ]
      },
      "ChangeEvent": {
        "allOf": [
          {
            "properties": {
              "changeType": {
                "enum": [
                  "create",
                  "update",
                  "delete"
                ],
                "type": "string"
              },
              "jsonPatch": {
                "items": {
                  "$ref": "#/components/schemas/JSONPatchOp"
                },
                "type": "array"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/BaseEvent"
          }
        ]
      },
      "CaseDoNotInteractChangedEvent": {
        "allOf": [
          {
            "properties": {
              "caseId": {
                "$ref": "#/components/schemas/caseId"
              },
              "doNotInteractId": {
                "description": "DNI's unique identifier",
                "type": "string"
              },
              "eventType": {
                "enum": [
                  "case.donotinteract.changed"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/ChangeEvent"
          }
        ],
        "title": "case.donotinteract.changed"
      },
      "CaseDoNotInteractExpiredEvent": {
        "allOf": [
          {
            "properties": {
              "eventType": {
                "enum": [
                  "case.donotinteract.expired"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/CaseEvent"
          }
        ],
        "title": "case.donotinteract.expired"
      },
      "CaseEscalationChangedEvent": {
        "allOf": [
          {
            "properties": {
              "caseId": {
                "$ref": "#/components/schemas/caseId"
              },
              "escalationId": {
                "description": "Escalation's unique identifier",
                "type": "string"
              },
              "eventType": {
                "enum": [
                  "case.escalation.changed"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/ChangeEvent"
          }
        ],
        "title": "case.escalation.changed"
      },
      "CaseCreatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CaseEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "case.created"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "description": "*** DEPRECATED ***\nThis event is being replaced by `case.changed` with a `changeType` of `create`. `case.created` will still appear in API\nresponses for historical events, but new events will use `case.changed`.\n",
        "title": "case.created"
      },
      "CaseUpdatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CaseEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "case.updated"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "description": "*** DEPRECATED ***\nThis event is being replaced by `case.changed` with a `changeType` of `update`. `case.updated` will still appear in API\nresponses for historical events, but new events will use `case.changed`.\n",
        "title": "case.updated"
      },
      "CaseDeletedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CaseEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "case.deleted"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "description": "*** DEPRECATED ***\nThis event was never used and will not appear in API requests.\n",
        "title": "case.deleted"
      },
      "CaseChangedEvent": {
        "allOf": [
          {
            "properties": {
              "caseId": {
                "$ref": "#/components/schemas/caseId"
              },
              "eventType": {
                "enum": [
                  "case.changed"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/ChangeEvent"
          }
        ],
        "title": "case.changed"
      },
      "contactId": {
        "description": "Contact's unique identifier.",
        "type": "string"
      },
      "ContactEvent": {
        "allOf": [
          {
            "properties": {
              "borrowerId": {
                "$ref": "#/components/schemas/personId"
              },
              "contactExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              },
              "contactId": {
                "$ref": "#/components/schemas/contactId"
              },
              "personExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/BaseEvent"
          }
        ]
      },
      "ContactCreatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ContactEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "contact.created"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "contact.created"
      },
      "ContactUpdatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ContactEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "contact.updated"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "contact.updated"
      },
      "ContactDeletedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ContactEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "contact.deleted"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "contact.deleted"
      },
      "InteractionBlockedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CaseEvent"
          },
          {
            "properties": {
              "contactExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              },
              "contactId": {
                "$ref": "#/components/schemas/contactId"
              },
              "eventType": {
                "enum": [
                  "interaction.blocked"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "description": "*** DEPRECATED ***\nThis event was never used and will not appear in API requests.\n",
        "title": "interaction.blocked"
      },
      "CloseReason": {
        "description": "The description of the reason why the account was closed. If passed,\nthe `closeReason` value will be used in the `locLineClosed` communication template.\nMake sure to phrase the copy as a full sentence or paragraph.\n",
        "type": "string"
      },
      "CloseReasonDetails": {
        "default": "other",
        "description": "The reason why the account was closed.\nThe reasons:\n  - `requestedByBorrower` - a borrower requested to close the account.\n  - `inactivity` - the account was closed by lender due to inactivity.\n  - `terms` - the account was closed by lender because it was created with wrong terms or terms changed later (e.g. re-underwriting, charge off, bankruptcy).\n  - `technicalIssue` - the account was closed by lender due to a technical issue.\n  - `fraud` - the account was closed by lender due to fraud.\n  - `other` - the account was closed by lender due to a reason not listed above.\n",
        "enum": [
          "requestedByBorrower",
          "inactivity",
          "terms",
          "technicalIssue",
          "fraud",
          "other"
        ],
        "type": "string"
      },
      "CloseRequestedByBorrower": {
        "description": "Set to true if a borrower requested to close the account.\nNote: This attribute has been deprecated, and you should use `closeReasonDetails` instead.\n  - If you pass both `closeRequestedByBorrower` and `closeReasonDetails`, the system will ignore the `closeRequestedByBorrower` attribute.\n  - If you pass `closeRequestedByBorrower` but not `closeReasonDetails`, the system will set `closeReasonDetails=requestedByBorrower`.\n",
        "nullable": true,
        "type": "boolean"
      },
      "LoanCloseSendNotice": {
        "default": true,
        "description": "When set to `true`, the system will send a `locLineClosed` notice to the borrower.\n",
        "type": "boolean"
      },
      "LoanClosedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "caseId": {
                "$ref": "#/components/schemas/caseId"
              },
              "closeReason": {
                "$ref": "#/components/schemas/CloseReason"
              },
              "closeReasonDetails": {
                "$ref": "#/components/schemas/CloseReasonDetails"
              },
              "closeRequestedByBorrower": {
                "$ref": "#/components/schemas/CloseRequestedByBorrower"
              },
              "eventType": {
                "enum": [
                  "loan.closed"
                ],
                "type": "string"
              },
              "sendNotice": {
                "$ref": "#/components/schemas/LoanCloseSendNotice"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.closed"
      },
      "LoanCreatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "loan.created"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.created"
      },
      "CaseId": {
        "properties": {
          "caseId": {
            "description": "An identifier for an existing case.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "LoanCreditLimitChangedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "adverseActionReason": {
                "description": "The reason why the credit limit was changed.",
                "type": "string"
              },
              "creditLimitAmount": {
                "description": "The new credit limit amount.",
                "type": "number"
              },
              "eventType": {
                "enum": [
                  "loan.credit.limit.changed"
                ],
                "type": "string"
              },
              "sendNotice": {
                "description": "Whether a notice was sent to the borrower",
                "type": "boolean"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/CaseId"
          }
        ],
        "title": "loan.credit.limit.changed"
      },
      "DrawCreditLimitChangedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "creditLimitAmount": {
                "description": "The new credit limit amount.",
                "type": "number"
              },
              "creditLimitPercentage": {
                "description": "The draw's credit limit as a percentage of the loan's credit limit",
                "type": "number"
              },
              "eventType": {
                "enum": [
                  "draw.credit.limit.changed"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/CaseId"
          }
        ],
        "title": "draw.credit.limit.changed"
      },
      "LoanCurrentEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "loan.current"
                ],
                "type": "string"
              },
              "statusChangedDate": {
                "format": "date",
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.current"
      },
      "LoanFeeCapitalizedEvent": {
        "properties": {
          "borrowerId": {
            "$ref": "#/components/schemas/personId"
          },
          "eventType": {
            "enum": [
              "loan.fee.capitalized"
            ],
            "type": "string"
          },
          "expectedPaymentId": {
            "$ref": "#/components/schemas/AnyId"
          },
          "feeTypeId": {
            "$ref": "#/components/schemas/AnyId"
          },
          "loanFeeId": {
            "$ref": "#/components/schemas/AnyId"
          },
          "loanId": {
            "$ref": "#/components/schemas/loanId"
          }
        },
        "title": "loan.fee.capitalized",
        "type": "object"
      },
      "LoanOverdueEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "loan.overdue"
                ],
                "type": "string"
              },
              "overdueNumberDays": {
                "type": "number"
              },
              "overdueTotalAmount": {
                "format": "float",
                "type": "number"
              },
              "statusChangedDate": {
                "format": "date",
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.overdue"
      },
      "LoanOverdueUpdateEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "loan.overdue.update"
                ],
                "type": "string"
              },
              "overdueNumberDays": {
                "type": "number"
              },
              "overdueTotalAmount": {
                "format": "float",
                "type": "number"
              },
              "statusChangedDate": {
                "format": "date",
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.overdue.update"
      },
      "LoanLateFeeBookedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "loan.latefee.booked"
                ],
                "type": "string"
              },
              "expectedPaymentId": {
                "$ref": "#/components/schemas/AnyId"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.latefee.booked"
      },
      "LoanMigrationSucceededEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "loan.migration.succeeded"
                ],
                "type": "string"
              },
              "migrationEventCreatingMessageId": {
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.migration.succeeded"
      },
      "LoanMigrationFailedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "loan.migration.failed"
                ],
                "type": "string"
              },
              "migrationEventCreatingMessageId": {
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.migration.failed"
      },
      "LoanModificationFeeBookedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "loan.modificationfee.booked"
                ],
                "type": "string"
              },
              "expectedPaymentId": {
                "$ref": "#/components/schemas/AnyId"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.modificationfee.booked"
      },
      "LoanFeeBooked": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "loan.fee.booked"
                ],
                "type": "string"
              },
              "expectedPaymentId": {
                "$ref": "#/components/schemas/AnyId"
              },
              "feeType": {
                "enum": [
                  "foreignTransactionFee",
                  "lateFee",
                  "modificationFee",
                  "purchaseFee",
                  "nsfFee",
                  "serviceFee"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.fee.booked"
      },
      "LoanFeeCanceledEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "caseId": {
                "$ref": "#/components/schemas/CaseId"
              },
              "eventType": {
                "enum": [
                  "loan.fee.canceled"
                ],
                "type": "string"
              },
              "expectedPaymentId": {
                "$ref": "#/components/schemas/AnyId"
              },
              "feeChargedAt": {
                "format": "date-time",
                "type": "string"
              },
              "feeTypeId": {
                "$ref": "#/components/schemas/AnyId"
              },
              "loanFeeId": {
                "$ref": "#/components/schemas/AnyId"
              },
              "lockId": {
                "nullable": true,
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.fee.canceled"
      },
      "LoanFeeChangedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "caseId": {
                "$ref": "#/components/schemas/CaseId"
              },
              "eventType": {
                "enum": [
                  "loan.fee.changed"
                ],
                "type": "string"
              },
              "expectedBalanceImpact": {
                "enum": [
                  "increase",
                  "decrease",
                  "unknown"
                ],
                "type": "string"
              },
              "expectedPaymentId": {
                "$ref": "#/components/schemas/AnyId"
              },
              "feeChargedAt": {
                "format": "date-time",
                "type": "string"
              },
              "feeTypeId": {
                "$ref": "#/components/schemas/AnyId"
              },
              "loanFeeId": {
                "$ref": "#/components/schemas/AnyId"
              },
              "lockId": {
                "nullable": true,
                "type": "string"
              },
              "newAmount": {
                "nullable": true,
                "type": "number"
              },
              "oldAmount": {
                "type": "number"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.fee.changed"
      },
      "LoanOwnerChangedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "loan.ownerchanged"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.ownerchanged"
      },
      "drawId": {
        "description": "Draw's unique identifier.",
        "type": "string"
      },
      "RemainingBalancesDeferredEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "deferralType": {
                "enum": [
                  "capitalizeRemainingBalance"
                ],
                "nullable": false,
                "type": "string"
              },
              "drawIds": {
                "items": {
                  "$ref": "#/components/schemas/drawId"
                },
                "type": "array"
              },
              "dueDates": {
                "items": {
                  "format": "date",
                  "type": "string"
                },
                "type": "array"
              },
              "eventType": {
                "enum": [
                  "loan.remainingbalances.deferred"
                ],
                "type": "string"
              },
              "totalDeferredAmount": {
                "format": "float",
                "type": "number"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.remainingbalances.deferred"
      },
      "LoanPromoProgramActivatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "loan.promoprogram.activated"
                ],
                "type": "string"
              },
              "promoId": {
                "$ref": "#/components/schemas/AnyId"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.promoprogram.activated"
      },
      "LoanPromoProgramCanceledEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "loan.promoprogram.canceled"
                ],
                "type": "string"
              },
              "promoId": {
                "$ref": "#/components/schemas/AnyId"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.promoprogram.canceled"
      },
      "LoanPromoProgramCreatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "loan.promoprogram.created"
                ],
                "type": "string"
              },
              "promoId": {
                "$ref": "#/components/schemas/AnyId"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.promoprogram.created"
      },
      "LoanPromoProgramExercisedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "loan.promoprogram.exercised"
                ],
                "type": "string"
              },
              "promoId": {
                "$ref": "#/components/schemas/AnyId"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.promoprogram.exercised"
      },
      "LoanPromoProgramReactivatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "loan.promoprogram.reactivated"
                ],
                "type": "string"
              },
              "promoId": {
                "$ref": "#/components/schemas/AnyId"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.promoprogram.reactivated"
      },
      "LoanPromoProgramUpdatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "loan.promoprogram.updated"
                ],
                "type": "string"
              },
              "promoId": {
                "$ref": "#/components/schemas/AnyId"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.promoprogram.updated"
      },
      "LoanRateCreatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "loan.rate.created"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.rate.created"
      },
      "LoanRateUpdatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "loan.rate.updated"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.rate.updated"
      },
      "LoanRefundedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "loan.refunded"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.refunded"
      },
      "LoanReimbursementInitiatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "loan.reimbursement.initiated"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.reimbursement.initiated"
      },
      "LoanReimbursementProcessedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "loan.reimbursement.processed"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.reimbursement.processed"
      },
      "LoanStatusChangedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "loan.statuschanged"
                ],
                "type": "string"
              },
              "newStatus": {
                "$ref": "#/components/schemas/LoanStatus"
              },
              "oldStatus": {
                "$ref": "#/components/schemas/LoanStatus"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.statuschanged"
      },
      "PeriodStartedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "dueDate": {
                "description": "The due date associated with the period.",
                "format": "date-time",
                "type": "string"
              },
              "eventType": {
                "enum": [
                  "loan.period.started"
                ],
                "type": "string"
              },
              "periodId": {
                "$ref": "#/components/schemas/periodId"
              }
            },
            "required": [
              "dueDate"
            ],
            "type": "object"
          }
        ],
        "title": "loan.period.started"
      },
      "ObligationStatusChangedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "loan.obligation.statuschanged"
                ],
                "type": "string"
              },
              "isOverdue": {
                "description": "The new obligation status to be recorded\n",
                "type": "boolean"
              }
            },
            "required": [
              "isOverdue"
            ],
            "type": "object"
          }
        ],
        "title": "loan.obligation.statuschanged"
      },
      "previousInteractionId": {
        "description": "If a previous interaction identifier is provided, the current and previous interactions will be linked. This can either be Peach's or a lender's external identifier.",
        "nullable": true,
        "type": "string"
      },
      "supercaseBulkOperationId": {
        "description": "If a `SupercaseBulkOperation` created this event, this is that ID",
        "nullable": true,
        "type": "string"
      },
      "SendCommunicationEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "attachments": {
                "description": "An optional list of documents to attach to the outgoing email.\n",
                "items": {
                  "description": "A document descriptor ID.",
                  "type": "string"
                },
                "type": "array"
              },
              "caseId": {
                "$ref": "#/components/schemas/caseId"
              },
              "channel": {
                "$ref": "#/components/schemas/InteractionChannel"
              },
              "contactId": {
                "$ref": "#/components/schemas/contactId"
              },
              "context": {
                "description": "Additional context to be passed when creating a message from preset templates for communication\n",
                "type": "object"
              },
              "eventType": {
                "enum": [
                  "communication.send"
                ],
                "type": "string"
              },
              "isTransactional": {
                "default": true,
                "type": "boolean"
              },
              "loanId": {
                "$ref": "#/components/schemas/loanId"
              },
              "loanIds": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "personId": {
                "$ref": "#/components/schemas/personId"
              },
              "previousInteractionId": {
                "$ref": "#/components/schemas/previousInteractionId"
              },
              "subject": {
                "$ref": "#/components/schemas/InteractionSubject"
              },
              "supercaseBulkOperationId": {
                "$ref": "#/components/schemas/supercaseBulkOperationId"
              },
              "theme": {
                "$ref": "#/components/schemas/InteractionTheme"
              }
            },
            "required": [
              "subject",
              "personId"
            ],
            "type": "object"
          }
        ],
        "title": "communication.send"
      },
      "statementId": {
        "description": "Statement's unique identifier.",
        "type": "string"
      },
      "StatementCreatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "statement.created"
                ],
                "type": "string"
              },
              "loanExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              },
              "loanId": {
                "$ref": "#/components/schemas/loanId"
              },
              "periodId": {
                "$ref": "#/components/schemas/periodId"
              },
              "statementId": {
                "$ref": "#/components/schemas/statementId"
              }
            },
            "type": "object"
          }
        ],
        "title": "statement.created"
      },
      "ownerId": {
        "description": "Payment instrument owner's unique identifier. Currently, the owner can be a borrower, investor, broker or payment processor.",
        "type": "string"
      },
      "ownerType": {
        "description": "Type of owner of the payment instrument.",
        "enum": [
          "person",
          "investor",
          "broker",
          "paymentProcessor"
        ],
        "type": "string"
      },
      "paymentInstrumentId": {
        "description": "Payment Instrument's unique identifier.",
        "type": "string"
      },
      "PaymentInstrumentCreatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "borrowerId": {
                "$ref": "#/components/schemas/personId",
                "nullable": true
              },
              "eventType": {
                "enum": [
                  "payment.instrument.created"
                ],
                "type": "string"
              },
              "ownerId": {
                "$ref": "#/components/schemas/ownerId"
              },
              "ownerType": {
                "$ref": "#/components/schemas/ownerType"
              },
              "paymentInstrumentExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              },
              "paymentInstrumentId": {
                "$ref": "#/components/schemas/paymentInstrumentId"
              },
              "personExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              }
            },
            "type": "object"
          }
        ],
        "title": "payment.instrument.created"
      },
      "PaymentInstrumentUpdatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "borrowerId": {
                "$ref": "#/components/schemas/personId",
                "nullable": true
              },
              "changes": {
                "type": "object"
              },
              "eventType": {
                "enum": [
                  "payment.instrument.updated"
                ],
                "type": "string"
              },
              "ownerId": {
                "$ref": "#/components/schemas/ownerId"
              },
              "ownerType": {
                "$ref": "#/components/schemas/ownerType"
              },
              "paymentInstrumentId": {
                "$ref": "#/components/schemas/paymentInstrumentId"
              }
            },
            "type": "object"
          }
        ],
        "title": "payment.instrument.updated"
      },
      "PaymentInstrumentDeactivatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "borrowerId": {
                "$ref": "#/components/schemas/personId",
                "nullable": true
              },
              "eventType": {
                "enum": [
                  "payment.instrument.deactivated"
                ],
                "type": "string"
              },
              "ownerId": {
                "$ref": "#/components/schemas/ownerId"
              },
              "ownerType": {
                "$ref": "#/components/schemas/ownerType"
              },
              "paymentInstrumentExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              },
              "paymentInstrumentId": {
                "$ref": "#/components/schemas/paymentInstrumentId"
              },
              "personExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              }
            },
            "type": "object"
          }
        ],
        "title": "payment.instrument.deactivated"
      },
      "PersonBankruptcyDeceasedStartMonitoringEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "borrowerId": {
                "$ref": "#/components/schemas/personId"
              },
              "eventType": {
                "enum": [
                  "person.monitoring.bankruptcy.started"
                ],
                "type": "string"
              },
              "personExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              }
            },
            "type": "object"
          }
        ],
        "title": "person.monitoring.bankruptcy.started"
      },
      "consentId": {
        "description": "Consent's unique identifier.",
        "type": "string"
      },
      "PersonConsentUpdatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "borrowerId": {
                "$ref": "#/components/schemas/personId"
              },
              "consentId": {
                "$ref": "#/components/schemas/consentId"
              },
              "eventType": {
                "enum": [
                  "person.consent.updated"
                ],
                "type": "string"
              },
              "personExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              }
            },
            "type": "object"
          }
        ],
        "title": "person.consent.updated"
      },
      "PersonCreatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "borrowerId": {
                "$ref": "#/components/schemas/personId"
              },
              "eventType": {
                "enum": [
                  "person.created"
                ],
                "type": "string"
              },
              "personExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              }
            },
            "type": "object"
          }
        ],
        "title": "person.created"
      },
      "PersonSCRAStartMonitoringEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "borrowerId": {
                "$ref": "#/components/schemas/personId"
              },
              "eventType": {
                "enum": [
                  "person.monitoring.scra.start"
                ],
                "type": "string"
              },
              "personExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              }
            },
            "type": "object"
          }
        ],
        "title": "person.monitoring.scra.start"
      },
      "transactionId": {
        "description": "Transaction's unique identifier.",
        "type": "string"
      },
      "PaymentChargebackEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "amount": {
                "description": "The amount of the chargeback",
                "type": "number"
              },
              "borrowerId": {
                "$ref": "#/components/schemas/personId"
              },
              "description": {
                "description": "The description of the chargeback",
                "type": "string"
              },
              "eventType": {
                "enum": [
                  "payment.chargeback"
                ],
                "type": "string"
              },
              "loanId": {
                "$ref": "#/components/schemas/loanId"
              },
              "reasonCode": {
                "description": "The reason code",
                "type": "string"
              },
              "transactionId": {
                "$ref": "#/components/schemas/transactionId"
              }
            },
            "type": "object"
          }
        ],
        "title": "payment.chargeback"
      },
      "PaymentChargebackReversedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "amount": {
                "description": "The amount of the chargeback",
                "type": "number"
              },
              "borrowerId": {
                "$ref": "#/components/schemas/personId"
              },
              "description": {
                "description": "The description of the chargeback",
                "type": "string"
              },
              "eventType": {
                "enum": [
                  "payment.chargeback.reversed"
                ],
                "type": "string"
              },
              "loanId": {
                "$ref": "#/components/schemas/loanId"
              },
              "reasonCode": {
                "description": "The reason code",
                "type": "string"
              },
              "transactionId": {
                "$ref": "#/components/schemas/transactionId"
              }
            },
            "type": "object"
          }
        ],
        "title": "payment.chargeback.reversed"
      },
      "PaymentFailedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "payment.failed"
                ],
                "type": "string"
              },
              "transactionExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              },
              "transactionId": {
                "$ref": "#/components/schemas/transactionId"
              }
            },
            "type": "object"
          }
        ],
        "title": "payment.failed"
      },
      "PaymentInitiatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "borrowerId": {
                "$ref": "#/components/schemas/personId"
              },
              "eventType": {
                "enum": [
                  "payment.initiated"
                ],
                "type": "string"
              },
              "personExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              },
              "transactionExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              },
              "transactionId": {
                "$ref": "#/components/schemas/transactionId"
              }
            },
            "type": "object"
          }
        ],
        "title": "payment.initiated"
      },
      "PaymentPendingEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "borrowerId": {
                "$ref": "#/components/schemas/personId"
              },
              "eventType": {
                "enum": [
                  "payment.pending"
                ],
                "type": "string"
              },
              "personExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              },
              "transactionExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              },
              "transactionId": {
                "$ref": "#/components/schemas/transactionId"
              }
            },
            "type": "object"
          }
        ],
        "title": "payment.pending"
      },
      "PaymentReversedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "amount": {
                "description": "The amount of the reversal",
                "type": "number"
              },
              "borrowerExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              },
              "borrowerId": {
                "$ref": "#/components/schemas/personId"
              },
              "eventType": {
                "enum": [
                  "payment.reversed"
                ],
                "type": "string"
              },
              "reversedAmount": {
                "description": "The sum of all of the reversals of the original transaction.",
                "type": "number"
              },
              "reversedTransactionId": {
                "description": "Unique identifier of the original transaction.",
                "type": "string"
              },
              "transactionExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              },
              "transactionId": {
                "$ref": "#/components/schemas/transactionId"
              }
            },
            "type": "object"
          }
        ],
        "title": "payment.reversed"
      },
      "PaymentScheduledEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "borrowerId": {
                "$ref": "#/components/schemas/personId"
              },
              "eventType": {
                "enum": [
                  "payment.scheduled"
                ],
                "type": "string"
              },
              "personExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              },
              "transactionExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              },
              "transactionId": {
                "$ref": "#/components/schemas/transactionId"
              }
            },
            "type": "object"
          }
        ],
        "title": "payment.scheduled"
      },
      "PaymentSucceededEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "borrowerId": {
                "$ref": "#/components/schemas/personId"
              },
              "eventType": {
                "enum": [
                  "payment.succeeded"
                ],
                "type": "string"
              },
              "loanId": {
                "$ref": "#/components/schemas/loanId"
              },
              "paymentInstrumentId": {
                "$ref": "#/components/schemas/paymentInstrumentId"
              },
              "transactionExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              },
              "transactionId": {
                "$ref": "#/components/schemas/transactionId"
              }
            },
            "type": "object"
          }
        ],
        "title": "payment.succeeded"
      },
      "newScheduledDate": {
        "format": "date",
        "type": "string"
      },
      "oldScheduledDate": {
        "format": "date",
        "type": "string"
      },
      "PaymentRescheduledEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "borrowerExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              },
              "borrowerId": {
                "$ref": "#/components/schemas/personId"
              },
              "eventType": {
                "enum": [
                  "payment.rescheduled"
                ],
                "type": "string"
              },
              "loanExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              },
              "loanId": {
                "$ref": "#/components/schemas/loanId"
              },
              "newScheduledDate": {
                "$ref": "#/components/schemas/newScheduledDate"
              },
              "oldScheduledDate": {
                "$ref": "#/components/schemas/oldScheduledDate"
              },
              "transactionExternalId": {
                "$ref": "#/components/schemas/readOnlyExternalId"
              },
              "transactionId": {
                "$ref": "#/components/schemas/transactionId"
              }
            },
            "type": "object"
          }
        ],
        "title": "payment.rescheduled"
      },
      "paymentInstrumentType": {
        "enum": [
          "bankAccount"
        ],
        "type": "string"
      },
      "transactionCreatedAt": {
        "format": "date-time",
        "type": "string"
      },
      "transactionCurrency": {
        "pattern": "[A-Z]{3}",
        "type": "string"
      },
      "transactionIsExternal": {
        "type": "boolean"
      },
      "transactionScheduledAmount": {
        "type": "number"
      },
      "transactionScheduledDate": {
        "format": "date",
        "type": "string"
      },
      "PaymentDueTodayEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "borrowerId": {
                "$ref": "#/components/schemas/personId"
              },
              "eventType": {
                "enum": [
                  "payment.due.today"
                ],
                "type": "string"
              },
              "loanId": {
                "$ref": "#/components/schemas/loanId"
              },
              "paymentInstrumentId": {
                "$ref": "#/components/schemas/paymentInstrumentId"
              },
              "paymentInstrumentType": {
                "$ref": "#/components/schemas/paymentInstrumentType"
              },
              "transactionCreatedAt": {
                "$ref": "#/components/schemas/transactionCreatedAt"
              },
              "transactionCurrency": {
                "$ref": "#/components/schemas/transactionCurrency"
              },
              "transactionId": {
                "$ref": "#/components/schemas/transactionId"
              },
              "transactionIsExternal": {
                "$ref": "#/components/schemas/transactionIsExternal"
              },
              "transactionScheduledAmount": {
                "$ref": "#/components/schemas/transactionScheduledAmount"
              },
              "transactionScheduledDate": {
                "$ref": "#/components/schemas/transactionScheduledDate"
              }
            },
            "type": "object"
          }
        ],
        "title": "payment.due.today"
      },
      "PaymentHoldDaysExpiredEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "borrowerId": {
                "$ref": "#/components/schemas/personId"
              },
              "eventType": {
                "enum": [
                  "payment.hold.days.expired"
                ],
                "type": "string"
              },
              "loanId": {
                "$ref": "#/components/schemas/loanId"
              },
              "transactionId": {
                "$ref": "#/components/schemas/transactionId"
              }
            },
            "type": "object"
          }
        ],
        "title": "payment.hold.days.expired"
      },
      "purchaseId": {
        "description": "Purchase's unique identifier.",
        "type": "string"
      },
      "PurchaseAuthorizedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "purchase.authorized"
                ],
                "type": "string"
              },
              "purchaseId": {
                "$ref": "#/components/schemas/purchaseId"
              }
            },
            "type": "object"
          }
        ],
        "title": "purchase.authorized"
      },
      "PurchaseSettledEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "purchase.settled"
                ],
                "type": "string"
              },
              "purchaseId": {
                "$ref": "#/components/schemas/purchaseId"
              }
            },
            "type": "object"
          }
        ],
        "title": "purchase.settled"
      },
      "PurchaseAppliedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "purchase.applied"
                ],
                "type": "string"
              },
              "purchaseId": {
                "$ref": "#/components/schemas/purchaseId"
              }
            },
            "type": "object"
          }
        ],
        "title": "purchase.applied"
      },
      "lineOfCreditId": {
        "description": "Line of Credit's unique identifier.",
        "type": "string"
      },
      "PurchaseCreatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "purchase.created"
                ],
                "type": "string"
              },
              "lineOfCreditId": {
                "$ref": "#/components/schemas/lineOfCreditId"
              },
              "purchaseId": {
                "$ref": "#/components/schemas/purchaseId"
              }
            },
            "type": "object"
          }
        ],
        "title": "purchase.created"
      },
      "newAmount": {
        "type": "number"
      },
      "newStatus": {
        "type": "string"
      },
      "oldAmount": {
        "type": "number"
      },
      "oldStatus": {
        "type": "string"
      },
      "PurchaseChangedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "purchase.changed"
                ],
                "type": "string"
              },
              "lineOfCreditId": {
                "$ref": "#/components/schemas/lineOfCreditId"
              },
              "newAmount": {
                "$ref": "#/components/schemas/newAmount"
              },
              "newStatus": {
                "$ref": "#/components/schemas/newStatus"
              },
              "oldAmount": {
                "$ref": "#/components/schemas/oldAmount"
              },
              "oldStatus": {
                "$ref": "#/components/schemas/oldStatus"
              },
              "purchaseId": {
                "$ref": "#/components/schemas/purchaseId"
              }
            },
            "type": "object"
          }
        ],
        "title": "purchase.changed"
      },
      "purchaseDisputeId": {
        "description": "Purchase dispute's unique identifier.",
        "type": "string"
      },
      "purchaseDisputeStatus": {
        "enum": [
          "unsubmitted",
          "submitted",
          "expired",
          "won",
          "lost",
          "canceled"
        ],
        "type": "string"
      },
      "PurchaseDisputeCreatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "drawId": {
                "$ref": "#/components/schemas/drawId"
              },
              "eventType": {
                "enum": [
                  "purchase.dispute.created"
                ],
                "type": "string"
              },
              "isPastPurchaseDispute": {
                "description": "Whether the purchase dispute is for a past purchase or not. Past purchases are used in LOC migrations. Past purchases have effective dates before the migration cutoff date.",
                "type": "boolean"
              },
              "purchaseDisputeId": {
                "$ref": "#/components/schemas/purchaseDisputeId"
              },
              "purchaseId": {
                "$ref": "#/components/schemas/purchaseId"
              },
              "status": {
                "$ref": "#/components/schemas/purchaseDisputeStatus"
              }
            },
            "type": "object"
          }
        ],
        "title": "purchase.dispute.created"
      },
      "PurchaseDisputeUpdatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "drawId": {
                "$ref": "#/components/schemas/drawId"
              },
              "eventType": {
                "enum": [
                  "purchase.dispute.updated"
                ],
                "type": "string"
              },
              "isPastPurchaseDispute": {
                "description": "Whether the purchase dispute is for a past purchase or not. Past purchases are used in LOC migrations. Past purchases have effective dates before the migration cutoff date.",
                "type": "boolean"
              },
              "purchaseDisputeId": {
                "$ref": "#/components/schemas/purchaseDisputeId"
              },
              "purchaseId": {
                "$ref": "#/components/schemas/purchaseId"
              },
              "status": {
                "$ref": "#/components/schemas/purchaseDisputeStatus"
              }
            },
            "type": "object"
          }
        ],
        "title": "purchase.dispute.updated"
      },
      "creditAgencyId": {
        "description": "Credit agency's unique identifier.",
        "format": "date",
        "type": "string"
      },
      "startDate": {
        "format": "date",
        "type": "string"
      },
      "LoanCreditReportingCreatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "creditAgencyId": {
                "$ref": "#/components/schemas/creditAgencyId"
              },
              "eventType": {
                "enum": [
                  "loan.creditreporting.created"
                ],
                "type": "string"
              },
              "startDate": {
                "$ref": "#/components/schemas/startDate"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.creditreporting.created"
      },
      "stopDate": {
        "format": "date",
        "type": "string"
      },
      "LoanCreditReportingStoppedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanEvent"
          },
          {
            "properties": {
              "caseId": {
                "$ref": "#/components/schemas/caseId"
              },
              "creditAgencyId": {
                "$ref": "#/components/schemas/creditAgencyId"
              },
              "eventType": {
                "enum": [
                  "loan.creditreporting.stopped"
                ],
                "type": "string"
              },
              "stopDate": {
                "$ref": "#/components/schemas/stopDate"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.creditreporting.stopped"
      },
      "obligationId": {
        "description": "Obligation unique identifier.",
        "type": "string"
      },
      "InterestCapitalizedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "borrowerId": {
                "$ref": "#/components/schemas/personId"
              },
              "eventType": {
                "enum": [
                  "loan.interest.capitalized"
                ],
                "type": "string"
              },
              "feeAmount": {
                "description": "The fee amount capitalized.",
                "type": "number"
              },
              "interestAmount": {
                "description": "The interest amount capitalized.",
                "type": "number"
              },
              "isReplay": {
                "description": "`true` if capitalization was updated after the overdue date.\n",
                "type": "boolean"
              },
              "loanId": {
                "$ref": "#/components/schemas/loanId"
              },
              "obligationId": {
                "$ref": "#/components/schemas/obligationId"
              }
            },
            "type": "object"
          }
        ],
        "title": "loan.interest.capitalized"
      },
      "achFileId": {
        "description": "The ACH File upload monitoring record ID.",
        "nullable": true,
        "type": "string"
      },
      "paymentProcessorId": {
        "description": "The payment processor ID.",
        "type": "string"
      },
      "ACHFileEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "achFileId": {
                "$ref": "#/components/schemas/achFileId"
              },
              "fileName": {
                "$ref": "#/components/schemas/fileName"
              },
              "processorId": {
                "$ref": "#/components/schemas/paymentProcessorId"
              }
            },
            "required": [
              "processorId",
              "fileName"
            ],
            "type": "object"
          }
        ]
      },
      "ACHFileCreatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ACHFileEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "ach.file.created"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "ach.file.created"
      },
      "fileDestination": {
        "description": "The destination where we are going to store the ACH File.",
        "enum": [
          "gcp",
          "sftp"
        ],
        "type": "string"
      },
      "ACHFileUploadEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ACHFileEvent"
          },
          {
            "properties": {
              "fileDestination": {
                "$ref": "#/components/schemas/fileDestination"
              }
            },
            "required": [
              "fileDestination"
            ],
            "type": "object"
          }
        ]
      },
      "ACHFileUploadAttemptedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ACHFileUploadEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "ach.file.upload.attempted"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "ach.file.upload.attempted"
      },
      "ACHFileUploadFailedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ACHFileUploadEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "ach.file.upload.failed"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "ach.file.upload.failed"
      },
      "ACHFileUploadSucceededEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ACHFileUploadEvent"
          },
          {
            "properties": {
              "eventType": {
                "enum": [
                  "ach.file.upload.succeeded"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "ach.file.upload.succeeded"
      },
      "amount": {
        "type": "number"
      },
      "transactionFailureReason": {
        "enum": [
          "insufficientFunds",
          "chargeback",
          "accountClosed",
          "invalidAccount",
          "unknownReason",
          "invalidCvv",
          "invalidExpirationDate",
          "avsFailed",
          "networkError",
          "cardDeclined",
          "accountFrozen",
          "deceased",
          "invalidRouting",
          "paymentStopped",
          "microdepositsFailed",
          "incorrectNumber",
          "fraudulent",
          "unauthorizedDebit",
          "microdepositsAttemptFailed"
        ],
        "type": "string"
      },
      "ReconciliationPaymentFailedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseEvent"
          },
          {
            "properties": {
              "amount": {
                "$ref": "#/components/schemas/amount"
              },
              "eventType": {
                "enum": [
                  "reconciliation.payment.failed"
                ],
                "type": "string"
              },
              "fromInstrumentId": {
                "$ref": "#/components/schemas/paymentInstrumentId"
              },
              "reason": {
                "$ref": "#/components/schemas/transactionFailureReason"
              },
              "settlementIds": {
                "items": {
                  "$ref": "#/components/schemas/readOnlyExternalId"
                },
                "type": "array"
              },
              "toInstrumentId": {
                "$ref": "#/components/schemas/paymentInstrumentId"
              },
              "transactionId": {
                "$ref": "#/components/schemas/transactionId"
              }
            },
            "type": "object"
          }
        ],
        "title": "reconciliation.payment.failed"
      },
      "replayId": {
        "description": "Replay's unique identifier.",
        "type": "string"
      },
      "LoanBalanceChangedEvent": {
        "properties": {
          "balances": {
            "description": "The balances of the loan after the balance change.\nContains a subset of the fields found in the <a href=\"/api-docs/api-public/balances/peach.people.loans.handlers.loan_balances_get\">Get loan balances</a> response body.\n",
            "properties": {
              "authorizedAmount": {
                "$ref": "#/components/schemas/AuthorizedAmount"
              },
              "availableCreditAmount": {
                "description": "The available credit amount to use. If the borrower exceeded their credit limit, the `availableCreditAmount` will be zero.\n\nFor lines of credit only:\n  - `availableCreditAmount` takes into account `authorizedAmount`. Authorized purchases decrease the `availableCreditAmount`.\n  - The amount can be greater than `creditLimitAmount`. It happens only when the total amount of payments made by the borrower\n    plus the total amount of service credits exceeds the line or draw balance. Any future purchases will first deplete the\n    overpayment amount (also called `reimbursementAmount`).\n\nOnly applicable to lines of credit or installment loans with multi-advances.\n",
                "format": "float",
                "type": "number"
              },
              "calculatedAt": {
                "description": "The date and time the balance was calculated.",
                "format": "date-time",
                "type": "string"
              },
              "openToBuyAmount": {
                "$ref": "#/components/schemas/OpenToBuyAmount"
              },
              "outstandingBalances": {
                "description": "When a loan is `active`, outstanding balances combine non-due, due, and overdue balances. When a loan is\n`accelerated`, outstanding balances are equal to non-accrual balances. When a loan is `chargedOff`,\noutstanding balances are equal to charged-off balances.\n",
                "properties": {
                  "outstandingFeesAmount": {
                    "description": "The fees portion of the `outstandingTotalAmount`.\n",
                    "format": "float",
                    "type": "number"
                  },
                  "outstandingInterestAmount": {
                    "description": "The interest portion of the `outstandingTotalAmount`.",
                    "format": "float",
                    "type": "number"
                  },
                  "outstandingPrincipalAmount": {
                    "description": "The principal portion of the `outstandingTotalAmount`.",
                    "format": "float",
                    "type": "number"
                  },
                  "outstandingTotalAmount": {
                    "description": "The total outstanding balance sums outstanding principal, interest, and fees. Also called the loan payoff amount.\n\nIf the loan is charged off, the outstanding totalAmount will be equal to the `chargedOffTotalAmount`.\n",
                    "format": "float",
                    "type": "number"
                  }
                },
                "type": "object"
              },
              "overdueBalances": {
                "description": "Overdue balances represent balances that are overdue.",
                "properties": {
                  "overdueTotalAmount": {
                    "description": "The total overdue balance sums overdue principal, interest, and fees.",
                    "format": "float",
                    "type": "number"
                  }
                },
                "type": "object"
              },
              "paidBalances": {
                "description": "If loan balance was affected by transaction(s) (e.g. payment), this object will contain details of the paid amounts.\nThe system will populate `paidBalances` attributes in two scenarios:\n\n1. A transaction, a payment or service credit, was applied without triggering a replay. In this scenario, amounts\n   will show how much of the loan balance was paid by the transaction.\n\n2. A replay was triggered. In this scenario, the system will sum up how much of the loan balance was paid by all\n   transactions that were reapplied from \"replay start timestamp\" until \"replay end timestamp\". If there were no\n   transactions in the replay period that impacted the loan balance, the `paidTotalAmount` and other attributes in the object will be zeros.\n\nOutside of these scenarios, the values will be zero.\n",
                "properties": {
                  "paidFeesAmount": {
                    "description": "The amount of `paidTotalAmount` allocated to fees.",
                    "format": "float",
                    "type": "number"
                  },
                  "paidInterestAmount": {
                    "description": "The amount of `paidTotalAmount` allocated to interest.",
                    "format": "float",
                    "type": "number"
                  },
                  "paidOverAmount": {
                    "description": "Stores any excess amount that was not allocated to principal, interest or fees.\n\nFor example:\n- A check in amount greater than outstanding balance was applied.\n- The overpayment portion (aka balance owed to a borrower) will be reported as `paidOverAmount`.\n",
                    "format": "float",
                    "type": "number"
                  },
                  "paidPrincipalAmount": {
                    "description": "The amount of `paidTotalAmount` allocated to principal.",
                    "format": "float",
                    "type": "number"
                  },
                  "paidReimbursementsAmount": {
                    "description": "The total amount of reimbursements that were sent back to a borrower.",
                    "format": "float",
                    "type": "number"
                  },
                  "paidTotalAmount": {
                    "description": "The paid amount that impacted/lowered the balance.",
                    "format": "float",
                    "type": "number"
                  }
                },
                "type": "object"
              },
              "reimbursementAmount": {
                "description": "The total amount that a lender owes to the borrower. The amount was not sent to the borrower yet.\nAfter a reimbursement is processed, the amount is reduced accordingly.\n",
                "format": "float",
                "type": "number"
              },
              "utilizationAmount": {
                "$ref": "#/components/schemas/UtilizationAmount"
              }
            },
            "type": "object"
          },
          "borrowerId": {
            "$ref": "#/components/schemas/personId"
          },
          "eventId": {
            "description": "The creatingMessageId of the event that caused the balance change.",
            "type": "string"
          },
          "eventType": {
            "enum": [
              "loan.balance.changed"
            ],
            "type": "string"
          },
          "interestAccruedAmount": {
            "description": "The amount of interest accrued. Only set for daily loan maintenance and catchup interest accrual.",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "loanId": {
            "$ref": "#/components/schemas/loanId"
          },
          "replayEndedAt": {
            "description": "Replay ended at timestamp. Only populated for replay events.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "replayId": {
            "$ref": "#/components/schemas/replayId"
          },
          "replayStartedAt": {
            "description": "Replay started at timestamp. Only populated for replay events.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "title": "loan.balance.changed",
        "type": "object"
      },
      "supercaseId": {
        "description": "Supercase's unique identifier.",
        "type": "string"
      },
      "SupercaseChangedEvent": {
        "allOf": [
          {
            "properties": {
              "eventType": {
                "enum": [
                  "supercase.changed"
                ],
                "type": "string"
              },
              "supercaseId": {
                "$ref": "#/components/schemas/supercaseId"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/ChangeEvent"
          }
        ],
        "title": "supercase.changed"
      },
      "GenericEvent": {
        "properties": {
          "eventType": {
            "type": "string"
          }
        },
        "title": "generic",
        "type": "object"
      },
      "eventTypeDefinition": {
        "description": "The dotted event string.",
        "example": "loan.statuschanged",
        "type": "string"
      },
      "EventPublic": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/AutopayPaymentRescheduledEvent"
          },
          {
            "$ref": "#/components/schemas/AutopayPaymentCanceledEvent"
          },
          {
            "$ref": "#/components/schemas/CancelAutopayScheduleEvent"
          },
          {
            "$ref": "#/components/schemas/AutopayScheduleChangedEvent"
          },
          {
            "$ref": "#/components/schemas/CardReplacementRequestedEvent"
          },
          {
            "$ref": "#/components/schemas/CardCreatedEvent"
          },
          {
            "$ref": "#/components/schemas/CardStatusChangedEvent"
          },
          {
            "$ref": "#/components/schemas/CaseAssociationAddedEvent"
          },
          {
            "$ref": "#/components/schemas/CaseAssociationRemovedEvent"
          },
          {
            "$ref": "#/components/schemas/CaseDoNotInteractCreatedEvent"
          },
          {
            "$ref": "#/components/schemas/CaseDoNotInteractDeletedEvent"
          },
          {
            "$ref": "#/components/schemas/CaseDoNotInteractUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/CaseDoNotInteractChangedEvent"
          },
          {
            "$ref": "#/components/schemas/CaseDoNotInteractExpiredEvent"
          },
          {
            "$ref": "#/components/schemas/CaseEscalationChangedEvent"
          },
          {
            "$ref": "#/components/schemas/CaseCreatedEvent"
          },
          {
            "$ref": "#/components/schemas/CaseUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/CaseDeletedEvent"
          },
          {
            "$ref": "#/components/schemas/CaseChangedEvent"
          },
          {
            "$ref": "#/components/schemas/ContactCreatedEvent"
          },
          {
            "$ref": "#/components/schemas/ContactUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/ContactDeletedEvent"
          },
          {
            "$ref": "#/components/schemas/InteractionBlockedEvent"
          },
          {
            "$ref": "#/components/schemas/LoanClosedEvent"
          },
          {
            "$ref": "#/components/schemas/LoanCreatedEvent"
          },
          {
            "$ref": "#/components/schemas/LoanCreditLimitChangedEvent"
          },
          {
            "$ref": "#/components/schemas/DrawCreditLimitChangedEvent"
          },
          {
            "$ref": "#/components/schemas/LoanCurrentEvent"
          },
          {
            "$ref": "#/components/schemas/LoanFeeCapitalizedEvent"
          },
          {
            "$ref": "#/components/schemas/LoanOverdueEvent"
          },
          {
            "$ref": "#/components/schemas/LoanOverdueUpdateEvent"
          },
          {
            "$ref": "#/components/schemas/LoanLateFeeBookedEvent"
          },
          {
            "$ref": "#/components/schemas/LoanMigrationSucceededEvent"
          },
          {
            "$ref": "#/components/schemas/LoanMigrationFailedEvent"
          },
          {
            "$ref": "#/components/schemas/LoanModificationFeeBookedEvent"
          },
          {
            "$ref": "#/components/schemas/LoanFeeBooked"
          },
          {
            "$ref": "#/components/schemas/LoanFeeCanceledEvent"
          },
          {
            "$ref": "#/components/schemas/LoanFeeChangedEvent"
          },
          {
            "$ref": "#/components/schemas/LoanOwnerChangedEvent"
          },
          {
            "$ref": "#/components/schemas/RemainingBalancesDeferredEvent"
          },
          {
            "$ref": "#/components/schemas/LoanPromoProgramActivatedEvent"
          },
          {
            "$ref": "#/components/schemas/LoanPromoProgramCanceledEvent"
          },
          {
            "$ref": "#/components/schemas/LoanPromoProgramCreatedEvent"
          },
          {
            "$ref": "#/components/schemas/LoanPromoProgramExercisedEvent"
          },
          {
            "$ref": "#/components/schemas/LoanPromoProgramReactivatedEvent"
          },
          {
            "$ref": "#/components/schemas/LoanPromoProgramUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/LoanRateCreatedEvent"
          },
          {
            "$ref": "#/components/schemas/LoanRateUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/LoanRefundedEvent"
          },
          {
            "$ref": "#/components/schemas/LoanReimbursementInitiatedEvent"
          },
          {
            "$ref": "#/components/schemas/LoanReimbursementProcessedEvent"
          },
          {
            "$ref": "#/components/schemas/LoanStatusChangedEvent"
          },
          {
            "$ref": "#/components/schemas/PeriodStartedEvent"
          },
          {
            "$ref": "#/components/schemas/ObligationStatusChangedEvent"
          },
          {
            "$ref": "#/components/schemas/SendCommunicationEvent"
          },
          {
            "$ref": "#/components/schemas/StatementCreatedEvent"
          },
          {
            "$ref": "#/components/schemas/PaymentInstrumentCreatedEvent"
          },
          {
            "$ref": "#/components/schemas/PaymentInstrumentUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/PaymentInstrumentDeactivatedEvent"
          },
          {
            "$ref": "#/components/schemas/PersonBankruptcyDeceasedStartMonitoringEvent"
          },
          {
            "$ref": "#/components/schemas/PersonConsentUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/PersonCreatedEvent"
          },
          {
            "$ref": "#/components/schemas/PersonSCRAStartMonitoringEvent"
          },
          {
            "$ref": "#/components/schemas/PaymentChargebackEvent"
          },
          {
            "$ref": "#/components/schemas/PaymentChargebackReversedEvent"
          },
          {
            "$ref": "#/components/schemas/PaymentFailedEvent"
          },
          {
            "$ref": "#/components/schemas/PaymentInitiatedEvent"
          },
          {
            "$ref": "#/components/schemas/PaymentPendingEvent"
          },
          {
            "$ref": "#/components/schemas/PaymentReversedEvent"
          },
          {
            "$ref": "#/components/schemas/PaymentScheduledEvent"
          },
          {
            "$ref": "#/components/schemas/PaymentSucceededEvent"
          },
          {
            "$ref": "#/components/schemas/PaymentRescheduledEvent"
          },
          {
            "$ref": "#/components/schemas/PaymentDueTodayEvent"
          },
          {
            "$ref": "#/components/schemas/PaymentHoldDaysExpiredEvent"
          },
          {
            "$ref": "#/components/schemas/PurchaseAuthorizedEvent"
          },
          {
            "$ref": "#/components/schemas/PurchaseSettledEvent"
          },
          {
            "$ref": "#/components/schemas/PurchaseAppliedEvent"
          },
          {
            "$ref": "#/components/schemas/PurchaseCreatedEvent"
          },
          {
            "$ref": "#/components/schemas/PurchaseChangedEvent"
          },
          {
            "$ref": "#/components/schemas/PurchaseDisputeCreatedEvent"
          },
          {
            "$ref": "#/components/schemas/PurchaseDisputeUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/LoanCreditReportingCreatedEvent"
          },
          {
            "$ref": "#/components/schemas/LoanCreditReportingStoppedEvent"
          },
          {
            "$ref": "#/components/schemas/InterestCapitalizedEvent"
          },
          {
            "$ref": "#/components/schemas/ACHFileCreatedEvent"
          },
          {
            "$ref": "#/components/schemas/ACHFileUploadAttemptedEvent"
          },
          {
            "$ref": "#/components/schemas/ACHFileUploadFailedEvent"
          },
          {
            "$ref": "#/components/schemas/ACHFileUploadSucceededEvent"
          },
          {
            "$ref": "#/components/schemas/ReconciliationPaymentFailedEvent"
          },
          {
            "$ref": "#/components/schemas/LoanBalanceChangedEvent"
          },
          {
            "$ref": "#/components/schemas/SupercaseChangedEvent"
          },
          {
            "$ref": "#/components/schemas/GenericEvent"
          }
        ],
        "properties": {
          "eventType": {
            "$ref": "#/components/schemas/eventTypeDefinition"
          }
        },
        "required": [
          "eventType"
        ],
        "type": "object"
      },
      "InteractionsPaging": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NewPaginator"
          },
          {
            "properties": {
              "data": {
                "items": {
                  "$ref": "#/components/schemas/Interaction"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "NoteCategory": {
        "default": "generic",
        "description": "Specifies the nature of a Note\n",
        "enum": [
          "generic",
          "escalationCreateReason",
          "escalationUpdateReason",
          "escalationCancelReason"
        ],
        "type": "string"
      },
      "NoteResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "archived": {
                "default": false,
                "description": "Set to `true` if the note has been archived.\n",
                "type": "boolean"
              },
              "archivedAt": {
                "format": "date-time",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "archivedBy": {
                "$ref": "#/components/schemas/UserActionInfo",
                "description": "Details of the user responsible for archiving the note.\nCan be an agent or automated system process.\n"
              },
              "caseId": {
                "description": "Identifier of the case that the note belongs to.",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "category": {
                "$ref": "#/components/schemas/NoteCategory"
              },
              "content": {
                "description": "The content of the note.",
                "type": "string"
              },
              "createdBy": {
                "$ref": "#/components/schemas/UserActionInfo",
                "description": "Details of the user responsible for creating the note.\nCan be an agent or automated system process.\n"
              },
              "deletedAt": {
                "format": "date-time",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "deletedBy": {
                "$ref": "#/components/schemas/UserActionInfo",
                "description": "Latest user identifier who deleted the note."
              },
              "edited": {
                "default": false,
                "description": "Indicates whether the note was edited.\n",
                "readOnly": true,
                "type": "boolean"
              },
              "id": {
                "description": "The note identifier.",
                "readOnly": true,
                "type": "string"
              },
              "important": {
                "default": false,
                "description": "Set to `true` if the note is important.\n",
                "type": "boolean"
              },
              "interactionId": {
                "description": "Identifier of the interaction that the note belongs to.",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "object": {
                "default": "note",
                "enum": [
                  "note"
                ],
                "readOnly": true,
                "type": "string"
              },
              "oldContent": {
                "type": "array"
              },
              "pinned": {
                "default": false,
                "description": "Specify that this note should be sorted to the top of the list\nby default.\n",
                "type": "boolean"
              },
              "sensitiveData": {
                "default": false,
                "description": "Indicates whether the note contains sensitive information.\n",
                "type": "boolean"
              },
              "status": {
                "enum": [
                  "active",
                  "inactive"
                ],
                "type": "string"
              },
              "supercaseId": {
                "description": "Identifier of the supercase that the note belongs to.",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "taskableInstruction": {
                "default": false,
                "description": "Set to `true` if the note is intended to be an instruction which creates a review task.\n",
                "type": "boolean"
              },
              "type": {
                "enum": [
                  "borrowerNote",
                  "caseNote",
                  "interactionNote",
                  "supercaseGlobalNote",
                  "supercasePrivateNote"
                ],
                "readOnly": true,
                "type": "string"
              },
              "updatedBy": {
                "$ref": "#/components/schemas/UserActionInfo",
                "description": "Details of the user responsible for last updating the note.\nCan be an agent or automated system process.\n"
              }
            },
            "type": "object"
          }
        ],
        "description": "A borrower, case, supercase or interaction can have a note associated with it. Each note can only be associated with one of these objects.\n",
        "title": "A borrower, case, supercase or interaction note"
      },
      "NoteRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "archived": {
                "default": false,
                "description": "Set to `true` if the note has been archived.\n",
                "type": "boolean"
              },
              "archivedAt": {
                "format": "date-time",
                "readOnly": true,
                "type": "string"
              },
              "archivedBy": {
                "$ref": "#/components/schemas/UserActionInfo",
                "description": "Details of the user responsible for archiving the note.\nCan be an agent or automated system process.\n"
              },
              "caseId": {
                "description": "Identifier of the case that the note belongs to.",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "category": {
                "$ref": "#/components/schemas/NoteCategory"
              },
              "content": {
                "description": "The content of the note.",
                "type": "string"
              },
              "createdBy": {
                "$ref": "#/components/schemas/UserActionInfo",
                "description": "Details of the user responsible for creating the note.\nCan be an agent or automated system process.\n"
              },
              "deletedAt": {
                "format": "date-time",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "deletedBy": {
                "$ref": "#/components/schemas/UserActionInfo",
                "description": "Details of the user responsible for deleting the note.\nCan be an agent or automated system process.\n"
              },
              "edited": {
                "default": false,
                "description": "Indicates whether the note was edited.\n",
                "readOnly": true,
                "type": "boolean"
              },
              "id": {
                "description": "The note identifier.",
                "readOnly": true,
                "type": "string"
              },
              "important": {
                "default": false,
                "description": "Set to `true` if the note is important.\n",
                "type": "boolean"
              },
              "interactionId": {
                "description": "Identifier of the interaction that the note belongs to.",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "pinned": {
                "default": false,
                "description": "Specify that this note should be sorted to the top of the list\nby default.\n",
                "type": "boolean"
              },
              "sensitiveData": {
                "default": false,
                "description": "Indicates whether the note contains sensitive information.\n",
                "type": "boolean"
              },
              "status": {
                "enum": [
                  "active",
                  "inactive"
                ],
                "type": "string"
              },
              "supercaseId": {
                "description": "Identifier of the supercase that the note belongs to.",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "taskableInstruction": {
                "default": false,
                "description": "Set to `true` if the note is intended to be an instruction which creates a review task.\n",
                "type": "boolean"
              },
              "type": {
                "enum": [
                  "borrowerNote",
                  "caseNote",
                  "interactionNote",
                  "supercaseGlobalNote",
                  "supercasePrivateNote"
                ],
                "readOnly": true,
                "type": "string"
              },
              "updatedBy": {
                "$ref": "#/components/schemas/UserActionInfo",
                "description": "Details of the user responsible for last updating the note.\nCan be an agent or automated system process.\n"
              }
            },
            "type": "object"
          }
        ],
        "description": "A borrower, case, supercase or interaction can have a note associated with it. Each note can only be associated with one of these objects.\n",
        "title": "A borrower, case, supercase or interaction note"
      },
      "APIKeyDescription": {
        "description": "A description of the API key. This field is optional and can be used to provide additional context about the API key.\n",
        "maxLength": 200,
        "minLength": 1,
        "nullable": true,
        "type": "string"
      },
      "WhitelistedIPs": {
        "description": "IP addresses or CIDR blocks for which to restrict access to this API key.\n",
        "example": [
          "1.1.1.1",
          "2.2.2.2",
          "10.10.0.0/16"
        ],
        "items": {
          "type": "string"
        },
        "nullable": true,
        "type": "array"
      },
      "ResponseAPIKeyNoSecret": {
        "properties": {
          "companyId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "$ref": "#/components/schemas/APIKeyDescription"
          },
          "id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "inactive"
            ],
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "whitelistedIPs": {
            "$ref": "#/components/schemas/WhitelistedIPs"
          }
        },
        "type": "object"
      },
      "RequestBodyAPIKeyNoSecret": {
        "properties": {
          "description": {
            "$ref": "#/components/schemas/APIKeyDescription"
          },
          "userId": {
            "type": "string"
          },
          "whitelistedIPs": {
            "$ref": "#/components/schemas/WhitelistedIPs"
          }
        },
        "required": [
          "userId"
        ],
        "type": "object"
      },
      "APIKeyAPIVersion": {
        "description": "The version of the API this API key is tied to. Must be in the format `YYYY-MM-DD`. For example, `2024-05-22`.\n",
        "example": "2024-05-22",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
        "type": "string"
      },
      "RequestBodyAPIKeyUpdateAPIVersioning": {
        "properties": {
          "apiVersion": {
            "$ref": "#/components/schemas/APIKeyAPIVersion"
          },
          "description": {
            "$ref": "#/components/schemas/APIKeyDescription"
          },
          "whitelistedIPs": {
            "$ref": "#/components/schemas/WhitelistedIPs"
          }
        },
        "type": "object"
      },
      "ResponseAPIKeyNoSecretAPIVersioning": {
        "properties": {
          "apiVersion": {
            "$ref": "#/components/schemas/APIKeyAPIVersion"
          },
          "apiVersionDowngradeNotAllowedAfter": {
            "description": "A UTC timestamp corresponding to when the API key's version can no longer be downgraded. This timestamp is set to 7 days after the API key's version is updated.\n",
            "format": "date-time",
            "type": "string"
          },
          "apiVersionUpdatedAt": {
            "description": "A UTC timestamp corresponding to when the API key's version was last updated. This timestamp is updated when the API key's version is updated.\n",
            "format": "date-time",
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "$ref": "#/components/schemas/APIKeyDescription"
          },
          "id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "inactive"
            ],
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "whitelistedIPs": {
            "$ref": "#/components/schemas/WhitelistedIPs"
          }
        },
        "type": "object"
      },
      "FeeApiName": {
        "description": "The identifier of the dynamic fee configuration for this loan.\nOnly applicable to `type=dynamicFee` fee.\n",
        "example": "modificationFee",
        "type": "string"
      },
      "FeeDisplayName": {
        "description": "The display name of the fee. The display name of the fee is either set by `customDisplayName` (that can be passed in the API)\nor by `displayName` that was configured in the loan type (this is the default value.)\n",
        "example": "Modification fee",
        "type": "string"
      },
      "IndexRate": {
        "description": "The index interest rate for a loan type. The index rate is used in conjunction with an interest rate\non a loan of type `spread` to calculate the effective interest rate for that loan.\n",
        "properties": {
          "annualRate": {
            "description": "The annual interest rate value for the period defined. Format is decimal. For example, 0.01 is 1% annual rate, 0.2 is 20% annual rate.",
            "format": "float",
            "type": "number"
          },
          "country": {
            "description": "Country. English short name according to\n[ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.\n",
            "maxLength": 2,
            "minLength": 2,
            "type": "string"
          },
          "endDate": {
            "description": "The index rate end date in the product timezone.\n\nThe end date is inclusive (i.e., the rate is also applied on the end date).\n\nIf set to `null`, the rate is applicable until it changes.\n\nWARNING: If there is no index rate available for a given date, the system will assume\nthat the index rate is 0. It is highly recommended that you set the \"last\" index rate's\nend date to `null`, so that there is always an index rate that is applicable.\n",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "externalId": {
            "$ref": "#/components/schemas/externalId",
            "description": "The external unique identifier of the index rate."
          },
          "indexDescription": {
            "description": "The index interest rate description. For example: \"1 Month LIBOR Rate\" or \"Custom rate\".\n",
            "type": "string"
          },
          "startDate": {
            "description": "The start date of the index rate in the product timezone.\n\nThe start date is inclusive (i.e., the rate is applied on the start date).\n\nWhen a new Index Interest Rate value is added, the previous rate\n(if it exists) will have its end date set to one calendar day before\nthe new rate's start date.\n\nIf the new rate's start date is in the past, the Peach system will replay all\n\"active\" loans with the new Index Interest Rate value and re-accrue loans' interest.\n(To clarify, it applied to the \"active\" loans at the time of\nIndex Interest Rate addition.)\n\nWARNING: Replaying the entire portfolio of loans might take a long time.\nIt is recommended that you set the new Index Interest Rate at night.\n",
            "format": "date",
            "type": "string"
          }
        },
        "required": [
          "annualRate",
          "startDate"
        ],
        "type": "object"
      },
      "IndexRateResult": {
        "allOf": [
          {
            "properties": {
              "id": {
                "description": "The index rate's unique identifier.",
                "readOnly": true,
                "type": "string"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/IndexRate"
          }
        ]
      },
      "IndexRatePaging": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Paging"
          },
          {
            "properties": {
              "data": {
                "items": {
                  "$ref": "#/components/schemas/IndexRateResult"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "IndexRateUpdate": {
        "properties": {
          "annualRate": {
            "description": "The annual interest rate value for the period defined. Format is decimal. For example, 0.01 is 1% annual rate, 0.2 is 20% annual rate.",
            "format": "float",
            "type": "number"
          },
          "endDate": {
            "description": "The index rate end date in the product timezone. The end date is inclusive. Pass `null` if you do not know when the rate will expire. If\n`null`, the rate is applicable until it changes.\n",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "indexDescription": {
            "description": "The index interest rate description. For example: \"1 Month LIBOR Rate\" or \"Custom rate\".\n",
            "type": "string"
          }
        },
        "type": "object"
      },
      "LoansPaging": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NewPaginator"
          },
          {
            "properties": {
              "data": {
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Loan"
                    },
                    {
                      "properties": {
                        "mainBorrowerExternalId": {
                          "description": "The external identifier of the main borrower of the loan.",
                          "type": "string"
                        },
                        "newInterestTimestampStartedAt": {
                          "description": "The timestamp of when the new interest timestamp started.",
                          "format": "date-time",
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ],
        "title": "loans"
      },
      "LoansMinimalPaging": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NewPaginator"
          },
          {
            "properties": {
              "data": {
                "items": {
                  "properties": {
                    "externalId": {
                      "description": "The external identifier of the loan.",
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "loanTypeId": {
                      "description": "The loan type identifier. This is created specifically for each lender's loan product by Peach.",
                      "type": "string"
                    },
                    "lockStatus": {
                      "description": "Is the loan locked for replay?\n",
                      "type": "boolean"
                    },
                    "mainBorrowerExternalId": {
                      "description": "The external identifier of the main borrower of the loan.",
                      "type": "string"
                    },
                    "mainBorrowerId": {
                      "description": "The identifier of the main borrower of the loan.",
                      "type": "string"
                    },
                    "migrationStatus": {
                      "default": "nonMigrated",
                      "description": "The loan migration status. This attribute can be updated by the Peach system only.\n\n  - `nonMigrated` - this is a non-migrated loan. Most loans are expected to be `nonMigrated`.\n  - `prepMigration` - the lender can add objects to the loan in the past.\n  - `migrating` - the system is migrating the loan. Objects cannot be modified or added.\n  - `completed` - the loan was successfully migrated. After a successful migration the loan status will be changed to one of the following statuses: `active`, `accelerated`, `chargedOff` or `paidOff`.\n  - `failed` - the loan migration attempt failed. The loan will remain in the `pending` status. You can update the loan details and try to migrate again by calling `Migrate loan` endpoint.\n",
                      "enum": [
                        "nonMigrated",
                        "prepMigration",
                        "migrating",
                        "completed",
                        "failed"
                      ],
                      "type": "string"
                    },
                    "newInterestTimestampStartedAt": {
                      "description": "The timestamp of when the new interest timestamp started.",
                      "format": "date-time",
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "NotificationType": {
        "allOf": [
          {
            "$ref": "#/components/schemas/VersionedMixin"
          },
          {
            "properties": {
              "channel": {
                "allOf": [
                  {
                    "nullable": true,
                    "type": "string"
                  },
                  {
                    "$ref": "#/components/schemas/InteractionChannel"
                  }
                ]
              },
              "delay": {
                "description": "Length of time after a triggering condition to wait before sending notification.\n",
                "nullable": true,
                "type": "integer"
              },
              "onCondition": {
                "$ref": "#/components/schemas/onCondition"
              },
              "onOutcome": {
                "$ref": "#/components/schemas/ProcessOutcome"
              },
              "onStatus": {
                "$ref": "#/components/schemas/ProcessStatus"
              },
              "templateId": {
                "description": "Communication template identifier to create and send notification.\n",
                "nullable": true,
                "type": "integer"
              },
              "theme": {
                "allOf": [
                  {
                    "nullable": true,
                    "type": "string"
                  },
                  {
                    "$ref": "#/components/schemas/InteractionTheme"
                  }
                ]
              },
              "unit": {
                "description": "Time units for setting the `delay` time.\n",
                "enum": [
                  "calendarDays",
                  "businessDays"
                ],
                "nullable": true,
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "notificationHandler"
      },
      "PaymentProcessorFundingInstrument": {
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "description": "Status of the funding instrument.\n- `active` - the instrument can be used for reconciliation payments.\n- `pending` - the instrument is pending to be verified.\n- `inactive` - the instrument is not active and cannot be used for reconciliation payments.\n",
            "enum": [
              "active",
              "inactive",
              "pending"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "PaymentProcessorMutableFields": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseWithExternalIdMixin"
          },
          {
            "properties": {
              "achBatchHeaderCompanyId": {
                "description": "Data element that is part of the batch header record. For example: `2837461011`.\n",
                "type": "string"
              },
              "achBatchHeaderCompanyName": {
                "description": "Data element that is part of the batch header record. For example: `PEACH FIN ACH`.\n",
                "type": "string"
              },
              "achBatchHeaderOriginatingDFIId": {
                "description": "Data element that is part of the batch header record. For example: `12773923`.\n\nIf the value is NOT provided (aka null or empty) as part of the configuration, the system will automatically set this value to `achFileHeaderImmediateDestination` without the last digits.\nFor example: if `achFileHeaderImmediateDestination=121140399`, the system will set `achBatchHeaderOriginatingDFIId=12114039`.\n",
                "type": "string"
              },
              "achCutoff": {
                "description": "The cutoff time for ACH processing, in the payment processor's timezone. Use 24-hour format. For example: \"19:00\"\n",
                "format": "time",
                "type": "string"
              },
              "achFeeAmount": {
                "description": "The fee charged by the payment processor for regular ACH transactions. For example: 0.05\n",
                "format": "float",
                "type": "number"
              },
              "achFeeType": {
                "description": "How the fee is charged by the payment processor. If the full amount is transferred, and fees are charged monthly, use `gross`.\nIf fees are deducted from the amount transferred, use `net`.\n",
                "enum": [
                  "gross",
                  "net"
                ],
                "type": "string"
              },
              "achFileHeaderImmediateDestination": {
                "description": "Data element that is part of the file header record. For example: `121140399`.\n",
                "type": "string"
              },
              "achFileHeaderImmediateDestinationName": {
                "description": "Data element that is part of the file header record. For example: `SILICON VALLEY BANK`.\n",
                "type": "string"
              },
              "achFileHeaderImmediateOrigin": {
                "description": "Data element that is part of the file header record. For example: `1456726789`.\n",
                "type": "string"
              },
              "achFileHeaderImmediateOriginName": {
                "description": "Data element that is part of the file header record. For example: `PEACH FINANCE INC`.\n",
                "type": "string"
              },
              "achSECCode": {
                "default": "PPD",
                "description": "The Standard Entry Class Code within ACH.\n",
                "enum": [
                  "CCD",
                  "PPD",
                  "WEB"
                ],
                "type": "string"
              },
              "achSameDayCutoff": {
                "description": "The cutoff time for ACH same day processing, in the payment processor's timezone. Use 24-hour format. For example: \"10:00\"\n",
                "format": "time",
                "type": "string"
              },
              "achSameDayFeeAmount": {
                "description": "The fee charged by the payment processor for same day ACH transactions. For example: 0.50\n",
                "format": "float",
                "type": "number"
              },
              "encryptionMethodIncoming": {
                "description": "The encryption method that Peach system will use to decrypt the incoming files to Peach.\nMake sure you use `peachPublicKey` to encrypt the files sent to Peach or uploaded to SFTP for Peach. Keep the value empty if no encryption is needed.\n",
                "enum": [
                  "GPG"
                ],
                "nullable": true,
                "type": "string"
              },
              "encryptionMethodOutgoing": {
                "description": "The encryption method that Peach system will use to encrypt the outgoing files from Peach. Keep the value empty if no encryption is needed.\nIf `encryptionMethodOutgoing` is set, a value must be set for `thirdPartyPublicKey`.\n",
                "enum": [
                  "GPG"
                ],
                "nullable": true,
                "type": "string"
              },
              "isDefault": {
                "default": false,
                "description": "Mark the payment processor as default for the company. Only one payment processor can be default. If a new payment processor is created\nwith `isDefault=true` and there is another payment processor with `isDefault=true`, the system will set `isDefault=false` for the\nother/existing processor.\n",
                "type": "boolean"
              },
              "isFileNameDefaultConvention": {
                "default": true,
                "description": "- If `true`, files (e.g. ACH) will be named based on the `ACHP_MMDDYYYYHHMM` convention. For example: `ACHP_110320211305`.\n- If `false`, files (e.g. ACH) will be named based on a custom implementation. Do not set `false` unless you've coordinated with the Peach team.\n",
                "type": "boolean"
              },
              "peachPublicKey": {
                "description": "Peach's public key to encrypt the incoming files to Peach.\n",
                "readOnly": true,
                "type": "string"
              },
              "privateKeyExpires": {
                "default": false,
                "description": "- Only applicable when `signOutgoing` is `true`. Setting this to `true` when `signOutgoing` is `false` will return an error.\n- If true, the private key generated for signing outgoing files will have an expiration date of 2 years from the time of generation.\n- If false (default), the private key does not expire.\n",
                "type": "boolean"
              },
              "processorName": {
                "description": "The name of the payment processor. For example: Silicon Valley Bank or Wells Fargo.\n",
                "type": "string"
              },
              "sftpAccessMethod": {
                "default": "usernamePassword",
                "description": "The method used to access the `sftpHostname`.\n- If `usernamePassword`, then `sftpUsername` and `sftpPassword` must be provided.\n- If `keys`, then `sftpSSHPeachPrivateKey` and `sftpSSHPeachPublicKey` will be created by peach.\n",
                "enum": [
                  "usernamePassword",
                  "keys",
                  "disabled"
                ],
                "type": "string"
              },
              "sftpAchConfirmationFileNameRegex": {
                "description": "The name of the ACH confirmation file. The format is a regular expression.\nIf you are not sure how to set up the regular expression, please contact the Peach team by providing a few examples of file names.\n\nIf the value is null, we assume that the processor doesn't support ACH confirmation files and any upload of an ACH file is considered as successful.\n",
                "nullable": true,
                "type": "string"
              },
              "sftpAchReturnFileNameRegex": {
                "description": "The name of the ACH return file. The format is a regular expression.\nIf you are not sure how to set up the regular expression, please contact the Peach team by providing a few examples of file names.\n",
                "type": "string"
              },
              "sftpCdDirInbox": {
                "description": "The folder where files (e.g. ACH returns) will be downloaded from. The system will change directory into this folder before\nperforming the download.\n",
                "type": "string"
              },
              "sftpCdDirOutbox": {
                "description": "The folder where files (e.g. ACH instructions) will be uploaded. The system will change directory into this folder before\nperforming the upload.\n",
                "type": "string"
              },
              "sftpHostname": {
                "description": "The hostname for SFTP. Host name should not contain a scheme, so don't put `sftp://` on the front. You may optionally specify a port\nlike so: `example.com:222`. If no port is supplied a default of 22 will be used.\n",
                "pattern": "^[^/]+$",
                "type": "string"
              },
              "sftpPassword": {
                "description": "The password for SFTP.",
                "nullable": true,
                "type": "string",
                "writeOnly": true
              },
              "sftpSSHDisabledAlgorithms": {
                "description": "A json object of any algorithms that need to be disabled when accessing `sftpHostname` with a private key. This should be null in most scenarios.",
                "nullable": true,
                "type": "object"
              },
              "sftpSSHPeachPublicKey": {
                "description": "Peach public key to used to log into sftpHostname.\n",
                "readOnly": true,
                "type": "string"
              },
              "sftpUsername": {
                "description": "The username for SFTP.",
                "nullable": true,
                "type": "string"
              },
              "signOutgoing": {
                "default": false,
                "description": "- If true, outgoing files will be encrypted with `thirdPartyPublicKey` and signed with peach's private key. Make sure to set `encryptionMethodOutgoing` and `thirdPartyPublicKey` values.\n- If false, outgoing files will not be signed with peach's private key.\n",
                "type": "boolean"
              },
              "status": {
                "description": "The status of the payment processor.\n - `draft` - the payment processor is in the process of being configured and not ready to be used.\n - `active` - the payment processor is ready to process payments.\n - `deprecated` - the payment processor was deprecated, and new payments cannot be processed.\n",
                "enum": [
                  "draft",
                  "active",
                  "deprecated"
                ],
                "type": "string"
              },
              "thirdPartyPublicKey": {
                "description": "The third party's (e.g. lender or bank) public key to use to encrypt the outgoing files from Peach. A value must be passed if `encryptionMethodOutgoing` is set.\n",
                "nullable": true,
                "type": "string",
                "writeOnly": true
              },
              "timezone": {
                "description": "The timezone used by this payment processor. For example: \"America/Los_Angeles\"\n",
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "PaymentProcessor": {
        "allOf": [
          {
            "properties": {
              "fundingInstruments": {
                "description": "The funding instruments that are associated with the payment processor.",
                "items": {
                  "$ref": "#/components/schemas/PaymentProcessorFundingInstrument"
                },
                "readOnly": true,
                "type": "array"
              },
              "paymentTypes": {
                "description": "The payment types that will be processed by the payment processor. Currently, `ach` is supported only.",
                "items": {
                  "enum": [
                    "ach",
                    "debitCard",
                    "creditCard"
                  ],
                  "type": "string"
                },
                "type": "array"
              },
              "processorType": {
                "description": "The type of payment processor.\n- `achDirectUS` - Peach system will create NACHA files and upload directly to lender's bank SFTP.\n",
                "enum": [
                  "achDirectUS"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/PaymentProcessorMutableFields"
          }
        ],
        "required": [
          "paymentTypes",
          "processorType",
          "processorName",
          "status",
          "timezone",
          "sftpAchReturnFileNameRegex",
          "sftpAccessMethod"
        ],
        "title": "Payment Processor"
      },
      "PaymentProcessorUpdateRequest": {
        "allOf": [
          {
            "properties": {
              "updatePeachKeys": {
                "default": false,
                "description": "- If true, the peach keys for encrypting and decrypting incoming files to Peach are updated. The new `peachPublicKey` value is returned.\n- If false, the peach encryption keys are not changed\n",
                "type": "boolean",
                "writeOnly": true
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/PaymentProcessorMutableFields"
          }
        ]
      },
      "BorrowerPaging": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NewPaginator"
          },
          {
            "properties": {
              "data": {
                "items": {
                  "$ref": "#/components/schemas/Borrower"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "PersonSearchPaging": {
        "allOf": [
          {
            "properties": {
              "data": {
                "items": {
                  "$ref": "#/components/schemas/Person"
                },
                "type": "array"
              },
              "search": {
                "properties": {
                  "maxScore": {
                    "description": "Number representing the maximum scoring result in the results.\n",
                    "format": "float",
                    "type": "number"
                  },
                  "scores": {
                    "description": "Object mapping result ID's to their score in the search results.\n",
                    "type": "object"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          }
        ]
      },
      "BorrowerNoIdentity": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/PersonNoIdentity"
          },
          {
            "$ref": "#/components/schemas/BusinessNoIdentity"
          }
        ]
      },
      "CanInteractCommonProps": {
        "description": "The common parameters of a request to determine whether the interaction is\nallowed based on the history of interactions with a borrower and the\nassociated cases.\n\nEither a `theme` or `subject` is required.\n",
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/InteractionChannel"
          },
          "checkAtCompanyNoon": {
            "description": "If `true`, do time-based checks based on noon today, instead of\nnow. This does not override other reasons a check can fail: the borrower\nhaving a Do Not Interact in place, having reached the interaction\nfrequency limit, etc.  This is useful for generating borrower campaigns\nin the morning to be carried out during business hours.\n\nWhere possible, it's always better to check permission right before an\naction. Many things can change (payments are made, other automated\ninteractions are sent, consents/addresses can be updated) from when you\nplan something to happen to when it actually happens. Lenders are\nresponsible for ensuring it is still permissible to conduct the\ninteraction.\n",
            "type": "boolean"
          },
          "isAutodialed": {
            "default": false,
            "description": "`true` if an interaction is prerecorded or autodialed call. This attribute\nis relevant when channel=`voice`. If no value is passed, we'll assume\nisAutodialed=`false` (meaning manual call). If isAutodialed=`true` and\nthe contact's consentAutodialedCall=`false` we'll return result=`false`.\nFor more information read Telephone Consumer Protection Act (TCPA).\n",
            "nullable": true,
            "type": "boolean"
          },
          "loanId": {
            "$ref": "#/components/schemas/AssociatedLoanId"
          },
          "loanIds": {
            "$ref": "#/components/schemas/AssociatedLoanIds"
          },
          "loansFromCollCase": {
            "$ref": "#/components/schemas/LoansFromCollCase"
          },
          "subject": {
            "$ref": "#/components/schemas/InteractionSubject"
          },
          "theme": {
            "$ref": "#/components/schemas/InteractionTheme"
          }
        },
        "required": [
          "channel"
        ],
        "type": "object"
      },
      "CanInteractByContactIdentifier": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CanInteractCommonProps"
          },
          {
            "properties": {
              "contactExternalId": {
                "description": "The lender's identifier of the contact information.\n",
                "type": "string",
                "writeOnly": true
              },
              "contactId": {
                "description": "An identifier of an existing contact.\n",
                "type": "string"
              }
            },
            "required": [
              "contactId"
            ],
            "type": "object"
          }
        ],
        "title": "canInteractByContactId"
      },
      "InteractionCanInteractResult": {
        "properties": {
          "result": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "DoNotInteractEndDate": {
        "description": "A future date when interaction restrictions will be lifted.\nThe value format is date only, without time. If today is `endDate`, the\nrestriction will remain until the end of day in the product timezone.\nIf no value is provided, `doNotInteract` will remain in effect until\n`Remove do not interact` is called or `endDate` is set to a date in the past.\n",
        "format": "date",
        "nullable": true,
        "type": "string"
      },
      "schemas-TimeOfDay": {
        "properties": {
          "fromHour": {
            "description": "From hour in the borrower's home address timezone. Value range is 0-23. 0=Midnight...23=11 PM.\n`fromHour` must be smaller than `toHour`.\n",
            "format": "int32",
            "type": "number"
          },
          "toHour": {
            "description": "To hour in the borrower's home address timezone. Value range is 0-23. 0=Midnight...24=Midnight of following day.\n`fromHour` must be smaller than `toHour`.\n",
            "format": "int32",
            "type": "number"
          }
        },
        "required": [
          "fromHour",
          "toHour"
        ],
        "type": "object"
      },
      "DoNotInteractUpdate": {
        "description": "Update the Do Not Interact.\n\nThe only data that can be updated after creation of a `doNoInteract` are external reference and\nthe ending date.\n",
        "properties": {
          "caseId": {
            "description": "Identifier of the case to which the `doNotInteract` belongs.",
            "readOnly": true,
            "type": "string"
          },
          "channels": {
            "description": "Channel(s) for which outbound interactions with a borrower are blocked.\nUse value `all` for all channels.\n",
            "items": {
              "$ref": "#/components/schemas/DoNotInteractChannel"
            },
            "type": "array"
          },
          "contactLabels": {
            "description": "A list of contact labels.\nA person's mobile phone is labeled as `personal`.\nA person's work phone is labeled as `work`.\nA person's home phone is labeled as `home`.\nA person's home address is labeled as `home`.\n",
            "items": {
              "$ref": "#/components/schemas/ContactLabel"
            },
            "type": "array"
          },
          "daysOfWeek": {
            "description": "A list of days of week at which to block. \n\nValid range is 1-7. 1=Monday...7=Sunday. For example: `[1, 2, 4]`.\n\n- If the day of week matches *any* of the values specified here, then the interaction is blocked.\n- If this array is empty, then the interaction is blocked for all days of week.\n",
            "example": [
              1,
              2,
              4
            ],
            "items": {
              "format": "int32",
              "type": "number"
            },
            "type": "array"
          },
          "endDate": {
            "$ref": "#/components/schemas/DoNotInteractEndDate"
          },
          "object": {
            "default": "doNotInteract",
            "enum": [
              "doNotInteract"
            ],
            "readOnly": true,
            "type": "string"
          },
          "personId": {
            "description": "Identifier of the borrower to which the `doNotInteract` belongs.",
            "readOnly": true,
            "type": "string"
          },
          "source": {
            "default": "service",
            "description": "How the `DoNotInteract` instance was created. This is used by the internal case processing to determine\nwhether to stop blocking interactions when the `Case` changes state. This may not be returned by\ndefault depending on your configuration.\n\nThe possible values are:\n\n* `api`: created by an external user through an authorized HTTP request to the API\n* `service`: created by internal server process, or an API call from a recognized Peach service within the\nvirtual private cloud (VPC)\n* `manual`: created by SQL or manual entry, this is prevented except for rare maintenance situations.\n",
            "enum": [
              "api",
              "service",
              "manual"
            ],
            "readOnly": true,
            "type": "string"
          },
          "themes": {
            "description": "Theme(s) for which outbound interactions with a borrower are blocked. Use value\n`all` for all themes. `all` doesn't include `opsAccountCredentials`.\nFor example, use `opsCollDebt` to stop debt collection interactions.\n",
            "items": {
              "$ref": "#/components/schemas/DoNotInteractTheme"
            },
            "type": "array"
          },
          "timesOfDay": {
            "description": "A list of times of day at which to block—in hour resolution.\n\n- If the time falls into *any* of the ranges specified here, then\nthe interaction is blocked.\n- If this array is empty, then the interaction is blocked for all times of day.\n",
            "items": {
              "$ref": "#/components/schemas/schemas-TimeOfDay"
            },
            "type": "array"
          },
          "timezone": {
            "description": "The time zone where the borrower is located. If provided, the time zone will be used for restriction. If not provided, the system will use the borrower's home address time zone.\n",
            "type": "string"
          }
        },
        "title": "doNotInteract",
        "type": "object"
      },
      "DoNotInteract": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "$ref": "#/components/schemas/DoNotInteractUpdate"
          },
          {
            "description": "Channel(s) and theme(s) for which interactions with a borrower are blocked.\nInteractions with theme=`outOpsServicing` cannot be blocked since they\nare typically initiated by a borrower.\n",
            "properties": {
              "startDate": {
                "description": "The start date for blocking interactions with a borrower. The value format is date\nonly, without time. The start date can be a future date.\nIf the value is not provided, or equal to today's date, or a date in the past, then the\n`doNotIteract` will be effective as soon as we process the request.\n",
                "format": "date",
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "doNotInteract"
      },
      "ConsentItem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "name": {
                "description": "Represents special consents or permissions. Consents are typically\ngiven in writing to a lender.\n\n- `electronicComms` - Set to `revoked` if the borrower hasn't consented or\nhas revoked consent to electronic communications. Default: `consented`\n\n- `contactPersonWork` - A borrower or their attorney gave a written\nconsent to contact borrower's employer for debt collection. Default: `revoked`\n\n- `contactPersonRepByAttorney` - Indicates whether a lender is\nallowed to contact a borrower represented by an attorney. If the attorney\ngave a written consent to interact with the borrower, set\nto `consented`. Default: `revoked`\n\n- `contactPersonUnusualTime` - A person or their attorney gave\nwritten consent to interact with the person at some unusual\nplace or time. Default: `revoked`\n\n- `autodialedColl` - Consent to receive autodialed or pre-recorded\ncollection calls from creditors or third-party collectors. If no\nvalue is provided, we will assume autodialedColl is `consented`. For\nmore information read Telephone Consumer Protection Act (TCPA).\nDefault: `consented`\n\n- `executeWageAssignment` - Set to `consented` if the person consented to\nexecute a wage assignment agreement. Default: `revoked`\n\n- `contactServicememberUnitOrCommander` - Consent to contact a\nservicemember's military unit or chain of command to collect on a debt. Default: `revoked`.\n",
                "enum": [
                  "electronicComms",
                  "contactPersonWork",
                  "contactPersonRepByAttorney",
                  "contactPersonUnusualTime",
                  "autodialedColl",
                  "executeWageAssignment",
                  "contactServicememberUnitCollDebt"
                ],
                "type": "string"
              },
              "object": {
                "default": "consent",
                "enum": [
                  "consent"
                ],
                "readOnly": true,
                "type": "string"
              },
              "value": {
                "description": "Consent can be granted and revoked by a borrower.\n",
                "enum": [
                  "consented",
                  "revoked"
                ],
                "type": "string"
              }
            },
            "required": [
              "name",
              "value"
            ],
            "type": "object"
          }
        ],
        "title": "consent"
      },
      "Consents": {
        "items": {
          "$ref": "#/components/schemas/ConsentItem"
        },
        "type": "array"
      },
      "ConsentArray": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Paging"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/Consents"
              }
            },
            "type": "object"
          }
        ],
        "title": "consent"
      },
      "DocumentUploadLink": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "caseId": {
                "description": "The identifier of the case associated with the doc upload link",
                "nullable": true,
                "type": "string"
              },
              "contactId": {
                "description": "The identifier of the contact to which the doc upload link will be sent",
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "DocumentDescriptorUpdate": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseWithExternalIdMixin"
          },
          {
            "$ref": "#/components/schemas/DocumentDescriptorFields"
          },
          {
            "properties": {
              "type": {
                "$ref": "#/components/schemas/DocumentType"
              }
            },
            "type": "object"
          }
        ]
      },
      "IdentityPaging": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Paging"
          },
          {
            "properties": {
              "data": {
                "items": {
                  "$ref": "#/components/schemas/Identity"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "LegalRepresentative": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "description": "Contains details about an entity that legally represents a borrower.\n",
            "properties": {
              "address": {
                "$ref": "#/components/schemas/Address"
              },
              "email": {
                "description": "The email address of a legal entity.",
                "type": "string"
              },
              "name": {
                "$ref": "#/components/schemas/Name"
              },
              "object": {
                "default": "legalRepresentative",
                "enum": [
                  "legalRepresentative"
                ],
                "readOnly": true,
                "type": "string"
              },
              "otherEmail": {
                "description": "An additional email address of a legal entity.",
                "type": "string"
              },
              "otherPhone": {
                "description": "An additional phone number of a legal entity. This should be provided in\n[E.164](https://en.wikipedia.org/wiki/E.164) format.\n",
                "type": "string"
              },
              "phone": {
                "description": "The phone number of a legal entity. This should be provided in\n[E.164](https://en.wikipedia.org/wiki/E.164) format.\n",
                "type": "string"
              },
              "status": {
                "description": "Legal representative's status.",
                "enum": [
                  "active",
                  "nonResponsive",
                  "inactive",
                  "archived"
                ],
                "type": "string"
              },
              "statusUpdatedAt": {
                "description": "The time of status update.",
                "format": "date-time",
                "readOnly": true,
                "type": "string"
              },
              "validAddress": {
                "$ref": "#/components/schemas/ValidAddress"
              }
            },
            "type": "object"
          }
        ],
        "title": "legalRepresentative"
      },
      "LegalRepresentativesPaging": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Paging"
          },
          {
            "properties": {
              "data": {
                "description": "Array of legal entities\n",
                "items": {
                  "$ref": "#/components/schemas/LegalRepresentative"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ],
        "title": "legalRepresentative"
      },
      "NewInstallmentAtOriginationRequirements": {
        "properties": {
          "atOrigination": {
            "required": [
              "amountFinanced",
              "duration",
              "interestRates",
              "paymentFrequency",
              "originationLicense",
              "originatingCreditorName"
            ],
            "type": "object"
          }
        },
        "type": "object"
      },
      "NewInstallment": {
        "allOf": [
          {
            "properties": {
              "timestamps": {
                "description": "**DEPRECATED** The fields in this object will not affect the loan.\n"
              },
              "type": {
                "enum": [
                  "installment"
                ],
                "type": "string"
              }
            },
            "required": [
              "loanTypeId",
              "servicedBy",
              "status"
            ],
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/Installment"
          },
          {
            "$ref": "#/components/schemas/NewInstallmentAtOriginationRequirements"
          }
        ],
        "title": "Installment"
      },
      "NewLineOfCreditAtOriginationRequirements": {
        "properties": {
          "atOrigination": {
            "required": [
              "creditLimitAmount",
              "interestRates",
              "paymentFrequency",
              "originationLicense",
              "originatingCreditorName"
            ],
            "type": "object"
          }
        },
        "type": "object"
      },
      "NewLineOfCredit": {
        "allOf": [
          {
            "properties": {
              "timestamps": {
                "description": "**DEPRECATED** The fields in this object will not affect the loan.\n"
              },
              "type": {
                "enum": [
                  "lineOfCredit"
                ],
                "type": "string"
              }
            },
            "required": [
              "loanTypeId",
              "servicedBy",
              "status"
            ],
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/LineOfCredit"
          },
          {
            "$ref": "#/components/schemas/NewLineOfCreditAtOriginationRequirements"
          }
        ],
        "title": "Line of Credit"
      },
      "NewLoan": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/NewInstallment"
          },
          {
            "$ref": "#/components/schemas/NewLineOfCredit"
          }
        ],
        "description": "Represents a loan. A loan always belongs to a borrower, and most of\nthe interactions between a lender and a borrower are associated with a\nparticular loan.\n",
        "title": "newLoan"
      },
      "LoanAccelerate": {
        "allOf": [
          {
            "properties": {
              "effectiveDate": {
                "description": "The effective date of the loan acceleration. The date should be the current date in the product timezone.\nPassing in `\"today\"` will also set the field to today's date.\n",
                "format": "date",
                "type": "string"
              },
              "sendNotice": {
                "default": true,
                "description": "When set to `false`, the system will NOT send a `loanAccelerated` notice to the borrower.",
                "type": "boolean"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/CaseId"
          }
        ],
        "required": [
          "effectiveDate"
        ]
      },
      "LoanAccelerateResponse": {
        "properties": {
          "acceleratedAmount": {
            "description": "The amount accelerated.",
            "format": "float",
            "type": "number"
          }
        },
        "type": "object"
      },
      "LoanActivate": {
        "properties": {
          "amortizationAtActivation": {
            "description": "Instructions on how to activate a loan in `originated` status. The loan status\nchanges to `active` after a successful activation.\n\n`expectedPaymentsAtOrigination` - we will use the exact `atOrigination.expectedPayments`\ndue dates and amounts. The loan is not re-amortized.\n\n`amortizeAtActivation` - we will re-amortize the loan using today's date as the loan start date.\n`atOrigination.paymentFrequency` and `atOrigination.specificDays` are used to create due dates.\n`atOrigination.expectedPayments` due dates and amounts are not used.\n",
            "enum": [
              "expectedPaymentsAtOrigination",
              "amortizeAtActivation"
            ],
            "type": "string"
          },
          "sendNotice": {
            "default": true,
            "description": "When set to `false`, the system will NOT send a `loanDetails` notice to the borrower.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ExpectedPayment": {
        "properties": {
          "amount": {
            "description": "The amount of the expected payment.",
            "format": "float",
            "type": "number"
          },
          "date": {
            "description": "The due date of the expected payment.",
            "format": "date",
            "type": "string"
          },
          "dynamicFeeDetails": {
            "description": "When `paymentType`=`dynamicFee` this will contain details of the dynamic fee.\n",
            "properties": {
              "apiName": {
                "description": "The API name of the dynamic fee. For example: 'lateFee' or 'breatherFee'.\n",
                "type": "string"
              },
              "displayName": {
                "description": "The display name of the dynamic fee as shown to the borrower in the UI. For example: `Late Fee` or `Breather Fee`.\n",
                "type": "string"
              },
              "dynamicFeeTypeId": {
                "description": "The dynamic fee type identifier in the system.",
                "type": "string"
              },
              "loanFeeId": {
                "description": "The loan fee identifier in the system.",
                "type": "string"
              }
            },
            "type": "object"
          },
          "interestAmount": {
            "description": "The portion of the `amount` allocated to net interest.\nAvailable only for `paymentType=periodicPayment`.\n",
            "format": "float",
            "type": "number"
          },
          "interestBeforeDiscountAmount": {
            "description": "The interest amount that was accrued before promo rate(s) or any discount.\nAvailable only for `paymentType=periodicPayment`.\n",
            "format": "float",
            "type": "number"
          },
          "isDeferred": {
            "description": "`true` if the amount of this expected payment has been deferred before.\n",
            "readOnly": true,
            "type": "boolean"
          },
          "isForcedAmount": {
            "description": "Only applicable to `paymentType=periodicPayment`.\nIf set to `true`, the system will honor the amount and will not update it on loan recalculations.\nIf set to `false` and the amount is less than the `periodicPaymentAmount`, the system can increase the amount when\nthe loan is being recalculated.\nIn most of the cases, the lender should set the value to `false` (aka the default value.) If you need more\nexplanation or advice on your use case, please contact the Peach team.\n",
            "readOnly": true,
            "type": "boolean"
          },
          "originalAmount": {
            "description": "The amount of the expected payment at creation. The `amount` will change as a result of refreshing\nexpected payments, but the `originalAmount` will stay the same.\n",
            "format": "float",
            "type": "number"
          },
          "paymentType": {
            "description": "The payment type.",
            "enum": [
              "periodicPayment",
              "originationFee",
              "drawFee",
              "dynamicFee",
              "downPayment",
              "discountCredit"
            ],
            "type": "string"
          },
          "periodId": {
            "description": "The period identifier.",
            "type": "string"
          },
          "principalAmount": {
            "description": "The portion of the `amount` allocated to principal.\nAvailable only for `paymentType=periodicPayment`.\n",
            "format": "float",
            "type": "number"
          },
          "status": {
            "description": "The status of the expected payment.\n\n`scheduled`  - borrower is expected to make the payment. Only applicable to paymentType=dynamicFee.\n\n`booked` - borrower is or was expected to make the payment.\n\n`modified` - the amount was modified at some point and different from the original amount.\n\n`canceled` - borrower is or was not expected to make the payment.\n",
            "enum": [
              "booked",
              "modified",
              "canceled"
            ],
            "type": "string"
          },
          "unroundedInterestAmount": {
            "description": "The portion of the `amount` allocated to net interest. Available only for `paymentType=periodicPayment`.\nThis value is unrounded.\n",
            "nullable": true,
            "type": "string"
          },
          "unroundedInterestBeforeDiscountAmount": {
            "description": "The interest amount that was accrued before promo rate(s) or any discount. Available only for\n`paymentType=periodicPayment`. This value is unrounded.\n",
            "nullable": true,
            "type": "string"
          },
          "unroundedPrincipalAmount": {
            "description": "The portion of the `amount` allocated to principal. Available only for `paymentType=periodicPayment`.\nThis value is unrounded.\n",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "LoanSchedule": {
        "properties": {
          "schedule": {
            "items": {
              "$ref": "#/components/schemas/ExpectedPayment"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "LoanActivationResponse": {
        "oneOf": [
          {
            "properties": {
              "amountsValidation": {
                "$ref": "#/components/schemas/AmountsValidation"
              },
              "ratesValidation": {
                "$ref": "#/components/schemas/RatesValidation"
              },
              "schedule": {
                "$ref": "#/components/schemas/LoanSchedule"
              }
            },
            "title": "Installment",
            "type": "object"
          },
          {
            "properties": {
              "amountsValidation": {
                "$ref": "#/components/schemas/AmountsValidation"
              },
              "schedule": {
                "$ref": "#/components/schemas/LoanSchedule"
              }
            },
            "title": "Line of Credit",
            "type": "object"
          }
        ]
      },
      "AutopayExpectedPayment": {
        "properties": {
          "amount": {
            "description": "The amount of the expected payment.",
            "format": "float",
            "type": "number"
          },
          "date": {
            "description": "The due date of the expected payment.",
            "format": "date",
            "type": "string"
          },
          "dynamicFeeDetails": {
            "description": "When `paymentType`=`dynamicFee` this will contain details of the dynamic fee.\n",
            "properties": {
              "apiName": {
                "description": "The API name of the dynamic fee. For example: 'lateFee' or 'breatherFee'.\n",
                "type": "string"
              },
              "displayName": {
                "description": "The display name of the dynamic fee as shown to the borrower in the UI. For example: `Late Fee` or `Breather Fee`.\n",
                "type": "string"
              },
              "dynamicFeeTypeId": {
                "description": "The dynamic fee type identifier in the system.",
                "type": "string"
              },
              "loanFeeId": {
                "description": "The loan fee identifier in the system.",
                "type": "string"
              }
            },
            "type": "object"
          },
          "interestAmount": {
            "description": "The portion of the `amount` allocated to net interest.\nAvailable only for `paymentType=periodicPayment`.\n",
            "format": "float",
            "type": "number"
          },
          "interestBeforeDiscountAmount": {
            "description": "The interest amount that was accrued before promo rate(s) or any discount.\nAvailable only for `paymentType=periodicPayment`.\n",
            "format": "float",
            "type": "number"
          },
          "isDeferred": {
            "description": "`true` if the amount of this expected payment has been deferred before.\n",
            "readOnly": true,
            "type": "boolean"
          },
          "originalAmount": {
            "description": "The amount of the expected payment at creation. The `amount` will change as a result of refreshing\nexpected payments, but the `originalAmount` will stay the same.\n",
            "format": "float",
            "type": "number"
          },
          "paymentType": {
            "description": "The payment type.",
            "enum": [
              "periodicPayment",
              "originationFee",
              "drawFee",
              "dynamicFee",
              "downPayment",
              "discountCredit"
            ],
            "type": "string"
          },
          "periodId": {
            "description": "The period identifier.",
            "type": "string"
          },
          "principalAmount": {
            "description": "The portion of the `amount` allocated to principal.\nAvailable only for `paymentType=periodicPayment`.\n",
            "format": "float",
            "type": "number"
          },
          "status": {
            "description": "The status of the expected payment.\n\n`booked` - borrower is or was expected to make the payment.\n\n`modified` - the amount was modified at some point and different from the original amount.\n\n`canceled` - borrower is or was not expected to make the payment.\n\n`processed` - a payment has been scheduled for this expected payment.\n",
            "enum": [
              "booked",
              "modified",
              "canceled",
              "processed"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "InstallmentAutopay": {
        "allOf": [
          {
            "$ref": "#/components/schemas/IsLocked"
          },
          {
            "properties": {
              "agreementDocumentId": {
                "description": "The document descriptor ID corresponding to the autopay agreement document.\n",
                "type": "string"
              },
              "cancelReason": {
                "$ref": "#/components/schemas/AutopayCancelReason"
              },
              "createdAt": {
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "The autopay identifier.",
                "readOnly": true,
                "type": "string"
              },
              "paymentFrequency": {
                "description": "The Autopay payments frequency.",
                "enum": [
                  "weekly",
                  "everyTwoWeeks",
                  "twiceMonthly",
                  "monthly"
                ],
                "type": "string"
              },
              "paymentInstrumentId": {
                "description": "The payment instrument ID with which this autopay plan will be charged through.\n",
                "type": "string"
              },
              "schedule": {
                "items": {
                  "$ref": "#/components/schemas/AutopayExpectedPayment"
                },
                "type": "array"
              },
              "specificDays": {
                "$ref": "#/components/schemas/SpecificDays"
              }
            },
            "type": "object"
          }
        ],
        "title": "Installment"
      },
      "LineOfCreditAutopay": {
        "allOf": [
          {
            "$ref": "#/components/schemas/IsLocked"
          },
          {
            "properties": {
              "agreementDocumentId": {
                "description": "The document descriptor ID corresponding to the autopay agreement document.\n",
                "type": "string"
              },
              "cancelReason": {
                "description": "Why the transaction was canceled.",
                "enum": [
                  "invalidPaymentMethod",
                  "paymentMethodRemoved",
                  "tooManyFailedAttempts",
                  "loanFrozen",
                  "loanAccelerated",
                  "loanChargedOff",
                  "loanPaidOff",
                  "canceledByUser",
                  "loanTermsChanged"
                ],
                "nullable": true,
                "type": "string"
              },
              "createdAt": {
                "format": "date-time",
                "type": "string"
              },
              "extraAmount": {
                "description": "The extra amount that the borrower agrees to pay if `type=statementMinimumAmountPlusExtra`.",
                "format": "float",
                "type": "number"
              },
              "id": {
                "description": "The autopay identifier.",
                "readOnly": true,
                "type": "string"
              },
              "isAlignedToDueDates": {
                "description": "`true` - the Autopay transactions will be processed on the loan's due dates.\n\n`false` - the Autopay transactions schedule will be different from the loan's due dates schedule.\n\nIf `isAlignedToDueDates=false` then `paymentFrequency` and `specificDays` must be provided.\n",
                "type": "boolean"
              },
              "offsetFromDueDate": {
                "items": {
                  "type": "integer"
                },
                "nullable": true,
                "type": "array"
              },
              "paymentFrequency": {
                "description": "The Autopay payments frequency. `Weekly` frequency is not supported for line of credit.",
                "enum": [
                  "twiceMonthly",
                  "everyTwoWeeks",
                  "monthly"
                ],
                "type": "string"
              },
              "paymentInstrumentId": {
                "description": "The payment instrument ID with which this autopay plan will be charged through.\n",
                "type": "string"
              },
              "schedule": {
                "items": {
                  "$ref": "#/components/schemas/AutopayExpectedPayment"
                },
                "type": "array"
              },
              "specificDays": {
                "$ref": "#/components/schemas/SpecificDays"
              },
              "type": {
                "description": "Indicates how Autopay amount will be calculated for each closed statement.\n\n`statementMinimumAmount` - an Autopay will debit the statement minimum amount for the period.\n\n`statementMinimumAmountPlusExtra` - an Autopay will debit the statement minimum amount for the period plus\nextra amount. The extra amount is typically applied to principal. This is ONLY applicable to non-amortized\nline of credit loans.\n\n`statementBalanceAmount` - an Autopay transaction will debit the statement balance for the period. This is ONLY applicable to non-amortized\nline of credit loans.\n",
                "enum": [
                  "statementMinimumAmount",
                  "statementMinimumAmountPlusExtra",
                  "statementBalanceAmount"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "Line Of Credit"
      },
      "Autopay": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/InstallmentAutopay"
          },
          {
            "$ref": "#/components/schemas/LineOfCreditAutopay"
          }
        ]
      },
      "AutopayUpdate": {
        "properties": {
          "agreementDocumentId": {
            "description": "The document ID for the signed autopay agreement. Required if `previewMode=false`.\n",
            "type": "string"
          },
          "caseId": {
            "description": "An identifier for an existing case.\n",
            "type": "string"
          },
          "paymentInstrumentId": {
            "description": "The payment instrument ID with which this autopay plan will be charged through.\n",
            "type": "string"
          },
          "sendNotice": {
            "default": true,
            "description": "When set to `false`, the system will NOT send a `autopayPaymentMethodUpdated` notice to the borrower.",
            "type": "boolean"
          }
        },
        "required": [
          "paymentInstrumentId",
          "agreementDocumentId"
        ],
        "type": "object"
      },
      "DeltaTerms": {
        "description": "The delta change in interest, fees, calendar days, and number of due dates. Only relevant for installment loans. For\nnon installment loans, `deltaTerms` fields will be null.\n",
        "properties": {
          "deltaTerms": {
            "properties": {
              "deltaDueDatesNumber": {
                "description": "A positive number indicates the number of additional due dates that were added to the loan schedule. A negative\nnumber indicates the number due dates that were removed from the loan schedule.\n",
                "nullable": true,
                "type": "integer"
              },
              "deltaDurationDays": {
                "description": "A positive number indicates number of calendar days that the loan's term is extended as a result of the\nchange. A negative number indicates the number of calendar days that the loan's term is shortened as\na result of the change.\n",
                "nullable": true,
                "type": "integer"
              },
              "deltaFeeAmount": {
                "description": "A positive amount indicates the additional fees that the borrower is expected to pay as a result of\nthe change. A negative amount indicates savings in fees the borrower is expected to benefit from as\na result of the change.\n",
                "format": "float",
                "nullable": true,
                "type": "number"
              },
              "deltaInterestAmount": {
                "description": "A positive amount indicates the additional interest that the borrower is expected to pay as a\nresult of the change. A negative amount indicates savings in interest the borrower is expected to\nbenefit from as a result of the change.\n",
                "format": "float",
                "nullable": true,
                "type": "number"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "InstallmentAutopayPost": {
        "properties": {
          "agreementDocumentId": {
            "description": "The document ID for the signed autopay agreement. Required if `previewMode=false`.\n",
            "type": "string"
          },
          "caseId": {
            "description": "An identifier for an existing case.\n",
            "type": "string"
          },
          "isAlignedToDueDates": {
            "description": "`true` - the Autopay payments will be aligned and processed on the loan's due dates.\n\n`false` - the Autopay payments schedule will be different from the loan's due dates schedule.\n\nIf `isAlignedToDueDates=false` then `paymentFrequency` and `specificDays` must be provided.\n\nIf the frequency and specific days of autopay matches the loan, we assume that it is `isAlignedToDueDates=true`.\n",
            "type": "boolean"
          },
          "paymentFrequency": {
            "description": "The Autopay payments frequency.",
            "enum": [
              "weekly",
              "everyTwoWeeks",
              "twiceMonthly",
              "monthly"
            ],
            "type": "string"
          },
          "paymentInstrumentId": {
            "description": "The payment instrument ID with which this autopay plan will be charged through.\n",
            "type": "string"
          },
          "previewMode": {
            "default": false,
            "description": "In `previewMode=true`, the loan doesn't change, and no changes are saved to the database.",
            "type": "boolean"
          },
          "sendNotice": {
            "default": true,
            "description": "When set to `false`, the system will NOT send a `autopayEnabled` notice to the borrower.",
            "type": "boolean"
          },
          "specificDays": {
            "$ref": "#/components/schemas/SpecificDays"
          }
        },
        "required": [
          "paymentInstrumentId"
        ],
        "title": "Installment",
        "type": "object"
      },
      "LineOfCreditAutopayPost": {
        "properties": {
          "agreementDocumentId": {
            "description": "The document ID for the signed autopay agreement. Required if `previewMode=false`.\n",
            "type": "string"
          },
          "amountType": {
            "default": "statementMinimumAmount",
            "description": "Indicates how Autopay amount will be calculated for each closed statement.\n\n`statementMinimumAmount` - an Autopay will debit the statement minimum amount for the period. The statement minimum\namount is defined as the sum of the expected payment amounts in the given period.\n\n`statementMinimumAmountPlusExtra` - an Autopay will debit the statement minimum amount for the period plus\nextra amount. The extra amount is typically applied to principal. In any given autopay period, if the\n'statementMinimumAmountPlusExtra' is greater than the outstanding balance on the line of credit, we only debit\nup to the amount of the latter.\n\n`statementBalanceAmount` - an Autopay transaction will debit the statement balance as of the statement creation\ndate for the given period.\n",
            "enum": [
              "statementMinimumAmount",
              "statementMinimumAmountPlusExtra",
              "statementBalanceAmount"
            ],
            "type": "string"
          },
          "caseId": {
            "description": "An identifier for an existing case.\n",
            "type": "string"
          },
          "extraAmount": {
            "description": "The extra amount that the borrower agrees to pay if `type=statementMinimumAmountPlusExtra`.",
            "format": "float",
            "type": "number"
          },
          "isAlignedToDueDates": {
            "description": "`true` - the Autopay transactions will be processed on the loan's due dates.\n\n`false` - the Autopay transactions schedule will be different from the loan's due dates schedule.\nIf `isAlignedToDueDates=false` then `offsetFromDueDate` must be provided.\n",
            "type": "boolean"
          },
          "offsetFromDueDate": {
            "description": "Number of calendars days before due dates when Autopay payments are processed.\nIf `isAlignedToDueDates` is false, it is required to specify the offset from the due dates. Depending on whether there are 1 or 2 auto-payments\nper period, the array should include either 1 or 2 integers.\n\n  - `onceAPeriod` - borrower can choose X days before the due date. Provide one number in a valid range between \"1\" and \"statement to due date\"\n  days (e.g. 14 or 21). For example: `[5]` means the Autopay will be processed 5 calendar days before a given due date.\n  - `twiceAPeriod` - borrower can choose two offsets, in other words, Autopay will process half the amount on the first Autopay date, and half\n  the amount on the second Autopay date. Both days are \"offsets\", with \"0\" meaning on the due date. For example: `[5, 0]` means the first Autopay\n  payment will be scheduled and processed 5 days before the due date, and the second Autopay payment will be scheduled and processed on the due date.\n",
            "items": {
              "type": "integer"
            },
            "nullable": true,
            "type": "array"
          },
          "paymentInstrumentId": {
            "description": "The payment instrument ID with which this autopay plan will be charged through.\n",
            "type": "string"
          },
          "previewMode": {
            "default": false,
            "description": "If `previewMode=true`, the loan doesn't change and no changes are saved to the database.\n",
            "type": "boolean"
          },
          "sendNotice": {
            "default": true,
            "description": "When set to `false`, the system will NOT send a `autopayEnabled` notice to the borrower.",
            "type": "boolean"
          }
        },
        "required": [
          "paymentInstrumentId"
        ],
        "title": "Line Of Credit",
        "type": "object"
      },
      "AutopayPost": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/InstallmentAutopayPost"
          },
          {
            "$ref": "#/components/schemas/LineOfCreditAutopayPost"
          }
        ]
      },
      "LoanCancelMetro2RequestBody": {
        "properties": {
          "accountStatusCode": {
            "default": "DA",
            "description": "The Metro2 Account Status that will be reported to credit agencies upon loan cancellation or deletion. Make sure you follow the Metro2 Credit Reporting Resource Guide.\nThe following statuses were copied from the Metro2 Guide. The list below is a subset of account status codes.\n\n- `13` - Paid or closed account/zero balance. For Installment and Mortgage loans, the account should be paid with a zero Balance Amount. For Credit Line, Open and Revolving portfolio types, the account should no longer be available for use, and the Balance Amount should be zero. A Special Comment Code M or Compliance Condition Code XA may also be reported to indicate the account is closed.\n- `61` - Account paid in full, was a voluntary surrender. Requires Current Balance and Amount Past Due = zero.\n- `62` - Account paid in full, was a collection account. Requires Current Balance and Amount Past Due = zero.\n- `63` - Account paid in full, was a repossession. Requires Current Balance and Amount Past Due = zero.\n- `93` - Account assigned to internal or external collections.\n- `95` - Voluntary surrender; there may be a balance due.\n- `96` - Merchandise was repossessed; there may be a balance due.\n- `97` - Unpaid balance reported as a loss (charge-off).\n- `DA` - Delete entire account (for reasons other than fraud).\n- `DF` - Delete entire account due to confirmed fraud (fraud investigation completed).\n",
            "enum": [
              "13",
              "61",
              "62",
              "63",
              "93",
              "95",
              "96",
              "97",
              "DA",
              "DF"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "LoanCancel": {
        "allOf": [
          {
            "properties": {
              "cancellationReason": {
                "$ref": "#/components/schemas/CancellationReason"
              },
              "metro2": {
                "$ref": "#/components/schemas/LoanCancelMetro2RequestBody"
              },
              "sendCancellationNotice": {
                "default": false,
                "description": "When set to `true`, the system will send `loanCanceled` notice to the borrower.\n",
                "type": "boolean"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/CaseId"
          }
        ]
      },
      "CardBaseData": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseWithExternalIdMixin"
          },
          {
            "properties": {
              "externalId": {
                "description": "A lender's unique identifier for a specific promotional program type.",
                "type": "string"
              },
              "galileoCad": {
                "description": "Galileo-generated identifier for a specific card.\n",
                "type": "string"
              },
              "galileoPrn": {
                "description": "Unique 12-digit Galileo-generated account identifier.\n",
                "type": "string"
              },
              "issuerId": {
                "description": "The card issuer/vendor unique identifier. The card issuer must be configured in Peach.",
                "type": "string"
              },
              "lithicAccountToken": {
                "description": "Lithic-generated identifier for an account holder (consumer or business).\n",
                "type": "string"
              },
              "lithicCardToken": {
                "description": "Lithic-generated identifier for a specific card product.\n",
                "type": "string"
              },
              "marqetaBusinessToken": {
                "description": "Marqeta-generated identifier for a specific business.\n",
                "type": "string"
              },
              "marqetaCardProductToken": {
                "description": "Marqeta-generated identifier for a specific card product.\n",
                "type": "string"
              },
              "marqetaCardToken": {
                "description": "Lender or Marqeta-generated unique identifier for the card.\n",
                "type": "string"
              },
              "marqetaUserToken": {
                "description": "Marqeta-generated identifier for a specific user.\n",
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "CardDetails": {
        "description": "The card details.",
        "properties": {
          "address": {
            "$ref": "#/components/schemas/Address",
            "description": "The billing address associated with the card. Must have at least postal code."
          },
          "cardNumberLastFour": {
            "description": "The last four digits of the card number.",
            "type": "string"
          },
          "expirationMonth": {
            "description": "The expiration month of the card.",
            "example": 12,
            "maximum": 12,
            "minimum": 1,
            "type": "integer"
          },
          "expirationYear": {
            "description": "The expiration year of the card.",
            "example": 2025,
            "type": "integer"
          },
          "firstName": {
            "description": "First name on the card.",
            "type": "string"
          },
          "fulfillmentStatus": {
            "description": "The fulfillment status of the card.",
            "enum": [
              "issued",
              "ordered",
              "rejected",
              "shipped",
              "digitallyPresented"
            ],
            "type": "string"
          },
          "lastName": {
            "description": "Last name on the card.",
            "type": "string"
          },
          "network": {
            "description": "The card network.",
            "enum": [
              "visa",
              "mastercard",
              "discover",
              "americanExpress"
            ],
            "type": "string"
          },
          "nickname": {
            "description": "Nickname for card, typically decided by consumer",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "description": "The status of the card.",
            "enum": [
              "inactive",
              "pendingActivation",
              "pendingFulfillment",
              "active",
              "paused",
              "suspended",
              "terminated",
              "canceled",
              "expired",
              "invalid"
            ],
            "type": "string"
          },
          "usageType": {
            "description": "The type of allowable usage for the card.",
            "enum": [
              "singleUse",
              "merchantLocked",
              "digitalWallet",
              "unlocked",
              "physical"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "BaseCard": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "$ref": "#/components/schemas/CardBaseData"
          },
          {
            "properties": {
              "cardDetails": {
                "$ref": "#/components/schemas/CardDetails"
              }
            },
            "type": "object"
          }
        ],
        "title": "Card"
      },
      "VirtualCardProperties": {
        "properties": {
          "cardBalances": {
            "description": "The card balances. Only applicable to `virtualCard` type card objects.",
            "properties": {
              "originalAmount": {
                "description": "The original amount of the card before it was used. If null, will default to the loan's `atOrigination.amountFinanced`.\n",
                "format": "float",
                "nullable": true,
                "type": "number"
              },
              "refundedAmount": {
                "description": "The amount of the card that was refunded back to the card or otherwise not used.\n",
                "format": "float",
                "nullable": true,
                "readOnly": true,
                "type": "number"
              },
              "usedAmount": {
                "description": "The amount of the card that was used.\n",
                "format": "float",
                "nullable": true,
                "readOnly": true,
                "type": "number"
              }
            },
            "type": "object"
          },
          "type": {
            "description": "The type of card issued. For loanType `installment`, only the only allowable value is virtualCard.\nFor loanType `lineOfCredit`, virtual and credit card are accepted.\n",
            "enum": [
              "virtualCard"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "VirtualCard": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseCard"
          },
          {
            "$ref": "#/components/schemas/VirtualCardProperties"
          }
        ],
        "title": "Virtual card"
      },
      "CreditCardProperties": {
        "properties": {
          "type": {
            "description": "The type of card issued. For loanType `installment`, only the only allowable value is virtualCard.\nFor loanType `lineOfCredit`, virtual and credit card are accepted.\n",
            "enum": [
              "creditCard"
            ],
            "type": "string"
          },
          "usageRestrictions": {
            "allOf": [
              {
                "description": "Additional usage restrictions of the specific card to apply to purchases. These will be applied in addition to `usageRestrictions` created in the program object as part of the card issuer APIs.\n"
              },
              {
                "$ref": "#/components/schemas/UsageRestrictions"
              }
            ]
          }
        },
        "type": "object"
      },
      "CreditCard": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseCard"
          },
          {
            "$ref": "#/components/schemas/CreditCardProperties"
          }
        ],
        "title": "Credit card"
      },
      "Card": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/VirtualCard"
          },
          {
            "$ref": "#/components/schemas/CreditCard"
          }
        ]
      },
      "CardDetailsWithPanAndCvv": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CardDetails"
          },
          {
            "properties": {
              "cvvNumber": {
                "description": "The full CVV2 number. Only included in the `GET` endpoint when `showCvv=true`.",
                "readOnly": true,
                "type": "string"
              },
              "pan": {
                "description": "The card full PAN. Only included in the `GET` endpoint when `showPan=true`.",
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "BaseCardWithPanAndCvv": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "$ref": "#/components/schemas/CardBaseData"
          },
          {
            "properties": {
              "cardDetails": {
                "$ref": "#/components/schemas/CardDetailsWithPanAndCvv"
              }
            },
            "type": "object"
          }
        ],
        "title": "Card"
      },
      "VirtualCardWithPanAndCvv": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseCardWithPanAndCvv"
          },
          {
            "$ref": "#/components/schemas/VirtualCardProperties"
          }
        ],
        "title": "Virtual card"
      },
      "CreditCardWithPanAndCvv": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseCardWithPanAndCvv"
          },
          {
            "$ref": "#/components/schemas/CreditCardProperties"
          }
        ],
        "title": "Credit card"
      },
      "CardWithPanAndCvv": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/VirtualCardWithPanAndCvv"
          },
          {
            "$ref": "#/components/schemas/CreditCardWithPanAndCvv"
          }
        ]
      },
      "CardStatusChangeReasonCode": {
        "properties": {
          "statusChangeReasonCode": {
            "description": "The reason a card's status is being updated. Please see table below for allowable statuses based on reason code.\n\n| Peach Card Status Change Reason Code | Allowable Peach Card Status |\n|---------------------------------------|-----------------------------|\n| cardCanceled                          | canceled                    |\n| cardExpired                           | expired                     |\n| cardInvalid                           | invalid                     |\n| cardClosed                            | terminated                  |\n| cardDamaged                           | terminated                  |\n| cardFraudulent                        | paused                      |\n| cardInactive                          | inactive                    |\n| cardLost                              | paused                      |\n| cardPFraud                            | paused                      |\n| cardSuspended                         | suspended                   |\n| cardUnauthorized                      | invalid                     |\n| cardAcceptorActivityQuestionable      | paused                      |\n| cardStolen                            | terminated                  |\n",
            "enum": [
              "cardCanceled",
              "cardExpired",
              "cardInvalid",
              "cardClosed",
              "cardDamaged",
              "cardFraudulent",
              "cardInactive",
              "cardLost",
              "cardPFraud",
              "cardSuspended",
              "cardUnauthorized",
              "cardAcceptorActivityQuestionable",
              "cardStolen"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "PutCardWithPanAndCvv": {
        "anyOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/VirtualCardWithPanAndCvv"
              },
              {
                "$ref": "#/components/schemas/CardStatusChangeReasonCode"
              }
            ],
            "title": "Virtual card"
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/CreditCardWithPanAndCvv"
              },
              {
                "$ref": "#/components/schemas/CardStatusChangeReasonCode"
              }
            ],
            "title": "Credit card"
          }
        ]
      },
      "LoanChargeOff": {
        "allOf": [
          {
            "properties": {
              "chargedOffReason": {
                "description": "The reason for loan charge off:\n\n`term` means the loan was charged off per loan type configuration after X days overdue.\n\n`fraudulent` means the loan was charged off for fraudulent reason. If the loan is reported to one or more credit bureaus, the system will automatically send a special request to each bureau to delete the tradeline due to confirmed fraud. This is the only reason that the system will automatically trigger a request to delete the tradeline. For other reasons, if you need to delete the tradeline please call the `Delete from credit reporting` endpoint or use an agent tool.\n\n`bankruptcy` means the loan was charged off because of bankruptcy.\n\n`legal` means the loan was charged off because of some legal reason.\n",
                "enum": [
                  "term",
                  "fraudulent",
                  "bankruptcy",
                  "legal"
                ],
                "type": "string"
              },
              "effectiveDate": {
                "description": "The effective date of the loan charge-off. The date should be the current date in the product timezone.\nPassing in `\"today\"` will also set the field to today's date.\n",
                "format": "date",
                "type": "string"
              },
              "sendNotice": {
                "default": true,
                "description": "Only applicable to `chargedOffReason=term`. If `chargedOffReason` is one of the following reasons [fraudulent, bankruptcy, legal], the system will ignore the `sendNotice` value and will NOT send the `loanChargedOffUnsecured` notice.\n\nIf `chargedOffReason=term` and the passed value is `false`, the system will NOT send the `loanChargedOffUnsecured` notice to the borrower.\n",
                "type": "boolean"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/CaseId"
          }
        ],
        "required": [
          "effectiveDate",
          "chargedOffReason"
        ]
      },
      "LoanChargeOffResponse": {
        "properties": {
          "chargeOffAmount": {
            "description": "The amount charged-off.",
            "format": "float",
            "type": "number"
          }
        },
        "type": "object"
      },
      "CollectionAgencyLoanDetailsBase": {
        "properties": {
          "agencyExternalId": {
            "description": "The lender's external identifier for the agency.",
            "readOnly": true,
            "type": "string"
          },
          "assignedOnDate": {
            "description": "The date when the loan was assigned to a debt collection agency. If a date is not passed, the system will set the date to today.\n",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "assignmentType": {
            "description": "The type of loan assignment to a debt collection agency.\n\n`wholeSale` - The loan was sold to a third party debt collections\nagency. The loan is no longer managed by Peach as the system of\nrecord.\n\n`contingency` - Collection efforts are performed by a third party\ndebt collections agency. The loan is still managed by Peach as the\nsystem of record.\n",
            "enum": [
              "wholeSale",
              "contingency"
            ],
            "nullable": false,
            "type": "string"
          },
          "metro2": {
            "properties": {
              "reportK2Segment": {
                "default": false,
                "description": "Only applicable to loans that are reported to credit bureaus.\n\nIf `true`, the system will report the K2 segment in the Metro2\nfile to indicate that the loan has been sold to a third party\ndebt collections agency. The Peach system will report the loan\nfor the final time in the period the loan is assigned to the\ncollections agency. After that, Peach will not report the loan\nagain; it is the new collection agency's responsibility to\nhandle all future reporting.\n\nIf `false`, the system will not report the K2 segment in the\nMetro2 file. Peach will continue to report the loan.\n",
                "nullable": false,
                "type": "boolean"
              }
            },
            "type": "object"
          },
          "status": {
            "description": "`pendingAssignment` - the loan is in the process of being assigned to an agency. It might take a few days for the agency to be ready to start collecting debt. Peach cannot collect payments.\n\n`assigned` - the loan was successfully assigned to an agency. The borrower should contact the agency for details. Peach cannot collect payments and loan balances might not be accurate.\n",
            "enum": [
              "unassigned",
              "pendingAssignment",
              "assigned"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "CollectionAgencyLoanDetailsGet": {
        "allOf": [
          {
            "properties": {
              "agencyId": {
                "description": "The agency's unique identifier.\n",
                "readOnly": true,
                "type": "string"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/CollectionAgencyLoanDetailsBase"
          }
        ]
      },
      "CollectionAgencyLoanDetailsPut": {
        "allOf": [
          {
            "properties": {
              "agencyId": {
                "$ref": "#/components/schemas/AnyId",
                "description": "The agency's unique identifier, internal or lender's external.\n",
                "writeOnly": true
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/CollectionAgencyLoanDetailsBase"
          }
        ]
      },
      "CreditLimitProperties": {
        "allOf": [
          {
            "properties": {
              "adverseActionReason": {
                "description": "The reason why the credit limit was changed. If passed, the copy used in the `locCreditLimitChanged` communication\ntemplate. Make sure to phrase the copy as a full sentence or paragraph.\n",
                "type": "string"
              },
              "creditLimitAmount": {
                "description": "The credit limit amount for the line or draw. Only applicable to line of credit or installment loan with multiple\nadvances. For installment loans with multi-advances, it is the amount financed set at origination.\n",
                "format": "float",
                "type": "number"
              },
              "sendNotice": {
                "default": true,
                "description": "Whether the system sent `locCreditLimitChanged` notice to the borrower.\n",
                "type": "boolean"
              }
            },
            "required": [
              "creditLimitAmount"
            ],
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/CaseId"
          }
        ]
      },
      "CreditReportingStatusBase": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "accountStatusCode": {
                "description": "The metro2 account status code. This is a 2 digit code that indicates the status of the account.\nThis is given by the lender in either in loan cancelation or opting a loan out of credit reporting.\n",
                "readOnly": true,
                "type": "string"
              },
              "loanId": {
                "description": "The unique loan identifier.",
                "readOnly": true,
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "StartCreditReporting": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CreditReportingStatusBase"
          },
          {
            "properties": {
              "creditAgencyId": {
                "description": "The unique credit agency identifier.",
                "type": "string"
              },
              "reportingStartDate": {
                "description": "When a new loan is created the system automatically starts reporting to all agencies that are configured in the loan type configuration. In that case the `reportingStartDate` will be equal to the loan's `activatedAt` date.\n\nWhen an existing loans (aka loan in flight) needs to be reported, the `reportingStartDate` indicates how much of the loan's history should be reported. If a full history needs to be reported, set the `reportingStartDate` to be equal to loan's `activatedAt` date.\n",
                "format": "date",
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "DeleteCreditReporting": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CreditReportingStatusBase"
          },
          {
            "properties": {
              "caseId": {
                "description": "An identifier for an existing case.",
                "nullable": true,
                "type": "string",
                "writeOnly": true
              },
              "deletedReason": {
                "description": "The reason why the loan was stopped from being reported.\n",
                "enum": [
                  "legal",
                  "fcraDispute",
                  "loanDataCorrupted",
                  "fraudulent",
                  "other"
                ],
                "type": "string"
              },
              "deletedReasonDetails": {
                "description": "Additional details about why the loan was stopped from being reported.\n",
                "type": "string"
              },
              "metro2": {
                "$ref": "#/components/schemas/LoanCancelMetro2RequestBody"
              },
              "reportingEndDate": {
                "description": "This attribute has a value (date) if the loan needs to be deleted or was already deleted from being reported to the credit agency.\n\nOnce the loan is deleted, it cannot be reported again.\n",
                "format": "date",
                "readOnly": true,
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "CreditReportingStatus": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StartCreditReporting"
          },
          {
            "$ref": "#/components/schemas/DeleteCreditReporting"
          }
        ],
        "title": "Credit Reporting Status"
      },
      "LoanCreditReportingFields": {
        "properties": {
          "metro2": {
            "properties": {
              "complianceConditionCode": {
                "description": "Compliance condition code that if set will be reported to credit agencies. This value will override any other value currently reported in the Special Comment field in the Base Segment.\nThe system will reset the value to \"empty\" after it is used in the upcoming credit reporting.\n",
                "maxLength": 2,
                "type": "string"
              },
              "ecoaCodeBaseSegment": {
                "description": "ECOA code that if set will be reported to credit agencies. This value will override any other value currently reported in the ECOA Code field in Base Segment.\nThe system will reset the value to \"empty\" after it is used in the upcoming credit reporting.\n",
                "maxLength": 1,
                "type": "string"
              },
              "specialCommentBaseSegment": {
                "description": "Special comment code that if set will be reported to credit agencies. This value will override any other value currently reported in the Special Comment field in the Base Segment.\nThe system will reset the value to \"empty\" after it is used in the upcoming credit reporting.\n",
                "maxLength": 2,
                "type": "string"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "customPaymentPlanAmount": {
        "description": "Amount required to be fulfilled for each payment plan period. The `amount` provided should be the recurring amount rather than the total amount\nof the plan. Peach's system will use the amount provided to determine whether the borrower is past due and report to bureaus accordingly (if applicable).\nNote: Any fees added during the duration of the payment plan must also be paid in order for the borrower to remain \"current\".\n\n`amount` can be higher or lower than the borrower's originally contracted amount. Peach's system will revert to the recurring amount after the payment\nplan end date if the loan still has a balance at the end of the payment plan.\n\nDo not pass this attribute if the payment plan type is `interestAndFees`.\n",
        "format": "float",
        "type": "number"
      },
      "customPaymentPlanCancellationReason": {
        "description": "The cancellation reason:\n\n`canceledByUser` - payment plan was canceled by an agent or borrower.\n\n`loanTermsChanged` - loan terms changed.\n\n`loanChargedOff` - loan was charged off.\n\n`loanAccelerated` - loan was accelerated.\n\n`otherPaymentPlanOffered` - another payment plan was offered.\n\n`other` - for any other reason requiring cancellation.\n",
        "enum": [
          "canceledByUser",
          "loanTermsChanged",
          "loanChargedOff",
          "loanAccelerated",
          "otherPaymentPlanOffered",
          "other"
        ],
        "type": "string"
      },
      "customPaymentPlanExternalId": {
        "description": "A lender's identifier for a payment pay plan.\n\nAfter the object is successfully created, a lender can use ID or externalId identifiers to fetch the object.\n\nTo fetch the object using externalId you need to add `ext-` to the URL.\n\nNote: Don't add ext- to the identifier value. For example: if the external identifier is `ABCDE`, then pass externalId=ACBCE\nand NOT ext-ABCDE when creating the object.\n",
        "type": "string"
      },
      "customPaymentPlanIsExtendLoanDuration": {
        "default": true,
        "description": "If `true`, the system may adjust and increase the loan `duration` beyond the current end date to accommodate the payment plan. If `false`, the\nsystem will not add additional periods beyond the current loan `duration`.\n",
        "type": "boolean"
      },
      "customPaymentPlanNumberOfPeriods": {
        "description": "The number of periods during which the payment plan terms are effective. Represented as the number of `paymentFrequency` periods. The system will\nbegin counting the `numberOfPeriods` from the period represented by the `selectedDueDate`.\n\nThe `numberOfPeriods` of the payment plan must take place within the existing loan duration. Moreover, if `isExtendLoanDuration` is `true`,\nthe `numberOfPeriods` must end on or before the last period of the loan. If `isExtendLoanDuration` is `false`, then `numberOfPeriods` for the payment\nplan must end on or before the second to last payment.\n\nFor example, if the payment plan `frequency=weekly` and `numberOfPeriods=6` and the remaining loan duration is 12, the payment plan will be created with a\n6 weeks duration during which the designated payment plan `amount` is in effect. Any subsequent periods after the payment plan has ended will revert\nto the original periodic payment amount.\n",
        "type": "integer"
      },
      "customPaymentPlanType": {
        "default": "fixedAmountAndFees",
        "description": "Determines how the system will calculate payment plan payments during the payment plan's `numberOfPeriods`.\n\n`fixedAmountAndFees` - the payment plan payment amounts will be set as a recurring `amount`. Note that any configured recurring\nfees (e.g. service fees) will also be included in the payment plan amount unless explicitly canceled. `amount` must be passed at\nthe time of payment plan creation when using this option.\n\n`interestAndFees` - the payment plan amounts will be calculated by Peach's system as \"interest only\". Note that any configured\nrecurring fees (e.g. service fees) will also be included in the payment plan amount unless explicitly canceled. Do not pass `amount`\nwhen using this option.\n",
        "enum": [
          "fixedAmountAndFees",
          "interestAndFees"
        ],
        "type": "string"
      },
      "customPaymentPlanReasonDetails": {
        "description": "The reason for payment plan cancellation. This is typically entered by an agent canceling a payment plan via the front end.\n",
        "type": "string"
      },
      "customPaymentPlanSelectedDueDate": {
        "description": "The due date of the period from which to begin the payment plan. If `selectedDueDate` is not provided upon payment plan creation,\nthe system will use the current period due date as the `selectedDueDate`. If `selectedDueDate` is provided, it must be for a due date in the future.\n",
        "format": "date",
        "type": "string"
      },
      "CustomPaymentPlanResult": {
        "allOf": [
          {
            "properties": {
              "amount": {
                "$ref": "#/components/schemas/customPaymentPlanAmount"
              },
              "canceledBy": {
                "description": "Identifier of the `User` who canceled the payment plan.",
                "type": "string"
              },
              "cancellationCaseId": {
                "description": "An identifier for an existing case.",
                "type": "string"
              },
              "cancellationReason": {
                "$ref": "#/components/schemas/customPaymentPlanCancellationReason"
              },
              "createdBy": {
                "description": "Identifier of the `User` who created the payment plan.\n",
                "type": "string"
              },
              "creationCaseId": {
                "description": "An identifier for an existing case.",
                "type": "string"
              },
              "externalId": {
                "$ref": "#/components/schemas/customPaymentPlanExternalId"
              },
              "id": {
                "readOnly": true,
                "type": "string"
              },
              "isExtendLoanDuration": {
                "$ref": "#/components/schemas/customPaymentPlanIsExtendLoanDuration"
              },
              "numberOfPeriods": {
                "$ref": "#/components/schemas/customPaymentPlanNumberOfPeriods"
              },
              "paymentPlanType": {
                "$ref": "#/components/schemas/customPaymentPlanType"
              },
              "reasonDetails": {
                "$ref": "#/components/schemas/customPaymentPlanReasonDetails"
              },
              "schedule": {
                "items": {
                  "$ref": "#/components/schemas/ExpectedPayment"
                },
                "type": "array"
              },
              "selectedDueDate": {
                "$ref": "#/components/schemas/customPaymentPlanSelectedDueDate"
              },
              "status": {
                "description": "The payment plan status. Once a payment plan is created, it is, by definition, `active`. Once all\nperiods in a payment plan period have passed, it will change status to `inactive`. If a payment plan\nis canceled, it will change status to `canceled`.\n",
                "enum": [
                  "active",
                  "inactive",
                  "canceled"
                ],
                "type": "string"
              },
              "timestamps": {
                "properties": {
                  "canceledAt": {
                    "format": "date-time",
                    "readOnly": true,
                    "type": "string"
                  },
                  "createdAt": {
                    "format": "date-time",
                    "readOnly": true,
                    "type": "string"
                  }
                },
                "readOnly": true,
                "type": "object"
              }
            },
            "type": "object"
          }
        ]
      },
      "SendNoticeCancelAutopay": {
        "default": true,
        "description": "When set to `false`, the system will NOT send a `loanPaymentScheduleChanged` notice to the borrower.\n\nNote: Changing the loan terms will automatically cancel an existing Autopay (if enabled). A borrower,  an agent or\nAPI caller needs to turn on / enable a new Autopay plan after the loan terms change is completed. If the loan has Autopay enabled:\n - When `sendNotice=false`, the system will NOT send an `autopayCanceledBySystem` notice.\n - When `sendNotice=true`, the system will send an `autopayCanceledBySystem` notice in addition to the applicable loan terms notice.\n",
        "type": "boolean"
      },
      "LoanCustomPaymentPlan": {
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/customPaymentPlanAmount"
          },
          "caseId": {
            "description": "An identifier for an existing case.",
            "type": "string"
          },
          "externalId": {
            "$ref": "#/components/schemas/customPaymentPlanExternalId"
          },
          "isExtendLoanDuration": {
            "$ref": "#/components/schemas/customPaymentPlanIsExtendLoanDuration"
          },
          "numberOfPeriods": {
            "$ref": "#/components/schemas/customPaymentPlanNumberOfPeriods"
          },
          "paymentPlanType": {
            "$ref": "#/components/schemas/customPaymentPlanType"
          },
          "previewMode": {
            "default": false,
            "description": "In `previewMode=true`, the loan doesn't change, and no changes are saved to the database.",
            "type": "boolean"
          },
          "selectedDueDate": {
            "$ref": "#/components/schemas/customPaymentPlanSelectedDueDate"
          },
          "sendNotice": {
            "$ref": "#/components/schemas/SendNoticeCancelAutopay"
          }
        },
        "required": [
          "numberOfPeriods"
        ],
        "type": "object"
      },
      "LoanCustomPaymentPlanCancel": {
        "properties": {
          "cancellationReason": {
            "$ref": "#/components/schemas/customPaymentPlanCancellationReason"
          },
          "caseId": {
            "description": "An identifier for an existing case.",
            "type": "string"
          },
          "reasonDetails": {
            "$ref": "#/components/schemas/customPaymentPlanReasonDetails"
          },
          "sendNotice": {
            "default": false,
            "description": "When set to `false`, the system will NOT send a `loanPaymentScheduleChanged` notice to the borrower.\n",
            "type": "boolean"
          }
        },
        "required": [
          "cancellationReason"
        ],
        "type": "object"
      },
      "LoanDeferDueDate": {
        "allOf": [
          {
            "properties": {
              "addAfterLastDueDate": {
                "default": false,
                "description": "`true` to move the new due date to a date after the last due date. The date will be calculated\nbased upon the existing loan cadence. The `newDueDate` field should be left empty if utilizing this option.\n",
                "type": "boolean"
              },
              "agreementDocumentId": {
                "description": "The document descriptor ID corresponding to the accepted loan term change agreement.\n",
                "type": "string"
              },
              "newDueDate": {
                "description": "The proposed new due date, chosen from an existing due date after the selected date. The\n`addAfterLastDueDate` field should be toggled to false if utilizing this option.\n",
                "format": "date",
                "type": "string"
              },
              "previewMode": {
                "default": false,
                "description": "If `previewMode=true`, the loan doesn't change and no changes are saved to the database.\n",
                "type": "boolean"
              },
              "selectedDueDate": {
                "description": "The selected due date to defer. It can be the due date of the current period or a future due date in the loan schedule.\n",
                "format": "date",
                "type": "string"
              },
              "sendNotice": {
                "$ref": "#/components/schemas/SendNoticeCancelAutopay"
              },
              "waiveFee": {
                "default": false,
                "description": "`true` to charge a fee for deferral of a due date. The fee amount is defined as part of the loan type.\n",
                "type": "boolean"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/CaseId"
          }
        ],
        "required": [
          "selectedDueDate"
        ]
      },
      "DueDateDeferralFeeAmount": {
        "properties": {
          "dueDateDeferralFeeAmount": {
            "description": "The due date deferral fee amount",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "LoanDeferSchedule": {
        "allOf": [
          {
            "properties": {
              "agreementDocumentId": {
                "description": "The document descriptor ID corresponding to the accepted loan term change agreement.\n",
                "type": "string"
              },
              "bufferToPushOutSchedule": {
                "description": "When deferring during the first period, this represents the number of calendar days that will be added to\ntoday's date. The resulting date will be used to push out due dates (today's date + buffer days). Interest\nwill continue to accrue.\n\nWhen deferring after the first period, we defer all due dates that fall between \"today's date\"\nand \"today's date + buffer days\" to the end of the loan one by one. If the current date falls on a due date,\nit will not be deferred as the period has ended.\n",
                "nullable": true,
                "type": "integer"
              },
              "previewMode": {
                "default": false,
                "description": "If `previewMode=true`, the loan doesn't change and no changes are saved to the database.\n",
                "type": "boolean"
              },
              "sendNotice": {
                "$ref": "#/components/schemas/SendNoticeCancelAutopay"
              },
              "waiveFee": {
                "default": false,
                "description": "`true` to charge a deferral fee. The fee amount is defined as part of the loan type.\n",
                "type": "boolean"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/CaseId"
          }
        ],
        "required": [
          "bufferToPushOutSchedule"
        ]
      },
      "CreditLimitPercentage": {
        "description": "The draw's credit limit as a percentage of the loan's credit limit. Lenders can set and update `creditLimitAmount`,\n`creditLimitPercentage`, or both. If both values are set, the system will use the lower value. The format is decimal.\nFor example, 0.01 is a 1%, 0.2 is a 20%.\n",
        "format": "float",
        "type": "number"
      },
      "MinPaymentCalculation": {
        "description": "The logic to calculate the minimum payment amount when a statement is created.\nAll interest accrued in the period and fees are always part of the minimum payment amount.\n\nIf `includeOverLimitAmount` is set to `true`, the minimum payment amount will include the\nover limit amount at the time of statement generation as part of the required minimum payment.\n\nUsing `percentageOfPrincipal`, lenders can also control what percentage of the outstanding principal\nwill be added to the minimum amount.\n\nStatement logic adds up all draws calculated minimum payment amounts and sets the total as the statement\nminimum amount. If the `loanType.statement` object is configured such that `includeOverdueAmountInMinPayment`\nis set to `true`, the statement minimum payment amount will include the loan/line overdue amount as part of\nthe required minimum payment on the statement.\n",
        "properties": {
          "includeOverLimitAmount": {
            "default": false,
            "description": "The system first calculates the draw minimum amount, which includes accrued interest,\nfees and some percentage of the outstanding principal.\n\nIf `includeOverLimitAmount=true`, the system would add an over limit amount to the minimum amount.\nThe over limit amount is calculated as `max(utilizationAmount - creditLimitAmount, 0)`\nat the time of statement generation.\n",
            "type": "boolean"
          },
          "minAmount": {
            "description": "The minimum periodic amount. For example: $15.00. The minimum will be only enforced if the draw doesn't have an amortized amount.\nThe minimum will not be enforced if the principal of the draw is zero.\n\nExample:\n- Outstanding draw principal is $100.00.\n- `percentageOfPrincipal=0.01` (aka 1%).\n- Interest rate is 2% per month.\n- `minAmount=15`.\n- Interest amount per month is: $100.00 * 2% = $2.00.\n- Minimum amount is: $2 + $100.00 * 1% = $3.00.\n\nThe minimum payment will be set to $15.00 and not $3.00. The split between principal and interest will be: `interest=$2.00` and\n`principal=$13.00`.\n",
            "format": "float",
            "type": "number"
          },
          "minInterestChargeAmount": {
            "default": 0,
            "description": "The minimum amount of interest charged in a period. If the draw has accrued interest in a billing period, but the amount calculated\nis less than the `minInterestChargeAmount`, the system will add additional interest amount to the draw's interest bucket to equal\nthe `minInterestChargeAmount`.\n",
            "format": "float",
            "type": "number"
          },
          "percentageOfPrincipal": {
            "description": "Percentage of draw's outstanding principal and/or membership fee\n(if applicable).\nThe range is 0-1.\nThe format is decimal.\nFor example, 0.01 is a 1%, 0.2 is a 20%.\n\nFor non-amortized draw or amortized draws for which the amortization\nterm expires, the system will use the `percentageOfPrincipal` to\ncalculate the portion of principal and membership fee (if\napplicable) for minimum amount.\n\nFor amortized draws within the amortization term, the system will use\nthe `percentageOfPrincipal` to calculate membership fee only (if\napplicable) for minimum amount.\nThe principal portion is taken from the expected payments (aka\namortized amount).\n",
            "format": "float",
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          }
        },
        "type": "object"
      },
      "RateCapsAtOriginationDraw": {
        "description": "Rate caps that should apply to the draw at origination. \n\n1. When creating a new Draw:\n  - If `atOrigination.rateCaps` is not provided or null, copy the Line of Credit's \n    rate caps (if they exist).\n  - If `atOrigination.rateCaps` is provided, create the specified rate caps and \n    ignore the Line of Credit's existing rate caps.\n  - If `atOrigination.rateCaps` is an empty list, neither copy nor create any rate caps\n2. After a Draw is created, it manages its own Rate Caps independently. \n   Any updates to the Line of Credit's Rate Caps will not affect the Draw, and vice versa.\n",
        "items": {
          "$ref": "#/components/schemas/RateCapAtOrigination"
        },
        "nullable": true,
        "title": "Rate Caps At Origination",
        "type": "array"
      },
      "DrawAtOrigination": {
        "description": "This object contains loan details and terms as they were shown to a borrower at origination.\n",
        "properties": {
          "aprEffective": {
            "description": "The effective APR of the loan at origination. Pass both `aprNominal` and `aprEffective` even if they are equal.\n\nThis field is deprecated for Line of Credit and Draw. You can still pass the value, and it will be stored on the object.\nHowever, it will not be used/displayed anywhere. The system will use the interest rate values of Line of Credit and Draws\nand show them as the APR (for example, on the statement.)\n",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "aprNominal": {
            "description": "The nominal APR of the loan at origination. Pass both `aprNominal` and `aprEffective` even if they are equal.\n\nThis field is deprecated for Line of Credit and Draw. You can still pass the value, and it will be stored on the object.\nHowever, it will not be used/displayed anywhere. The system will use the interest rate values of Line of Credit and Draws\nand show them as the APR (for example, on the statement.)\n",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "autoAmortization": {
            "description": "Draws can be automatically amortized based on lender needs. Amortization of the draw allows borrowers to pay it back over a longer period\nof time. If the draw is not amortized, the minimum amount due will be calculated based on the `minPaymentCalculation` logic.\n\nThe system will automatically amortize the draw only ONCE in the first period in which a purchase was ever made. If more purchases\nwere made in the following periods, the system will NOT automatically re-amortize the draw. If you need to re-amortized the `draw` you should\ncall the `Amortize draw` endpoint.\n\nNote:\n- If the loan type is configured to accrue interest as `accrualMethod=compoundWithFees`, there is a known limitation to the draw amortization\ncalculation logic.\n- The draw amortization calculation will be done using the `compound` method and not `compoundWithFees`. To ensure that the system calculates\ninterest accurately, amortized draws should NOT include any fees.\n",
            "properties": {
              "amortizationLogic": {
                "description": "- `amortizeAfterEachPurchase` - indicates whether the system needs to amortize and re-amortize the draw when a new purchase is posted over `duration`\nperiods. If no new purchases were posted, the system will not re-amortize the draw.\n- `aggregatePurchasesInPeriod` - indicates whether new purchases during a period should be \"aggregated\", added to outstanding draw principal and amortized\nover `duration` periods automatically when the period ends. If no purchases were posted in a period, the system will not re-amortize the draw.\n",
                "enum": [
                  "amortizeAfterEachPurchase",
                  "aggregatePurchasesInPeriod"
                ],
                "type": "string"
              },
              "amortizationMethod": {
                "default": "equalPayments",
                "description": "Loan amortization method.\n\n`equalPayments` - the system will amortize the loan or draw making recurring payments equal (except maybe for the last payment).\nMost installment loans are expected to use this method.\n\n`interestPaymentsBalloonPrincipal` - the system will amortize the loan or draw making recurring payments equal to interest only\nand the last payment will include the entire principal. Keep in mind that if you set `interest.periodAccrualDurationType=actual`,\nthe recurring payment amounts will be different every period for monthly and twice monthly frequencies. This is because a month\ncan have 28, 29, 30 or 31 days and interest accrued will vary based on the number of days in the month.\n\nThere are additional limitations to be aware for `interestPaymentsBalloonPrincipal`. For installment loans, Autopay can only be\naligned to due dates. It means that `autoPay.allowedFrequency.isDueDatesAvailable` must be set to `false`. This way the system\nwill only allow Autopay to be aligned to the loan frequency and due dates.\n",
                "enum": [
                  "equalPayments",
                  "interestPaymentsBalloonPrincipal",
                  "custom"
                ],
                "readOnly": true,
                "type": "string"
              },
              "duration": {
                "description": "The duration of the draw as a number of `paymentFrequency` periods of the line of credit. Only applicable if the draw needs to be amortized. Pass one of the values\nonly, `duration` or `periodicPaymentAmount`.\n",
                "type": "integer"
              },
              "periodicPaymentAmount": {
                "description": "The recurring payment amount. The system will calculate the needed duration. Pass one of the values only, `duration` or `periodicPaymentAmount`.",
                "format": "float",
                "type": "number"
              }
            },
            "required": [
              "amortizationLogic"
            ],
            "type": "object"
          },
          "creditLimitAmount": {
            "description": "The credit limit.",
            "format": "float",
            "type": "number"
          },
          "creditLimitPercentage": {
            "$ref": "#/components/schemas/CreditLimitPercentage"
          },
          "fees": {
            "description": "The loan fees.",
            "properties": {
              "drawFeeAmount": {
                "description": "The amount of the draw fee. The draw fee will be due on a due date of the period the draw was activated.\nPass only one of the following values, `drawFeeAmount` or `drawFeePercentageOfPrincipal`.\n",
                "format": "float",
                "nullable": true,
                "type": "number"
              },
              "drawFeePercentageOfPrincipal": {
                "description": "The percentage of the purchases total amount. The system will calculate the draw fee amount based on the total\nof purchases in the period the draw was activated. The draw fee will be due on a due date of the period the draw\nwas activated.  Pass only one of the following values, `drawFeeAmount` or `drawFeePercentageOfPrincipal`.\n",
                "format": "float",
                "type": "number"
              },
              "dynamicFees": {
                "$ref": "#/components/schemas/AtOriginationDynamicFees"
              },
              "serviceFeeAmount": {
                "description": "**DEPRECATED ATTRIBUTE** Use `dynamicFees.feeAmount`.\n\nThe service fee amount that will be charged recurrently. Only required if the service fee `amountLogic` is configured as\n`type=passedAtOrigination`. In all other cases, the system will calculate the fee based on pre-configured logic.\n",
                "format": "float",
                "type": "number"
              },
              "serviceFeeCapAmount": {
                "description": "**DEPRECATED ATTRIBUTE** Use `dynamicFees.feeCapAmount`.\n\nThe maximum amount of the service fee that can be charged over the life of the loan or draw. Only required if the service fee\n`capLogic` is configured as `type=capPassedAtOrigination`. In all other cases, the system will calculate the fee based on pre-configured\nlogic.\n",
                "format": "float",
                "type": "number"
              }
            },
            "type": "object"
          },
          "gracePeriod": {
            "description": "The logic to handle grace period benefit. The draw level grace period functionality depends on the line/loan `isGracePeriodApplicable` attribute value that was passed in the `Create loan` endpoint.\n\nThe grace period benefit can work in two ways in Peach:\n- Line level - in this case, the loan/line and all draws must meet the grace period repayment requirement.\n  If one of the draws didn't meet the repayment requirement (in other words the entire line didn't meet the repayment requirement),\n  all draws eligible for the grace period benefit would lose the grace period benefit and accrue interest.\n- Draw level - in this case each applicable/enrolled draw needs to meet its own grace period repayment requirements.\n  If one of the applicable/enrolled draws didn't meet the repayment requirements, other draws might still be eligible for the grace\n  period benefit (as long as they meet their own requirements).\n\nLine level (`loan.isGracePeriodApplicable=true`):\n- Assuming you enrolled the line/loan in the grace period benefit when you created the loan/line via `Create loan` endpoint, you can\nset the following draw-level attributes:\n- `draw.isGracePeriodApplicable`:\n    - `false` - the draw participates in the eligibility evaluation for the entire line/loan. The draw will accrue interest based on\n    the draw interest rate even when the line is eligible for the benefit.\n    - `true` - the draw participates in the eligibility evaluation for the entire line/loan. The draw will NOT accrue interest in periods\n    when the loan/line is eligible for the grace period benefit.\n- `draw.paymentRequirementForGrace` - defines what portion of the draw needs to be repaid every period to keep the line eligible for the benefit.\n    - Keep in mind that you can set `draw.isGracePeriodApplicable=false` AND `draw.paymentRequirementForGrace = [minAmount, fullBalance]`.\n      It means that the draw will accrue interest (aka not subject to the grace period benefit). But, the line eligibility depends on\n      repayment of a portion of the draw. This configuration can be used for amortized draws when the borrower is expected to accrue interest\n      but has to pay the amortized recurring amount every period to keep the line eligible for the grace period.\n- `draw.numPeriodsToRestoreGrace` - is superseded by the line/loan level's `numPeriodsToRestoreGrace` value.\n- The following configurations are not allowed:\n    - `draw.isGracePeriodApplicable=true` AND `draw.paymentRequirementForGrace=none`\n    - `draw.isGracePeriodApplicable=true` for amortized draws. Amortized draws can participate in grace eligibility evaluation for a line/loan,\n    but are not designed to be subject to the grace period benefit (in other words, amortized draws are expected to accrue interest if an interest\n    rate greater than zero was set on the draw).\n\nLine level (`loan.isGracePeriodApplicable=false`):\n- Assuming you didn't enroll the line/loan in the grace period benefit when you created the loan/line via the `Create loan` endpoint, you can still\nenroll individual draws in the grace period benefit:\n- `draw.isGracePeriodApplicable`:\n    - `false` - the draw is not enrolled in the grace period benefit and will accrue interest based on the draw interest rate.\n    - `true` - the draw is enrolled in the grace period benefit. The draw will NOT accrue interest in periods when the draw is eligible for the grace period benefit.\n- `draw.paymentRequirementForGrace` - defines what portion of the draw needs to be repaid every period to keep the draw eligible for the benefit.\n- `draw.numPeriodsToRestoreGrace` - defines number of periods to wait after the grace period benefit was revoked, and before it can become eligible again.\n- The following configurations are not allowed:\n    - `draw.isGracePeriodApplicable=false` AND `draw.paymentRequirementForGrace in [minAmount, fullBalance]`\n    - `draw.isGracePeriodApplicable=true` for amortized draws. Amortized draws are not designed to be subject to the grace period benefit (in other\n    words, amortized draws are expected to accrue interest if an interest rate greater than zero was set on the draw).\n\nIf the `gracePeriod` object is not passed, the system will assume that grace period benefit is not applicable to the draw.\n\nImportant: the grace period attributes cannot be changed after the draw is activated.\n",
            "properties": {
              "isGracePeriodApplicable": {
                "description": "Defines how the interest on draw should accrue when the draw is eligible for the grace period benefit.\n\n`false` - the draw will accrue interest regardless of the grace period benefit eligibility.\n\n`true` - the draw will NOT accrue interest in periods when the loan/line and/or draw is eligible for the grace period benefit.\n",
                "type": "boolean"
              },
              "numPeriodsToRestoreGrace": {
                "description": "Number of periods to wait after the grace period benefit was revoked before the draw can become eligible again.\nTo take advantage of the grace period, the borrower must pay their account balance according to the grace period benefit requirements on time for the number of billing periods provided.\n\nIf you enrolled the loan/line in the grace period benefit when you created the loan via the `Create loan` endpoint, don't pass this attribute.\nThe system will set the draw-level value equal to the loan/line-level value of `numPeriodsToRestoreGrace`.\n",
                "type": "integer"
              },
              "paymentRequirementForGrace": {
                "description": "This attribute determines the portion of a draw that needs to be repaid every period in order for the line/loan and/or draw to be\neligible for the grace period benefit.\n\nImportant:\n    - If the grace period benefit was set on the loan/line level, ALL draws participate in the eligibility evaluation regardless of the\ndraw-level `isGracePeriodApplicable` value.\n\n= `minAmount` - requires the minimum amount of the draw to be paid every period.\n    - For an amortized draw, the minimum amount is the amortized periodic/recurring amount and applicable fees.\n    - For non-amortized draw, the minimum amount is what statement logic calculates.\n= `fullBalance` - requires the full balance of the draw to be paid every period. Don't set `fullBalance` for amortized draws.\n",
                "enum": [
                  "minAmount",
                  "fullBalance"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "interestRates": {
            "$ref": "#/components/schemas/LoanInterestRatesAtOrigination"
          },
          "mdr": {
            "$ref": "#/components/schemas/MerchantDiscountRateObj"
          },
          "minPaymentCalculation": {
            "$ref": "#/components/schemas/MinPaymentCalculation"
          },
          "promoRates": {
            "$ref": "#/components/schemas/LoanPromoRatesAtOrigination",
            "nullable": true
          },
          "rateCaps": {
            "$ref": "#/components/schemas/RateCapsAtOriginationDraw"
          }
        },
        "type": "object"
      },
      "DrawAtOriginationCreate": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DrawAtOrigination"
          },
          {
            "properties": {
              "minPaymentCalculation": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MinPaymentCalculation"
                  },
                  {
                    "required": [
                      "percentageOfPrincipal"
                    ],
                    "type": "object"
                  }
                ]
              }
            },
            "type": "object"
          }
        ]
      },
      "BaseDraw": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixinWithoutTimestamps"
          },
          {
            "$ref": "#/components/schemas/BaseLoanMixin"
          },
          {
            "properties": {
              "atOrigination": {
                "$ref": "#/components/schemas/DrawAtOriginationCreate",
                "required": [
                  "minPaymentCalculation"
                ]
              },
              "current": {
                "allOf": [
                  {
                    "properties": {
                      "creditLimitAmount": {
                        "description": "The credit limit amount.",
                        "format": "float",
                        "type": "number"
                      },
                      "duration": {
                        "$ref": "#/components/schemas/LoanDuration"
                      },
                      "minPaymentCalculation": {
                        "$ref": "#/components/schemas/MinPaymentCalculation"
                      },
                      "paymentFrequency": {
                        "$ref": "#/components/schemas/InstallmentPaymentFrequency"
                      },
                      "periodicPayment": {
                        "description": "The most recent amortized periodic payment that was calculated on `lastAmortizedAt`.",
                        "format": "float",
                        "type": "number"
                      },
                      "specificDays": {
                        "$ref": "#/components/schemas/SpecificDays"
                      }
                    },
                    "type": "object"
                  }
                ],
                "description": "This object contains some draw details that were modified after origination.",
                "readOnly": true
              },
              "isClosed": {
                "description": "Indicates whether the Draw is closed. If `true`, new Purchases cannot be created.\n",
                "type": "boolean"
              },
              "nickname": {
                "default": "Draw",
                "description": "The draw's nickname as displayed in the UI.",
                "type": "string"
              },
              "object": {
                "enum": [
                  "draw"
                ],
                "readOnly": true,
                "type": "string"
              },
              "ratesValidation": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/InterestRateValidation"
                  }
                ],
                "description": "This object contains information on whether actual rates exceed the rate ranges defined on the loan type.",
                "readOnly": true
              },
              "status": {
                "$ref": "#/components/schemas/LoanStatus"
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          }
        ],
        "title": "BaseDraw"
      },
      "DrawResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseDraw"
          },
          {
            "properties": {
              "drawType": {
                "description": "Describes the type of line of credit purchases associated with the draw. Typically used in credit card use cases\nin which lenders set up draws specifically to be used for cash advances, balance transfers, etc.\n\n`cashAdvance` - must be set in order for Peach's system to automatically associate ATM withdrawal and other\n  cash-specific transactions with a specific draw. See Create card issuer endpoint and `drawMapping` attribute for additional configuration details.\n\n`balanceTransfer` - enables lenders to create a draw that will house balance transfer transactions.\n\n`regularPurchase` - enables lenders to create a draw used for day-to-day purchases. If this attribute is set,\n  Peach's system will automatically associate purchases with this draw based on the card issuer `drawMapping` logic.\n\n`static` - a special draw capturing all past data prior to the \"migration cutoff date\" for a migrated Line of Credit. Automatically created by the\nsystem when a Line of Credit is created with `migrationStatus=prepMigration`.\n",
                "enum": [
                  "balanceTransfer",
                  "cashAdvance",
                  "regularPurchase",
                  "static"
                ],
                "nullable": true,
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "Draw Response"
      },
      "DrawsPaging": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Paging"
          },
          {
            "properties": {
              "data": {
                "items": {
                  "$ref": "#/components/schemas/DrawResponse"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "Draw": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseDraw"
          },
          {
            "properties": {
              "drawType": {
                "description": "Describes the type of line of credit purchases associated with the draw. Typically used in credit card use cases\nin which lenders set up draws specifically to be used for cash advances, balance transfers, etc.\n\n`cashAdvance` - must be set in order for Peach's system to automatically associate ATM withdrawal and other\n  cash-specific transactions with a specific draw. See Create card issuer endpoint and `drawMapping` attribute for additional configuration details.\n\n`balanceTransfer` - enables lenders to create a draw that will house balance transfer transactions.\n\n`regularPurchase` - enables lenders to create a draw used for day-to-day purchases. If this attribute is set,\n  Peach's system will automatically associate purchases with this draw based on the card issuer `drawMapping` logic.\n",
                "enum": [
                  "balanceTransfer",
                  "cashAdvance",
                  "regularPurchase"
                ],
                "nullable": true,
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "Draw"
      },
      "DrawAtOriginationUpdate": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DrawAtOrigination"
          },
          {
            "properties": {
              "minPaymentCalculation": {
                "$ref": "#/components/schemas/MinPaymentCalculation"
              }
            },
            "type": "object"
          }
        ]
      },
      "DrawActivationResponse": {
        "properties": {
          "amountsValidation": {
            "$ref": "#/components/schemas/AmountsValidation"
          },
          "schedule": {
            "$ref": "#/components/schemas/LoanSchedule"
          }
        },
        "type": "object"
      },
      "ExpectedPaymentsResult": {
        "allOf": [
          {
            "$ref": "#/components/schemas/IsLocked"
          },
          {
            "properties": {
              "paymentFrequency": {
                "description": "The expected payments' frequency.",
                "enum": [
                  "weekly",
                  "everyTwoWeeks",
                  "twiceMonthly",
                  "monthly"
                ],
                "type": "string"
              },
              "schedule": {
                "items": {
                  "$ref": "#/components/schemas/ExpectedPayment"
                },
                "type": "array"
              },
              "specificDays": {
                "$ref": "#/components/schemas/SpecificDays"
              }
            },
            "type": "object"
          }
        ]
      },
      "DeferRemainingBalancesRequest": {
        "properties": {
          "caseId": {
            "description": "An identifier of an existing case.\n",
            "nullable": true,
            "type": "string"
          },
          "deferralType": {
            "description": "The type of deferral.\n\n`capitalizeRemainingBalance` - the system will capitalize\nthe remaining balance, overdue or due, of each obligation\ncorresponding to the selected due dates.\nCapitalization means the following:\n\n- Overdue/due principal will become non-due principal.\n- Overdue/due interest will become non-due principal.\n- Overdue/due fees will become non-due principal.\n\nThe net effect on the loan balance right after the deferral\nis zero.\nKeep in mind that because interest and fees are capitalized\n(aka principal increased), the borrower may accrue more\ninterest in the future.\n\nThe system will not check the line of credit and/or draw\nlevel credit limit.\nFor example, If the line or draw balance before the deferral\nwas above the credit limit, the system will still complete\nthe deferral process.\n",
            "enum": [
              "capitalizeRemainingBalance"
            ],
            "nullable": false,
            "type": "string"
          },
          "previewMode": {
            "default": false,
            "description": "If `previewMode=true`, the loan doesn't change and no\nchanges are saved to the database. The preview mode allows\nyou to see the total and breakdown of the deferred amounts.\n",
            "nullable": false,
            "type": "boolean"
          },
          "selectedDueDates": {
            "description": "Selected due dates to defer.\nCan only be due dates for which the statement was already\ngenerated.\nPast due dates should always have statements. Upcoming due\ndate can only be selected if the statement was already\ngenerated.\n\nIf you don't pass a value, the system will find all due\ndates / obligations with remaining balance and defer them.\n\nIf you pass a value, make sure you don't create \"holes\".\nHole is defined as leaving one or more due dates with\nremaining balance while trying to defer more recent due\ndates. The exception is we allow deferring only the most \nrecent due obligation.\nFor example:\n\n- A line has three due dates / obligations with remaining\n  balance: `Jun 5`, `Jul 5`, `Aug 5`.\n- You cannot pass the following due dates combinations:\n  - `Jul 5` - because it makes Jun 5 a \"hole\".\n  - `Jul 5, Aug 5` - because it makes Jun 5 a \"hole\".\n  - `Aug 5` - because it makes Jun 5 and Jul 5 \"holes\".\n  - `Jun 5, Aug 5` - because it makes Jul 5 \"holes\".\n- You can pass the following due dates combinations:\n  - `Jun 5`\n  - `Jun 5, Jul 5`\n  - `Jun 5, Jul 5, Aug 5`\n  - `Aug 5` - the most recent due obligation\n",
            "items": {
              "format": "date",
              "nullable": false,
              "type": "string"
            },
            "nullable": false,
            "type": "array"
          }
        },
        "required": [
          "deferralType"
        ],
        "type": "object"
      },
      "DeferRemainingBalancesResponse": {
        "properties": {
          "deferredDrawIds": {
            "description": "The list of draws that participated in the deferral process.\n",
            "items": {
              "nullable": false,
              "type": "string"
            },
            "type": "array"
          },
          "deferredDueDates": {
            "description": "The list of due dates that were deferred.\nKeep in mind that this list can be different from the\n`selectedDueDates` list that was provided.\nFor example: if `selectedDueDates` included a due date that\ndidn't have corresponding obligation's remaining balance >\n0, the system will skip the due date and will not include it\nin the `deferredDueDates` list.\nOr, if the `selectedDueDates` was `null`, the system will\nreturn all due dates with corresponding obligation's\nremaining balance > 0 that were deferred.\n",
            "items": {
              "format": "date",
              "nullable": false,
              "type": "string"
            },
            "nullable": false,
            "type": "array"
          },
          "totalDeferredAmounts": {
            "description": "Total amount that was deferred.\nTo clarify, this is the sum of all amounts that were\ndeferred across all due dates with corresponding\nobligation's remaining amount > 0.\n",
            "properties": {
              "allFeesAmount": {
                "description": "Total of all fees portion of the `totalAmount` deferred.\n",
                "format": "float",
                "nullable": false,
                "type": "number"
              },
              "interestAmount": {
                "description": "The interest portion of the `totalAmount` that was\ndeferred.\n",
                "format": "float",
                "nullable": false,
                "type": "number"
              },
              "principalAmount": {
                "description": "The principal portion of the `totalAmount` that was\ndeferred.\n",
                "format": "float",
                "nullable": false,
                "type": "number"
              },
              "totalAmount": {
                "description": "The total deferred amount that was previously overdue or\ndue.\n",
                "format": "float",
                "nullable": false,
                "type": "number"
              }
            },
            "required": [
              "totalAmount",
              "interestAmount",
              "principalAmount",
              "allFeesAmount"
            ],
            "type": "object"
          }
        },
        "type": "object"
      },
      "DrawMigrationBalances": {
        "description": "The draw level balances passed here should be as of the \"migration cutoff date\" after the most recent statement was generated in your legal system.\n\nWe expect `balances` to include interest FOR the last date of the previous period (aka endDate) but not for the most recent statement date (which is also the first day of the migration period).\nFor example:\n- Migration period:\n  - startDate: Aug 1, 2024\n  - endDate: Aug 31, 2024\n  - statementDate: Sep 1, 2024\n  - dueDate: Sep 22, 2024\n- Previous period (also called \"past period\"):\n  - startDate: Jul 1, 2024\n  - endDate: Jul 31, 2024\n  - statementDate: Aug 1, 2024\n  - dueDate: Aug 22, 2024\n- Notes:\n  - The balances should be as of Aug 1, 2024 after the statement was generated on Aug 1, 2024.\n  - End of day principal balance on Jul 31, 2024: $100.00.\n  - The line/draw accrues daily simple interest of 18% annually (with 360 method).\n  - The balances passed to Peach should include the daily interest that was accrued at the end of the day Jul 31, 2024:\n  - $100.00 * (0.18 / 360) = $0.05\n  - Peach system will accrue daily interest for the end of the day Aug 1, 2024 day balance and onward.\n",
        "properties": {
          "creditLimitAmount": {
            "description": "The draw credit limit amount as of the \"migration cutoff date\".\n",
            "format": "float",
            "minimum": 0,
            "multipleOf": 0.01,
            "type": "number"
          },
          "dueBalances": {
            "description": "Due balances represent balances that are currently due.",
            "properties": {
              "dueDrawFeesAmount": {
                "description": "The draw fees portion of `dueFeesAmount`.",
                "format": "float",
                "minimum": 0,
                "multipleOf": 0.01,
                "type": "number"
              },
              "dueInterestAmount": {
                "description": "The interest portion of the `dueTotalAmount`.",
                "format": "float",
                "minimum": 0,
                "multipleOf": 0.01,
                "type": "number"
              },
              "dueLateFeesAmount": {
                "description": "The late fees portion of `dueFeesAmount`.",
                "format": "float",
                "minimum": 0,
                "multipleOf": 0.01,
                "type": "number"
              },
              "dueModificationFeesAmount": {
                "description": "The modification fees portion of `dueFeesAmount`.",
                "format": "float",
                "minimum": 0,
                "multipleOf": 0.01,
                "type": "number"
              },
              "duePrincipalAmount": {
                "description": "The principal portion of the `dueTotalAmount`.",
                "format": "float",
                "minimum": 0,
                "multipleOf": 0.01,
                "type": "number"
              }
            },
            "required": [
              "duePrincipalAmount",
              "dueInterestAmount",
              "dueDrawFeesAmount",
              "dueLateFeesAmount",
              "dueModificationFeesAmount"
            ],
            "type": "object"
          },
          "nonDueBalances": {
            "description": "Non-due balances represent balances that are not yet due.",
            "properties": {
              "nonDueDrawFeesAmount": {
                "description": "The draw fees portion of `nonDueFeesAmount`.",
                "format": "float",
                "minimum": 0,
                "multipleOf": 0.01,
                "type": "number"
              },
              "nonDueInterestAmount": {
                "description": "The interest portion of the `nonDueTotalAmount`.",
                "format": "float",
                "minimum": 0,
                "multipleOf": 0.01,
                "type": "number"
              },
              "nonDueLateFeesAmount": {
                "description": "The late fees portion of `nonDueFeesAmount`.",
                "format": "float",
                "minimum": 0,
                "multipleOf": 0.01,
                "type": "number"
              },
              "nonDueModificationFeesAmount": {
                "description": "The modification fees portion of `nonDueFeesAmount`.",
                "format": "float",
                "minimum": 0,
                "multipleOf": 0.01,
                "type": "number"
              },
              "nonDuePrincipalAmount": {
                "description": "The principal portion of the `nonDueTotalAmount`.",
                "format": "float",
                "minimum": 0,
                "multipleOf": 0.01,
                "type": "number"
              }
            },
            "required": [
              "nonDuePrincipalAmount",
              "nonDueInterestAmount",
              "nonDueDrawFeesAmount",
              "nonDueLateFeesAmount",
              "nonDueModificationFeesAmount"
            ],
            "type": "object"
          },
          "overdueBalances": {
            "description": "Overdue balances represent balances that are overdue.",
            "properties": {
              "overdueDrawFeesAmount": {
                "description": "The draw fees portion of `overdueFeesAmount`.",
                "format": "float",
                "minimum": 0,
                "multipleOf": 0.01,
                "type": "number"
              },
              "overdueInterestAmount": {
                "description": "The overdue interest portion of the `overdueTotalAmount`.",
                "format": "float",
                "minimum": 0,
                "multipleOf": 0.01,
                "type": "number"
              },
              "overdueLateFeesAmount": {
                "description": "The late fees portion of `overdueFeesAmount`.",
                "format": "float",
                "minimum": 0,
                "multipleOf": 0.01,
                "type": "number"
              },
              "overdueModificationFeesAmount": {
                "description": "The modification fees portion of `overdueFeesAmount`.",
                "format": "float",
                "minimum": 0,
                "multipleOf": 0.01,
                "type": "number"
              },
              "overduePrincipalAmount": {
                "description": "The overdue principal portion of the `overdueTotalAmount`.",
                "format": "float",
                "minimum": 0,
                "multipleOf": 0.01,
                "type": "number"
              }
            },
            "required": [
              "overduePrincipalAmount",
              "overdueInterestAmount",
              "overdueDrawFeesAmount",
              "overdueLateFeesAmount",
              "overdueModificationFeesAmount"
            ],
            "type": "object"
          }
        },
        "required": [
          "nonDueBalances",
          "dueBalances",
          "overdueBalances"
        ],
        "type": "object"
      },
      "BaseMigrationGracePeriod": {
        "properties": {
          "fullBalanceAmount": {
            "description": "The full balance amount of the line that is eligible for grace period.",
            "format": "float",
            "minimum": 0,
            "multipleOf": 0.01,
            "nullable": true,
            "type": "number"
          },
          "fullBalanceMinusOverdueAmount": {
            "description": "The full balance amount minus the overdue amount.",
            "format": "float",
            "minimum": 0,
            "multipleOf": 0.01,
            "nullable": true,
            "type": "number"
          },
          "isGracePeriodEligible": {
            "default": true,
            "description": "Was the loan eligible for grace in this period?",
            "nullable": false,
            "type": "boolean"
          }
        },
        "required": [
          "fullBalanceAmount",
          "fullBalanceMinusOverdueAmount"
        ],
        "type": "object"
      },
      "DrawMigrationGracePeriod": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMigrationGracePeriod"
          },
          {
            "description": "If you are not migrating past periods and the migration period is the first period of the LOC:\n\nDon't pass the `gracePeriod` object.\n\nIf you are migrating past periods:\n\nThis is the draw level grace period details.\n\nThe draw level grace period data passed here corresponds to the previous period and not to the migration period. By the time you call this endpoint, you should have already created one or more past periods. The additional data that you pass here is only required for the previous period and not for all past periods. That's why the draw level grace period data is part of the \"Create migration period draw data\" vs \"Create past periods data\" endpoint.\n\nThe migration period is a \"live\" period in which you execute migration.\n  - Because the Peach system needs to know if the LOC is eligible for the grace period benefit when the migration period starts, the system\n    will use the `isGracePeriodEligible` passed here. If you pass `isGracePeriodEligible=true`, the system will start migration without\n    accruing interest in the \"migration period\". If you pass `isGracePeriodEligible=false`, the system will start migration with accruing\n    interest in the \"migration period\".\n  - On the \"due date + 1\" within the \"migration period\", the system evaluates the grace eligibility based on `fullBalanceAmount`, `fullBalanceMinusOverdueAmount` and payments made.\n  - If you migrate the LOC/draw before the upcoming \"due date\", the system will evaluate the grace period eligibility in \"live\" and might revoke the benefit.\n  - If you migrate the LOC/draw after the \"due date\", the system will evaluate the grace period eligibility as part of the \"replay/migration\" process.\n    Because of existing limitations with \"replay\", grace period eligibility cannot be revoked as part of the replay process. However, the replay\n    process can reinstate the grace period benefit (in other words, waive accrued interest from the start of the \"migration period\").\n  - Peach is responsible for generating the statement corresponding to the migration period on `migrationPeriod.statementDate` in the future.\n    The grace period details of the migration period will be calculated by the Peach system on `migrationPeriod.statementDate` in the future.\n\nFor example:\n- Migration period:\n  - startDate: Aug 1, 2024\n  - endDate: Aug 31, 2024\n  - statementDate: Sep 1, 2024\n  - dueDate: Sep 22, 2024\n- Previous period (also called \"past period\"):\n  - startDate: Jul 1, 2024\n  - endDate: Jul 31, 2024\n  - statementDate: Aug 1, 2024\n  - dueDate: Aug 22, 2024\n- Notes:\n  - The draw level grace period details that you need to pass correspond to the previous period that started on Jul 1, 2024 and ended on Jul 31, 2024.\n  - The amounts and values should be as of the \"migration cutoff date\", Aug 1, 2024, after the statement was finalized in your legacy system.\n",
            "type": "object"
          }
        ]
      },
      "MigratedDaysOverdue": {
        "description": "This represents the number of days overdue prior to the \"migration cutoff\" date as it appears in\nthe other system (not Peach). This value is normally calculated as the number of calendar\ndays overdue starting from the earliest overdue obligation's due date to the\n\"migration cutoff date\". This value, once set, won't change after the migration.\n\nThis value will be prorated and added to `daysOverdue` of future obligations\n(if any become overdue). The system will prorate the `migratedDaysOverdue`\ndynamically as the borrower makes payments and add it to the days overdue\npost \"migration cutoff date\".\n\nCalculation details:\n  - The `migratedDaysOverdue` value will be used to prorate days overdue prior to the \"migration cutoff date\"\n    based on the paid balance of `migratedOverdueAmount` (which is set based on the `balances.overdueBalances`).\n  - round_down [migratedDaysOverdue x (1 - min(fulfilledAmount / migratedOverdueAmount, 1))]\n  - For example:\n    - migratedDaysOverdue = 60\n    - migratedOverdueAmount = $1000\n    - Scenario 1:\n      - Borrower didn't make any payment within the first 30 days after the \"migration cutoff date\".\n      - Total days overdue:\n        - 60 x (1 - min(0 / 1000, 1)) + 30 = 90\n    - Scenario 2:\n      - Borrower made payments in a total amount of $700 within the first 30 days after the \"migration cutoff date\". The line is still overdue.\n      - Total days overdue:\n        - 60 x (1 - min(700 / 1000, 1)) + 30 = 48\n",
        "minimum": 0,
        "nullable": false,
        "type": "integer"
      },
      "DrawMigrationObligation": {
        "description": "If you are not migrating past periods and the migration period is the first period of the LOC:\n\nDon't pass the `obligation` object.\n\nIf you are migrating past periods:\n\nThis is the draw level obligation details.\n\nThe draw level data passed here corresponds to the previous period and not to the migration period. By the time you call this endpoint, you should have already created one or more past periods. The additional data that you pass here is only required for the previous period and not for all past periods. That's why the draw level obligation data is part of the \"Create migration period draw data\" vs \"Create past periods\" endpoint.\n\nTo remind, the migration period is a \"live\" period in which you execute migration. The draw level obligation details of the migration period will be calculated by the Peach system. Peach is also responsible for generating the statement corresponding to the migration period on `migrationPeriod.statementDate` in the future.\n\nFor example:\n- Migration period:\n  - startDate: Aug 1, 2024\n  - endDate: Aug 31, 2024\n  - statementDate: Sep 1, 2024\n  - dueDate: Sep 22, 2024\n- Previous period (also called \"past period\"):\n  - startDate: Jul 1, 2024\n  - endDate: Jul 31, 2024\n  - statementDate: Aug 1, 2024\n  - dueDate: Aug 22, 2024\n- Notes:\n  - The draw level obligation details that you need to pass correspond to the previous period that started on Jul 1, 2024 and ended on Jul 31, 2024.\n  - The amounts and other values should be as of the \"migration cutoff date\", Aug 1, 2024, after the statement was finalized in your legacy system.\n",
        "properties": {
          "migratedDaysOverdue": {
            "$ref": "#/components/schemas/MigratedDaysOverdue"
          },
          "obligationAmount": {
            "description": "The remaining amount of the previous period's obligation that a borrower needs to pay on the due date that comes after \"migration cutoff date\". The remaining amount should be as of \"migration cutoff date\" vs. \"migration at date\".\n\nThis is the draw level remaining obligation amount.\n\nIf your LOC (or credit card) product doesn't count payments that were made before the statement date towards the statement minimum amount, then `obligationAmount` must be always equal to the draw portion of the whole statement minimum amount.\n\nExample:\n  - Migration period:\n    - startDate: Aug 1, 2024\n    - endDate: Aug 31, 2024\n    - statementDate: Sep 1, 2024\n    - dueDate: Sep 22, 2024\n  - Previous period (also called \"past period\"):\n    - startDate: Jul 1, 2024\n    - endDate: Jul 31, 2024\n    - statementDate: Aug 1, 2024\n    - dueDate: Aug 22, 2024\n\nScenario 1:\n  - The draw minimum payment was calculated as $100 on the statement date on Aug 1, 2024.\n  - A borrower made some payments in the previous period, and based on your waterfall configuration in the legacy system, $30 was counted towards the $100 minimum amount. \n  - The remaining minimum amount of $70 is due on Aug 22, 2024.\n  - You should pass `obligationAmount=70`.\n\nScenario 2:\n  - The draw minimum payment was calculated as $100 on the statement date on Aug 1, 2024.\n  - A borrower made some payments in the previous period, and based on your waterfall configuration in the legacy system, none of the payments were counted toward the $100 minimum amount. \n  - The minimum amount of $100 is due on Aug 22, 2024.\n  - You should pass `obligationAmount=100`.\n\nScenario 3:\n  - The draw minimum payment was calculated as $100 on the statement date on Aug 1, 2024.\n  - A borrower made early payments in the previous period, and based on your waterfall configuration in the legacy system, the payments were counted toward the $100 minimum amount. \n  - The remaining minimum amount of $0 is due on Aug 22, 2024 (in other words, the borrower doesn't need to pay anything on Aug 22, 2024.)\n  - You should pass `obligationAmount=0`.\n",
            "format": "float",
            "minimum": 0,
            "multipleOf": 0.01,
            "nullable": false,
            "type": "number"
          }
        },
        "required": [
          "obligationAmount",
          "migratedDaysOverdue"
        ],
        "type": "object"
      },
      "MigrationPeriodDrawData": {
        "properties": {
          "balances": {
            "$ref": "#/components/schemas/DrawMigrationBalances"
          },
          "gracePeriod": {
            "$ref": "#/components/schemas/DrawMigrationGracePeriod"
          },
          "obligation": {
            "$ref": "#/components/schemas/DrawMigrationObligation"
          }
        },
        "type": "object"
      },
      "MigrationPeriodDrawDataResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SingletonResponse"
          },
          {
            "properties": {
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MigrationPeriodDrawData"
                  },
                  {
                    "properties": {
                      "migratedOverdueAmount": {
                        "format": "float",
                        "nullable": true,
                        "type": "number"
                      }
                    },
                    "type": "object"
                  }
                ]
              }
            },
            "type": "object"
          }
        ]
      },
      "MigrationPeriodDrawDataWithRequired": {
        "allOf": [
          {
            "$ref": "#/components/schemas/MigrationPeriodDrawData"
          },
          {
            "required": [
              "obligation",
              "gracePeriod",
              "balances"
            ],
            "type": "object"
          }
        ]
      },
      "ObligationAmountFields": {
        "properties": {
          "capitalizedAmount": {
            "description": "The total amount capitalized at the end of the period.\n",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "fulfilledAmount": {
            "description": "The total amount of payments and service credits applied to the period.\n",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "obligationAmount": {
            "description": "The amount obligated to be paid by the borrower for the period.\n",
            "format": "float",
            "type": "number"
          },
          "overLimitAmount": {
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "overpaymentsAmount": {
            "description": "In the case that loan policy allows, this represents the amount of overpayments applied to the period.\nOverpayments will only arise when an obligation is completely fulfilled.\n",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "paymentsAmount": {
            "description": "The total amount of payments applied to the period.\n",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "remainingAmount": {
            "description": "The total amount remaining to be paid by the borrower after accounting for payments\nand service credits applied in the period.\n",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "serviceCreditsAmount": {
            "description": "The total amount of service credits applied to the period.\n",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "unassignedAmount": {
            "description": "This is a special amount that only applies to loan types with `obligationFulfilledCalculation=postStatement` or `obligationFulfilledCalculation=postDueDate` configuration.\nThis is not counted towards an obligation's fulfilled amount.\n\n- For the first obligation, it stores any payment amount that was made before the first statement date (postStatement) or due date (postDueDate) and is not allocated to any obligation.\n- For subsequent obligations, it stores any payment amount that was made between the previous period's due date +1 (inclusive) and current period's end date (inclusive).\n",
            "format": "float",
            "nullable": true,
            "type": "number"
          }
        },
        "type": "object"
      },
      "ObligationOtherFields": {
        "properties": {
          "dueDate": {
            "description": "The due date of the obligation/period in the product timezone.",
            "format": "date",
            "type": "string"
          },
          "isFulfilled": {
            "description": "`true` if the borrower has completely fulfilled the obligation amount for the period.\n",
            "type": "boolean"
          },
          "isLateFeeBlockedByPyramidingConfig": {
            "default": false,
            "description": "Pyramiding of late fees is a situation where a borrower (who has been previously charged a late fee) pays the current amount due\non a loan without the prior month's late fee included, and the payment is applied to the late fee first, leaving an overdue balance\non the current month's payment, resulting in another late fee.\n\n- If the late fee was configured to allow pyramiding effect, this attribute is not used and will be `false` always.\n- If the late fee was configured to prevent pyramiding effect (`pyramidingLateFeesAllowed=false`), this attribute:\n  - `true` - means a late fee was blocked (aka not charged in the period) because of the late fee pyramiding configuration.\n    But otherwise would have been charged.\n  - `false` - means a late fee was charged because the loan was overdue, or a late fee was not supposed to be charged because\n      the loan was current. To clarify, `false` doesn't necessarily mean that a late fee was charged in the period. To understand\n      whether a late fee was charged in the period, you should check the dynamic fees endpoint or applicable database table(s).\n",
            "type": "boolean"
          },
          "isOpen": {
            "description": "`true` means that the obligation is still \"open\" and the `obligationAmount` is not final. The obligation amount\ncan potentially change until the period ends. `false` means that the obligation is \"sealed\" and the `obligationAmount`\nis final.\n",
            "type": "boolean"
          },
          "isOverdue": {
            "description": "`true` if the borrower is currently overdue on the obligation amount for the period.\n",
            "type": "boolean"
          },
          "migration": {
            "description": "Used in Line of Credit migration.\n",
            "properties": {
              "migratedDaysOverdue": {
                "description": "The number of calendar days overdue as of the \"migration cutoff date\". This value is pro-rated based on the percentage\nof the `migratedOverdueAmount` paid by the borrower.\n",
                "nullable": true,
                "type": "integer"
              },
              "migratedOverdueAmount": {
                "description": "The overdue balance as of the \"migration cutoff date\". This value is equal to the total of `balances.overdueBalances`\nthat is used to initiate the ledger as of the \"migration cutoff date\". This value won't change after the migration.\n",
                "format": "float",
                "nullable": true,
                "type": "number"
              },
              "migratedOverdueRemainingAmount": {
                "description": "The overdue balance remaining to be paid as of the \"migration cutoff date\". This value starts out equal to the total of\n`balances.overdueBalances` and decreases as subsequent payments are made by the borrower.\n",
                "format": "float",
                "nullable": true,
                "type": "number"
              }
            },
            "readOnly": true,
            "type": "object"
          },
          "periodId": {
            "description": "The period identifier.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ObligationGracePeriod": {
        "description": "Data used for grace period logic.",
        "properties": {
          "fullBalanceAmount": {
            "description": "This attribute is only used for grace period benefit logic. The fullBalanceAmount is dependent on the repaymentCriteriaForGrace attribute.\n\nFor repaymentCriteriaForGrace = none, this value is zero.\n\nFor repaymentCriteriaForGrace = minAmount, this amount is the obligation for this period and the unpaid portion of past obligations as of the date when the obligation is \"sealed\".\nLine of credit (and Draw) obligations are \"sealed\" on the statement date.\n\nFor repaymentCriteriaForGrace = fullBalance, this amount is the full statement balance amount (also called \"new balance\") as of the date when the obligation is \"sealed\".\nLine of credit (and Draw) obligations are \"sealed\" on the statement date.\n",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "fullBalanceMinusOverdueAmount": {
            "description": "This attribute is only used for grace period benefit logic. The fullBalanceMinusOverdueAmount is dependent on the repaymentCriteriaForGrace attribute.\n\nFor repaymentCriteriaForGrace = none, this value is zero.\n\nFor repaymentCriteriaForGrace = minAmount, this amount is the obligation for this period as of the date when the obligation is \"sealed\".\nLine of credit (and Draw) obligations are \"sealed\" on the statement date.\n\nFor repaymentCriteriaForGrace = fullBalance, this amount is the full statement balance amount (also called \"new balance\")\nminus any overdue amount as of the date when the obligation is \"sealed\" (aka when isOpen is set to false).\n",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "isGracePeriodEligible": {
            "description": "The grace period status of the obligation period.\n`true` - means that the period is/was eligible for the grace period benefit and interest didn't accrue in the period.\n`false` - means that the period was not eligible for the grace period benefit and interest accrued in the period.",
            "type": "boolean"
          },
          "totalFulfilledOnDueDateAmount": {
            "description": "This value is only used for grace period benefit logic. The value will be set one calendar day after the due date.\nThe amount of the obligation for the period fulfilled by service credits and borrower payments as of the end of the\ndue date. This is a sum of `fulfilledAmount` and `overpaymentsAmount`.\n",
            "format": "float",
            "nullable": true,
            "type": "number"
          }
        },
        "type": "object"
      },
      "ObligationResult": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "$ref": "#/components/schemas/ObligationAmountFields"
          },
          {
            "$ref": "#/components/schemas/ObligationOtherFields"
          },
          {
            "properties": {
              "gracePeriod": {
                "$ref": "#/components/schemas/ObligationGracePeriod"
              }
            },
            "type": "object"
          }
        ]
      },
      "ObligationsResult": {
        "allOf": [
          {
            "$ref": "#/components/schemas/IsLocked"
          },
          {
            "properties": {
              "daysOverdue": {
                "description": "Number of calendar days overdue starting from the due date of the earliest overdue obligation to\nthe current date.\n",
                "type": "integer"
              },
              "isOverdue": {
                "description": "`true` if the borrower has any obligation overdue on the loan.\n",
                "type": "boolean"
              },
              "obligations": {
                "items": {
                  "$ref": "#/components/schemas/ObligationResult"
                },
                "type": "array"
              },
              "overdueAmount": {
                "description": "The total overdue amount across all obligations on the loan.\n",
                "format": "float",
                "type": "number"
              }
            },
            "type": "object"
          }
        ]
      },
      "PromoProgramPost": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PromoProgramCreate"
          },
          {
            "properties": {
              "caseId": {
                "description": "An identifier for an existing case.",
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "description": "Create a promo program"
      },
      "PromoCancelReason": {
        "description": "The cancellation reason.\n\n  `adminError` - the promo program was added by mistake.\n\n  `expired` - the promo expired.\n\n  `disqualified` - the promo was disqualified for various\n  reasons.\n\n  `borrowerOptedOut` - the borrower decided to opt out from the\n  promotional program.\n",
        "enum": [
          "adminError",
          "expired",
          "disqualified",
          "borrowerOptedOut"
        ],
        "type": "string"
      },
      "PromoProgramResult": {
        "properties": {
          "caseId": {
            "description": "An identifier for an existing case.",
            "type": "string"
          },
          "description": {
            "description": "A legal description of the promotional program as it should\nbe communicated and shown to borrowers.\nIf the description is provided, borrowers will see the\ndescription in the Borrower Portal.\n",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "displayName": {
            "description": "The promotional program name as it is shown to borrowers.",
            "readOnly": true,
            "type": "string"
          },
          "disqualifyOverdueDays": {
            "description": "The number of loan overdue days that would disqualify the\npromotional program.\nAny occurrence of `disqualifyOverdueDays` or more of number\ndays overdue during the promotional period would disqualify\n(aka cancel) the promotional program.\n",
            "type": "integer"
          },
          "externalId": {
            "description": "A lender's unique identifier for a specific promotional\nprogram.\n",
            "type": "string"
          },
          "id": {
            "description": "The promotional program's unique identifier.",
            "readOnly": true,
            "type": "string"
          },
          "loanId": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AnyId"
              },
              {
                "description": "The ID of the loan the promo program applies to."
              }
            ]
          },
          "metaData": {
            "description": "Store any type of key/value pairs in the form of a JSON\ndictionary.\n",
            "nullable": true,
            "type": "object"
          },
          "promoCancelReason": {
            "$ref": "#/components/schemas/PromoCancelReason"
          },
          "promoCanceledBy": {
            "$ref": "#/components/schemas/UserActionInfo",
            "description": "Details of the user responsible for canceling the promotion\nprogram.\nCan be an borrower, agent, or automated system process.\n"
          },
          "promoDurationDays": {
            "description": "The promotional program duration as a number of calendar\ndays.\nIf `promoDurationDays` is passed, the system will calculate\nthe `promoEndDate`.\nPass only one of the attributes, `promoEndDate` or\n`promoDurationDays`.\n",
            "type": "integer"
          },
          "promoEffectiveEndDate": {
            "description": "The promotional program effective end-date inclusive of the\n`promoGracePeriodDays`.\nIf the `promoGracePeriodDays` is not passed, the\n`promoEffectiveEndDate` will be equal to the `promoEndDate`.\n",
            "format": "date",
            "readOnly": true,
            "type": "string"
          },
          "promoEndDate": {
            "$ref": "#/components/schemas/PromoEndDate"
          },
          "promoGracePeriodDays": {
            "$ref": "#/components/schemas/PromoGracePeriodDays"
          },
          "promoStartDate": {
            "$ref": "#/components/schemas/PromoStartDate"
          },
          "promoType": {
            "$ref": "#/components/schemas/PromoType"
          },
          "promoTypeId": {
            "description": "The promotional program type's unique identifier.",
            "type": "string"
          },
          "remainingAmountToExercise": {
            "description": "The remaining amount needed to satisfy the Same-As-Cash\npromotion.\nOnly returned if `promoStatus=active`.\n",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "sacExcercisedRateId": {
            "description": "The unique rate ID that was created to set on the loan in\norder to exercise the promotion rate.\n",
            "type": "string"
          },
          "status": {
            "description": "The promotional program status on a specific loan.\n\n  `pending` - the promotion was created but was not\n  activated yet.\n\n  `active` - the promotion is active.\n\n  `canceled` - the promotion has been canceled for a reason.\n  The reason provided in the `promoCancelReason` attribute.\n\n  `exercised` - the promotion was successfully exercised.\n",
            "enum": [
              "pending",
              "active",
              "canceled",
              "exercised"
            ],
            "readOnly": true,
            "type": "string"
          },
          "timestamps": {
            "description": "Timestamps of the transaction statuses.",
            "properties": {
              "activatedAt": {
                "format": "date-time",
                "type": "string"
              },
              "canceledAt": {
                "format": "date-time",
                "type": "string"
              },
              "createdAt": {
                "format": "date-time",
                "type": "string"
              },
              "exercisedAt": {
                "format": "date-time",
                "type": "string"
              },
              "reactivatedAt": {
                "format": "date-time",
                "type": "string"
              }
            },
            "type": "object"
          },
          "totalDeferredInterestAmount": {
            "description": "The total deferred interest amount at the time when promo\nstatus changed from `active` to `canceled` or `exercised`.\n\nWhen the promotion is `canceled` the total deferred interest\nis added to the loan interest and the borrower is expected\nto pay it.\nWhen the promotion is `exercised` the total deferred\ninterest is foregone and the borrower is not expected to pay\nit.\n\nIf the promo status is `active` the value will be empty.\nIf you want to know how much deferred interest was accrued\non an `active` promotion, please use \"Get loan balances\" or\n\"Get draw balances\" endpoints.\n",
            "format": "float",
            "type": "number"
          }
        },
        "type": "object"
      },
      "PromoProgramPutCommon": {
        "properties": {
          "caseId": {
            "description": "An identifier for an existing case.",
            "type": "string"
          },
          "disqualifyOverdueDays": {
            "description": "The number of loan overdue days that would disqualify\nthe promotional program.\nAny occurrence of `disqualifyOverdueDays` or more during\nthe promotional period would disqualify (aka cancel) the\npromotional program.\n",
            "type": "integer"
          },
          "externalId": {
            "description": "A lender's unique identifier for a specific promotional\nprogram.\n",
            "type": "string"
          },
          "metaData": {
            "description": "Store any type of key/value pairs in the form of a JSON\ndictionary.\n",
            "nullable": true,
            "type": "object"
          },
          "promoDurationDays": {
            "description": "The promotional program duration as a number of calendar\ndays.\nIf `promoDurationDays` is passed, the system will\ncalculate the `promoEndDate`.\nPass only one of the attributes, `promoEndDate` or\n`promoDurationDays`.\n",
            "type": "integer"
          },
          "promoEndDate": {
            "$ref": "#/components/schemas/PromoEndDate"
          },
          "promoGracePeriodDays": {
            "$ref": "#/components/schemas/PromoGracePeriodDays"
          },
          "promoStartDate": {
            "$ref": "#/components/schemas/PromoStartDate"
          }
        },
        "type": "object"
      },
      "PromoProgramDeleteResult": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PromoProgramResult"
          },
          {
            "properties": {
              "sendNotice": {
                "default": true,
                "description": "When set to `true` the system will send a\n`promoProgramCanceled` notice to the borrower.\n",
                "type": "boolean"
              }
            },
            "type": "object"
          }
        ]
      },
      "PurchaseExtraInput": {
        "properties": {
          "authorizedAt": {
            "description": "The timestamp when the purchase was `authorized`. This value can be set by lenders at the time of purchase creation.\nIf the value is not set by the lender, it will be populated based on `authorizedAt` (if it is non-null) otherwise `createdAt` for the corresponding `authorizationPurchaseId`.\nIf the value is not set by the lender and no `authorizationPurchaseId` is set, this value corresponds to `purchase.authorized` event.\nIf the purchase was never in `authorized` status and none of the prior conditions are met, this value will be null.\n",
            "format": "date-time",
            "type": "string"
          },
          "effectiveAt": {
            "description": "The effective timestamp when the purchase was applied in the ledger. This attribute can be passed only during the line of credit migration process.\nDon't use this attribute after the migration process was successfully completed.\n\n`effectiveAt` is equal to the timestamp when the purchase is set to `pending` or `settled` status, whichever comes first.\nThe timezone is UTC for this timestamp and the format is ISO. For example, in order to set a purchase `effectiveAt` to July 28th 2022,\n10:44 am PDT, send `2022-07-28T17:44:00Z`.\n",
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PurchaseUpdate": {
        "properties": {
          "amount": {
            "description": "The amount of the purchase.",
            "minimum": 0,
            "type": "number"
          },
          "authorizationPurchaseId": {
            "description": "Peach's unique or lender's external identifier for the authorization purchase. This attribute is used to reference an initial authorization, so\nlenders know which captures (purchase object(s) in Peach) are related to the original authorization.\n",
            "type": "string"
          },
          "authorizedAt": {
            "description": "The timestamp when the purchase was `authorized`.\n",
            "format": "date-time",
            "type": "string"
          },
          "declineReason": {
            "$ref": "#/components/schemas/PurchaseDeclineReason",
            "description": "The reason the purchase was declined"
          },
          "effectiveAt": {
            "description": "The effective timestamp when the purchase was applied in the ledger. `effectiveAt` is equal to the timestamp when the purchase is set to\n`pending` or `settled` status, whichever comes first. Changing the `effectiveAt` via the `Update purchase` endpoint will trigger a replay\nof the line of credit. Keep in mind that an existing statement might've included the purchase based on the existing `effectiveAt` value\nand the interest was accrued based on the existing `effectiveAt`. `effectiveAt` can be updated only if the purchase is in `settled` or `pending` status.\n\nThe timezone is UTC for this timestamp and the format is ISO.\nFor example, in order to set a purchase `effectiveAt` to July 28th 2022, 10:44 am PDT, send `2022-07-28T17:44:00Z`\n",
            "example": "2022-06-10T11:45Z",
            "format": "date-time",
            "type": "string"
          },
          "externalId": {
            "description": "The lender's identifier for the purchase.",
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "type": "object"
          },
          "originalPurchaseId": {
            "description": "Peach's unique or lender's external identifier. Typically used for purchases of type `refund` which allows the lender to\nreference the original purchase being refunded. For authorizations, please see `authorizationPurchaseId` attribute.\n",
            "type": "string"
          },
          "purchaseDate": {
            "description": "The date of a purchase. This attribute can be passed only during the line of credit migration process.\nDon't use this attribute after the migration process was successfully completed.\n\n- The value must be before or equal to today, and cannot be greater than the \"migration at date\" (aka the actual date on which you run the migration.)\n- If you pass `purchaseDate` you cannot pass `authorizedAt` and/or `effectiveAt`.\n- If `purchaseDate` is passed, the system will set `authorizedAt` and `effectiveAt` to `purchaseDate` at 6:00 AM in the product timezone.\n- If you `purchaseDate` is not passed, you must pass both `authorizedAt` and `effectiveAt`. `authorizedAt` cannot be greater than `effectiveAt`.\n\nFor non-migrated purchases:\n- The value is equal to the date part of the `authorizedAt` converted to the product timezone (e.g. Eastern or Pacific).\n  If `authorizedAt` is null, this value is equal to the date part of the purchase's `createdAt` converted to the product timezone.\n\nThe `purchaseDate` is returned in Get endpoints for both migrated and non-migrated purchases.\n",
            "format": "date",
            "type": "string"
          },
          "purchaseDetails": {
            "$ref": "#/components/schemas/PurchaseDetails"
          },
          "status": {
            "$ref": "#/components/schemas/PurchaseStatus"
          }
        },
        "type": "object"
      },
      "PurchaseUpdateInternal": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PurchaseUpdate"
          },
          {
            "properties": {
              "refundDetails": {
                "$ref": "#/components/schemas/InternalRefundDetails"
              }
            },
            "type": "object"
          }
        ]
      },
      "RateCapEndDate": {
        "description": "Rate cap end date in product timezone, inclusive. If null, applies until end of loan/draw.\n",
        "format": "date",
        "nullable": true,
        "type": "string"
      },
      "RateCapStartDate": {
        "description": "Rate cap start date in product timezone, inclusive.",
        "format": "date",
        "type": "string"
      },
      "RateCap": {
        "description": "The Rate Cap object represents the rate caps associated with each loan or draw. \nRate caps apply to both `spread` and `absolute` rate types. If two or more rate \ncaps overlap on the same dates, we will use the lowest value.\n",
        "properties": {
          "createdAt": {
            "description": "When the rate cap was created.",
            "format": "date-time",
            "type": "string"
          },
          "endDate": {
            "$ref": "#/components/schemas/RateCapEndDate"
          },
          "id": {
            "description": "The rate cap identifier.",
            "type": "string"
          },
          "maxRate": {
            "$ref": "#/components/schemas/RateCapMaxRate"
          },
          "rateCapReason": {
            "$ref": "#/components/schemas/RateCapReason"
          },
          "startDate": {
            "$ref": "#/components/schemas/RateCapStartDate"
          },
          "updatedAt": {
            "description": "When the rate cap was last updated.",
            "format": "date-time",
            "type": "string"
          }
        },
        "title": "Rate Cap",
        "type": "object"
      },
      "RateCapAdd": {
        "description": "Request body for adding a new rate cap.",
        "properties": {
          "endDate": {
            "$ref": "#/components/schemas/RateCapEndDate"
          },
          "maxRate": {
            "$ref": "#/components/schemas/RateCapMaxRate"
          },
          "rateCapReason": {
            "$ref": "#/components/schemas/RateCapReason"
          },
          "startDate": {
            "$ref": "#/components/schemas/RateCapStartDate"
          }
        },
        "required": [
          "maxRate",
          "startDate",
          "rateCapReason"
        ],
        "title": "Rate Cap Add",
        "type": "object"
      },
      "RateCapId": {
        "description": "The rate cap identifier.",
        "example": "RC-ABCD-1234",
        "pattern": "^RC-[A-Z0-9]{4}-[A-Z0-9]{4}$",
        "type": "string"
      },
      "RateCapUpdate": {
        "description": "Request body for updating an existing rate cap.",
        "properties": {
          "endDate": {
            "$ref": "#/components/schemas/RateCapEndDate"
          },
          "maxRate": {
            "$ref": "#/components/schemas/RateCapMaxRate"
          },
          "rateCapReason": {
            "$ref": "#/components/schemas/RateCapReason"
          },
          "startDate": {
            "$ref": "#/components/schemas/RateCapStartDate"
          }
        },
        "title": "Rate Cap Update",
        "type": "object"
      },
      "LoanRate": {
        "description": "Loan can have multiple rates. If two or more `interestRate` overlap on the same date we use the lowest value.\nIf two or more `promoRate` overlap on the same date, we take the sum of the promo rates for the given day, and cap this rate at the maximum interest rate for the given day (to avoid accruing negative interest).",
        "properties": {
          "annualRate": {
            "description": "The annual interest or promo rate for the period defined. Format is decimal. For example, 0.01 is 1% annual rate, 0.2 is 20% annual rate.",
            "format": "float",
            "type": "number"
          },
          "endDate": {
            "description": "The rate end date in the product timezone. The end date is inclusive.\nIf `null` then the rate is applicable until the end of the loan.\n",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "description": "Unique identifier of the interest or promo rate.",
            "readOnly": true,
            "type": "string"
          },
          "setAtActivation": {
            "description": "`true` if the rate was set at loan activation. Rates set at activation cannot be removed\nwithout a special permission. Rates set after activation are set as `false` and do not\nrequire a special permission for removal.\n",
            "readOnly": true,
            "type": "boolean"
          },
          "startDate": {
            "description": "The rate start date in the product timezone. The start date is inclusive.",
            "format": "date",
            "type": "string"
          },
          "status": {
            "description": "The status of the rate.\n`active` - the rate is active.\n`inactive` - the rate is inactive as it was removed.\n",
            "enum": [
              "active",
              "inactive"
            ],
            "type": "string"
          },
          "type": {
            "enum": [
              "interestRate",
              "promoRate"
            ],
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "annualRate",
          "startDate"
        ],
        "type": "object"
      },
      "InterestRate": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanRate"
          }
        ],
        "description": "An interest rate on a loan.\n\nThe system will treat the provided value according on the interest type that was set at the time of origination (see `atOrigination.interestType` attribute.)\n\nTo remind, `interestType` can have one of the following values: `absolute` or `spread`.\n\n`absolute` - interest rates defined as `absolute` will use the value as provided in the `annualRate` attribute without adding the Index Interest Rate.\n  - Negative interest `annualRate` value is not allowed.\n  - If the provided `annualRate` is outside of the range defined on the loan type, the system will accept the `annualRate` but will return a warning in the response's object `ratesValidation`.\n\n`spread` - interest rates defined as `spread` will calculate an absolute rate by adding the relative loan rate (aka spread) provided in the\n`annualRate` attribute to the Index Interest Rate effective on the date the interest is accrued. In case the Index Interest Rate is not set,\nthe system will assume that the Index Interest Rate value is zero on the date the interest is accrued.\n  - Negative interest spread `annualRate` value is allowed, but the system will default to zero if the addition of the Index Interest Rate still results in a negative rate.\n  - If the calculated absolute rate, `annualRate` (aka spread) plus Index Interest Rate, is outside of the range defined on the loan type, the system will accept the\n  `annualRate` but will return a warning in the response's object `ratesValidation`.\n",
        "title": "Interest rate"
      },
      "InterestRateResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/InterestRate"
          },
          {
            "properties": {
              "interestType": {
                "default": "absolute",
                "description": "The interest type. The interest type cannot be changed after the loan status changes to `originated` and onward.\nInterest rates defined as `spread` will calculate an absolute rate by adding the relative loan rate (aka spread)\nprovided here to the Index Interest Rate effective on the date the interest is accrued. In case the Index Interest\nRate is not set, the system will assume that the Index Interest Rate value is zero on the date the interest is accrued.\n\nInterest rates defined as `absolute` will use the value as provided here without adding the Index Interest Rate.\n",
                "enum": [
                  "absolute",
                  "spread"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "PromoRate": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoanRate"
          }
        ],
        "description": "A promo rate on a loan. If the annual interest rate is 0.25 and the promo rate for the corresponding\nperiod is 0.05, the net interest rate after application of the promo rate would be 0.2.\n",
        "title": "Promo rate"
      },
      "isEndExistingRatesFlag": {
        "properties": {
          "isEndExistingRates": {
            "default": false,
            "description": "If true, the system will set all existing rates that have `endDate=null` to the new rate's `startDate` minus one calendar day.\nUse this flag carefully as it might impact ALL existing rates. For example:\n\n  - A loan has one existing rate of 0.05 with `startDate=2021-07-01` and `endDate=null`.\n  - A new rate of 0.01 is added with `startDate=2021-08-05` and `isEndExistingRates=true`.\n  - The rate of 0.05 will be updated, and the end date will be set to `endDate=2021-08-04`.\n\nNotes:\n\n  - Only rates with `endDate=null` will be updated. If an existing rate has a defined end date, that rate will not be modified.\n  - If an existing rate has `startDate` equal to the new rate, and `endDate=null`, the system will invalidate the existing rate vs. setting\n    `endDate` to the new rate's `startDate` minus one calendar day. For example:\n\n      - A loan has one existing rate of 0.05 with `startDate=2025-10-02` and `endDate=null`.\n      - A new rate of 0.01 is added with `startDate=2025-10-02` and `isEndExistingRates=true`.\n      - The rate of 0.05 will be invalidated because the `endDate` cannot be `2025-10-01`.\n",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "InterestRateValidationAfterOrig": {
        "properties": {
          "interestRateBelowMinOrZero": {
            "description": "`true` if the interest rate is below the minimum interest rate.\n",
            "readOnly": true,
            "type": "boolean"
          },
          "interestRateExceedsMax": {
            "description": "`true` if the interest rate exceeds the maximum interest rate.\n",
            "readOnly": true,
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "DueDatesRequest": {
        "properties": {
          "agreementDocumentId": {
            "description": "The document descriptor ID corresponding to the accepted loan term change agreement. This is required unless\n`previewMode=true` or `isShowRevisedTermsOnFrequencyChange=false` on the loan type.\n",
            "type": "string"
          },
          "caseId": {
            "description": "An identifier for an existing case.\n",
            "type": "string"
          },
          "dueDatesFrequency": {
            "default": "monthly",
            "description": "The frequency of due dates.",
            "enum": [
              "weekly",
              "everyTwoWeeks",
              "twiceMonthly",
              "monthly",
              "singleTerm"
            ],
            "type": "string"
          },
          "previewMode": {
            "default": false,
            "description": "In `previewMode=true`, the loan doesn't change, and no changes are saved to the database.",
            "type": "boolean"
          },
          "sendNotice": {
            "$ref": "#/components/schemas/SendNoticeCancelAutopay"
          },
          "specificDays": {
            "$ref": "#/components/schemas/SpecificDays"
          }
        },
        "type": "object"
      },
      "LoanFee": {
        "properties": {
          "amount": {
            "description": "The fee amount.",
            "format": "float",
            "type": "number"
          },
          "createdDate": {
            "description": "**DEPRECATED ATTRIBUTE** Use `timestamps.createdAt`.**\n\nThe date on which the fee was created. Fees in scheduled status have `createdDate` but not `dynamicFeeDetails.chargeDate` because\nthey are not yet in the ledger. `originationFee` and `drawFee` are created and charged on the same day. `dynamicFee` can be created\nbut charged later.\n",
            "format": "date",
            "type": "string"
          },
          "dueDate": {
            "description": "The date on which the fee is due.",
            "format": "date",
            "type": "string"
          },
          "dynamicFeeDetails": {
            "description": "Additional details about the fee. This object was historically used for `type=dynamicFee` only, but now it is used for all fee types.\nSome attributes in this object are applicable only to `type=dynamicFee`. Please carefully read the description of each attribute.\n",
            "properties": {
              "apiName": {
                "$ref": "#/components/schemas/FeeApiName"
              },
              "canceledBy": {
                "description": "Identifier of the `User` who canceled the fee.",
                "type": "string"
              },
              "canceledDate": {
                "description": "The date a fee was canceled in the product timezone. `null` indicates an uncanceled fee.\nOnly applicable to `type=dynamicFee` fee.\n",
                "format": "date",
                "type": "string"
              },
              "capitalizedAmount": {
                "description": "The amount of fee that was capitalized. Only applicable to `dynamicFee` fees.\n\nIf the fee `amount` is different from the `originalAmount`, it can happen for a few reasons:\n  1. The fee amount was changed and the loan was replayed. In that case, both `capitalizedAmount` and `creditedAmount` attributes are not used. This is only possible for `originationFee` or `drawFee` fees.\n  2. Part or all of the fee amount was capitalized. In that case, the capitalized amount is represented by the `capitalizedAmount` attribute. This is only possible for `dynamicFee` fees.\n  3. Part or all of the fee amount was \"covered\" by a credit amount (also called `reimbursementAmount`) available on the line of credit. In that case, the credited amount is represented by the `creditedAmount` attribute. This is only possible for `dynamicFee` fees. Only applicable to lines of credit.\n\nFor `dynamicFee`, if `capitalizedAmount` and `creditedAmount` are not `null`, the follow equation should be true:\n`originalAmount - amount = capitalizedAmount + creditedAmount`\n",
                "format": "float",
                "nullable": true,
                "type": "number"
              },
              "caseId": {
                "description": "An identifier for an existing case.",
                "type": "string"
              },
              "chargeDate": {
                "description": "The date a fee was charged to the ledger in the product timezone.",
                "format": "date",
                "type": "string"
              },
              "createdBy": {
                "description": "Identifier of the `User` who created the fee.\nOnly applicable to `type=dynamicFee` fee.\n",
                "type": "string"
              },
              "creditedAmount": {
                "description": "The amount of the fee that was \"covered\" by a credit amount (also called `reimbursementAmount`) available on the line of credit. Only applicable to `dynamicFee` fees.\n\nIf the fee `amount` is different from the `originalAmount`, it can happen for a few reasons:\n  1. The fee amount was changed and the loan was replayed. In that case, both `capitalizedAmount` and `creditedAmount` attributes are not used. This is only possible for `originationFee` or `drawFee` fees.\n  2. Part or all of the fee amount was capitalized. In that case, the capitalized amount will be represented by the `capitalizedAmount` attribute. This is only possible for `dynamicFee` fees.\n  3. Part or all of the fee amount was \"covered\" by a credit amount (also called `reimbursementAmount`) available on the line of credit. In that case, the credited amount will be represented by the `creditedAmount` attribute. Only applicable to lines of credit. This is only possible for `dynamicFee` fees.\n\nFor `dynamicFee`, if `capitalizedAmount` and `creditedAmount` are not `null`, the follow equation should be true:\n`originalAmount - amount = capitalizedAmount + creditedAmount`\n",
                "format": "float",
                "nullable": true,
                "type": "number"
              },
              "displayName": {
                "$ref": "#/components/schemas/FeeDisplayName"
              },
              "loanFeeExternalId": {
                "description": "The lender's external identifier of the loan fee object in the system, can also be used to cancel the fee.\nOnly applicable to `type=dynamicFee` fee.\n",
                "type": "string"
              },
              "loanFeeId": {
                "description": "The identifier of the loan fee in the system, used to cancel a fee if necessary.\nOnly applicable to `type=dynamicFee` fee.\n",
                "type": "string"
              },
              "purchaseId": {
                "description": "The ID of the line of credit draw's purchase; only relevant for the following fee types: `foreignTransactionFee`, `purchaseFee`.\nOnly applicable to `type=dynamicFee` fee.\n",
                "type": "string"
              },
              "transactionId": {
                "description": "The ID of the transaction; only relevant for the following fee types: `nsfFee`. Only applicable to `type=dynamicFee` fee.\n",
                "type": "string"
              }
            },
            "type": "object"
          },
          "loanId": {
            "$ref": "#/components/schemas/AnyId",
            "description": "The identifier of the loan that the fee is charged on."
          },
          "originalAmount": {
            "description": "The original fee amount is calculated as the lower of:\n  - The original fee amount when the fee was charged.\n  - The updated amount if \"Update dynamic fee\" was called and originalAmount was passed. The updated amount cannot be higher than the amount when the fee was charged.\nSometimes fee amounts are adjusted, such as when a borrower pays off the fee before the statement date, as well as when the borrower has an overpayment in the ledger.\n",
            "format": "float",
            "type": "number"
          },
          "scheduledDate": {
            "description": "The date when the fee is expected to be charged. This date is different from the `chargedDate` and `dueDate`.\nThis date should be used only for fees in `status=scheduled`.\n",
            "format": "date",
            "type": "string"
          },
          "status": {
            "description": "- `scheduled` - the fee is expected to be charged in the future.\n- `booked` - the fee was charged and is in the ledger.\n- `modified`- the fee was charged, but the amount might have changed since it was booked.\n- `canceled` - the fee was canceled, and the borrower is no longer expected to pay it.\n",
            "enum": [
              "scheduled",
              "booked",
              "modified",
              "canceled"
            ],
            "type": "string"
          },
          "timestamps": {
            "properties": {
              "createdAt": {
                "description": "The timestamp when the fee was created in the system. Created does not mean booked / charged.\nA fee in `scheduled` status should have `createdAt`, `scheduledDate` and `dueDate`, but not `dynamicFeeDetails.chargeDate`.\nThis is because the fee is not in the ledger yet.\n",
                "format": "date-time",
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": {
            "enum": [
              "originationFee",
              "drawFee",
              "dynamicFee"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "FeesMigrationDetails": {
        "description": "Fees migration related details. This object should be used for lines that are migrated from another system to Peach.\nDon't use it for installment loan migration.\n",
        "properties": {
          "originalDrawId": {
            "description": "The draw identifier. Can be Peach or lender's external identifier.\n\nAll past fees prior to the \"migration cutoff date\" will be posted on the \"migration\" draw. After the \"migration cutoff date\",\na lender can have multiple draws (e.g. Purchases, Cash Withdrawals, etc.). Use this attribute to indicate the original\ndraw ID that the fee was posted on in another system.\n\nIn case of fee cancellation after the \"migration cutoff date\", the `originalDrawId` will be used to adjust the draw balance.\nFees can be posted on the line or draw level. If the `originalDrawId` is empty, the system will assume that the fee was\noriginally charged on the line level.\n",
            "nullable": true,
            "pattern": "^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\\d+$",
            "type": "string"
          },
          "originalPurchaseId": {
            "description": "The purchase identifier. Can be Peach or lender's external identifier. Use this attribute to indicate the original purchase ID\nthat the fee was associated with in another system.\n\nOnly applicable to the following fee types: `foreignTransactionFee`, `purchaseFee`. The `originalPurchaseId` must be provided\nfor those fee types.\n",
            "type": "string"
          },
          "originalTransactionId": {
            "description": "The transaction identifier. Can be Peach or lender's external identifier. Use this attribute to indicate the original\ntransaction ID (in `failed` status) that the fee was associated with in another system.\n\nOnly applicable to the following fee types: `nsfFee`. The `originalTransactionId` must be provided for those fee types.\n",
            "type": "string"
          }
        },
        "type": "object"
      },
      "LoanInvestors": {
        "properties": {
          "effectiveDate": {
            "description": "The date at which this ownership structure came into effect.",
            "format": "date",
            "type": "string"
          },
          "investors": {
            "items": {
              "$ref": "#/components/schemas/LoanInvestor"
            },
            "type": "array"
          }
        },
        "title": "Investors",
        "type": "object"
      },
      "schemas-SendNoticeCancelAutopay": {
        "default": true,
        "description": "When set to `false`, the system will NOT send a `loanPaymentScheduleChanged` notice to the borrower.\n",
        "type": "boolean"
      },
      "LoanChangeLoanTermsSCRAUpdate": {
        "properties": {
          "caseId": {
            "description": "An identifier for an existing case.",
            "type": "string"
          },
          "endDate": {
            "description": "The new end date for the SCRA period. The end date is inclusive.\nMust be within the loan's lifetime, after the start date, and must not overlap with other SCRA plans.\n",
            "format": "date",
            "type": "string"
          },
          "rateId": {
            "description": "The public ID of the SCRA interest rate to modify.",
            "type": "string"
          },
          "sendNotice": {
            "$ref": "#/components/schemas/schemas-SendNoticeCancelAutopay"
          },
          "startDate": {
            "description": "The new start date for the SCRA period. The start date is inclusive.\nMust be within the loan's lifetime and must not overlap with other SCRA plans.\n",
            "format": "date",
            "type": "string"
          }
        },
        "required": [
          "rateId",
          "startDate",
          "endDate"
        ],
        "type": "object"
      },
      "LoanChangeLoanTermsSCRA": {
        "properties": {
          "annualRate": {
            "default": 0.06,
            "description": "The annual interest rate for the period defined. Format is decimal. For example, 0.01 is 1% annual rate, 0.2 is 20% annual rate.",
            "format": "float",
            "type": "number"
          },
          "caseId": {
            "description": "An identifier for an existing case.",
            "type": "string"
          },
          "endDate": {
            "description": "The end date of the period. The end date is inclusive.\n",
            "format": "date",
            "nullable": true,
            "type": "string"
          },
          "isCancelFees": {
            "default": true,
            "description": "When set to `true`, the system will waive any fees that were charged during the period.",
            "type": "boolean"
          },
          "sendNotice": {
            "$ref": "#/components/schemas/schemas-SendNoticeCancelAutopay"
          },
          "startDate": {
            "description": "The start date of the period. The start date is inclusive.\n",
            "format": "date",
            "type": "string"
          }
        },
        "required": [
          "startDate",
          "endDate"
        ],
        "type": "object"
      },
      "BasePastPeriod": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "dueDate": {
                "description": "The period's payment due date.",
                "format": "date",
                "nullable": false,
                "type": "string"
              },
              "endDate": {
                "description": "The period end date. The end date is inclusive.",
                "format": "date",
                "nullable": false,
                "type": "string"
              },
              "gracePeriod": {
                "nullable": true,
                "properties": {
                  "fullBalanceAmount": {
                    "description": "This attribute is only used for grace period benefit logic.\nThis amount is the full statement balance amount (also called \"new balance\") as of the date when the obligation is\n\"sealed\" (aka when `isOpen` is set to `false`).\nLine of credit (and Draw) obligations are \"sealed\" on the statement date.\n",
                    "format": "float",
                    "minimum": 0,
                    "multipleOf": 0.01,
                    "nullable": true,
                    "type": "number"
                  },
                  "fullBalanceMinusOverdueAmount": {
                    "description": "This attribute is only used for grace period benefit logic.\nThis amount is the full statement balance amount (also called \"new balance\") minus any overdue amount as of the\ndate when the obligation is \"sealed\" (aka when `isOpen` is set to `false`). Line of credit (and Draw) obligations are\n\"sealed\" on the statement date.\n",
                    "format": "float",
                    "minimum": 0,
                    "multipleOf": 0.01,
                    "nullable": true,
                    "type": "number"
                  },
                  "isGracePeriodEligible": {
                    "description": "The grace period status of the obligation period.\n`true` - means that the period is/was eligible for the grace period benefit and interest didn't accrue in the period.\n`false` - means that the period was not eligible for the grace period benefit and interest accrued in the period.",
                    "type": "boolean"
                  },
                  "totalFulfilledOnDueDateAmount": {
                    "description": "This value is only used for grace period benefit logic. The value will be set one calendar day after the due date.\nThe amount of the obligation for the period fulfilled by service credits and borrower payments as of the end of the\ndue date. This is a sum of `fulfilledAmount` and `overpaymentsAmount`.\n",
                    "format": "float",
                    "minimum": 0,
                    "multipleOf": 0.01,
                    "nullable": true,
                    "type": "number"
                  }
                },
                "type": "object"
              },
              "startDate": {
                "description": "The period start date. The start date is inclusive.",
                "format": "date",
                "nullable": false,
                "type": "string"
              },
              "statementDate": {
                "description": "The date when a statement for the period was created or should be created in the future.",
                "format": "date",
                "nullable": false,
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "Statement": {
        "properties": {
          "creditBalanceAmount": {
            "description": "The total amount that a lender owes to the borrower.\nNote: Peach system does not allow negative balances. Use `creditBalanceAmount` to represent credit balance owed to the borrower.\n",
            "format": "float",
            "minimum": 0,
            "multipleOf": 0.01,
            "type": "number"
          },
          "documentDescriptorId": {
            "description": "The statement's document descriptor ID.\n",
            "nullable": true,
            "type": "string"
          },
          "minimumAmountDue": {
            "description": "The minimum or recurring amount due for this period (also called obligation). This amount is a sum of interest\naccrued, fees and part of a principal. This amount does not net any payments or service credits made in the period.\n",
            "format": "float",
            "minimum": 0,
            "multipleOf": 0.01,
            "type": "number"
          },
          "newBalanceAmount": {
            "description": "The new balance amount for the period.",
            "format": "float",
            "minimum": 0,
            "multipleOf": 0.01,
            "type": "number"
          }
        },
        "type": "object"
      },
      "PastPeriod": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePastPeriod"
          },
          {
            "properties": {
              "statement": {
                "$ref": "#/components/schemas/Statement"
              }
            },
            "type": "object"
          }
        ]
      },
      "StatementWithRequired": {
        "properties": {
          "creditBalanceAmount": {
            "description": "The total amount that a lender owes to the borrower.\nNote: Peach system does not allow negative balances. Use `creditBalanceAmount` to represent credit balance owed to the borrower.\n",
            "format": "float",
            "minimum": 0,
            "multipleOf": 0.01,
            "type": "number"
          },
          "documentDescriptorId": {
            "description": "The statement's document descriptor ID.\n",
            "nullable": true,
            "type": "string"
          },
          "minimumAmountDue": {
            "description": "The minimum or recurring amount due for this period (also called obligation). This amount is a sum of interest\naccrued, fees and part of a principal. This amount does not net any payments or service credits made in the period.\n",
            "format": "float",
            "minimum": 0,
            "multipleOf": 0.01,
            "type": "number"
          },
          "newBalanceAmount": {
            "description": "The new balance amount for the period.",
            "format": "float",
            "minimum": 0,
            "multipleOf": 0.01,
            "type": "number"
          }
        },
        "required": [
          "minimumAmountDue",
          "newBalanceAmount"
        ],
        "type": "object"
      },
      "PastPeriodWithRequireds": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PastPeriod"
          },
          {
            "properties": {
              "statement": {
                "allOf": [
                  {
                    "type": "object"
                  },
                  {
                    "$ref": "#/components/schemas/StatementWithRequired"
                  }
                ]
              }
            },
            "required": [
              "startDate",
              "endDate",
              "statementDate",
              "dueDate",
              "statement"
            ],
            "type": "object"
          }
        ]
      },
      "TransactionStatusReadOnly": {
        "enum": [
          "scheduled",
          "initiated",
          "pending",
          "succeeded",
          "failed",
          "canceled",
          "inDispute",
          "chargeback"
        ],
        "type": "string"
      },
      "PastTransactionMigrationDetails": {
        "properties": {
          "migration": {
            "description": "Transaction migration related details. This object:\n\n- Can be used only for transactions with an effective date before the \"migration cutoff date\".\n- Can be used for lines that are migrated from another system to Peach. Don't use it for installment loan migration.\n- Allows you to pass details on how a transaction was applied/allocated to draws.\n\nFor example:\n\nLine of credit had three draws prior to the \"migration cutoff date\". Balances of draws were:\n- Draw A: $650\n- Draw B: $70\n- Draw B: $0\n\nA payment of $120 was processed. Using this object you can tell the system that $120 was waterfalled/allocated as following:\n- Draw A split: $70\n- Draw B split: $50\n- Draw A split: $0\n\nIf you don't pass the `migration` object, then you won't be able to make the following status changes after the \"migration cutoff date\":\n`pending` → `failed`\n`succeeded` → `failed`\n",
            "properties": {
              "drawSplitDetails": {
                "description": "The transaction draw level split details are useful if the lender expects failures of previous successful transactions.\nWhen a transaction is applied on the line of credit level, it flows according to the payment waterfall configuration across\nmultiple draws. At least one element in the `drawSplitDetails` array is required.\n",
                "items": {
                  "properties": {
                    "drawAllocatedAmount": {
                      "description": "The portion/split of the transaction `actualAmount` that was applied/allocated to the `originalDrawId` draw. The sum of all\n`drawAllocatedAmount` must be equal to the transaction's `amount`.\n\nIf the transaction fails after the \"migration cutoff date\", the system will increase the applicable \"originalDrawId\" draw's\nnon-due principal balance and replay the line.\n",
                      "format": "float",
                      "type": "number"
                    },
                    "originalDrawId": {
                      "description": "The draw identifier. Can be Peach or lender's external identifier.\n\nAll past transactions prior to the \"migration cutoff date\" will be posted on the \"migration\" draw. After the \"migration cutoff date\",\na lender can have multiple draws (e.g. Purchases, Cash Withdrawals, etc.) Use this attribute to indicate the original draw ID that\nthe transaction was posted on in another system. In case of transaction failure after the \"migration cutoff date\", the `originalDrawId`\nwill be used to increase the draw's \"non-due principal\" balance.\n\nTransactions can be posted on the line or draw level. If the transaction was originally posted on the draw level, choose one of the\npost migration draws (e.g. Purchases).\n",
                      "pattern": "^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\\d+$",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        },
        "title": "Migration details",
        "type": "object"
      },
      "PastTransactionResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Transaction"
          },
          {
            "$ref": "#/components/schemas/PastTransactionMigrationDetails"
          }
        ]
      },
      "PastTransactionsPaging": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NewPaginator"
          },
          {
            "properties": {
              "data": {
                "items": {
                  "$ref": "#/components/schemas/PastTransactionResponse"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ],
        "title": "Past transactions"
      },
      "BaseOneTimePaymentTransaction": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "actualAmount": {
                "description": "The actual amount that was processed. The system never debits\nmore than the loan outstanding balance.\n",
                "readOnly": true,
                "type": "number"
              },
              "amount": {
                "description": "The amount of the payment.\n",
                "format": "float",
                "minimum": 0,
                "type": "number",
                "writeOnly": true
              },
              "createdBy": {
                "description": "Identifier of the user responsible for creating the transaction.\nCan be a borrower, service agent or automated system process (such as Autopay).\n",
                "readOnly": true,
                "type": "integer"
              },
              "customDisplayName": {
                "description": "A friendly description of the transaction. If provided, this value will be displayed in Peach UI/App and Statements \n(or can be used by lender in their App). If the value is not provided, the Peach UI/App and Statements logic will \nrender the transaction name based on type and status. Make sure you provide value that makes sense to the borrower.\nThis is NOT what the borrower will see in their online bank or card account.\n",
                "nullable": true,
                "type": "string"
              },
              "evidenceDocumentId": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AnyId"
                  },
                  {
                    "description": "The document ID of a one-time payment consent screenshot\ncaptured when a borrower made the payment.  Only applicable when\nPeach App is used and company's\n`config.evidence.captureScreenshot=true`.\n"
                  }
                ]
              },
              "externalId": {
                "$ref": "#/components/schemas/externalId",
                "description": "A lender's identifier for a transaction."
              },
              "failureReason": {
                "description": "The transaction failure reason. This value is ignored except when creating an external transaction with `status=failed`",
                "enum": [
                  "insufficientFunds",
                  "chargeback",
                  "accountClosed",
                  "invalidAccount",
                  "unknownReason",
                  "invalidCvv",
                  "invalidExpirationDate",
                  "avsFailed",
                  "networkError",
                  "cardDeclined",
                  "accountFrozen",
                  "deceased",
                  "invalidRouting",
                  "paymentStopped",
                  "incorrectNumber",
                  "fraudulent",
                  "unauthorizedDebit"
                ],
                "type": "string"
              },
              "paymentInstrumentId": {
                "$ref": "#/components/schemas/AnyId",
                "description": "The payment instrument identifier that was charged."
              },
              "scheduledAmount": {
                "description": "The scheduled amount. The actual amount charged can be lower from the\nscheduled amount. It cannot be higher.\n",
                "readOnly": true,
                "type": "number"
              },
              "type": {
                "enum": [
                  "oneTime"
                ],
                "type": "string",
                "writeOnly": true
              }
            },
            "required": [
              "amount",
              "type"
            ],
            "type": "object"
          }
        ],
        "title": "One Time Payment"
      },
      "PastTransactionCreationStatus": {
        "description": "The transaction status. May only be passed when `isExternal=true`.\n\nExternal transactions can be created in: `scheduled`, `initiated`, `pending`, `succeeded`, or `failed`.\nExternal transactions are applied to the loan balance immediately when created with status `initiated`, `pending`, or `succeeded`. Otherwise,\nthey will be applied the first time they are updated to one of these statuses.\n\n`initiated` - payment was initiated and sent to a payment processor. The payment is applied to a loan. This status is used normally for ACH.\n\n`pending` - payment was acknowledged by the payment processor and is being processed. For ACH the payment can be in pending status for a few days.\n\n`succeeded` - payment was completed successfully.\n\n`failed` - payment failed and was removed from the loan effective as of `initiated`, `pending` or `succeeded` status effective date. The system replays the loan as if the payment never happened.\nIt will also re-accrue interest since then.\n\n`inDispute` - payment is in dispute (typically because of chargeback). The payment is removed from the loan effective as of `initiated`, `pending` or `succeeded` status effective date. The system replays the loan as if the payment never happened.\nIt will also re-accrue interest since then. Disputed payment can be for partial amount.\n\n`canceled` - payment or credit was canceled. Payment can be canceled only if the current status is `scheduled`.\n\n`chargeback` - payment was disputed and ruled against the lender. The payment was returned to the original payment instrument. Chargeback payment can be for partial amount.\n",
        "enum": [
          "initiated",
          "pending",
          "succeeded",
          "failed",
          "canceled",
          "inDispute",
          "chargeback"
        ],
        "type": "string"
      },
      "BasePastTransaction": {
        "allOf": [
          {
            "properties": {
              "effectiveDate": {
                "description": "This attribute can be used only during the migration process of loans from another system to Peach. Any value passed for `active` loans will be ignored.\n\nThe effective date of the transaction in the product timezone. Set `effectiveDateTimeInUtc` to `true` to interpret as UTC instead. This attribute can be used for transactions with `isExternal=true` only.\nThe date must be in the past or today. Make sure to provide `effectiveTimeOfDay` also.\n",
                "format": "date",
                "type": "string"
              },
              "effectiveDateTimeInUtc": {
                "default": false,
                "description": "When `true`, `effectiveDate` and `effectiveTimeOfDay` are interpreted as UTC\nrather than the product timezone. This avoids ambiguity during DST transitions.\n",
                "type": "boolean"
              },
              "effectiveTimeOfDay": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/TimeOfDay"
                  },
                  {
                    "description": "The effective time of day on `effectiveDate` in the product timezone. Set `effectiveDateTimeInUtc` to `true` to interpret as UTC instead. This attribute can be used for transactions with `isExternal=true` only. Required if `effectiveDate` is passed.\n\nNote: for migration only, the value must be after 2AM in the product timezone.\n",
                    "type": "object",
                    "writeOnly": true
                  }
                ]
              },
              "paymentInstrumentDetails": {
                "description": "Payment instrument details are only allowed to be passed for migrated lines of credit. This allows you to create transactions\nwithout the need to create a payment instrument object first. If the `paymentInstrumentDetails` is passed, the system will not\nrequire `paymentInstrumentId`. Instead, the system will automatically create a payment instrument behind the scenes.\nThe instrument will be created as `instrumentType=paymentNetwork` and mainly used to be displayed in the Borrower Portal or an\nApp. The instrument cannot be used for any future transactions after the migration.\n",
                "properties": {
                  "accountLastFour": {
                    "description": "The last four digits of the payment instrument, check number, wire number, money order serial number or custom.\n",
                    "maxLength": 4,
                    "minLength": 4,
                    "nullable": true,
                    "type": "string"
                  },
                  "customDisplayName": {
                    "description": "Required only if `instrumentType=custom`. The system will show the payment method as `{customerDisplayName} *{accountLastFour}`.\nThe `customerDisplayName` will be adjusted automatically to uppercase. If the `accountLastFour` is not passed, the system will only\nshow the `{customerDisplayName}`.\n\nExample 1:\n  instrumentType = custom\n  customerDisplayName = Cash\n  accountLastFour = empty\n  Displayed as: `CASH`\n\nExample 2:\n  instrumentType = bankAccount\n  accountLastFour = 8892\n  Displayed as: `BANK ACCOUNT *8892`\n\nExample 3:\n  instrumentType = debitCard\n  accountLastFour = 7098\n  Displayed as: `DEBIT CARD *7098`\n",
                    "nullable": true,
                    "type": "string"
                  },
                  "type": {
                    "description": "The instrument type.",
                    "enum": [
                      "bankAccount",
                      "creditCard",
                      "debitCard",
                      "check",
                      "payroll",
                      "moneyOrder",
                      "wire",
                      "custom"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "effectiveDate",
              "effectiveTimeOfDay"
            ],
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/PastTransactionMigrationDetails"
          }
        ],
        "title": "Base Past Transaction"
      },
      "PastTransactionOneTimePayment": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseOneTimePaymentTransaction"
          },
          {
            "properties": {
              "status": {
                "$ref": "#/components/schemas/PastTransactionCreationStatus"
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/BasePastTransaction"
          }
        ],
        "title": "One Time Payment"
      },
      "BaseServiceCreditTransaction": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "actualAmount": {
                "description": "The actual amount that was processed. The system never debits\nmore than the loan outstanding balance.\n",
                "format": "float",
                "readOnly": true,
                "type": "number"
              },
              "amount": {
                "description": "The amount to credit the borrower's balance.\n",
                "format": "float",
                "minimum": 0,
                "type": "number",
                "writeOnly": true
              },
              "createdBy": {
                "description": "Identifier of the user responsible for creating the transaction.\nCan be a borrower, service agent or automated system process (such as Autopay).\n",
                "readOnly": true,
                "type": "integer"
              },
              "customDisplayName": {
                "description": "A friendly description of the transaction. If provided, this value will be displayed in Peach UI/App and Statements \n(or can be used by lender in their App). If the value is not provided, the Peach UI/App and Statements logic will \nrender the transaction name based on type and status. Make sure you provide value that makes sense to the borrower.\nThis is NOT what the borrower will see in their online bank or card account.\n",
                "nullable": true,
                "type": "string"
              },
              "externalId": {
                "$ref": "#/components/schemas/externalId"
              },
              "scheduledAmount": {
                "description": "The scheduled amount. The actual amount charged can be lower from the\nscheduled amount. It cannot be higher.\n",
                "format": "float",
                "readOnly": true,
                "type": "number"
              },
              "serviceCreditSponsor": {
                "description": "Sponsor of the credit. Mainly used for ledger/accounting.\n\nIf `loanOwner`, the credit is recorded as expense in ledger/accounting.\n\nIf `loanServicer`, the credit is recorded as liability from the servicer.\n\nIf `merchant`, the credit is recorded as liability from the merchant.\n",
                "enum": [
                  "loanOwner",
                  "loanServicer",
                  "merchant"
                ],
                "type": "string"
              },
              "serviceCreditType": {
                "$ref": "#/components/schemas/serviceCreditTypes",
                "description": "Type of the credit. Credit types are recorded differently in ledger/accounting."
              },
              "status": {
                "description": "The transaction status.\n\n`scheduled` - payment or credit was scheduled for a future date that has not arrived yet. The payment has not applied to a loan yet.\n\n`initiated` - payment was initiated and sent to a payment processor. The payment is applied to a loan. This status is used normally for ACH.\n\n`pending` - payment was acknowledged by the payment processor and is being processed. For ACH the payment can be in pending status for a few days.\n\n`succeeded` - payment was completed successfully.\n\n`failed` - payment failed and was removed from the loan effective as of `initiated`, `pending` or `succeeded` status effective date. The system replays the loan as if the payment never happened.\nIt will also re-accrue interest since then.\n\n`inDispute` - payment is in dispute (typically because of chargeback). The payment is removed from the loan effective as of `initiated`, `pending` or `succeeded` status effective date. The system replays the loan as if the payment never happened.\nIt will also re-accrue interest since then. Disputed payment can be for partial amount.\n\n`canceled` - payment or credit was canceled. Payment can be canceled only if the current status is `scheduled`.\n\n`chargeback` - payment was disputed and ruled against the lender. The payment was returned to the original payment instrument. Chargeback payment can be for partial amount.\n",
                "enum": [
                  "scheduled",
                  "initiated",
                  "pending",
                  "succeeded",
                  "failed",
                  "canceled",
                  "inDispute",
                  "chargeback"
                ],
                "readOnly": true,
                "type": "string"
              },
              "timestamps": {
                "description": "Timestamps of the transaction statuses.",
                "properties": {
                  "canceledAt": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "chargebackAt": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "effectiveDate": {
                    "format": "date",
                    "type": "string"
                  },
                  "failedAt": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "inDisputeAt": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "initiatedAt": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "pendingAt": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "scheduledDate": {
                    "format": "date",
                    "type": "string"
                  },
                  "succeededAt": {
                    "format": "date-time",
                    "type": "string"
                  }
                },
                "readOnly": true,
                "type": "object"
              },
              "type": {
                "enum": [
                  "service"
                ],
                "type": "string",
                "writeOnly": true
              }
            },
            "required": [
              "amount",
              "type",
              "serviceCreditType",
              "serviceCreditSponsor"
            ],
            "type": "object"
          }
        ],
        "title": "Service Credit"
      },
      "PastTransactionServiceCredit": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseServiceCreditTransaction"
          },
          {
            "$ref": "#/components/schemas/BasePastTransaction"
          }
        ],
        "title": "Service Credit"
      },
      "BaseDownPaymentTransaction": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "actualAmount": {
                "description": "The actual amount that was processed. The system never debits\nmore than the loan outstanding balance.\n",
                "readOnly": true,
                "type": "number"
              },
              "amount": {
                "description": "The amount of the payment.\n",
                "format": "float",
                "minimum": 0,
                "type": "number",
                "writeOnly": true
              },
              "createdBy": {
                "description": "Identifier of the user responsible for creating the transaction.\nCan be a borrower, service agent or automated system process (such as Autopay).\n",
                "readOnly": true,
                "type": "integer"
              },
              "customDisplayName": {
                "description": "A friendly description of the transaction. If provided, this value will be displayed in Peach UI/App and Statements \n(or can be used by lender in their App). If the value is not provided, the Peach UI/App and Statements logic will \nrender the transaction name based on type and status. Make sure you provide value that makes sense to the borrower.\nThis is NOT what the borrower will see in their online bank or card account.\n",
                "nullable": true,
                "type": "string"
              },
              "externalId": {
                "$ref": "#/components/schemas/externalId",
                "description": "A lender's identifier for a transaction."
              },
              "paymentInstrumentId": {
                "$ref": "#/components/schemas/AnyId",
                "description": "The payment instrument identifier that was charged."
              },
              "scheduledAmount": {
                "description": "The scheduled amount. The actual amount charged can be lower from the\nscheduled amount. It cannot be higher.\n",
                "readOnly": true,
                "type": "number"
              },
              "type": {
                "enum": [
                  "downPayment"
                ],
                "type": "string",
                "writeOnly": true
              }
            },
            "required": [
              "amount",
              "type"
            ],
            "type": "object"
          }
        ],
        "title": "Down Payment"
      },
      "PastTransactionDownPayment": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseDownPaymentTransaction"
          },
          {
            "properties": {
              "status": {
                "$ref": "#/components/schemas/PastTransactionCreationStatus"
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/BasePastTransaction"
          }
        ],
        "title": "Down Payment"
      },
      "PastTransaction": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/PastTransactionOneTimePayment"
          },
          {
            "$ref": "#/components/schemas/PastTransactionServiceCredit"
          },
          {
            "$ref": "#/components/schemas/PastTransactionDownPayment"
          }
        ]
      },
      "BasePastTransactionForUpdate": {
        "allOf": [
          {
            "properties": {
              "effectiveDate": {
                "description": "This attribute can be used only during the migration process of loans from another system to Peach. Any value passed for `active` loans will be ignored.\n\nThe effective date of the transaction in the product timezone. Set `effectiveDateTimeInUtc` to `true` to interpret as UTC instead. This attribute can be used for transactions with `isExternal=true` only.\nThe date must be in the past or today. Make sure to provide `effectiveTimeOfDay` also.\n",
                "format": "date",
                "type": "string"
              },
              "effectiveDateTimeInUtc": {
                "default": false,
                "description": "When `true`, `effectiveDate` and `effectiveTimeOfDay` are interpreted as UTC\nrather than the product timezone. This avoids ambiguity during DST transitions.\n",
                "type": "boolean"
              },
              "effectiveTimeOfDay": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/TimeOfDay"
                  },
                  {
                    "description": "The effective time of day on `effectiveDate` in the product timezone. Set `effectiveDateTimeInUtc` to `true` to interpret as UTC instead. This attribute can be used for transactions with `isExternal=true` only. Required if `effectiveDate` is passed.\n\nNote: for migration only, the value must be after 2AM in the product timezone.\n",
                    "type": "object",
                    "writeOnly": true
                  }
                ]
              },
              "paymentInstrumentDetails": {
                "description": "Payment instrument details are only allowed to be passed for migrated lines of credit. This allows you to create transactions\nwithout the need to create a payment instrument object first. If the `paymentInstrumentDetails` is passed, the system will not\nrequire `paymentInstrumentId`. Instead, the system will automatically create a payment instrument behind the scenes.\nThe instrument will be created as `instrumentType=paymentNetwork` and mainly used to be displayed in the Borrower Portal or an\nApp. The instrument cannot be used for any future transactions after the migration.\n",
                "properties": {
                  "accountLastFour": {
                    "description": "The last four digits of the payment instrument, check number, wire number, money order serial number or custom.\n",
                    "maxLength": 4,
                    "minLength": 4,
                    "nullable": true,
                    "type": "string"
                  },
                  "customDisplayName": {
                    "description": "Required only if `instrumentType=custom`. The system will show the payment method as `{customerDisplayName} *{accountLastFour}`.\nThe `customerDisplayName` will be adjusted automatically to uppercase. If the `accountLastFour` is not passed, the system will only\nshow the `{customerDisplayName}`.\n\nExample 1:\n  instrumentType = custom\n  customerDisplayName = Cash\n  accountLastFour = empty\n  Displayed as: `CASH`\n\nExample 2:\n  instrumentType = bankAccount\n  accountLastFour = 8892\n  Displayed as: `BANK ACCOUNT *8892`\n\nExample 3:\n  instrumentType = debitCard\n  accountLastFour = 7098\n  Displayed as: `DEBIT CARD *7098`\n",
                    "nullable": true,
                    "type": "string"
                  },
                  "type": {
                    "description": "The instrument type.",
                    "enum": [
                      "bankAccount",
                      "creditCard",
                      "debitCard",
                      "check",
                      "payroll",
                      "moneyOrder",
                      "wire",
                      "custom"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/PastTransactionMigrationDetails"
          }
        ],
        "title": "Update Past Transaction"
      },
      "PastTransactionUpdate": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePastTransactionForUpdate"
          },
          {
            "properties": {
              "amount": {
                "description": "The amount of the payment.\n",
                "format": "float",
                "minimum": 0,
                "type": "number"
              },
              "externalId": {
                "$ref": "#/components/schemas/externalId"
              },
              "failureReason": {
                "$ref": "#/components/schemas/TransactionFailureReason"
              },
              "status": {
                "$ref": "#/components/schemas/PastTransactionCreationStatus"
              }
            },
            "type": "object"
          }
        ]
      },
      "LOCMigrationBalances": {
        "description": "The balances passed here should be as of the \"migration cutoff date\" after the most recent statement was generated in your legal system.\n\nFor example:\n- Migration period:\n  - startDate: Aug 1, 2024\n  - endDate: Aug 31, 2024\n  - statementDate: Sep 1, 2024\n  - dueDate: Sep 22, 2024\n- Previous period (also called \"past period\"):\n  - startDate: Jul 1, 2024\n  - endDate: Jul 31, 2024\n  - statementDate: Aug 1, 2024\n  - dueDate: Aug 22, 2024\n- Notes:\n  - The balances should be as of Aug 1, 2024 after the statement was generated on Aug 1, 2024.\n",
        "properties": {
          "creditLimitAmount": {
            "description": "The line credit limit amount as of the \"migration cutoff date\".\n",
            "format": "float",
            "minimum": 0,
            "multipleOf": 0.01,
            "type": "number"
          },
          "dueBalances": {
            "description": "Due balances represent balances that are currently due.\nOnly fees can be passed inside the balance objects on LOC level.\nAll other balances are expected to be passed in the `Create migration period draw data` endpoint.\n",
            "properties": {
              "dueLateFeesAmount": {
                "description": "The late fees portion of `dueFeesAmount`.",
                "format": "float",
                "minimum": 0,
                "multipleOf": 0.01,
                "type": "number"
              },
              "dueOriginationFeesAmount": {
                "description": "The origination fees portion of `dueFeesAmount`.",
                "format": "float",
                "minimum": 0,
                "multipleOf": 0.01,
                "type": "number"
              }
            },
            "required": [
              "dueOriginationFeesAmount",
              "dueLateFeesAmount"
            ],
            "type": "object"
          },
          "nonDueBalances": {
            "description": "Non-due balances represent balances that are not yet due.\nOnly fees can be passed inside the balance objects on LOC level.\nAll other balances are expected to be passed in the `Create migration period draw data` endpoint.\n",
            "properties": {
              "nonDueLateFeesAmount": {
                "description": "The late fees portion of `nonDueFeesAmount`.",
                "format": "float",
                "minimum": 0,
                "multipleOf": 0.01,
                "type": "number"
              },
              "nonDueOriginationFeesAmount": {
                "description": "The origination fees portion of `nonDueFeesAmount`.",
                "format": "float",
                "minimum": 0,
                "multipleOf": 0.01,
                "type": "number"
              }
            },
            "required": [
              "nonDueOriginationFeesAmount",
              "nonDueLateFeesAmount"
            ],
            "type": "object"
          },
          "overdueBalances": {
            "description": "Overdue balances represent balances that are overdue.\nOnly fees can be passed inside the balance objects on LOC level.\nAll other balances are expected to be passed in the `Create migration period draw data` endpoint.\n",
            "properties": {
              "overdueLateFeesAmount": {
                "description": "The late fees portion of `overdueFeesAmount`.",
                "format": "float",
                "minimum": 0,
                "multipleOf": 0.01,
                "type": "number"
              },
              "overdueOriginationFeesAmount": {
                "description": "The origination fees portion of `overdueFeesAmount`.",
                "format": "float",
                "minimum": 0,
                "multipleOf": 0.01,
                "type": "number"
              }
            },
            "required": [
              "overdueOriginationFeesAmount",
              "overdueLateFeesAmount"
            ],
            "type": "object"
          },
          "reimbursementAmount": {
            "description": "The total amount that a lender owes to the borrower as of the \"migration cutoff date\".\n",
            "format": "float",
            "minimum": 0,
            "multipleOf": 0.01,
            "type": "number"
          }
        },
        "required": [
          "nonDueBalances",
          "dueBalances",
          "overdueBalances",
          "creditLimitAmount",
          "reimbursementAmount"
        ],
        "type": "object"
      },
      "LOCMigrationGracePeriod": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMigrationGracePeriod"
          },
          {
            "description": "If you are not migrating past periods and the migration period is the first period of the LOC:\n\nDon't pass the `gracePeriod` object.\n\nIf you are migrating past periods:\n\nThis is the entire LOC grace period details including all its draws.\n\nThe grace period data passed here corresponds to the previous period and not to the migration period. By the time you call this endpoint, you should have already created one or more past periods. The additional data that you pass here is only required for the previous period and not for all past periods. That's why the grace period data is part of the \"Create migration period LOC data\" vs \"Create past periods data\" endpoint.\n\nThe migration period is a \"live\" period in which you execute migration.\n  - Because the Peach system needs to know if the LOC is eligible for the grace period benefit when the migration period starts, the system\n    will use the `isGracePeriodEligible` passed here. If you pass `isGracePeriodEligible=true`, the system will start migration without\n    accruing interest in the \"migration period\". If you pass `isGracePeriodEligible=false`, the system will start migration with accruing\n    interest in the \"migration period\".\n  - On the \"due date + 1\" within the \"migration period\", the system evaluates the grace eligibility based on `fullBalanceAmount`, `fullBalanceMinusOverdueAmount` and payments made.\n  - If you migrate the LOC before the upcoming \"due date\", the system will evaluate the grace period eligibility in \"live\" and might revoke the benefit.\n  - If you migrate the LOC after the \"due date\", the system will evaluate the grace period eligibility as part of the \"replay/migration\" process.\n    Because of existing limitations with \"replay\", grace period eligibility cannot be revoked as part of the replay process. However, the replay\n    process can reinstate the grace period benefit (in other words, waive accrued interest from the start of the \"migration period\").\n  - Peach is responsible for generating the statement corresponding to the migration period on `migrationPeriod.statementDate` in the future.\n    The grace period details of the migration period will be calculated by the Peach system on `migrationPeriod.statementDate` in the future.\n\nFor example:\n- Migration period:\n  - startDate: Aug 1, 2024\n  - endDate: Aug 31, 2024\n  - statementDate: Sep 1, 2024\n  - dueDate: Sep 22, 2024\n- Previous period (also called \"past period\"):\n  - startDate: Jul 1, 2024\n  - endDate: Jul 31, 2024\n  - statementDate: Aug 1, 2024\n  - dueDate: Aug 22, 2024\nNotes:\n  - The grace period details that you need to pass correspond to the previous period that started on Jul 1, 2024 and ended on Jul 31, 2024.\n  - The amounts and values should be as of the \"migration cutoff date\", Aug 1, 2024, after the statement was finalized in your legacy system.\n",
            "type": "object"
          }
        ]
      },
      "MigrationPeriod": {
        "description": "The migration period.\nThe \"migration cutoff date\" will be set to the `startDate` passed here. It's important to understand that `migrationPeriod.statementDate` and `migrationPeriod.dueDate` are future dates. The previous period's `dueDate` is also a future date (relative to when you execute the migration) and falls in the \"migration period\".\n\nFor example:\n- Migration period:\n  - startDate: Aug 1, 2024\n  - endDate: Aug 31, 2024\n  - statementDate: Sep 1, 2024\n  - dueDate: Sep 22, 2024\n- Previous period (also called \"past period\"):\n  - startDate: Jul 1, 2024\n  - endDate: Jul 31, 2024\n  - statementDate: Aug 1, 2024\n  - dueDate: Aug 22, 2024\nNotes:\n  - \"Migration cutoff date\" is Aug 1, 2024.\n  - If you execute the migration on Aug 10, 2024, the \"migration at date\" is Aug 10.\n  - Previous period's `dueDate`, Aug 22, 2024, falls in the \"migration period\" that starts on Aug 1, 2024 and ends on Aug 31, 2024.\n  - The upcoming due date is Aug 22, 2024.\n  - If you didn't complete the migration before Aug 22, 2024, you need to cancel the loan and start the process again.\n",
        "properties": {
          "dueDate": {
            "format": "date",
            "nullable": false,
            "type": "string"
          },
          "endDate": {
            "format": "date",
            "nullable": false,
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "string"
          },
          "object": {
            "default": "loanPeriod",
            "enum": [
              "loanPeriod"
            ],
            "readOnly": true,
            "type": "string"
          },
          "startDate": {
            "format": "date",
            "nullable": false,
            "type": "string"
          },
          "statementDate": {
            "format": "date",
            "nullable": false,
            "type": "string"
          }
        },
        "required": [
          "startDate",
          "endDate",
          "statementDate",
          "dueDate"
        ],
        "type": "object"
      },
      "LOCMigrationObligation": {
        "allOf": [
          {
            "description": "If you are not migrating past periods and the migration period is the first period of the LOC:\n\nDon't pass the `obligation` object.\n\nIf you are migrating past periods:\n\nThis is the LOC level obligation details only (excluding any draws).\n\nThe data passed here corresponds to the previous period and not to the migration period. By the time you call this endpoint, you should've already created one or more past periods. The additional data that you pass here is only required for the previous period and not for all past periods. That's why the additional obligation data is part of the \"Create migration period LOC data\" vs \"Create past periods data\" endpoint.\n\nTo remind, the migration period is a \"live\" period in which you execute migration. The obligation details of the migration period will be calculated by the Peach system. Peach is also responsible for generating the statement corresponding to the migration period on `migrationPeriod.statementDate` in the future.\n\nFor example:\n  - Migration period:\n    - startDate: Aug 1, 2024\n    - endDate: Aug 31, 2024\n    - statementDate: Sep 1, 2024\n    - dueDate: Sep 22, 2024\n  - Previous period (also called \"past period\"):\n    - startDate: Jul 1, 2024\n    - endDate: Jul 31, 2024\n    - statementDate: Aug 1, 2024\n    - dueDate: Aug 22, 2024\n  - Notes:\n    - The obligation details that you need to pass correspond to the previous period that started on Jul 1, 2024 and ended on Jul 31, 2024.\n    - The amounts and other values should be as of the \"migration cutoff date\", Aug 1, 2024, after the statement was finalized in your legacy system.\n",
            "properties": {
              "migratedDaysOverdue": {
                "$ref": "#/components/schemas/MigratedDaysOverdue"
              },
              "migratedOverdueFromDate": {
                "description": "The date from which the account is overdue at the time of migration. This attribute will also\nbe used to calculate \"Date Of First Delinquency\" for credit bureaus reporting.\n\nIf `migratedDaysOverdue > 0`, then `migratedOverdueFromDate` is required.\n",
                "format": "date",
                "nullable": true,
                "type": "string"
              },
              "obligationAmount": {
                "description": "The remaining amount of the previous period's obligation that a borrower needs to pay on the due date that comes after \"migration cutoff date\". The remaining amount should be as of \"migration cutoff date\" vs. \"migration at date\".\n\nThis is the LOC level remaining obligation amount excluding any draws' obligation amounts. Only fees can be passed inside the balance objects on LOC level. All other balances are expected to be passed in the `Create migration period draw data` endpoint.\n\nIf your LOC (or credit card) product doesn't count payments that were made before the statement date towards the statement minimum amount, then `obligationAmount` must be always equal to the LOC level portion of the whole statement minimum amount.\n\nExample:\n  - Migration period:\n    - startDate: Aug 1, 2024\n    - endDate: Aug 31, 2024\n    - statementDate: Sep 1, 2024\n    - dueDate: Sep 22, 2024\n  - Previous period (also called \"past period\"):\n    - startDate: Jul 1, 2024\n    - endDate: Jul 31, 2024\n    - statementDate: Aug 1, 2024\n    - dueDate: Aug 22, 2024\n\nScenario 1:\n  - A late fee of $15 was charged in the previous period on Jul 23, 2024 (on the LOC level). This fee is due on Aug 22, 2024. \n  - A borrower made some payments in the previous period, and based on your waterfall configuration in the legacy system, $5 out of $15 of the late fee was paid.\n  - The remaining fee amount of $10 is due on Aug 22, 2024.\n  - You should pass `obligationAmount=10`.\n\nScenario 2:\n  - A late fee of $15 was charged in the previous period on Jul 23, 2024 (on LOC level). This fee is due on Aug 22, 2024. \n  - A borrower made some payments in the previous period, and based on your waterfall configuration in the legacy system, none of the payments were counted toward the $15 late fee.\n  - The late fee amount of $15 is due on Aug 22, 2024.\n  - You should pass `obligationAmount=15`.\n\nScenario 3:\n  - A late fee of $15 was charged in the previous period on Jul 23, 2024 (on LOC level). This fee is due on Aug 22, 2024. \n  - A borrower made early payments in the previous period, and based on your waterfall configuration in the legacy system, the payments were counted toward the $15 late fee.\n  - The remaining fee amount of $0 is due on Aug 22, 2024 (in other words, the borrower doesn't need to pay anything on Aug 22, 2024.)\n  - You should pass `obligationAmount=0`.\n",
                "format": "float",
                "minimum": 0,
                "multipleOf": 0.01,
                "nullable": false,
                "type": "number"
              }
            },
            "required": [
              "obligationAmount",
              "migratedDaysOverdue"
            ],
            "type": "object"
          }
        ]
      },
      "MigrationPeriodLOCData": {
        "properties": {
          "balances": {
            "$ref": "#/components/schemas/LOCMigrationBalances"
          },
          "gracePeriod": {
            "$ref": "#/components/schemas/LOCMigrationGracePeriod"
          },
          "migrationPeriod": {
            "$ref": "#/components/schemas/MigrationPeriod"
          },
          "obligation": {
            "$ref": "#/components/schemas/LOCMigrationObligation"
          },
          "postMigrationLoanChargedOffReason": {
            "description": "The reason for the line charge off. Only required if `migrationStatus=chargedOff`.\n- `term` means the loan was charged off per loan type configuration after X days overdue.\n- `fraudulent` means the loan was charged off for a fraudulent reason.\n- `bankruptcy` means the loan was charged off because of bankruptcy.\n- `legal` means the loan was charged off because of some legal reason.\n",
            "enum": [
              "term",
              "fraudulent",
              "bankruptcy",
              "legal"
            ],
            "nullable": true,
            "type": "string"
          },
          "postMigrationLoanStatus": {
            "default": "active",
            "description": "The status of the line after a successful migration.\nIf you pass `accelerated` or `chargedOff`, the system will first migrate the line as \"active\" and then\nimmediately accelerate or charge off the line and its draws. The `effectiveDate` of the acceleration\nor charge off will be equal to the \"migration cutoff date\".\n",
            "enum": [
              "active",
              "accelerated",
              "chargedOff"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "MigrationPeriodLOCDataResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SingletonResponse"
          },
          {
            "properties": {
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MigrationPeriodLOCData"
                  },
                  {
                    "properties": {
                      "migratedOverdueAmount": {
                        "format": "float",
                        "nullable": true,
                        "type": "number"
                      }
                    },
                    "type": "object"
                  }
                ]
              }
            },
            "type": "object"
          }
        ]
      },
      "MigrationPeriodLOCDataWithRequired": {
        "allOf": [
          {
            "$ref": "#/components/schemas/MigrationPeriodLOCData"
          },
          {
            "required": [
              "migrationPeriod",
              "obligation",
              "gracePeriod",
              "balances"
            ],
            "type": "object"
          }
        ]
      },
      "ObligationLoanGracePeriod": {
        "description": "Loan's grace period details. Only Loans created with `isGracePeriodEligible=true` will populate details in this object.\nSee `gracePeriod` object for Draw-specific grace period details.\n",
        "nullable": true,
        "properties": {
          "fullBalanceAmount": {
            "description": "This attribute is only used for grace period benefit logic.\nThis amount is the full statement balance amount (also called \"new balance\") as of the date when the obligation is\n\"sealed\" (aka when `isOpen` is set to `false`).\nLine of credit (and Draw) obligations are \"sealed\" on the statement date.\n",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "fullBalanceMinusOverdueAmount": {
            "description": "This attribute is only used for grace period benefit logic.\nThis amount is the full statement balance amount (also called \"new balance\") minus any overdue amount as of the\ndate when the obligation is \"sealed\" (aka when `isOpen` is set to `false`). Line of credit (and Draw) obligations are\n\"sealed\" on the statement date.\n",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "isGracePeriodEligible": {
            "description": "The grace period status of the obligation period.\n`true` - means that the period is/was eligible for the grace period benefit and interest didn't accrue in the period.\n`false` - means that the period was not eligible for the grace period benefit and interest accrued in the period.",
            "type": "boolean"
          },
          "totalFulfilledOnDueDateAmount": {
            "description": "This value is only used for grace period benefit logic. The value will be set one calendar day after the due date.\nThe amount of the obligation for the period fulfilled by service credits and borrower payments as of the end of the\ndue date. This is a sum of `fulfilledAmount` and `overpaymentsAmount`.\n",
            "format": "float",
            "nullable": true,
            "type": "number"
          }
        },
        "type": "object"
      },
      "LOCObligationResult": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "$ref": "#/components/schemas/ObligationAmountFields"
          },
          {
            "$ref": "#/components/schemas/ObligationOtherFields"
          },
          {
            "properties": {
              "gracePeriod": {
                "anyOf": [
                  {
                    "description": "Draws' grace period details. Only draws that were created with `isGracePeriodEligible=true` will be included in the list.\n",
                    "items": {
                      "allOf": [
                        {
                          "properties": {
                            "drawId": {
                              "description": "The draw identifier.",
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        {
                          "$ref": "#/components/schemas/ObligationGracePeriod"
                        }
                      ]
                    },
                    "nullable": true,
                    "type": "array"
                  },
                  {
                    "$ref": "#/components/schemas/ObligationGracePeriod"
                  }
                ]
              },
              "loanGracePeriod": {
                "$ref": "#/components/schemas/ObligationLoanGracePeriod"
              }
            },
            "type": "object"
          }
        ]
      },
      "LOCObligationsResult": {
        "allOf": [
          {
            "$ref": "#/components/schemas/IsLocked"
          },
          {
            "properties": {
              "daysOverdue": {
                "description": "Number of calendar days overdue starting from the due date of the earliest overdue obligation to\nthe current date.\n",
                "type": "integer"
              },
              "isOverdue": {
                "description": "`true` if the borrower has any obligation overdue on the loan.\n",
                "type": "boolean"
              },
              "obligations": {
                "items": {
                  "$ref": "#/components/schemas/LOCObligationResult"
                },
                "type": "array"
              },
              "overdueAmount": {
                "description": "The total overdue amount across all obligations on the loan.\n",
                "format": "float",
                "type": "number"
              }
            },
            "type": "object"
          }
        ]
      },
      "LoanChangeLoanTerms": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DueDatesRequest"
          },
          {
            "properties": {
              "duration": {
                "description": "The remaining duration - in months starting from the current day - under the new payment plan.\n",
                "type": "integer"
              },
              "recurringAmount": {
                "description": "The requested recurring amount under the new payment plan.\n",
                "format": "float",
                "type": "number"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/CaseId"
          }
        ]
      },
      "LoanPeriod": {
        "properties": {
          "dueDate": {
            "description": "The period's payment due date in the product timezone.",
            "format": "date",
            "type": "string"
          },
          "endDate": {
            "description": "The period end date in the product timezone. The end date is inclusive.",
            "format": "date",
            "type": "string"
          },
          "id": {
            "description": "The period identifier.",
            "type": "string"
          },
          "startDate": {
            "description": "The period start date in the product timezone. The start date is inclusive.",
            "format": "date",
            "type": "string"
          },
          "statementDate": {
            "description": "The date when a statement for the period was created or should be created in the future.",
            "format": "date",
            "type": "string"
          }
        },
        "type": "object"
      },
      "LoanPeriodsPaging": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/LoanPeriod"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ProcessingCompleteGeneric": {
        "properties": {
          "processingComplete": {
            "description": "Only returned when query parameter `sync` is set to `true`. Indicates if the extra processing has finished yet.\nIf it is not done in 20 seconds, the request will return and this value will be set to `false`.\n",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "StatementSharedFields": {
        "properties": {
          "billingCycleEndDate": {
            "description": "The end date of the statement billing cycle. This date is in the product timezone.",
            "format": "date",
            "type": "string"
          },
          "billingCycleStartDate": {
            "description": "The start date of the statement billing cycle. This date is in the product timezone.",
            "format": "date",
            "type": "string"
          },
          "documentDescriptorId": {
            "description": "The statement's document descriptor ID. To get the actual document, use the \"Download document content\" endpoint.\n",
            "type": "string"
          },
          "isExternal": {
            "description": "If `true`, it means that the statement was originally calculated and created in another system (not in Peach) and\nuploaded to the Peach system. Statements with `isExternal=true` might not have all statement details data.\nYou must upload a PDF version of the statement. Statements that are marked as `isExternal=true` cannot\nbe regenerated by Peach. The system will return an error if the regenerate statement endpoint\nis called for a statement with `isExternal=true` value.\n\nIf `false`, it means that the statement was originally calculated and created by the Peach system.\n\nUsed in Line of Credit migration.\n",
            "readOnly": true,
            "type": "boolean"
          },
          "minimumDueAmount": {
            "description": "The minimum or recurring amount due for this period (also called obligation). This amount is a sum of interest accrued,\nfees and part of a principal. This amount does not net any payments or service credits made in the period.\n\nIf `loanType.statements.includeOverdueAmountInMinPayment` = `true`, the minimum payment calculation will include\nthe minimum amount calculated for the closed period and overdue amount from previous periods.\n",
            "format": "float",
            "type": "number"
          },
          "newBalanceAmount": {
            "description": "The new balance amount for the period.",
            "format": "float",
            "type": "number"
          },
          "paymentDueDate": {
            "description": "The due date of the statement. This date is in the product timezone.",
            "format": "date",
            "type": "string"
          },
          "periodId": {
            "description": "The period identifier.",
            "type": "string"
          },
          "reason": {
            "description": "If this statement was regenerated due to replay, the replay reason supplied by the user.",
            "nullable": true,
            "type": "string"
          },
          "replayId": {
            "description": "If this statement was regenerated due to replay, the ID of the replay.",
            "nullable": true,
            "type": "string"
          },
          "statementDate": {
            "description": "The statement date. This date is in the product timezone.",
            "format": "date",
            "type": "string"
          },
          "statementLogicVersion": {
            "default": 3,
            "description": "The statement logic version. When a new statement is generated, it will use the current loan type `statementLogicVersion` value.\nThat version is also stored on each statement object. When/if the statement is regenerated, it will use the\n`statementLogicVersion` value from the statement object vs. loan type. This guarantees that the system uses the same\nlogic as the original statement.\n\n- Version `1` - first/original statement logic. All loan types created before the release of the version `3`, would be set to `1`. When a lender is ready, they can ask Peach to upgrade to version `3`. All statements that were generated before the release of version `3` would be marked as version `1` or `2`.\n- Version `2` - second statement logic that was introduced in Q2 2024. This is a deprecated version and should not be used.\n- Version `3` - third statement logic that was introduced in Q4 2024.\n",
            "type": "integer"
          },
          "userId": {
            "description": "If this statement was regenerated due to replay, the ID of the user that initiated the replay.",
            "nullable": true,
            "type": "string"
          },
          "version": {
            "description": "The version of the statement. When a statement is updated, we don't delete the old version.\nWe create a new version of the statement. The most recent version of the statement is returned.\n",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "schemas-Statement": {
        "allOf": [
          {
            "properties": {
              "createdAt": {
                "description": "The timestamp (UTC) of when the statement was created.",
                "format": "date-time",
                "readOnly": true,
                "type": "string"
              },
              "deletedAt": {
                "description": "The timestamp (UTC) of when the statement was deleted.\n",
                "format": "date-time",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "id": {
                "description": "The statement's unique identifier.",
                "readOnly": true,
                "type": "string"
              },
              "updatedAt": {
                "description": "The timestamp (UTC) of when the statement was updated. On update, the system will create a new version of the statement.\n",
                "format": "date-time",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/StatementSharedFields"
          }
        ]
      },
      "RequestStartDate": {
        "description": "The start date of the promise to pay plan. If `startDate` is not provided upon promise to pay plan creation,\nthe system will use the created date (i.e. \"today\") as the `startDate`. If `startDate` is provided, it must be a date in the future.\nNotes:\n- If you are providing a `schedule` object, you should not pass the `startDate`. In case both are provided in the \n  request, a `400 Bad Request error` will be returned.\n- If Peach's system creates the schedule based on `frequency`,`specificDays` and `duration` passed, the system will \n  schedule Promise to Pay Periods starting after the `startDate`.\n",
        "format": "date",
        "type": "string"
      },
      "PromiseToPayPlanPost": {
        "properties": {
          "amount": {
            "description": "Amount required to be fulfilled for each period of the promise to pay plan. Peach's system will use the amount\nprovided to trigger any required promise `status` transitions.\n\nNote: \n- If `amount` is passed to the endpoint, ensure that `frequency` and `duration` are also provided.\n- If you are providing an `amount` object, you should not pass the `schedule`. In case both are provided in the \n  request, a `400 Bad Request error` will be returned.\n",
            "format": "float",
            "minimum": 0.01,
            "type": "number"
          },
          "caseId": {
            "description": "The ID of the case associated with the promise to pay plan.",
            "nullable": true,
            "type": "string"
          },
          "duration": {
            "description": "The duration of the promise to pay plan as a number of `frequency` periods. For example:\nif `frequency=weekly` and `duration=6`, the promise will be created with 6 weeks duration and will have 6 \nperiods all with the same amount.\n\nNote: \n- If `duration` is passed to the endpoint, ensure that `frequency` and `amount` are also provided.\n- If you are providing a `duration` object, you should not pass the `schedule`. In case both are provided in the \n  request, a `400 Bad Request error` will be returned.\n",
            "minimum": 1,
            "type": "integer"
          },
          "externalId": {
            "$ref": "#/components/schemas/ExternalId"
          },
          "frequency": {
            "description": "The agreed payment frequency of the promise. Peach's system will use the desired frequency to create promise to pay period(s) so the lender can monitor progress against promised payment dates and amount paid. \n`weekly`, `everyTwoWeeks`, `twiceMonthly`, and `monthly` options create multiple promise to pay periods, according to the `duration`.\n`singleTerm` creates a promise with a single period and desired duration of X calendar days or a specific date that should be passed in `specificDays`. \n\nNote: \n- If `frequency` is passed to the endpoint, ensure that `duration` and `amount` are also provided.\n- If you are providing a `frequency` object, you should not pass the `schedule`. In case both are provided in the \n  request, a `400 Bad Request error` will be returned.\n",
            "enum": [
              "weekly",
              "everyTwoWeeks",
              "twiceMonthly",
              "monthly",
              "singleTerm"
            ],
            "type": "string"
          },
          "previewMode": {
            "default": false,
            "description": "In `previewMode=true`, the Promise to Pay Plan and corresponding Promise Period Objects will be\nreturned for preview without committing the object to database\n",
            "type": "boolean"
          },
          "schedule": {
            "description": "To create a custom promise to pay schedule with varying amounts or irregular periods, pass a `schedule` when \ncreating the promise to pay plan. \nNote:\nEither `schedule` object or schedule descriptor attributes (`startDate`, `frequency`, `specificDays` \n, 'duration' and 'amount') can be passed to create a promise to pay plan. In case both are provided in the \nrequest, a `400 Bad Request error` will be returned.\n",
            "items": {
              "properties": {
                "amount": {
                  "description": "The promised amount.\n",
                  "format": "float",
                  "minimum": 0.01,
                  "type": "number"
                },
                "dueDate": {
                  "description": "The due date of the promised amount.\n",
                  "format": "date",
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "sendNotice": {
            "default": true,
            "description": "When set to `true`, Peach's system will send a notice to the borrower about the promise to pay plan.\nNote: If `sendNotice` is not passed, the system will default to `true`.\n",
            "type": "boolean"
          },
          "specificDays": {
            "description": "Specific days designate the day(s) that due dates will fall on. The allowed values for specific\nday(s) depends on the `paymentFrequency`.\n\n`weekly` - provide one number in the valid range 1-7. 1=Monday...7=Sunday.\n\nFor example: [1].\n\n`everyTwoWeeks` - provide two inputs. The first input (required) is an integer in the valid range 1-7. 1=Monday...7=Sunday.\n\nThe second input is a date that indicates when to start the cycle. If the second input is not passed, the system will default\nto the first valid start date based on the first input (the day of week passed in). If this date is provided then it can override\nthe minimum due date gap specified on the loan type.\n\nFor example: [1, \"2020-09-16\"].\n\n`twiceMonthly` - provide two numbers in the valid range 1-31. 1=first day of a month. Use 31 to\nindicate the last day of a month.\n\nFor example: [1, 15] or [15, 31].\n\n`monthly` - provide one number in the valid range 1-31. 1=first day of a month. Use 31 to indicate\nthe last day of a month.\n\nFor example: [1].\n\n`singleTerm` - provide one number to indicate duration as a number of calendar days or provide a valid calendar date in the\nfuture. For example: [90] or [\"2020-09-16\"].\n\nFor `weekly`, `everyTwoWeeks`, `twiceMonthly`, `monthly`:\nIf specificDays is left null, then the system will calculate due dates according to the paymentFrequency relative\nto the origination or activation date (or use existing specific days in the case of change due date).\n\nFor `singleTerm`:\nThe specificDays is mandatory.\n",
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "nullable": true,
            "type": "array"
          },
          "startDate": {
            "$ref": "#/components/schemas/RequestStartDate"
          }
        },
        "type": "object"
      },
      "PromiseToPayPlanCancel": {
        "properties": {
          "cancellationCaseId": {
            "description": "The case to associate with this promise to pay plan cancellation.",
            "nullable": true,
            "type": "string"
          },
          "cancellationReason": {
            "description": "The reason for canceling the promise to pay plan.\n\n`canceledByUser` - Promise to pay plan was canceled by an agent or borrower.\n`loanChargedOff` - loan was charged off during the promise period.\n`loanAccelerated` - loan was accelerated during the promise period.\n`otherPromisePlanOffered` - another promise plan was offered.\n`other` - for any other reason requiring cancellation.\n",
            "enum": [
              "canceledByUser",
              "loanChargedOff",
              "loanAccelerated",
              "otherPromisePlanOffered",
              "other"
            ],
            "type": "string"
          },
          "reasonDetails": {
            "description": "Additional details about the reason for canceling the promise to pay plan.\n",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "cancellationReason"
        ],
        "type": "object"
      },
      "PromoProgramPaging": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Paging"
          },
          {
            "properties": {
              "data": {
                "allOf": [
                  {
                    "properties": {
                      "promoPrograms": {
                        "items": {
                          "$ref": "#/components/schemas/PromoProgramResult"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  }
                ]
              }
            },
            "type": "object"
          }
        ]
      },
      "PromoProgramPut": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PromoProgramPutCommon"
          },
          {
            "properties": {
              "status": {
                "description": "The promotional program status on a specific loan.\n\n  `pending` - the promotion was created but was not\n  activated yet.\n\n  `active` - the promotion is active.\n\n  `canceled` - the promotion has been canceled for a\n  reason. The reason provided in the `promoCancelReason`\n  attribute.\n\n  `exercised` - the promotion was successfully\n  exercised.\n",
                "enum": [
                  "pending",
                  "active",
                  "canceled",
                  "exercised"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "description": "Update a promo program"
      },
      "PurchasesPaging": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Paging"
          },
          {
            "properties": {
              "data": {
                "items": {
                  "$ref": "#/components/schemas/Purchase"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "RefundDetails": {
        "description": "The details of refund.",
        "properties": {
          "categoryId": {
            "description": "The category identifier of the refund.",
            "nullable": true,
            "type": "string"
          },
          "description": {
            "default": "Refund",
            "description": "The description of the refund. Normally shown in Borrower Portal and on statements. At least one of the attributes, `description`\nor `merchantName` must be passed.\n",
            "nullable": true,
            "type": "string"
          },
          "merchantId": {
            "description": "The merchant identifier that the refund was used for.",
            "nullable": true,
            "type": "string"
          },
          "merchantName": {
            "description": "The merchant name that the refund was used for. At least one of the attributes, `description` or `merchantName` must be passed.",
            "nullable": true,
            "type": "string"
          },
          "metadata": {
            "description": "Store any type of key/value pairs in the form of a JSON dictionary.",
            "nullable": true,
            "type": "object"
          },
          "pointOfSaleType": {
            "description": "- `online` - the refund was made online on a website or in a mobile application.\n- `physical` - the refund was made in a store with a physical card or instrument.\n- `recurring` - the refund was made as part of a subscription service.\n",
            "enum": [
              "online",
              "physical",
              "recurring"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "LoanRefundTimestamps": {
        "properties": {
          "canceledAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "readOnly": true,
        "type": "object"
      },
      "LoanRefund": {
        "properties": {
          "atFaultParty": {
            "description": "The party at fault for the refund. Mainly used for ledger/accounting.\n\nIf `loanOwner`, the lender is billed for the entire refund, and paid interest and fees are refunded to the borrower.\n\nIf `loanServicer`, the servicer is billed for the entire refund, and paid interest and fees are refunded to the borrower.\n\nIf `merchant`, the merchant is billed for the entire refund, and paid interest and fees are refunded to the borrower.\n\nIf `borrower`, the merchant is billed for the entire refund, and the borrower receives no refund for paid interest and fees.\n",
            "enum": [
              "loanOwner",
              "loanServicer",
              "merchant",
              "borrower"
            ],
            "type": "string"
          },
          "caseId": {
            "description": "The case identifier.",
            "type": "string"
          },
          "isFullRefund": {
            "description": "`true` if the refund is a full refund, `false` if the amount is a partial refund.\n",
            "readOnly": true,
            "type": "boolean"
          },
          "originalAmount": {
            "description": "The original amount of the refund. The amount must be positive.",
            "format": "float",
            "readOnly": true,
            "type": "number"
          },
          "refundAmount": {
            "description": "The refund amount. The maximum eligible refund amount is the `amountFinancedAtOrigination` of the loan. The refund is applied against the principal of the loan.\n",
            "exclusiveMinimum": true,
            "format": "float",
            "minimum": 0,
            "type": "number"
          },
          "refundDate": {
            "description": "This attribute can be set only during the migration process of loans from another system to Peach. Any value passed for `active` loans will be ignored.\n\nThe refund effective date in the product timezone. If not provided, the refund will be recorded in the ledger with an effective timestamp of the `Create refund` call.\n",
            "format": "date",
            "type": "string"
          },
          "refundDetails": {
            "$ref": "#/components/schemas/RefundDetails"
          },
          "sendNotice": {
            "default": true,
            "description": "When set to `false`, the system will NOT send a `loanRefundProcessed` notice to the borrower.",
            "type": "boolean",
            "writeOnly": true
          },
          "timestamps": {
            "$ref": "#/components/schemas/LoanRefundTimestamps"
          }
        },
        "required": [
          "refundAmount",
          "atFaultParty"
        ],
        "type": "object"
      },
      "LoanRefundCollectionResponse": {
        "properties": {
          "eligibleRefundAmount": {
            "description": "The remaining amount eligible for refund. This is equal to the `amountFinancedAtOrigination` minus prior refund amounts.",
            "format": "float",
            "type": "number"
          },
          "refunds": {
            "items": {
              "$ref": "#/components/schemas/LoanRefund"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ReadOnlyInternalRefundDetails": {
        "allOf": [
          {
            "$ref": "#/components/schemas/InternalRefundDetails"
          },
          {
            "properties": {
              "refundNonDuePrincipalAmount": {
                "readOnly": true
              },
              "refundTransactionAmount": {
                "readOnly": true
              },
              "refundTransactionId": {
                "readOnly": true
              }
            },
            "type": "object"
          }
        ]
      },
      "RefundDetailsV2": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ReadOnlyInternalRefundDetails"
          },
          {
            "properties": {
              "description": {
                "default": "Refund",
                "description": "The description of the refund. Normally shown in Borrower Portal and/or on statements.",
                "nullable": true,
                "type": "string"
              },
              "merchantId": {
                "description": "The merchant identifier that the refund was used for.",
                "nullable": true,
                "type": "string"
              },
              "merchantName": {
                "description": "The merchant name that the refund was used for.",
                "nullable": true,
                "type": "string"
              },
              "metadata": {
                "description": "Store any type of key/value pairs in the form of a JSON dictionary.",
                "nullable": true,
                "type": "object"
              }
            },
            "type": "object"
          }
        ]
      },
      "LoanRefundV2": {
        "properties": {
          "atFaultParty": {
            "description": "The party at fault for the refund. Mainly used for ledger/accounting.\n\nIf `loanOwner`, the lender is billed (on accounting level) for the refund.\n\nIf `loanServicer`, the servicer is billed (on accounting level) for the refund.\n\nIf `merchant`, the merchant is billed (on accounting level) for the refund.\n\nIf `borrower`, the merchant is billed (on accounting level) for the refund.\n",
            "enum": [
              "loanOwner",
              "loanServicer",
              "merchant",
              "borrower"
            ],
            "type": "string"
          },
          "canceledBy": {
            "$ref": "#/components/schemas/UserActionInfo",
            "description": "Details of the user responsible for canceling the refund.\nCan be an agent or automated system process.\n"
          },
          "cancellationCaseId": {
            "description": "The cancellation case identifier.",
            "readOnly": true,
            "type": "string"
          },
          "cancellationReason": {
            "description": "The reason why the refund was canceled.\n\n`wrongAmountOrDetails` - the refund was created with the wrong amount or details.\n\n`processingError` - the refund could not be processed.\n\n`other` - any other reason why the refund was canceled.\n",
            "enum": [
              "wrongAmountOrDetails",
              "processingError",
              "other"
            ],
            "readOnly": true,
            "type": "string"
          },
          "cancellationReasonDetails": {
            "description": "The reason for refund cancellation. This is typically entered by an agent canceling a refund via the front end.",
            "readOnly": true,
            "type": "string"
          },
          "caseId": {
            "description": "The case identifier.",
            "type": "string"
          },
          "createdBy": {
            "$ref": "#/components/schemas/UserActionInfo",
            "description": "Details of the user responsible for creating the refund.\nCan be an agent or automated system process.\n"
          },
          "externalId": {
            "description": "A lender's identifier for the refund.\n\nAfter the object is successfully created, a lender can use ID or externalId identifiers to fetch the object.\n\nTo fetch the object using `externalId` you need to add `ext-` to the URL.\n\nNote: Don't add ext- to the identifier value. For example: if the external identifier is `ABCDE`, then pass `externalId=ACBCE`\nand NOT `ext-ABCDE` when creating the object.\n",
            "minLength": 1,
            "nullable": true,
            "type": "string"
          },
          "feesExceptionList": {
            "default": [],
            "description": "A list of the dynamic fees (aka LoanFee) identifiers that will not be refunded/canceled. The identifiers can be Peach or\nlender's external identifiers.\nThis allows lenders to exclude specific fees from being refunded.\nFor example:\n - `isRefundLateFees=true`\n - `feesExceptionList=[LF-K98P-NM3E]`\nThe system will refund/cancel all late fees except for `LF-K98P-NM3E`.\n",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "readOnly": true,
            "type": "string"
          },
          "isFullRefund": {
            "description": "`true` if the refund is a full refund, `false` if the amount is a partial refund.\n",
            "readOnly": true,
            "type": "boolean"
          },
          "isRefundDownPayment": {
            "default": false,
            "description": "If `true`, the system will refund the down payment amount (assuming the down payment was paid by the borrower).\nOnly applicable if refunded for a full amount.\n",
            "type": "boolean"
          },
          "isRefundLateFees": {
            "default": false,
            "description": "If `true`, the system will cancel any late fees charged after `refundDate + refundTimeOfDay`.\nIf `false`, the system will not cancel any late fees as part of the refund.\n",
            "type": "boolean"
          },
          "isRefundMDR": {
            "default": false,
            "description": "If `true`, the system will record the prorated MDR amount to the merchant within the ledger.\nPeach is not involved in the settlement process with merchants, and will only record amounts in the ledger.\nOnly applicable if `refundDate` equals the activation date.\n",
            "type": "boolean"
          },
          "isRefundOriginationFees": {
            "default": false,
            "description": "If `true`, the system will forego origination fee. Only applicable if the `refundDate` is the loan activation date.\nIf `false`, the system will not do anything with the origination fee as part of the refund.\n\nNote: refunding the origination fee is different from calling \"Update origination fee\" endpoint.\nWhen the origination fee is refunded, the system books the origination fees amount and move the entries to \"foregone\"\nimmediately after.\nWhen the origination fee amount is updated via `Update origination fee`, the system changes the origination fee amount,\nre-books the fee from the activation date and replays the loan.\n",
            "type": "boolean"
          },
          "isRefundOtherFees": {
            "default": false,
            "description": "If `true`, the system will cancel any dynamic fees (except for late fees and fees listed in the `otherFeesExceptionList`)\ncharged after `refundDate + refundTimeOfDay`.\n\nIf `false`, the system will not cancel any dynamic fees (other than late fees and fees listed in the\n`otherFeesExceptionList`) as part of the refund.\n\nNote: if an account ends in `paidOff` status after the refund is applied, any service fees after the payoff date will\nbe canceled, regardless of the `isRefundOtherFees` value.\n",
            "type": "boolean"
          },
          "originalAmount": {
            "description": "The original amount of the refund. The amount must be positive.",
            "format": "float",
            "readOnly": true,
            "type": "number"
          },
          "refundAmount": {
            "description": "The refund amount. The maximum eligible refund amount is the `amountFinancedAtOrigination` of the loan. The refund is applied against the principal of the loan.\n",
            "exclusiveMinimum": true,
            "format": "float",
            "minimum": 0,
            "type": "number"
          },
          "refundDate": {
            "description": "The refund effective date in the product timezone. The `refundDate` can be any date between the activation date and the current date.\nIf not provided, the refund will be recorded in the ledger with an effective timestamp of the `Create refund` call.\n\nTo make the refund effective from the beginning of the loan, please pass the activation date and don't pass `refundTimeOfDay`.\nIn this case, the system will create the refund immediately after the activation.\n",
            "format": "date",
            "type": "string"
          },
          "refundDetails": {
            "$ref": "#/components/schemas/RefundDetailsV2"
          },
          "refundTimeOfDay": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TimeOfDay"
              },
              {
                "default": {
                  "hour": 12,
                  "minute": 1,
                  "second": 0
                }
              }
            ],
            "description": "The effective time of day on `refundDate` in the product timezone. The default value is 12:01:00 AM in the product timezone.\n\nNote: for migration only, the value must be after 2AM in the product timezone.\n",
            "writeOnly": true
          },
          "sendNotice": {
            "default": true,
            "description": "When set to `false`, the system will NOT send a `loanRefundProcessed` notice to the borrower.",
            "type": "boolean",
            "writeOnly": true
          },
          "status": {
            "description": "The status of the refund. - `settled` - the refund was successfully processed. - `processing` - the refund is being processed. Wait until the status changes to `succeeded` or `canceled`. - `canceled` - the refund was canceled or not processed.",
            "enum": [
              "settled",
              "processing",
              "canceled"
            ],
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "timestamps": {
            "$ref": "#/components/schemas/LoanRefundTimestamps"
          }
        },
        "required": [
          "refundAmount",
          "atFaultParty"
        ],
        "type": "object"
      },
      "LoanRefundCancel": {
        "allOf": [
          {
            "properties": {
              "cancellationReason": {
                "description": "Reason the refund was canceled.\n",
                "enum": [
                  "wrongAmountOrDetails",
                  "processingError",
                  "other"
                ],
                "type": "string"
              },
              "cancellationReasonDetails": {
                "description": "The reason for refund cancellation. This is typically entered by an agent canceling a refund via the front end.\n",
                "type": "string"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/CaseId"
          }
        ]
      },
      "properties-caseId": {
        "description": "An identifier for an existing case.",
        "type": "string"
      },
      "LoanReimburse": {
        "properties": {
          "caseId": {
            "$ref": "#/components/schemas/properties-caseId"
          },
          "contactId": {
            "description": "An identifier of an existing contact. Required if the `paymentInstrumentType` is `check` and the check is processed/sent by Peach.\n",
            "type": "string"
          },
          "customDisplayName": {
            "description": "A friendly description of the transaction. If provided, this value will be displayed in Peach UI/App and Statements (or can be used by lender in their App). If the value is not provided, the Peach UI/App and Statements logic will render the transaction name based on type and status. Make sure you provide value that makes sense to the borrower.\nThis is NOT what the borrower will see in their online bank or card account.\n",
            "nullable": true,
            "type": "string"
          },
          "externalTransactionId": {
            "description": "A transaction external identifier. If passed, the new reimbursement transaction that the system will create will have the `externalTransactionId`.",
            "type": "string"
          },
          "isExternal": {
            "description": "If set to `true`, the lender assumes responsibility for transferring funds to the borrower. If set to `false`, Peach handles the transfer of funds to the borrower.",
            "type": "boolean"
          },
          "paymentInstrumentId": {
            "description": "Peach's unique or lender's external identifier. Not required if the paymentInstrumentType=check and the check is processed/sent by Peach.",
            "pattern": "^ext-|^[A-Z]{2}-[A-Z0-9]+-[A-Z0-9]+|^\\d+$",
            "type": "string"
          },
          "paymentInstrumentType": {
            "enum": [
              "bankAccount",
              "card",
              "check",
              "payroll",
              "paymentNetwork"
            ],
            "type": "string"
          },
          "reimbursementAmount": {
            "description": "The requested reimbursement amount.",
            "format": "float",
            "type": "number"
          },
          "transactionStatus": {
            "description": "Only applicable if isExternal=true. The status in which the new reimbursement transaction will be created. If the status is set to pending, the caller\ncan later update the transaction status via Update transaction endpoint. Only applicable if isExternal=true.\n",
            "enum": [
              "pending",
              "succeeded"
            ],
            "type": "string"
          }
        },
        "required": [
          "paymentInstrumentType",
          "reimbursementAmount"
        ],
        "type": "object"
      },
      "LoanReverseAccelerateResponse": {
        "properties": {
          "reversedAcceleratedAmount": {
            "description": "The amount of the acceleration reversal.",
            "format": "float",
            "type": "number"
          }
        },
        "type": "object"
      },
      "LoanReverseChargeOffResponse": {
        "properties": {
          "reversedChargeOffAmount": {
            "description": "The amount of the charge-off reversal.",
            "format": "float",
            "type": "number"
          }
        },
        "type": "object"
      },
      "EveryTwoWeeksOptions": {
        "properties": {
          "days": {
            "items": {
              "properties": {
                "date": {
                  "format": "date",
                  "type": "string"
                },
                "day": {
                  "enum": [
                    "Monday",
                    "Tuesday",
                    "Wednesday",
                    "Thursday",
                    "Friday",
                    "Saturday",
                    "Sunday"
                  ],
                  "type": "string"
                },
                "dayOfWeek": {
                  "type": "integer"
                }
              },
              "type": "object"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "LoanScheduleOptions": {
        "properties": {
          "frequencyOptions": {
            "properties": {
              "everyTwoWeeks": {
                "$ref": "#/components/schemas/EveryTwoWeeksOptions"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "StatementsPaging": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Paging"
          },
          {
            "properties": {
              "data": {
                "items": {
                  "$ref": "#/components/schemas/schemas-Statement"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ],
        "title": "statements"
      },
      "StatementActivity": {
        "properties": {
          "activityType": {
            "description": "The activity type.\n",
            "enum": [
              "fee",
              "payment",
              "paymentReversal",
              "credit",
              "creditReversal",
              "refund",
              "reimbursement",
              "purchase"
            ],
            "type": "string"
          },
          "amount": {
            "description": "The amount of the activity.\n",
            "format": "float",
            "type": "number"
          },
          "dateOfActivity": {
            "description": "The date the activity was posted.\n",
            "format": "date",
            "type": "string"
          },
          "description": {
            "description": "The description of the activity.\n",
            "type": "string"
          },
          "effectiveDate": {
            "description": "The effective date of the activity in the product timezone.\n",
            "format": "date",
            "type": "string"
          },
          "referenceNumber": {
            "description": "The reference number or identifier of the activity.\n",
            "type": "string"
          }
        },
        "type": "object"
      },
      "StatementActivityV2": {
        "properties": {
          "activityType": {
            "description": "The activity type.\n",
            "enum": [
              "fee",
              "payment",
              "paymentReversal",
              "credit",
              "creditReversal",
              "refund",
              "reimbursement",
              "purchase",
              "advance",
              "purchaseDispute",
              "cashback"
            ],
            "type": "string"
          },
          "amount": {
            "description": "The effective amount of the activity that was applied in the ledger in the current or a past\nperiod. `amount` and `originalAmount` are expected to be equal unless something happened to\nthe activity after the activity was originally applied in the ledger.\n\nExample 1:\n  - A payment was originally processed for $100.00 from the borrower's bank account.\n  - Later, $30.00 was reversed (the $30.00 was sent back to the borrower's bank account).\n  - The `amount` would be equal to $70.00.\n  - The `originalAmount` would be equal to $100.00\n\nExample 2:\n  - A service fee of $10.00 was supposed to be charged.\n  - A line (e.g. credit card) had a credit balance of $3.50 (in other words, $3.50 was owed to a borrower).\n  - The `amount` would be equal to $6.50.\n  - The `originalAmount` would be equal to $10.00.\n\nIt's important to understand how `amount` is used to calculate either:\n  - One of the \"total\" attributes such as `totalPaymentsForThisPeriod`.\n  - Or, the `totalAdjustmentsForThisPeriod`.\n\nWhen `isAdjustment=false`, the `amount` is used to calculate one of the \"total\" attributes: `totalPaymentsForThisPeriod`, `totalFeesForThisPeriod`, etc.\n\nWhen `isAdjustment=true`, the `amount` is reflected in the `totalAdjustmentsForThisPeriod`. This is because\nthe reported activity impacted one of the past periods, the loan was replayed and the balance was adjusted.\nKeep in mind that `totalAdjustmentsForThisPeriod` is equal to sum of activities' `amount` and the\n`interestAdjustmentForThisPeriod`. For example:\n  - A payment was originally processed for $100.00 two periods ago.\n  - Later, the payment was disputed by a borrower and the chargeback was accepted for the full amount of $100.00.\n  - If the line accrues interest, the `totalAdjustmentsForThisPeriod` would be different from $100.00 because additional interest was accrued.\n  - The `amount` would be equal to $0.00.\n  - The `originalAmount` would be equal to $100.00.\n  - The `interestAdjustmentForThisPeriod` would be equal to $1.42.\n  - The `totalAdjustmentsForThisPeriod` would be equal to $101.42.\n",
            "format": "float",
            "type": "number"
          },
          "dateOfActivity": {
            "description": "The date when the activity was created. Also called \"transaction date\". Most activities will have `dateOfActivity` equals to `effectiveDate`.\n\nIn some cases, `dateOfActivity` can be different from `effectiveDate`. For example:\n  - A credit card purchase was made and authorized on Mar 11, 2023.\n  - The purchase was captured/settled on Mar 13, 2023.\n  - dateOfActivity is Mar 11, 2023.\n  - effectiveDate is Mar 13, 2023.\n",
            "format": "date",
            "type": "string"
          },
          "description": {
            "description": "The description of the activity.\n",
            "type": "string"
          },
          "displaySign": {
            "description": "The sign that should be displayed next to the amount.\n",
            "enum": [
              "positive",
              "negative"
            ],
            "type": "string"
          },
          "drawId": {
            "description": "The draw identifier that the activity belongs to. Only applicable to line of credit and the following activity types: `fee`, `purchase`, `purchaseDispute`.\n",
            "nullable": true,
            "type": "string"
          },
          "effectiveDate": {
            "description": "The date when the activity was applied in the ledger in the product timezone. Also called \"post date\". Most activities will have `dateOfActivity` equals to `effectiveDate`.\n\nIn some cases, `dateOfActivity` can be different from `effectiveDate`. For example:\n  - A credit card swipe/purchase was made and authorized on Mar 11, 2023.\n  - The purchase was captured/settled on Mar 13, 2023.\n  - `dateOfActivity` is Mar 11, 2023.\n  - `effectiveDate` is Mar 13, 2023.\n",
            "format": "date",
            "type": "string"
          },
          "isAdjustment": {
            "description": "`false` if the activity was originally applied in the ledger in the current period. In other words, it's not an adjustment of an activity that was already reported in a past period.\n\n`true` if the activity was reported in the current period but it impacted one of the past periods. In other words, the activity is a change or an adjustment of one of the prior activities that was reported in a past period.\nWhen an activity with an effective date in one of the past periods is reported, the balance impact is captured in the `totalAdjustmentsForThisPeriod` attribute. Keep in mind that `totalAdjustmentsForThisPeriod` can be different from the activity `amount`.\n\nExample:\n  - A payment was originally processed for $100.00 two periods ago. That activity was reported as `isAdjustment=false`.\n  - Later, the payment was disputed by a borrower and the chargeback was accepted for the full amount of $100.00. The chargeback activity would be reported as `isAdjustment=true`.\n  - If the line accrues interest, the `totalAdjustmentsForThisPeriod` would be different from $100.00 because additional interest was accrued.\n  - The `amount` would be equal to $0.00.\n  - The `originalAmount` would be equal to $100.00.\n  - The `amountForTotals` would be equal to $0.00.\n  - The `totalAdjustmentsForThisPeriod` would be greater than $100.00.\n",
            "type": "boolean"
          },
          "originalAmount": {
            "description": "The original amount of the activity that was applied in the ledger before any changes or adjustments.\n",
            "format": "float",
            "type": "number"
          },
          "referenceNumber": {
            "description": "Peach Public ID of the underlying object that created the activity.\n",
            "type": "string"
          },
          "referenceNumberExternal": {
            "description": "External ID of the underlying object that created the activity. If the corresponding object doesn't have an `externalId`, the attribute value will be `null`.\n",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "BaseStatementDetails": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "$ref": "#/components/schemas/StatementSharedFields"
          },
          {
            "properties": {
              "autopay": {
                "description": "The Autopay details at the time of statement generation. Note: Autopay plan can be canceled any time by the borrower, agent (on behalf of the borrower) or system (e.g. bank account closed).\n",
                "properties": {
                  "paymentInstrumentId": {
                    "description": "The payment instrument ID with which this autopay plan will be charged through.",
                    "nullable": true,
                    "type": "string"
                  },
                  "schedule": {
                    "items": {
                      "properties": {
                        "amount": {
                          "description": "The amount of the expected payment.",
                          "format": "float",
                          "type": "number"
                        },
                        "date": {
                          "description": "The due date of the expected payment.",
                          "format": "date",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              },
              "borrowerDetails": {
                "description": "The borrower details.\n",
                "properties": {
                  "address": {
                    "$ref": "#/components/schemas/Address"
                  },
                  "name": {
                    "description": "The borrower name. If the borrower is a person, the value will be `firstName` + `lastName`.\nIf the borrower is a business, the value will be `businessName`.\n",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "creditBalanceAmount": {
                "description": "The total amount of money that the lender owes to the borrower.\n",
                "format": "float",
                "type": "number"
              },
              "creditBalanceNetChangeAmount": {
                "description": "The net change amount of the `creditBalanceAmount` (also\ncalled `reimbursementAmount`) during the period.\n\nExample 1:\n\n  - In the prior period `newBalanceAmount`=0 and\n    `creditBalanceAmount`=100.\n  - In the this period:\n    - A new purchase or advance was made in amount of $35\n      (`creditBalanceAmount` decreased by 35).\n  - The `creditBalanceNetChangeAmount`=-35.\n\nExample 2:\n\n  - In the prior period `newBalanceAmount`=0 and\n    `creditBalanceAmount`=100.\n  - In the this period:\n    - A check in amount of $20 was posted\n      (`creditBalanceAmount` increased by 20).\n    - A new purchase or advance was made in amount of $35\n      (`creditBalanceAmount` decreased by 35).\n  - The `creditBalanceNetChangeAmount`=+20-35=-15.\n",
                "format": "float",
                "type": "number"
              },
              "daysInBillingCycle": {
                "description": "The number of calendar days in the billing cycle (also called period).\n",
                "type": "integer"
              },
              "fulfilledAmount": {
                "description": "The total amount of payments and service credits applied towards minimumAmountDue.",
                "format": "float",
                "type": "number"
              },
              "interestAdjustmentForThisPeriod": {
                "description": "In some cases account balances can be adjusted because some event changed in the past. For example: late\nreturn of a payment which results in additional interest charged for a period in the past. When such\nadjustments are made this attribute reflects the net adjusted interest amount. The interest adjustment can\nbe positive or negative.\n",
                "format": "float",
                "nullable": true,
                "type": "number"
              },
              "isDisplayLatePaymentWarning": {
                "description": "If `true`, the statement should show a special warning amount late fees - \"Late Payment Warning\" paragraph.\nIf the product type doesn't have any late fees the system will return `false`.\n",
                "type": "boolean"
              },
              "lastPeriodFeesPaid": {
                "description": "Fees amount paid (by the borrower or via credit) in the statement corresponding period.\n",
                "format": "float",
                "type": "number"
              },
              "lastPeriodInterestPaid": {
                "description": "Interest amount paid (by the borrower or via credit) in the statement corresponding period.\n",
                "format": "float",
                "type": "number"
              },
              "lastPeriodOverPaid": {
                "description": "Excess amount paid (by the borrower or via credit) that was not allocated to principal,\ninterest or fees in the statement corresponding period.\n",
                "format": "float",
                "type": "number"
              },
              "lastPeriodPrincipalPaid": {
                "description": "Principal amount paid (by the borrower or via credit) in the statement corresponding period.\n",
                "format": "float",
                "type": "number"
              },
              "lastPeriodTotalPaid": {
                "description": "Total amount paid (by the borrower or via credit) in the statement corresponding period.\n",
                "format": "float",
                "type": "number"
              },
              "lateFeeUpToAmount": {
                "description": "The maximum amount of late fee that can be charged in the period (if the borrower doesn't pay on time). The attribute will have value if `isDisplayLatePaymentWarning` is `true`.\n",
                "format": "float",
                "type": "number"
              },
              "loanStatus": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/LoanStatus"
                  },
                  {
                    "readOnly": true
                  }
                ]
              },
              "newPrincipalBalance": {
                "description": "Principal balance of the account as of the statement date and corresponding period.\n",
                "format": "float",
                "type": "number"
              },
              "overdueAmount": {
                "description": "Overdue amount as of the statement date and corresponding period.\n",
                "format": "float",
                "type": "number"
              },
              "overpaymentsAmount": {
                "description": "In the case that loan policy allows, this represents the amount of overpayments applied to the period. Overpayments will only arise when\nan obligation (aka `minimumAmountDue`) is completely fulfilled.\n",
                "format": "float",
                "type": "number"
              },
              "previousBalance": {
                "description": "Previous statement balance (also called `newBalance`).\n",
                "format": "float",
                "type": "number"
              },
              "previousCreditBalanceAmount": {
                "description": "The total amount of money that the lender owed to the borrower in the previous statement.\n",
                "format": "float",
                "type": "number"
              },
              "promoPrograms": {
                "items": {
                  "properties": {
                    "description": {
                      "description": "A legal description of the promotional program as it\nshould be communicated and shown to borrowers.\nIf the description is provided, borrowers will see\nthe description in the Borrower Portal.\n",
                      "type": "string"
                    },
                    "displayName": {
                      "description": "The promotional program name as it is shown to\nborrowers.\n",
                      "type": "string"
                    },
                    "drawId": {
                      "type": "string"
                    },
                    "externalId": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "promoCancelReason": {
                      "$ref": "#/components/schemas/PromoCancelReason"
                    },
                    "promoEndDate": {
                      "$ref": "#/components/schemas/PromoStartDate"
                    },
                    "promoExercisedDate": {
                      "format": "date",
                      "type": "string"
                    },
                    "promoStartDate": {
                      "$ref": "#/components/schemas/PromoStartDate"
                    },
                    "promoType": {
                      "$ref": "#/components/schemas/PromoType"
                    },
                    "remainingAmountToExercise": {
                      "description": "Represents the remaining balance needed to be paid in\norder to exercise the promotional program.\n",
                      "type": "number"
                    },
                    "status": {
                      "description": "The promotional program status on a specific loan.\n\n  `pending` - the promotion was created but was not\n  activated yet.\n\n  `active` - the promotion is active.\n\n  `canceled` - the promotion has been canceled for a\n  reason.\n  The reason provided in the `promoCancelReason`\n  attribute.\n\n  `exercised` - the promotion was successfully\n  exercised.\n",
                      "enum": [
                        "pending",
                        "active",
                        "canceled",
                        "exercised"
                      ],
                      "type": "string"
                    },
                    "totalDeferredInterestAmount": {
                      "description": "The total deferred interest accrued.\nIf the deferred interest promotion is exercised, the\ndeferred interest is not expected to be paid.\nOnly for deferred interest promo programs.\n",
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "promoType"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "remainingAmount": {
                "description": "The total amount remaining to be paid by the borrower after accounting for payments and service credits applied in the period.",
                "format": "float",
                "type": "number"
              },
              "statementActivities": {
                "items": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/StatementActivity"
                    },
                    {
                      "$ref": "#/components/schemas/StatementActivityV2"
                    }
                  ]
                },
                "type": "array"
              },
              "statementLogicVersion": {
                "default": 3,
                "description": "The statement logic version. When a new statement is generated, it will use the current loan type `statementLogicVersion` value.\nThat version is also stored on each statement object. When/if the statement is regenerated, it will use the\n`statementLogicVersion` value from the statement object vs. loan type. This guarantees that the system uses the same\nlogic as the original statement.\n\n- Version `1` - first/original statement logic. All loan types created before the release of the version `3`, would be set to `1`. When a lender is ready, they can ask Peach to upgrade to version `3`. All statements that were generated before the release of version `3` would be marked as version `1` or `2`.\n- Version `2` - second statement logic that was introduced in Q2 2024. This is a deprecated version and should not be used.\n- Version `3` - third statement logic that was introduced in Q4 2024.\n",
                "type": "integer"
              },
              "totalAdjustmentsForThisPeriod": {
                "description": "In some cases account balances can be adjusted because some event changed in the past.\nFor example: late return of a payment or interest changed for a period in the past.\nWhen such adjustments are made this attribute reflects the net adjusted amount.\n",
                "format": "float",
                "type": "number"
              },
              "totalCreditReversalsForThisPeriod": {
                "description": "Total of credits reversed/canceled in the period.\n",
                "format": "float",
                "type": "number"
              },
              "totalCreditsForThisPeriod": {
                "description": "Total of credits applied in the period.\n",
                "format": "float",
                "type": "number"
              },
              "totalFeesForThisPeriod": {
                "description": "Total amount of fees charged in the period.\n",
                "format": "float",
                "type": "number"
              },
              "totalInterestForThisPeriod": {
                "description": "For LOC:\n  Total amount of interest accrued on draws in the period. The interest amount accrued on each draw is truncated to the nearest cent and\n  the sum of the truncated values is reported by this field.\nFor installment loan:\n  If the period is still open, the amount will be accrued interest in the period plus expected interest to be accrued until the due date.\n",
                "format": "float",
                "type": "number"
              },
              "totalPaymentReversalsForThisPeriod": {
                "description": "Total of payments reversed/returned to the borrower in the period.\n",
                "format": "float",
                "type": "number"
              },
              "totalPaymentsForThisPeriod": {
                "description": "Total of payments made in the period.\n",
                "format": "float",
                "type": "number"
              },
              "totalRefundsForThisPeriod": {
                "description": "Total of refunds applied in the period.\n",
                "format": "float",
                "type": "number"
              },
              "year": {
                "description": "The year of the statement. Year-to-date fields are calculated based on this value.\nUsually the `endDate` of the statement period is the reference for the year. The exception is when the `statementDate`\nis before the `endDate`, in which case `statementDate` is the reference for the year.\n",
                "type": "string"
              },
              "yearToDateFeesCharged": {
                "description": "Total amount of fees charged in the current year from 01/01/YYYY to the statement date.\n",
                "format": "float",
                "type": "number"
              },
              "yearToDateInterestCharged": {
                "description": "Total amount of interest charged in the current year from 01/01/YYYY to the statement date. This field is computed as the sum\nof the interest accrued by the draws on this line and then rounded to the nearest cent.\n",
                "format": "float",
                "type": "number"
              },
              "ytdFeesPaid": {
                "description": "Fees amount paid (by the borrower or via credit) year to date, from 01/01/YYYY to the statement date.\n",
                "format": "float",
                "type": "number"
              },
              "ytdInterestPaid": {
                "description": "Interest amount paid (by the borrower or via credit) year to date, from 01/01/YYYY to the statement date.\n",
                "format": "float",
                "type": "number"
              },
              "ytdOverPaid": {
                "description": "Excess amount paid (by the borrower or via credit) that was not allocated to principal,\ninterest or fees year to date, from 01/01/YYYY to the statement date.\n",
                "format": "float",
                "type": "number"
              },
              "ytdPrincipalPaid": {
                "description": "Principal amount paid (by the borrower or via credit) year to date, from 01/01/YYYY to the statement date.\n",
                "format": "float",
                "type": "number"
              },
              "ytdTotalPaid": {
                "description": "Total amount paid (by the borrower or via credit) year to date, from 01/01/YYYY to the statement date.\n",
                "format": "float",
                "type": "number"
              }
            },
            "type": "object"
          }
        ]
      },
      "InstallmentStatementDetails": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseStatementDetails"
          },
          {
            "properties": {
              "apr": {
                "description": "The effective APR.",
                "format": "float",
                "type": "number"
              },
              "prepaidAmount": {
                "description": "Amount paid in the period prior to due date.\n",
                "format": "float",
                "type": "number"
              },
              "recurringAmount": {
                "description": "The most recent amortized recurring amount.\n",
                "format": "float",
                "type": "number"
              },
              "totalAdvancesForThisPeriod": {
                "description": "The total amount of advances made in the period.\n",
                "format": "float",
                "nullable": true,
                "type": "number"
              },
              "totalAmountDue": {
                "description": "The total amount due for the period as of the time when the statement was generated. It represents the sum\nof the minimumAmountDue and overdueAmount minus any payments or service credits applied in the period.\n",
                "format": "float",
                "type": "number"
              }
            },
            "title": "Installment",
            "type": "object"
          }
        ],
        "title": "Installment"
      },
      "StatementDrawInfo": {
        "properties": {
          "apr": {
            "description": "The net interest rate (also called APR), interest rate minus promo rate, of the draw/sub-line as of the last day of the period (aka `billingCycleEndDate`).\n",
            "format": "float",
            "type": "number"
          },
          "availableCredit": {
            "description": "Available credit for this specific draw.",
            "format": "float",
            "type": "number"
          },
          "balanceEndOfPeriod": {
            "description": "The draw/sub-line remaining balance at the end of the period.\n",
            "format": "float",
            "type": "number"
          },
          "creditLimit": {
            "description": "The credit limit amount for the draw.",
            "format": "float",
            "type": "number"
          },
          "deferredInterestForThisPeriod": {
            "description": "The deferred interest accrued for this period only.\nIf the deferred interest promotion is exercised, the deferred interest\nis not expected to be paid.\n",
            "format": "float",
            "type": "number"
          },
          "drawId": {
            "description": "The draw identifier.",
            "type": "string"
          },
          "fulfilledAmount": {
            "description": "The total amount of payments and service credits applied towards `minAmountDue``.",
            "format": "float",
            "type": "number"
          },
          "interestCharged": {
            "description": "The amount of interest accrued in the period. This value is computed by truncating (to the nearest cent) the interest accrued in this period.\nThis is amount is equal to the sum of `interestChargedDetails.interestCharged` amounts in the `interestChargedDetails` array.\n",
            "format": "float",
            "type": "number"
          },
          "interestChargedDetails": {
            "description": "Details of interest charged in the period.",
            "items": {
              "properties": {
                "balanceSubjectToInterestRate": {
                  "description": "The average balance of draw/sub-line that was subject to the `interestRate`. Calculated by adding the principal amount on days with `interestRate`\ndivided by `numberDays`. Also called Average Daily Balance.\n",
                  "format": "float",
                  "type": "number"
                },
                "interestChargeType": {
                  "description": "The type of interest charge.\n- `daily` - a standard daily accrual in the period.\n- `deferred` - deferred interest that was recognized/charged in the period. Note: the interest amount that was charged in the period \n               is a total of deferred interest that was accrued across multiple periods.\n",
                  "enum": [
                    "daily",
                    "deferred"
                  ],
                  "type": "string"
                },
                "interestCharged": {
                  "description": "The net interest rate (also called APR). Calculated as interest rate minus promo rate of the draw/sub-line as of the last day of the period (aka the billingCycleEndDate).\n",
                  "format": "float",
                  "type": "number"
                },
                "interestRate": {
                  "description": "The net interest rate that the balance accrued interest for `numberDays`. If the draw has a single interest rate, the value is also called\nAPR of the draw/sub-line. If the draw was created in the middle of the period or was paid off before the period ended, the system will count\ndays as `interestRate=0`.\n",
                  "format": "float",
                  "type": "number"
                },
                "numberDays": {
                  "description": "Number of days in the period that principal was subject to the `interestRate`. Sum of `numberDays` in the array is equal to the number of days in the period.\n",
                  "type": "integer"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "isVariableRate": {
            "description": "`true` if the rate is variable. `false` if the rate is fixed.\n",
            "type": "boolean"
          },
          "minAmountDue": {
            "description": "The minimum amount due of the draw/sub-line for the period.\n",
            "format": "float",
            "type": "number"
          },
          "nameOfBalance": {
            "description": "The name of the balance (also called draw/sub-line).\n",
            "type": "string"
          },
          "overLimitAmount": {
            "description": "The amount by which the balance exceeded the credit limit for the draw. This amount is expected to be greater than 0 \nonly when the credit limit is exceeded.\n",
            "format": "float",
            "type": "number"
          },
          "overpaymentsAmount": {
            "description": "In the case that loan policy allows, this represents the amount of overpayments applied to the period. Overpayments will only arise when an\nobligation (aka `minAmountDue`) is completely fulfilled.\n",
            "format": "float",
            "type": "number"
          },
          "remainingAmount": {
            "description": "The total amount remaining to be paid by the borrower after accounting for payments and service credits applied in the period.",
            "format": "float",
            "type": "number"
          },
          "totalDeferredInterestAmount": {
            "description": "The total deferred interest accrued.\nIf the deferred interest promotion is exercised, the deferred interest\nis not expected to be paid. Only for deferred interest promo programs.\n",
            "format": "float",
            "type": "number"
          },
          "totalPurchasesForThisPeriod": {
            "description": "Total of new purchases on the draw in the period corresponding to the statement.\n",
            "format": "float",
            "type": "number"
          },
          "utilizationAmount": {
            "$ref": "#/components/schemas/UtilizationAmount"
          }
        },
        "type": "object"
      },
      "LOCStatementDetails": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseStatementDetails"
          },
          {
            "properties": {
              "authorizedPurchasesAmount": {
                "description": "The total amount of authorized purchases at the time of statement generation. This amount reduces `availableCredit`\nand `openToBuy`; is not included in the `newBalanceAmount`; and appears in the Account Summary section of the statement.\n",
                "format": "float",
                "nullable": true,
                "type": "number"
              },
              "availableCredit": {
                "description": "Available credit to use.\n",
                "format": "float",
                "type": "number"
              },
              "creditLimit": {
                "description": "The credit limit amount for the line or draw. Only applicable to line of credit or installment loan with multiple\nadvances. For installment loans with multi-advances, it is the amount financed set at origination.\n",
                "format": "float",
                "type": "number"
              },
              "gracePeriod": {
                "deprecated": true,
                "description": " If `true`, the account is eligible for the benefits of \"grace period\".",
                "type": "boolean"
              },
              "isDisplayMinimumPaymentWarning": {
                "description": "If `true`, the statement should show a special warning amount minimum payment - \"Minimum Payment Warning\" paragraph and table.\n",
                "type": "boolean"
              },
              "locClosedDate": {
                "description": "The date LOC was closed in the product timezone. If LOC is closed, new purchases are not allowed. Closed LOC can still have outstanding balance.\n",
                "format": "date",
                "type": "string"
              },
              "minimumPaymentWarning": {
                "description": "The details required to show the Minimum Payment Warning table in the statement.",
                "properties": {
                  "comparedToDuration": {
                    "description": "The number of years it should take to pay off the balance if the borrower pays the `comparedToPaymentAmount` only.\n*Per regulations*:\nIf the minimum payment repayment estimate is less than 2 years, the card issuer must disclose the estimate in months.\nOtherwise, the estimate must be disclosed in years and rounded to the nearest whole year.\n",
                    "type": "integer"
                  },
                  "comparedToDurationMonths": {
                    "description": "The number of months it should take to pay off the balance if the borrower pays the `comparedToPaymentAmount` only.\n*Per regulations*:\nIf the minimum payment repayment estimate is less than 2 years, the card issuer must disclose the estimate in months.\nOtherwise, the estimate must be disclosed in years and rounded to the nearest whole year.\n",
                    "type": "integer"
                  },
                  "comparedToPaymentAmount": {
                    "description": "The payment amount that the minimum amount is compared to.\n",
                    "format": "float",
                    "type": "number"
                  },
                  "comparedToTotalCostAmount": {
                    "description": "The estimated total amount (or cost) the borrower is expected to pay if the borrower pays the `comparedToPaymentAmount` only.\n",
                    "format": "float",
                    "type": "number"
                  },
                  "minimumPaymentDuration": {
                    "description": "The number of years it should take to pay off the balance if the borrower makes the minimum payment only.\n*Per regulations*:\nIf the minimum payment repayment estimate is less than 2 years, the card issuer must disclose the estimate in months.\nOtherwise, the estimate must be disclosed in years and rounded to the nearest whole year.\n",
                    "type": "integer"
                  },
                  "minimumPaymentDurationMonths": {
                    "description": "The number of months it should take to pay off the balance if the borrower makes the minimum payment only.\n*Per regulations*:\nIf the minimum payment repayment estimate is less than 2 years, the card issuer must disclose the estimate in months.\nOtherwise, the estimate must be disclosed in years and rounded to the nearest whole year.\n",
                    "type": "integer"
                  },
                  "minimumPaymentTotalCostAmount": {
                    "description": "The estimated total amount (or cost) the borrower is expected to pay if the borrower makes the minimum payment only.\n",
                    "format": "float",
                    "type": "number"
                  }
                },
                "type": "object"
              },
              "statementDrawInfo": {
                "items": {
                  "$ref": "#/components/schemas/StatementDrawInfo"
                },
                "type": "array"
              },
              "totalCashBacksForThisPeriod": {
                "description": "Total of cashBacks applied in the period.\n",
                "format": "float",
                "type": "number"
              },
              "totalPurchasesForThisPeriod": {
                "description": "Total of new purchases in the period corresponding to the statement.\n",
                "format": "float",
                "type": "number"
              },
              "utilizationAmount": {
                "$ref": "#/components/schemas/UtilizationAmount"
              }
            },
            "title": "Line of Credit",
            "type": "object"
          }
        ],
        "title": "Line of Credit"
      },
      "StatementDetails": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/InstallmentStatementDetails"
          },
          {
            "$ref": "#/components/schemas/LOCStatementDetails"
          }
        ]
      },
      "TransactionsPaging": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NewPaginator"
          },
          {
            "properties": {
              "data": {
                "items": {
                  "$ref": "#/components/schemas/Transaction"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ],
        "title": "transactions"
      },
      "TransactionCreationStatus": {
        "description": "The transaction status. May only be passed when `isExternal=true`.\n\nExternal transactions can be created in: `scheduled`, `initiated`, `pending`, `succeeded`, or `failed`.\nExternal transactions are applied to the loan balance immediately when created with status `initiated`, `pending`, or `succeeded`. Otherwise,\nthey will be applied the first time they are updated to one of these statuses.\n\n`scheduled` - payment or credit was scheduled for a future date that has not arrived yet. The payment has not applied to a loan yet.\n\n`initiated` - payment was initiated and sent to a payment processor. The payment is applied to a loan. This status is used normally for ACH.\n\n`pending` - payment was acknowledged by the payment processor and is being processed. For ACH the payment can be in pending status for a few days.\n\n`succeeded` - payment was completed successfully.\n\n`failed` - payment failed and was removed from the loan effective as of `initiated`, `pending` or `succeeded` status effective date. The system replays the loan as if the payment never happened.\nIt will also re-accrue interest since then.\n\n`inDispute` - payment is in dispute (typically because of chargeback). The payment is removed from the loan effective as of `initiated`, `pending` or `succeeded` status effective date. The system replays the loan as if the payment never happened.\nIt will also re-accrue interest since then. Disputed payment can be for partial amount.\n\n`canceled` - payment or credit was canceled. Payment can be canceled only if the current status is `scheduled`.\n\n`chargeback` - payment was disputed and ruled against the lender. The payment was returned to the original payment instrument. Chargeback payment can be for partial amount.\n",
        "enum": [
          "scheduled",
          "initiated",
          "pending",
          "succeeded",
          "failed",
          "canceled",
          "inDispute",
          "chargeback"
        ],
        "type": "string"
      },
      "OneTimePaymentTransaction": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseOneTimePaymentTransaction"
          },
          {
            "properties": {
              "consentDocumentId": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AnyId"
                  },
                  {
                    "description": "The document ID of a one-time payment consent given by the\nborrower to debit their payment instrument.  The document is\nstored in the HTML format and contains the disclosure shown to\nthe borrower at the time of the payment.  Required if\n`previewMode=false` and Peach is processing payments (aka\n`isExternal=false`) on behalf of the lender.\n"
                  }
                ]
              },
              "drawId": {
                "description": "The draw identifier. If provided, the system will attempt to apply the payment to the specified draw. Any excess will be applied to\nthe rest of LOC/Draws based on the multi-waterfall that is defined for the line of credit type.\n",
                "type": "string"
              },
              "effectiveDate": {
                "description": "This attribute can be used only during the migration process of loans from another system to Peach. Any value passed for `active` loans will be ignored.\n\nThe effective date of the transaction in the product timezone. This attribute can be used for transactions with `isExternal=true` only.\nThe date must be in the past or today. Make sure to provide `effectiveTimeOfDay` also.\n",
                "format": "date",
                "type": "string"
              },
              "effectiveTimeOfDay": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/TimeOfDay"
                  },
                  {
                    "description": "The effective time of day on `effectiveDate` in the product timezone. This attribute can be used for transactions with `isExternal=true` only. Required if `effectiveDate` is passed.\n\nNote: for migration only, the value must be after 2AM in the product timezone.\n",
                    "type": "object",
                    "writeOnly": true
                  }
                ]
              },
              "enablePrepayments": {
                "description": "**DEPRECATED ATTRIBUTE**\n`true` if the borrower opts to apply any overpayment amount to prepayment of future obligations.\n`false` if the borrower opts to apply overpayments to the current obligation.\n\nIf this field is not passed, we reference the `allowPrepayments` configuration on the loan type.\n",
                "type": "boolean"
              },
              "holdDaysEndDate": {
                "$ref": "#/components/schemas/HoldDaysEndDate"
              },
              "isExternal": {
                "description": "A transaction marked `isExternal=true` is for record purposes only. A transaction with an external `paymentInstrument` is automatically marked external.",
                "type": "boolean"
              },
              "scheduledDate": {
                "description": "This attribute should be used only for transactions that are scheduled in the future. Transactions that should be processed now/today,\nleave the attribute empty and the system will set appropriate date and timestamp values based on the API call time.\n\nNote: The maximum date you can set is the maximum of either three years after the last expected payment or three years from today.\n",
                "format": "date",
                "type": "string"
              },
              "status": {
                "$ref": "#/components/schemas/TransactionCreationStatus"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/CaseId"
          }
        ],
        "required": [
          "paymentInstrumentId",
          "amount",
          "type"
        ],
        "title": "One Time Payment"
      },
      "ServiceCreditTransaction": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseServiceCreditTransaction"
          },
          {
            "properties": {
              "drawId": {
                "description": "The draw identifier. If provided, the system will attempt to apply the payment to the specified draw. Any excess will be applied to\nthe rest of LOC/Draws based on the multi-waterfall that is defined for the line of credit type.\n",
                "type": "string"
              },
              "effectiveDate": {
                "description": "This attribute can be used only during the migration process of loans from another system to Peach.\nAny value passed for active loans will be ignored.\n\nThe effective date of the transaction in the product timezone.\nThis attribute can be used for transactions with `isExternal=true` only. The date must be in the past or today.\nMake sure to provide `effectiveTimeOfDay` also.\n",
                "format": "date",
                "type": "string",
                "writeOnly": true
              },
              "effectiveTimeOfDay": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/TimeOfDay"
                  },
                  {
                    "description": "The effective time of day on `effectiveDate` in the product timezone. This attribute can be used for transactions with `isExternal=true` only. Required if `effectiveDate` is passed.\n\nNote: for migration only, the value must be after 2AM in the product timezone.\n",
                    "type": "object",
                    "writeOnly": true
                  }
                ]
              },
              "enablePrepayments": {
                "description": "**DEPRECATED ATTRIBUTE**\n`true` if the borrower opts to apply any overpayment amount to prepayment of future obligations.\n`false` if the borrower opts to apply overpayments to the current obligation.\nIf this field is not passed, we reference the `allowPrepayments` configuration on the loan type.\n",
                "type": "boolean"
              },
              "scheduledDate": {
                "description": "This attribute should be used only for transactions that need to be applied now/today or are scheduled in the future.\nTransactions that should be processed now/today, leave the attribute empty and the system\nwill set appropriate date and timestamp values based on the API call time.\nIf a future date is provided, the service credit will be scheduled for the future date and\nwon't be applied to the ledger until then.\n\nTo apply service credit with an effective date in the past, two steps are required:\n- Post service credit with an empty `scheduledDate.` The system will apply the service credit now/today.\n- Call \"Backdate transaction\" endpoint to move the service credit to a past date.\n\nNote: The maximum date you can set is the maximum of either three years after the last expected payment or three years from today.\n",
                "format": "date",
                "type": "string"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/CaseId"
          }
        ],
        "required": [
          "serviceCreditType",
          "serviceCreditSponsor",
          "amount",
          "type"
        ],
        "title": "Service Credit"
      },
      "serviceCreditTypesForCreate": {
        "enum": [
          "serviceAgent",
          "serviceSupervisor",
          "settlementOfDebt",
          "balanceTransfer",
          "rewards",
          "fraud",
          "badDebt",
          "bankruptcy",
          "deceased",
          "usuryCap"
        ],
        "type": "string"
      },
      "ServiceCreditTransactionForCreate": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ServiceCreditTransaction"
          },
          {
            "properties": {
              "serviceCreditType": {
                "$ref": "#/components/schemas/serviceCreditTypesForCreate"
              }
            },
            "type": "object"
          }
        ],
        "title": "Service Credit"
      },
      "DownPaymentTransaction": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseDownPaymentTransaction"
          },
          {
            "properties": {
              "consentDocumentId": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AnyId"
                  },
                  {
                    "description": "The document ID of a one-time payment consent given by the\nborrower to debit their payment instrument.  The document is\nstored in the HTML format and contains the disclosure shown to\nthe borrower at the time of the payment.  Required if\n`previewMode=false` and Peach is processing payments (aka\n`isExternal=false`) on behalf of the lender.\n"
                  }
                ]
              },
              "drawId": {
                "description": "The draw identifier. If provided, the system will attempt to apply the payment to the specified draw. Any excess will be applied to\nthe rest of LOC/Draws based on the multi-waterfall that is defined for the line of credit type.\n",
                "type": "string"
              },
              "effectiveDate": {
                "description": "This attribute can be used only during the migration process of loans from another system to Peach. Any value passed for `active` loans will be ignored.\n\nThe effective date of the transaction in the product timezone. This attribute can be used for transactions with `isExternal=true` only.\nThe date must be in the past or today. Make sure to provide `effectiveTimeOfDay` also.\n",
                "format": "date",
                "type": "string"
              },
              "effectiveTimeOfDay": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/TimeOfDay"
                  },
                  {
                    "description": "The effective time of day on `effectiveDate` in the product timezone. This attribute can be used for transactions with `isExternal=true` only. Required if `effectiveDate` is passed.\n\nNote: for migration only, the value must be after 2AM in the product timezone.\n",
                    "type": "object",
                    "writeOnly": true
                  }
                ]
              },
              "isExternal": {
                "description": "A transaction marked `isExternal=true` is for record purposes only. A transaction with an external `paymentInstrument` is automatically marked external.",
                "type": "boolean"
              },
              "scheduledDate": {
                "description": "If provided must be a date in the future.\n\nNote: The maximum date you can set is the maximum of either three years after the last expected payment or three years from today.\n",
                "format": "date",
                "type": "string"
              },
              "status": {
                "$ref": "#/components/schemas/TransactionCreationStatus"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/CaseId"
          }
        ],
        "required": [
          "paymentInstrumentId",
          "amount",
          "type"
        ],
        "title": "Down Payment"
      },
      "CreateTransaction": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/OneTimePaymentTransaction"
          },
          {
            "$ref": "#/components/schemas/ServiceCreditTransactionForCreate"
          },
          {
            "$ref": "#/components/schemas/DownPaymentTransaction"
          }
        ],
        "required": [
          "type"
        ]
      },
      "TransactionUpdate": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NormalTransaction"
          },
          {
            "properties": {
              "currency": {
                "readOnly": true
              },
              "isExternal": {
                "description": "**DEPRECATED ATTRIBUTE** Updating this field does not modify the transaction.\n\nA transaction marked `isExternal=true` is for record purposes only. A transaction with\nan external `paymentInstrument` is automatically marked external.\n"
              },
              "isVirtual": {
                "description": "**DEPRECATED ATTRIBUTE** Updating this field does not modify the transaction.\n\nA transaction marked `isVirtual=true` is not a real transaction, but represents a part of another transaction.\nThis is used to store the principal/interest split on draws in Line of Credits as well as splits between multiple\ninstallment loans that were applied as a single payment.\n"
              },
              "paidFeesAmount": {
                "description": "**DEPRECATED ATTRIBUTE** Support for this field will be removed in the future.\n\nThe paid amount allocated to fees\n"
              },
              "paidInterestAmount": {
                "description": "**DEPRECATED ATTRIBUTE** Support for this field will be removed in the future.\n\nThe paid amount allocated to interest\n"
              },
              "paidOverAmount": {
                "description": "**DEPRECATED ATTRIBUTE** Support for this field will be removed in the future.\n\nStores any excess amount that was not allocated to principal, interest or fees.\n"
              },
              "paidPrincipalAmount": {
                "description": "**DEPRECATED ATTRIBUTE** Support for this field will be removed in the future.\n\nThe paid amount allocated to principal\n"
              },
              "paymentDetails": {
                "readOnly": true
              },
              "processorId": {
                "readOnly": true
              },
              "serviceCreditDetails": {
                "readOnly": true
              },
              "transactionType": {
                "readOnly": true
              }
            },
            "type": "object"
          }
        ]
      },
      "TransactionUpdateExternal": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TransactionUpdate"
          },
          {
            "properties": {
              "timestamps": {
                "properties": {
                  "effectiveDate": {
                    "readOnly": true
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          }
        ]
      },
      "LoanUnfreeze": {
        "allOf": [
          {
            "properties": {
              "previewMode": {
                "default": false,
                "description": "If `previewMode=true`, the loan doesn't change and no changes are saved to the database.\n",
                "type": "boolean"
              },
              "retroactivelyAccrueInterest": {
                "default": false,
                "description": "`true` to accrue interest (as usual) for periods occurring when the loan was frozen. `false` to make\nperiodic payments occurring during the frozen period interest-free.\n",
                "type": "boolean"
              },
              "sendNotice": {
                "default": true,
                "description": "When set to `false`, the system will NOT send a `loanUnfreeze` notice to the borrower.",
                "type": "boolean"
              },
              "shiftDueDates": {
                "default": false,
                "description": "`true` to defer the periodic payment amounts associated with periods that fall in the frozen period to one or\nmore new periods generated at the end of a loan. `false` to keep the amounts in unfrozen periods.\n",
                "type": "boolean"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/CaseId"
          }
        ]
      },
      "fullAccountNumber": {
        "properties": {
          "accountNumber": {
            "description": "The full account number. Only provided if `showFullAccountNumber=true`.\nUser must have the `payment.instrument:read.sensitive` permission to get the full number.\n",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PaymentCardImmutableFields": {
        "properties": {
          "cardNumberLastFour": {
            "description": "The last two, three or four digits of the card number.\nNormally, you should expect four digits. Two or three digits are returned when four digits are not available.\n",
            "example": "1111",
            "readOnly": true
          },
          "cardType": {
            "description": "The type of card.\n\n- For external payment instruments, this field is required, and does not require additional permissions.\n\n- Otherwise, this field is not required, and using it requires permission `payment.instrument:force`.\n",
            "enum": [
              "credit",
              "debit"
            ],
            "type": "string"
          },
          "cvv": {
            "description": "The CVV, typically found on the back of the card.\nPeach does not save CVV and is only used to authenticate the card. Required if `isExternal=false`.\n",
            "example": "321",
            "type": "string",
            "writeOnly": true
          },
          "instrumentType": {
            "enum": [
              "card"
            ],
            "type": "string"
          },
          "issuer": {
            "description": "Issuing bank. Requires permission `payment.instrument:force`.",
            "type": "string"
          },
          "network": {
            "description": "Card network. Requires permission `payment.instrument:force`.",
            "enum": [
              "visa",
              "mastercard",
              "discover",
              "americanExpress"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "PaymentCardMutableFields": {
        "properties": {
          "address": {
            "allOf": [
              {
                "description": "The billing address associated with the card. If `isExternal=false`, then `postalCode` is required.\n"
              },
              {
                "$ref": "#/components/schemas/AddressBase"
              }
            ]
          },
          "expirationMonth": {
            "description": "The expiration month of the card.",
            "example": 12,
            "type": "integer"
          },
          "expirationYear": {
            "description": "The expiration year of the card.",
            "example": 2032,
            "type": "integer"
          },
          "firstName": {
            "description": "First name on the card.",
            "type": "string"
          },
          "lastName": {
            "description": "Last name on the card.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PaymentCard": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaymentInstrumentImmutableFields"
          },
          {
            "$ref": "#/components/schemas/PaymentInstrumentFailureReasons"
          },
          {
            "$ref": "#/components/schemas/PaymentInstrumentMutableFields"
          },
          {
            "$ref": "#/components/schemas/PaymentCardImmutableFields"
          },
          {
            "$ref": "#/components/schemas/PaymentCardMutableFields"
          }
        ],
        "required": [
          "instrumentType",
          "cardNumber",
          "expirationYear",
          "expirationMonth",
          "firstName",
          "lastName"
        ],
        "title": "Card"
      },
      "fullCardNumber": {
        "properties": {
          "cardNumber": {
            "description": "The full card number. Also called PAN. Only provided if `showFullAccountNumber=true`.\nUser must have the `payment.instrument:read.sensitive` permission to get the full number.\n",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PaymentCheckMutable": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaymentInstrumentMutableFields"
          },
          {
            "properties": {
              "accountHolderName": {
                "description": "For `personal` accounts, the full name of the account holder. For `business` accounts, the business name.\n\n<strong style=\"color: red\">This is not an account nickname. It should match the name on file for the account with the bank.</strong>\n",
                "type": "string"
              },
              "accountHolderType": {
                "description": "Type of entity that is the account holder.",
                "enum": [
                  "business",
                  "personal"
                ],
                "type": "string"
              },
              "address": {
                "$ref": "#/components/schemas/AddressBase",
                "description": "The address on the check. Typically located in the top left corner, under the account holder name(s).\n"
              },
              "payToTheOrderOfName": {
                "description": "The name of a person or organization designated to receive the funds,\nsuch as \"John Smith\" or \"Peach Finance, Inc\". Defaults to \"Cash\",\nused when you don't know the person or organization's exact name.\n",
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "Check"
      },
      "PaymentCheck": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaymentInstrumentImmutableFields"
          },
          {
            "$ref": "#/components/schemas/PaymentInstrumentFailureReasons"
          },
          {
            "$ref": "#/components/schemas/PaymentInstrumentMutableFields"
          },
          {
            "properties": {
              "accountNumberLastFour": {
                "description": "The last two, three or four digits of the account number.\nNormally, you should expect four digits. Two or three digits are returned when four digits are not available.\n",
                "pattern": "^[0-9]{2,4}",
                "readOnly": true,
                "type": "string"
              },
              "checkNumber": {
                "description": "The check sequence number. Typically located in the top right corner of the check.",
                "type": "string"
              },
              "institutionName": {
                "description": "The name of the bank where this account resides.",
                "readOnly": true,
                "type": "string"
              },
              "instrumentType": {
                "enum": [
                  "check"
                ],
                "type": "string"
              },
              "routingNumber": {
                "description": "The routing number.",
                "type": "string"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/PaymentCheckMutable"
          }
        ],
        "required": [
          "accountHolderName",
          "accountHolderType",
          "accountNumber",
          "checkNumber",
          "instrumentType",
          "routingNumber"
        ],
        "title": "Check"
      },
      "Payroll": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaymentInstrumentImmutableFields"
          },
          {
            "$ref": "#/components/schemas/PaymentInstrumentMutableFields"
          },
          {
            "properties": {
              "departmentName": {
                "description": "The department name.",
                "example": "Accounting",
                "type": "string"
              },
              "employeeId": {
                "description": "The employee/borrower ID in the payroll system.",
                "type": "string"
              },
              "employerName": {
                "description": "The employer name.",
                "type": "string"
              },
              "instrumentType": {
                "enum": [
                  "payroll"
                ],
                "type": "string"
              },
              "isExternal": {
                "enum": [
                  true
                ],
                "readOnly": true,
                "type": "boolean"
              },
              "payFrequency": {
                "description": "The payment frequency.",
                "enum": [
                  "weekly",
                  "everyTwoWeeks",
                  "twiceMonthly",
                  "monthly"
                ],
                "example": "everyTwoWeeks",
                "type": "string"
              },
              "paySpecificDays": {
                "description": "The specific days on which paychecks are made. The allowed values for specific day(s) depends on the `payFrequency`.\n\n - `weekly` - provide one number in the valid range 1-7. 1=Monday...7=Sunday.\n    For example: `[1]`.\n - `everyTwoWeeks` - provide one number in the valid range 1-14.\n    First week: 1=Monday...7=Sunday.\n    Second week: 8=Monday...14=Sunday.\n    For example: `[1]`.\n - `twiceMonthly` - provide two numbers in the valid range 1-31. 1=first day of a month. Use `31` to indicate the last day of a month.\n    For example: `[1, 15]` or `[15, 31]`.\n - `monthly` - provide one number in the valid range 1-31. 1=first day of a month. Use `31` to indicate the last day of a month.\n    For example: `[1]`.\n",
                "example": [
                  1,
                  15
                ],
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              "paycheckNetAmount": {
                "description": "The amount of paycheck after taxes that is deposited to the borrower's bank account.",
                "example": 1024,
                "type": "number"
              }
            },
            "type": "object"
          }
        ],
        "title": "Payroll"
      },
      "PaymentNetwork": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaymentInstrumentImmutableFields"
          },
          {
            "$ref": "#/components/schemas/PaymentInstrumentMutableFields"
          },
          {
            "properties": {
              "instrumentType": {
                "enum": [
                  "paymentNetwork"
                ],
                "type": "string"
              },
              "isExternal": {
                "enum": [
                  true
                ],
                "readOnly": true,
                "type": "boolean"
              },
              "paymentNetworkMemberId": {
                "description": "The borrower identifier in the payment network system.",
                "type": "string"
              },
              "paymentNetworkName": {
                "description": "The payment network name.",
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "title": "Payment Network"
      },
      "MoneyOrder": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaymentInstrumentImmutableFields"
          },
          {
            "$ref": "#/components/schemas/PaymentInstrumentMutableFields"
          },
          {
            "properties": {
              "institutionName": {
                "description": "The name of the bank where this account resides.",
                "maxLength": 36,
                "type": "string"
              },
              "instrumentType": {
                "enum": [
                  "moneyOrder"
                ],
                "type": "string"
              },
              "isExternal": {
                "enum": [
                  true
                ],
                "readOnly": true,
                "type": "boolean"
              },
              "routingNumber": {
                "description": "The routing number.",
                "pattern": "\\d{9}",
                "type": "string"
              },
              "serialNumber": {
                "description": "The money order serial number.",
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "required": [
          "instrumentType",
          "serialNumber"
        ],
        "title": "Money Order"
      },
      "Wire": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaymentInstrumentImmutableFields"
          },
          {
            "$ref": "#/components/schemas/PaymentInstrumentMutableFields"
          },
          {
            "properties": {
              "institutionName": {
                "description": "The name of the bank where this account resides.",
                "maxLength": 36,
                "type": "string"
              },
              "instrumentType": {
                "enum": [
                  "wire"
                ],
                "type": "string"
              },
              "isExternal": {
                "enum": [
                  true
                ],
                "readOnly": true,
                "type": "boolean"
              },
              "routingNumber": {
                "description": "The routing number from where the wire was sent.",
                "pattern": "\\d{9}",
                "type": "string"
              },
              "wireNumber": {
                "description": "The wire number. Must be unique.",
                "type": "string"
              },
              "wireType": {
                "default": "domestic",
                "enum": [
                  "domestic",
                  "international"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "required": [
          "instrumentType",
          "wireType",
          "wireNumber"
        ],
        "title": "Wire"
      },
      "PaymentInstrumentGet": {
        "oneOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/BankAccount"
              },
              {
                "$ref": "#/components/schemas/fullAccountNumber"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentCard"
              },
              {
                "$ref": "#/components/schemas/fullCardNumber"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentCheck"
              },
              {
                "$ref": "#/components/schemas/fullAccountNumber"
              }
            ]
          },
          {
            "allOf": [
              {
                "required": [
                  "instrumentType",
                  "employerName"
                ],
                "type": "object"
              },
              {
                "$ref": "#/components/schemas/Payroll"
              }
            ],
            "title": "Payroll"
          },
          {
            "allOf": [
              {
                "required": [
                  "instrumentType",
                  "paymentNetworkName"
                ],
                "type": "object"
              },
              {
                "$ref": "#/components/schemas/PaymentNetwork"
              }
            ],
            "title": "Payment Network"
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/MoneyOrder"
              },
              {
                "$ref": "#/components/schemas/fullAccountNumber"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Wire"
              },
              {
                "$ref": "#/components/schemas/fullAccountNumber"
              }
            ]
          }
        ]
      },
      "hideFailureReason": {
        "properties": {
          "failureReason": {
            "readOnly": true
          }
        },
        "type": "object"
      },
      "SendNoticePaymentMethodAdded": {
        "properties": {
          "sendNotice": {
            "default": true,
            "description": "When set to `true`, the system will send a `paymentMethodAdded` notice to the borrower.\n",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "paymentCardCardNumber": {
        "properties": {
          "cardNumber": {
            "description": "The card number.\nIf `isExternal=true` then only the last two, three, or four digits of the card number can be provided.\nProvide four digits if available, otherwise provide two or three digits.\n",
            "example": "4111111111111111",
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "cardNumber"
        ],
        "type": "object"
      },
      "paymentCheckAccountNumber": {
        "properties": {
          "accountNumber": {
            "description": "The account number.\nIf `isExternal=true` then the last two, three, or four digits of the account number can be provided.\nProvide four digits if available, otherwise provide two or three digits.\n",
            "pattern": "^[0-9]+$",
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "accountNumber"
        ],
        "type": "object"
      },
      "PlaidToken": {
        "example": {
          "accessToken": "public-sandbox-deadbeef-dead-beef-dead-beefdeadbeef",
          "accountIds": [
            "BnyjkeaawGiG7xgvV5noipAbVe6Edafwx3n97"
          ],
          "instrumentType": "plaid"
        },
        "properties": {
          "accessToken": {
            "description": "`public_token` provided by Plaid Link.\n\n**NOTE**: Plaid Link tokens are associated with a specific Plaid API key. If you are performing a Plaid Link in your app/website\nand pass it to the Peach API you will first need to set your Plaid API key in the Peach API. Please contact Peach Support\nto get access to the Plaid API Key setting endpoint and instructions on how to use it.\n\nIf you wish to use your own Plaid Link token in the sandbox environment, please contact Peach Support as you might need\nto configure your Plaid sandbox account in a certain way.\n",
            "type": "string"
          },
          "accountIds": {
            "description": "List of Plaid account IDs selected by user, provided by Plaid Link\n",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "externalId": {
            "description": "A lender's identifier for the instrument.\n\nAfter the object is successfully created, a lender can use ID or externalId identifiers to fetch the object.\n\nTo fetch the object using externalId you need to add `ext-` to the URL.\n\nNote: Don't add ext- to the identifier value. For example: if the external identifier is `ABCDE`, then pass externalId=ACBCE and NOT ext-ABCDE when creating the object.\n",
            "minLength": 1,
            "nullable": true,
            "type": "string"
          },
          "instrumentType": {
            "enum": [
              "plaid"
            ],
            "type": "string"
          }
        },
        "required": [
          "accessToken",
          "accountIds"
        ],
        "title": "Plaid Link",
        "type": "object"
      },
      "moneyOrderAccountNumber": {
        "properties": {
          "accountNumber": {
            "description": "The account number.\nIf `isExternal=true` then the last two, three, or four digits of the account number can be provided.\nProvide four digits if available, otherwise provide two or three digits.\n",
            "pattern": "^[0-9]+$",
            "type": "string",
            "writeOnly": true
          }
        },
        "type": "object"
      },
      "wireAccountNumber": {
        "properties": {
          "accountNumber": {
            "description": "The account number from where the wire was sent. Must consist of only digits.\nIf `isExternal=true` then the last two, three, or four digits of the account number can be provided.\nProvide four digits if available, otherwise provide two or three digits.\n",
            "pattern": "^[0-9]+$",
            "type": "string",
            "writeOnly": true
          }
        },
        "type": "object"
      },
      "PaymentInstrumentPost": {
        "oneOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/BankAccount"
              },
              {
                "$ref": "#/components/schemas/bankAccountAccountNumber"
              },
              {
                "$ref": "#/components/schemas/hideFailureReason"
              },
              {
                "$ref": "#/components/schemas/SendNoticePaymentMethodAdded"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentCard"
              },
              {
                "$ref": "#/components/schemas/paymentCardCardNumber"
              },
              {
                "$ref": "#/components/schemas/hideFailureReason"
              },
              {
                "$ref": "#/components/schemas/SendNoticePaymentMethodAdded"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentCheck"
              },
              {
                "$ref": "#/components/schemas/paymentCheckAccountNumber"
              },
              {
                "$ref": "#/components/schemas/hideFailureReason"
              }
            ]
          },
          {
            "allOf": [
              {
                "required": [
                  "instrumentType",
                  "employerName"
                ],
                "type": "object"
              },
              {
                "$ref": "#/components/schemas/Payroll"
              },
              {
                "$ref": "#/components/schemas/hideFailureReason"
              },
              {
                "$ref": "#/components/schemas/SendNoticePaymentMethodAdded"
              }
            ],
            "title": "Payroll"
          },
          {
            "allOf": [
              {
                "required": [
                  "instrumentType",
                  "paymentNetworkName"
                ],
                "type": "object"
              },
              {
                "$ref": "#/components/schemas/PaymentNetwork"
              },
              {
                "$ref": "#/components/schemas/hideFailureReason"
              },
              {
                "$ref": "#/components/schemas/SendNoticePaymentMethodAdded"
              }
            ],
            "title": "Payment Network"
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/PlaidToken"
              },
              {
                "$ref": "#/components/schemas/BankAccountMutableFields"
              },
              {
                "$ref": "#/components/schemas/hideFailureReason"
              },
              {
                "$ref": "#/components/schemas/SendNoticePaymentMethodAdded"
              },
              {
                "properties": {
                  "accountLink": {
                    "readOnly": true
                  },
                  "accountType": {
                    "readOnly": true
                  }
                },
                "type": "object"
              }
            ],
            "title": "Plaid Account"
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/MoneyOrder"
              },
              {
                "$ref": "#/components/schemas/moneyOrderAccountNumber"
              },
              {
                "$ref": "#/components/schemas/hideFailureReason"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Wire"
              },
              {
                "$ref": "#/components/schemas/wireAccountNumber"
              },
              {
                "$ref": "#/components/schemas/hideFailureReason"
              }
            ]
          }
        ]
      },
      "PaymentInstrument": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/BankAccount"
          },
          {
            "$ref": "#/components/schemas/PaymentCard"
          },
          {
            "$ref": "#/components/schemas/PaymentCheck"
          },
          {
            "allOf": [
              {
                "required": [
                  "instrumentType",
                  "employerName"
                ],
                "type": "object"
              },
              {
                "$ref": "#/components/schemas/Payroll"
              }
            ],
            "title": "Payroll"
          },
          {
            "allOf": [
              {
                "required": [
                  "instrumentType",
                  "paymentNetworkName"
                ],
                "type": "object"
              },
              {
                "$ref": "#/components/schemas/PaymentNetwork"
              }
            ],
            "title": "Payment Network"
          },
          {
            "$ref": "#/components/schemas/MoneyOrder"
          },
          {
            "$ref": "#/components/schemas/Wire"
          }
        ]
      },
      "SendNoticePaymentMethodUpdated": {
        "properties": {
          "sendNotice": {
            "default": true,
            "description": "When set to `true`, the system will send a `paymentMethodUpdated` notice to the borrower.\n",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "PaymentCardMutable": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaymentInstrumentMutableFields"
          },
          {
            "$ref": "#/components/schemas/PaymentCardMutableFields"
          }
        ],
        "title": "Card"
      },
      "PaymentInstrumentMutable": {
        "anyOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/BankAccountMutable"
              },
              {
                "$ref": "#/components/schemas/SendNoticePaymentMethodUpdated"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentCardMutable"
              },
              {
                "$ref": "#/components/schemas/SendNoticePaymentMethodUpdated"
              }
            ]
          },
          {
            "$ref": "#/components/schemas/PaymentCheckMutable"
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Payroll"
              },
              {
                "$ref": "#/components/schemas/SendNoticePaymentMethodUpdated"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentNetwork"
              },
              {
                "$ref": "#/components/schemas/SendNoticePaymentMethodUpdated"
              }
            ]
          }
        ]
      },
      "AccountLinkUpdate": {
        "properties": {
          "dataServices": {
            "default": [
              "accountInfo"
            ],
            "description": "A list of data services available with this link.",
            "items": {
              "enum": [
                "accountInfo",
                "balance"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "lastErrorCommunicationAt": {
            "description": "The date and time that the most recent error notification was sent to the user. When updated, `errorCommunicationsSent` is incremented.",
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AccountLinkBalanceEntry": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "availableBalanceAmount": {
                "description": "Indicates the balance that is available to spend net of any pending transactions. This balance should be used for insufficient funds (NSF) prevention use case.",
                "format": "float",
                "type": "number"
              },
              "createdAt": {
                "description": "The date and time when this entry was fetched from the account link."
              },
              "currency": {
                "description": "The currency used. Use ISO currency codes.",
                "type": "string"
              },
              "currentBalanceAmount": {
                "description": "Indicates the current balance that does not take pending transactions into account.",
                "format": "float",
                "type": "number"
              },
              "error": {
                "allOf": [
                  {
                    "description": "If present, details of the error returned from the account link."
                  },
                  {
                    "$ref": "#/components/schemas/AccountLinkError"
                  }
                ]
              },
              "lastSuccessfulBalance": {
                "description": "The most recent balance data from a successful check. If the most recent balance check resulted in an error, this object is populated with last successfully fetched balances, if they exist.",
                "properties": {
                  "availableBalanceAmount": {
                    "description": "Indicates the balance that is available to spend net of any pending transactions. This balance should be used for insufficient funds (NSF) prevention use case.",
                    "format": "float",
                    "type": "number"
                  },
                  "createdAt": {
                    "description": "The date and time when this data was fetched from the account link.",
                    "format": "date-time",
                    "type": "string"
                  },
                  "currency": {
                    "description": "The currency used. Use ISO currency codes.",
                    "type": "string"
                  },
                  "currentBalanceAmount": {
                    "description": "Indicates the current balance that does not take pending transactions into account.",
                    "format": "float",
                    "type": "number"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          }
        ]
      },
      "VerificationAttempt": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "isSuccess": {
            "description": "`true` if this attempt to answer the questions was successful.\n",
            "readOnly": true,
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "VerificationQuestionCategory": {
        "description": "The category of questions to include.\n\n- `inBorrowerPortal` indicates the answer to this question can\nbe found in the borrower portal.\n- `knownToBorrower` indicates the answer to this question\nis not found in borrower portal (and therefore must be known by the borrower).\n- `presetSecret` indicates the answer to this question was preconfigured by the borrower previously.\n",
        "enum": [
          "inBorrowerPortal",
          "knownToBorrower",
          "presetSecret"
        ],
        "type": "string"
      },
      "VerificationQuestion": {
        "properties": {
          "category": {
            "$ref": "#/components/schemas/VerificationQuestionCategory"
          },
          "id": {
            "type": "string"
          },
          "memo": {
            "description": "The text of the memo for the agent\n",
            "type": "string"
          },
          "text": {
            "description": "The text of the question\n",
            "type": "string"
          }
        },
        "type": "object"
      },
      "VerificationStatus": {
        "description": "The status of the verification.\n\n- `pending` - Verification is pending and answers can still be provided.\n- `succeeded` - Verification was successfully completed.\n- `failed` - Verification failed—the maximum number of answer attempts was reached.\n- `insufficientKnowledge` - Verification could not be created because there is not enough information about the person to generate questions.\n- `expired` - Verification timed out and was expired.\n",
        "enum": [
          "failed",
          "pending",
          "succeeded",
          "expired",
          "insufficientKnowledge"
        ],
        "readOnly": true,
        "type": "string"
      },
      "Verification": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "description": "Object describes a borrower verification process. When a borrower initiates a phone call their\nidentity should be verified before they are allowed to make changes to their account.\n",
            "properties": {
              "agentUserId": {
                "description": "An identifier of the agent performing the verification\n",
                "readOnly": true,
                "type": "string"
              },
              "attempts": {
                "description": "Represents the attempts to answer the questions associated with this borrower verification.\nThe responses are intentionally not included for privacy and security. There can only be a maximum\nof `maxAttempts`. There can only be one successful attempt. A successful attempt is one with\n`isSuccess` set to `true`.\n",
                "items": {
                  "$ref": "#/components/schemas/VerificationAttempt"
                },
                "readOnly": true,
                "type": "array"
              },
              "expiresAt": {
                "format": "date-time",
                "readOnly": true,
                "type": "string"
              },
              "maxAttempts": {
                "description": "The maximum number of times an attempt can be made to answer all the questions. If `maxAttempts`\nare made without success, then this verification's status is set to `failed`.\n",
                "readOnly": true,
                "type": "integer"
              },
              "object": {
                "default": "verification",
                "enum": [
                  "verification"
                ],
                "readOnly": true,
                "type": "string"
              },
              "personId": {
                "description": "An identifier of the borrower\n",
                "readOnly": true,
                "type": "string"
              },
              "questions": {
                "description": "The questions that were generated and must be answered.\n",
                "items": {
                  "$ref": "#/components/schemas/VerificationQuestion"
                },
                "readOnly": true,
                "type": "array"
              },
              "status": {
                "$ref": "#/components/schemas/VerificationStatus",
                "readOnly": true
              }
            },
            "type": "object"
          }
        ],
        "title": "verification"
      },
      "VerificationsPaging": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Paging"
          },
          {
            "properties": {
              "data": {
                "items": {
                  "$ref": "#/components/schemas/Verification"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "VerificationPost": {
        "properties": {
          "verificationTypeId": {
            "description": "The ID of the borrower verification type to use when creating the verification.\nIf `null`, then use the default borrower verification type.\n",
            "type": "string"
          }
        },
        "type": "object"
      },
      "VerificationAttemptPost": {
        "properties": {
          "answers": {
            "description": "The list of answers to the questions for this verification. Ordering is not important, but the\n`questionId` must match the ID of the question to which the answer corresponds. *All* of the\nanswers must match the stored information about the borrower in order for the verification\nto be successful.\n",
            "items": {
              "properties": {
                "questionId": {
                  "description": "The identifier for the question being answered.\n",
                  "type": "string"
                },
                "text": {
                  "description": "The response text. This must match the stored information about the user.\nDifferent questions have different methods for matching the response text. For instance, some\nquestions will match in a case-insensitive manner, or expect a date-formatted string, or\nallow for a few misspelled characters (e.g., in a name).\n",
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "Supercase": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseWithExternalIdMixin"
          },
          {
            "properties": {
              "autoCreated": {
                "description": "True if the supercase was created by some automated method.\n",
                "type": "boolean"
              },
              "companyId": {
                "description": "The company's ID",
                "readOnly": true,
                "type": "string"
              },
              "createdBy": {
                "$ref": "#/components/schemas/UserActionInfo",
                "description": "Details of the user responsible for creating the supercase.\nCan be an agent or automated system process.\n"
              },
              "description": {
                "description": "A description of the supercase and/or the precipitating event\nof the supercase.\n",
                "nullable": true,
                "type": "string"
              },
              "eventStartedAt": {
                "description": "The date and time at which the precipitating event took place. For instance, in the\ncase of a bug, the earliest date at which the bug affected customers; in the case\nof a disaster, the date at which the disaster occurred.\n",
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "femaDisasterDetails": {
                "description": "The details of the associated FEMA disaster.",
                "nullable": true,
                "properties": {
                  "beginDate": {
                    "description": "Date the incident itself began.",
                    "format": "date",
                    "nullable": true,
                    "type": "string"
                  },
                  "declarationDate": {
                    "description": "Date the disaster was declared.\n",
                    "format": "date",
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "endDate": {
                    "description": "Date the incident itself ended.",
                    "format": "date",
                    "nullable": true,
                    "type": "string"
                  },
                  "hmProgramDeclared": {
                    "description": "Denotes whether the Hazard Mitigation program was declared for this\ndisaster. For more information on the program,\nplease visit: www.fema.gov.\n",
                    "type": "boolean"
                  },
                  "iaProgramDeclared": {
                    "description": "Denotes whether the Individual Assistance program was declared\nfor this disaster. For more information on the program,\nplease visit: www.fema.gov.\n",
                    "type": "boolean"
                  },
                  "ihProgramDeclared": {
                    "description": "Denotes whether the Individuals and Households program was declared\nfor this disaster. For more information on the program,\nplease visit: www.fema.gov.\n",
                    "type": "boolean"
                  },
                  "impactedAreas": {
                    "items": {
                      "properties": {
                        "countyArea": {
                          "type": "string"
                        },
                        "placeCode": {
                          "type": "string"
                        },
                        "state": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "incidentType": {
                    "description": "Type of incident such as fire or flood. The incident type will\naffect the types of assistance available. For more information on\nincident types, please visit: www.fema.gov.\n",
                    "maxLength": 100,
                    "type": "string"
                  },
                  "lastRefreshAt": {
                    "description": "Date the record was last updated in the FEMA API data store.",
                    "format": "date-time",
                    "nullable": true,
                    "type": "string"
                  },
                  "paProgramDeclared": {
                    "description": "Denotes whether the Public Assistance program was declared for this\ndisaster. For more information on the program,\nplease visit: www.fema.gov.\n",
                    "type": "boolean"
                  }
                },
                "readOnly": true,
                "type": "object"
              },
              "femaDisasterNumber": {
                "description": "The associated FEMA disaster number.\n",
                "type": "integer"
              },
              "femaMonitoringEndDate": {
                "description": "If set, the FEMA supercase monitoring will stop after this date.\n",
                "format": "date",
                "nullable": true,
                "type": "string"
              },
              "name": {
                "description": "Name of the supercase.",
                "maxLength": 128,
                "type": "string"
              },
              "object": {
                "default": "supercase",
                "enum": [
                  "supercase"
                ],
                "readOnly": true,
                "type": "string"
              },
              "outcome": {
                "$ref": "#/components/schemas/ProcessOutcome"
              },
              "status": {
                "$ref": "#/components/schemas/ProcessStatus"
              },
              "statusUpdatedAt": {
                "description": "The date and time at which the status was last updated on this supercase.",
                "format": "date-time",
                "nullable": true,
                "readOnly": true,
                "type": "string"
              },
              "subcaseName": {
                "description": "The name of the subcase which will be used when creating new subcases for this supercase.\n",
                "nullable": true,
                "type": "string"
              },
              "subcaseTypeId": {
                "description": "The ID of the case-type which will be used when creating new subcases for this supercase.\nWhen a population is committed (by settings its `isDraft: false`) subcases of this type\nare created for all members of the population.\n\nNotes:\n- This is different from the `supercaseType`\n- This must be NOT null in order to commit a population.\n",
                "nullable": true,
                "type": "string"
              },
              "supercaseType": {
                "$ref": "#/components/schemas/SupercaseType"
              }
            },
            "type": "object"
          }
        ],
        "description": "A supercase allows for the management of many subcases. It is useful, for\ninstance, when there is an issue which effects a large group of borrowers.\n"
      },
      "SupercaseCollection": {
        "items": {
          "$ref": "#/components/schemas/Supercase"
        },
        "type": "array"
      },
      "BulkSendRequestBody": {
        "properties": {
          "attachments": {
            "description": "An optional list of documents to attach to the outgoing email.\n",
            "items": {
              "description": "A document descriptor ID.",
              "type": "string"
            },
            "type": "array"
          },
          "channel": {
            "$ref": "#/components/schemas/InteractionChannel"
          },
          "context": {
            "type": "object"
          },
          "isTransactional": {
            "type": "boolean"
          },
          "subject": {
            "$ref": "#/components/schemas/InteractionSubject"
          },
          "theme": {
            "$ref": "#/components/schemas/InteractionTheme"
          }
        },
        "required": [
          "subject"
        ],
        "type": "object"
      },
      "SupercaseBulkOperation": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "casesFailed": {
                "description": "The number of cases on which the operation failed.",
                "type": "integer"
              },
              "casesIneligible": {
                "description": "The number of cases on which the operation could not succeed due\nto external factors. For example, if your operation requires the\nsubcase to be open to have any meaningful effect, then a closed\nsubcase would be considered ineligible.\n",
                "type": "integer"
              },
              "casesProcessed": {
                "description": "The total number of processed and/or ineligible subcases.",
                "type": "integer"
              },
              "completed": {
                "description": "Set to `true` if operation is completed.",
                "type": "boolean"
              },
              "createdBy": {
                "$ref": "#/components/schemas/UserActionInfo",
                "description": "Details of the user responsible for creating the supercase.\nCan be an agent or automated system process.\n"
              },
              "errorLog": {
                "description": "List of error reports for each failed subcase level operations.",
                "items": {
                  "type": "object"
                },
                "type": "array"
              },
              "finishedAt": {
                "description": "The time operation finished.",
                "format": "date-time",
                "type": "string"
              },
              "object": {
                "default": "SupercaseBulkOperation",
                "enum": [
                  "SupercaseBulkOperation"
                ],
                "readOnly": true,
                "type": "string"
              },
              "startedAt": {
                "description": "The time operation started.",
                "format": "date-time",
                "type": "string"
              },
              "supercaseId": {
                "readOnly": true,
                "type": "string"
              }
            },
            "type": "object"
          },
          {
            "anyOf": [
              {
                "properties": {
                  "firstInteraction": {
                    "nullable": true,
                    "type": "object"
                  },
                  "noteId": {
                    "nullable": true,
                    "type": "string"
                  },
                  "operationType": {
                    "description": "The different types of bulk operations.",
                    "enum": [
                      "update"
                    ],
                    "readOnly": true,
                    "type": "string"
                  },
                  "requestBody": {
                    "$ref": "#/components/schemas/CasePut",
                    "description": "The body of the bulk operation request",
                    "readOnly": true
                  }
                },
                "title": "update",
                "type": "object"
              },
              {
                "properties": {
                  "firstInteraction": {
                    "$ref": "#/components/schemas/Interaction"
                  },
                  "noteId": {
                    "nullable": true,
                    "type": "string"
                  },
                  "operationType": {
                    "description": "The different types of bulk operations.",
                    "enum": [
                      "sendMessage"
                    ],
                    "readOnly": true,
                    "type": "string"
                  },
                  "requestBody": {
                    "$ref": "#/components/schemas/BulkSendRequestBody",
                    "description": "The body of the bulk operation request",
                    "readOnly": true
                  }
                },
                "title": "sendMessage",
                "type": "object"
              },
              {
                "properties": {
                  "firstInteraction": {
                    "nullable": true,
                    "type": "object"
                  },
                  "noteId": {
                    "nullable": true,
                    "type": "string"
                  },
                  "operationType": {
                    "description": "The different types of bulk operations.",
                    "enum": [
                      "createDoNotInteract"
                    ],
                    "readOnly": true,
                    "type": "string"
                  },
                  "requestBody": {
                    "$ref": "#/components/schemas/DoNotInteract",
                    "description": "The body of the bulk operation request",
                    "readOnly": true
                  }
                },
                "title": "createDoNotInteract",
                "type": "object"
              },
              {
                "properties": {
                  "firstInteraction": {
                    "nullable": true,
                    "type": "object"
                  },
                  "noteId": {
                    "nullable": true,
                    "type": "string"
                  },
                  "operationType": {
                    "description": "The different types of bulk operations.",
                    "enum": [
                      "deleteDoNotInteract"
                    ],
                    "readOnly": true,
                    "type": "string"
                  },
                  "requestBody": {
                    "nullable": true,
                    "readOnly": true,
                    "type": "object"
                  }
                },
                "title": "deleteDoNotInteract",
                "type": "object"
              },
              {
                "properties": {
                  "firstInteraction": {
                    "nullable": true,
                    "type": "object"
                  },
                  "noteId": {
                    "nullable": false,
                    "type": "string"
                  },
                  "operationType": {
                    "description": "The different types of bulk operations.",
                    "enum": [
                      "sendInstructionsByTask"
                    ],
                    "readOnly": true,
                    "type": "string"
                  },
                  "requestBody": {
                    "$ref": "#/components/schemas/NoteRequest",
                    "description": "The body of the bulk operation request",
                    "readOnly": true
                  }
                },
                "title": "sendInstructionsByTask",
                "type": "object"
              }
            ]
          }
        ]
      },
      "MemberBulkOperationResult": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "borrowerId": {
                "description": "The ID of the borrower associated with this member",
                "readOnly": true,
                "type": "string"
              },
              "caseId": {
                "description": "The ID of the subcase associated with this member",
                "readOnly": true,
                "type": "string"
              },
              "populationMembershipId": {
                "description": "The ID of the population membership",
                "readOnly": true,
                "type": "string"
              },
              "status": {
                "description": "The status of the bulk operation",
                "enum": [
                  "success",
                  "failed",
                  "notProcessed"
                ],
                "readOnly": true,
                "type": "string"
              },
              "supercaseBulkOperationId": {
                "description": "Supercase bulk operation ID",
                "readOnly": true,
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "description": "A member bulk operation result represents the result of a bulk operation\non a single member of a supercase population.\n"
      },
      "TargetPopulation": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseWithExternalIdMixin"
          },
          {
            "properties": {
              "populationId": {
                "description": "The ID of the population",
                "readOnly": true,
                "type": "string"
              },
              "supercaseBulkOperationId": {
                "description": "Supercase bulk operation ID",
                "readOnly": true,
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "description": "A target population represents a committed population that will be affected\nby the supercase bulk operation. Each supercase bulk operation would\nprocess one or more target populations.\n"
      },
      "Population": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseWithExternalIdMixin"
          },
          {
            "properties": {
              "companyId": {
                "description": "The unique company identifier.",
                "readOnly": true,
                "type": "string"
              },
              "isDraft": {
                "description": "`True` if this is the draft population of the supercase.\n",
                "readOnly": true,
                "type": "boolean"
              },
              "object": {
                "default": "population",
                "enum": [
                  "population"
                ],
                "readOnly": true,
                "type": "string"
              },
              "supercaseId": {
                "description": "Identifier of the supercase that the population belongs to.",
                "readOnly": true,
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "description": "A supercase may affect many borrower-loans. A supercase population represents one instance\nof adding borrower-loans to a supercase. It's important to keep track of which borrower-loans\nwere added at which time, because different actions may need to be taken depending on\nwhen a borrower-loan is added to a supercase.\n"
      },
      "PopulationCollection": {
        "items": {
          "$ref": "#/components/schemas/Population"
        },
        "type": "array"
      },
      "PopulationMember": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "borrowerId": {
                "description": "The borrower ID of a borrower affected by this supercase.\n\nYou must specify a borrower in addition to a loan because a loan might have multiple borrowers\nand only one of them might be affected by this supercase.\n",
                "type": "string"
              },
              "caseId": {
                "description": "The ID of the subcase with which this borrower-loan is associated",
                "readOnly": true,
                "type": "string"
              },
              "createdBy": {
                "$ref": "#/components/schemas/UserActionInfo",
                "description": "Details of the user responsible for creating the member.\nCan be an agent or automated system process.\n"
              },
              "loanId": {
                "description": "The loan ID of a loan affected by this supercase. The loan must be associated with the\nspecified borrower.\n",
                "nullable": true,
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "PopulationMemberCollection": {
        "items": {
          "$ref": "#/components/schemas/PopulationMember"
        },
        "type": "array"
      },
      "User": {
        "allOf": [
          {
            "$ref": "#/components/schemas/UserBasic"
          },
          {
            "properties": {
              "employee": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Employee"
                  },
                  {
                    "readOnly": true
                  }
                ]
              },
              "person": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Borrower",
                    "nullable": true
                  },
                  {
                    "readOnly": true
                  }
                ]
              }
            },
            "type": "object"
          }
        ]
      },
      "UsersPaging": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NewPaginator"
          },
          {
            "properties": {
              "data": {
                "items": {
                  "$ref": "#/components/schemas/User"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "UserUpdate": {
        "allOf": [
          {
            "$ref": "#/components/schemas/UserBase"
          },
          {
            "properties": {
              "associatedPersonId": {
                "description": "**DEPRECATED ATTRIBUTE** Use `borrowerId`.\n\nThe ID of the borrower to be associated with this user.\nOnly applicable when `userType` is set to `borrower`.\n",
                "nullable": true,
                "type": "string"
              },
              "borrowerId": {
                "description": "The ID of the borrower to be associated with this user.\nOnly applicable when `userType` is set to `borrower`.\n",
                "nullable": true,
                "type": "string"
              },
              "roles": {
                "description": "**DEPRECATED ATTRIBUTE** Use `roleIds`.\n\nList of role IDs to associate with this user upon creation.\n",
                "items": {
                  "type": "string"
                },
                "nullable": true,
                "type": "array"
              },
              "userType": {
                "description": "**DEPRECATED ATTRIBUTE** Use `type`.\n",
                "enum": [
                  "borrower",
                  "agent",
                  "service"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "UserCreate": {
        "allOf": [
          {
            "$ref": "#/components/schemas/UserUpdate"
          },
          {
            "properties": {
              "authType": {
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "samlSubjectNameId": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          }
        ]
      },
      "NewPassword": {
        "properties": {
          "password": {
            "description": "The new password to use. Only applicable for `basic` auth.\n",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "NewEmailAuth": {
        "allOf": [
          {
            "properties": {
              "email": {
                "description": "The email address to use for the new auth.\n",
                "type": "string"
              }
            },
            "required": [
              "email"
            ],
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/NewPassword"
          }
        ]
      },
      "NewPhoneAuth": {
        "allOf": [
          {
            "properties": {
              "phone": {
                "description": "The phone number to use for the new auth.\n",
                "type": "string"
              }
            },
            "required": [
              "phone"
            ],
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/NewPassword"
          }
        ]
      },
      "NewSAMLAuth": {
        "allOf": [
          {
            "properties": {
              "samlSubjectNameId": {
                "description": "The SAML subject name ID to use for the new auth.\n",
                "type": "string"
              }
            },
            "required": [
              "samlSubjectNameId"
            ],
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/NewPassword"
          }
        ]
      },
      "NewAuth": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/NewEmailAuth"
          },
          {
            "$ref": "#/components/schemas/NewPhoneAuth"
          },
          {
            "$ref": "#/components/schemas/NewSAMLAuth"
          }
        ]
      },
      "Permission": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "description": "A permission is assigned to a role, which allows designated users within a company to perform an action\n",
            "properties": {
              "action": {
                "description": "The name of the handler function that is allowed",
                "type": "string"
              },
              "companyId": {
                "description": "Unique ID for the company that owns the permission",
                "type": "string"
              }
            },
            "title": "permission",
            "type": "object"
          }
        ]
      },
      "Role": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "description": "A role is a collection of permitted actions that can be performed by a user within the context of a single\ncompany.\n",
            "properties": {
              "alias": {
                "description": "An optional Human-readable instance name",
                "maxLength": 100,
                "minLength": 0,
                "nullable": true,
                "type": "string"
              },
              "companyId": {
                "description": "Company that the role is associated with",
                "readOnly": true,
                "type": "string"
              },
              "isSuperAdmin": {
                "description": "Whether this role has super-admin status. Only super-admin roles can hold super-admin permissions.\nSuper-admin roles are reserved for Peach.\n",
                "readOnly": true,
                "type": "boolean"
              },
              "permissions": {
                "description": "Array of Permission objects associated with the role",
                "items": {
                  "$ref": "#/components/schemas/Permission"
                },
                "nullable": true,
                "readOnly": true,
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "RoleCollection": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Paging"
          },
          {
            "properties": {
              "data": {
                "items": {
                  "$ref": "#/components/schemas/Role"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "VerificationQuestionsPaging": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Paging"
          },
          {
            "properties": {
              "data": {
                "items": {
                  "$ref": "#/components/schemas/VerificationQuestion"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "VerificationType": {
        "description": "The object describing how to perform borrower verifications\n",
        "properties": {
          "enabledQuestionIds": {
            "description": "List of question IDs the system will consider when randomly selecting questions\nfor verification; if `null` then all available questions will be considered.\n(<a href=\"/api-docs/api-public/verification-types/peach.borrower_verification.handlers.borrower_verification_questions_get_all\">See all available questions</a>).\n",
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "expirationInSecs": {
            "default": 900,
            "description": "How many seconds each verification session has until it is marked as expired.\n",
            "type": "integer"
          },
          "id": {
            "readOnly": true,
            "type": "string"
          },
          "maxAttemptsPerSession": {
            "default": 3,
            "description": "The number of attempts to answer the verification questions a borrower is allowed.\n",
            "type": "integer"
          },
          "maxSessionsRecentPast": {
            "default": 2,
            "description": "Throttles maximum verification sessions a borrower can initiate within\n\"the recent past\". Where recent past time length is configured via `recentPastSecs`.\n",
            "type": "integer"
          },
          "questionSelectionCriteria": {
            "description": "Object describing which and how many questions (at a minimum) to select at random.\n(Only questions with IDs present in `enabledQuestionIds` will be considered.)\n",
            "items": {
              "properties": {
                "category": {
                  "$ref": "#/components/schemas/VerificationQuestionCategory"
                },
                "exactMatchCount": {
                  "description": "The number of questions matching this type to include.\n",
                  "type": "integer"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "recentPastSecs": {
            "default": 3600,
            "description": "The number of seconds into the past which is considered the \"recent past\"\nfor the purposes of throttling verifications. See: `maxSessionsRecentPast`.\n",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "VerificationTypesPaging": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NewPaginator"
          },
          {
            "properties": {
              "data": {
                "items": {
                  "$ref": "#/components/schemas/VerificationType"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "eventTypesPublic": {
        "enum": [
          "autopay.schedule.cancel",
          "autopay.schedule.created",
          "autopay.payment.rescheduled",
          "autopay.payment.canceled",
          "card.created",
          "card.replacement.requested",
          "card.status.changed",
          "case.association.added",
          "case.association.removed",
          "case.donotinteract.created",
          "case.donotinteract.deleted",
          "case.donotinteract.updated",
          "case.donotinteract.changed",
          "case.donotinteract.expired",
          "case.escalation.changed",
          "case.created",
          "case.updated",
          "case.deleted",
          "case.changed",
          "communication.send",
          "indexrate.created",
          "indexrate.updated",
          "loan.closed",
          "loan.created",
          "loan.current",
          "loan.fee.capitalized",
          "loan.credit.limit.changed",
          "draw.credit.limit.changed",
          "draw.fee.booked",
          "loan.balance.changed",
          "loan.foreigntransactionfee.booked",
          "loan.overdue",
          "loan.overdue.update",
          "loan.interestaccrued.min",
          "loan.interest.capitalized",
          "loan.statuschanged",
          "loan.latefee.booked",
          "loan.migration.succeeded",
          "loan.migration.failed",
          "loan.modificationfee.booked",
          "loan.nsffee.booked",
          "loan.fee.booked",
          "loan.fee.canceled",
          "loan.fee.changed",
          "loan.label.added",
          "loan.label.removed",
          "loan.remainingbalances.deferred",
          "loan.promoprogram.activated",
          "loan.promoprogram.canceled",
          "loan.promoprogram.created",
          "loan.promoprogram.exercised",
          "loan.promoprogram.reactivated",
          "loan.promoprogram.updated",
          "loan.paymentplan.setup",
          "loan.promiseplan.created",
          "loan.promiseplan.statuschanged",
          "loan.promiseplan.due.today",
          "loan.promiseplan.overdue",
          "loan.promiseplan.current",
          "loan.purchasefee.booked",
          "loan.duedate.defer",
          "loan.schedule.defer",
          "loan.ownerchanged",
          "loan.rate.created",
          "loan.rate.updated",
          "loan.refunded",
          "loan.reimbursement.initiated",
          "loan.reimbursement.processed",
          "loan.period.started",
          "loan.obligation.statuschanged",
          "loan.servicefee.booked",
          "loan.membershipfee.booked",
          "statement.created",
          "paymentplan.created",
          "paymentplan.statuschanged",
          "person.created",
          "person.consent.updated",
          "person.monitoring.scra.started",
          "person.monitoring.bankruptcy.started",
          "contact.created",
          "contact.deleted",
          "contact.updated",
          "payment.instrument.created",
          "payment.instrument.updated",
          "payment.instrument.deactivated",
          "interaction.blocked",
          "payment.applied",
          "payment.chargeback",
          "payment.chargeback.reversed",
          "payment.failed",
          "payment.initiated",
          "payment.pending",
          "payment.succeeded",
          "payment.reversed",
          "payment.scheduled",
          "payment.rescheduled",
          "payment.due.today",
          "payment.hold.days.expired",
          "purchase.authorized",
          "purchase.settled",
          "purchase.applied",
          "purchase.changed",
          "purchase.created",
          "purchase.dispute.created",
          "purchase.dispute.updated",
          "loan.creditreporting.created",
          "loan.creditreporting.stopped",
          "ach.file.created",
          "ach.file.upload.attempted",
          "ach.file.upload.failed",
          "ach.file.upload.succeeded",
          "reconciliation.payment.failed",
          "supercase.changed"
        ]
      },
      "WebhookDirectDetails": {
        "description": "The details required for Peach to pass the events via webhook. Required only if `webhookType=direct`.\n",
        "properties": {
          "webhookUrl": {
            "description": "The URL that Peach will hit when an applicable event fires.\n",
            "type": "string"
          }
        },
        "type": "object"
      },
      "WebhookProxyDetails": {
        "description": "The details required for Peach to make an API call to the third party identified in the `webhookType`.\nRequired only if `webhookType=proxyXXX`.\n",
        "properties": {
          "galileoApiLogin": {
            "description": "The Galileo API login needed to make API calls via Peach's proxy.\n",
            "type": "string",
            "writeOnly": true
          },
          "galileoApiTransKey": {
            "description": "The Galileo API key needed to make API calls via Peach's proxy.\n",
            "type": "string",
            "writeOnly": true
          },
          "galileoBaseUrl": {
            "description": "The Galileo base URL.",
            "type": "string"
          },
          "galileoProviderId": {
            "description": "The Galileo provider ID.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "WebhookSubscriptionPut": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMixin"
          },
          {
            "properties": {
              "companyId": {
                "description": "The unique company identifier.\n",
                "readOnly": true,
                "type": "string"
              },
              "enabled": {
                "default": true,
                "description": "If `true` events will be sent to this webhook, if `false` no events will be sent to it.",
                "type": "boolean"
              },
              "hmacSecretKey": {
                "description": "This automatically generated key will be used to compute the message signature of each request from Peach to\nauthenticate the message and validate the message's integrity. Peach uses SHA-256 to generate the message signature,\nwhich will be passed in the request via a header called `X-PEACH-HMAC`.\n",
                "readOnly": true,
                "type": "string"
              },
              "hydrateData": {
                "default": false,
                "description": "Indicates the amount of information the receiver of webhooks will get. Only applicable if `webhookType=direct`.\n- `false` - Peach will provide a minimum amount of data. For example: event identifier, event name, timestamp and\n  identifier(s) of associated object(s) (e.g. loan ID, borrower ID, transaction ID, etc.)\n- `true` - in addition to the data provided in the `false` option, Peach will provide full details of the object(s)\n  associated with the event.\n\nCurrently we support hydrating the following objects:\n  - `borrower`\n  - `loan`\n  - `transaction`\n  - `case`\n",
                "type": "boolean"
              },
              "webhookDirectDetails": {
                "$ref": "#/components/schemas/WebhookDirectDetails"
              },
              "webhookProxyDetails": {
                "$ref": "#/components/schemas/WebhookProxyDetails"
              }
            },
            "type": "object"
          }
        ]
      },
      "WebhookSubscription": {
        "allOf": [
          {
            "properties": {
              "eventTypes": {
                "description": "The list of events for which the caller will receive webhooks.\nFor any proxy `webhookType`, this field should be left empty, and we will automatically send the events\nassociated with that specific proxy.\n",
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/eventTypesPublic"
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "type": "array"
              },
              "webhookType": {
                "description": "Peach supports two ways of receiving webhooks:\n- `direct` - events will be provided directly to the url nominated by the lender, and the event data will match Peach's data format.\n- `proxyGalileo` - events will trigger Peach to make specific API calls to Galileo, so Galileo's sub-ledger remains in sync with Peach's ledger.\n\nNote: when setting webhookType as `proxyGalileo`, please work with the Peach team to ensure the API calls you require are configured.\n",
                "enum": [
                  "direct",
                  "proxyGalileo"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/WebhookSubscriptionPut"
          }
        ]
      },
      "Error": {
        "properties": {
          "data": {
            "description": "Additional data about the error.",
            "nullable": true,
            "type": "object"
          },
          "detail": {
            "description": "**Deprecated**. Use `message` instead. Same contents as `message`.\n",
            "nullable": true,
            "type": "string"
          },
          "errorType": {
            "description": "Error code.",
            "type": "string"
          },
          "message": {
            "description": "Description of the server action or error.",
            "type": "string"
          },
          "status": {
            "description": "HTTP status code.",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "InvalidInput": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "InvalidInput"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  400
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "BadRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "BadRequest"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  400
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "InvalidJSON": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "description": "The request body is not valid JSON.",
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "InvalidJSON"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  400
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "InvalidSpecificDays": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "description": "The provided specific statement and/or due dates are invalid.\n",
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "InvalidSpecificDays"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  400
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "InvalidPublicId": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "InvalidPublicId"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  422
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "UnprocessableEntity": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "UnprocessableEntity"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  422
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "Unauthorized": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "description": "The user is not authenticated.",
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "Unauthorized"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  401
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "Forbidden": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "description": "The user is not authorized to perform the action.",
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "Forbidden"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  403
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "NotFound": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "NotFound"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  404
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "UrlNotDefined": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "description": "The requested URL is not defined.",
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "UrlNotDefined"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  404
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "TemplateDisabled": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "TemplateDisabled"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  409
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "NoSuitableContact": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "description": "No borrower contact matching the given criteria was found.",
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "NoSuitableContact"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  409
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "UndefinedTemplateVariable": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "description": "The template variable could not render due to a missing variable.",
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "UndefinedTemplateVariable"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  400
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "BadExternalServiceCredentials": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "description": "The credentials provided for an external service are invalid.",
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "BadExternalServiceCredentials"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  400
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "TemplateSyntax": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "TemplateSyntax"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  409
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "Duplicate": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "description": "The resource already exists.",
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "Duplicate"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  409
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "ConfigMismatch": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "description": "The requested operation is not compatible with the current configuration.",
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "ConfigMismatch"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  409
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "CompanyConfigMismatch": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "description": "The company is configured in a way that is incompatible with the requested operation",
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "CompanyConfigMismatch"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  409
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "LoanLocked": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "description": "The loan is currently locked for processing.",
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "LoanLocked"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  423
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "CardLocked": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "description": "Purchase processing still running for this card.",
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "CardLocked"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  409
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "InternalServerError": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "description": "An unexpected error occurred.",
            "properties": {
              "errorId": {
                "description": "Unique error identifier to share with support.",
                "format": "uuid",
                "type": "string"
              },
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "InternalServerError"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  500
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "ReadReplicaNotReady": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "description": "The read replica is not ready.",
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "ReadReplicaNotReady"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  412
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "Timeout": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "description": "A timeout occurred while processing the request.",
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "Timeout"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  504
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "MinPaymentConfiguration": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "description": "An invalid min payment configuration was supplied.",
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "MinPaymentConfiguration"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  400
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "MigratedLoanReverseAccelerationOrChargeOff": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "description": "Cannot reverse accelerate or charge off a migrated loan that was accelerated/charged off before migration cutoff date.",
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "MigratedLoanReverseAccelerationOrChargeOff"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  400
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "RulesCodeSyntaxError": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "description": "Rules code contains a syntax error and cannot be processed.\n",
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "RulesCodeSyntaxError"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  400
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      },
      "InactiveCompany": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "description": "Communications are blocked because the company is inactive.",
            "properties": {
              "errorType": {
                "description": "Error code.",
                "enum": [
                  "InactiveCompany"
                ],
                "type": "string"
              },
              "status": {
                "description": "HTTP status code.",
                "enum": [
                  409
                ],
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "x-tags": [
          "Errors"
        ]
      }
    },
    "securitySchemes": {
      "apiKeyHeader": {
        "in": "header",
        "name": "X-API-KEY",
        "type": "apiKey",
        "x-apikeyInfoFunc": "peach.security.handlers.api_key_auth",
        "x-scopeValidateFunc": "peach.security.handlers.scope_validate"
      },
      "bearerAuth": {
        "bearerFormat": "JWT",
        "scheme": "bearer",
        "type": "http",
        "x-bearerInfoFunc": "peach.security.handlers.bearer_auth",
        "x-scopeValidateFunc": "peach.security.handlers.scope_validate"
      },
      "bearerAuthQuery": {
        "in": "query",
        "name": "token",
        "type": "apiKey",
        "x-apikeyInfoFunc": "peach.security.handlers.bearer_auth",
        "x-scopeValidateFunc": "peach.security.handlers.scope_validate"
      },
      "oauth2": {
        "flows": {},
        "type": "oauth2",
        "x-scopeValidateFunc": "peach.security.handlers.scope_validate",
        "x-tokenInfoFunc": "peach.security.handlers.oauth2"
      }
    },
    "parameters": {
      "companyId": {
        "description": "The unique company identifier.",
        "in": "path",
        "name": "companyId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "sortBy": {
        "description": "The data attributes by which to sort the results.",
        "in": "query",
        "name": "sortBy",
        "required": false,
        "schema": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "limit": {
        "description": "The maximum count of results to retrieve.",
        "in": "query",
        "name": "limit",
        "required": false,
        "schema": {
          "default": 25,
          "maximum": 100,
          "minimum": 1,
          "type": "integer"
        }
      },
      "startingAfter": {
        "description": "Return results starting after the provided object identifier.",
        "in": "query",
        "name": "startingAfter",
        "schema": {
          "type": "string"
        }
      },
      "endingBefore": {
        "description": "Return results ending before the provided object identifier.",
        "in": "query",
        "name": "endingBefore",
        "schema": {
          "type": "string"
        }
      },
      "offset": {
        "description": "Offset from the start of results.",
        "in": "query",
        "name": "offset",
        "required": false,
        "schema": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "companyIdQuery": {
        "description": "The unique company identifier.",
        "in": "query",
        "name": "companyId",
        "schema": {
          "minimum": 1,
          "type": "string"
        }
      },
      "domainQuery": {
        "description": "A valid domain associated with a company",
        "in": "query",
        "name": "domain",
        "schema": {
          "type": "string"
        }
      },
      "userTypeQuery": {
        "description": "User type.",
        "in": "query",
        "name": "userType",
        "schema": {
          "type": "string"
        }
      },
      "authTypeQuery": {
        "description": "The authentication type to explicitly use\n",
        "in": "query",
        "name": "authType",
        "schema": {
          "$ref": "#/components/schemas/AuthType"
        }
      },
      "authValueTypeQuery": {
        "description": "The authentication value type to explicitly use\n",
        "in": "query",
        "name": "authValueType",
        "schema": {
          "$ref": "#/components/schemas/AuthValueType"
        }
      },
      "appDomainTypeQuery": {
        "description": "App Domain Type.",
        "in": "query",
        "name": "appDomainType",
        "schema": {
          "$ref": "#/components/schemas/AppDomainType"
        }
      },
      "bulkSenderId": {
        "in": "path",
        "name": "bulkSenderId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "contactExporterId": {
        "description": "The contactExporter object unique identifier.",
        "in": "path",
        "name": "contactExporterId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "borrowerCampaignId": {
        "in": "path",
        "name": "borrowerCampaignId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "borrowerCampaignRunId": {
        "in": "path",
        "name": "borrowerCampaignRunId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "downloadFile": {
        "description": "Specify which file should be downloaded from this campaign run. The requested files will be returned as a `.zip` file.\n\n- `query_results.csv` - A CSV formatted file of the query results received from Redash\n- `campaign_input.json` - A JSON formatted file of the parsed query results used as input to the campaign\n- `contacts.csv` - The exported contacts as CSV—i.e., the output.\n- `log.txt` - A log of the campaign run process.\n",
        "in": "query",
        "name": "file",
        "schema": {
          "default": "all",
          "enum": [
            "all",
            "query_results.csv",
            "campaign_input.json",
            "contacts.csv",
            "log.txt"
          ],
          "type": "string"
        }
      },
      "cardIssuerId": {
        "description": "The ID of the card issuer",
        "in": "path",
        "name": "cardIssuerId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "loanTypeIdFilter": {
        "description": "Use this to limit results to a specific lender product.",
        "in": "query",
        "name": "loanTypeId",
        "schema": {
          "items": {
            "$ref": "#/components/schemas/AnyId"
          },
          "type": "array"
        }
      },
      "smartReviewsEnable": {
        "description": "Filter for case types that have enabled smart review tasks.\n",
        "in": "query",
        "name": "smartReviewsEnable",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "caseTypeId": {
        "description": "The case type unique identifier.\n",
        "in": "path",
        "name": "caseTypeId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "version": {
        "description": "Optional argument. If provided, the action will be performed on the specified `version`.",
        "in": "query",
        "name": "version",
        "schema": {
          "format": "int32",
          "type": "integer"
        }
      },
      "caseTypeSmartReviewsAsOfDate": {
        "description": "What date to process smart review criterion. If `null`, process today. Can\nnot be a date in the future.\n",
        "in": "query",
        "name": "asOfDate",
        "schema": {
          "format": "date",
          "type": "string"
        }
      },
      "expand": {
        "description": "Replace component IDs with corresponding objects",
        "in": "query",
        "name": "expand",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "includeFields": {
        "description": "A comma separated list of field names to include in the response.\n",
        "in": "query",
        "name": "include",
        "schema": {
          "items": {
            "type": "string"
          },
          "minItems": 1,
          "type": "array"
        }
      },
      "associations": {
        "description": "Type of related object to return with the case data.\n- If `null`, no references to related objects are inserted into the response.\n- If `all`, insert an array of all relations\n- Otherwise insert array of single type.\n",
        "in": "query",
        "name": "associations",
        "required": false,
        "schema": {
          "enum": [
            "all",
            "documents",
            "cases",
            "interactions",
            "loans"
          ],
          "type": "string"
        }
      },
      "caseOutcome": {
        "in": "query",
        "name": "outcome",
        "required": false,
        "schema": {
          "enum": [
            "all",
            "approved",
            "denied",
            "falsePositive",
            "noOutcome"
          ],
          "type": "string"
        }
      },
      "caseStatus": {
        "in": "query",
        "name": "status",
        "required": false,
        "schema": {
          "enum": [
            "all",
            "initiated",
            "processing",
            "completed",
            "canceled",
            "reopened"
          ],
          "type": "string"
        }
      },
      "caseStatuses": {
        "in": "query",
        "name": "statuses",
        "required": false,
        "schema": {
          "items": {
            "enum": [
              "all",
              "initiated",
              "processing",
              "completed",
              "canceled",
              "reopened"
            ],
            "type": "string"
          },
          "type": "array"
        }
      },
      "caseStatusUpdatedBefore": {
        "description": "Filter by cases which have a `statusUpdatedAt` date-time from before the given value\n",
        "in": "query",
        "name": "statusUpdatedBefore",
        "required": false,
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "caseStatusUpdatedAfter": {
        "description": "Filter by cases which have a `statusUpdatedAt` date-time after the given value\n",
        "in": "query",
        "name": "statusUpdatedAfter",
        "required": false,
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "caseNumber": {
        "description": "Filter cases by external case number",
        "in": "query",
        "name": "caseNumber",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "caseType": {
        "description": "The name of the case type.\n",
        "in": "query",
        "name": "caseType",
        "schema": {
          "enum": [
            "generic",
            "bankruptcy",
            "ceaseCommunication",
            "collection",
            "deceased",
            "disputeOfDebt",
            "federalEmergency",
            "identityTheft",
            "legalAction",
            "militaryDuty",
            "debtValidation",
            "oFACSanctionedIndividual",
            "creditBureauDispute"
          ],
          "type": "string"
        }
      },
      "createdBefore": {
        "description": "Filter by cases which have a `createdAt` date-time before the given value\n",
        "in": "query",
        "name": "createdBefore",
        "required": false,
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "createdAfter": {
        "description": "Filter by cases which have a `createdAt` date-time after the given value\n",
        "in": "query",
        "name": "createdAfter",
        "required": false,
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "nupUpdatedNull": {
        "description": "Filters to cases that have been sent in the NUP file if true, otherwise filters them out if false.\n(Only applies to Bankruptcy cases)\n",
        "in": "query",
        "name": "nupUpdatedNull",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "snoozedUntilBefore": {
        "description": "Filter only cases with a snooze (the `snoozeUntil` value) set to expire before the specified datetime. Note that a\nsnoozed case is set to None automatically very shortly after it expires.\n",
        "in": "query",
        "name": "snoozedUntilBefore",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "snoozedUntilAfter": {
        "description": "Filter only cases with a snooze (the `snoozeUntil` value) set to expire after the specified datetime.\n",
        "in": "query",
        "name": "snoozedUntilAfter",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "owningEmployeeId": {
        "description": "Filter by cases which have an `owningEmployeeId` equal to the given employee\nID. If the employee ID is `null`, filter by cases which have no owning employee.\n",
        "in": "query",
        "name": "owningEmployeeId",
        "schema": {
          "type": "string"
        }
      },
      "loanTypes": {
        "description": "Filter by a list of loan types. Only includes cases with loans of the\nspecified loan types. Special value `none` means to include cases with\nno associated loans.\n",
        "in": "query",
        "name": "loanTypes",
        "schema": {
          "items": {
            "enum": [
              "none",
              "lineOfCredit",
              "installment"
            ],
            "type": "string"
          },
          "type": "array"
        }
      },
      "filterInteractionStatus": {
        "description": "Filter cases which have an associated interaction with the specified status.\n",
        "in": "query",
        "name": "interaction.status",
        "schema": {
          "items": {
            "$ref": "#/components/schemas/InteractionStatus"
          },
          "type": "array"
        }
      },
      "filterInteractionChannel": {
        "description": "Filter cases which have an associated interaction with the specified channel.\n",
        "in": "query",
        "name": "interaction.channel",
        "schema": {
          "items": {
            "$ref": "#/components/schemas/InteractionChannel"
          },
          "type": "array"
        }
      },
      "filterInteractionScheduledAtFromBefore": {
        "description": "Filter cases which have an associated interaction with a scheduled start date-time\nbefore the specified value. (i.e., the specified value is less than or equal to `scheduledAtFrom`.)\n",
        "in": "query",
        "name": "interaction.scheduledAtFromBefore",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "filterInteractionScheduledAtFromAfter": {
        "description": "Filter cases which have an associated interaction with a scheduled start date-time\nafter the specified value. (i.e., the specified value is greater than or equal to `scheduledAtFrom`.)\n",
        "in": "query",
        "name": "interaction.scheduledAtFromAfter",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "filterInteractionScheduledAtToBefore": {
        "description": "Filter cases which have an associated interaction with a scheduled end date-time\nbefore the specified value. (i.e., the specified value is less than or equal to `scheduledAtTo`.)\n",
        "in": "query",
        "name": "interaction.scheduledAtToBefore",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "filterInteractionScheduledAtToAfter": {
        "description": "Filter cases which have an associated interaction with a scheduled end date-time\nafter the specified value. (i.e., the specified value is greater than or equal to `scheduledAtTo`.)\n",
        "in": "query",
        "name": "interaction.scheduledAtToAfter",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "associatedDocumentId": {
        "description": "Filter by an associated document ID, public or external. Only includes\ncases that have been associated with the given document ID.\n",
        "in": "query",
        "name": "associatedDocumentId",
        "schema": {
          "type": "string"
        }
      },
      "renderFormat": {
        "description": "The desired output format.",
        "in": "query",
        "name": "fmt",
        "schema": {
          "default": "html",
          "enum": [
            "text",
            "html",
            "pdf"
          ],
          "type": "string"
        }
      },
      "subject": {
        "in": "path",
        "name": "subject",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/InteractionSubject"
        }
      },
      "parameters-companyIdQuery": {
        "description": "The Company ID by which to filter.",
        "example": "CP-AAAA-BBBB",
        "in": "query",
        "name": "companyId",
        "schema": {
          "$ref": "#/components/schemas/CompanyId"
        }
      },
      "descriptorId": {
        "description": "ID of the Template Descriptor.",
        "example": "TD-AAAA-BBBB",
        "in": "path",
        "name": "descriptorId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/TemplateDescriptorId"
        }
      },
      "templateVersionId": {
        "description": "The Template Version ID.",
        "in": "path",
        "name": "templateVersionId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/TemplateVersionId"
        }
      },
      "includeArchived": {
        "description": "If set to true, includes archived objects\n",
        "in": "query",
        "name": "includeArchived",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "collectionAgencyId": {
        "description": "The ID of the collection agency",
        "in": "path",
        "name": "collectionAgencyId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "uploadedByLender": {
        "description": "If `true`, only returns Credit Agency objects that have the SFTP credentials filled in, meaning the lender will upload the file to the credit agency.\n\nIf `false`, only returns Credit Agency objects that have the SFTP credentials empty, meaning Peach will upload the file to the credit agency.\n\nIf not set, includes all.\n",
        "in": "query",
        "name": "uploadedByLender",
        "schema": {
          "type": "boolean"
        }
      },
      "creditAgencyId": {
        "description": "The ID of the credit agency",
        "in": "path",
        "name": "creditAgencyId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "interactionId": {
        "description": "Interaction's unique identifier to track interactions for. Can be Peach\nor lender's external identifier.\n",
        "in": "path",
        "name": "interactionId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "callTranscriptionResultStatus": {
        "description": "The status of the transcription result.\n",
        "in": "query",
        "name": "status",
        "required": false,
        "schema": {
          "enum": [
            "pending",
            "completed",
            "failed"
          ],
          "type": "string"
        }
      },
      "aICallTranscriptionResultIdFilter": {
        "description": "Filter by the AI Call Transcription Result ID.\n",
        "in": "query",
        "name": "aICallTranscriptionResultId",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "parameters-includeFields": {
        "description": "A list of additional interaction relationships to include in the response object. \n\n- When `include=borrower` the `borrower` field will be populated (otherwise it will be `null`). This\n  is data describing the borrower associated with this interaction.\n- When `include=contact` the `contact`` field will be populated (otherwise it will be `null`). This is\n  contact data for the contact this interaction was sent to or from.\n- When `include=lastTaskMeta` the `lastTaskMeta` field will be populated (otherwise it will be `null`).\n  This is meta data about the most recently ended task associated with this interaction.\n\nYou can include multiple fields by passing multiple values, e.g., `include=borrower,contact`.\n",
        "in": "query",
        "name": "include",
        "required": false,
        "schema": {
          "items": {
            "enum": [
              "borrower",
              "contact",
              "lastTaskMeta"
            ],
            "type": "string"
          },
          "minItems": 1,
          "type": "array"
        }
      },
      "contactValidate": {
        "description": "Validate the contact through an external API. This is only used for addresses currently.",
        "in": "query",
        "name": "validate",
        "required": false,
        "schema": {
          "default": true,
          "type": "boolean"
        }
      },
      "investorId": {
        "description": "Unique investor identifier.",
        "in": "path",
        "name": "investorId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "settlementInstrumentId": {
        "description": "Unique settlement instrument identifier. Normally a bank account.",
        "in": "path",
        "name": "settlementInstrumentId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "parameters-createdBefore": {
        "description": "Returns loan labels created before a specific timestamp. If used in conjunction with `createdAfter`,\na time range can be created to return labels created between two timestamps.\n",
        "in": "query",
        "name": "createdBefore",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "parameters-createdAfter": {
        "description": "Returns loan labels created before a specific timestamp. If used in conjunction with `createdBefore`,\na time range can be created to return labels created between two timestamps.\n",
        "in": "query",
        "name": "createdAfter",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "loanFilter": {
        "description": "Filter by Loan's unique identifier. Can be Peach or lender's external identifier.\n",
        "in": "query",
        "name": "loanId",
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "loanLabelIds": {
        "description": "The IDs of the loan labels",
        "in": "path",
        "name": "loanLabelIds",
        "required": true,
        "schema": {
          "items": {
            "type": "string"
          },
          "maxItems": 100,
          "type": "array"
        }
      },
      "loanLabelId": {
        "description": "The ID of the loan label",
        "in": "path",
        "name": "loanLabelId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "loanTapeTypeId": {
        "description": "The ID of the loan tape type",
        "in": "path",
        "name": "loanTapeTypeId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "untokenize": {
        "description": "Untokenize any tokenized fields if the calling user has the applicable permission.",
        "in": "query",
        "name": "untokenize",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "loanTapeId": {
        "description": "The ID of the loan tape",
        "in": "path",
        "name": "loanTapeId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "loanTypeId": {
        "description": "The loan type identifier.",
        "in": "path",
        "name": "loanTypeId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "sendChannels": {
        "description": "If specified, only include notification types with at least one of the specified `sendChannels`.\nIf not provided, including any notification types regardless of the `sendChannels`.\n",
        "in": "query",
        "name": "sendChannels",
        "schema": {
          "items": {
            "$ref": "#/components/schemas/ValidInteractionChannel"
          },
          "type": "array"
        }
      },
      "repaymentNotificationTypeId": {
        "description": "The notification type identifier.",
        "in": "path",
        "name": "repaymentNotificationTypeId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "loanId": {
        "description": "The unique identifier of the Loan we wish to retrieve. Can be\nPeach or lender's external identifier.\n",
        "in": "path",
        "name": "loanId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "promiseToPayPlanId": {
        "description": "The identifier of a promise to pay plan.\n",
        "in": "path",
        "name": "promiseToPayPlanId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "parentMerchantId": {
        "description": "The parent merchant identifier. Used to represent hierarchy of merchant sub entities.\nCan be Peach or lender's external identifier.\n",
        "in": "query",
        "name": "parentMerchantId",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "merchantId": {
        "description": "A lender's identifier for the merchant.",
        "in": "path",
        "name": "merchantId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "paymentProcessorId": {
        "description": "The payment processor ID.",
        "in": "path",
        "name": "paymentProcessorId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "achFileId": {
        "description": "The ACH File upload monitoring record ID.",
        "in": "path",
        "name": "achFileId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "fundingInstrumentId": {
        "description": "Unique funding instrument identifier. Normally a bank account.",
        "in": "path",
        "name": "fundingInstrumentId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "personId": {
        "description": "A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.\n",
        "in": "path",
        "name": "personId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "caseId": {
        "description": "The case object unique identifier.",
        "in": "path",
        "name": "caseId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "workflowStepId": {
        "description": "The workflow step ID",
        "in": "path",
        "name": "workflowStepId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "workflowWorkitemId": {
        "description": "The workflow work item ID",
        "in": "path",
        "name": "workflowWorkitemId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "promoProgramTypeId": {
        "description": "The promotional program type identifier.",
        "in": "path",
        "name": "promoProgramTypeId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "taskWorkerPairingConfigSortBy": {
        "description": "Which fields to sort by",
        "in": "query",
        "name": "sortBy",
        "required": false,
        "schema": {
          "items": {
            "default": [
              "+priority"
            ],
            "enum": [
              "id",
              "+id",
              "-id",
              "priority",
              "-priority",
              "+priority",
              "createdAt",
              "+createdAt",
              "-createdAt"
            ],
            "type": "string"
          },
          "type": "array"
        }
      },
      "taskWorkerPairingConfigId": {
        "in": "path",
        "name": "taskWorkerPairingConfigId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "taskHistoryId": {
        "description": "The `id` or `sid` of the terminated task",
        "in": "path",
        "name": "taskHistoryId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "taskQueueSid": {
        "description": "The SID of the TaskQueue with the Tasks to read.\n",
        "in": "query",
        "name": "taskQueueSid",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "taskAssignmentStatus": {
        "description": "The assignment status of the\n\nNote that the assignment status cannot be `completed` or `canceled` because\n\"unterminated\" tasks are never `completed` or `canceled`—by definition tasks\nof that status are \"terminated\".\n",
        "explode": false,
        "in": "query",
        "name": "assignmentStatus",
        "required": false,
        "schema": {
          "items": {
            "enum": [
              "pending",
              "reserved",
              "assigned",
              "wrapping"
            ],
            "type": "string"
          },
          "type": "array"
        },
        "style": "form"
      },
      "taskType": {
        "description": "Only display tasks matching any these task types\n",
        "explode": false,
        "in": "query",
        "name": "taskType",
        "required": false,
        "schema": {
          "items": {
            "$ref": "#/components/schemas/TaskType"
          },
          "type": "array"
        },
        "style": "form"
      },
      "parameters-caseType": {
        "description": "Only display tasks with a case with a matching any of these case type\n",
        "explode": false,
        "in": "query",
        "name": "caseType",
        "required": false,
        "schema": {
          "items": {
            "$ref": "#/components/schemas/BaseCaseType"
          },
          "type": "array"
        },
        "style": "form"
      },
      "parameters-caseId": {
        "description": "Only display tasks with a case ID which matches any of these case IDs\n",
        "explode": false,
        "in": "query",
        "name": "caseId",
        "required": false,
        "schema": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "style": "form"
      },
      "supercaseId": {
        "description": "Only display tasks with a supercase ID which matches any of these supercase IDs\n",
        "explode": false,
        "in": "query",
        "name": "supercaseId",
        "required": false,
        "schema": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "style": "form"
      },
      "parameters-interactionId": {
        "description": "Only display tasks with an interaction ID which matches any of these interaction IDs\n",
        "explode": false,
        "in": "query",
        "name": "interactionId",
        "required": false,
        "schema": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "style": "form"
      },
      "unableToComplete": {
        "description": "If `true`, only display tasks which were created by an agent clicking \"Unable to Complete\".\nIf `false`, display only *other* tasks.\n",
        "in": "query",
        "name": "unableToComplete",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "taskAttrMatchExpr": {
        "description": "A Taskrouter expression to use for matching the task by task attributes.\n\nThis field's syntax must conform to the Twilio \"TaskRouter Expression\" syntax[1].\n\n[1] https://www.twilio.com/docs/taskrouter/expression-syntax\n",
        "in": "query",
        "name": "taskAttrMatchExpr",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "hasCase": {
        "description": "Only display tasks which have a case associated with them.\n",
        "in": "query",
        "name": "hasCase",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "hasCaseOwner": {
        "description": "Only display tasks which has a case with an owner when the task was published.\n\n(Note that this filters based on the data in the task object, which represents the state of the\ncase at the moment the task was published.)\n",
        "in": "query",
        "name": "hasCaseOwner",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "taskSid": {
        "description": "The `sid` of the task",
        "in": "path",
        "name": "taskSid",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "workflowStepTypeId": {
        "description": "The workflow step type ID",
        "in": "path",
        "name": "workflowStepTypeId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "workflowTypeId": {
        "description": "The workflow type ID",
        "in": "path",
        "name": "workflowTypeId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "workflowWorkitemTypeId": {
        "description": "The work item type ID",
        "in": "path",
        "name": "workflowWorkitemTypeId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "derivedFromTypeId": {
        "in": "query",
        "name": "derivedFromTypeId",
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "codeId": {
        "description": "The ID of the desired code",
        "in": "path",
        "name": "codeId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "typeId": {
        "description": "Optional argument. If provided, will create a new type from the specified `typeId`.",
        "in": "query",
        "name": "typeId",
        "schema": {
          "format": "int32",
          "type": "integer"
        }
      },
      "doNotInteractTypeId": {
        "description": "The Do Not Interact Type unique identifier.\n",
        "in": "path",
        "name": "doNotInteractTypeId",
        "required": true,
        "schema": {
          "type": "integer"
        }
      },
      "documentUploadLinkKey": {
        "description": "The doc upload link key. Used to perform document upload operations without\nlogging into Peach system. This should be treated as *secret*, because anyone\nin possession of this key can upload on behalf the borrower for which it was\ncreated. Not to be confused with the `documentUploadLinkId`.\n",
        "in": "path",
        "name": "documentUploadLinkKey",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "documentDescriptorId": {
        "description": "The document descriptor identifier.",
        "in": "path",
        "name": "documentDescriptorId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "queryTeamId": {
        "description": "** DEPRECATED - use `teamIds` ** Filter results to a single team.\n",
        "in": "query",
        "name": "teamId",
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "queryTeamIds": {
        "description": "Filter results to employees that belong to at least one of a list of teams.",
        "in": "query",
        "name": "teamIds",
        "schema": {
          "items": {
            "$ref": "#/components/schemas/AnyId"
          },
          "type": "array"
        }
      },
      "queryExcludeTeamIds": {
        "description": "Filter results to employees that do not belong to any of a list of teams.",
        "in": "query",
        "name": "excludeTeamIds",
        "schema": {
          "items": {
            "$ref": "#/components/schemas/AnyId"
          },
          "type": "array"
        }
      },
      "queryManagerEmployeeId": {
        "description": "The employee ID of the manager",
        "in": "query",
        "name": "managerEmployeeId",
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "queryEmployeeSearch": {
        "description": "The search term on which to search. It will match ANY employee when the search term matches the following:\n\n- case-insensitive matches any substring of an employee's first name\n- case-insensitive matches any substring of an employee's last name\n- if there is whitespace in the search term, split on the whitespace, and case-insensitive match the first part to any substring of an employee's first name and the second part to any substring of the last name\n- exactly matches an employee's user's ID\n- exactly matches an employee's ID\n- exactly matches an employee's external ID (prefixed with `ext-`)\n- exactly matches one of employee's role IDs\n",
        "in": "query",
        "name": "search",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "employeeId": {
        "description": "The unique employee identifier.",
        "in": "path",
        "name": "employeeId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "teamId": {
        "description": "The unique team identifier.",
        "in": "path",
        "name": "teamId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "personFilter": {
        "description": "Filter by a Borrower's unique identifier. Can be Peach or lender's external identifier.\n",
        "in": "query",
        "name": "personId",
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "periodIdQuery": {
        "description": "Use this to limit results to a specific periodId.",
        "in": "query",
        "name": "periodId",
        "schema": {
          "type": "string"
        }
      },
      "caseFilter": {
        "description": "Filter by case's object unique identifier. Can be Peach or lender's external identifier.\n",
        "in": "query",
        "name": "caseId",
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "transactionFilter": {
        "description": "Filter by transaction's unique identifier. Can be Peach or lender's external identifier.\n",
        "in": "query",
        "name": "transactionId",
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "createdAtFrom": {
        "description": "Get events created at or after the specified time.",
        "in": "query",
        "name": "createdAtFrom",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "createdAtTo": {
        "description": "Get events created before the specified time.",
        "in": "query",
        "name": "createdAtTo",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "effectiveAtFrom": {
        "description": "Get events effective at or after the specified time.",
        "in": "query",
        "name": "effectiveAtFrom",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "effectiveAtTo": {
        "description": "Get events effective before the specified time.",
        "in": "query",
        "name": "effectiveAtTo",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "accrualDate": {
        "description": "Get events by matching accrual date. To be used for AccrueInterestEvent only.",
        "in": "query",
        "name": "accrualDate",
        "schema": {
          "format": "date",
          "type": "string"
        }
      },
      "includeDeleted": {
        "description": "Include events that have been deleted.",
        "in": "query",
        "name": "includeDeleted",
        "schema": {
          "default": true,
          "type": "boolean"
        }
      },
      "includeEventTypes": {
        "description": "A comma separated list of event names to return.\nEvent name queries can end with a wildcard `*` character to specify all events starting with the given string.\nFor example, `case.*` would give all case-related events.\n",
        "in": "query",
        "name": "events",
        "schema": {
          "type": "string"
        }
      },
      "excludeEventTypes": {
        "description": "A comma separated list of event names to exclude from the response.\nEvent name queries can end with a wildcard `*` character to specify all events starting with the given string.\nFor example, `case.*` would exclude all case-related events.\n",
        "in": "query",
        "name": "excludeEvents",
        "schema": {
          "type": "string"
        }
      },
      "webhookId": {
        "description": "The webhook ID to filter events by. This will only include events that were sent to this webhook subscription.\n",
        "in": "query",
        "name": "webhookId",
        "schema": {
          "type": "string"
        }
      },
      "parameters-supercaseId": {
        "description": "The supercase ID to filter events by. Events that don't have this field will be filtered out.\n",
        "in": "query",
        "name": "supercaseId",
        "schema": {
          "type": "string"
        }
      },
      "hasNoPerson": {
        "description": "If `true`, include only unassociated interactions—those not associated with a borrower.\nIf `false`, include only interactions associated with a borrower.\nIf unset, include any interaction regardless of it being associated with a borrower or not.\n",
        "in": "query",
        "name": "hasNoPerson",
        "schema": {
          "type": "boolean"
        }
      },
      "channel": {
        "description": "Exactly match the channel over which the interaction took place.\n",
        "in": "query",
        "name": "channel",
        "required": false,
        "schema": {
          "items": {
            "$ref": "#/components/schemas/InteractionChannel"
          },
          "type": "array"
        }
      },
      "direction": {
        "description": "Exactly match the direction the interaction—either `inbound` or `outbound`.\n",
        "in": "query",
        "name": "direction",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/InteractionDirection"
        }
      },
      "status": {
        "description": "Exactly match the status of an interaction.\n",
        "in": "query",
        "name": "status",
        "required": false,
        "schema": {
          "items": {
            "$ref": "#/components/schemas/InteractionStatus"
          },
          "type": "array"
        }
      },
      "statusDetails": {
        "description": "Exactly match the status details of an interaction.\n",
        "in": "query",
        "name": "statusDetails",
        "required": false,
        "schema": {
          "items": {
            "$ref": "#/components/schemas/InteractionStatusDetails"
          },
          "type": "array"
        }
      },
      "agentOutcome": {
        "description": "Exactly match the `agentOutcome` of an interaction.\n",
        "in": "query",
        "name": "agentOutcome",
        "required": false,
        "schema": {
          "items": {
            "$ref": "#/components/schemas/InteractionAgentOutcome"
          },
          "type": "array"
        }
      },
      "parameters-subject": {
        "description": "The interaction subject value(s) by which to filter. To match interactions\nwithout a subject pass the string \"null\".\n",
        "in": "query",
        "name": "subject",
        "required": false,
        "schema": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "theme": {
        "in": "query",
        "name": "theme",
        "required": false,
        "schema": {
          "items": {
            "$ref": "#/components/schemas/InteractionTheme"
          },
          "type": "array"
        }
      },
      "caseIds": {
        "description": "Exactly matches one of several Peach case IDs (`CS-XXXX-XXXX`).\n",
        "in": "query",
        "name": "caseIds",
        "required": false,
        "schema": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "contentContains": {
        "description": "Search for an exact match in the content of the interaction\n",
        "in": "query",
        "name": "contentContains",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "createdAtBefore": {
        "description": "Filter only objects that were not created at or before the specified\ntimestamp. This timestamp is in UTC.\n",
        "in": "query",
        "name": "createdAtBefore",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "createdAtAfter": {
        "description": "Filter only objects that were not created at or after the specified\ntimestamp. This timestamp is in UTC.\n",
        "in": "query",
        "name": "createdAtAfter",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "startedAtBefore": {
        "description": "Filter only objects that were not started at or before the specified\ntimestamp. This timestamp is in UTC.\n",
        "in": "query",
        "name": "startedAtBefore",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "startedAtAfter": {
        "description": "Filter only objects that were not started at or after the specified\ntimestamp. This timestamp is in UTC.\n",
        "in": "query",
        "name": "startedAtAfter",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "scheduledAtFromBefore": {
        "description": "Include only interactions which have a `scheduledAtFrom` set to before (or equal to) this\ntimestamp. The timestamp must include a timezone (or UTC offset).\n",
        "in": "query",
        "name": "scheduledAtFromBefore",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "scheduledAtFromAfter": {
        "description": "Include only interactions which have a `scheduledAtFrom` set to after (or equal to) this\ntimestamp. The timestamp must include a timezone (or UTC offset).\n",
        "in": "query",
        "name": "scheduledAtFromAfter",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "scheduledAtToBefore": {
        "description": "Include only interactions which have a `scheduledAtTo` set to before (or equal to) this\ntimestamp. The timestamp must include a timezone (or UTC offset).\n",
        "in": "query",
        "name": "scheduledAtToBefore",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "scheduledAtToAfter": {
        "description": "Include only interactions which have a `scheduledAtTo` set to after (or equal to) this\ntimestamp. The timestamp must include a timezone (or UTC offset).\n",
        "in": "query",
        "name": "scheduledAtToAfter",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "createdBy": {
        "description": "The User ID or Employee ID of the user which created the interaction.\n\nIf `null` is specified then match all interactions with `createdBy` of `null`.\n",
        "in": "query",
        "name": "createdBy",
        "required": false,
        "schema": {
          "nullable": true,
          "type": "string"
        }
      },
      "hasVoicemail": {
        "description": "If `true`, include only interactions with voicemails—only valid for `channel=voice`case.\nIf `false`, include only interactions without voicemails.\nIf unset, then include any interaction regardless of it having voicemail or not.\n\nNote that a voicemail is different from a call recording. A voicemail is an audio message\nleft by a caller when no pickup by the company was possible. e.g., the call was made while the office was\nclosed or while there were no agents available to answer the call.\n",
        "in": "query",
        "name": "hasVoicemail",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "hasRecording": {
        "description": "If `true` match only interactions with call recordings—only valid for `channel=voice`.\nIf `false` match only interactions without call recordings.\nIf unset, match any interaction regardless of it have a recording or not.\n\nNote that a call recording is when an agent chooses to record a call, which is\ndifferent from a voicemail.\n",
        "in": "query",
        "name": "hasRecording",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "sensitive": {
        "description": "If `true`, include only interactions with the `sensitive` property set to `true`.\nIf `false`, include only interactions with the `sensitive` property set to `false`.\nIf unset, include any interaction regardless of `sensitive` property.\n",
        "in": "query",
        "name": "sensitive",
        "required": false,
        "schema": {
          "nullable": true,
          "type": "boolean"
        }
      },
      "isExternal": {
        "description": "If `true`, include only interactions with the `isExternal` property set to `true`.\nIf `false`, include only interactions with the `isExternal` property set to `false`.\nIf unset, include any interaction regardless of `isExternal` property.\n",
        "in": "query",
        "name": "isExternal",
        "required": false,
        "schema": {
          "nullable": true,
          "type": "boolean"
        }
      },
      "searchable": {
        "description": "If `true`, format the entire response as one suitable for an ElasticSearch search index.",
        "in": "query",
        "name": "searchable",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "noteCategories": {
        "description": "Filters by the given note categories\n",
        "in": "query",
        "name": "categories",
        "schema": {
          "items": {
            "$ref": "#/components/schemas/NoteCategory"
          },
          "type": "array"
        }
      },
      "notePinned": {
        "description": "If `true`, show only pinned notes. If `false`, exclude them. If\n`null`, do no filtering.\n",
        "in": "query",
        "name": "pinned",
        "schema": {
          "default": null,
          "nullable": true,
          "type": "boolean"
        }
      },
      "disposition": {
        "description": "Tells the response from the file download to set the `Content-Disposition` header\nto the given value.\n- `attachment` means \"download the file\"\n- `inline` means \"open the file in the default manner\". e.g., if the file were an\n  `.mp3` the browser's default audio player would open.\n",
        "in": "query",
        "name": "disposition",
        "schema": {
          "enum": [
            "inline",
            "attachment"
          ],
          "type": "string"
        }
      },
      "returnUrl": {
        "description": "If `true`, will return a URL to the content instead of redirecting to the content.",
        "in": "query",
        "name": "returnUrl",
        "required": false,
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "APIKeyStatus": {
        "in": "query",
        "name": "status",
        "required": false,
        "schema": {
          "default": "active",
          "enum": [
            "active",
            "inactive"
          ],
          "type": "string"
        }
      },
      "APIKeyId": {
        "description": "The API key id.",
        "in": "path",
        "name": "keyId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "indexRateId": {
        "description": "The index rate identifier. Can be Peach or lender's external identifier.",
        "in": "path",
        "name": "indexRateId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "fieldsGetLoans": {
        "description": "\n        The result fields that will be fetched:\n\n        `all` - Fetch all fields.\n\n        `idsOnly` - Fetch only the following fields: `id`, `externalId`, `loanTypeId`, `mainBorrowerId`, `mainBorrowerExternalId`, `lockStatus`, and `migrationStatus`.",
        "in": "query",
        "name": "fields",
        "required": false,
        "schema": {
          "default": "all",
          "enum": [
            "all",
            "idsOnly"
          ],
          "type": "string"
        }
      },
      "loanStatuses": {
        "description": "A comma separated list of loan statuses to filter by",
        "in": "query",
        "name": "statuses",
        "required": false,
        "schema": {
          "items": {
            "enum": [
              "all",
              "active",
              "pending",
              "originated",
              "declined",
              "frozen",
              "accelerated",
              "chargedOff",
              "paidOff",
              "canceled"
            ],
            "type": "string"
          },
          "type": "array"
        }
      },
      "managedByPeach": {
        "description": "If passed, only returns loans with a loan type with \"managed by peach\" set to this value.\n",
        "in": "query",
        "name": "managedByPeach",
        "schema": {
          "nullable": true,
          "type": "boolean"
        }
      },
      "includeAdditionalBorrowers": {
        "description": "If set to `true`, include the `addtionalBorrowers` field containing information\nabout other borrowers related to this loan, e.g., cosigner, coborrowers, and applicants.\n",
        "in": "query",
        "name": "includeAdditionalBorrowers",
        "required": false,
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "loanLabels": {
        "description": "A comma separated list of loan labels to filter by",
        "in": "query",
        "name": "labels",
        "required": false,
        "schema": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "updatedAtBefore": {
        "description": "Filter only objects that were not updated at or before the specified\ntimestamp. This timestamp is in UTC.\n",
        "in": "query",
        "name": "updatedAtBefore",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "updatedAtAfter": {
        "description": "Filter only objects that were not updated at or after the specified\ntimestamp. This timestamp is in UTC.\n",
        "in": "query",
        "name": "updatedAtAfter",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "originatedAtAfter": {
        "description": "Filter only objects that were not originated at or after the specified\ntimestamp. This timestamp is in UTC.\n",
        "in": "query",
        "name": "originatedAtAfter",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "originatedAtBefore": {
        "description": "Filter only objects that were not originated at or before the specified\ntimestamp. This timestamp is in UTC.\n",
        "in": "query",
        "name": "originatedAtBefore",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "activatedAtBefore": {
        "description": "Filter only objects that were not activated at or before the specified\ntimestamp. This timestamp is in UTC.\n",
        "in": "query",
        "name": "activatedAtBefore",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "activatedAtAfter": {
        "description": "Filter only objects that were not activated at or after the specified\ntimestamp. This timestamp is in UTC.\n",
        "in": "query",
        "name": "activatedAtAfter",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "sortByForLoans": {
        "description": "The data attributes by which to sort the results.",
        "in": "query",
        "name": "sortBy",
        "required": false,
        "schema": {
          "items": {
            "enum": [
              "createdAt",
              "+createdAt",
              "-createdAt",
              "updatedAt",
              "+updatedAt",
              "-updatedAt",
              "originatedAt",
              "+originatedAt",
              "-originatedAt",
              "activatedAt",
              "+activatedAt",
              "-activatedAt"
            ],
            "type": "string"
          },
          "type": "array"
        }
      },
      "loansDueDate": {
        "description": "If passed, only returns loans with a due date equal to this value.",
        "in": "query",
        "name": "dueDate",
        "required": false,
        "schema": {
          "format": "date",
          "type": "string"
        }
      },
      "notificationTypeId": {
        "description": "The Notification Type unique identifier.\n",
        "in": "path",
        "name": "notificationTypeId",
        "required": true,
        "schema": {
          "type": "integer"
        }
      },
      "operationId": {
        "description": "Operation ID\n",
        "in": "path",
        "name": "operationId",
        "required": true,
        "schema": {
          "maxLength": 32,
          "minLength": 32,
          "type": "string"
        }
      },
      "skipConnectionTest": {
        "description": "Skip SFTP connection test. This is not recommended - use only after consulting with Peach.",
        "in": "query",
        "name": "skipConnectionTest",
        "required": false,
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "borrowerStatus": {
        "description": "Status of borrower(s).",
        "in": "query",
        "name": "status",
        "schema": {
          "enum": [
            "active",
            "inactive"
          ],
          "type": "string"
        }
      },
      "borrowerType": {
        "description": "Exactly match the type of borrower.",
        "in": "query",
        "name": "borrowerType",
        "schema": {
          "enum": [
            "business",
            "person"
          ],
          "type": "string"
        }
      },
      "queryIds": {
        "description": "List of IDs.",
        "explode": false,
        "in": "query",
        "name": "ids",
        "schema": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "style": "form"
      },
      "_hasTheWords": {
        "description": "Performs fuzzy matching on all fuzzy-matchable search fields and exact matching on all\nexact-matchable search fields.\n\nFor example, `_hasTheWords=Rob` will match a `firstName` of `Robby` a `lastName` of\n`Roberts` and street address of `123 Robinson Dr`.\n",
        "in": "query",
        "name": "_hasTheWords",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "_notTheWords": {
        "description": "Performs fuzzy matching on all fuzzy-matchable search fields and exact matching on all\nexact-matchable search fields, and ensure that entries matching that search will not\nappear in results.\n\nFor example, `_notTheWords=Rob` will match a `firstName` of `Robby` a `lastName` of\n`Roberts` and street address of `123 Robinson Dr` and ensure those results are not\nincluded in results.\n",
        "in": "query",
        "name": "_notTheWords",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "address": {
        "description": "Fuzzy matches addresses associated with a borrower. For example `address=fake` will match an\n`addressLine1` of `123 Fake St` as well as a city of `Fakeville`.\n\nNote that states are stored as their abbreviations, so you *must* search with\nthe abbreviation to match. For example, `address=MO` will match Missouri, but\n`address=Missouri` will not.\n",
        "in": "query",
        "name": "address",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "bankruptcyCourtCase": {
        "description": "Exactly matches a bankruptcy court case ID.\n",
        "in": "query",
        "name": "bankruptcyCourtCase",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "businessName": {
        "description": "Fuzzy matches the `businessName` or `businessLegalName` of business borrowers—never matches a person.\n",
        "in": "query",
        "name": "businessName",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "components-parameters-caseId": {
        "description": "Exactly matches a case ID. Can be either the Peach ID (like `CS-XXXX-XXXX`) or\nthe external ID.\n",
        "in": "query",
        "name": "caseId",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "city": {
        "description": "Fuzzy match the city in any of a borrower's addresses.\n",
        "in": "query",
        "name": "city",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "dateOfBirth": {
        "description": "Exactly matches a borrower's date of birth. Specified like `YYYY-MM-DD`.\n",
        "in": "query",
        "name": "dateOfBirth",
        "required": false,
        "schema": {
          "format": "date",
          "type": "string"
        }
      },
      "email": {
        "description": "Fuzzy matches any of a borrower's email addresses.\n",
        "in": "query",
        "name": "email",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "emailExact": {
        "description": "Exactly matches any of a borrower's email addresses.\n",
        "in": "query",
        "name": "emailExact",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "employeeEmail": {
        "description": "Fuzzy matches any of a business borrower's employees' email addresses.\n",
        "in": "query",
        "name": "employeeEmail",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "employeeEmailExact": {
        "description": "Exactly matches any of a business borrower's employees' email addresses.\n",
        "in": "query",
        "name": "employeeEmailExact",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "employeePhone": {
        "description": "Exactly matches any of a business borrower's employees' phone numbers.\n\nNote that Peach currently only supports US phone numbers.\n\nYou may search with any US phone number format. For example `(570)123-1234`, `+15701231234`\nare all treated as identical `570-123-1234` numbers.\n",
        "in": "query",
        "name": "employeePhone",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "employeeName": {
        "description": "Fuzzy matches a business borrower's employee's name. This will never match a person borrower.\n",
        "in": "query",
        "name": "employeeName",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "firstName": {
        "description": "Fuzzy matches a borrower's first name.\n",
        "in": "query",
        "name": "firstName",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "firstNamePartial": {
        "description": "Exactly matches a substring of the borrower's first name.\n\nFor example, if a borrower's first name were 'William',\n- `firstNamePartial=Will` would match because it is exactly contained in the first name.\n- `firstNamePartial=lia` would match because it is exactly contained in the first name.\n- `firstNamePartial=Bill` would NOT match because, while close, it is not exactly contained in the first name.\n",
        "in": "query",
        "name": "firstNamePartial",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "fullName": {
        "description": "Fuzzy matches all parts of a borrower's full name. (If the borrower is a business this will also\nmatch against the business name and business legal name.)\n",
        "in": "query",
        "name": "fullName",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "incorporatedState": {
        "description": "Exactly matches the `incorporatedState` of business borrowers.\n",
        "in": "query",
        "name": "incorporatedState",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "id": {
        "description": "Exactly matches a borrower's ID. Can be either the Peach ID (like `BO-XXXX-XXXX`) or\nthe external ID.\n",
        "in": "query",
        "name": "id",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "components-parameters-interactionId": {
        "description": "Exactly matches the ID of an interaction sent to or receieved from the\nborrower. Can be either the Peach ID (like `IN-XXXX-XXXX`) or the\nexternal ID.\n",
        "example": "IN-1234-ABCD",
        "in": "query",
        "name": "interactionId",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "lastName": {
        "description": "Fuzzy matches a borrower's last name.\n",
        "in": "query",
        "name": "lastName",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "lastNamePartial": {
        "description": "Exactly matches a substring of the borrower's last name, following the\nsame rules as for `firstNamePartial`.\n",
        "in": "query",
        "name": "lastNamePartial",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "legalRepFirstName": {
        "description": "Fuzzy match the first name of any of a borrower's legal representatives.\n",
        "in": "query",
        "name": "legalRepFirstName",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "legalRepLastName": {
        "description": "Fuzzy match the last name of any of a borrower's legal representatives.\n",
        "in": "query",
        "name": "legalRepLastName",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "legalRepEmail": {
        "description": "Fuzzy match any email of any of a borrower's legal representatives.\n",
        "in": "query",
        "name": "legalRepEmail",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "legalRepPhone": {
        "description": "Exactly match any phone number of any of a borrower's legal representatives.\n\nNote that Peach currently only supports US phone numbers.\n\nYou may search with any US phone number format. For example `(570)123-1234`, `+15701231234`\nare all treated as identical `570-123-1234` numbers.\n",
        "in": "query",
        "name": "legalRepPhone",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "parameters-loanId": {
        "description": "Exactly matches a loan's ID. Can be either the Peach ID (like `LN-XXXX-XXXX`) or\nthe external ID.\n",
        "example": "LN-1234-ABCD",
        "in": "query",
        "name": "loanId",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "loanIdPartial": {
        "description": "Exactly matches a substring of the loan's external ID.\n\nFor example, if a loan's external ID were `6eeab840-3cbc-4c40-a19b-df3e9c040a54`,\n- `loanIdPartial=6eeab840` would match because it is exactly contained in the external ID.\n- `loanIdPartial=cbc-4c40-a1` would match because it is exactly contained in the external ID.\n- `loanIdPartial=9bdf3e` would NOT match because, while close, it is not exactly contained in the external ID.\n",
        "example": null,
        "in": "query",
        "name": "loanIdPartial",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "maidenName": {
        "description": "Fuzzy matches a borrower's maiden name.\n",
        "in": "query",
        "name": "maidenName",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "maidenNamePartial": {
        "description": "Exactly matches a substring of the borrower's maiden name, following the\nsame rules as for `firstNamePartial`.\n",
        "in": "query",
        "name": "maidenNamePartial",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "middleName": {
        "description": "Fuzzy matches a borrower's middle name.\n",
        "in": "query",
        "name": "middleName",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "middleNamePartial": {
        "description": "Exactly matches a substring of the borrower's middle name, following the\nsame rules as for `firstNamePartial`.\n",
        "in": "query",
        "name": "middleNamePartial",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "paymentMethod": {
        "description": "Exactly match the last four digits of the borrower's payment methods on file.\n",
        "in": "query",
        "name": "paymentMethod",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "phone": {
        "description": "Exactly matches any of a borrower's phone numbers.\n\nNote that Peach currently only supports US phone numbers.\n\nYou may search with any US phone number format. For example `(570)123-1234`, `+15701231234`\nare all treated as identical `570-123-1234` numbers.\n",
        "in": "query",
        "name": "phone",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "postalCode": {
        "description": "Exactly match the postal code in any of a borrower's addresses.\n",
        "in": "query",
        "name": "postalCode",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "state": {
        "description": "Exactly match the state (as an abbreviation) for any of a borrower's addresses.\n\nNote that the full name of a state will NOT match.\n",
        "in": "query",
        "name": "state",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "taxId": {
        "description": "Exactly matches the last four digits of any of the borrower's tax ID document numbers.\nThe Tax ID document is either a Social Security Number (SSN), an Individual Taxpayer\nIdentification Number (ITIN), or a passport number.\n",
        "in": "query",
        "name": "taxId",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "_forceIndex": {
        "description": "For testing new search systems before wider deploy, specify the index to use for searching.\n",
        "in": "query",
        "name": "_forceIndex",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "includeIdentity": {
        "description": "If set to true, includes the primary identity of the borrower. Use of this flag requires the `person:read.sensitive` permission.\n",
        "in": "query",
        "name": "includeIdentity",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "removeObjectType": {
        "description": "Type of object to remove from the case.\n",
        "in": "query",
        "name": "objectType",
        "required": true,
        "schema": {
          "enum": [
            "document",
            "case",
            "interaction",
            "loan",
            "transaction"
          ],
          "type": "string"
        }
      },
      "removeObjectId": {
        "description": "Peach unique identifier for the associated object to remove from the case.",
        "example": "LN-AAAA-BBBB",
        "in": "query",
        "name": "objectId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "relation": {
        "description": "Label for a relationship between entities. Both `causes` and `blocks` are assumed to be directional, while the\ngeneric `related` is non-directional,\n",
        "in": "query",
        "name": "relation",
        "required": false,
        "schema": {
          "default": "related",
          "enum": [
            "causes",
            "blocks",
            "duplicate",
            "related"
          ],
          "type": "string"
        }
      },
      "doNotInteractId": {
        "description": "The Do Not Interact object unique identifier.\n",
        "in": "path",
        "name": "doNotInteractId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "caseEscalationId": {
        "description": "The case escalation object unique identifier.",
        "in": "path",
        "name": "caseEscalationId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "caseIdQuery": {
        "description": "Optional case ID to be recorded with the change.\n",
        "in": "query",
        "name": "caseId",
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "contactCollidesWithEmail": {
        "description": "Filters for contacts which would collide with this email if it were used\nto create a new borrower contact.\n",
        "in": "query",
        "name": "collidesWithEmail",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "contactCollidesWithPhone": {
        "description": "Filters for contacts which would collide with this phone number if it were used\nto create a new borrower contact.\n",
        "in": "query",
        "name": "collidesWithPhone",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "contactType": {
        "description": "The contact type to filter by.",
        "in": "query",
        "name": "contactType",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/ContactType"
        }
      },
      "contactAffiliation": {
        "description": "The contact affiliation to filter by.",
        "in": "query",
        "name": "affiliation",
        "schema": {
          "$ref": "#/components/schemas/ContactAffiliation"
        }
      },
      "contactLabel": {
        "description": "The contact label to filter by.",
        "in": "query",
        "name": "label",
        "schema": {
          "$ref": "#/components/schemas/ContactLabel"
        }
      },
      "contactStatus": {
        "description": "The contact status to filter by.",
        "in": "query",
        "name": "status",
        "schema": {
          "$ref": "#/components/schemas/ContactStatus"
        }
      },
      "contactIncludeArchived": {
        "description": "Include archived contacts into the result.",
        "in": "query",
        "name": "includeArchived",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "contactIncludeLegal": {
        "description": "Whether to include legal representation contact objects.\n",
        "in": "query",
        "name": "includeLegal",
        "schema": {
          "default": true,
          "type": "boolean"
        }
      },
      "receiveTextMessages": {
        "description": "If passed, only returns contacts with receiveTextMessages set to that value.",
        "in": "query",
        "name": "receiveTextMessages",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "contactValue": {
        "description": "The value of the contact to filter by.",
        "in": "query",
        "name": "value",
        "schema": {
          "type": "string"
        }
      },
      "powerOfAttorney": {
        "description": "If passed, only returns contacts with `powerOfAttorney` set to that value.",
        "in": "query",
        "name": "powerOfAttorney",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "authorizedThirdParty": {
        "description": "If passed, only returns contacts with `authorizedThirdParty` set to that value.",
        "in": "query",
        "name": "authorizedThirdParty",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "confirmationCode": {
        "description": "The previously emailed or texted confirmation code.",
        "in": "query",
        "name": "confirmationCode",
        "required": false,
        "schema": {
          "pattern": "^\\d{6}$",
          "type": "string"
        }
      },
      "contactId": {
        "description": "The contact ID.",
        "in": "path",
        "name": "contactId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "documentUploadLinkId": {
        "description": "The doc upload link ID. Used for identifying the resource in the API.\nNot to be confused with the `documentUploadLinkKey`.\n",
        "in": "path",
        "name": "documentUploadLinkId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "DeleteSource": {
        "description": "When `true`, set `deletedAt` on the source document to the current\ntime. This prevents it from appearing in future get documents requests.\n",
        "in": "query",
        "name": "deleteSource",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "includeArchivedIdentities": {
        "description": "If set to true, includes archived identities\n",
        "in": "query",
        "name": "includeArchived",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "personIdentityId": {
        "description": "An identity's unique identifier.\n",
        "in": "path",
        "name": "personIdentityId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "interactionsSortBy": {
        "description": "The field(s) to sort by.\n\nAll fields can be prefixed with a `-` to indicate the sort should be in descending order,\nor with a `+` to indicate the sort should be in ascending order. (Without specifying\nthe order is descending.)\n\nThe valid sort by field names are:\n\n`id` — order by the object creation order.\n`createdAt` — order by the `createdAt` field.\n`startedAt` — order by the `startedAt` field.\n`holdDuration` — order by the duration of the voice call on-hold (the `holdDuration` field.)\n`contactName` — order by the `name` field of the contact for the interaction.\n`scheduledAtFrom` — order by the `scheduledAtFrom` field.\n`scheduledAtTo` — order by the `scheduledAtTo` field.\n`channel` — order by the `channel` field.\n`direction` — order by the `direction` field.\n`status` — order by the `status` field.\n`createdBy.employeeFirstName` — order by the `firstName` field of the employee which created the interaction (only if creator was an employee).\n`createdBy.employeeLastName` — order by the `lastName` field of the employee which created the interaction (only if creator was an employee).\n`createdBy.employeeEmail` — order by the `email` field of the employee which created the interaction (only if creator was an employee).\n`createdBy.employeeDisplayName` - order by the full name (`{firstName} {lastName}`) or, if absent, the `email` of the employee whihch created the interaction (only if creator was an employee).\n`createdBy.employeeFullNameOrEmail` — **DEPRECATED** alias for `createdBy.employeeDisplayName`\n",
        "in": "query",
        "name": "sortBy",
        "required": false,
        "schema": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "legalRepresentativeId": {
        "description": "The legal representative object unique identifier.\n",
        "in": "path",
        "name": "legalRepresentativeId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "filterLoanStatus": {
        "in": "query",
        "name": "status",
        "required": false,
        "schema": {
          "items": {
            "enum": [
              "all",
              "active",
              "pending",
              "originated",
              "declined",
              "frozen",
              "accelerated",
              "chargedOff",
              "paidOff",
              "canceled"
            ],
            "type": "string"
          },
          "type": "array"
        }
      },
      "chargeOffBalance": {
        "description": "This filter is only applicable if `chargedOff` is one of the statuses.\nIn other words, this filter will only be applied on loans with `status=chargedOff`.\n\n`all` - all `chargedOff` loans will be returned (honoring other filters).\n\n`hasBalance` - only `chargedOff` loans with outstanding balance greater than zero will be returned.\n\n`zeroBalance` - only `chargedOff` loans with zero outstanding balance will be returned.\n",
        "in": "query",
        "name": "chargeOffBalance",
        "required": false,
        "schema": {
          "enum": [
            "all",
            "hasBalance",
            "zeroBalance"
          ],
          "type": "string"
        }
      },
      "forceLoanUpdate": {
        "description": "Override that enables the update of a borrower's address of a loan.\n",
        "in": "query",
        "name": "force",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "syncGeneric": {
        "description": "Make the process synchronous.",
        "in": "query",
        "name": "sync",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "advanceStatus": {
        "description": "The status of the advances.",
        "in": "query",
        "name": "status",
        "schema": {
          "enum": [
            "scheduled",
            "pending",
            "settled",
            "canceled"
          ],
          "type": "string"
        }
      },
      "advanceId": {
        "description": "The advance identifier.",
        "in": "path",
        "name": "advanceId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "autopayExpectedPaymentStatus": {
        "description": "The comma separated list of `status` values of autopay expected payments to include in the results, which are merged by date.\nAll autopay expected payments can still be accessed in the `individualEntries` field.\n",
        "explode": false,
        "in": "query",
        "name": "statuses",
        "schema": {
          "default": [
            "booked",
            "modified"
          ],
          "items": {
            "enum": [
              "booked",
              "skipped",
              "canceled",
              "modified",
              "draft",
              "processed"
            ],
            "type": "string"
          },
          "type": "array"
        },
        "style": "form"
      },
      "autopayCancellationReason": {
        "description": "The cancellation reason.\n",
        "in": "query",
        "name": "cancellationReason",
        "required": false,
        "schema": {
          "default": "canceledByUser",
          "enum": [
            "invalidPaymentMethod",
            "paymentMethodRemoved",
            "tooManyFailedAttempts",
            "loanFrozen",
            "loanAccelerated",
            "loanChargedOff",
            "loanPaidOff",
            "canceledByUser",
            "loanTermsChanged"
          ],
          "type": "string"
        }
      },
      "isRounded": {
        "description": "If true, balances will be rounded to the closes 1 cent.",
        "in": "query",
        "name": "isRounded",
        "schema": {
          "type": "boolean"
        }
      },
      "skipYtd": {
        "description": "If true, skip year-to-date calculations.",
        "in": "query",
        "name": "skipYtd",
        "schema": {
          "type": "boolean"
        }
      },
      "fast": {
        "description": "Perform a faster query that returns a pre-defined subset of attributes. When this query parameter is used, the `toEffectiveAt`\nparameter is ignored and only real-time balances are returned.\n\nTo configure the subset of attributes, please contact the Peach team.\n",
        "in": "query",
        "name": "fast",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "toEffectiveDate": {
        "description": "Last day for which to fetch balances",
        "in": "query",
        "name": "toEffectiveDate",
        "schema": {
          "format": "date",
          "type": "string"
        }
      },
      "forceLoanCancel": {
        "description": "Override that enables the cancellation of active loans not managed by Peach. Requires the `loan:cancel.force` permission.\nForced cancellation should only be used for testing purposes.\n",
        "in": "query",
        "name": "force",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "clearAllExternalIdsLoanCancel": {
        "description": "If `true`, will clear all related loan, draws (if LOC), purchases (if LOC), transactions, and dynamic fees external IDs. This will emit a `externalid.changed` event for all impacted objects.\n\nNOTE: If `sync=true`, there is a max limit of 1000 external IDs that can be cleared synchronously.\nIf there are more than 1000, the request will fail with a HTTP 408 status code. You should instead set `clearAllExternalIds=false` and call the individual endpoints to clear external IDs.\n",
        "in": "query",
        "name": "clearAllExternalIds",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "syncLoanCancel": {
        "description": "Today, `sync` only controls the clearing of external IDs when cancelling a loan when `clearAllExternalIds` is `true`.\n\n`true` - Clears the external IDs of the loan, draws, purchases, transactions, and dynamic fees up to the max limit of 1000.\nIf there are more than 1000, the request will fail with a HTTP 408 status code.\n\n`false` - will clear all external IDs asynchronously. This is not yet supported.\n",
        "in": "query",
        "name": "sync",
        "schema": {
          "default": true,
          "type": "boolean"
        }
      },
      "clearExternalIdGeneric": {
        "description": "If `true`, will clear the external ID for the object.\n",
        "in": "query",
        "name": "clearExternalId",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "showPan": {
        "description": "Set to `true` to get the full PAN in the response. Special permission is required.",
        "in": "query",
        "name": "showPan",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "showCvv": {
        "description": "Set to `true` to get the full CVV2 number in the response. Special permission is required.",
        "in": "query",
        "name": "showCvv",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "refresh": {
        "description": "If `true`, the Peach system will make new API calls to the card issuer to get the most recent card details and balances,\nand will store the new details in the Peach database. Otherwise, the Peach system will return the most recent details from its database.\n",
        "in": "query",
        "name": "refresh",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "cardId": {
        "description": "The ID of the card. Can be Peach or lender's external identifier.",
        "in": "path",
        "name": "cardId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "servicedBy": {
        "in": "query",
        "name": "servicedBy",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/LoanServicer"
        }
      },
      "effectiveDate": {
        "in": "query",
        "name": "effectiveDate",
        "schema": {
          "format": "date",
          "type": "string"
        }
      },
      "customPaymentPlanStatusQuery": {
        "description": "Use this to filter a search for custom payment plans that are `active`, `inactive` or `canceled`.\n",
        "in": "query",
        "name": "status",
        "schema": {
          "enum": [
            "active",
            "inactive",
            "canceled"
          ],
          "type": "string"
        }
      },
      "paymentPlanId": {
        "description": "The identifier of the payment plan.",
        "in": "path",
        "name": "paymentPlanId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "isClosed": {
        "description": "Filter for draws with `isClosed` value",
        "in": "query",
        "name": "isClosed",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "isAmortized": {
        "description": "Filter for amortized or non-amortized draws",
        "in": "query",
        "name": "isAmortized",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "startedBefore": {
        "description": "Filter for draws started before a date",
        "in": "query",
        "name": "startedBefore",
        "required": false,
        "schema": {
          "format": "date",
          "type": "string"
        }
      },
      "drawId": {
        "description": "The draw identifier.",
        "in": "path",
        "name": "drawId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "skipInterestAccrual": {
        "description": "If true, skip automatic interest accrual to catch up if it is missing.",
        "in": "query",
        "name": "skipInterestAccrual",
        "schema": {
          "type": "boolean"
        }
      },
      "effectiveRatesPeriodIdsQuery": {
        "description": "List of period IDs to specify the requested dates.\n\nThis is an alternative to using `fromDate` and `toDate` to specify the requested dates;\ninstead of specifying a range of dates, every date falling within all\nof the specified periods will be returned. Note this might result in non-consecutive dates.\n\nCannot be used in conjunction with `fromDate` or `toDate`.\n",
        "in": "query",
        "name": "periodIds",
        "schema": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "effectiveRatesPeriodDueDatesQuery": {
        "description": "List of period due dates to specify the requested dates.\n\nThis is an alternative to specifying the periods of concern with IDs and instead\nreferencing them by their due dates.\n\nThis is also an alternative to using `fromDate` and `toDate` to specify the requested dates;\ninstead of specifying a range of dates, every date falling within all\nof the specified periods will be returned. Note this might result in non-consecutive dates.\n\nCannot be used in conjunction with `fromDate` or `toDate`.\n",
        "in": "query",
        "name": "periodDueDates",
        "schema": {
          "items": {
            "format": "date",
            "type": "string"
          },
          "type": "array"
        }
      },
      "obligationStatusQuery": {
        "description": "Use this to filter a search for obligations that are `unfulfilled` or `overdue`.\n",
        "in": "query",
        "name": "status",
        "schema": {
          "enum": [
            "unfulfilled",
            "overdue"
          ],
          "type": "string"
        }
      },
      "loanPeriodFromDate": {
        "description": "The first date in the range to return.\nThe system will return any period for which period's `startDate` - `endDate` fully or partially overlap with `fromDate` - `toDate` range.\nBoth `fromDate` and `toDate` must be passed to get all periods in the range.\n",
        "in": "query",
        "name": "fromDate",
        "required": false,
        "schema": {
          "format": "date",
          "type": "string"
        }
      },
      "loanPeriodToDate": {
        "description": "The last date in the range to return.\nThe system will return any period for which period's `startDate` - `endDate` fully or partially overlap with `fromDate` - `toDate` range.\nBoth `fromDate` and `toDate` must be passed to get all periods in the range.\n",
        "in": "query",
        "name": "toDate",
        "schema": {
          "format": "date",
          "type": "string"
        }
      },
      "dueDate": {
        "description": "The due date of the period. The system will return the object corresponding to the period with due date equal to `dueDate`.\nIf no matching period is found, the system will return no results.\n",
        "in": "query",
        "name": "dueDate",
        "schema": {
          "format": "date",
          "type": "string"
        }
      },
      "isOpen": {
        "description": "`true` means that the obligation is still \"open\" and the `obligationAmount` is not final. The obligation amount can potentially change until the\nperiod ends. `false` means that the obligation is \"sealed\" and the `obligationAmount` is final.\n",
        "in": "query",
        "name": "isOpen",
        "schema": {
          "type": "boolean"
        }
      },
      "obligationId": {
        "description": "The obligation object unique identifier.",
        "in": "path",
        "name": "obligationId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "promoProgramId": {
        "description": "The promotional program identifier.",
        "in": "path",
        "name": "promoProgramId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "promoCancelReason": {
        "description": "The cancellation reason.\n\n  `expired` - the promo expired.\n\n  `disqualified` - the promo was disqualified for various\n  reasons.\n\n  `borrowerOptedOut` - the borrower decided to opt out from the\n  promotional program.\n\n  `adminError` - the promo program was added by mistake.\n",
        "in": "query",
        "name": "promoCancelReason",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/PromoCancelReason"
        }
      },
      "purchaseTypes": {
        "description": "The statuses of the purchases to fetch",
        "in": "query",
        "name": "types",
        "required": false,
        "schema": {
          "items": {
            "enum": [
              "regular",
              "refund",
              "cashback"
            ],
            "type": "string"
          },
          "type": "array"
        }
      },
      "purchaseStatuses": {
        "description": "The statuses of the purchases to fetch",
        "in": "query",
        "name": "statuses",
        "required": false,
        "schema": {
          "items": {
            "enum": [
              "authorized",
              "pending",
              "settled",
              "canceled",
              "declined",
              "disputed"
            ],
            "type": "string"
          },
          "type": "array"
        }
      },
      "fromEffectiveAt": {
        "description": "Used for filtering objects such that `effectiveAt` is greater than or equal to `fromEffectiveAt`",
        "in": "query",
        "name": "fromEffectiveAt",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "toEffectiveAt": {
        "description": "Used for filtering objects such that `effectiveAt` is less than or equal to `toEffectiveAt`",
        "in": "query",
        "name": "toEffectiveAt",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "fromCreatedAt": {
        "description": "Used for filtering objects such that `createdAt` is greater than or equal to `fromCreatedAt`",
        "in": "query",
        "name": "fromCreatedAt",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "toCreatedAt": {
        "description": "Used for filtering objects such that `createdAt` is less than or equal to `toCreatedAt`",
        "in": "query",
        "name": "toCreatedAt",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "sortByEffectiveAt": {
        "description": "The data attributes by which to sort the results.",
        "in": "query",
        "name": "sortBy",
        "required": false,
        "schema": {
          "items": {
            "enum": [
              "effectiveAt",
              "+effectiveAt",
              "-effectiveAt",
              "createdAt",
              "+createdAt",
              "-createdAt"
            ],
            "type": "string"
          },
          "type": "array"
        }
      },
      "forcePurchaseOverCreditLimit": {
        "description": "Allows creation of purchases, even if is above the credit limit for the line of credit.\n",
        "in": "query",
        "name": "force",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "timelineOrdering": {
        "description": "The parameters used to generate a timeline of purchases. Purchases will be inserted into the timeline based on the parameters provided.\n`effectiveAt`, `createdAt`, and `authorizedAt` are available for sorting. `createdAt` will be used if any purchases would not be inserted\ninto the timeline based on the attributes provided. The full timeline will be sorted either ASC (`+`) or DESC (`-`). It cannot be sorted\nbased on individual attributes. e.g. [-effectiveAt, +authorizedAt, -createdAt] is not a valid input.\n",
        "in": "query",
        "name": "timelineOrdering",
        "required": false,
        "schema": {
          "items": {
            "enum": [
              "effectiveAt",
              "authorizedAt",
              "createdAt"
            ],
            "type": "string"
          },
          "type": "array"
        }
      },
      "timelineSortOrder": {
        "description": "The order of the purchase timeline returned.\n- `asc` - oldest to newest\n- `desc` - newest to oldest\n",
        "in": "query",
        "name": "sortOrder",
        "required": false,
        "schema": {
          "enum": [
            "asc",
            "desc"
          ],
          "type": "string"
        }
      },
      "purchaseId": {
        "description": "The purchase identifier.",
        "in": "path",
        "name": "purchaseId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "purchaseDisputeId": {
        "description": "The ID of the purchase dispute",
        "in": "path",
        "name": "purchaseDisputeId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "rateCapId": {
        "description": "The unique identifier of the Rate Cap we wish to retrieve.\n",
        "in": "path",
        "name": "rateCapId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/RateCapId"
        }
      },
      "rateId": {
        "description": "Unique identifier of an interest or promo rate.\n",
        "in": "path",
        "name": "rateId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "includeDraws": {
        "description": "If set to true, includes the fees on all draws on the line of credit.\n",
        "in": "query",
        "name": "includeDraws",
        "schema": {
          "default": true,
          "type": "boolean"
        }
      },
      "loanFeeId": {
        "description": "The loan fee identifier.",
        "in": "path",
        "name": "loanFeeId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "syncUpdateDynamicFee": {
        "description": "Make the process synchronous. Only relevant for `originalAmount` updates. Updating this value will trigger a replay.",
        "in": "query",
        "name": "sync",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "fromEffectiveDate": {
        "description": "Last day for which to fetch balances",
        "in": "query",
        "name": "fromEffectiveDate",
        "schema": {
          "format": "date",
          "type": "string"
        }
      },
      "scraRateId": {
        "description": "Unique identifier of the SCRA interest rate to update or delete.\n",
        "in": "query",
        "name": "rateId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "scraSendNotice": {
        "description": "When set to `false`, the system will NOT send a `loanPaymentScheduleChanged` notice to the borrower.\n\nNote: Changing the loan terms will automatically cancel an existing Autopay (if enabled). A borrower,  an agent or\nAPI caller needs to turn on / enable a new Autopay plan after the loan terms change is completed. If the loan has Autopay enabled:\n - When `sendNotice=false`, the system will NOT send an `autopayCanceledBySystem` notice.\n - When `sendNotice=true`, the system will send an `autopayCanceledBySystem` notice in addition to the applicable loan terms notice.\n",
        "in": "query",
        "name": "sendNotice",
        "required": false,
        "schema": {
          "default": true,
          "type": "boolean"
        }
      },
      "scraCaseId": {
        "description": "The case object unique identifier.",
        "in": "query",
        "name": "caseId",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "dueDateGet": {
        "description": "The due date of the period. The system will return the object corresponding to the period with\ndue date equal to `dueDate`. If no matching period is found, the system will return no results.\n",
        "in": "query",
        "name": "dueDate",
        "required": false,
        "schema": {
          "format": "date",
          "type": "string"
        }
      },
      "reportingToAgency": {
        "description": "Filters to only loan types set up to report to this agency.",
        "in": "query",
        "name": "reportingToAgency",
        "schema": {
          "enum": [
            "experian",
            "equifax",
            "transUnion",
            "innovis"
          ],
          "type": "string"
        }
      },
      "dueDateUpdate": {
        "description": "The due date of the period. The system will update the object corresponding to the period with\na due date equal to `dueDate`. If no matching period is found, the system will not make any updates.\n",
        "in": "query",
        "name": "dueDate",
        "required": true,
        "schema": {
          "format": "date",
          "type": "string"
        }
      },
      "dueDateDelete": {
        "description": "The due date of the period. The system will delete the object corresponding to the period with\na due date equal to `dueDate`. If no matching period is found, the system will not make any updates.\n",
        "in": "query",
        "name": "dueDate",
        "required": true,
        "schema": {
          "format": "date",
          "type": "string"
        }
      },
      "transactionStatuses": {
        "in": "query",
        "name": "status",
        "required": false,
        "schema": {
          "items": {
            "$ref": "#/components/schemas/TransactionStatusReadOnly"
          },
          "type": "array"
        }
      },
      "queryPaymentInstrumentId": {
        "description": "The payment instrument identifier.",
        "in": "query",
        "name": "paymentInstrumentId",
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "transactionType": {
        "in": "query",
        "name": "transactionType",
        "required": false,
        "schema": {
          "enum": [
            "payment",
            "serviceCredit"
          ],
          "type": "string"
        }
      },
      "serviceCreditTypes": {
        "in": "query",
        "name": "serviceCreditTypes",
        "required": false,
        "schema": {
          "items": {
            "$ref": "#/components/schemas/serviceCreditTypes"
          },
          "type": "array"
        }
      },
      "toEffectiveDateGeneric": {
        "description": "Last day for which an object's effective date must match",
        "in": "query",
        "name": "toEffectiveDate",
        "schema": {
          "format": "date",
          "type": "string"
        }
      },
      "fromEffectiveDateGeneric": {
        "description": "First day for which an object's effective date must match",
        "in": "query",
        "name": "fromEffectiveDate",
        "schema": {
          "format": "date",
          "type": "string"
        }
      },
      "sortByForTransactions": {
        "description": "The data attributes by which to sort the results.",
        "in": "query",
        "name": "sortBy",
        "required": false,
        "schema": {
          "items": {
            "enum": [
              "appliedAt",
              "+appliedAt",
              "-appliedAt",
              "createdAt",
              "+createdAt",
              "-createdAt",
              "effectiveDate",
              "+effectiveDate",
              "-effectiveDate",
              "displayDate",
              "+displayDate",
              "-displayDate"
            ],
            "type": "string"
          },
          "type": "array"
        }
      },
      "transactionId": {
        "description": "Transaction ID. Can be Peach or lender's external identifier.",
        "in": "path",
        "name": "transactionId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "loanPeriodId": {
        "description": "The identifier of the period.",
        "in": "path",
        "name": "loanPeriodId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "periodId": {
        "description": "The identifier of the period.",
        "in": "path",
        "name": "periodId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "sendNotice": {
        "description": "When set to `true`, the system will send a `statementGenerated` notice to the borrower.\n",
        "in": "query",
        "name": "sendNotice",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "statementReason": {
        "description": "Reason for manually generating statement.",
        "in": "query",
        "name": "reason",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "parameters-status": {
        "description": "Filter by status. Possible values are `scheduled`, `active`, `kept`, `broken`, `canceled`.\n",
        "explode": true,
        "in": "query",
        "name": "status",
        "schema": {
          "items": {
            "enum": [
              "scheduled",
              "active",
              "kept",
              "broken",
              "canceled"
            ],
            "type": "string"
          },
          "type": "array"
        },
        "style": "form"
      },
      "isOverdue": {
        "description": "Filter by overdue status. Possible values are `true`, `false`.\n",
        "in": "query",
        "name": "isOverdue",
        "schema": {
          "enum": [
            true,
            false
          ],
          "type": "boolean"
        }
      },
      "startDateAfter": {
        "description": "Filter by start date after. Format: `YYYY-MM-DD`.\n",
        "in": "query",
        "name": "startDateAfter",
        "schema": {
          "format": "date",
          "type": "string"
        }
      },
      "endDateBefore": {
        "description": "Filter by end date before. Format: `YYYY-MM-DD`.\n",
        "in": "query",
        "name": "endDateBefore",
        "schema": {
          "format": "date",
          "type": "string"
        }
      },
      "promoEffectiveEndDateAfter": {
        "description": "Return promo programs with a `promoEffectiveEndDate` starting after the provided date.",
        "in": "query",
        "name": "promoEffectiveEndDateAfter",
        "schema": {
          "format": "date",
          "type": "string"
        }
      },
      "statuses": {
        "description": "The array of statuses used for filtering if a borrower has promo programs with the given `status`. If not \npassed, by default we return all statuses\n",
        "in": "query",
        "name": "statuses",
        "schema": {
          "items": {
            "enum": [
              "pending",
              "active",
              "exercised",
              "canceled"
            ],
            "type": "string"
          },
          "type": "array"
        }
      },
      "loanRefundId": {
        "description": "The loan refund identifier.",
        "in": "path",
        "name": "loanRefundId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "statementYear": {
        "description": "Only return statements from the current year.",
        "in": "query",
        "name": "year",
        "schema": {
          "type": "string"
        }
      },
      "includeAllVersions": {
        "description": "A flag to determine if all template versions should be returned, not just the most recent / active ones.\n",
        "in": "query",
        "name": "includeAllVersions",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "includeTestVersions": {
        "description": "A flag to determine whether test versions should be returned. If this flag is set to \"true\",\nthe system will ignore the `includeAllVersions` attribute and return only test versions.\n",
        "in": "query",
        "name": "includeTestVersions",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "statementPubId": {
        "description": "The statement object unique identifier.",
        "in": "path",
        "name": "statementId",
        "required": true,
        "schema": {
          "pattern": "^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\\d+$",
          "type": "string"
        }
      },
      "parameters_isExternal": {
        "description": "Fetch entities that are marked external.",
        "in": "query",
        "name": "isExternal",
        "schema": {
          "type": "boolean"
        }
      },
      "isVirtual": {
        "in": "query",
        "name": "isVirtual",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "paymentReason": {
        "in": "query",
        "name": "paymentReason",
        "required": false,
        "schema": {
          "enum": [
            "autoPay",
            "settlement",
            "reversal",
            "downPayment",
            "oneTimePayment",
            "reimbursement"
          ],
          "type": "string"
        }
      },
      "retryOriginalTransactionId": {
        "in": "query",
        "name": "retryOriginalTransactionId",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "transactionCancelReason": {
        "in": "query",
        "name": "cancelReason",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/TransactionCancelReason"
        }
      },
      "chargebackId": {
        "description": "Chargeback ID. Can be Peach or lender's external identifier.",
        "in": "path",
        "name": "chargebackId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "parameters_includeDeleted": {
        "description": "Include entities that are marked deleted.",
        "in": "query",
        "name": "includeDeleted",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "showFullAccountNumber": {
        "description": "Provide raw untokenized account details:\n`cardNumber` for cards, `accountNumber` for bank accounts, checks, wires, and money orders.\n\nRequires the `payment.instrument:read.sensitive` permission.\n",
        "in": "query",
        "name": "showFullAccountNumber",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "forcePaymentInstrument": {
        "description": "Overrides the results of BIN / Routing Number lookup. Requires the `payment.instrument:force` permission.\n",
        "in": "query",
        "name": "force",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "sync": {
        "description": "Make the payment instrument authentication process synchronous. Only relevant for cards.\n",
        "in": "query",
        "name": "sync",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "allowDuplicates": {
        "description": "For external payment instruments, skip duplicate checks. Allows the creation two external payment instruments with the same last 4 digits on the same borrower.\n",
        "in": "query",
        "name": "allowDuplicates",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "paymentInstrumentId": {
        "description": "The payment instrument identifier.",
        "in": "path",
        "name": "paymentInstrumentId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "verificationStatus": {
        "description": "The comma separated list of `status` values of verifications to include in the response.\nIf not included, include all verifications.\n",
        "explode": false,
        "in": "query",
        "name": "status",
        "schema": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "style": "form"
      },
      "dryRun": {
        "description": "If `true`, then return successfully if the operation would complete successfully, but do not\nactually save the changes which would result from this operation.\n",
        "in": "query",
        "name": "dryRun",
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "verificationId": {
        "description": "The borrower verification unique identifier.\n",
        "in": "path",
        "name": "verificationId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "supercaseSortBy": {
        "description": "The attribute by which to sort the results.",
        "in": "query",
        "name": "sortBy",
        "required": false,
        "schema": {
          "items": {
            "enum": [
              "-id",
              "id",
              "+id",
              "-createdAt",
              "createdAt",
              "+createdAt",
              "-name",
              "name",
              "+name",
              "-status",
              "status",
              "+status"
            ],
            "type": "string"
          },
          "type": "array"
        }
      },
      "supercaseType": {
        "description": "The type of the supercase",
        "in": "query",
        "name": "supercaseType",
        "schema": {
          "$ref": "#/components/schemas/SupercaseType",
          "default": "generic"
        }
      },
      "femaDisasterNumber": {
        "in": "query",
        "name": "femaDisasterNumber",
        "schema": {
          "type": "integer"
        }
      },
      "statusFilter": {
        "in": "query",
        "name": "status",
        "schema": {
          "items": {
            "$ref": "#/components/schemas/ProcessStatus"
          },
          "type": "array"
        }
      },
      "components-parameters-supercaseId": {
        "description": "The ID of the supercase",
        "in": "path",
        "name": "supercaseId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "operationTypes": {
        "description": "List of desired operation types.\n",
        "in": "query",
        "name": "operationTypes",
        "required": false,
        "schema": {
          "items": {
            "enum": [
              "update",
              "sendMessage",
              "createDoNotInteract",
              "deleteDoNotInteract",
              "sendInstructionsByTask"
            ],
            "type": "string"
          },
          "type": "array"
        }
      },
      "supercaseBulkOperationId": {
        "description": "Supercase bulk operation ID",
        "in": "path",
        "name": "supercaseBulkOperationId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "noteId": {
        "description": "The ID of the note",
        "in": "path",
        "name": "noteId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "publishReviewTask": {
        "description": "Create case update review task if `true`.\nThe task is created only when the user type is `Service`.\n",
        "in": "query",
        "name": "publishReviewTask",
        "schema": {
          "default": true,
          "type": "boolean"
        }
      },
      "populationId": {
        "description": "The ID of the population",
        "in": "path",
        "name": "populationId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "userId": {
        "description": "Unique user identifier.",
        "in": "path",
        "name": "userId",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AnyId"
        }
      },
      "roleId": {
        "description": "Unique role identifier.",
        "in": "path",
        "name": "roleId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "includeContextVars": {
        "description": "If `true`, include all the context variables for this template.\n",
        "in": "query",
        "name": "includeContextVars",
        "required": false,
        "schema": {
          "default": false,
          "type": "boolean"
        }
      },
      "includeContents": {
        "description": "If `true`, include the template contents, otherwise only return metadata.",
        "in": "query",
        "name": "includeContents",
        "required": false,
        "schema": {
          "default": true,
          "type": "boolean"
        }
      },
      "subjectFilterQuery": {
        "description": "Only include templates matching these interaction subjects.",
        "in": "query",
        "name": "subject",
        "required": false,
        "schema": {
          "items": {
            "$ref": "#/components/schemas/InteractionSubject"
          },
          "type": "array"
        }
      },
      "parameters-channel": {
        "description": "Only include templates matching this set of interaction channels.",
        "in": "query",
        "name": "channel",
        "required": false,
        "schema": {
          "items": {
            "$ref": "#/components/schemas/InteractionChannel"
          },
          "type": "array"
        }
      },
      "verificationTypeId": {
        "description": "The unique borrower verification type identifier.",
        "in": "path",
        "name": "verificationTypeId",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "webhookSubscriptionId": {
        "description": "The ID of the webhook subscription",
        "in": "path",
        "name": "webhookSubscriptionId",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    },
    "requestBodies": {
      "Plaid": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "clientId": {
                  "description": "The Plaid `client_id` from your Plaid dashboard.",
                  "example": "6143abc123def456",
                  "type": "string"
                },
                "secret": {
                  "description": "The Plaid secret key for your environment (sandbox, development, or production)",
                  "example": "abc123def456...",
                  "type": "string"
                }
              },
              "required": [
                "clientId",
                "secret"
              ],
              "type": "object"
            }
          }
        },
        "required": true
      },
      "ExchangeTokenPost": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "userId": {
                  "$ref": "#/components/schemas/AnyId"
                }
              },
              "required": [
                "userId"
              ],
              "type": "object"
            }
          }
        },
        "required": true
      },
      "AuthPost": {
        "content": {
          "application/json": {
            "schema": {
              "anyOf": [
                {
                  "properties": {
                    "password": {
                      "description": "The password to authenticate with.",
                      "format": "password",
                      "type": "string"
                    },
                    "username": {
                      "description": "The username to authenticated. This can be a username or an email, depending on the configuration.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                {
                  "properties": {
                    "exchangeToken": {
                      "description": "Temporary exchange token generated by the /auth/exchange-token endpoint.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "required": true
      },
      "BulkSenderCreate": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BulkSenderCreate"
            }
          }
        }
      },
      "BulkSenderUpdate": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BulkSender"
            }
          }
        }
      },
      "ContactExporterCreate": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ContactExporter"
            }
          }
        }
      },
      "ContactExporterUpdate": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ContactExporter"
            }
          }
        }
      },
      "BorrowerCampaignCreate": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BorrowerCampaign"
            }
          }
        }
      },
      "BorrowerCampaignUpdate": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BorrowerCampaign"
            }
          }
        }
      },
      "BorrowerCampaignRunCreate": {
        "content": {
          "application/json": {
            "schema": {
              "nullable": true,
              "properties": {
                "queryResultsOverride": {
                  "description": "Instead of running the Redash query specified in the Campaign object at `queryRedashUrl`\nyou can overide that query by providing a query results override.\n\nInstead of the query being run and its results being used as campaign input, the data provided here\nis fed into the campaign as input.\n",
                  "example": [
                    {
                      "borrowerId": 1,
                      "loanId": 101
                    },
                    {
                      "borrowerId": 2,
                      "loanId": 102
                    },
                    {
                      "borrowerId": 3,
                      "loanId": 103
                    }
                  ],
                  "type": "array"
                }
              },
              "type": "object"
            }
          }
        }
      },
      "BorrowerCampaignRunUpdate": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BorrowerCampaignRun"
            }
          }
        }
      },
      "CardIssuerPost": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/CardIssuer"
                },
                {
                  "required": [
                    "status",
                    "cardIssuerType",
                    "cardType"
                  ]
                }
              ]
            }
          }
        },
        "required": true
      },
      "CardIssuerPut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CardIssuerPut"
            }
          }
        },
        "required": true
      },
      "CaseTypePost": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CaseTypePostOnly"
            }
          }
        },
        "required": true
      },
      "CaseTypePut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CaseType"
            }
          }
        },
        "required": true
      },
      "CommunicatorReceiveOnlyPost": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "required": [
                    "theme",
                    "channel",
                    "status"
                  ]
                },
                {
                  "$ref": "#/components/schemas/Interaction"
                }
              ]
            }
          }
        },
        "required": true
      },
      "CollectionAgencyPost": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/CollectionAgencyPost"
                },
                {
                  "required": [
                    "legalName",
                    "contactPhone",
                    "mailingAddress"
                  ]
                }
              ]
            }
          }
        },
        "required": true
      },
      "CollectionAgencyPut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CollectionAgency"
            }
          }
        },
        "required": true
      },
      "CreditAgencyPost": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/CreditAgency"
                },
                {
                  "required": [
                    "agencyName",
                    "country",
                    "dataFormat"
                  ]
                },
                {
                  "properties": {
                    "copyKeysFrom": {
                      "$ref": "#/components/schemas/AnyId",
                      "description": "The identifier of the agency to copy keys from."
                    },
                    "enrollExistingLoans": {
                      "default": false,
                      "description": "Automatically enroll existing active loans for credit reporting with this agency.",
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "required": true
      },
      "CreditAgencyPut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CreditAgency"
            }
          }
        },
        "required": true
      },
      "LoanLabelPost": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/LoanLabel"
                },
                {
                  "required": [
                    "name"
                  ]
                }
              ]
            }
          }
        },
        "required": true
      },
      "LoanIdsPut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LoanIdsRequest"
            }
          }
        },
        "required": true
      },
      "LoanLabelPut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LoanLabel"
            }
          }
        },
        "required": true
      },
      "LoanTapeTypePost": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/TapeType"
                },
                {
                  "required": [
                    "tapeType",
                    "tapeName",
                    "fields"
                  ]
                }
              ]
            }
          }
        },
        "required": true
      },
      "LoanTapeTypePut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BaseLoanTapeType"
            }
          }
        },
        "required": true
      },
      "LoanTapePost": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/LoanTape"
                },
                {
                  "required": [
                    "loanTapeTypeId",
                    "sftpHostname"
                  ]
                }
              ]
            }
          }
        },
        "required": true
      },
      "LoanTapePut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LoanTape"
            }
          }
        },
        "required": true
      },
      "MerchantPost": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Merchant"
                },
                {
                  "required": [
                    "businessName"
                  ]
                }
              ]
            }
          }
        },
        "required": true
      },
      "MerchantPut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Merchant"
            }
          }
        },
        "required": true
      },
      "PromoProgramTypePost": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PromoProgramTypePost"
            }
          }
        },
        "required": true
      },
      "PromoProgramTypePut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PromoProgramTypePut"
            }
          }
        },
        "required": true
      },
      "CodeUpdate": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Code"
            }
          }
        },
        "required": true
      },
      "CodeExecution": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CodeExecution"
            }
          }
        },
        "required": true
      },
      "DoNotInteractType": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/DoNotInteractType"
            }
          }
        },
        "required": true
      },
      "EmployeePost": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Employee"
                },
                {
                  "required": [
                    "userId"
                  ],
                  "type": "object"
                }
              ]
            }
          }
        },
        "required": true
      },
      "EmployeePut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Employee"
            }
          }
        },
        "required": true
      },
      "EmailSignaturePut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/EmailSignatureUpdate"
            }
          }
        },
        "required": true
      },
      "ConvoJoin": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "joinType": {
                  "default": "solo",
                  "description": "The method of joining the conversation.\n\n- `solo` - only add agent to conversation if there are no other agents in conversations\n- `add` - simply add agent to conversation\n- `takeover` - remove all other agents from conversation, the add agent\n",
                  "enum": [
                    "solo",
                    "add",
                    "takeover"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        }
      },
      "Note": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/NoteRequest"
            }
          }
        },
        "required": true
      },
      "IndexRateAdd": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/IndexRate"
            }
          }
        },
        "required": true
      },
      "IndexRateUpdate": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/IndexRateUpdate"
            }
          }
        },
        "required": true
      },
      "NotificationType": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/NotificationType"
            }
          }
        },
        "required": true
      },
      "PersonRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Borrower"
            }
          }
        },
        "required": true
      },
      "PersonPutRequest": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/BorrowerNoIdentity"
                },
                {
                  "properties": {
                    "caseId": {
                      "description": "An identifier for an existing case.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "required": true
      },
      "CanInteract": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CanInteractByContactIdentifier"
            }
          }
        },
        "required": true
      },
      "CasePost": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Case"
            }
          }
        },
        "required": true
      },
      "CasePut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CasePut"
            }
          }
        },
        "required": true
      },
      "AssociationPost": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CaseAssociation"
            }
          }
        },
        "required": true
      },
      "DoNotInteractCreate": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/DoNotInteract"
            }
          }
        },
        "required": true
      },
      "DoNotInteractUpdate": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/DoNotInteractUpdate"
            }
          }
        },
        "required": true
      },
      "CaseEscalationPost": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CaseEscalation"
            }
          }
        },
        "required": true
      },
      "UpdateConsent": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Consents"
            }
          }
        },
        "required": true
      },
      "ContactBody": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ContactInformation"
            }
          }
        },
        "required": true
      },
      "IdentityRequest": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Identity"
                },
                {
                  "$ref": "#/components/schemas/CaseId"
                },
                {
                  "required": [
                    "value",
                    "identityType"
                  ]
                }
              ]
            }
          }
        },
        "required": true
      },
      "IdentityPutRequest": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/IdentityPut"
                },
                {
                  "$ref": "#/components/schemas/CaseId"
                }
              ]
            }
          }
        },
        "required": true
      },
      "InteractionPost": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "required": [
                    "direction",
                    "theme",
                    "channel",
                    "status"
                  ]
                },
                {
                  "$ref": "#/components/schemas/Interaction"
                }
              ]
            }
          }
        },
        "required": true
      },
      "InteractionPut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Interaction"
            }
          }
        },
        "required": true
      },
      "LegalRepresentative": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LegalRepresentative"
            }
          }
        },
        "required": true
      },
      "LoanPost": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/NewLoan"
            }
          }
        },
        "required": true
      },
      "LoanUpdate": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "atOrigination": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/InstallmentAtOrigination"
                    },
                    {
                      "$ref": "#/components/schemas/LineOfCreditAtOrigination"
                    }
                  ],
                  "description": "This object can only be updated when the loan has `status=pending`."
                },
                "chargedOffReason": {
                  "description": "The reason for the loan charge off. You can only update the `chargedOffReason` if the loan status is `chargedOff`.\n- `term` means the loan was charged off per loan type configuration after X days overdue.\n- `fraudulent` means the loan was charged off for fraudulent reason. If the loan is reported to one or more credit bureaus, the system will automatically send a special request to each bureau to delete the tradeline due to confirmed fraud. This is the only reason that the system will automatically trigger a request to delete the tradeline. For other reasons, if you need to delete the tradeline please call the `Delete from credit reporting` endpoint or use an agent tool.\n- `bankruptcy` means the loan was charged off because of bankruptcy.\n- `legal` means the loan was charged off because of some legal reason.\n",
                  "enum": [
                    "term",
                    "fraudulent",
                    "bankruptcy",
                    "legal"
                  ],
                  "type": "string"
                },
                "externalId": {
                  "description": "The lender's identifier for the loan. Requires the `loan:update.force` permission to change.",
                  "nullable": true,
                  "type": "string"
                },
                "metaData": {
                  "$ref": "#/components/schemas/MetaData"
                },
                "migration": {
                  "$ref": "#/components/schemas/Migration"
                },
                "muteLoanNotices": {
                  "description": "Indicates whether the system should stop/pause sending loan related notices to the borrower. Set to true if you want to mute all loan related notices (e.g. loanDetails. autopayEnabled, paymentFailed, etc.) Keep in mind that it will also stop all notices related to the loan that are sent from Peach Agent Portal by an agent.\nNote: this is not the only attribute that can stop notices from being sent. Compliance Guard and Cases Do Not Interact can also block communications.\n",
                  "type": "boolean"
                },
                "nickname": {
                  "description": "A nickname the borrower gave the loan.",
                  "type": "string"
                },
                "status": {
                  "$ref": "#/components/schemas/LoanStatus"
                }
              },
              "type": "object"
            }
          }
        },
        "required": true
      },
      "LoanAccelerate": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LoanAccelerate"
            }
          }
        },
        "required": true
      },
      "LoanActivate": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LoanActivate"
            }
          }
        },
        "required": false
      },
      "AutopayPut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AutopayUpdate"
            }
          }
        },
        "required": true
      },
      "AutopayPost": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AutopayPost"
            }
          }
        },
        "required": true
      },
      "LoanCancel": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LoanCancel"
            }
          }
        },
        "required": true
      },
      "CardPost": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CardWithPanAndCvv"
            }
          }
        },
        "required": true
      },
      "CardPut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PutCardWithPanAndCvv"
            }
          }
        },
        "required": true
      },
      "LoanChargeOff": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LoanChargeOff"
            }
          }
        },
        "required": true
      },
      "CollectionAgencyLoanDetailsPut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CollectionAgencyLoanDetailsPut"
            }
          }
        },
        "required": true
      },
      "CreditReportingFieldsPut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LoanCreditReportingFields"
            }
          }
        },
        "required": true
      },
      "CreditReportingStatusPost": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/StartCreditReporting"
                },
                {
                  "required": [
                    "creditAgencyId",
                    "reportingStartDate"
                  ]
                }
              ]
            }
          }
        },
        "required": true
      },
      "CreditReportingStatusDelete": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/DeleteCreditReporting"
                },
                {
                  "required": [
                    "deletedReason"
                  ]
                }
              ]
            }
          }
        },
        "required": true
      },
      "LoanCustomPaymentPlan": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LoanCustomPaymentPlan"
            }
          }
        },
        "required": true
      },
      "LoanCustomPaymentPlanCancel": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LoanCustomPaymentPlanCancel"
            }
          }
        },
        "required": true
      },
      "LoanDeferDueDate": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LoanDeferDueDate"
            }
          }
        },
        "required": true
      },
      "LoanDeferSchedule": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LoanDeferSchedule"
            }
          }
        },
        "required": true
      },
      "DrawsPost": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Draw"
            }
          }
        },
        "required": true
      },
      "DrawUpdate": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "atOrigination": {
                  "$ref": "#/components/schemas/DrawAtOriginationUpdate",
                  "description": "This object can only be updated when the draw has `status=pending`."
                },
                "drawType": {
                  "description": "Describes the type of line of credit purchases associated with the draw. Typically used in credit card use cases\nin which lenders set up draws specifically to be used for cash advances, balance transfers, etc.\n\n`cashAdvance` - must be set in order for Peach's system to automatically associate ATM withdrawal and other\n  cash-specific transactions with a specific draw. See Create card issuer endpoint and `drawMapping` attribute for additional configuration details.\n\n`balanceTransfer` - enables lenders to create a draw that will house balance transfer transactions.\n\n`regularPurchase` - enables lenders to create a draw used for day-to-day purchases. If this attribute is set,\n  Peach's system will automatically associate purchases with this draw based on the card issuer `drawMapping` logic.\n",
                  "enum": [
                    "balanceTransfer",
                    "cashAdvance",
                    "regularPurchase"
                  ],
                  "nullable": true,
                  "type": "string"
                },
                "externalId": {
                  "description": "The lender's identifier for the draw. Requires the `loan:update.force` permission to change.",
                  "nullable": true,
                  "type": "string"
                },
                "nickname": {
                  "description": "A nickname the borrower gave the draw.",
                  "type": "string"
                },
                "status": {
                  "$ref": "#/components/schemas/LoanStatus"
                }
              },
              "type": "object"
            }
          }
        },
        "required": true
      },
      "PromoProgramPost": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PromoProgramPost"
            }
          }
        },
        "required": true
      },
      "PromoProgramPutDraw": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PromoProgramPutCommon"
            }
          }
        },
        "required": true
      },
      "PurchaseDisputePost": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/PurchaseDispute"
                },
                {
                  "properties": {
                    "createDisputeCase": {
                      "default": true,
                      "description": "If `true`, the system will automatically create a `Purchase Dispute` case object and return the case identifier in `caseId` attribute. Alternatively, you can create the case object, pass `createDisputeCase=false` and the case identifier in the `caseId` attribute.\n",
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                },
                {
                  "required": [
                    "disputedAmount"
                  ]
                }
              ]
            }
          }
        },
        "required": true
      },
      "PurchaseDisputePut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PurchaseDispute"
            }
          }
        },
        "required": true
      },
      "RateCapAdd": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/RateCapAdd"
            }
          }
        },
        "required": true
      },
      "RateCapUpdate": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/RateCapUpdate"
            }
          }
        },
        "required": true
      },
      "LoanRateAdd": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "properties": {
                    "interestRate": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/InterestRate"
                        },
                        {
                          "$ref": "#/components/schemas/isEndExistingRatesFlag"
                        }
                      ]
                    },
                    "promoRate": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/PromoRate"
                        },
                        {
                          "$ref": "#/components/schemas/isEndExistingRatesFlag"
                        }
                      ]
                    }
                  },
                  "type": "object"
                },
                {
                  "$ref": "#/components/schemas/CaseId"
                }
              ]
            }
          }
        },
        "required": true
      },
      "LoanRateUpdate": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "properties": {
                    "interestRate": {
                      "$ref": "#/components/schemas/InterestRate"
                    },
                    "promoRate": {
                      "$ref": "#/components/schemas/PromoRate"
                    }
                  },
                  "type": "object"
                },
                {
                  "$ref": "#/components/schemas/CaseId"
                }
              ]
            }
          }
        },
        "required": true
      },
      "DueDatesPost": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/DueDatesRequest"
            }
          }
        },
        "required": true
      },
      "FeesPost": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "apiName": {
                  "$ref": "#/components/schemas/FeeApiName"
                },
                "caseId": {
                  "description": "An identifier for an existing case.",
                  "type": "string"
                },
                "chargeDate": {
                  "$ref": "#/components/schemas/ChargeDate"
                },
                "chargeTimeOfDay": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/TimeOfDay"
                    },
                    {
                      "description": "See description of the `chargeDate`. The value can be provided only if the `chargeDate` attribute is passed. If `chargeTimeOfDay` is not provided,\nthe Peach system will determine and set the time of day.\n",
                      "type": "object"
                    }
                  ]
                },
                "customDisplayName": {
                  "description": "A custom description of the fee. If provided, this value will be displayed in Peach UI/App and Statements\n(or can be used by lender in their App). If the value is not provided, the Peach UI/App and Statements\nlogic will use displayName attribute. To remind, the displayName is populated from the fee type configuration object.\n",
                  "nullable": true,
                  "type": "string"
                },
                "externalId": {
                  "description": "The lender's identifier for the fee.",
                  "type": "string"
                },
                "feeAmount": {
                  "description": "The fee amount, which is required only if the fee type was configured as `chargedLogic=adHoc` and `amountLogic=adHoc`. In all other\ncases, the system will calculate the fee based on pre-configured logic.\n",
                  "type": "number"
                },
                "migration": {
                  "$ref": "#/components/schemas/FeesMigrationDetails",
                  "nullable": true
                },
                "previewMode": {
                  "description": "In `previewMode=true`, the fee is computed but not charged.",
                  "type": "boolean"
                },
                "triggerPeriodId": {
                  "description": "The ID of the period that \"triggered\" the fee. For example, if a loan is late by 5 periods, which period is this particular late fee for?\n",
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "required": true
      },
      "LoanChangeLoanTermsSCRAUpdate": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LoanChangeLoanTermsSCRAUpdate"
            }
          }
        },
        "required": true
      },
      "LoanChangeLoanTermsSCRA": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LoanChangeLoanTermsSCRA"
            }
          }
        },
        "required": true
      },
      "LoanChangeLoanTerms": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LoanChangeLoanTerms"
            }
          }
        },
        "required": true
      },
      "PromiseToPayPlanPost": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PromiseToPayPlanPost"
            }
          }
        },
        "description": "Promise to pay plan post"
      },
      "PromiseToPayPlanCancel": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PromiseToPayPlanCancel"
            }
          }
        },
        "description": "Promise to pay plan cancel"
      },
      "PromoProgramPut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PromoProgramPut"
            }
          }
        },
        "required": true
      },
      "LoanRefund": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LoanRefund"
            }
          }
        },
        "required": true
      },
      "LoanRefundV2": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LoanRefundV2"
            }
          }
        },
        "required": true
      },
      "LoanRefundCancel": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LoanRefundCancel"
            }
          }
        },
        "required": true
      },
      "LoanReimburse": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LoanReimburse"
            }
          }
        },
        "required": true
      },
      "CaseId": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CaseId"
            }
          }
        },
        "required": true
      },
      "FailMultipleTransactions": {
        "content": {
          "application/json": {
            "schema": {
              "items": {
                "properties": {
                  "achReturnCode": {
                    "description": "The ACH return code indicating the reason the transaction failed.",
                    "example": "R01",
                    "maxLength": 5,
                    "type": "string"
                  },
                  "failureReason": {
                    "$ref": "#/components/schemas/TransactionFailureReason"
                  },
                  "processorFailureDetails": {
                    "description": "The error details returned by the payment processor. Can be any valid JSON object.",
                    "example": {
                      "code": "INSUFFICIENT_FUNDS"
                    }
                  },
                  "processorFailureReason": {
                    "description": "The raw failure reason returned by the payment processor.",
                    "example": "Insufficient Funds. Retry after 24 hours.",
                    "type": "string"
                  },
                  "transactionId": {
                    "description": "ID of the transaction to fail.",
                    "type": "string"
                  }
                },
                "required": [
                  "transactionId",
                  "failureReason"
                ],
                "type": "object"
              },
              "type": "array"
            }
          }
        },
        "required": true
      },
      "ChargebackPost": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "amount": {
                  "description": "The amount of the chargeback. If a value is not provided the system would set the amount to `actualAmount` of the\ntransaction. If partial chargeback(s) were processed in the past, the caller must provide the amount, otherwise\nthe call would fail. Amount provided must be less than or equal to the `effectiveAmount` of the transaction at the\ntime of the call.\n",
                  "format": "float",
                  "type": "number"
                },
                "caseId": {
                  "description": "The identifier of an existing case.",
                  "type": "string"
                },
                "category": {
                  "description": "The chargeback category as received from the payment processor.",
                  "type": "string"
                },
                "externalCaseNumber": {
                  "description": "The external case number of the chargeback in the payment processor system.",
                  "type": "string"
                },
                "externalId": {
                  "description": "The lender's identifer of the chargeback",
                  "type": "string"
                },
                "reasonCode": {
                  "description": "The reason code as received from the payment processor.",
                  "type": "string"
                },
                "status": {
                  "$ref": "#/components/schemas/ChargebackStatus"
                }
              },
              "type": "object"
            }
          }
        }
      },
      "ChargebackPut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Chargeback"
            }
          }
        }
      },
      "ReversalPost": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "amount": {
                  "description": "The amount of the reversal. For regular transactions, it may be a partial or full reversal; however, the sum of all successful reversals for the same\ntransaction may not exceed the transaction's `effectiveAmount`. If `amount` is not provided, it will default to the\n`effectiveAmount` of the original transaction.\n\nFor past transactions, only full reversals are supported.\n",
                  "format": "float",
                  "type": "number"
                },
                "caseId": {
                  "description": "The identifier of an existing case.",
                  "type": "string"
                },
                "externalId": {
                  "description": "The external ID of the reversal transaction. This is separate from the `externalId` of the transaction being reversed in the request parameters.\n",
                  "maxLength": 200,
                  "minLength": 1,
                  "type": "string"
                },
                "scheduledDate": {
                  "description": "The scheduled date of the reversal transaction. Can only be set for external transactions. If this value is provided, the `status` cannot be set\nto a status other than `scheduled`, and the system will automatically set `status=scheduled` if the field is not specified.\n",
                  "format": "date",
                  "type": "string"
                },
                "status": {
                  "description": "The status of the reversal transaction, not the original transaction. Status may only be set for external transactions. If a status is not passed,\nthe system will default the status to `scheduled`.\n\n - `scheduled` - reversal was scheduled for a future date that has not arrived yet. The reversal has not applied to a loan yet and is not included\n    in the original transaction's `effectiveAmount`.\n - `initiated` - reversal was initiated and sent to a payment processor. The reversal is applied to a loan and impacts the original transaction's\n    `effectiveAmount`. This status is used normally for ACH.\n - `pending` - reversal was acknowledged by the payment processor and is being processed.\n - `succeeded` - reversal was completed successfully. This status is only allowed for past transactions that were created as part of line of credit\n migration. `status=succeeded` is the only status that can be passed for past transaction reversals. Regular transaction reversals can only be set\n to `scheduled`, `initiated`, or `pending`.\n",
                  "enum": [
                    "scheduled",
                    "initiated",
                    "pending",
                    "succeeded"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "required": false
      },
      "LoanUnfreeze": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LoanUnfreeze"
            }
          }
        },
        "required": true
      },
      "VerificationPost": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/VerificationPost"
            }
          }
        },
        "required": false
      },
      "VerificationAttemptPost": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/VerificationAttemptPost"
            }
          }
        },
        "required": true
      },
      "SupercasePost": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Supercase"
                },
                {
                  "required": [
                    "supercaseType"
                  ]
                }
              ]
            }
          }
        },
        "required": true
      },
      "SupercasePut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Supercase"
            }
          }
        },
        "required": true
      },
      "BulkSendRequestBody": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BulkSendRequestBody"
            }
          }
        },
        "required": true
      },
      "SupercaseDocumentList": {
        "content": {
          "application/json": {
            "schema": {
              "description": "List of document IDs.\n",
              "items": {
                "description": "A document descriptor ID.",
                "type": "string"
              },
              "type": "array"
            }
          }
        },
        "required": true
      },
      "PopulationMemberCollectionPut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PopulationMemberCollection"
            }
          }
        },
        "required": true
      },
      "PopulationMemberCollectionPost": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PopulationMemberCollection"
            }
          }
        },
        "required": true
      },
      "PopulationMemberCollectionCSVPut": {
        "content": {
          "application/octet-stream": {
            "schema": {
              "format": "binary",
              "type": "string"
            }
          }
        },
        "required": true
      },
      "PopulationMemberCollectionCSVPost": {
        "content": {
          "application/octet-stream": {
            "schema": {
              "format": "binary",
              "type": "string"
            }
          }
        },
        "required": true
      },
      "PopulationPut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Population"
            }
          }
        },
        "required": true
      },
      "TeamPost": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Team"
            }
          }
        },
        "required": true
      },
      "VerificationTypePost": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/VerificationType"
            }
          }
        },
        "required": false
      },
      "WebhookSubscriptionPost": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/WebhookSubscription"
                },
                {
                  "required": [
                    "webhookType"
                  ]
                }
              ]
            }
          }
        },
        "required": true
      },
      "WebhookSubscriptionPut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/WebhookSubscriptionPut"
            }
          }
        },
        "required": true
      }
    },
    "responses": {
      "CaseEscalationDetailedPaging": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Paging"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/CaseEscalationDetailed"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "Amortize": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AmortizationResult"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "TemporaryTokenResponse": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "data": {
                  "properties": {
                    "exchangeToken": {
                      "description": "A random token that may be exchanged for a real token via the `/auth/token` endpoint",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "Success"
      },
      "SingletonResponse": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SingletonResponse"
            }
          }
        },
        "description": "Success"
      },
      "UserPermissions": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "$ref": "#/components/schemas/UserPermissions"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "JWT": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AuthSuccess"
            }
          }
        },
        "description": "JWT token"
      },
      "UserInfo": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/UserInfo"
            }
          }
        },
        "description": "Success"
      },
      "BulkSenderList": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/NewPaginator"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/BulkSender"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "success"
      },
      "BulkSender": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BulkSender"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "success"
      },
      "ContactExporterList": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/NewPaginator"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ContactExporter"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "success"
      },
      "ContactExporter": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ContactExporter"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "success"
      },
      "BorrowerCampaignList": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/NewPaginator"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/BorrowerCampaignFull"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "BorrowerCampaign": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BorrowerCampaignFull"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "BorrowerCampaignRun": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BorrowerCampaignRun"
            }
          }
        },
        "description": "Success"
      },
      "CardIssuerPagingResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Paging"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/CardIssuer"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "CardIssuerResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CardIssuer"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "CaseTypesPaging": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Paging"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/CaseType"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "CaseType": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CaseType"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "NoContent": {
        "description": "Success no content"
      },
      "SmartReviewsTasksCreated": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "data": {
                  "properties": {
                    "caseTypeId": {
                      "description": "Case type this task creation run was performed on",
                      "type": "string"
                    },
                    "completedAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "createdTasks": {
                      "properties": {
                        "count": {
                          "description": "Number of reminder tasks created",
                          "type": "number"
                        },
                        "taskLog": {
                          "additionalProperties": {
                            "example": {
                              "CE-XXXX-XXXX": {
                                "caseValue": "2023-07-31T19:07:00Z",
                                "creatingRule": "keyDates.importantDate"
                              }
                            },
                            "properties": {
                              "caseValue": {
                                "description": "The value on the case that triggered task creation"
                              },
                              "creatingRule": {
                                "description": "The smart reviews rule that triggered task creation",
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    },
                    "smartReviewsConfig": {
                      "description": "Smart reviews configuration for the case type as of the\ntask creation run\n",
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "Run successful with created reminder tasks"
      },
      "CasesPaging": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/NewPaginator"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Case"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "CollectionAgencyPagingResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Paging"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/CollectionAgency"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "CollectionAgencyResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CollectionAgency"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "CreditAgencyPagingResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Paging"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/CreditAgency"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "CreditAgencyResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreditAgency"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "CallSummaryResultsPaging": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CallSummaryResultsPaging"
            }
          }
        },
        "description": "Success"
      },
      "InteractionsManyNoPaging": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/InteractionsManyNoPaging"
            }
          }
        },
        "description": "Success"
      },
      "LoanLabelPagingResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/NewPaginator"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/LoanLabel"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "LoanLabelResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LoanLabel"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "LoanIdsResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LoanIdsResponse"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "LoanTapeTypePagingResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Paging"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/TapeType"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "LoanTapeTypeResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TapeType"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "LoanTapePagingResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Paging"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/LoanTape"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "LoanTapeResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LoanTape"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "PromiseToPayPlan": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PromiseToPayPlan"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Promise to pay plan"
      },
      "MerchantPagingResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Paging"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Merchant"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "MerchantResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Merchant"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "PromoProgramTypePaging": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PromoProgramTypePaging"
            }
          }
        },
        "description": "Success"
      },
      "PromoProgramType": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PromoProgramTypeFields"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "TaskWorkerPairingConfigPaging": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/TaskWorkerPairingConfigPaging"
            }
          }
        },
        "description": "Success"
      },
      "TaskWorkerPairingConfig": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TaskWorkerPairingConfig"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "TaskQueueData": {
        "content": {
          "application/json": {
            "schema": {
              "items": {
                "$ref": "#/components/schemas/TaskQueueData"
              },
              "type": "array"
            }
          }
        },
        "description": "Success"
      },
      "CodeCollection": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CodePaging"
            }
          }
        },
        "description": "Codes"
      },
      "GetCode": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Code"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Code"
      },
      "CodeExecution": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CodeExecution"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Code Execution Result"
      },
      "DoNotInteractTypesPaging": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Paging"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/DoNotInteractType"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "DoNotInteractType": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DoNotInteractType"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "EmployeesPaging": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/NewPaginator"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Employee"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "Employee": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Employee"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "EmailSignature": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EmailSignature"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "EventsPublic": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/NewPaginator"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/EventPublic"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "InteractionsPaging": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/InteractionsPaging"
            }
          }
        },
        "description": "Success"
      },
      "Interaction": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Interaction"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "Note": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/NoteResponse"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "200ReturnUrl": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "url": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "If the `returnUrl` parameter is `true` then return the url rather than redirecting."
      },
      "302DownloadRecordedContents": {
        "description": "Redirected to the recorded content"
      },
      "IndexRatePaging": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/IndexRatePaging"
            }
          }
        },
        "description": "Success"
      },
      "IndexRateResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/IndexRateResult"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "NotificationTypesPaging": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Paging"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/NotificationType"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "NotificationType": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/NotificationType"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "PersonPaging": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BorrowerPaging"
            }
          }
        },
        "description": "Success"
      },
      "Person": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Borrower"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "PersonSearchPaging": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PersonSearchPaging"
            }
          }
        },
        "description": "Success"
      },
      "PersonNoIdentity": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BorrowerNoIdentity"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "CanInteract": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InteractionCanInteractResult"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "Case": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Case"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "DoNotInteractPaging": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/NewPaginator"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/DoNotInteract"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "DoNotInteract": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DoNotInteract"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "CaseEscalationPaging": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Paging"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/CaseEscalation"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "CaseEscalationDetailed": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CaseEscalationDetailed"
            }
          }
        },
        "description": "Success"
      },
      "Consent": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ConsentArray"
            }
          }
        },
        "description": "Success"
      },
      "ContactInformationPaging": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/NewPaginator"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ContactInformation"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "ContactInformation": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ContactInformation"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "IdentityPaging": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/IdentityPaging"
            }
          }
        },
        "description": "Success"
      },
      "Identity": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Identity"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "LegalRepresentativesPaging": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LegalRepresentativesPaging"
            }
          }
        },
        "description": "Success"
      },
      "LegalRepresentative": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LegalRepresentative"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "Loan": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Loan"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "LoanAccelerate": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LoanAccelerateResponse"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Loan Accelerate"
      },
      "LoanActivate": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LoanActivationResponse"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "Autopay": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Autopay"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "AutopayPut": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Autopay"
                        },
                        {
                          "$ref": "#/components/schemas/DeltaTerms"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "AutopayPost": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Autopay"
                        },
                        {
                          "$ref": "#/components/schemas/DeltaTerms"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "Balances": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Balances"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "LockedResponse": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "message": {
                  "enum": [
                    "Loan is locked for updates. Please try again.",
                    "Loan is locked for updates. Please check back again in a few minutes.",
                    "Previous purchase is processing."
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "Locked"
      },
      "CardPagingResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Paging"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Card"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "CardResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Card"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "CardResponseWithPanAndCvv": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CardWithPanAndCvv"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "LoanChargeOff": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LoanChargeOffResponse"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Loan Charge Off"
      },
      "CollectionAgencyLoanDetailsResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CollectionAgencyLoanDetailsGet"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "CreditReportingStatusPagingResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Paging"
                },
                {
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "properties": {
                            "creditReportingDetails": {
                              "items": {
                                "$ref": "#/components/schemas/CreditReportingStatus"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        },
                        {
                          "$ref": "#/components/schemas/LoanCreditReportingFields"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "CreditReportingStatusResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreditReportingStatus"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "LoanCustomPaymentPlans": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Paging"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/CustomPaymentPlanResult"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "LoanCustomPaymentPlan": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CustomPaymentPlanResult"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "LoanDeferDueDate": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Paging"
                },
                {
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/LoanSchedule"
                        },
                        {
                          "$ref": "#/components/schemas/DueDateDeferralFeeAmount"
                        },
                        {
                          "$ref": "#/components/schemas/DeltaTerms",
                          "description": "If deferred due date is in the past, this will be `null`, otherwise will be present.\n"
                        },
                        {
                          "properties": {
                            "isLocked": {
                              "description": "If true, the loan is in the middle of being updated or replayed. The returned data are not consistent. The caller should poll\non the `Get loan lock status` endpoint. Once `isLocked` becomes `false`, the caller should call GET /expected-payments again to get consistent data.\n",
                              "type": "boolean"
                            }
                          },
                          "type": "object"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "LoanDeferSchedule": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Paging"
                },
                {
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/LoanSchedule"
                        },
                        {
                          "$ref": "#/components/schemas/DueDateDeferralFeeAmount"
                        },
                        {
                          "$ref": "#/components/schemas/DeltaTerms"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "PurchaseDisputePagingResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Paging"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/PurchaseDispute"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "DrawsPaging": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/DrawsPaging"
            }
          }
        },
        "description": "Success"
      },
      "Draw": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DrawResponse"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "DrawActivate": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DrawActivationResponse"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "DynamicFeesAtOrigination": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AtOriginationDynamicFees"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "LoanEffectiveRatesResponse": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "data": {
                  "properties": {
                    "effectiveRates": {
                      "items": {
                        "properties": {
                          "effectiveDate": {
                            "description": "The effective date.",
                            "format": "date",
                            "type": "string"
                          },
                          "effectiveInterestRate": {
                            "description": "The annual effective interest rate on the `effectiveDate`.\n\nFor `interestType=spread` the value is calculated as: `interestRate + indexRate - promoRate`. \nFor `interestType=absolute` the value is calculated as: `interestRate - promoRate`. \n  \nAdditionally, the value cannot be negative, and cannot be higher than the lowest rate cap for the given date.\n",
                            "format": "float",
                            "type": "number"
                          },
                          "indexRate": {
                            "description": "The annual interest index rate value for the `effectiveDate`. Format is decimal. For example, 0.01 is 1% annual rate, 0.2 is 20% annual rate.\n",
                            "format": "float",
                            "type": "number"
                          },
                          "indexRateId": {
                            "description": "The identifier of the index rate that is effective on this date.\n",
                            "nullable": true,
                            "type": "string"
                          },
                          "interestRate": {
                            "description": "The annual net interest rate on the `effectiveDate`. Format is decimal. For example, 0.01 is 1% annual rate, 0.2 is 20% annual rate.\nIf two or more interest rates are `active` on the same date (aka overlap), Peach system selects the lowest rate (also called effective rate) to accrue interest.\n",
                            "format": "float",
                            "type": "number"
                          },
                          "interestRateId": {
                            "description": "The identifier of the interest rate that is effective on this date.",
                            "type": "string"
                          },
                          "interestType": {
                            "description": "The interest type. The interest type cannot be changed after the loan status changes to `originated` and onward. Interest rates defined as `spread` will calculate an absolute rate by adding the relative loan rate (aka spread) provided here to the Index Interest Rate effective on the date the interest is accrued. In case the Index Interest Rate is not set, the system will assume that the Index Interest Rate value is zero on the date the interest is accrued.\n\nInterest rates defined as `absolute` will use the value as provided here without adding the Index Interest Rate.\n",
                            "enum": [
                              "absolute",
                              "spread"
                            ],
                            "type": "string"
                          },
                          "promoRate": {
                            "description": "The annual promo rate on the `effectiveDate`. Format is decimal. For example, 0.01 is 1% annual rate, 0.2 is 20% annual rate.\nIf two or more promo rates are `active` on the same date (aka overlap), Peach system sums up the rates as \"effective\" promo rate.\n",
                            "format": "float",
                            "type": "number"
                          },
                          "promoRateIds": {
                            "description": "The identifiers of the promo rates that are effective on this date. \n(If two or more promo rates are `active` on the same date, the\nsystem sums the rates up to an \"effective\" promo rate.)\n",
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "rateCap": {
                            "description": "The rate cap value that was applied to limit the effective interest rate.\nThis field contains the actual rate cap value (as a decimal, e.g., 0.36 for 36%).\n",
                            "format": "float",
                            "nullable": true,
                            "type": "number"
                          },
                          "rateCapIds": {
                            "description": "The public identifiers of the rate caps that are in effect on this date.\n(If two or more rate caps are `active` on the same date, the\nsystem uses the lowest rate cap.)\n",
                            "items": {
                              "pattern": "^RC-[A-Z0-9]{4}-[A-Z0-9]{4}$",
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "title": "effective rate",
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "Success"
      },
      "ExpectedPayments": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Paging"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ExpectedPaymentsResult"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "FutureBalances": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/FutureBalances"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "Obligations": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ObligationsResult"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "Obligation": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/ObligationResult"
                        },
                        {
                          "$ref": "#/components/schemas/IsLocked"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "PromoProgram": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PromoProgramResult"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "PromoProgramDelete": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PromoProgramDeleteResult"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "PurchaseDisputeResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PurchaseDispute"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "RateCapsArray": {
        "content": {
          "application/json": {
            "schema": {
              "items": {
                "$ref": "#/components/schemas/RateCap"
              },
              "type": "array"
            }
          }
        },
        "description": "Success"
      },
      "DrawNotFound": {
        "description": "Loan or draw not found"
      },
      "RateCap": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RateCap"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "BadRequest": {
        "description": "Bad request - validation error"
      },
      "DrawRateCapNotFound": {
        "description": "Loan, draw, or rate cap not found"
      },
      "RateCapDeleted": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "message": {
                  "example": "Rate cap deleted successfully",
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "Success"
      },
      "LoanRatesResponse": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "data": {
                  "properties": {
                    "interestRates": {
                      "items": {
                        "$ref": "#/components/schemas/InterestRateResponse"
                      },
                      "type": "array"
                    },
                    "promoRates": {
                      "items": {
                        "$ref": "#/components/schemas/PromoRate"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "Success"
      },
      "CreateOrUpdateInterestRatesResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "properties": {
                        "ratesValidation": {
                          "$ref": "#/components/schemas/InterestRateValidationAfterOrig"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "ChangeSchedule": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Paging"
                },
                {
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/ExpectedPaymentsResult"
                        },
                        {
                          "$ref": "#/components/schemas/DeltaTerms"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "FeeNotCharged": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "message": {
                  "description": "The reason that the fee could not be charged.",
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "Fee not charged"
      },
      "Interest": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "properties": {
                        "deferredInterestAccruedAmount": {
                          "description": "The total deferred interest amount accrued between two dates. If the deferred interest promotion is exercised, the deferred interest \nis not expected to be paid. \n",
                          "format": "float",
                          "type": "number"
                        },
                        "foregoneInterestCapAmount": {
                          "description": "The amount of foregone interest that exceeded the interest cap amount. This is only applicable to installment loans with\n`totalInterestCapAmount=\"true\"` set atOrigination.\n",
                          "format": "float",
                          "type": "number"
                        },
                        "interestAccruedAmount": {
                          "description": "The total interest amount accrued between two dates.",
                          "format": "float",
                          "type": "number"
                        },
                        "interestDiscountAmount": {
                          "description": "The amount of the interest discount between two dates resulting from discounts, promotions, or other adjustments.",
                          "format": "float",
                          "type": "number"
                        },
                        "netInterestAccruedAmount": {
                          "description": "The net interest amount accrued between two dates, including adjustments for discounts and promotions.",
                          "format": "float",
                          "type": "number"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "ChangeScheduleSCRA": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Paging"
                },
                {
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/ExpectedPaymentsResult"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "LOCObligations": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LOCObligationsResult"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "LOCObligation": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/LOCObligationResult"
                        },
                        {
                          "$ref": "#/components/schemas/IsLocked"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "LoanPeriodsResponse": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LoanPeriodsPaging"
            }
          }
        },
        "description": "Loan Periods"
      },
      "LoanPeriodResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LoanPeriod"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Loan Period"
      },
      "PromisetoPayPlansPaging": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/NewPaginator"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/PromiseToPayPlan"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "PromoProgramPaging": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PromoProgramPaging"
            }
          }
        },
        "description": "Success"
      },
      "PurchasesPaging": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PurchasesPaging"
            }
          }
        },
        "description": "Success"
      },
      "LoanNotFound": {
        "description": "Loan not found"
      },
      "RateCapNotFound": {
        "description": "Loan or rate cap not found"
      },
      "LoanRefundCollection": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LoanRefundCollectionResponse"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Loan Refund"
      },
      "LoanRefundPost": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LoanRefund"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Loan Refund"
      },
      "LoanRefundV2Post": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LoanRefundV2"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Loan Refund"
      },
      "LoanReverseAccelerate": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LoanReverseAccelerateResponse"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Loan Reverse Accelerate"
      },
      "LoanReverseChargeOff": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LoanReverseChargeOffResponse"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Loan Reverse Charge Off"
      },
      "LoanScheduleOptions": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LoanScheduleOptions"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Loan Schedule Options Get"
      },
      "StatementCollection": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/StatementsPaging"
            }
          }
        },
        "description": "Collection of statements"
      },
      "Statement": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/schemas-Statement"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "A single Statement"
      },
      "StatementDetails": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StatementDetails"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Details for a single statement"
      },
      "TransactionCollection": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/TransactionsPaging"
            }
          }
        },
        "description": "Collection of Transactions"
      },
      "FailMultipleTransactions": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SingletonResponse"
            }
          }
        },
        "description": "Succeeded"
      },
      "Chargebacks": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "data": {
                  "items": {
                    "$ref": "#/components/schemas/Chargeback"
                  },
                  "type": "array"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "Chargebacks"
      },
      "Chargeback": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Chargeback"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Chargeback"
      },
      "Transaction": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Transaction"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "A Transaction"
      },
      "VerificationsPaging": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/VerificationsPaging"
            }
          }
        },
        "description": "Success"
      },
      "Verification": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Verification"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "SupercasePagingResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/NewPaginator"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SupercaseCollection"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "SupercaseResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Supercase"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "BulkOperationResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "properties": {
                        "operationId": {
                          "description": "The ID of the newly created bulk operation object",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Accepted"
      },
      "SupercaseDocumentsResponse": {
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "description": "List of document IDs to associated with the supercase.\n",
                  "items": {
                    "description": "A document descriptor ID.",
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "description": "List of documents associated with the supercase.",
                  "items": {
                    "$ref": "#/components/schemas/DocumentDescriptorResponse"
                  },
                  "type": "array"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "PopulationPagingResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Paging"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PopulationCollection"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "PopulationResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Population"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "PopulationMemberCollectionResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PopulationMemberCollection"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "PopulationMemberCollectionCSVResponse": {
        "content": {
          "application/octet-stream": {
            "schema": {
              "format": "binary",
              "type": "string"
            }
          },
          "text/csv": {
            "schema": {
              "format": "binary",
              "type": "string"
            }
          }
        },
        "description": "Success"
      },
      "TeamsPaging": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/NewPaginator"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Team"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "Team": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Team"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "UsersPaging": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/UsersPaging"
            }
          }
        },
        "description": "Success"
      },
      "User": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/User"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "RolesPaging": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/RoleCollection"
            }
          }
        },
        "description": "Success"
      },
      "VerificationQuestionsPaging": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/VerificationQuestionsPaging"
            }
          }
        },
        "description": "Success"
      },
      "VerificationTypesPaging": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/VerificationTypesPaging"
            }
          }
        },
        "description": "Success"
      },
      "VerificationType": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VerificationType"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "WebhookSubscriptionPagingResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Paging"
                },
                {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/WebhookSubscription"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "WebhookSubscriptionResponse": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SingletonResponse"
                },
                {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WebhookSubscription"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      }
    }
  },
  "x-tagGroups": [
    {
      "name": "Frontend Integration",
      "tags": [
        "Frontend",
        "Frontend~~Internal"
      ]
    },
    {
      "name": "Authentication",
      "tags": [
        "Auth",
        "Auth~~Internal",
        "API Keys"
      ]
    },
    {
      "name": "Borrower Management",
      "tags": [
        "Borrowers",
        "Borrowers~~Internal",
        "Identity",
        "Identity~~Internal",
        "Contact Information",
        "Contact Information~~Internal",
        "Payment Instruments",
        "Consent",
        "Documents",
        "Documents~~Internal",
        "Legal Representation",
        "Verifications",
        "Verification Types",
        "Monitoring Status~~Internal",
        "Reassigned Numbers Database~~Internal"
      ]
    },
    {
      "name": "Campaign Management",
      "tags": [
        "Campaign Overview",
        "Campaigns",
        "Campaigns~~Internal",
        "Contact Exporters",
        "Contact Exporters~~Internal",
        "Bulk Senders",
        "Bulk Senders~~Internal"
      ]
    },
    {
      "name": "Case Management",
      "tags": [
        "Cases",
        "Cases~~Internal",
        "Case Types",
        "Smart Reviews",
        "Supercases",
        "Do Not Interact",
        "Do Not Interact Types",
        "Notification Types",
        "Notes",
        "Workflows",
        "Workflow Types",
        "FEMA Disaster~~Internal",
        "Tasks",
        "Task-Worker Pairing Configs",
        "AI Case Summarizer~~Internal"
      ]
    },
    {
      "name": "Loans Management",
      "tags": [
        "Loans",
        "Loan Types~~Internal",
        "Installment Advances",
        "Installment Refunds",
        "Installment Refunds~~Internal",
        "Line of Credit Draws",
        "Line of Credit Purchases",
        "Line of Credit Purchases~~Internal",
        "Line of Credit Migration",
        "Expected Payments",
        "Obligations",
        "Periods",
        "Payment Plans",
        "SCRA",
        "Promise to Pay Plans",
        "Fees",
        "Dynamic Fee Type~~Internal",
        "Rates",
        "Rate Caps",
        "Transactions",
        "Statements",
        "Autopay",
        "Balances",
        "Credit Reporting",
        "Discount Programs",
        "Settlements",
        "LoansInvestors",
        "Collection Agency",
        "Loan Collection Agencies",
        "Promo Programs",
        "Monitoring Services~~Internal",
        "Cards",
        "Loan Labels"
      ]
    },
    {
      "name": "Communicator & Interactions",
      "tags": [
        "Communicator",
        "Communicator~~Internal",
        "Templates",
        "Templates~~Internal",
        "System Documents & UI",
        "System Sent Messages",
        "Interactions",
        "Compliance Guard",
        "Compliance Guard~~Internal"
      ]
    },
    {
      "name": "Promo Programs Management",
      "tags": [
        "Promo Programs Type"
      ]
    },
    {
      "name": "Processor Management",
      "tags": [
        "Payment Processors",
        "Card Issuers",
        "Funding Instruments",
        "ACH File~~Internal"
      ]
    },
    {
      "name": "Organization Management",
      "tags": [
        "Employees",
        "Teams",
        "Users",
        "Roles",
        "Users~~Internal",
        "Roles~~Internal",
        "Permissions~~Internal"
      ]
    },
    {
      "name": "Capital Markets Management",
      "tags": [
        "Investors",
        "Settlement Instruments",
        "Loan Tape Types",
        "Loan Tapes"
      ]
    },
    {
      "name": "Merchants Management",
      "tags": [
        "Merchants"
      ]
    },
    {
      "name": "Events and Webhooks Management",
      "tags": [
        "Events",
        "Events~~Internal",
        "Webhooks"
      ]
    },
    {
      "name": "Utilities",
      "tags": [
        "Loan Amortization",
        "Routing Numbers",
        "BIN Numbers",
        "Index Rates",
        "Operations"
      ]
    },
    {
      "name": "Credit Agencies Management",
      "tags": [
        "Credit Agencies"
      ]
    },
    {
      "name": "Collection Agencies Management",
      "tags": [
        "Collection Agencies"
      ]
    },
    {
      "name": "Errors",
      "tags": [
        "Errors"
      ]
    }
  ]
}