WeFact Hosting API versie 2.7



Hosting

Hostingaccounts zijn te beheren via de controller 'hosting'.



list

Middels deze functie kunt u een lijst met hosting accounts ophalen die voldoen aan de meegegeven parameters.
Voorbeeldbestand: /voorbeelden/hosting/hosting.list.php


Invoerparameters:
Veldnaam Waarde Omschrijving
status string Hosting account status, zie variabelen-lijst
offset int Standaard: 0
limit int Standaard: 1000
sort string Standaard: Username
order 'ASC' of 'DESC' Standaard: ASC
searchat string Welke velden doorzocht moeten worden.
Standaard: Username|Domain
searchfor string Zoekterm
created filter_datetime Filtermogelijkheid op aanmaakdatum
modified filter_datetime Filtermogelijkheid op wijzigingsdatum

Voorbeeld invoer:
<?php

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

$api = new WeFactAPI();

$hostingParams = array(
				// Get all hosting accounts of customer DB0001
				'searchat'		=> 'DebtorCode',
				'searchfor' 	=> 'DB0001'
);

$response = $api->sendRequest('hosting', 'list', $hostingParams);

print_r_pre($response);

?>

Voorbeeld uitvoer:
Array
(
    [controller] => hosting
    [action] => list
    [status] => success
    [date] => 2016-09-01T12:00:00+02:00
    [totalresults] => 4
    [currentresults] => 4
    [offset] => 0
    [filters] => Array
        (
            [searchat] => DebtorCode
            [searchfor] => DB0001
        )

    [hosting] => Array
        (
            [0] => Array
                (
                    [Identifier] => 3
                    [Username] => activeaccount
                    [Debtor] => 1
                    [DebtorCode] => DB0001
                    [CompanyName] => Company X
                    [Initials] => John
                    [SurName] => Jackson
                    [Domain] => activedomain.com
                    [Server] => 1
                    [Name] => Example server
                    [Package] => 1
                    [PackageName] => Hosting small
                    [Status] => 4
                    [Subscription] => Array
                        (
                            [ProductCode] => P002
                            [Description] => Hosting small
                            [Number] => 1
                            [PriceExcl] => 25
                            [TaxPercentage] => 21
                            [DiscountPercentage] => 0
                            [Periods] => 1
                            [Periodic] => m
                            [StartPeriod] => 2016-10-14
                            [EndPeriod] => 2016-11-14
                            [NextDate] => 2016-09-30
                            [TerminationDate] => 
                            [AmountExcl] => 25
                            [AmountIncl] => 30.25
                        )

                    [Modified] => 2016-09-01 12:00:00
                )

            [1] => Array
                (
                    [Identifier] => 2
                    [Username] => example
                    [Debtor] => 1
                    [DebtorCode] => DB0001
                    [CompanyName] => Company X
                    [Initials] => John
                    [SurName] => Jackson
                    [Domain] => example.com
                    [Server] => 1
                    [Name] => Example server
                    [Package] => 1
                    [PackageName] => Hosting small
                    [Status] => 1
                    [Subscription] => Array
                        (
                            [ProductCode] => P002
                            [Description] => Hosting small
                            [Number] => 1
                            [PriceExcl] => 25
                            [TaxPercentage] => 21
                            [DiscountPercentage] => 0
                            [Periods] => 1
                            [Periodic] => m
                            [StartPeriod] => 2016-10-14
                            [EndPeriod] => 2016-11-14
                            [NextDate] => 2016-09-30
                            [TerminationDate] => 
                            [AmountExcl] => 25
                            [AmountIncl] => 30.25
                        )

                    [Modified] => 2016-09-01 12:00:00
                )

            [2] => Array
                (
                    [Identifier] => 1
                    [Username] => examplesite
                    [Debtor] => 1
                    [DebtorCode] => DB0001
                    [CompanyName] => Company X
                    [Initials] => John
                    [SurName] => Jackson
                    [Domain] => example-site.com
                    [Server] => 1
                    [Name] => Example server
                    [Package] => 1
                    [PackageName] => Hosting small
                    [Status] => 4
                    [Subscription] => Array
                        (
                            [ProductCode] => P001
                            [Description] => Default product
                            [Number] => 1
                            [PriceExcl] => 250
                            [TaxPercentage] => 21
                            [DiscountPercentage] => 0
                            [Periods] => 1
                            [Periodic] => m
                            [StartPeriod] => 2016-10-14
                            [EndPeriod] => 2016-11-14
                            [NextDate] => 2016-09-30
                            [TerminationDate] => 
                            [AmountExcl] => 250
                            [AmountIncl] => 302.5
                        )

                    [Modified] => 2016-09-01 12:00:00
                )

            [3] => Array
                (
                    [Identifier] => 4
                    [Username] => suspendedaccount
                    [Debtor] => 1
                    [DebtorCode] => DB0001
                    [CompanyName] => Company X
                    [Initials] => John
                    [SurName] => Jackson
                    [Domain] => suspendedaccount.com
                    [Server] => 1
                    [Name] => Example server
                    [Package] => 1
                    [PackageName] => Hosting small
                    [Status] => 5
                    [Subscription] => Array
                        (
                            [ProductCode] => P002
                            [Description] => Hosting small
                            [Number] => 1
                            [PriceExcl] => 25
                            [TaxPercentage] => 21
                            [DiscountPercentage] => 0
                            [Periods] => 1
                            [Periodic] => m
                            [StartPeriod] => 2016-10-14
                            [EndPeriod] => 2016-11-14
                            [NextDate] => 2016-09-30
                            [TerminationDate] => 
                            [AmountExcl] => 25
                            [AmountIncl] => 30.25
                        )

                    [Modified] => 2016-09-01 12:00:00
                )

        )

)