fix: add missing /v1/ prefix in getEmbedUrl URL path#645
Merged
mirek26 merged 1 commit intolithic-com:nextfrom Mar 17, 2026
Merged
fix: add missing /v1/ prefix in getEmbedUrl URL path#645mirek26 merged 1 commit intolithic-com:nextfrom
mirek26 merged 1 commit intolithic-com:nextfrom
Conversation
getEmbedUrl() builds the Embedded Card UI iframe URL via manual string concatenation and was producing <baseUrl>/embed/card?... instead of <baseUrl>/v1/embed/card?.... This is the same class of bug that was fixed for getEmbedHtml() in commit 6659ab9, but getEmbedUrl() was missed because it uses buildString rather than HttpRequest.builder() with addPathSegments.
mirek26
approved these changes
Mar 17, 2026
stainless-app bot
pushed a commit
that referenced
this pull request
Mar 17, 2026
getEmbedUrl() builds the Embedded Card UI iframe URL via manual string concatenation and was producing <baseUrl>/embed/card?... instead of <baseUrl>/v1/embed/card?.... This is the same class of bug that was fixed for getEmbedHtml() in commit 6659ab9, but getEmbedUrl() was missed because it uses buildString rather than HttpRequest.builder() with addPathSegments.
Merged
Contributor
|
@tonymike99 apologies for the issue and thanks for the fix - this will go out with the next release |
stainless-app bot
pushed a commit
that referenced
this pull request
Mar 18, 2026
getEmbedUrl() builds the Embedded Card UI iframe URL via manual string concatenation and was producing <baseUrl>/embed/card?... instead of <baseUrl>/v1/embed/card?.... This is the same class of bug that was fixed for getEmbedHtml() in commit 6659ab9, but getEmbedUrl() was missed because it uses buildString rather than HttpRequest.builder() with addPathSegments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CardService.getEmbedUrl()andCardServiceAsync.getEmbedUrl()produce an incorrect Embedded Card UI URL —<baseUrl>/embed/card?...— missing the required/v1/API version prefix.https://api.lithic.com/v1/embed/card?embed_request=...&hmac=...https://api.lithic.com/embed/card?embed_request=...&hmac=...Per the Embedded Card UI docs, the endpoint is
GET https://api.lithic.com/v1/embed/card.Root cause
This is the same class of bug that was previously fixed for
getEmbedHtml()in commit6659ab9. That commit correctedaddPathSegments("embed", "card")→addPathSegments("v1", "embed", "card")in thegetEmbedHtmlmethod.However,
getEmbedUrl()was missed because it uses a different URL construction mechanism — manualbuildString { append("embed/card") }concatenation instead ofHttpRequest.builder().addPathSegments(...)— making it invisible to a targeted search for the pattern fixed in6659ab9.Changes
CardServiceImpl.kt:append("embed/card")→append("v1/embed/card")CardServiceAsyncImpl.kt:append("embed/card")→append("v1/embed/card")Test plan
clientOptions.baseUrl()defaults (https://api.lithic.com,https://sandbox.lithic.com) do not include/v1, so no double-prefix riskembed()andgetEmbedHtml()which already useaddPathSegments("v1", "embed", "card")GET /v1/embed/cardcallGetEmbedUrltest continues to pass (assertscontains("hmac"))