Check the password from the hosted page with a real login, then store it

POST /Platform/pims_connect/connect

Check the password from the hosted page with a real login, then store it.

Idempotent by design (submitting the same valid password again is a harmless re-set), which is what makes the link safe without single-use consumption; expiry is the limit.

A staff-password link is the exception: it sets the password of the staff member the link names in the practice system, stores nothing, and works once. Its use is taken before anything is sent and handed back only after a refusal that changed nothing, a limited number of times. Its JSON answer has action password_set with a message; its failures are link_used (410), passwords_differ (400) and the practice system's refusal as a sentence for the person (a password that cannot be used, the staff member removed, the practice's computer not connected), never the practice system's own text.

A caller that prefers JSON (Accept: application/json, as the inline widget does) gets the stored connection (pims_id, redacted username, practice_name, created_at, pims_type and action: connected or updated) instead of the success page, and {error, code} with the matching status on failure: link_expired (404), password_missing (400), visibility_invalid (400), field_invalid (400), password_rejected (401), verify_unavailable (503), several_practices (409), connection_missing (404), link_invalid (403), organization_login_admin_only (403: the link was not made by an organization administrator), personal_login_needs_sign_in (403: a link never adds a personal login), login_not_checked (503: no connector could check the login; the message says why for each) and connect_not_available (501, a practice system that cannot be connected here yet). For a practice system reached through connectors, practice_name names the connectors that accepted the login and message says where it was kept and where not. A browser posting the hosted form gets pages.

Body parameters

Returns

The HTML page. Sent as text/html, not JSON.

Example request

curl -X POST "https://api.hilus.ai/Platform/pims_connect/connect" \
  -H "Authorization: Bearer $HILUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'