Skip to main content

API

Our backend repository is named Phoenix and can be found on Github.

Testing with Insomnia

We use the Insomnia to test our REST API endpoints. Install Insomnia and refer to phoenix-docs where you'll find instructions for getting setup with the Phoenix Open API spec.

API Modules

API modules live in ./src/modules/api and each module generally contains the following files. Refer to State Management for more info.

├── constants.ts
├── epics.ts
├── index.ts
├── selectors.ts
├── state.ts
├── test
│   ├── data.ts
│   └── epics.test.ts
└── transformers.ts

We have mapped our API modules one-to-one with how the Phoenix micro-services are organised. Below is a basic overview of each service.

ServiceDescription
AccountingStatements and accounting specific stats
AgencyBusiness details, invitations, theme, stats, segments and activation status
BankingValidation party bank details
EmailGenerate invoice PDFs
InvoiceFetch, send, delete, restore invoices and invoice specific stats (AKA notifications)
PartyParties CRUD. Also fetch tags, accounts and bad reference fuzzy matches
PortfolioAKA Leases. Leases CRUD. Lease segments and stats
PropertyFetch, update, search properties and Google Places
ReconFetch, approve payments, update beneficiaries on active invoices. Bulk upload invoices and fetch recon stats
ReportingFetch reports from Ruby and Go reporting services
SMSSend SMSs and request OTPs
UserRegister, login, reset password, fetch user agencies, team management, user segments etc
WalletFetch wallet balances, payout from wallets, demand payments, transfer between wallets & bad reference management