Scenario #1011: Create Natural Person As Partner

UseCase Create Partner => Partner: P-31011 - Michelle Matthieu

A partner can be a client or a vendor, currently we only use them for clients.

Given Properties

name value
partnerNumber P-31011
personType NATURAL_PERSON
givenName Michelle
familyName Matthieu
contactCaption Michelle Matthieu
postalAddress “name”: “Michelle Matthieu”,
“street”: “An der Wandse 34”,
“zipcode”: “22123”,
“city”: “Hamburg”,
“country”: “Germany”
officePhoneNumber +49 40 123456
emailAddress michelle.matthieu@example.org
birthday 1951-03-25
birthPlace Neustadt a.d.R.
birthName Eichbaum

Person: Hostsharing eG

GET /api/hs/office/persons?name=Hostsharing+eG
=> status: 200 OK 
[ {
  "uuid" : "c6575205-1480-4b70-a30b-d0c5a1d7cc99", // Person: Hostsharing eG
  "personType" : "LEGAL_PERSON",
  "tradeName" : "Hostsharing eG",
  "salutation" : null,
  "title" : null,
  "givenName" : null,
  "familyName" : null
} ]

Even in production data we expect this query to return just a single result.

Person: Michelle Matthieu

POST /api/hs/office/persons
{
  "personType" : "NATURAL_PERSON",
  "givenName" : "Michelle",
  "familyName" : "Matthieu"
}
=> status: 201 CREATED cc841e55-8c8a-4ed6-9182-1db104966aed

Contact: Michelle Matthieu

POST /api/hs/office/contacts
{
  "caption" : "Michelle Matthieu",
  "postalAddress" : {
    "name" : "Michelle Matthieu",
    "street" : "An der Wandse 34",
    "zipcode" : "22123",
    "city" : "Hamburg",
    "country" : "Germany"
  },
  "phoneNumbers" : {
    "office" : "+49 40 123456"
  },
  "emailAddresses" : {
    "main" : "michelle.matthieu@example.org"
  }
}
=> status: 201 CREATED bcc956de-51a8-460a-9b05-b693320bcb8f

Create Partner: P-31011 - Michelle Matthieu

POST /api/hs/office/partners
{
  "partnerNumber" : "P-31011",
  "partnerRel" : {
    "anchor.uuid" : "c6575205-1480-4b70-a30b-d0c5a1d7cc99", // Person: Hostsharing eG
    "holder.uuid" : "cc841e55-8c8a-4ed6-9182-1db104966aed", // Person: Michelle Matthieu
    "contact.uuid" : "bcc956de-51a8-460a-9b05-b693320bcb8f" // Contact: Michelle Matthieu
  },
  "details" : {
    "birthday" : "1951-03-25",
    "birthPlace" : "Neustadt a.d.R.",
    "birthName" : "Eichbaum"
  }
}
=> status: 201 CREATED 3a5780a7-622e-4aa6-b69c-8b17491b26ed

Verify the New Partner Relation

GET /api/hs/office/relations?relationType=PARTNER&contactData=Michelle+Matthieu
=> status: 200 OK 
[ {
  "uuid" : "dbcff45e-3b1b-41f8-ae26-1d114cc6b971",
  "anchor" : {
    "uuid" : "c6575205-1480-4b70-a30b-d0c5a1d7cc99", // Person: Hostsharing eG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Hostsharing eG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "cc841e55-8c8a-4ed6-9182-1db104966aed", // Person: Michelle Matthieu
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Michelle",
    "familyName" : "Matthieu"
  },
  "type" : "PARTNER",
  "mark" : null,
  "contact" : {
    "uuid" : "bcc956de-51a8-460a-9b05-b693320bcb8f", // Contact: Michelle Matthieu
    "caption" : "Michelle Matthieu",
    "postalAddress" : {
      "city" : "Hamburg",
      "name" : "Michelle Matthieu",
      "street" : "An der Wandse 34",
      "country" : "Germany",
      "zipcode" : "22123"
    },
    "emailAddresses" : {
      "main" : "michelle.matthieu@example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 40 123456"
    }
  }
} ]

generated on 03-10-2025 12:07:38 for branch master