Learn how to upgrade to v1.0 of the Knock Java SDK.
Initialize your client using environment variables or explicit configuration:
The v1.0 SDK introduces significant improvements for Java developers, including async support, immutable objects, and better error handling.
Switch to asynchronous operations when needed:
All objects are immutable for thread safety:
Work with paginated resources more easily:
Access raw HTTP responses when needed:
Handle errors more efficiently with more detailed error information:
Add undocumented parameters when needed:
The new SDK uses builder patterns for all request parameters. Parameters are grouped into structured objects rather than flat lists.
Most methods now take parameter objects instead of individual parameters. The new SDK uses a more consistent naming convention across all methods.
The new SDK uses JsonValue and typed fields for better type safety. Field access methods have changed to accommodate the new type system.
The new SDK provides more detailed and structured error information.
API key is now passed as a bearer token instead of a dedicated API key parameter.
If you run into any issues during your migration, reach out to our support team or open an issue on GitHub.