Skip to content

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 companies
  • GET /company/companies/{id}/ - Get company details
  • POST /company/companies/ - Create company
  • PUT /company/companies/{id}/ - Update company
  • PATCH /company/companies/{id}/ - Partial update
  • DELETE /company/companies/{id}/ - Delete company

Users

Base Path: /company/users/

  • GET /company/users/ - List users
  • GET /company/users/{id}/ - Get user details
  • POST /company/users/ - Create user
  • PUT /company/users/{id}/ - Update user
  • PATCH /company/users/{id}/ - Partial update
  • DELETE /company/users/{id}/ - Delete user

Company Signers

Base Path: /company/signers/

  • GET /company/signers/ - List company signers
  • POST /company/signers/ - Create signer
  • PUT /company/signers/{id}/ - Update signer
  • DELETE /company/signers/{id}/ - Delete signer

Permissions

Base Path: /company/permissions/

  • GET /company/permissions/ - Get all permissions
  • GET /company/get-permissions-by-module/ - Get permissions by module
  • GET /company/get-all-permissions-for-user/ - Get user permissions
  • POST /company/check-permission/ - Check specific permission

Loan Endpoints

Loans

Base Path: /loan/loans/

  • GET /loan/loans/ - List loans
  • GET /loan/loans/{id}/ - Get loan details
  • POST /loan/loans/start-loan/ - Start new loan
  • PUT /loan/loans/{id}/ - Update loan
  • PATCH /loan/loans/{id}/ - Partial update
  • POST /loan/loans/update-status/ - Update loan status
  • DELETE /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 borrowers
  • GET /loan/borrowers/{id}/ - Get borrower details
  • POST /loan/borrowers/ - Create borrower
  • PUT /loan/borrowers/{id}/ - Update borrower
  • DELETE /loan/borrowers/{id}/ - Delete borrower

Properties

Base Path: /loan/properties/

  • GET /loan/properties/ - List properties
  • GET /loan/properties/{id}/ - Get property details
  • POST /loan/properties/ - Create property
  • PUT /loan/properties/{id}/ - Update property
  • DELETE /loan/properties/{id}/ - Delete property

Fees

Base Path: /loan/fees/

  • GET /loan/fees/?loan={loan_id} - Get loan fees
  • POST /loan/fees/ - Create fee
  • PUT /loan/fees/{id}/ - Update fee
  • DELETE /loan/fees/{id}/ - Delete fee
  • POST /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 rates
  • POST /loan/expected-rates/ - Calculate expected rate

Interest Rates

Base Path: /loan/interest-rates/

  • GET /loan/interest-rates/ - Get interest rates
  • POST /loan/interest-rates/ - Get current rates

Document Endpoints

Document Templates

Base Path: /documents/templates/

  • GET /documents/templates/ - List templates
  • GET /documents/templates/{id}/ - Get template
  • POST /documents/templates/ - Create template
  • PUT /documents/templates/{id}/ - Update template
  • DELETE /documents/templates/{id}/ - Delete template

Document Packages

Base Path: /documents/packages/

  • GET /documents/packages/ - List packages
  • GET /documents/packages/{id}/ - Get package
  • POST /documents/packages/ - Create package
  • PUT /documents/packages/{id}/ - Update package
  • DELETE /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 reports
  • POST /credit-report/credit-reports/order_credit_report/ - Order credit report
  • POST /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
}
  • 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 data
  • POST /loan/hmdareporting/ - Generate HMDA report

Request:

{
  "year": 2024
}

Mortgage Call Report

  • GET /loan/mcr/excel/?quarter=1&year=2024&state=CA - Generate MCR Excel
  • GET /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 successful
  • 201 Created - Resource created
  • 400 Bad Request - Invalid request
  • 401 Unauthorized - Authentication required
  • 403 Forbidden - Permission denied
  • 404 Not Found - Resource not found
  • 500 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 limit
  • X-RateLimit-Remaining - Remaining requests
  • X-RateLimit-Reset - Reset time

Next Steps


For API support, contact your administrator or refer to the Swagger documentation.