Ascio Web Service v2

PHP 5 Classes CreateOrder - Contact_Update

Replaces the contact with a new handle. There are 2 ways to submit the new Registrant:

  • Submit a Handle-ID. The handle linked to the domain will be replaced
  • Submit new data. A new handle will be created. The handle linked to the domain will be replaced

With the Contact Update, it is possible to change Tech Contact, Admistrative Contact and Billing Contact in one request.

Response CreateOrder(string $sessionId,Order $order)

Response codes

ResultCodeMessageValue
200Order validated
200Order received
400Order not validatedMessages
401Authorization failed
405Access denied

CreateOrder Request

PropertyDescription
sessionIdExample: o58t9fjgw9bjarp6q7byv13e
order

CreateOrderResponse

Property
CreateOrderResult
order
PropertyValue
OrderTypeContact_Update

PHP 5 Classes example

<?php
namespace ascio\v2\examples;
require(__DIR__."/../service/autoload.php");
require(__DIR__."/../../lib/AscioConfig.php");
use ascio\v2 as ascio;
use ascio\lib as lib;
function contact_UpdateExample() {
	$config = new lib\Config();
	$env = $config->get("testing"); //testing or live
	$sessionId = "12345";
	$ascioClient	 = new ascio\AscioServices(array("trace" => true),$env->getWsdl("v2"));

	$adminContact =  new ascio\Contact();
	$adminContact->setStatus("StatusTest");
	$adminContact->setHandle("JD123");
	$adminContact->setFirstName("John");
	$adminContact->setLastName("Doe");
	$adminContact->setOrgName("Ascio");
	$adminContact->setAddress1("Address1Test");
	$adminContact->setAddress2("Address2Test");
	$adminContact->setPostalCode("888349");
	$adminContact->setCity("CityTest");
	$adminContact->setState("StateTest");
	$adminContact->setCountryCode("DK");
	$adminContact->setEmail($config->getEmail());
	$adminContact->setPhone("+45.123456789");
	$adminContact->setFax("+45.987654321");
	$adminContact->setType("owner");
	$adminContact->setDetails("DetailsTest");
	$adminContact->setOrganisationNumber("OrganisationNumberTest");

	$techContact =  new ascio\Contact();
	$techContact->setStatus("StatusTest");
	$techContact->setHandle("JD123");
	$techContact->setFirstName("John");
	$techContact->setLastName("Doe");
	$techContact->setOrgName("Ascio");
	$techContact->setAddress1("Address1Test");
	$techContact->setAddress2("Address2Test");
	$techContact->setPostalCode("888349");
	$techContact->setCity("CityTest");
	$techContact->setState("StateTest");
	$techContact->setCountryCode("DK");
	$techContact->setEmail($config->getEmail());
	$techContact->setPhone("+45.123456789");
	$techContact->setFax("+45.987654321");
	$techContact->setType("owner");
	$techContact->setDetails("DetailsTest");
	$techContact->setOrganisationNumber("OrganisationNumberTest");

	$billingContact =  new ascio\Contact();
	$billingContact->setStatus("StatusTest");
	$billingContact->setHandle("JD123");
	$billingContact->setFirstName("John");
	$billingContact->setLastName("Doe");
	$billingContact->setOrgName("Ascio");
	$billingContact->setAddress1("Address1Test");
	$billingContact->setAddress2("Address2Test");
	$billingContact->setPostalCode("888349");
	$billingContact->setCity("CityTest");
	$billingContact->setState("StateTest");
	$billingContact->setCountryCode("DK");
	$billingContact->setEmail($config->getEmail());
	$billingContact->setPhone("+45.123456789");
	$billingContact->setFax("+45.987654321");
	$billingContact->setType("owner");
	$billingContact->setDetails("DetailsTest");
	$billingContact->setOrganisationNumber("OrganisationNumberTest");

	$domain =  new ascio\Domain();
	$domain->setDomainName($env->getProperties()->getProperty("DomainName"));
	$domain->setAdminContact($adminContact);
	$domain->setTechContact($techContact);
	$domain->setBillingContact($billingContact);

	$order =  new ascio\Order();
	$order->setType(ascio\OrderType::Contact_Update);
	$order->setDomain($domain);
	echo "start validate\n";
	$validateOrder = new  ascio\ValidateOrder($sessionId, $order);
	try {
		$response = $ascioClient->ValidateOrder($validateOrder);
	} catch (\Exception $e) {
		echo ("[".$e->faultcode . "] ". $e->faultstring);
		return;
	}
	echo "end validate\n";
	
	if ($response->getValidateOrderResult()->getResultCode() == 200) {
		echo "Validation: OK\r\n";
		try {
			$createOrderResponse = $ascioClient->CreateOrder(new ascio\CreateOrder($sessionId, $order));
		} catch (\Exception $e) {
			echo ("[".$e->faultcode . "] ". $e->faultstring);
			return;
		}
		echo "Create Order: ".$createOrderResponse->CreateOrderResult->getResultCode() . " " . $createOrderResponse->CreateOrderResult->getResultMessage() . "\r\n";
		if ($createOrderResponse->CreateOrderResult->getResultCode() == 200) {
			echo "OrderId : " . $createOrderResponse->CreateOrderResult->getOrderInfo()->getOrderId() . "\r\n";
			echo "Order Status : " . $createOrderResponse->CreateOrderResult->getOrderInfo()->getStatus() . "\r\n";
		} else {
			echo ($response->CreateOrderResult->getMessage()."\n");
			foreach($createOrderResponse->CreateOrderResult->getErrors() as $error) {
				echo $error."\n";
				return $response;
			}
		}
		return $createOrderResponse;
	} else {
		echo ($response->getValidateOrderResult()->getMessage()."\n");
		if ($response->getValidateOrderResult()->getErrors()) {
			foreach($response->getValidateOrderResult()->getErrors()->getString() as $error) {
				 echo $error."\n";
			}
		}
		return $response;
	}
}
contact_UpdateExample();
WSDL for AWS v2
https://aws.demo.ascio.com/2012/01/01/AscioService.wsdl (OTE)
https://aws.ascio.com/2012/01/01/AscioService.wsdl (Live)
Please configure the IP-Whitelisting in the portal/demo-portal.