Begin connecting a store
Creates a connector in pairing state for the store and returns a one-time pairing code for
the plugin. Store-scoped like every other per-store resource: a merchant may have several
stores, so the store cannot be inferred from the bearer. The store must belong to the
caller’s merchant (404 otherwise).
/stores/{store_id}/connectors/pairingAuthorizationBearer token (JWT) · headerrequiredJWT issued by the external IdP via the OAuth 2.0 authorization-code flow (Kinde in
production; a simulator in test). The client obtains it and sends it as a Bearer token on
every authenticated call. Sarvex's services verify it — issuer, audience, signature
(IdP JWKS), expiry — and read identity and tenant from its claims. Sarvex does not issue
or revoke these tokens. merchant_id/store_id are read from the verified claims (and the
merchant→store mapping), never from the URL. The operator scope is required for
/operator/*. Operators acting on a specific merchant pass the X-Operate-As header,
which is recorded in the audit log.
store_idstringrequiredA store the caller's merchant owns. Authorized server-side against the principal; not a free-form tenant selector.
Idempotency-KeystringClient-generated key; replays return the original result.
application/jsonplatformplatformrequiredConnectable commerce backends: WooCommerce and Magento. The model and enum extend to further platform types without structural change.
woocommercemagentoConnector created in pairing state.
connector_idstringstore_idstringThe store this connector belongs to (merchant → store → connector).
platformplatformConnectable commerce backends: WooCommerce and Magento. The model and enum extend to further platform types without structural change.
woocommercemagentoconnector_typeconnector_typeWhat a connector record is for. commerce is the store's commerce backend and
the only kind the checkout path calls. Absent on records written before the
discriminator existed, which read as commerce.
commercestatusstringpairinghealthydegradeddownsync_modelstringrealtimepolllast_signal_atstring<date-time> | nulllast_full_sync_atstring<date-time> | nulllast_heartbeat_atstring<date-time> | nullfreshness_warningbooleanplugin_versionstring | nullprofile_servingobjectHealth of the plugin's Role 2 — serving /.well-known/ucp at the merchant origin. (The plugin serves only the profile; it does not proxy the UCP API.)
Show propertiesHide properties
profile_route_okbooleanProfile is being served with a 200 at the merchant domain.
last_profile_served_atstring<date-time> | nullserving_from_cachebooleanPlugin is serving last-known-good because Sarvex was unreachable.
advertised_endpointstring | nullThe services.endpoint the profile advertises — points at Sarvex (e.g. https://api.sarvex.example.com/ucp/v1/{store}).
pairing_codestringOne-time code the merchant pastes into the plugin. Shown once.
Resource not found within the caller's tenant.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequireddetailsobject | nullRequest body failed validation.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequireddetailsobject | null