Versioning with custom header

You can set version using a custom header.

The version can be included in a custom header.
api-version:v2.0
The version must be specified by the client. Clients need to know which version to specify before requesting a resource.

The API function retrieves the value of the header. If the version matches one specified, then that is the method that will be invoked. Based on this, the API can decide if it is capable of fulfilling the request and respond to the client appropriately.