I see. So you're creating a GUI on the side? And it performs this task? If so I'd suggest sending something like this across the wire (please note that I'm truncating the JSON for readability) from your app to Dataverse...
"typeName": "author",
"value": [
{
"authorName": {
"typeName": "authorName",
"value": "Poe, Edgar Allen"
}
,
"authorAffiliation": {
"typeName": "authorAffiliation",
"value": "Baltimore Poets"
}
},
My other thought is that ROR might be a good candidate for Dataverse's new and experimental external controlled vocabulary feature, which you can read about at
https://github.com/IQSS/dataverse/releases/tag/v5.7 . Right now it works best with custom metadata blocks and I don't expect it to "just work" with the citation block (which is where author affiliation is found).
I hope this helps,
Phil