I'm new to C# and REST API.
So, I have endpoint A that takes city name or city name and company ID (Unique Id, can be list of ID) as request to return the the company information. Like company name, address, contact.
Then I have endpoint B that takes in the same request and returns different information. like type of business structure, number of employee and revenue.
Now, I need a third endpoint to return Company name, address, contact, type of business structure, number of employee and revenue.
What's a better way to implement this? At first, I thought just call endpoint A, use the returned company Ids to call endpoint B. but I'm not sure how to retain the data like company name, address, contact.
Another way I can think is to merge the two results based on the company ID. Is there a easy way to do with JSON data?