How do I check a customers account balance (if the customer has any unpaid invoices) via the API?
You can use GET ledger/posting/openPost and specify date (keep in mind this is to and excluding, so to have todays posting you need to specify todays date+1 day), accountId (default for customer account is number 1500, fetch ID from GET ledger/account) as well as customer ID to bring up the open postings connected to this customers account. From here you can check for a closegroup. If closegroup=null then the posting is open (in case of invoice it has not been paid). If there is an object linked (an id) then you can use GET ledger/closeGroup to find the postings it is closed towards.
When creating a new customer I get a response that says postalAddress is required for EHF, why?
This validation is triggered whenever a new customer is created where isPrivateIndividual=FALSE and invoiceSendMethod=EHF. isPrivateIndividual=FALSE is the default value unless defined to =TRUE. Whenever a customer object is set to isPrivateIndividual=FALSE then the default invoiceSendMethod=EHF as well (unless changed by the end user in GUI). To send EHF invoices you are required to provide a postalAddress as specified in Peppol BIS billing 3.0: https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-tc434/BR-10/.
If your integration or end user intend to send EHF invoices you will need to provide a valid postalAddress. If another invoiceSendMethod will be used, or the end user does not have EHF invoicing active in Tripletex you can set the invoiceSendMethod parameter to EMAIL, for example.
I am providing a valid organizationNumber value, but I’m still getting an error, why?
Most of the times this happens it is due to the default value in physicalAddress for a customers country being set to Norway, and we will check wether or not the provided organization number is valid in the given country in physicalAddress. If you need to register an organizationNumber for a foreign customer then the physicalAddress attribute needs to be specified with the correct country for the given organization number.