Hi,
So do you know the matrix of fees and the ranges on which it bases it's calculations ? weight ? dimensions ? quantity ? price of the products ? etc).
You can either create many manual shipping methods, one for each cell of your matrix with the corresponding ranges setup and the system will filter the available shipping methods based on these ranges, or you can also develop a small shipping plugin to connect to that external API, provide it the necessary information and use the returned fee as price of the shipping method, like we did with the UPS, USPS, FedEx, etc plugins.