Repository navigation
Add a Grupo Éxito Marketplace adapter with list-valued token paths - #1570
Merged
Merged
Conversation
Grupo Éxito's marketplace seller API (Colombia, developers.exito.com) sits behind several API Gateway addresses with a Cognito authorizer: calls send the token bare in Authorization, plus an x-api-key. The token request (username, password, x-api-key) is not published, so the adapter takes its address as EXITO_LOGIN_URL and uses LOGIN_TOKEN. LOGIN_TOKEN gains one opt-in option for logins whose answer is not documented: tokenJsonPath may list several paths, tried in order; the first non-empty string is the token. A single path works as before. The adapter has 16 tools: products and their moderation queues (waiting, rejected, pending the seller's decision), the bulk upload status, categories and their specifications, orders and payout statements, creating products with image URLs and features, products with offers, and offers (price and stock, also for one EAN). Order tracking and invoice upload are installed switched off. The documented sticker route only exists on a dev stage and is left out.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
This adds a Grupo Éxito Marketplace adapter: the seller API of exito.com and Éxito's other sites in Colombia, documented at https://developers.exito.com/. It also adds one opt-in LOGIN_TOKEN option.
How the API works:
*.execute-api.us-east-1.amazonaws.com,-pdnstages). Each tool carries its documented absolute URL.Authorization(the docs writeCOGNITO_TOKEN) and anx-api-key.x-api-key) in private instructions; the public docs never describe it. The adapter therefore usesLOGIN_TOKENwith the token address as a connector variable (EXITO_LOGIN_URL, the same precedent asDOCUWARE_TOKEN_URL).Changes
Engine (
login-token.service.ts, opt-in)tokenJsonPathmay be a list of paths, tried in order; the first non-empty string is the token."."takes a bare-string answer.catalog.spec.ts(well-formed check),scripts/probe-keyless.mjs,docs/connectors/login-token-auth.md,docs/tool-definition.md.Adapter
intl/exito-marketplace.json(category e-commerce), 16 tools:/devstage, and the prod route answers "Missing Authentication Token";notifyproduct/notifyoffercallbacks;Other details:
EXITO_USERNAME,EXITO_PASSWORD(secret),EXITO_API_KEY(secret, sent asx-api-keyon the login and on every call),EXITO_LOGIN_URL,EXITO_SELLER_ID(numericidSeller, required by the moderation queues and bills).errorWhen: a non-emptyerrors/Errorslist inside HTTP 200 → a failed call. Batch results with per-EAN messages are left to the model, and the descriptions say to read them.IsUpdatedStock; more than 30% →PEX/PriceApproval; up to 1 h of indexing; up to 4 h of site cache.exito.svg: the public-domain (trademarked) mark from Wikimedia Commons, Inkscape metadata stripped. Catalog regenerated, counts 713 → 714,llms.txtregenerated.Cloud and self-hosted: identical in both. The token address is a user-supplied URL and passes through the SSRF guard on both; the token is cached encrypted in
connector_auth_cache.Not yet verified with real credentials. The token request's body field names (
username/passwordassumed) and response shape (CognitoAuthenticationResult.IdTokentried first, then the usual alternatives) come from no public document. If the seller's instructions differ, it is a one-line adapter change.Type
Testing
In
packages/backend(afternpx prisma generate):npx jest --maxWorkers=4 src/connectors/engines/login-token.service.spec.ts: 78 passed (7 new for the list form).npx jest --maxWorkers=4 src/adapters/intl/exito-marketplace: 14 passed, 1 live block skipped. The spec runs the real RestEngine + LoginTokenService with axios mocked and checks:x-api-key, body);x-api-keyon calls, and token reuse;errorWhenagainst the documented 200 bodies.Live:
RUN_EXITO_LIVE=1(orRUN_EXITO_MARKETPLACE_LIVE=1) with the fiveEXITO_*variables, read-only.npx jest --maxWorkers=4on catalog.spec, env-var-meta, env-var-checks, setup-guide, catalog-summary, catalog-search, instruction-facts, connector-setup.service, probe.util, adapters.service, mcp-adapter, login-token andrest.engine*: 26 suites, 16,099 tests passed.npx jest --maxWorkers=4on the specs of all 38 LOGIN_TOKEN adapters + connector-setup-status: 39 suites, 385 passed, 55 skipped (live).npx tsc --noEmit -p tsconfig.json: no errors.npm run lint: 0 errors, 11 warnings, all in files this PR does not touch. It rewrote nothing.From the repo root:
node scripts/validate-adapters.mjs --warn: 730 passed. The warning total is the same as on main (1440), so there are none for the new adapter.node scripts/regenerate-catalog.mjs: 730 adapters.node scripts/adapter-count.mjs --check: OK, 714 adapters.node scripts/generate-llms-txt.mjs --check: up to date.node scripts/generate-cli-operations.mjs --check: up to date.node --test scripts/validate-adapters.test.mjs scripts/adapter-new.test.mjs scripts/generate-llms-txt.test.mjs: 60 passed.node --test scripts/satellites/satellites.test.mjs: 18 passed.Frontend: only an SVG is added, so the frontend lint, typecheck and Playwright were not run.
Against the real hosts, with no credentials sent:
401 {"message":"Unauthorized"}(it exists behind the Cognito authorizer). Unknown routes answer403 Missing Authentication Token.403 Forbiddenfor every path, which is API Gateway's missing-API-key answer. That is whyx-api-keygoes on every call.Checklist