Keep a qualification session in sync with your own records after you’ve created it. Attach your internal user identifier, store free-form metadata, and adjust the redirect URLs a customer returns to once they finish qualifying—without touching the qualification itself.
This is most useful when you create a qualification session before you know who the shopper is. If
the customer qualifies through an ungated entry point, the session may start without your
user_id. Once you’ve resolved the shopper on your side—typically by matching their email
to an account—you can attach that identifier to the existing session so future visits reuse the
qualification instead of starting over.
user_id, so the next time they check out Truemed recognizes them and they
can skip re-qualifying.metadata against the session as your own records
evolve.success_url or failure_url a customer is
redirected to while the session is still in progress.You’ll need the qualification_session_id Truemed returned when the session was created and a valid
API key passed in the x-truemed-api-key header.
Map the customer to one of your accounts—usually by matching the email on the qualification
session to your user records—and determine the user_id you want to attach. You own
this resolution: Truemed never infers the identifier for you.
Send a POST to
update_qualification_session
with the fields you want to change and a unique idempotency_key. Only the fields you supply are
updated; omitted fields are left untouched.
user_id is set-when-nullYou can attach an user_id only while the qualification session doesn’t already have one.
Attempting to overwrite an existing value returns the user_id_already_set error code with
a 409 status.
This endpoint never overwrites an user_id that’s already set. If you need to correct a
previously set value, contact Truemed support—it can’t be changed through this endpoint.
Every request requires an idempotency_key, scoped to the qualification session. A duplicate POST
with the same key against the same session is deduplicated and returns the original response, so
retries after a network blip are safe. Reusing a key with a different payload returns a 400
validation error.
Send a fresh idempotency_key for each distinct change you want to make to the same session.
success_url and failure_url
are still saved when supplied, but have no effect once the session reaches a terminal status
(approved or rejected)—the customer has already completed the flow and won’t be redirected
again.metadata is a JSON-encoded string following the same convention as the create endpoint.