HostFact API versie 3.1
Overige diensten
Overige diensten zijn te beheren via de controller 'service'.
terminate
Middels deze functie kunt u een overige dienst opzeggen/beeindigen.
Voorbeeldbestand: /voorbeelden/service/service.terminate.php
Invoerparameters:
| Veldnaam | Waarde | Omschrijving |
|---|---|---|
| Identifier | int | De unieke ID van een overige dienst |
| Date | date | De datum waarop de dienst opgezegd wordt |
| Reason | text | Reden van opzegging |
Voorbeeld invoer:
<?php
require_once("../hostfact_api.php");
$api = new HostFactAPI();
$serviceParams = array(
'Identifier' => '1',
//'Date' => '2015-01-01', // Date of termination
);
$response = $api->sendRequest('service', 'terminate', $serviceParams);
print_r_pre($response);
?>Voorbeeld uitvoer:
Array
(
[controller] => service
[action] => terminate
[status] => success
[date] => 2022-11-24T12:00:00+02:00
[success] => Array
(
[0] => Dienst is opgezegd met opzegdatum 14-01-2023
)
[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] => 1
[Periodic] => m
[StartPeriod] => 2018-03-14
[EndPeriod] => 2018-04-14
[NextDate] => 2018-02-28
[ContractPeriods] => 1
[ContractPeriodic] => m
[StartContract] => 2018-01-14
[EndContract] => 2018-08-14
[TerminationDate] => 2023-01-14
[Reminder] =>
[InvoiceAuthorisation] => yes
[AmountExcl] => 250
[AmountIncl] => 302.5
)
[Termination] => Array
(
[Date] => 2023-01-14
[Created] => 2022-11-24 11:00:00
[Status] => pending
)
[Created] => 2022-11-24 11:00:00
[Modified] => 2022-11-24 11:00:00
)
)