Add BOPIS location discovery - #41
Draft
woodward4422 wants to merge 2 commits into
Draft
Conversation
woodward4422
force-pushed
the
feature/retail-locations
branch
3 times, most recently
from
July 21, 2026 20:37
eebd723 to
50cbc00
Compare
Co-authored-by: pi pi@users.noreply.github.com Assisted-By: devx/26cddaee-3cde-4a0b-9e56-157d920261f0
woodward4422
force-pushed
the
feature/retail-locations
branch
from
July 22, 2026 15:31
50cbc00 to
89c314a
Compare
Co-authored-by: pi pi@users.noreply.github.com Assisted-By: devx/f0eb1d74-68de-4eab-b941-eb83ffe473e0
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
shop locations <shop-id> <variant-id>as the exact-variant BOPIS discovery primitivelocationSpecificStorefrontProductVariant.possiblePickupLocationsV2API withavailable: trueBOPIS checkout handoff
The CLI does not attempt to select pickup through UCP. Current merchant UCP checkout advertises shipping, not pickup, so the skill now uses this flow:
checkout_urlwithshop catalog get-product.shop locations.The checkout link adds the exact variant, but it does not preselect pickup or a store. The buyer chooses both during normal merchant checkout. Inventory remains point-in-time and is not reserved. If the catalog does not return
checkout_url, the skill returns the catalog-provided product URL instead.This needs no UCP pickup platform change and does not integrate directly with Storefront Cart API.
Example
The command accepts the merchant broker ID and exact variant ID shown in Shop catalog/discovery output, or their full supported GIDs.
Authentication and location privacy
shop locationsrequires Shop sign-in. The OAuth bearer establishes API caller identity for rate limiting; it does not provide the pickup search location.The query always sends the buyer-provided coarse address as
mailingAddressand, by default,pickupAddress. Parse country plus city or postal code from the buyer's request. If missing, ask and wait. Never infer location from an account, saved address, IP geolocation, or another default.Use
--near-latitudeand--near-longitudeonly when the buyer explicitly authorizes precise location use. Never persist the buyer's location. Returned location addresses are public merchant data.Live top-hat
Validated pickup discovery against
Clarke Banks Table Lampfromdev-st-us-testmode:1069848674306262309526140732771535002127Boston Store, available quantity35, usually ready in 24 hoursThe same request was anonymously throttled with HTTP 429. The standard Shop OAuth bearer removed that throttle without user-agent or native-platform spoofing.
The internal test-store product is not indexed in Global Catalog, so it has no catalog-provided checkout link and the CLI does not fabricate one.
Validation
pnpm typecheckpnpm test— 110 tests passpnpm buildgit diff --checkCo-authored by AI