If you are a Shopify app developer, you may have already heard that they made an update with their Shopify's Admin API (GraphQL and REST) called Shopify API versioning. At this moment, we are already at 2020-10 and the 2021 release is just around the corner.\n\n\n\nTheir goal is to ensure that any developers could build Shopify apps and Shopify themes confidently. They have also made changes to their Shopify Partner Dashboard, the Developer Changelog, and to their developer documentation page to make it easier for us developers to stay updated of upcoming new versions.\n\n\n\n\n\nIf you have already built a Shopify app using the old versions of Shopify API. Migrating to Shopify API 2020-10 is very easy. All you needed to do is to update the endpoint URLs that your app calls to explicitly declare the API version. \n\n\n\nEach URL should include the following format.\n\n\n\n\/admin\/api\/<version date>\n\n\n\nFor example, if you are trying to call using the REST endpoint, the URL endpoint could go something like:\n\n\n\nhttps:\/\/<your-shop-name>.myshopify.com\/admin\/api\/2020-10\/smart_collections.json\n\n\n\n\n\nShopify API Versioning\n\n\n\nKeep in mind that Shopify will release another update for the API versioning quarterly. This means that you should always stay up-to-date on what's new.Now, if you are confused about when they're going to make updates. You may use the following table as your guide or reminder.\n\n\n\nStable versionRelease dateDate stable version is supported until2020-04April 1, 2020April 1, 20212020-07July 1, 2020July 1, 20212020-10October 1, 2020October 1, 20212021-01 (Release candidate)January 1, 2021January 1, 2022\n\n\n\nHow to use API versioning?\n\n\n\nIf you have already developed an app using the old API then I highly recommend you to update your PHP files and change the base URLs.Also, to make it easier for you. You should just declare a variable holding the version name of the latest API version. By doing so, every time Shopify updates the API, you won't need to change anything but the variable holding the version name.\n\n\n\nFor this example, we'll be using the code that we wrote on our previous tutorial on how to display Shopify products using PHP.\n\n\n\n$collectionList = shopify_call($token, $shop, "\/admin\/custom_collections.json", array(), 'GET');\n$collectionList = json_decode($collectionList['response'], JSON_PRETTY_PRINT);\n$collection_id = $collectionList['custom_collections']['id'];\n\n$array = array("collection_id"=>$collection_id);\n$collects = shopify_call($token, $shop, "\/admin\/collects.json", $array, 'GET');\n$collects = json_decode($collects['response'], JSON_PRETTY_PRINT);\n\n\n\nIf you have noticed, the code above is using the old format of API. No versioning whatsoever.\n\n\n\nMigrating to New Shopify API versioning\n\n\n\nTo migrate from old API to new Shopify API versioning. We must change the code above to something like this.\n\n\n\n$shopifyVer = "api\/2020-10";\n\n$collectionList = shopify_call($token, $shop, "\/admin\/".$shopifyVer."\/custom_collections.json", array(), 'GET');\n$collectionList = json_decode($collectionList['response'], JSON_PRETTY_PRINT);\n$collection_id = $collectionList['custom_collections']['id'];\n\n$array = array("collection_id"=>$collection_id);\n$collects = shopify_call($token, $shop, "\/admin\/".$shopifyVer."\/collects.json", $array, 'GET');\n$collects = json_decode($collects['response'], JSON_PRETTY_PRINT);\n\n\n\nThe code above will make it easier for us to update our Shopify API calls. Just overwrite the value of the variable and that's it.Another thing to remember to keep your app updated is to navigate to your app setup. In the Webhook API version section, change the dropdown value to the latest version like below.\n\n\n\n\n\n\n\n\n\nSummary\n\n\n\nThere are a few changes going to happen to Shopify REST this 2021, and so if your app uses API resources such as FulfillmentOrder and Billing then make sure you update your app as soon as the new version of Shopify API is released. Otherwise, your app will break.