🧩 API Versioning Strategy
This document outlines the API versioning strategy for the FinTech API to ensure backward compatibility and smooth transitions between versions.
📌 Versioning Scheme
- Current Version: 1.1
- Version Format:
v{major}.{minor}(e.g.,v1.1) - Default Version:
v1.0(when no version is specified)
📌 Version Identification
API versions can be specified using one of the following methods (in order of precedence):
- URL Path (Recommended):
- Accept Header:
- Custom Header:
📌 Backward Compatibility Policy
Version 1.1 (Current)
- Changes:
- Added support for transaction fees
- Added new exchange rate caching mechanism
- Backward Compatibility: Fully backward compatible with v1.0
Version 1.0 (Legacy)
- Initial stable release
- No breaking changes from previous versions
📌 Handling Breaking Changes
For future breaking changes, we will:
- Increment the major version number
- Maintain the previous major version for a reasonable deprecation period
- Provide migration guides and tools when possible
- Clearly document breaking changes in release notes
📌 Best Practices for Clients
- Always specify the API version in requests
- Handle HTTP 400 responses for unsupported versions
- Test new versions in a staging environment before upgrading production
- Monitor deprecation notices for the APIs you use
📌 Example Requests
Using URL Path
Using Accept Header
GET /accounts/123/transactions HTTP/1.1
Host: api.fintech.example.com
Accept: application/vnd.fintech.v1.1+json
📌 Version Discovery
You can discover available versions by making a request to the root endpoint:
Response: