Import / inject mission track from outside application?

I need to generate my mission waypoints in an external application and send a waypoint track (in grid format) to ardupilot.

Is this possible? I there an API or an import functrion for this?

Have a look at DroneKit

Yes, quite possible to do. Install Mission Planner, create a fictitious track and export that. Open the file in a text editor. Parse your app data correctly (using \t (tab mark) to separate each field (for APM).

Make your application save the grid in the correct format. For instance, my digital agriculture software generates a grid from a plot perimeter and exports it directly to AP Planner.