HostFact API versie 3.1



Facturen

Facturen zijn te beheren via de controller 'invoice'.



invoiceline add

Middels deze functie voegt u een factuurregel toe aan een bestaande factuur. Deze functie is beschikbaar voor een factuur in alle statussen.
Voorbeeldbestand: /voorbeelden/invoice/invoiceline.add.php


Invoerparameters:
Veldnaam Waarde Omschrijving
Identifier int De unieke ID van een factuur
InvoiceCode string Het factuurnummer
InvoiceLines array Factuurregel:
- Date date     Datum. Standaard: vandaag
- Number float     Aantal. Standaard: 1
- NumberSuffix string     Eenheid bijvoorbeeld: uur
- ProductCode string     Productnummer
- Description text     Omschrijving
- PriceExcl float     Prijs per stuk (excl. BTW)
- DiscountPercentage float     Korting factuurregel, percentage: 0 - 100
- TaxPercentage float     BTW percentage: 0 - 100
- PeriodicType 'period' of 'once'     Periodiek factureren?
    Standaard: 'once' (eenmalig)
- Periods int     Factureer iedere: aantal periodes
- Periodic string     Factureer iedere: eenheid, zie variabelen-lijst
- StartPeriod date     Startdatum van de periode
- ProductType string     Gekoppelde dienst: domain, hosting of ssl.
    Standaard: leeg
- Reference int     Het kenmerk van de gekoppelde dienst
Verplichte velden: Identifier of InvoiceCode en InvoiceLines (minimaal 1)

Voorbeeld invoer:
<?php

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

$api = new HostFactAPI();

$invoiceLineParams = array(
					'InvoiceCode' 		=> 'F0001',
					
					'InvoiceLines' 		=> array(
						array(
							'Description'	=> 'Additional fee',
							'PriceExcl'		=> 50
						)
					)
);

$response = $api->sendRequest('invoiceLine', 'add', $invoiceLineParams);

print_r_pre($response);

?>

Voorbeeld uitvoer: