Abonnementen
Abbonnementen zijn te beheren via de controller 'subscription'.
terminate
Middels deze functie kunt u een overige dienst opzeggen/beeindigen.
Door 'TerminationDate' als lege parameter mee te geven maakt u een opzegging ongedaan. Het aantal keer dat het abonnement gefactureerd is wordt met deze actie gereset naar 0.
Invoerparameters:
| Veldnaam | Waarde | Omschrijving |
|---|---|---|
| Identifier | int | De unieke ID van een overige dienst |
| Subscription | array | Abonnementsregel: |
| - TerminationDate | date | De datum waarop het abonnement opgezegd is |
| - TerminateAfter | int | Aantal keer dat het abonnement gefactureerd moet worden. 0 = onbepaalde duur. |
Voorbeeld invoer:
$parameters = [
"Identifier" => 1,
"Subscription" => [
"TerminationDate" => "2025-01-01"
]
];
$api->sendRequest('subscription', 'terminate', $parameters);
Voorbeeld uitvoer:
Array
(
[controller] => subscription
[action] => terminate
[status] => success
[date] => 2024-01-21T12:00:00+02:00
[success] => Array
(
[0] => Abonnement 'Service contract' is opgezegd per 01-01-2025
)
[subscription] => Array
(
[Identifier] => 1
[Debtor] => 1
[DebtorCode] => DB10000
[Number] => 1
[NumberSuffix] =>
[ProductCode] => P0001
[Description] => Service contract
[PriceExcl] => 150
[PriceIncl] => 181.5
[Currency] => EUR
[TaxCode] => V21
[TaxPercentage] => 21
[DiscountPercentage] => 0
[Periods] => 1
[Periodic] => m
[StartDate] => 2024-09-30
[EndDate] => 2024-10-29
[StartPeriod] => 2024-09-30
[EndPeriod] => 2024-10-30
[NextDate] => 2024-09-30
[Comment] =>
[TerminateAfter] => 0
[TerminationDate] => 2025-01-01
[AmountExcl] => 150
[AmountIncl] => 181.5
[DirectDebit] => client
[DiscountAmountExcl] => 0
[DiscountAmountIncl] => 0
[Created] => 2024-01-21 11:00:00
[Modified] => 2024-01-21 11:00:00
)
)