Skip to content

Settings — Registro y Onboarding

The Registro y Onboarding tab under Settings allows agency administrators to control whether the public business registration endpoint is open for their agency. It displays live capacity data and surfaces all pre-condition errors with localized messages.

For the backend logic behind this UI, see Business Registration Gates.


Tab Location

Settings → Registro y Onboarding (section=onboarding query parameter on the settings view).

This tab is visible only to users with the agency-admin role. Business-type organizations do not have this tab because the allowBusinessRegistration flag is not applicable to them.


What the Tab Shows

On mount, the tab fetches GET /organization/my/registration-status and renders:

UI ElementSource fieldDescription
Toggle — Registro público habilitadoallowBusinessRegistrationON/OFF toggle for the registration gate
Usuarios registradosuserCount / userLimitDisplays X / Y or X / ilimitado when userLimit === null
Planes activoshasActivePlansInline indicator — turns into a warning badge when false
Subscription bannerlimitSource === 'no_subscription'Warning banner when the agency has no active platform subscription

Subscription Warning Banner

When limitSource === 'no_subscription', a prominent warning banner appears:

Sin suscripción activa — Tu agencia no tiene una suscripción de plataforma activa. Los registros nuevos se permiten por ahora, pero contacta al administrador de la plataforma para regularizar tu suscripción.

This is informational only — registration is not blocked in this case. See Gate 3 — User Capacity Check.


Toggle Behaviour (Pessimistic Update)

The toggle uses a pessimistic update pattern:

  1. Admin clicks the toggle.
  2. The UI shows a loading state.
  3. The panel calls PATCH /organization/my with { allowBusinessRegistration: <newValue> }.
  4. On success: toggle updates to new state, success toast is shown.
  5. On error: toggle reverts to previous state, error toast is shown with a localized message.

Optimistic updates are intentionally avoided because the whole point of the guards is surfacing errors to the admin — a premature state change would hide the failure behind a rollback flicker.

Localized Error Messages

Backend codeToast message (Spanish)
IDENTITY.CANNOT_ENABLE_REGISTRATION_WITHOUT_PLANS"No puedes habilitar el registro sin al menos un plan activo. Crea o activa un plan primero."
IDENTITY.FLAG_NOT_APPLICABLE_TO_BUSINESS(Should never reach this tab — BUSINESS orgs don't have it.)
Generic 5xx"No se pudo actualizar la configuración. Inténtalo de nuevo."

API Calls Made by the Tab

MethodEndpointWhen
GET/organization/my/registration-statusOn tab mount
PATCH/organization/myWhen admin toggles the flag

Both endpoints require an authenticated agency-admin JWT.

Registration status response shape:

json
{
  "allowBusinessRegistration": false,
  "hasActivePlans": true,
  "userCount": 3,
  "userLimit": 10,
  "limitSource": "platform_plan"
}

See GET /organization/my/registration-status for the full response contract.


Prerequisites for Enabling Registration

Before an admin can enable the toggle, at least one active, public plan must exist. If no plans exist, attempting to enable the flag returns IDENTITY.CANNOT_ENABLE_REGISTRATION_WITHOUT_PLANS (HTTP 409) and the toggle reverts.

Step-by-step guide: See How to enable business registration.