Partnerships
How a lawyer reviews, accepts or rejects partnership invites from agents and landlords, and views the inviter's profile.
A partnership is the link between a lawyer and one agent or landlord. It starts when the agent or landlord sends an invite by email from their Legal Team tab (see the agent section, page "legal-team"). The lawyer answers it here.
Where it lives
| Screen route | File | Who sees it |
|---|---|---|
/(tabs)/partnerships | app/(tabs)/partnerships/index.tsx | LAWYER only (the tab is hidden for other roles) |
/(tabs)/partnerships/partner/[id] | app/(tabs)/partnerships/partner/[id].tsx | LAWYER only. id is the inviter's user id |
| Stack wrapper | app/(tabs)/partnerships/_layout.tsx | Headerless stack holding the two screens above |
API hooks are in services/legal/legal-api.ts; the invite type is IPartnershipInvite in interface/legal.types.ts.
Before you start
- Signed in with the
LAWYERrole. The three endpoints below are lawyer-only on the backend, and accept and reject also check that the invite is addressed to the caller ("You do not have access to this invite"). - An agent or landlord must have invited the email address of this lawyer account.
- No device permissions are needed.
Flow
Review invites
- Opening the tab fires
GET /api/v1/legal/partnership-invites. The backend returns only invites addressed to this lawyer whose status isinvite_pending, newest first, with the inviter's public profile attached. - The header reads "Partnerships" with the subtitle "Manage your partnership invites from agents and landlords."
- Each card shows:
- the inviter's full name ("Agent / Landlord" if the inviter is not populated) and email ("Unknown email" as fallback),
- a status badge, the raw status in capitals with the underscore replaced by a space: INVITE PENDING,
- the invite note in quotes, when there is one,
- "Invited on" plus the date,
- for pending invites: a View Profile button and a row with Reject and Accept.
- Pull down to refresh.
Invite statuses:
| Status value | Badge | What it means for the lawyer |
|---|---|---|
invite_pending | INVITE PENDING (amber) | Waiting for an answer. Shows the action buttons |
contracted | CONTRACTED (green) | Accepted. The inviter can now assign legal verification work to this lawyer |
rejected | REJECTED (red) | Declined |
Only pending invites are listed
The screen has badge styles for contracted and other statuses, but GET /api/v1/legal/partnership-invites filters to invite_pending on the server. As soon as an invite is accepted or rejected the list refetches and the card disappears. The mobile app therefore has no list of the lawyer's current (contracted) partners, despite the tab's name.
Accept an invite
- Tap Accept on a pending card. The app fires
PATCH /api/v1/legal/partnership-invites/:inviteId/accept. The tapped button shows a spinner and both buttons on every card are disabled while it runs. - On success a toast "Partnership Accepted" appears. The mutation invalidates the
LegalAssignmentscache tag, the list refetches and the card is gone. - On failure an alert titled "Error" shows the server message or "Failed to accept invite". If the invite was already answered the server says "Invite has already been processed".
Invites can also be accepted from the Overview tab's "Partnership Invites" card, which calls the same endpoint and shows the toast "Partnership accepted!".
Reject an invite
- Tap Reject on a pending card. A confirmation alert titled "Reject Partnership" asks "Are you sure you want to reject this partnership invite?" with the buttons Cancel and Reject.
- Choosing Reject fires
PATCH /api/v1/legal/partnership-invites/:inviteId/reject. No reason is collected. - On success a toast "Partnership Rejected" appears and the card disappears after the refetch.
- On failure an alert titled "Error" shows the server message or "Failed to reject invite". The server only rejects pending invites ("Only pending invites can be rejected").
View the inviter's profile
- Tap View Profile on a pending card. The button is only rendered when the inviter is populated on the invite.
- The screen opens at
/(tabs)/partnerships/partner/[id]. It makes no request of its own; it reads the cached invites list and finds the invite whose inviter id matches the route param. - The header reads "Partner Profile" with a back arrow.
- The card shows the inviter's initials, full name, a pill with their role exactly as stored (for example
AGENTorLANDLORD), their bio (or "No profile bio provided.") and four rows:
| Row | Source | Fallback |
|---|---|---|
| Inviter's email | none | |
| Phone | Inviter's phone | Not provided |
| Business | Inviter's businessName | Not provided |
| Location | State and country from the inviter's address | Not provided |
- The profile is read-only. Go back to the list to accept or reject.
States and edge cases
- Loading: the list shows a centred spinner; the profile shows the full-screen loader "Loading partner…".
- Empty list: "No Partnerships Yet" with "When agents or landlords invite you to be their legal partner, they will appear here." This is also what a lawyer with only accepted partnerships sees.
- Profile not found: if the inviter id is not in the cached pending invites (for example the invite was just answered, or the screen was opened from a stale link) the screen shows "Profile Not Found" with a Go Back button.
- Avatar: the inviter's photo is never rendered; the profile always shows initials.
- List errors: a failed list request is not surfaced and falls through to the empty state.
- No undo: an accepted or rejected invite cannot be changed from the app. After a rejection the agent or landlord can send a new invite.
What happens next
- Accept: the invite status becomes
contractedandacceptedAtis stamped. The inviter receives an email titled "Your Legal Partnership Invite Was Accepted" and sees the lawyer as Contracted in their Legal Team tab after a refresh. From then on the backend lets that agent or landlord assign this lawyer to their listings, which arrive under the Assignments tab. - Reject: the status becomes
rejectedandrejectedAtis stamped. The inviter is not notified; the lawyer's card simply drops out of their Legal Team list. - New invites: the lawyer is told about a new invite by email only ("You've Been Invited to Partner on HomeLink Hub"). No in-app or push notification is created, so the Overview and Partnerships tabs are the only places it shows up in the app.
HomeLink Hub