{"templateId":"openapi_docs","versions":[],"sharedDataIds":{"openAPIDocsStore":"oas-API Docs/@2023-11-29/api-public.yaml","sidebar":"sidebar-sidebar.yaml__api-docs_api-public"},"props":{"definitionId":"API Docs/@2023-11-29/api-public.yaml","dynamicMarkdocComponents":[],"baseSlug":"/api-docs/api-public","seo":{"title":"Peach Finance API"},"itemId":"","disableAutoScroll":true,"metadata":{"type":"openapi","title":"Peach Finance API","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"},"compilationErrors":[],"markdown":{"partials":{},"variables":{"rbac":{"teams":["anonymous"]},"user":{},"headers":{"accept":"*/*","accept-encoding":"br,gzip","host":"peach-docs-dev.redocly.app","user-agent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","via":"2.0 Caddy, 2.0 a71dc86d67780d7478c72e1b147b8a32.cloudfront.net (CloudFront), 1.1 Caddy","x-amz-cf-id":"vnib0g2tRR_C5WrODgPq82rYbfVWcgf6dA0ea4h9IW6H19KCagTSYg==","x-forwarded-for":"216.73.216.253, 54.156.60.142, 64.252.68.127","x-forwarded-host":"peach-docs-dev.redocly.app","x-forwarded-proto":"https","x-request-id":"cds-66bdecee-c524-49cc-813c-0fef31714742"},"remoteAddr":{"hostname":"::ffff:10.0.3.26","port":54100},"lang":"default_locale","env":{"PUBLIC_REDOCLY_BRANCH_NAME":"develop"}}},"pagePropGetterError":{"message":"","name":""}},"slug":"/api-docs/api-public","userData":{"isAuthenticated":false,"teams":["anonymous"]}}