BFF API Routes Reference
BFF API Routes Reference
The BFF (Backend-for-Frontend) layer lives at POST /api/bff/[...path] (and a small number of GET paths). It acts as a thin, authenticated proxy between the client app and the AgentOS People Portal API, translating a stable internal contract into the upstream REST calls.
Company Routes
POST /api/bff/company/theme/generic
Fetch the company-wide Vuetify theme colour configuration.
Request body
{
"clientName": "string"
}
Upstream call: GET /{clientName}/company/theme
POST /api/bff/company/theme/account
Fetch per-account Vuetify theme colours.
Request body
{
"clientName": "string",
"accountOID": "string"
}
Upstream call: GET /{clientName}/company/{accountOID}/theme
POST /api/bff/company/urls/account
Fetch per-account portal URLs.
Request body
{
"clientName": "string",
"accountOID": "string"
}
Upstream call: GET /{clientName}/company/{accountOID}/urls
POST /api/bff/company/dropdowns
Fetch enum dropdown values for use in forms. Optionally scoped to a specific enum name.
Request body
{
"clientName": "string",
"enumName": "string" // optional
}
Upstream call: GET /{clientName}/company/enums/dropdown/values?enumName={enumName}
If enumName is omitted, the query parameter is not appended and all enum values are returned.
Properties Routes
POST /api/bff/properties/tenancies/listings
Search advertised property listings with optional filters.
Request body
{
"clientName": "string",
"areaIDs": "string", // optional
"minBeds": "number|string", // optional
"maxBeds": "number|string", // optional
"minPrice": "number|string",// optional
"maxPrice": "number|string",// optional
"wantShared": "boolean|string" // optional
}
All filter fields are optional. Only fields with non-null values are forwarded as query parameters.
Upstream call: GET /{clientName}/listings?areaIDs=...&minBeds=...&maxBeds=...&minPrice=...&maxPrice=...&wantShared=...
Accounts — Prospect Routes
POST /api/bff/accounts/tenant/prospect/application-data
Fetch pre-fill data for a prospect tenant's application form.
Request body
{
"clientName": "string",
"prospectID": "string"
}
Upstream call: GET /{clientName}/prospects/tenant/{prospectID}/application/data
Note: The outbound path uses plural
prospectsper the Next.js migration convention, even though the original Lambda used the singularprospect.
POST /api/bff/accounts/prospects/properties/advertised
Search advertised properties for a specific prospect.
Request body
{
"clientName": "string",
"PersonOID": "string",
"SearchParameters": {} // optional — forwarded as the POST body upstream
}
Upstream call: POST /{clientName}/prospects/{PersonOID}/properties/advertised
File Download Route
GET /api/bff/download/{fileID}
Download a file by its ID. Unlike the POST routes, clientName is passed as a query parameter.
Query parameters
| Parameter | Required | Description |
|---|---|---|
clientName | Yes | The agency client identifier |
Example
GET /api/bff/download/abc123?clientName=myagency
Upstream call: GET /{clientName}/download/{fileID}
Conventions
- All POST routes accept a JSON body;
clientNameis always required. - Outbound AgentOS API paths use plural resource names (
prospects,landlords,contractors,buyers,vendors) regardless of what the original Lambda used. - Path segments and query values are URI-encoded before being forwarded upstream.
- Missing required fields return a
400error with a descriptive message.