createCustomer
Patient anlegen
Direkter Patient-Insert (umgeht Lead-Pipeline). Für interne Tools — externe Marketing-Webhooks bitte sales/processIntake nutzen.
HTTP Request
https://dev.vitabyte.ch/v1/system/createCustomer
Request Parameters
Alle Felder sind optional — validiert wird ausschliesslich die Sprache.
⚠ countrycode wird komplett klein geschrieben; ein countryCode mit grossem C wird stillschweigend ignoriert.gender: alles, was ein f enthält (z. B. female), gilt als weiblich, sonst männlich.language als ISO 639-1 (de/fr/it/en) — die Sprache muss in E-PAT unter Admin → Dropdownlisten → Sprache existieren.group wird aufgelöst und automatisch angelegt, wenn sie noch nicht existiert.
| Parameter | Pflicht | Typ | Beispiel / Default |
|---|---|---|---|
firstname
|
optional | string |
Max
|
lastname
|
optional | string |
Mustermann
|
title
|
optional | string |
Herr
|
gender
Enthält der Wert ein f, wird weiblich gespeichert, sonst männlich. |
optional | string |
male
|
dob
Geburtsdatum. |
optional | string |
1980-02-21
|
street
|
optional | string |
Musterstrasse 1
|
zip
|
optional | string |
8000
|
city
|
optional | string |
Zürich
|
country
|
optional | string |
Schweiz
|
countrycode
Nur komplett kleingeschrieben als Feldname wirksam. |
optional | string |
CH
|
tel
|
optional | string |
+41 44 000 00 00
|
fax
|
optional | string | |
mobile
|
optional | string |
+41 79 000 00 00
|
mail
|
optional | string |
max@example.com
|
ahv
|
optional | string |
756.0000.0000.00
|
language
ISO 639-1. Muss im Sprache-Dropdown existieren, sonst kommt ein Fehler. |
optional |
string enum: de | fr | it | en
|
de
|
group
Patientengruppe; wird bei Bedarf automatisch angelegt. |
optional | string |
Response Parameters
result.group erscheint nur, wenn im Request eine group mitgegeben wurde. Unbekannte Sprache: { "status": false, "msg": "Unknown language …" } mit HTTP 200.
| Field | Typ | Beschreibung |
|---|---|---|
id |
integer | Patienten-ID des neuen Datensatzes |
group |
string | created oder existed — nur bei mitgegebener Gruppe |
Demo
Parameter und Beispiele stammen aus der internen API-Collection; die OpenAPI-Spec weicht für diesen Endpoint davon ab.
POST
https://dev.vitabyte.ch/v1/system/createCustomer
{
"title": "Herr",
"firstname": "Max",
"lastname": "Mustermann",
"gender": "male",
"dob": "1980-02-21",
"street": "Musterstrasse 1",
"zip": "8000",
"city": "Zürich",
"country": "Schweiz",
"countrycode": "CH",
"tel": "+41 44 000 00 00",
"mobile": "+41 79 000 00 00",
"mail": "max@example.com",
"ahv": "756.0000.0000.00",
"language": "de"
}
{
"status": true,
"msg": "Customer created",
"result": {
"id": 1234
}
}