It states: Using the CarrierService resource, you can add a carrier service to a shop and then provide a list of applicable shipping rates at checkout. You can even use the cart data to adjust shipping rates and offer shipping discounts based on what is in the customer’s cart
I know how to do shipping discounts, but where are the (which api calls) functions for adjusting shipping rates using cart data?
So from what I can see you would have to setup the logic in your callback URL of your custom Carrier Service. You can see here, in the “Providing Shipping Rates to Shopify” section that in the POST request to your callback URL you have a field called “items: {}” which contains an object containing the items in the cart. So when you receive that POST request, you can write custom logic to check the data and then return a custom “rates: {}” Response object.