There's a community dedicated to developers and utilizing applications with QuickBooks. I recommend that you sign up and post this question to our separate online forum called Intuit Developer Community.
This site contains resources for software development, as well as the ability to ask fellow developers questions. You can find additional information about this at the following link: https://developer.intuit.com/.
You can also check with REST API or your third-party developer's website for the detailed steps on how to set the tags for expenses in QuickBooks Online.
To know more about this feature, check out this article: Tag transactions in QuickBooks Online. This will provide you steps on how to create tags by groups as well as on how to track them by pulling up a report.
If I can be of help while working in QuickBooks, please let me know. I'm always here to keep helping. Have a good one!