E040: List contacts linked to an entity
GET /api/contacts/linked-to
Returns the contacts linked to a given customer, vendor, or other entity, with their methods hydrated. Triggered from Customer Detail and Vendor Detail.
Authentication
Standard tenant route. Requires Authorization: Bearer <firebase-id-token> and X-Org-Id: <org-id>. Access: Member.
Request
Required query params: ?entityType= and ?entityId=, where entityType is "customer" or "vendor". No pagination — a single customer/vendor is expected to have a bounded number of contacts.
Response — 200 OK
{ "data": [ { "link": ContactEntityLink, "contact": Contact, "methods": [ ContactMethod ] } ] }
Errors
| HTTP | code | Condition |
|---|---|---|
| 404 | not_found | Entity does not exist. |
| 422 | validation_failed | Missing entityType or entityId. |