Natzar Partner API Reference - v1.0.0
    Preparing search index...

    Variable upsertPatientSchemaConst

    upsertPatientSchema: ZodObject<
        {
            externalId: ZodString;
            phone: ZodString;
            email: ZodString;
            givenName: ZodString;
            familyName: ZodString;
            birthdate: ZodString;
            sex: ZodEnum<{ male: "male"; female: "female" }>;
            lang: ZodOptional<
                ZodEnum<
                    {
                        en_US: "en_US";
                        es_US: "es_US";
                        de_CH: "de_CH";
                        fr_CH: "fr_CH";
                        it_CH: "it_CH";
                    },
                >,
            >;
            state: ZodOptional<ZodString>;
            country: ZodOptional<ZodString>;
        },
        $strict,
    > = ...

    Body of POST /v1/patients — idempotent upsert keyed on externalId.

    Repeating the call with the same externalId updates the mutable fields instead of creating a duplicate. phone is identity-bearing: it must be E.164, unique across the platform, and cannot be changed after creation (a conflicting phone yields 409 phone_unavailable).