Registering in SAM for a CAGE (Commercial and Governmental Entity) Code is mandatory if you wish to sell directly to the federal government.
To get registered in SAM and get a CAGE Code, go to www.sam.gov
You can update your SAM registration by following the instructions here.
You can check the status of your CAGE Code and get detailed information about CAGE Codes here.