Ascio Web Service v3

NodeJS CreateOrder

Register

Register a DPML-Domain. Please read the introduction for details about DPML.

CreateOrderResponse CreateOrder(SecurityHeaderDetails securityHeader,CreateOrderRequest request)

Response codes

ResultCodeMessageValue
200OK
401Authorization failed
501Syntax error in parameters or arguments
506Required attribute missing in request

CreateOrder Request

PropertyType
request

CreateOrderResponse

PropertyDescription
CreateOrderResult
OrderInfo
ResultCodeExample: 1
ResultMessage
Errors

Used in Classes

PropertyValue
OrderTypeRegister
requestDefensiveOrderRequest

NodeJS example

var soap = require("soap");

var createOrderExample = function(callback) {

	//KeyValue
	keyValue =  {};
	keyValue.Key="Title";
	keyValue.Value="Mr.";

	//Extensions
	ownerExtensions =  [{

	}]

	//Registrant
	owner =  {};
	owner.FirstName="John";
	owner.LastName="Doe";
	owner.OrgName="Ascio";
	owner.Address1="Address1Test";
	owner.Address2="Address2Test";
	owner.City="CityTest";
	owner.State="StateTest";
	owner.PostalCode="888349";
	owner.CountryCode="DK";
	owner.Phone="+45.123456789";
	owner.Fax="+45.987654321";
	owner.Email="test@gmail.com";
	owner.Type="owner";
	owner.Details="DetailsTest";
	owner.OrganisationNumber="OrganisationNumberTest";
	owner.Extensions=ownerExtensions;
	owner.VatNumber="VatNumberTest";
	owner.NexusCategory="NexusCategoryTest";

	//KeyValue
	keyValue =  {};
	keyValue.Key="Title";
	keyValue.Value="Mr.";

	//Extensions
	adminExtensions =  [{
		Key : "Title",
		Value : "Mrs."
	}]

	//Contact
	admin =  {};
	admin.FirstName="John";
	admin.LastName="Doe";
	admin.OrgName="Ascio";
	admin.Address1="Address1Test";
	admin.Address2="Address2Test";
	admin.City="CityTest";
	admin.State="StateTest";
	admin.PostalCode="888349";
	admin.CountryCode="DK";
	admin.Phone="+45.123456789";
	admin.Fax="+45.987654321";
	admin.Email="test@gmail.com";
	admin.Type="owner";
	admin.Details="DetailsTest";
	admin.OrganisationNumber="OrganisationNumberTest";
	admin.Extensions=adminExtensions;

	//KeyValue
	keyValue =  {};
	keyValue.Key="Title";
	keyValue.Value="Mr.";

	//Extensions
	techExtensions =  [{
		Key : "Title",
		Value : "Mrs."
	}]

	//Contact
	tech =  {};
	tech.FirstName="John";
	tech.LastName="Doe";
	tech.OrgName="Ascio";
	tech.Address1="Address1Test";
	tech.Address2="Address2Test";
	tech.City="CityTest";
	tech.State="StateTest";
	tech.PostalCode="888349";
	tech.CountryCode="DK";
	tech.Phone="+45.123456789";
	tech.Fax="+45.987654321";
	tech.Email="test@gmail.com";
	tech.Type="owner";
	tech.Details="DetailsTest";
	tech.OrganisationNumber="OrganisationNumberTest";
	tech.Extensions=techExtensions;

	//KeyValue
	keyValue =  {};
	keyValue.Key="Title";
	keyValue.Value="Mr.";

	//Extensions
	billingExtensions =  [{
		Key : "Title",
		Value : "Mrs."
	}]

	//Contact
	billing =  {};
	billing.FirstName="John";
	billing.LastName="Doe";
	billing.OrgName="Ascio";
	billing.Address1="Address1Test";
	billing.Address2="Address2Test";
	billing.City="CityTest";
	billing.State="StateTest";
	billing.PostalCode="888349";
	billing.CountryCode="DK";
	billing.Phone="+45.123456789";
	billing.Fax="+45.987654321";
	billing.Email="test@gmail.com";
	billing.Type="owner";
	billing.Details="DetailsTest";
	billing.OrganisationNumber="OrganisationNumberTest";
	billing.Extensions=billingExtensions;

	//KeyValue
	keyValue =  {};
	keyValue.Key="Title";
	keyValue.Value="Mr.";

	//Extensions
	resellerExtensions =  [{
		Key : "Title",
		Value : "Mrs."
	}]

	//Contact
	reseller =  {};
	reseller.FirstName="John";
	reseller.LastName="Doe";
	reseller.OrgName="Ascio";
	reseller.Address1="Address1Test";
	reseller.Address2="Address2Test";
	reseller.City="CityTest";
	reseller.State="StateTest";
	reseller.PostalCode="888349";
	reseller.CountryCode="DK";
	reseller.Phone="+45.123456789";
	reseller.Fax="+45.987654321";
	reseller.Email="test@gmail.com";
	reseller.Type="owner";
	reseller.Details="DetailsTest";
	reseller.OrganisationNumber="OrganisationNumberTest";
	reseller.Extensions=resellerExtensions;

	//Defensive
	defensive =  {};
	defensive.Name="ascio-is-great.com";
	defensive.MarkHandle="MarkHandleTest";
	defensive.AuthInfo="X4FF!zu";
	defensive.Encoding="EncodingTest";
	defensive.Owner=owner;
	defensive.Admin=admin;
	defensive.Tech=tech;
	defensive.Billing=billing;
	defensive.Reseller=reseller;
	defensive.ObjectComment="Example Object Comment";

	//DefensiveOrderRequest
	request =  
                    {
                        attributes: {
                            xsi_type: {
                                type: "http://www.ascio.com/2013/02",
                                xmlns: "DefensiveOrderRequest"
                            }
                        }
                    };
	request.Type="Register";
	request.Period=1;
	request.TransactionComment="TransactionCommentTest";
	request.Defensive=defensive;	
	soap.createClient("https://aws.demo.ascio.com/v3/aws.wsdl", function(err, client) {
		if(err) {
			callback(err);
		} 
		else {
			const ns="http://www.ascio.com/2013/02";
			const securityHeader = {
				SecurityHeaderDetails : {
					Account: "ascio-account",
					Password: "mypassword123"
				}			
			};			
			client.addSoapHeader(securityHeader, ns, "q1");
			const impersonationHeader = {
				ImpersonationHeaderDetails : {
					TransactionAccount: "sub-account"
				}
			}
			client.addSoapHeader(impersonationHeader, ns, "q1");
			client.CreateOrder({request: request}, function(err,result) {
				if(err) {
					callback({error: err , request : result.request.body});
				} else {
					if(result.CreateOrderResult.ResultCode < 400) {
						callback(null,result);	
					} else {
						callback({error: result.CreateOrderResult,request : request});
					}	
				}
			});

		};
	});
};
createOrderExample(function(err,result) {
	if(err) {
		console.log("\n\n Request \n\n",err.request, "\n\n Response \n\n" ,err.error,"\n");
	}
	else {
		console.log(result);
	}
});
WSDL for AWS v3
https://aws.demo.ascio.com/v3/aws.wsdl (OTE)
https://aws.ascio.com/v3/aws.wsdl (Live)
Please configure the IP-Whitelisting in the portal/demo-portal.