API Reference
Complete API documentation for ReversePilot, including authentication, endpoints, request/response formats, and examples.
Base URL
All API requests should be made to:
https://your-domain.com/api/
Authentication
ReversePilot uses OAuth2 token-based authentication.
Obtaining an Access Token
Endpoint: POST /auth/token/
Request:
{
"username": "user@example.com",
"password": "password",
"grant_type": "password",
"client_id": "your_client_id",
"client_secret": "your_client_secret"
}
Response:
{
"access_token": "your_access_token",
"token_type": "Bearer",
"expires_in": 36000,
"refresh_token": "your_refresh_token",
"hierarchy": "Company User",
"roles": [],
"email": "user@example.com",
"first_name": "John",
"last_name": "Doe",
"company_type": "Lender"
}
Using the Access Token
Include the access token in the Authorization header:
Authorization: Bearer your_access_token
Company Endpoints
Companies
Base Path: /company/companies/
GET /company/companies/- List companiesGET /company/companies/{id}/- Get company detailsPOST /company/companies/- Create companyPUT /company/companies/{id}/- Update companyPATCH /company/companies/{id}/- Partial updateDELETE /company/companies/{id}/- Delete company
Users
Base Path: /company/users/
GET /company/users/- List usersGET /company/users/{id}/- Get user detailsPOST /company/users/- Create userPUT /company/users/{id}/- Update userPATCH /company/users/{id}/- Partial updateDELETE /company/users/{id}/- Delete user
Company Signers
Base Path: /company/signers/
GET /company/signers/- List company signersPOST /company/signers/- Create signerPUT /company/signers/{id}/- Update signerDELETE /company/signers/{id}/- Delete signer
Permissions
Base Path: /company/permissions/
GET /company/permissions/- Get all permissionsGET /company/get-permissions-by-module/- Get permissions by moduleGET /company/get-all-permissions-for-user/- Get user permissionsPOST /company/check-permission/- Check specific permission
Loan Endpoints
Loans
Base Path: /loan/loans/
GET /loan/loans/- List loansGET /loan/loans/{id}/- Get loan detailsPOST /loan/loans/start-loan/- Start new loanPUT /loan/loans/{id}/- Update loanPATCH /loan/loans/{id}/- Partial updatePOST /loan/loans/update-status/- Update loan statusDELETE /loan/loans/{id}/- Delete loan
Start Loan Request:
{
"first_name": "John",
"last_name": "Doe",
"dob": "1950-01-15",
"property_state": "CA",
"home_value": 500000,
"loan_officer_id": 1
}
Borrowers
Base Path: /loan/borrowers/
GET /loan/borrowers/- List borrowersGET /loan/borrowers/{id}/- Get borrower detailsPOST /loan/borrowers/- Create borrowerPUT /loan/borrowers/{id}/- Update borrowerDELETE /loan/borrowers/{id}/- Delete borrower
Properties
Base Path: /loan/properties/
GET /loan/properties/- List propertiesGET /loan/properties/{id}/- Get property detailsPOST /loan/properties/- Create propertyPUT /loan/properties/{id}/- Update propertyDELETE /loan/properties/{id}/- Delete property
Fees
Base Path: /loan/fees/
GET /loan/fees/?loan={loan_id}- Get loan feesPOST /loan/fees/- Create feePUT /loan/fees/{id}/- Update feeDELETE /loan/fees/{id}/- Delete feePOST /loan/update-origination-fee/- Update origination fee
Calculations
Base Path: /loan/loan-calculation/
POST /loan/loan-calculation/- Calculate loan proceeds
Request:
{
"loan": 123
}
Response:
{
"principal_limit": 250000,
"expected_rate": 5.5,
"available_proceeds": 220000,
"initial_mip": 8000,
"servicing_set_aside": 3600
}
Expected Rates
Base Path: /loan/expected-rates/
GET /loan/expected-rates/- Get expected ratesPOST /loan/expected-rates/- Calculate expected rate
Interest Rates
Base Path: /loan/interest-rates/
GET /loan/interest-rates/- Get interest ratesPOST /loan/interest-rates/- Get current rates
Document Endpoints
Document Templates
Base Path: /documents/templates/
GET /documents/templates/- List templatesGET /documents/templates/{id}/- Get templatePOST /documents/templates/- Create templatePUT /documents/templates/{id}/- Update templateDELETE /documents/templates/{id}/- Delete template
Document Packages
Base Path: /documents/packages/
GET /documents/packages/- List packagesGET /documents/packages/{id}/- Get packagePOST /documents/packages/- Create packagePUT /documents/packages/{id}/- Update packageDELETE /documents/packages/{id}/- Delete package
Document History
Base Path: /documents/histories/
GET /documents/histories/?loan={loan_id}- Get document history
Credit Report Endpoints
Credit Reports
Base Path: /credit-report/credit-reports/
GET /credit-report/credit-reports/- List credit reportsPOST /credit-report/credit-reports/order_credit_report/- Order credit reportPOST /credit-report/credit-reports/retrieve_existing_report/- Retrieve existing report
Order Credit Report Request:
{
"borrower_id": 123,
"is_joint": false
}
Retrieve Existing Report Request:
{
"borrower_id": 123,
"order_identifier": "10430844",
"is_joint": false
}
FHA Integration Endpoints
Base Path: /fha-integration/
Address Validation
POST /fha-integration/address-validation/
Request:
{
"loan": 123
}
Case Number Assignment
POST /fha-integration/case-number-assignment/
Request:
{
"loan": 123
}
Certificate Search
POST /fha-integration/certificate-search/
Financial Assessment
POST /fha-integration/hecm-financial-assessment/
Insurance Application
POST /fha-integration/hecm-insurance-application/
Case Transfer
POST /fha-integration/case-transfer/
Case Restore
POST /fha-integration/case-restore/
Other FHA Endpoints
POST /fha-integration/cairvs-authorization/POST /fha-integration/duplicate-mic/POST /fha-integration/escrow-closeout/POST /fha-integration/hecm-certificate/POST /fha-integration/hecm-referral/POST /fha-integration/address-change/POST /fha-integration/appraisal-logging/
Reporting Endpoints
HMDA Reporting
GET /loan/hmdareporting/?year=2024- Validate HMDA dataPOST /loan/hmdareporting/- Generate HMDA report
Request:
{
"year": 2024
}
Mortgage Call Report
GET /loan/mcr/excel/?quarter=1&year=2024&state=CA- Generate MCR ExcelGET /loan/mcr/json/?quarter=1&year=2024&state=CA- Generate MCR JSON
Error Responses
Standard Error Format
{
"detail": "Error message here"
}
Common Status Codes
200 OK- Request successful201 Created- Resource created400 Bad Request- Invalid request401 Unauthorized- Authentication required403 Forbidden- Permission denied404 Not Found- Resource not found500 Internal Server Error- Server error
Pagination
Many list endpoints support pagination:
Query Parameters:
- page - Page number
- page_size - Items per page
Response:
{
"count": 100,
"next": "https://api.example.com/endpoint/?page=2",
"previous": null,
"results": [...]
}
Filtering and Searching
Many endpoints support filtering:
Examples:
- GET /loan/loans/?status=Processing
- GET /loan/loans/?loan_officer=1
- GET /loan/loans/?search=John
Swagger Documentation
Interactive API documentation is available at:
- Swagger UI:
/swagger/ - ReDoc:
/redoc/ - OpenAPI JSON:
/swagger.json - OpenAPI YAML:
/swagger.yaml
Rate Limiting
API requests are subject to rate limiting. Check response headers for:
X-RateLimit-Limit- Request limitX-RateLimit-Remaining- Remaining requestsX-RateLimit-Reset- Reset time
Next Steps
- System Architecture - System architecture details
- Development Guide - Development setup
- Overview - System overview
For API support, contact your administrator or refer to the Swagger documentation.