HostFact API versie 3.1



Overige diensten

Overige diensten zijn te beheren via de controller 'service'.



edit

Met behulp van deze functie is het mogelijk om een overige dienst te bewerken.
Alleen ingevoerde parameters worden gewijzigd.
Voorbeeldbestand: /voorbeelden/service/service.edit.php


Invoerparameters:
Veldnaam Waarde Omschrijving
Identifier int De unieke ID van een overige dienst
Debtor int De unieke ID van een debiteur
DebtorCode string Het debiteurnummer
Subscription array Abonnementsregel:
- Number float     Aantal. Standaard: 1
- NumberSuffix string     Eenheid bijvoorbeeld: uur
- ProductCode string     Het productnummer
- Description text     Omschrijving
- PriceExcl float     Prijs per stuk (excl. BTW)
- TaxPercentage int     BTW percentage: 0 - 100
- DiscountPercentage float     Korting abonnement, percentage: 0 - 100
- Periods int     Factureer iedere: aantal periodes
- Periodic string     Factureer iedere: eenheid, zie variabelen-lijst
- StartPeriod date     Startdatum van de periode
- ContractPeriods int     Afwijkende contractperiode. Aantal van de
    frequentie eenheid 'ContractPeriodic'
- ContractPeriodic string     Afwijkende contractperiode. Frequentie eenheid,
    zie variabelen-lijst
- StartContract date     Startdatum afwijkende contractperiode
- EndContract date     Einddatum afwijkende contractperiode
- TerminationDate date     De datum waarop het abonnement opgezegd wordt
- Reminder 'yes', 'no' of ''     E-mail bij nieuwe facturatie van abonnement?
    Standaard: '' = Algemene instelling overnemen)
- InvoiceAuthorisation 'yes' of 'no'     Automatische incasso?
    Standaard: 'yes' = voorkeur debtor
Verplichte velden: Identifier

Voorbeeld invoer:
<?php

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

$api = new HostFactAPI();

$serviceParams = array(
						'Identifier'	=> '1',

						'Subscription'		=> array(
												//'PriceExcl' 	=> 10,
												'Periods' 		=> 2,
												//'Periodic' 		=> 'm'
												)
);

$response = $api->sendRequest('service', 'edit', $serviceParams);

print_r_pre($response);

?>

Voorbeeld uitvoer:
Array
(
    [controller] => service
    [action] => edit
    [status] => success
    [date] => 2022-11-24T12:00:00+02:00
    [service] => Array
        (
            [Identifier] => 1
            [Debtor] => 1
            [DebtorCode] => DB0001
            [Status] => active
            [Subscription] => Array
                (
                    [Number] => 1
                    [NumberSuffix] => 
                    [ProductCode] => P001
                    [Description] => Default product
                    [PriceExcl] => 250
                    [PriceIncl] => 302.5
                    [TaxPercentage] => 21
                    [DiscountPercentage] => 0
                    [Periods] => 2
                    [Periodic] => m
                    [StartPeriod] => 2018-03-14
                    [EndPeriod] => 2018-05-14
                    [NextDate] => 2018-02-28
                    [ContractPeriods] => 2
                    [ContractPeriodic] => m
                    [StartContract] => 2018-01-14
                    [EndContract] => 2018-08-14
                    [TerminationDate] => 
                    [Reminder] => 
                    [InvoiceAuthorisation] => yes
                    [AmountExcl] => 500
                    [AmountIncl] => 605
                )

            [Created] => 2022-11-24 11:00:00
            [Modified] => 2022-11-24 11:00:00
        )

)