When to use this endpoint

Cancel a provider booking rather than merely hiding an interest. Start from a known Training_get/My Booked Webinars session ID and inspect the refreshed registration state after cancellation, especially when the provider response is uncertain.

Authentication and permissions

Authenticate with signed API-key fields or a logged-in CRM session. Every Training handler requires login; there is no additional page, role, department, or tenant feature-flag check. CRM2 exposes Training to authenticated users.

Webinars and session IDs belong to a shared global catalogue. Interests and provider registrations are scoped to the authenticated tenant and user even though they are stored globally. Client-supplied tenant/user IDs do not select another person’s bookings or progress.

Parameters

ParameterTypeRequiredDescription
session_idIntegerYesInteger-converted shared session ID. Zero/missing IDs become the cannot-cancel error after login/provider-readiness checks; there is no dedicated missing-parameter error.

Example request

$result = FM_api('Training_cancelRegistration', [
	'session_id' => '1042',
]);

Example response

{
  "ok": 1,
  "registration_state": "cancelled"
}

Success reports provider cancellation, not deletion of a local row. It does not include session, interest, refund, capacity or notification fields. A provider request can succeed before local cache persistence fails; an error is not proof that the subscription remains active.

Errors and unusual responses

ResponseCondition
{"error":"not logged in"}No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs.
{"error":"WebinarGeek is not connected yet. Please try again later."}Provider schema/configuration is unavailable.
{"error":"This booking cannot be cancelled"}Session is missing/unpublished or starts_at is at/before now.
{"error":"Unable to verify this booking"}No authenticated user registration for the session’s live broadcast has a positive saved subscription ID.
{"error":"Registration is already being processed. Please wait."}The per-registration ten-minute claim is held by another request.
{"error":"Cancellation is awaiting verification"}Provider response does not contain the saved subscription ID and a truthy unsubscribed marker.
{"error":"Cancellation was sent. Refresh to verify its status."}Confirmed provider reply could not be saved locally; inspect refreshed state before repeating.

Legacy application errors may use HTTP 200; inspect the decoded error field. Provider transport errors are sanitized. Common responses contain error plus status and uncertain: status 429 reports “WebinarGeek is busy. Please try again later.”; 401/403 reports “WebinarGeek is not available. Please contact support.”; 400/422 reports “WebinarGeek could not accept this registration. Check the required fields or use the provider registration page.” Other failures report “Unable to contact WebinarGeek. Please try again later.” Never replay a registration/cancellation merely because uncertain=true. A reconciliation failure may also return “Invalid WebinarGeek response” or “WebinarGeek results are too large. Please contact support.”

Behaviour and edge cases

  • Provider workflows require the global provider schema (migration 011) and server WebinarGeek credentials. This is deployment configuration, not the account’s HR setting or a request-supplied API key. Without the provider schema, legacy URL-based catalogue/interests still work; without credentials, provider actions fail while cached catalogue data remains readable.
  • Cancellation looks up only the current tenant/user’s saved subscription for the session’s live provider_broadcast_id. It never cancels the separate recording broadcast and does not accept a raw subscription ID from the caller.
  • The server requires a future start but does not independently require scheduled status, confirmed local status, or registration_open. A known pending subscription with a saved positive ID can be cancelled, and a registration cutoff does not itself prevent cancellation. The current UI offers the action only for a confirmed future scheduled booking.
  • Takes the same 600-second claim used by registration, POSTs the saved subscription’s unsubscribe operation, verifies the response ID/unsubscribed marker, then caches the provider state. The token-checked claim release runs in finally.
  • The row, cached personal URL and viewing history are retained. Public live joining requires confirmed status, so cancellation removes joining eligibility through normalization rather than exposing the retained URL.
  • Local legacy interest is not withdrawn. A separate active interest may still qualify for the legacy reminder worker; use interestUpdate=0 separately when that is the intended action.

Side effects

  • Contacts WebinarGeek to unsubscribe and updates global claim/state/subscription/cache timestamps. Monotonic watch/replay counters are retained. It does not insert a tenant deletion audit, remove the registration or call Core_mail directly. Provider-side unsubscribe communication is outside this response contract.

See it in Fieldmotion

CRM1

No direct CRM1 caller for Training_cancelRegistration was found. The current implementation is CRM2 Training; no direct mobile-app or m-service caller was found for these CRM routes.

CRM2

In Training → My Booked Webinars, open View details for a confirmed future scheduled booking and choose Cancel Booking. Filter for Training_cancelRegistration; the UI then reloads the bookings list. Withdraw interest is a separate button/request.

Related endpoints