Scenario #2010: Create Self Debitor For Partner

UseCase Create Self Debitor For Partner => Debitor: D-3101000 - Test AG - main debitor

Given Properties

name value
partnerPersonTradeName Test AG
billingContactCaption Test AG - billing department
billingContactEmailAddress billing@test-ag.example.org
debitorNumberSuffix 00
billable true
vatId VAT123456
vatCountryCode DE
vatBusiness true
vatReverseCharge false
defaultPrefix tst

partnerPersonUuid

GET /api/hs/office/relations?relationType=PARTNER&personData=Test+AG
=> status: 200 OK 
[ {
  "uuid" : "aeaef95b-53ff-4ba9-bf48-d7663fc0bf0a", // partnerRelationUuid
  "anchor" : {
    "uuid" : "1511f5ad-c841-4bc0-9277-83a66c4f5e17", // Person: Hostsharing eG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Hostsharing eG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "8c6c4683-6cea-4a60-97af-11726b74db70", // Person: Test AG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Test AG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "type" : "PARTNER",
  "mark" : null,
  "contact" : {
    "uuid" : "afa48a49-ef24-414e-8d28-d999a46d5009", // Contact: Test AG - China
    "caption" : "Test AG - China",
    "postalAddress" : {
      "city" : "Dongguan City",
      "firm" : "Test AG",
      "name" : "Fi Zhong-Kha",
      "street" : "No.2 Commercial Second Street",
      "country" : "China",
      "building" : "Thi Chi Koh Building",
      "district" : "Niushan Wei Wu",
      "province" : "Guangdong Province"
    },
    "emailAddresses" : {
      "main" : "norden@test-ag.example.org"
    },
    "phoneNumbers" : {
      "phone" : "++15 999 654321"
    }
  }
} ]

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

BankAccount: Test AG - refund bank account

POST /api/hs/office/bankaccounts
{
  "holder" : "Test AG - refund bank account",
  "iban" : "DE88100900001234567892",
  "bic" : "BEVODEBB"
}
=> status: 201 CREATED 6157ee12-8b45-48a3-a92b-6b5cf52d1080

Contact: Test AG - billing department

POST /api/hs/office/contacts
{
  "caption" : "Test AG - billing department",
  "emailAddresses" : {
    "main" : "billing@test-ag.example.org"
  }
}
=> status: 201 CREATED a39bd85b-9b4d-4f95-b3ea-ea8b926afec7

Create Debitor: D-3101000 - Test AG - main debitor

POST /api/hs/office/debitors
{
  "debitorRel" : {
    "anchor.uuid" : "8c6c4683-6cea-4a60-97af-11726b74db70", // partnerPersonUuid
    "holder.uuid" : "8c6c4683-6cea-4a60-97af-11726b74db70", // partnerPersonUuid
    "contact.uuid" : "a39bd85b-9b4d-4f95-b3ea-ea8b926afec7" // Contact: Test AG - billing department
  },
  "debitorNumberSuffix" : "00",
  "billable" : true,
  "vatId" : "VAT123456",
  "vatCountryCode" : "DE",
  "vatBusiness" : true,
  "vatReverseCharge" : false,
  "refundBankAccount.uuid" : "6157ee12-8b45-48a3-a92b-6b5cf52d1080", // BankAccount: Test AG - refund bank account
  "defaultPrefix" : "tst"
}
=> status: 201 CREATED cf7fcb48-b5f4-4cdb-99fc-589259643b44

generated on 03-06-2025 10:43:20 for branch feature/update-relations-when-updating-partner-person