Callers hold AiPrise user_profile_ids — this is the hot path.
Fetches the full profile from AiPrise and upserts the shadow row. The
upsert is monotonic on the payload's updated_at: a snapshot older than
the stored one never overwrites data / the extracted columns
(out-of-order webhook retries), but the successful fetch still bumps
syncedAt and clears deletedAt — a live fetch proves the profile
exists.
OptionalaipriseIds?: string[]OptionalclientReferenceIds?: string[]OptionalcreatedAt?: DbTimestampCriteriaOptionalids?: string[]OptionalorderBy?: DbOrderByCriterion<Optionalpage?: numberDefaults to 1
OptionalpageSize?: numberDefaults to 50
Optionalq?: stringFree-text lookup, OR of: exact aipriseId, exact clientReferenceId,
case-insensitive substring of name or the payload email, and (when the
query carries 5+ digits) a digit-normalized match on the payload phone.
Optionalresults?: NonNullable<OptionalupdatedAt?: DbTimestampCriteria
Shadow-copy service for AiPrise user (KYC) profiles. The identity-api webhook consumer calls
refreshon every AiPrise user-profile event; readers useget/getByAipriseId/searchinstead of calling AiPrise.