Skip to content

feat(lfp): gmc lfp (Merchant API lfp/v1) — completes 11/11 sub-APIs#97

Merged
yasserstudio merged 1 commit into
mainfrom
feat/lfp
Jun 14, 2026
Merged

feat(lfp): gmc lfp (Merchant API lfp/v1) — completes 11/11 sub-APIs#97
yasserstudio merged 1 commit into
mainfrom
feat/lfp

Conversation

@yasserstudio

Copy link
Copy Markdown
Owner

What

Adds the lfp/v1 Local Feeds Partnership sub-API — the 11th and final Merchant API sub-API gmc covers (11/11).

Provider-side API: the scoped account (--account/profile) is the LFP provider; each resource names a targetAccount — the merchant's numeric Merchant Center id — that the data is submitted for. This is the one sub-API where the scoped account isn't the merchant.

Commands

  • gmc lfp stores list --target-account <m> | get <id> | insert | delete <id>
  • gmc lfp inventory insert (upsert)
  • gmc lfp sales insert
  • gmc lfp state get <merchant> (onboarding diagnostics)

Inserts take convenience flags (--target-account, --store-code, --offer-id, --price/--currency, --quantity, …) or a full --file body.

Implementation

  • New LfpService in @gmc-cli/api + new-sub-API plumbing (the lfp rate-limit bucket, OAuth scopes, SubApi lists in api + auth).
  • All shapes, the :insert colon-verb paths, the bare-int64 targetAccount, and the required targetAccount list filter verified against the lfp_v1 discovery document.

⚠️ Not live-testable

LFP calls require an approved LFP-provider account, so this can't be verified against a live merchant account — the discovery doc is the sole ground truth. The 3-agent review weighted the API-correctness pass accordingly and caught a critical + a high (both fixed): targetAccount is a bare id (not accounts/{id}), and stores list requires a targetAccount query filter. Also switched the inventory/sale input types to explicit Pick<> allowlists and tightened --target-account validation.

Tests

+21 (api 154, cli 295; 640 total). format/lint/typecheck/docs all clean. Patch bump (api + cli) → v1.0.14.

Adds the lfp/v1 Local Feeds Partnership sub-API, the 11th and final
Merchant API sub-API. Provider-side: the scoped account is the LFP
provider and each resource names a targetAccount (the merchant).

New LfpService: lfpStores list/get/insert/delete, lfpInventories insert,
lfpSales insert, lfpMerchantStates get. CLI gmc lfp stores|inventory|
sales|state with convenience flags or --file. Adds the lfp rate-limit
bucket and OAuth-scope wiring.

Resource shapes, the :insert colon-verb paths, the per-merchant
targetAccount (a bare int64 id), and the required targetAccount list
filter were verified against the lfp_v1 discovery document.
@yasserstudio yasserstudio merged commit 946e452 into main Jun 14, 2026
7 checks passed
@yasserstudio yasserstudio deleted the feat/lfp branch June 14, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant