I just did this in Huntington and this is what I had to do:
You will need pics of the deck, a copy of a survey to scale (legal size) with deck drawn on it and the approximate square footage of the deck (measurements).
Go to your town hall, and fill out the permit forms, bring your credit card as the fee will be 3X the normal rate since it was built without permit. If deck has electric, you will most likely have to get an electrical inspection (mine doesn't, but the electrical inspectionfir my basement came out to $200). The bldg inspector will have to come inspect the deck, it helps to look at your town code beforehand to see if your deck has the proper railings, etc required by your town and install them. In huntington, if the deck is 8" or lower off the ground you don't need a permit. The inspector will either approve your deck, or tell you what you need to do to get it within code. After you make the changes, they'll come back and re-inspect. Then you wait, and eventually get the CO in the mail.
Since my deck is not attached to my house, i need to get a new survey too.

another $600-700..
I'm still in the process for deck and for a finished basement and it has been nothing but trouble, well nothing but money out of my pocket I should say, and aggravation. All this was here when we bought the house and we did not know any better to look into it at the time.
good luck.