HostFact API versie 3.1
Facturen
Facturen zijn te beheren via de controller 'invoice'.
list
Middels deze functie kunt u een lijst met facturen ophalen die voldoen aan de meegegeven parameters.
Voorbeeldbestand: /voorbeelden/invoice/invoice.list.php
Invoerparameters:
| Veldnaam | Waarde | Omschrijving |
|---|---|---|
| status | string | Factuur status, zie variabelen-lijst |
| offset | int | Standaard: 0 |
| limit | int | Standaard: 1000 |
| sort | string | Standaard: InvoiceCode |
| order | 'ASC' of 'DESC' | Standaard: DESC |
| searchat | string | Welke velden doorzocht moeten worden. Standaard: InvoiceCode|CompanyName|SurName |
| searchfor | string | Zoekterm |
| created | filter_datetime | Filtermogelijkheid op aanmaakdatum |
| modified | filter_datetime | Filtermogelijkheid op wijzigingsdatum |
| date | filter_date | Filtermogelijkheid op factuurdatum |
| paybefore | filter_date | Filtermogelijkheid op uiterste betaaldatum |
| paydate | filter_date | Filtermogelijkheid op betaaldatum |
Voorbeeld invoer:
<?php
require_once("../hostfact_api.php");
$api = new HostFactAPI();
$invoiceParams = array(
// Example: search for all invoices on date 2014-05-13
//'searchat' => 'Date',
//'searchfor' => '2014-05-13'
);
$response = $api->sendRequest('invoice', 'list', $invoiceParams);
print_r_pre($response);
?>Voorbeeld uitvoer:
Array
(
[controller] => invoice
[action] => list
[status] => success
[date] => 2022-11-24T12:00:00+02:00
[totalresults] => 5
[currentresults] => 5
[offset] => 0
[invoices] => Array
(
[0] => Array
(
[Identifier] => 1
[InvoiceCode] => [concept]0001
[Debtor] => 1
[DebtorCode] => DB0001
[CompanyName] => Company X
[Initials] => John
[SurName] => Jackson
[AmountExcl] => 150.00
[AmountIncl] => 181.50
[AmountOpen] => 0
[Date] => 2018-01-14
[Status] => 0
[SubStatus] =>
[Authorisation] => no
[Modified] => 2022-11-24 11:00:00
)
[1] => Array
(
[Identifier] => 4
[InvoiceCode] => F0003
[Debtor] => 1
[DebtorCode] => DB0001
[CompanyName] => Company X
[Initials] => John
[SurName] => Jackson
[AmountExcl] => 10.00
[AmountIncl] => 12.10
[AmountOpen] => 0
[Date] => 2018-01-14
[Status] => 4
[SubStatus] =>
[Authorisation] => no
[Modified] => 2022-11-24 11:00:00
)
[2] => Array
(
[Identifier] => 3
[InvoiceCode] => F0002
[Debtor] => 1
[DebtorCode] => DB0001
[CompanyName] => Company X
[Initials] => John
[SurName] => Jackson
[AmountExcl] => 500.00
[AmountIncl] => 605.00
[AmountOpen] => 605.00
[Date] => 2018-01-14
[Status] => 2
[SubStatus] => PAUSED
[Authorisation] => no
[Modified] => 2022-11-24 11:00:00
)
[3] => Array
(
[Identifier] => 2
[InvoiceCode] => F0001
[Debtor] => 1
[DebtorCode] => DB0001
[CompanyName] => Company X
[Initials] => John
[SurName] => Jackson
[AmountExcl] => 165.00
[AmountIncl] => 199.65
[AmountOpen] => 199.65
[Date] => 2018-01-11
[Status] => 2
[SubStatus] =>
[Authorisation] => no
[Modified] => 2022-11-24 11:00:00
)
[4] => Array
(
[Identifier] => 5
[InvoiceCode] => F0000
[Debtor] => 1
[DebtorCode] => DB0001
[CompanyName] => Company X
[Initials] => John
[SurName] => Jackson
[AmountExcl] => 10.00
[AmountIncl] => 12.10
[AmountOpen] => 12.10
[Date] => 2018-01-01
[Status] => 2
[SubStatus] =>
[Authorisation] => no
[Modified] => 2022-11-24 11:00:00
)
)
)