I haven’t found an answer anywhere - how to specify the shopify api version of the carrier service similar to the version of the webhooks (http://joxi.ru/Q2KBvyKHLlXYym).
The documentation (https://help.shopify.com/en/api/reference/shipping-and-fulfillment/carrierservice) has a similar property:
carrier_service_type "carrier_service_type": "api"
Distinguishes between API or legacy carrier services.
What are the possible values for carrier_service_type? How can it be changed and what does it affect?
Alex_B, thanks a lot for the answer.
Using the carrier_service_type property was a false way. OK.
But our main question - how to specify the shopify api version for the Carrier Service - is still unanswered.
For example, suppose in version 2019-07, Shopify transfers the request_1 to our callback_url (our carrier service), and in version 2019-10 decides what will transfer the request_2. When we are ready to process the request 2 in our code, we must somewhere switch shopify to 2019-10 - where and how?
Ah ok, I think I get the main question now.
You're wondering if there's a way to select which version of CarrierService rate requests Shopify will make to your app, similar to how you can do so with Webhooks, correct?
There is currently no way to specify a version for the rate requests that Shopify will make to a CarrierService.
That being said, it's a bit of an odd question, because there aren't different types of rate requests.
Shopify makes the same type of request to every CarrierService, regardless of if it is of type api or legacy.
Can you post more details about the differences between request_1 and request_2?
What is the scenario that prompted you to build a new handler?
What if Shopify decides to pass a different set of parameters to the CarrierService handler on our side one day? For example, Shopify may add some extra parameters that are passed or stop passing some of the parameters that are being passed now, due to changes in legislation or to protect customers privacy even more.How will we know that starting from day X there is a change in a way Shopify calls CarrierServices handler?
In case of Webhooks, the approach is clear, lets suppose we have a webhook handler with webhook API version set to 2019-07, and then Shopify introduces some changes in this webhook starting from 2019-10. In this case, when our developers switch from 2019-07 to 2019-10 manually, they can find out that it stops working with 2019-10 and make changes to webhook method on our side. So, it seems like, with the intoduction of versioning in Shopify we are now protected from situations like that with webhooks, but still unprotected in case of CarrierServices.