No land or building or other structure or part thereof hereafter erected, moved or altered in its use shall be occupied or used until the city building inspector has issued a certificate of occupancy. A certificate of occupancy shall be issued with the provisions of this chapter. If the certificate of occupancy is not granted upon request, the building inspector shall sta te in writing the reasons why the certificate was not granted.