API is required for all passengers, regardless of their status.
There are 3 ways you can submit API information
1. Anytime after you booked, if your airline offers that feature (apparently VA has taken it off its website ...)
2. During Online Check in. That's the part in online check in where you provide passport number and other bio info. (Online check in is merely verifying/submitting your API info, AND securing your seat)
3. At the airport when you check in, if you haven't done Online Check in.
There is no requirement to do it weeks or months prior. You will eventually need to provide the mandatory information during the check in process, wether it be online or at the check in desk.