We are a domestic and international shipping provider in Sri Lanka and we have developed location and delivery time based cost calculator API(along with creating shipping labels, tracking) for our clients who use woocommerce already. We are looking forward to setup same for clients who use shopify to automate their fulfilment process.
We do have a list of districts (same as states) and cities under them along with their postal codes (retrieved from the department of postal) for rate calculation if shopify needs update their system with same as well.
I recommend having a look at our carrier service and fulfillment service APIs.
Our Carrier Service API allows your app to return calculated rates to the Shopify checkout. It works by sending your app a request with line item and address details, and allows you to respond with rates which Shopify will present to the customer.
Our Fulfillment Service API allows your app to be set as the warehouse for fulfilling products in a Shopify store. It enables you to receive and respond to fulfillment requests from a merchant, and update orders with tracking and fulfillment data.