Skip to content

Local search · English

    Internal API boundaries and diagnostics

    The browser application uses native /api routes under the trusted administration origin. This reference explains their boundary and debugging approach; it does not create a public versioned external API promise. Prefer the plugin bridge for supported in-product extension workflows.

    • Use a disposable local installation and the same application commit as the contracts you inspect. Keep authentication cookies, request bodies and provider identifiers private.
    1. Inspect a read-only session response locally:

      Terminal window
      curl --fail --silent -H "Host: 127.0.0.1:5173" http://127.0.0.1:5174/api/session

      The request must use the configured admin Host. Without a session it describes anonymous state; it does not authorize website reads or writes. Choose the listener/port that your local configuration actually uses.

    2. Trace the browser client and current server route for the resource. Read the checked request/response shapes and semantic validation together. Mutating browser requests require the matching administration Origin plus an authorized session and resource capability.

    3. When reproducing a save, use the native client in the isolated fixture and preserve its revision. A 409 means reconcile against current state; repeatedly replaying an old revision is not a merge. A 403 is not solved by changing a URL to another website.

    4. For unexpected server errors, collect the safe status and X-Request-ID and correlate private operator logs. Do not publish raw cookies, SQL parameters or customer data. Webhook routes have provider-specific verification and must not be treated as general unauthenticated mutation APIs.

    These owner-only site routes use the same session, site, Origin, and revision checks as other Store mutations. Prefix them with /api/sites/{siteId}.

    Route Checked input / result
    POST /store/metadata-csv/export {productIds, definitionId} for one active field and up to 25 products; returns {csv} with keep operations.
    POST /store/metadata-csv/preview {csv}; returns product errors/change counts and a nullable review token without writes.
    POST /store/metadata-csv/apply {csv, token}; reparses/revalidates and applies the existing atomic metadata batch.
    GET /store/admin Bounded saved catalog summaries with optional kind, search, status, category, fulfillment, currency, sort, offset, and limit.

    CSV has the fixed exported seven-column header, JSON value cells, and explicit keep/set/unset operations. Bounds are 1 MiB, 5,000 records, and 25 products; IDs and product/schema revisions are required. Follow the metadata guide for clear versus unset and conflict handling. A successful response saves drafts only.

    Catalog search ANDs whitespace-separated terms across product title/slug, SKU, variants/options, and category name/slug. Category accepts all, none, or a saved category ID; fulfillment accepts all, physical, or digital; currency accepts all or a supported catalog currency. Currency and fulfillment must match one variant together. Sort accepts default, updated-desc, name-asc, or name-desc. Pagination defaults to 25, permits at most 100 summaries, and bounds offset to 1,000. Duplicate/unknown query keys and invalid filters fail validation. The response includes bounded category/currency choices under filters; it excludes private metadata and full variant records. This adds no public visitor catalog endpoint and does not change the cached checkout v1 DTO.

    • The reproduction identifies the exact route, contract version, permission and revision while maintaining tenant boundaries.

    For optional-service 503 responses, inspect configuration and worker readiness before changing authentication. Introduce any external automation interface as a reviewed product/API decision rather than relying on undocumented browser traffic.

    Account routes use /api/security; website routes below use /api/sites/{siteId} as their prefix. Inspect the matching TypeBox contracts in the application version you run. Review tokens bind inspected inputs and revisions; they do not replace authentication or publishing permission.

    Method and route Contract and effect
    GET /api/security Current account’s MFA flags, remaining recovery-code count, opaque session handles and retained activity; no stored seed or session token.
    POST /api/security/enroll Current password; returns a private pending setup key/URI with a ten-minute deadline.
    POST /api/security/enable Current password and pending authenticator code; enables MFA and returns the one-time recovery-code set.
    POST /api/security/disable, /recovery-codes, /revoke-sessions Current password plus fresh/recent-session factor proof when enrolled; revocation accepts an optional owning-account session handle. Without a handle it revokes all other sessions.
    GET /reviews, POST /reviews Lists review metadata or creates a saved page/entry review with kind, targetId, targetRevision. Creation returns its capability token once.
    POST /reviews/{id}/revoke, /remove, /publish Revision-fenced management; remove requires revoked/expired state, publish requires current approval and publication authority.
    POST /store/metadata-bulk/preview, /apply Up to 25 checked product metadata patches; preview reports row errors and a nullable token. Apply takes the unchanged rows plus token and saves the entire valid batch atomically.
    GET /component-packages/export?sectionId=... Bounded JSON package with supported dependencies.
    POST /component-packages/inspect, /apply Inspect package directly; apply takes {package, token} and creates local drafts after rechecking the destination.
    POST /export, GET /export/download?exportedAt=... Generate the current published static export, then download the reviewed archive identity within its file/byte bounds.

    A shared review uses /api/review-shares/{siteId}/{reviewId}/read or /decision, both POST. It carries the fragment capability in the JSON body, omits workspace credentials, and still requires the exact administration Origin and rate limits. Decision input includes the current review revision, self-reported name, message and decision. Do not put this capability in query strings or logs.

    Enrolled-account login requires the factor field before any full session is issued. Treat enrollment/recovery responses as private; replacing the configured encryption key is not a recovery method. A 409 from an inspected mutation means inspect/reconcile again; a 503 can indicate missing secret-key configuration. Existing role checks remain authoritative: component packages allow the designer surface, Store/export remain owner surfaces, and client editors with publishing permission can review only native entries.

    Applies to Strukt 3c3a9cf2dba71257b35d8e35f518c51b1567e50b · 2026-11-16