HostFact API versie 3.1
Facturen
Facturen zijn te beheren via de controller 'invoice'.
invoiceline delete
Middels deze functie verwijdert u een factuurregel van een bestaande factuur. Deze functie is beschikbaar voor een factuur in alle statussen.
Voorbeeldbestand: /voorbeelden/invoice/invoiceline.delete.php
Invoerparameters:
| Veldnaam | Waarde | Omschrijving |
|---|---|---|
| Identifier | int | De unieke ID van een factuur |
| InvoiceCode | string | Het factuurnummer |
| InvoiceLines | array | Factuurregel: |
| - Identifier | int | De unieke ID van een factuurregel |
Voorbeeld invoer:
<?php
require_once("../hostfact_api.php");
$api = new HostFactAPI();
$invoiceLineParams = array(
'InvoiceCode' => 'F0001',
'InvoiceLines' => array(
array(
'Identifier' => 3
)
)
);
$response = $api->sendRequest('invoiceline', 'delete', $invoiceLineParams);
print_r_pre($response);
?>Voorbeeld uitvoer:
Array
(
[controller] => invoiceline
[action] => delete
[status] => success
[date] => 2022-11-24T12:00:00+02:00
[success] => Array
(
[0] => Er zijn 1 factuurregels verwijderd
)
[invoice] => Array
(
[Identifier] => 2
[InvoiceCode] => F0001
[Debtor] => 1
[DebtorCode] => DB0001
[Status] => 2
[SubStatus] =>
[Date] => 2018-01-11
[Term] => 14
[PayBefore] => 2018-01-25
[PaymentURL] => http://company.com/klantenpaneel/betalen/?payment=F0001&key=cd97244a5420777c6802ff983c8a8081
[AmountExcl] => 15.00
[AmountTax] => 3.15
[AmountIncl] => 18.15
[TaxRate] => 0
[Compound] => no
[AmountPaid] => 0.00
[Discount] => 0
[VatCalcMethod] => excl
[IgnoreDiscount] => no
[Coupon] =>
[ReferenceNumber] =>
[CompanyName] => Company X
[TaxNumber] => NL123456789B01
[Sex] => m
[Initials] => John
[SurName] => Jackson
[Address] => Keizersgracht 100
[ZipCode] => 1015 AA
[City] => Amsterdam
[Country] => NL
[EmailAddress] => info@company.com
[InvoiceMethod] => 0
[Template] => 1
[SentDate] =>
[Sent] => 0
[Reminders] => 0
[ReminderDate] =>
[Summations] => 0
[SummationDate] =>
[Authorisation] => no
[PaymentMethod] =>
[PayDate] =>
[TransactionID] =>
[Description] =>
[Comment] =>
[InvoiceLines] => Array
(
[0] => Array
(
[Identifier] => 4
[Date] => 2018-01-14
[Number] => 1
[NumberSuffix] =>
[ProductCode] => P003
[Description] => Domain example.com
[PriceExcl] => 15
[DiscountPercentage] => 0
[DiscountPercentageType] => line
[TaxPercentage] => 21
[PeriodicID] => 7
[Periods] => 1
[Periodic] => j
[StartPeriod] => 2018-01-14
[EndPeriod] => 2018-01-14
[ProductType] =>
[Reference] => 0
[NoDiscountAmountIncl] => 18.15
[NoDiscountAmountExcl] => 15
[DiscountAmountIncl] => 0
[DiscountAmountExcl] => 0
)
)
[Created] => 2022-11-24 11:00:00
[Modified] => 2022-11-24 11:00:00
[Attachments] => Array
(
[0] => Array
(
[Identifier] => 4
[Filename] => sample.pdf
)
)
[Translations] => Array
(
[Status] => Verzonden
[Country] => Nederland
[InvoiceMethod] => Per e-mail
[Template] => Factuur
[PaymentMethod] =>
)
[AmountDiscount] => 0
[AmountDiscountIncl] => 0
[UsedTaxrates] => Array
(
[0.21] => Array
(
[AmountExcl] => 15
[AmountTax] => 3.15
[AmountIncl] => 18.15
)
)
)
)