A certificate of occupancy is a document that certifies that a building complies substantially with the plans and specifications that were approved by the local building department or zoning authority ...