HostFact API versie 3.1



SSL certificaten

SSL certificaten zijn te beheren via de controller 'ssl'.



add

Middels deze functie is het mogelijk een SSL certificaat toe te voegen.
Voorbeeldbestand: /voorbeelden/ssl/ssl.add.php


Invoerparameters:
Veldnaam Waarde Omschrijving
CommonName string De domeinnaam
Debtor int De unieke ID van een debiteur
DebtorCode string Het debiteurnummer
SSLTypeID int De unieke ID van een SSL product
OwnerHandle int De unieke ID van een houder
AdminHandle int De unieke ID van een administratief contact
TechHandle int De unieke ID van een technisch contact
Type 'domain', 'extended' of 'organization' Type van het SSL certificaat. Standaard: domain
MultiDomainRecords array Als het SSL product meerdere domeinnamen ondersteunt, geef dan hier de extra domeinnamen op
ApproverEmail string Approver e-mailadres
CSR string CSR
ServerSoftware 'linux' of 'windows' Server OS. Standaard: 'linux'
Period int Periode in jaren
RequestDate date Aanvraagdatum
RenewDate date Verloopdatum
Comment string Commentaar
Status string SSL certificaat status, zie variabelen-lijst.
Standaard: 'waiting' (wachten op actie)
HasSubscription 'yes' of 'no' Dienst factureren (abonnement)? Standaard: 'no'
Subscription array Abonnement:
- ProductCode string     Het productnummer
- Description text     Omschrijving
- PriceExcl float     Prijs per stuk (excl. BTW)
- TaxPercentage int     BTW percentage: 0 - 100
- DiscountPercentage float     Korting abonnement, percentage: 0 - 100
- Periods int     Factureer iedere: aantal periodes
- Periodic string     Factureer iedere: eenheid, zie variabelen-lijst
- StartPeriod date     Startdatum van de periode
- ContractPeriods int     Afwijkende contractperiode. Aantal van de
    frequentie eenheid 'ContractPeriodic'
- ContractPeriodic string     Afwijkende contractperiode. Frequentie eenheid,
    zie variabelen-lijst
- StartContract date     Startdatum afwijkende contractperiode
- EndContract date     Einddatum afwijkende contractperiode
- TerminationDate date     De datum waarop het abonnement opgezegd wordt
- Reminder 'yes', 'no' of ''     E-mail bij nieuwe facturatie van abonnement?
    Standaard: '' (Algemene instelling overnemen)
- InvoiceAuthorisation 'yes' of 'no'     Automatische incasso?
    Standaard: 'yes' = voorkeur debtor
- AutoRenew 'yes', 'no' of 'once'     Automatisch factureren? Ja / nee of eenmalig
    ivm handmatige verlenging van het certificaat wat plaats
    dient te vinden.
Verplichte velden: Debtor of DebtorCode, CommonName, SSLTypeID en Period
Bij facturatie (HasSubscription = yes): ProductCode of bij geen ProductCode zijn Description en PriceExcl verplicht

Voorbeeld invoer:
<?php

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

$api = new HostFactAPI();

$sslParams = array(
		'DebtorCode' 		=> 'DB0001',
        'CommonName' 		=> 'example.com',
        'Period' 		    => '1',
        
        'SSLTypeID'         => '1',

		'HasSubscription' 	=> 'yes',
		'Subscription'		=> array(
								'ProductCode'	=> 'P004'
								)
		
);

$response = $api->sendRequest('ssl', 'add', $sslParams);

print_r_pre($response);

?>

Voorbeeld uitvoer:
Array
(
    [controller] => ssl
    [action] => add
    [status] => success
    [date] => 2022-11-24T12:00:00+02:00
    [ssl] => Array
        (
            [Identifier] => 4
            [CommonName] => example.com
            [Debtor] => 1
            [DebtorCode] => DB0001
            [Registrar] => 1
            [SSLTypeID] => 1
            [OwnerHandle] => 1
            [AdminHandle] => 1
            [TechHandle] => 1
            [Type] => domain
            [Wildcard] => no
            [MultiDomain] => yes
            [MultiDomainRecords] => Array
                (
                )

            [ApproverEmail] => 
            [CSR] => 
            [ServerSoftware] => linux
            [Period] => 1
            [RequestDate] => 
            [RenewDate] => 
            [RegistrarReference] => 
            [Comment] => 
            [Status] => waiting
            [Created] => 2022-11-24 11:00:00
            [Modified] => 2022-11-24 11:00:00
            [Subscription] => Array
                (
                    [Number] => 1
                    [NumberSuffix] => 
                    [ProductCode] => P004
                    [Description] => SSL certificate
                    [PriceExcl] => 50
                    [PriceIncl] => 60.5
                    [TaxPercentage] => 21
                    [DiscountPercentage] => 0
                    [Periods] => 1
                    [Periodic] => j
                    [StartPeriod] => 2022-11-24
                    [EndPeriod] => 2023-11-24
                    [NextDate] => 2022-11-10
                    [ContractPeriods] => 1
                    [ContractPeriodic] => j
                    [StartContract] => 2022-11-24
                    [EndContract] => 2023-11-24
                    [TerminationDate] => 
                    [Reminder] => 
                    [InvoiceAuthorisation] => yes
                    [AmountExcl] => 50
                    [AmountIncl] => 60.5
                    [AutoRenew] => once
                )

            [SSLProductInfo] => Array
                (
                    [Name] => SSL dummy product
                    [Brand] => SSLs
                    [TemplateName] => 
                    [Product] => 4
                    [Periods] => Array
                        (
                            [0] => 1
                            [1] => 2
                            [2] => 3
                        )

                    [Type] => domain
                    [Wildcard] => no
                    [MultiDomain] => yes
                    [MultiDomainIncluded] => 4
                    [MultiDomainMax] => 10
                )

            [RegistrarInfo] => Array
                (
                    [Identifier] => 1
                    [Class] => registrarclass
                    [Name] => Example registrar
                    [Testmode] => 1
                    [DefaultDNSTemplate] => 0
                    [AdminHandle] => 0
                    [TechHandle] => 0
                )

        )

)