Associate a facility with a network
POST/facilities/:id/networks
Associates a facility with a network following the roster ingestion pattern. The network must belong to a group (groupId provided in request body). If the facility is not associated with the group, the group association will also be created simultaneously. Validates that the network belongs to the specified group before creating the association. Supports three request shapes, each with different conflict behavior: (1) legacy single networkId — always upserts the TenantGroupFacilityNetwork relationship with no pre-check, silently updating an existing association rather than rejecting it; (2) bulk networkIds or (3) grouped networkAssociations — both explicitly check for an existing active association per facility-network and per facility-location-network pair first, and return 409 Conflict if one already exists rather than silently updating it. Choose the bulk/grouped shapes when you need to detect pre-existing associations instead of upserting over them.
Request
Responses
- 201
- 400
- 401
- 403
- 404
- 409
- 500
Successfully associated facility with network
Bad request - Invalid input or validation error
Unauthorized - Authentication required
Forbidden - Insufficient permissions
Facility, group, or network not found, or network does not belong to the group
Conflict - active facility or facility location network association already exists
Internal server error