HostFact API versie 3.1
Debiteuren
Debiteuren zijn te beheren via de controller 'debtor'.
edit
Met behulp van deze functie is het mogelijk om een debiteur te bewerken.
Alleen ingevoerde parameters worden gewijzigd.
Voorbeeldbestand: /voorbeelden/debtor/debtor.edit..php
Invoerparameters:
Veldnaam | Waarde | Omschrijving |
---|---|---|
Identifier | int | De unieke ID van een debiteur |
DebtorCode | string | Het debiteurnummer Geef deze parameter niet mee wanneer het debiteurnummer automatisch bepaald mag worden. |
CompanyName | string | Bedrijfsnaam |
CompanyNumber | string | KvK-nummer |
LegalForm | string | Rechtsvorm, zie variabelen-lijst |
TaxNumber | string | BTW-nummer |
Sex | 'm', 'f', 'd' of 'u' | Geslacht. Standaard: 'm' |
Initials | string | Voornaam |
SurName | string | Achternaam |
Address | string | Adres |
ZipCode | string | Postcode |
City | string | Plaats |
Country | string | Land, zie variabelen-lijst |
EmailAddress | string | E-mailadres |
PhoneNumber | string | Telefoonnummer |
MobileNumber | string | Mobielnummer |
FaxNumber | string | Fax nummer |
Website | string | Website |
Comment | string | Opmerking / commentaar |
InvoiceMethod | int | Factuur verzendmethode, zie variabelen-lijst. Standaard: '0' (per e-mail) |
InvoiceCompanyName | string | Afwijkende facturatiegegevens: bedrijfsnaam |
InvoiceSex | 'm', 'f', 'd' of 'u' | Afwijkende facturatiegegevens: geslacht |
InvoiceInitials | string | Afwijkende facturatiegegevens: voornaam |
InvoiceSurName | string | Afwijkende facturatiegegevens: achternaam |
InvoiceAddress | string | Afwijkende facturatiegegevens: adres |
InvoiceZipCode | string | Afwijkende facturatiegegevens: postcode |
InvoiceCity | string | Afwijkende facturatiegegevens: plaats |
InvoiceCountry | string | Afwijkende facturatiegegevens: land, zie variabelen-lijst |
InvoiceEmailAddress | string | Afwijkende facturatiegegevens: e-mailadres |
InvoiceDataForPriceQuote | 'yes' of 'no' | Gebruik afwijkende facturatiegegevens ook bij offerte |
InvoiceAuthorisation | 'yes' of 'no' | Betalen via automatisch incasso, standaard: 'no' |
AccountNumber | string | Bankrekeningnummer (IBAN) |
AccountName | string | Rekeninghouder |
AccountBank | string | Naam van de bank |
AccountCity | string | Vestigingsplaats bank |
AccountBIC | string | BIC Code |
ActiveLogin | 'yes' of 'no' | Inlog activeren voor klantenpaneel, standaard: 'yes' |
Username | string | Gebruikersnaam |
Password | string | Wachtwoord. Tijdelijk wachtwoord (24 uur geldig). Na inloggen moet de klant een eigen wachtwoord opgeven. |
SecurePassword | string | Gehasht wachtwoord. Gebruik de PHP > 5.5 functie password_hash($password, PASSWORD_BCRYPT); |
Mailing | 'yes' of 'no' | Klant wil mailings ontvangen |
Taxable | auto,yes,no | BTW berekenen: automatisch bepalen, ja, nee |
InvoiceTerm | int | Afwijkende betalingstermijn. |
PeriodicInvoiceDays | '-1' of 'int' | '-1' gebruikt de standaard instellingen |
InvoiceTemplate | int | e-mail factuur template ID |
PriceQuoteTemplate | int | e-mail offerte template ID |
ReminderEmailAddress | string | Afwijkend e-mailadres voor herinneringen en aanmaningen |
ReminderTemplate | int | e-mail herinnering template ID |
SecondReminderTemplate | '-1' of 'int' | '-1' gebruikt de standaard instellingen |
SummationTemplate | int | e-mail aanmaning template ID |
PaymentMail | '-1' of string | '-1' gebruikt de standaard instellingen. Lege string om geen notificatie bij betaling te sturen. Of combinatie van 'auth|wire|order|paid'. |
PaymentMailTemplate | int | e-mail herinnering template ID |
InvoiceCollect | '-1' of 'int' | '-1' gebruikt de standaard instellingen |
DefaultLanguage | 'en_EN' of 'nl_NL' | Taal van het klantenpaneel |
Server | int | ID voorkeursserver |
DNS1 | string | Eigen nameservers: nameserver 1 |
DNS2 | string | Eigen nameservers: nameserver 2 |
DNS3 | string | Eigen nameservers: nameserver 3 |
Groups | array | array met ID's van debiteurgroepen of lege string voor geen debiteurgroepen |
CustomFields | array | array met eigen velden. De key van de array komt overeen met de veldcode, de value met de waarde |
SynchronizeEmail | 'yes' of 'no' | Synchroniseer met onverzonden en openstaande offertes en facturen, standaard: 'no' |
SynchronizeAuth | 'yes' of 'no' | Synchroniseer met onverzonden en openstaande facturen, standaard: 'no' |
SynchronizeAddress | 'yes' of 'no' | Synchroniseer met onverzonden en openstaande offertes en facturen, standaard: 'no' |
SendWelcome | 'yes' of 'no' | Verstuur de welkomstmail, standaard: 'no' |
Voorbeeld invoer:
<?php require_once("../hostfact_api.php"); $api = new HostFactAPI(); $debtorParams = array( 'Identifier' => '1', 'CompanyName' => 'Company Y', 'AccountName' => 'Company Y' ); $response = $api->sendRequest('debtor', 'edit', $debtorParams); print_r_pre($response); ?>
Voorbeeld uitvoer:
Array ( [controller] => debtor [action] => edit [status] => success [date] => 2022-11-24T12:00:00+02:00 [success] => Array ( [0] => Debiteur 'DB0001' is bewerkt ) [debtor] => Array ( [Identifier] => 1 [DebtorCode] => DB0001 [CompanyName] => Company Y [CompanyNumber] => 123456789 [LegalForm] => ANDERS [TaxNumber] => NL123456789B01 [Sex] => m [Initials] => John [SurName] => Jackson [Address] => Keizersgracht 100 [ZipCode] => 1015 AA [City] => Amsterdam [Country] => NL [EmailAddress] => info@company.com [PhoneNumber] => 010 - 22 33 44 [MobileNumber] => [FaxNumber] => [Website] => [Comment] => [InvoiceMethod] => 0 [InvoiceCompanyName] => [InvoiceSex] => m [InvoiceInitials] => [InvoiceSurName] => [InvoiceAddress] => [InvoiceZipCode] => [InvoiceCity] => [InvoiceCountry] => NL [InvoiceEmailAddress] => [ReminderEmailAddress] => [InvoiceAuthorisation] => no [MandateID] => [InvoiceDataForPriceQuote] => no [AccountNumber] => NL59RABO0123123123 [AccountBIC] => RABONL2U [AccountName] => Company Y [AccountBank] => Rabobank [AccountCity] => Amsterdam [ActiveLogin] => yes [Username] => DB0001 [SecurePassword] => [Mailing] => yes [Taxable] => auto [PeriodicInvoiceDays] => -1 [InvoiceTemplate] => 0 [PriceQuoteTemplate] => 0 [ReminderTemplate] => 0 [SecondReminderTemplate] => -1 [SummationTemplate] => 0 [PaymentMail] => -1 [PaymentMailTemplate] => 0 [InvoiceCollect] => -1 [DefaultLanguage] => [ClientareaProfile] => 0 [Groups] => Array ( [4] => Array ( [id] => 4 [GroupName] => Hosting clients ) ) [Created] => 2022-11-24 11:00:00 [Modified] => 2022-11-24 11:00:00 [Translations] => Array ( [LegalForm] => Anders of onbekend [Country] => Nederland [InvoiceMethod] => Per e-mail [InvoiceCountry] => Nederland [Taxable] => Automatisch [DefaultLanguage] => ) ) )