563848e0ecc0
Create a facility for the tenant
Creates a CoreFacility and its TenantFacility association for the tenant (create path; certifyFacilityId is not yet known). Use this to establish a new facility record; use PUT /facilities/{id} instead when the certifyFacilityId is already known. A crosswalk ID is generated from the facility's tenant-scoped identity (NPI+TIN, NCPDP, externalId, or an address hash, depending on tenant identity configuration) — this crosswalk, not any single submitted field, is what the platform treats as the facility's unique identity key. Request body is validated against the facility-upsert JSON Schema and, for tenants configured with isFacilityExternalIdAsCrosswalk=true, against additional externalId/address-hash uniqueness rules (see FacilityValidationService). The primary address, if present, may be standardized via the address cleanser before being persisted. When facility.upsert.sync-survivorship.enabled is true (default), a synchronous (not queued/async) survivorship call is also triggered to the core data layer. Returns HTTP 201 with an ID map only (crosswalkId, corefacilityId, tenantfacilityId, and related batch-alias IDs) — not the full facility object; call GET /facilities/{id} afterwards to read back the created record. See PUT /facilities/{id} for the update path.
Headers
Tenant ID
Request body
Example request
{
"facilityId": "cf_abc123",
"name": "Acme Medical Center",
"npi": "1234567890",
"tin": "123456789",
"ncpdpId": "1234567",
"facilityType": "Hospital",
"facilityEffectiveDate": "2024-01-01",
"attestationDate": "2024-01-01",
"effectiveDate": "2024-01-01",
"serviceAddress": {
"state": "CA"
},
"officeAddress": {
"state": "CA"
},
"billingAddress": {
"state": "CA"
},
"mailingAddress": {
"state": "CA"
},
"irsAddress": {
"state": "CA"
}
}Response
Facility successfully created
Example response
{
"crosswalkId": "1234567890-123456789",
"corefacilityId": "cf_abc123",
"tenantfacilityId": "tf_abc123",
"facilityentityaddressId": "fea_abc123"
}