NodeJS SearchOrder

Search for an order on existing order objects.

Response SearchOrder(string sessionId,SearchOrderRequest orderRequest)

Response codes

ResultCodeMessageValue
200OK
401Authorization failed
405Access denied

SearchOrder request

PropertyDescription
sessionIdExample: o58t9fjgw9bjarp6q7byv13e
orderRequest

SearchOrderResponse

PropertyDescription
SearchOrderResult
totalOrdersExample: 1
orders

NodeJS example

var soap = require("soap");

var example = function(callback) {

	//PagingInfo
	pageInfo =  {};
	pageInfo.PageIndex=1;
	pageInfo.PageSize=1;

	//SearchOrderRequest
	orderRequest =  {};
	orderRequest.OrderTypes=[{OrderType: "Register_Domain"}];
	orderRequest.OrderStatusTypes=[{OrderStatusType: "Validated"}];
	orderRequest.FromDate="2017-11-22T03:35:35.858Z";
	orderRequest.ToDate="2017-11-22T03:35:35.858Z";
	orderRequest.DomainName="testdomain.com";
	orderRequest.TransactionComment="TransactionCommentTest";
	orderRequest.Comments="CommentsTest";
	orderRequest.IncludeDomainDetails=true;
	orderRequest.PageInfo=pageInfo;
	orderRequest.OrderSort="CreDateAsc";	
	soap.createClient("../AscioServiceTest.wsdl", function(err, client) {
		if(err) {
			callback(err);
		} 
		else {
			client.SearchOrder({sessionId: "sessionId", orderRequest: orderRequest}, function(err,result) {
				if(err) {
					callback({error: err.root.Envelope.Body.Fault.faultstring.$value, request : result.request.body});
				} else {
					if(result.SearchOrderResult.ResultCode == 200) {
						callback(null,result);	
					} else {
						callback({error: result.SearchOrderResult,request : request});
					}
				}
			});
		};
	});
};
example(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 v2
https://aws.demo.ascio.com/2012/01/01/AscioService.wsdl (OTE)
https://aws.ascio.com/2012/01/01/AscioService.wsdl (Live)