Create the customer of a new lead

Same as createCustomer, except that the ID number is optional: most leads only carry a name and a phone number. Used by lead-service when a new lead matches no existing customer. 'idType' and 'idNumber' must still be given together when present; 'managerId' is required. The customer is created in the caller's tenant, in the agency of its manager, with 'managerId' as its single manager. When 'statusId' is omitted the tenant's default inactive status is assigned. Phone numbers are normalized to E.164. Publishes a customer-created event. The 'sensitive' field is currently ignored on creation. Errors: 400 with error code 40001 when the ID type and ID number are not given together, a phone number or email address is invalid, 'managerId' is missing or references an inactive user; 400 with error code 40205 when the ID number already belongs to a customer and the tenant does not allow duplicate customers; 400 with error code 40204 when no ID number is given, 'forceCreation' is false and a customer with the same email address or phone number already exists (the error's 'info.conflictingCustomers' lists them; resend with 'forceCreation' true to create anyway); 404 when the manager, status, class or source does not exist.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

The new customer. 'managerId' is required; the ID number is optional.

Request to create a new customer

boolean

Only used when no ID number is given: create the customer even if customers with the same email address or phone number exist (otherwise the request fails with error code 40204). Defaults to false.

idType
object

Customer Identity Type:
1 - ת.ז
2 - דרכון
3 - רישיון נהיגה
4 - אחר
5 - ח.פ
6 - ח.צ

string

ID number matching idType; required together with idType by createCustomer, optional for createLeadCustomer

string

ID card issue date

string

First name

string

Short name

string

Last name

string

Maiden name

string

English first name

string

English last name

string

First phone number (also accepted as 'cellNumber'). Phone numbers 1 to 3 are normalized to E.164 and stored in order: the first mobile number becomes the customer's cellNumber, the others fill phoneNumber, phoneNumber2 and phoneNumber3

string

Second phone number (also accepted as 'phoneNumber'), see phoneNumber1

string

Third phone number, see phoneNumber1

string

Fax number

string

Email address (also accepted as 'email'). Emails 1 and 2 are stored in order into the customer's email and otherEmail

string

Secondary email address, see email1

gender
object

Gender:
1 - לא מוגדר
2 - זכר
3 - נקבה

string

Birth date

boolean

Only the birth year is known; birthDate is then stored as Jan 1 of that year

boolean

Death status

string

Death date

maritalStatus
object

Marital Status:
1 - רווק/ה
2 - נשוי/אה
3 - גרוש/ה
4 - אלמן/ה
5 - ידוע/ה בציבור

string

Profession

employmentStatus
object

Employment Status:
1 - שכיר/ה
2 - עצמאי/ת
3 - שכיר/ה ועצמאי/ת
4 - שכיר/ה בעל/ת שליטה
5 - לא מועסק/ת
6 - שכיר/ה בעל/ת שליטה ועצמאי/ת
7 - פנסיונר/ית

string

ID of the active user who will manage the customer (required); the customer joins this user's agency

string

Customer status ID (see getCustomerStatuses); defaults to the tenant's default inactive status

string

Customer source ID (see getCustomerSources)

string

Customer class ID (see getCustomerClasses)

boolean

Sensitive customer flag. Currently ignored on creation

mailingStatus
object

Mailing Status:
1 - אושר דיוור
2 - לא אושר דיוור
3 - הוסר מדיוור
4 - לא התבקש אישור

string

Mailing status date

string

Street name

string

Street number

string

Apartment number

int32

Postal box number

string

City

int32

Postal code

string

Country

boolean

US citizen status

boolean

Foreign tax residency status

string

English address

kupatHolim
object

Kupat Holim:
1 - כללית
2 - מכבי
3 - מאוחדת
4 - לאומית
5 - צה"לית

kupatHolimComplementary
object

Kupat Holim Complementary:
10 - כללית מושלם זהב
11 - כללית פלטינום
20 - מכבי שלי
21 - מכבי כסף
22 - מכבי זהב
30 - מאוחדת עדיף
31 - מאוחדת שיא
40 - לאומית כסף
41 - לאומית זהב

int32

Height in cm

int32

Weight in kg

boolean

Smoker status

int32

Cigarettes count per day

string

Drugs information

string

Surgeries information

string

Hospitalizations information

string

Background diseases

string

Bank account type

int32

Bank code

int32

Bank branch code

string

Bank account number

string

Notes

boolean

Notes alert

Responses

400

Invalid input (40001), duplicate ID number (40205) or conflicting customers found by email/phone (40204)

404

Manager, status, class or source not found

Language
Credentials
OAuth2
Missing 1 required scope
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
*/*