move_wbk()

Move a website builder (WBK).

All API functions Website Builder

Signature

move_wbk(array $parameters): mixed

Parameters

Pass these parameters as KasRequestParams. Every request also requires kas_login, kas_auth_type, and kas_auth_data, as shown in SOAP with PHP.

Name Description Requirement
wbk_login The website builder to move Required
source_account The source account Required
target_account The target account Required
adjust_resources Y = adjust limits automatically if the target account has no free website builder left (optional, default N). Only the full accounts from the target account upwards are increased until an account has free capacity. If no account up to the common parent account of source and target has free capacity, the limits of the source account and its parent accounts up to that point are reduced by 1. If the target account has free capacity, nothing is changed. Optional Default: N

PHP example

<?php

// $sessionToken is returned by KasAuth, see SOAP with PHP.
$parameters = [
    'wbk_login' => 'wbk0123456',
    'source_account' => 'w000XXXX',
    'target_account' => 'w000YYYY',
];

try {
    $client = new SoapClient('https://kasapi.kasserver.com/soap/wsdl/KasApi.wsdl');
    $response = $client->KasApi(json_encode([
        'kas_login' => 'w0123456',
        'kas_auth_type' => 'session',
        'kas_auth_data' => $sessionToken,
        'kas_action' => 'move_wbk',
        'KasRequestParams' => $parameters,
    ]));
    print_r($response);
} catch (SoapFault $fault) {
    echo 'Error: ' . $fault->faultstring;
}

Responses and error codes

  • TRUE the action was carried out
  • missing_parameter a required parameter is missing
  • wbk_login_syntax_incorrect
  • target_is_equal_to_source
  • account_doesnt_belong_to_you
  • account_is_on_different_server
  • target_is_dummyaccount
  • wbk_login_not_found
  • wbk_login_in_use the website builder is still assigned to a domain or subdomain
  • max_wbk_for_subaccount_gt_change_value only without adjust_resources=Y
  • couldnt_get_kas_ressources only with adjust_resources=Y
  • adjust_resources_unlimited_on_path only with adjust_resources=Y: an affected account has unlimited resources
  • adjust_resources_exceeded_on_path only with adjust_resources=Y: an affected account uses more than it is allowed to
  • adjust_resources_limit_below_zero only with adjust_resources=Y: a limit would fall below 0
  • adjust_resources_failed only with adjust_resources=Y: the limits could not be set, nothing was moved
  • adjust_resources_rollback_failed only with adjust_resources=Y: the limits could not be reset after an error
  • couldnt_move_wbk only without adjust_resources=Y: the website builder could not be moved, nothing was changed