HostFact API versie 3.1



Debiteuren

Debiteuren zijn te beheren via de controller 'debtor'.



updatelogincredentials

Middels deze functie is het mogelijk het wachtwoord te resetten van een debiteur.
LET OP: alleen beschikbaar wanneer het nieuwe klantenpaneel actief is.

Wanneer u zelf de login voor uw klanten verzorgt, gebruik dan SecurePassword (met PHP functie: password_hash) als definitief wachtwoord en Password (decodeerbaar) als tijdelijk wachtwoord. Vraag klanten om een nieuw wachtwoord na een wachtwoord reset en voeg dit toe als SecurePassword, zie debtor.edit.

Voorbeeldbestand: /voorbeelden/debtor/debtor.updatelogincredentials.php


Invoerparameters:
Veldnaam Waarde Omschrijving
Username string Gebruikersnaam van klantenpaneel
EmailAddress string E-mailadres
NewUsername int Nieuwe gebruikersnaam voor het klantenpaneel.
Password string Tijdelijk wachtwoord (24 uur geldig). Geef dit mee als u het wachtwoord wil resetten.
SendPasswordForgotEmail 'yes' or 'no' Stuur de klant een e-mail met de inloggevens, standaard: 'no'. Gebruikt de e-mail template zoals ingesteld bij de klantenpaneel instellingen.
Verplichte velden: Username en EmailAddress

Voorbeeld invoer:
<?php

require_once("../hostfact_api.php");

$api = new HostFactAPI();

$debtorParams = array(
	'Username'                => 'DB0001',
	'EmailAddress'            => 'info@company.com',
	'Password'                => 'newpassword',
	'SendPasswordForgotEmail' => 'yes',

);

$response = $api->sendRequest('debtor', 'updatelogincredentials', $debtorParams);

print_r_pre($response);

?>

Voorbeeld uitvoer:
Array
(
    [controller] => debtor
    [action] => updatelogincredentials
    [status] => success
    [date] => 2022-11-24T12:00:00+02:00
    [success] => Array
        (
            [0] => De e-mail met inloggegevens is verzonden naar: info@company.com
            [1] => De inloggegevens voor debiteur 'DB0001' zijn gewijzigd
        )

    [debtor] => Array
        (
            [Identifier] => 1
            [DebtorCode] => DB0001
            [CompanyName] => Company X
            [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 X
            [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] => 
                )

        )

)