Kontakte
Zuletzt geändert: 18.07.2026 15:19

Ressource: contacts (Ansprechpartner einer Adresse) #

Kontakte sind eine Unter-Ressource der Adresse (EULANDA-Tabelle Kontakt, verknüpft über AdresseId). Sie nutzen die Adress-Scopes: Lesen mit addresses:read, Schreiben mit addresses:write.

Endpunkte #

MethodePfadZweck
GET/api/v1/addresses/{addressId}/contactsListe (limit/offset, q, changedSince, fields)
GET/api/v1/addresses/{addressId}/contacts/{id}Einzelner Kontakt
POST/api/v1/addresses/{addressId}/contactsAnlegen (Pflichtfeld lastName)
PATCH/api/v1/addresses/{addressId}/contacts/{id}Felder ändern (partiell)
DELETE/api/v1/addresses/{addressId}/contacts/{id}Löschen

Kontakte sind nur innerhalb ihrer Adresse erreichbar - ein Kontakt einer anderen Adresse liefert 404.

Felder (Glossar Entwurf) #

API-FeldDB-SpalteTypSchreibbar
id / uid / addressIdid / uid / AdresseIdint/guid/intnein
salutationAnredestringja
titleTitelstringja
firstName / lastNameVorname / Nachnamestringja (lastName Pflicht beim Anlegen)
departmentAbteilungstringja
jobTitleFunktionstringja
roomRaumstringja
phone / mobile / faxTel / Mobil / Faxstringja
emailEmailstringja
websiteHomepagestringja
languageSprachestringja
birthdayGeburtstagdatetimeja
typetypstringja (Default D = dienstlich)
initialsInitialenstringja
createdAt / changedAtCreateDate / ChangeDatedatetimenein

Beispiele #

Kontakte listen:

$h = @{ Authorization = "Bearer $key" }
Invoke-RestMethod 'http://localhost:8100/api/v1/addresses/2/contacts' -Headers $h
curl.exe -H "Authorization: Bearer %KEY%" "http://localhost:8100/api/v1/addresses/2/contacts"

Anlegen:

$body = @{ lastName = 'Muster'; firstName = 'Max'; email = 'max@example.com'; jobTitle = 'Einkauf' } | ConvertTo-Json
Invoke-RestMethod 'http://localhost:8100/api/v1/addresses/2/contacts' `
    -Method Post -Headers $h -ContentType 'application/json' -Body $body
curl.exe -X POST -H "Authorization: Bearer %KEY%" -H "Content-Type: application/json" -d "{ \"lastName\": \"Muster\", \"firstName\": \"Max\", \"email\": \"max@example.com\" }" "http://localhost:8100/api/v1/addresses/2/contacts"

Ändern und löschen:

$patch = @{ mobile = '0171 1234567' } | ConvertTo-Json
Invoke-RestMethod 'http://localhost:8100/api/v1/addresses/2/contacts/5' -Method Patch -Headers $h -ContentType 'application/json' -Body $patch
Invoke-RestMethod 'http://localhost:8100/api/v1/addresses/2/contacts/5' -Method Delete -Headers $h
curl.exe -X PATCH -H "Authorization: Bearer %KEY%" -H "Content-Type: application/json" -d "{ \"mobile\": \"0171 1234567\" }" "http://localhost:8100/api/v1/addresses/2/contacts/5"
curl.exe -X DELETE -H "Authorization: Bearer %KEY%" "http://localhost:8100/api/v1/addresses/2/contacts/5"

Hinweise #

  • Delta-Sync wie bei Adressen über ?changedSince=; ChangeDate wird von der API beim Ändern gesetzt (die Tabelle hat keinen Trigger).
  • Kontakte haben in EULANDA ebenfalls Bild-Spalten (auch Visitenkarte); Bild-Endpunkte für Kontakte folgen bei Bedarf nach dem Muster der Bilder-Seite.