It is true that you may apply for registration online in the portal of ESI & PF, if applicable. Once you apply, you will receive a Code number under the respective Act in your email. But remember, after obtaining the code number in the email, you will have to forward all relevant hard copies pertaining to your establishment in line with your online application to prove as a bona fide applicant.
Having been satisfied with your application, the ESI/PF department will issue you a letter duly signed, confirming the allotment of the code number by speed post.