api data standardization

This is work that intially started in csv-upload but got shelved for later. See https://github.com/MastodonC/kixi.hecuba/pull/71