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
token: optional str. The signed token from the connection link.password: optional str. The password entered on the page.practice: optional str. Practice name for an eVetPractice login that reaches several practices; ignored when the link names one.visibility: optional str. Who can use a new eVetPractice connection:organization(everyone) orprivate(only the person who made the link); the page preselects neither, and a new connection without one is refused. Ignored when the link refreshes an existing connection.scope: optional str. For a practice system that asks, whose login it is:organization(the practice's login, the AVImark login Hilus uses; only through a link an organization administrator made, and the default, since a link's page does not ask). A personal login is added signed in, never through a link.confirm_password: optional str. On a staff-password link, the new password typed a second time; it must equalpassword.
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 '{}'