Scenario #2012: Create External Debitor For Partner

UseCase Create External Debitor For Partner => Debitor: D-3101002 - Test AG - external debitor

Given Properties

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

Person: Test AG

GET /api/hs/office/persons?name=Test+AG
=> status: 200 OK 
[ {
  "uuid" : "f8f6ad7e-53d2-4cf0-9cb9-30ca2767c599", // partnerPersonUuid
  "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.

BankAccount: Billing GmbH - refund bank account

POST /api/hs/office/bankaccounts
{
  "holder" : "Billing GmbH - refund bank account",
  "iban" : "DE02120300000000202051",
  "bic" : "BYLADEM1001"
}
=> status: 201 CREATED 87e81f67-d970-4605-a964-23d8471052dd

Contact: Billing GmbH - Test AG billing

POST /api/hs/office/contacts
{
  "caption" : "Billing GmbH, billing for Test AG",
  "emailAddresses" : {
    "main" : "test-ag@billing-GmbH.example.com"
  }
}
=> status: 201 CREATED eb2845ca-f9ee-4597-96d7-c40e4101a2d3

Create Debitor: D-3101002 - Test AG - external debitor

POST /api/hs/office/debitors
{
  "debitorRel" : {
    "anchor.uuid" : "f8f6ad7e-53d2-4cf0-9cb9-30ca2767c599", // partnerPersonUuid
    "holder.uuid" : "20386eb7-6cd8-4f27-96e6-e142007e4776", // Person: Billing GmbH
    "contact.uuid" : "eb2845ca-f9ee-4597-96d7-c40e4101a2d3" // Contact: Billing GmbH - Test AG billing
  },
  "debitorNumberSuffix" : "02",
  "billable" : true,
  "vatId" : "VAT123456",
  "vatCountryCode" : "DE",
  "vatBusiness" : true,
  "vatReverseCharge" : false,
  "refundBankAccount.uuid" : "87e81f67-d970-4605-a964-23d8471052dd", // BankAccount: Billing GmbH - refund bank account
  "defaultPrefix" : "tsy"
}
=> status: 201 CREATED 70584522-d3f3-40f3-91ae-edc03a23095b

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