Oh, dear ... I'm in a similar [but less complex] boat. The name[s] must be sorted out, and match the passport details, AFAIK.
Mine is a computer input from a 'phone booking yesterday with BA. According to AA [codeshare and AA flights involved] my first name is currently ... firstmiddlemiddle
BA managed to get one 'middle' removed, but AA still thinks I'm firstmiddle and is demanding my middle name in the API field
On the phone again tomorrow to BA to get that tidied up ... hopefully. It seems AA are very keen on first/middle/surname, whereas BA seems happy with first/surname.