Lambda BFF API Compatibility Layer
Lambda BFF API Compatibility Layer
Available from: v0.1.65
The BFF (Backend-for-Frontend) compatibility layer exposes a REST API at /api/bff/* that replicates the original Lambda BFF contract. It allows the Vue.js/Capacitor mobile app and any external integrations built against the original API to continue operating without changes.
Base path
/api/bff/
Authentication
/api/bff is in the PUBLIC_API_PREFIXES list — the route itself does not enforce server-side session authentication. Authentication is expected to be handled at the client level via the AWS Amplify SDK (Amazon Cognito), matching the original Lambda BFF behaviour.
Request format
All POST and PATCH endpoints accept a JSON body. Most endpoints require at minimum a clientName field.
{
"clientName": "your-agency-slug",
"emailAddress": "user@example.com"
}
The AWS Amplify SDK wraps payloads in a body envelope — this is handled transparently by the route handler.
Response format
All endpoints return the original Lambda BFF response shape:
Success:
{ "status": "200", "data": { ... } }
Error:
{ "status": "400", "error": "clientName is required" }
HTTP status codes are also set correctly on the response.
Endpoints
Accounts
POST /api/bff/accounts
Discover accounts associated with an email address.
| Parameter | Required | Description |
|---|---|---|
clientName | ✅ | Agency slug |
emailAddress | ✅ | User's email address |
POST /api/bff/accounts/payment-requests
Fetch outstanding payment requests for a person.
| Parameter | Required | Description |
|---|---|---|
clientName | ✅ | Agency slug |
personID | ✅ | Person identifier |
Company
POST /api/bff/company/verify
Verify that a company (agency) exists and is configured.
| Parameter | Required | Description |
|---|---|---|
clientName | ✅ | Agency slug |
POST /api/bff/company/currency
Retrieve currency configuration for a company.
| Parameter | Required | Description |
|---|---|---|
clientName | ✅ | Agency slug |
POST /api/bff/company/urls/generic
Fetch branch URLs for a company.
| Parameter | Required | Description |
|---|---|---|
clientName | ✅ | Agency slug |
POST /api/bff/company/search
Search within a company's data.
| Parameter | Required | Description |
|---|---|---|
clientName | ✅ | Agency slug |
payload | — | Search payload |
Overrides
POST /api/bff/overrides
Fetch company-level feature flag overrides.
| Parameter | Required | Description |
|---|---|---|
clientName | ✅ | Agency slug |
POST /api/bff/overrides/fixflo
Fetch Fixflo override settings for a specific person.
| Parameter | Required | Description |
|---|---|---|
clientName | ✅ | Agency slug |
personID | ✅ | Person identifier |
Messaging
POST /api/bff/messaging/messages
Fetch messages for a user.
| Parameter | Required | Description |
|---|---|---|
clientName | ✅ | Agency slug |
userID | ✅ | User identifier |
offset | — | Pagination offset (default: 0) |
count | — | Number of messages (default: 10) |
POST /api/bff/messaging/message/send
Send a message.
| Parameter | Required | Description |
|---|---|---|
clientName | ✅ | Agency slug |
payload | — | Message payload |
POST /api/bff/messaging/message/offer/respond
Respond to an offer message.
| Parameter | Required | Description |
|---|---|---|
clientName | ✅ | Agency slug |
payload | — | Offer response payload |
Tenant
POST /api/bff/accounts/tenant/active
Fetch active tenancy data for a tenant.
| Parameter | Required | Description |
|---|---|---|
clientName | ✅ | Agency slug |
tenantID | ✅ | Tenant identifier |
POST /api/bff/accounts/tenant/prospect
Fetch prospect data for a tenant applicant.
| Parameter | Required | Description |
|---|---|---|
clientName | ✅ | Agency slug |
prospectID | ✅ | Prospect identifier |
Buyer
POST /api/bff/accounts/buyer
Fetch buyer account data.
| Parameter | Required | Description |
|---|---|---|
clientName | ✅ | Agency slug |
buyerID | ✅ | Buyer identifier |
POST /api/bff/accounts/buyer/offer
Submit or fetch an offer for a buyer.
| Parameter | Required | Description |
|---|---|---|
clientName | ✅ | Agency slug |
buyerID | ✅ | Buyer identifier |
| (additional fields) | — | Offer data |
PATCH /api/bff/accounts/buyer/situation
Update a buyer's situation.
| Parameter | Required | Description |
|---|---|---|
clientName | ✅ | Agency slug |
buyerID | ✅ | Buyer identifier |
PATCH /api/bff/accounts/buyer/propertyalerts
Update a buyer's property alert preferences.
| Parameter | Required | Description |
|---|---|---|
clientName | ✅ | Agency slug |
buyerID | ✅ | Buyer identifier |
PATCH /api/bff/accounts/buyer/feedback
Submit buyer feedback.
| Parameter | Required | Description |
|---|---|---|
clientName | ✅ | Agency slug |
buyerID | ✅ | Buyer identifier |
Vendor
POST /api/bff/accounts/vendor
Fetch vendor account data.
| Parameter | Required | Description |
|---|---|---|
clientName | ✅ | Agency slug |
vendorID | ✅ | Vendor identifier |
Landlord
All landlord endpoints require clientName and LandlordID.
| Method | Path | Description |
|---|---|---|
POST | /api/bff/accounts/landlord/insights | Landlord dashboard insights |
POST | /api/bff/accounts/landlord/maintenance-jobs | Active maintenance jobs |
POST | /api/bff/accounts/landlord/maintenance-job-notes | Notes for a specific job (also requires jobID) |
POST | /api/bff/accounts/landlord/rent-arrears | Rent arrears data |
POST | /api/bff/accounts/landlord/reports/portfolio | Portfolio report |
POST | /api/bff/accounts/landlord/reports/profit-loss | Profit & loss report |
POST | /api/bff/accounts/landlord/reports/quickbooks | QuickBooks export data |
Additional landlord endpoints cover statements, tenancies, tenancy details, portfolio structure, and property blocks (22 endpoints total).
Contractor
All contractor endpoints require clientName and contractorID.
11 endpoints are available covering:
- Profile
- Contacts
- Maintenance jobs
- Statements
- Invoices
Prospects
3 PATCH endpoints for updating prospect data:
| Path | Description |
|---|---|
/api/bff/accounts/prospect/preferences | Update preferences |
/api/bff/accounts/prospect/propertyalerts | Update property alerts |
/api/bff/accounts/prospect/feedback | Submit feedback |
Affiliate
GET /api/bff/affiliate/links/{flow}
Fetch affiliate link data for a given flow.
| Query Parameter | Required | Description |
|---|---|---|
clientName | ✅ | Agency slug |
Example:
GET /api/bff/affiliate/links/signup?clientName=your-agency-slug
Internal implementation
All BFF routes delegate to the same service functions used by the tRPC layer:
| Service | Functions used |
|---|---|
src/lib/letmc/client | letmcClient, LetmcNotConfiguredError, LetmcApiError |
src/lib/letmc/accounts | discoverAccounts() |
src/lib/letmc/company | verifyCompany(), getCurrencyInfo(), getCompanyBranches() |
src/lib/letmc/features | getCompanyOverrides(), getPersonFixfloOverride() |
src/lib/letmc/payment-request | getPaymentRequestData() |
All errors are reported via captureError() and return a structured error response with an appropriate HTTP status code.
AgentOS API path structure
The handler maps requests to the AgentOS People Portal API at:
/v1/corporate/peopleportal/letmcletting/{clientName}/{resource}
The clientName value is URL-encoded before being used in path construction.