There are multiple models for service versioning:
- URL: You simply add the API version into the URL, for example: https://getOrder/order/v2.0/sobjects/Account. Used frequently, but not good practice.
- Accept header: You modify the accept header to specify the version, for example: Accept: application/vnd.getOrders.v2+json. Rarely used and cumbersome for the client.
- Schema level: Enforce the validation using schema, difficult to enforce with JSON, and works well with XML. Good practice/rare.
- API facade layer: Use the facade layer to hide the version complexity from the client.
Remember, a resource is a semantic model; a resource's representational form and state may change over time but the identifier must consistently address ...