Part of #1027 (supplier SBOM epic #1029, phase 3). This is the first of two API PRs. The upload through an invite follows.
What it adds
Platform endpoints that the portal calls with its service token (require_platform_token):
Call
What it does
POST /api/v1/platform/tenants/{id}/supplier-invites{target_id, email, invited_by}
Invites a supplier for one supplier component. Answers 201 with the invite.
GET /api/v1/platform/tenants/{id}/supplier-invites[?target=<id>]
Lists the tenant's invites, newest first, each with its state.
POST /api/v1/platform/tenants/{id}/supplier-invites/{invite}/withdraw{withdrawn_by}
Withdraws an invite. A second withdrawal keeps the first.
Where invites are kept: in the tenant database, collection supplier_invites. The tenant export and erasure therefore cover it, including the supplier's e-mail address.
What Prüfwerk stores: the invite only. It never sees the link token: the portal owns the token and the mail, and keys the link by the invite id. These were the user's decisions of 2026-11-18, recorded on #1027.
Lifetime: 90 days. The state is active, expired or withdrawn; a withdrawn invite stays withdrawn after it expires.
Which targets can be invited for: only a supplier component, meaning a target with supplier. Any other target answers 422, and an unknown target or tenant 404. A lookup in an unknown tenant creates no database.
Target deletion: deleting a target deletes its invites.
Portal target list:GET /api/v1/platform/tenants/{id}/targets now names each supplier component's supplier, so the invite dialog can offer them.
Unit tests for the lifetime, the states, and address and actor validation.
Mongo integration tests in tests/supplier_invites.rs: invite only for a supplier component; refusals; no database for an unknown tenant; supplier in the target list; list order and states; withdraw once; another tenant's invite not found.
The cascade test checks that a deleted target's invites go and other targets' invites stay.
Part of #1027 (supplier SBOM epic #1029, phase 3). This is the first of two API PRs. The upload through an invite follows.
## What it adds
Platform endpoints that the portal calls with its service token (`require_platform_token`):
| Call | What it does |
|---|---|
| `POST /api/v1/platform/tenants/{id}/supplier-invites` `{target_id, email, invited_by}` | Invites a supplier for one supplier component. Answers `201` with the invite. |
| `GET /api/v1/platform/tenants/{id}/supplier-invites[?target=<id>]` | Lists the tenant's invites, newest first, each with its `state`. |
| `POST /api/v1/platform/tenants/{id}/supplier-invites/{invite}/withdraw` `{withdrawn_by}` | Withdraws an invite. A second withdrawal keeps the first. |
- **Where invites are kept:** in the tenant database, collection `supplier_invites`. The tenant export and erasure therefore cover it, including the supplier's e-mail address.
- **What Prüfwerk stores:** the invite only. It never sees the link token: the portal owns the token and the mail, and keys the link by the invite `id`. These were the user's decisions of 2026-11-18, recorded on #1027.
- **Lifetime:** 90 days. The state is `active`, `expired` or `withdrawn`; a withdrawn invite stays withdrawn after it expires.
- **Which targets can be invited for:** only a supplier component, meaning a target with `supplier`. Any other target answers `422`, and an unknown target or tenant `404`. A lookup in an unknown tenant creates no database.
- **Target deletion:** deleting a target deletes its invites.
- **Portal target list:** `GET /api/v1/platform/tenants/{id}/targets` now names each supplier component's `supplier`, so the invite dialog can offer them.
- **Docs:** `docs/guide/sbom.md`.
Mockup of the portal pages (awaiting approval): https://claude.ai/artifact/FKKpDUkTgY1rezxwJwjXDT
## Tests
- Unit tests for the lifetime, the states, and address and actor validation.
- Mongo integration tests in `tests/supplier_invites.rs`: invite only for a supplier component; refusals; no database for an unknown tenant; `supplier` in the target list; list order and states; withdraw once; another tenant's invite not found.
- The cascade test checks that a deleted target's invites go and other targets' invites stay.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
Phase 3 of the supplier SBOM epic: the platform API the portal calls with its
service token to invite a supplier, list the tenant's invites and withdraw one.
- An invite is kept in the tenant's own database (`supplier_invites`), so the
tenant export and erasure cover it, the supplier's address included. The
portal owns the secret link and the mail and keys its link by the invite id.
- Only a supplier component (a target with `supplier`) can be invited for;
any other answers 422, an unknown target or tenant 404, and a lookup in an
unknown tenant creates no database.
- An invite is valid for 90 days and its state is `active`, `expired` or
`withdrawn`; a second withdrawal keeps the first.
- Deleting a target deletes its invites.
- The portal's target list names each supplier component's `supplier`.
The upload through an invite follows in its own PR.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of #1027 (supplier SBOM epic #1029, phase 3). This is the first of two API PRs. The upload through an invite follows.
What it adds
Platform endpoints that the portal calls with its service token (
require_platform_token):POST /api/v1/platform/tenants/{id}/supplier-invites{target_id, email, invited_by}201with the invite.GET /api/v1/platform/tenants/{id}/supplier-invites[?target=<id>]state.POST /api/v1/platform/tenants/{id}/supplier-invites/{invite}/withdraw{withdrawn_by}supplier_invites. The tenant export and erasure therefore cover it, including the supplier's e-mail address.id. These were the user's decisions of 2026-11-18, recorded on #1027.active,expiredorwithdrawn; a withdrawn invite stays withdrawn after it expires.supplier. Any other target answers422, and an unknown target or tenant404. A lookup in an unknown tenant creates no database.GET /api/v1/platform/tenants/{id}/targetsnow names each supplier component'ssupplier, so the invite dialog can offer them.docs/guide/sbom.md.Mockup of the portal pages (awaiting approval): https://claude.ai/artifact/FKKpDUkTgY1rezxwJwjXDT
Tests
tests/supplier_invites.rs: invite only for a supplier component; refusals; no database for an unknown tenant;supplierin the target list; list order and states; withdraw once; another tenant's invite not found.🤖 Generated with Claude Code
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9