Scenario #1030: Add Operations Contact To Partner

UseCase Add Operations Contact To Partner => Operations-Contact: Dennis Krause for Test AG

Given Properties

name value
partnerPersonTradeName Test AG
operationsContactFamilyName Krause
operationsContactGivenName Dennis
operationsContactPhoneNumber +49 9932 587741
operationsContactEMailAddress dennis.krause@example.org

Person: Test AG

GET /api/hs/office/persons?name=Test+AG
=> status: 200 OK 
[ {
  "uuid" : "f8f6ad7e-53d2-4cf0-9cb9-30ca2767c599", // Person: Test AG
  "personType" : "LEGAL_PERSON",
  "tradeName" : "Test AG",
  "salutation" : null,
  "title" : null,
  "givenName" : null,
  "familyName" : null
} ]

In production, data this query could result in multiple outputs. In that case, you have to find out which is the right one.

Person: Dennis Krause

POST /api/hs/office/persons
{
  "personType" : "NATURAL_PERSON",
  "familyName" : "Krause",
  "givenName" : "Dennis"
}
=> status: 201 CREATED 0fc99b0a-7d7a-4258-aa9a-70568ff247c3

Please check first if that person already exists, if so, use it’s UUID below.

HINT: operations contacts are always connected to a partner-person, thus a person which is a holder of a partner-relation.

Contact: Dennis Krause

POST /api/hs/office/contacts
{
  "caption" : "Dennis Krause",
  "phoneNumbers" : {
    "main" : "+49 9932 587741"
  },
  "emailAddresses" : {
    "main" : "dennis.krause@example.org"
  }
}
=> status: 201 CREATED 1ddfe5ca-5633-488f-9079-44c29d38d6eb

Please check first if that contact already exists, if so, use it’s UUID below.

Create Operations-Contact: Dennis Krause for Test AG

POST /api/hs/office/relations
{
  "type" : "OPERATIONS",
  "anchor.uuid" : "f8f6ad7e-53d2-4cf0-9cb9-30ca2767c599", // Person: Test AG
  "holder.uuid" : "0fc99b0a-7d7a-4258-aa9a-70568ff247c3", // Person: Dennis Krause
  "contact.uuid" : "1ddfe5ca-5633-488f-9079-44c29d38d6eb" // Contact: Dennis Krause
}
=> status: 201 CREATED e4de9333-ccdf-4da2-8f0a-8ecaeb854208

Verify the New OPERATIONS Relation

GET /api/hs/office/relations?relationType=OPERATIONS&personData=Krause
=> status: 200 OK 
[ {
  "uuid" : "e4de9333-ccdf-4da2-8f0a-8ecaeb854208",
  "anchor" : {
    "uuid" : "f8f6ad7e-53d2-4cf0-9cb9-30ca2767c599", // Person: Test AG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Test AG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "0fc99b0a-7d7a-4258-aa9a-70568ff247c3", // Person: Dennis Krause
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Dennis",
    "familyName" : "Krause"
  },
  "type" : "OPERATIONS",
  "mark" : null,
  "contact" : {
    "uuid" : "1ddfe5ca-5633-488f-9079-44c29d38d6eb", // Contact: Dennis Krause
    "caption" : "Dennis Krause",
    "postalAddress" : { },
    "emailAddresses" : {
      "main" : "dennis.krause@example.org"
    },
    "phoneNumbers" : {
      "main" : "+49 9932 587741"
    }
  }
} ]

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