SetCustomerSite
Setup public web site info for an existing customer, or new customer in a transaction.Input Properties
SetCustomerSiteRequest
Output Properties
SetCustomerSiteResponse
Http Request
PUT https://yourcompany-api.exigo.com/3.0/customers/site HTTP/1.1 Content-Type: application/json Authorization: Basic base64Encoded(yourlogin@yourcompany:yourpassword){ "customerID": 1, "webAlias": "1", "firstName": "", "lastName": "", "company": "", "address1": "", "address2": "", "city": "", "zip": "", "email": "", "phone": "", "phone2": "", "fax": "", "notes1": "", "notes2": "", "notes3": "", "notes4": "", "url1": "", "url2": "", "url3": "", "url4": "", "url5": "", "url6": "", "url7": "", "url8": "", "url9": "", "url10": "", "url1Description": "", "url2Description": "", "url3Description": "", "url4Description": "", "url5Description": "", "url6Description": "", "url7Description": "", "url8Description": "", "url9Description": "", "url10Description": "", "customerKey": "1" }
Http Response
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Content-Length: length{ "result": null }
Soap Request
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /3.0/ExigoApi.asmx HTTP/1.1 Host: totallife-api.exigo.com Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "https://api.exigo.com/SetCustomerSite" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <ApiAuthentication xmlns="http://api.exigo.com/"> <LoginName>string</LoginName> <Password>string</Password> <Company>string</Company> <Identity>string</Identity> <RequestTimeUtc>dateTime</RequestTimeUtc> <Signature>string</Signature> </ApiAuthentication> </soap:Header> <soap:Body> <SetCusotmerSiteRequest xmlns="http://api.exigo.com/"> <CustomerID>int</CustomerID> <WebAlias>string</WebAlias> <FirstName>string</FirstName> <LastName>string</LastName> <Company>string</Company> <Address1>string</Address1> <Address2>string</Address2> <City>string</City> <State>string</State> <Zip>string</Zip> <Country>string</Country> <Email>string</Email> <Phone>string</Phone> <Phone2>string</Phone2> <Fax>string</Fax> <Notes1>string</Notes1> <Notes2>string</Notes2> <Notes3>string</Notes3> <Notes4>string</Notes4> <Url1>string</Url1> <Url2>string</Url2> <Url3>string</Url3> <Url4>string</Url4> <Url5>string</Url5> <Url6>string</Url6> <Url7>string</Url7> <Url8>string</Url8> <Url9>string</Url9> <Url10>string</Url10> <Url1Description>string</Url1Description> <Url2Description>string</Url2Description> <Url3Description>string</Url3Description> <Url4Description>string</Url4Description> <Url5Description>string</Url5Description> <Url6Description>string</Url6Description> <Url7Description>string</Url7Description> <Url8Description>string</Url8Description> <Url9Description>string</Url9Description> <Url10Description>string</Url10Description> <CustomerKey>string</CustomerKey> </SetCusotmerSiteRequest> </soap:Body> </soap:Envelope>
Soap Response
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <SetCustomerSiteResult xmlns="http://api.exigo.com/" /> </soap:Body> </soap:Envelope>
C# Rest Client
Install Nuget package Exigo.Api.Client
try
{
//Create Api Client
var api = new ExigoApiClient("yourcmpany", "yourlogin", "yourpassword");
//Create Request
var req = new SetCustomerSiteRequest();
req.CustomerID = 1; //Unique numeric identifier for customer record.
req.WebAlias = "1"; //The unique name used in a replicated site to identify the customer.
req.FirstName = "1";
req.LastName = "1";
req.Company = "1";
req.Address1 = "1";
req.Address2 = "1";
req.City = "1";
req.Zip = "1";
req.Email = "1";
req.Phone = "1";
req.Phone2 = "1";
req.Fax = "1";
req.Notes1 = "1";
req.Notes2 = "1";
req.Notes3 = "1";
req.Notes4 = "1";
req.Url1 = "1";
req.Url2 = "1";
req.Url3 = "1";
req.Url4 = "1";
req.Url5 = "1";
req.Url6 = "1";
req.Url7 = "1";
req.Url8 = "1";
req.Url9 = "1";
req.Url10 = "1";
req.Url1Description = "1";
req.Url2Description = "1";
req.Url3Description = "1";
req.Url4Description = "1";
req.Url5Description = "1";
req.Url6Description = "1";
req.Url7Description = "1";
req.Url8Description = "1";
req.Url9Description = "1";
req.Url10Description = "1";
req.CustomerKey = "1"; //Unique alpha numeric identifier for customer record. Exeption will occur if CustomerID & CustomerKey are provided.
//Send Request to Server and Get Response
var res = await api.SetCustomerSiteAsync(req);
//Now examine the results:
}
catch (Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
C# Soap Client
try
{
//Create Main API Context Object
ExigoApi api = new ExigoApi();
//Create Authentication Header
ApiAuthentication auth = new ApiAuthentication();
auth.LoginName = "yourLoginName";
auth.Password = "yourPassword";
auth.Company = "yourCompany";
api.ApiAuthenticationValue = auth;
//Create Request
SetCustomerSiteRequest req = new SetCustomerSiteRequest();
req.CustomerID = 1; //Unique numeric identifier for customer record.
req.WebAlias = "1"; //The unique name used in a replicated site to identify the customer.
req.FirstName = "1";
req.LastName = "1";
req.Company = "1";
req.Address1 = "1";
req.Address2 = "1";
req.City = "1";
req.Zip = "1";
req.Email = "1";
req.Phone = "1";
req.Phone2 = "1";
req.Fax = "1";
req.Notes1 = "1";
req.Notes2 = "1";
req.Notes3 = "1";
req.Notes4 = "1";
req.Url1 = "1";
req.Url2 = "1";
req.Url3 = "1";
req.Url4 = "1";
req.Url5 = "1";
req.Url6 = "1";
req.Url7 = "1";
req.Url8 = "1";
req.Url9 = "1";
req.Url10 = "1";
req.Url1Description = "1";
req.Url2Description = "1";
req.Url3Description = "1";
req.Url4Description = "1";
req.Url5Description = "1";
req.Url6Description = "1";
req.Url7Description = "1";
req.Url8Description = "1";
req.Url9Description = "1";
req.Url10Description = "1";
req.CustomerKey = "1"; //Unique alpha numeric identifier for customer record. Exeption will occur if CustomerID & CustomerKey are provided.
//Send Request to Server and Get Response
SetCustomerSiteResponse res = api.SetCustomerSite(req);
//Now examine the results:
}
catch (Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
VB.Net
Try
'Create Main API Context Object
Dim api as new ExigoApi()
'Create Authentication Header
Dim auth as new ApiAuthentication()
auth.LoginName = "yourLoginName"
auth.Password = "yourPassword"
auth.Company = "yourCompany"
api.ApiAuthenticationValue = auth
'Create Request
Dim req as new SetCustomerSiteRequest()
req.CustomerID = 1
req.WebAlias = "1"
req.FirstName = "1"
req.LastName = "1"
req.Company = "1"
req.Address1 = "1"
req.Address2 = "1"
req.City = "1"
req.Zip = "1"
req.Email = "1"
req.Phone = "1"
req.Phone2 = "1"
req.Fax = "1"
req.Notes1 = "1"
req.Notes2 = "1"
req.Notes3 = "1"
req.Notes4 = "1"
req.Url1 = "1"
req.Url2 = "1"
req.Url3 = "1"
req.Url4 = "1"
req.Url5 = "1"
req.Url6 = "1"
req.Url7 = "1"
req.Url8 = "1"
req.Url9 = "1"
req.Url10 = "1"
req.Url1Description = "1"
req.Url2Description = "1"
req.Url3Description = "1"
req.Url4Description = "1"
req.Url5Description = "1"
req.Url6Description = "1"
req.Url7Description = "1"
req.Url8Description = "1"
req.Url9Description = "1"
req.Url10Description = "1"
req.CustomerKey = "1"
'Send Request to Server and Get Response
Dim res As SetCustomerSiteResponse = api.SetCustomerSite(req)
'Now examine the results:
Catch ex As Exception
Console.WriteLine("Error: " & ex.Message)
End Try
PHP
Note: PHP is not officially supported.<?php
try
{
//Setup the SoapClient and Authentication
$api = new SoapClient("http://api.exigo.com/3.0/ExigoApi.asmx?WSDL");
$ns = "http://api.exigo.com/";
$auth = array()
$auth["LoginName"] = new SoapVar("yourLoginName",XSD_STRING,null,null,null,$ns);
$auth["Password"] = new SoapVar("yourPassword",XSD_STRING,null,null,null,$ns);
$auth["Company"] = new SoapVar("yourCompany",XSD_STRING,null,null,null,$ns);
$headerBody = new SoapVar($auth, SOAP_ENC_OBJECT);
$header = new SoapHeader($ns, 'ApiAuthentication', $headerBody);
$api->__setSoapHeaders(array($header));
//Create Request
$req->CustomerID = 1;
$req->WebAlias = "1";
$req->FirstName = "1";
$req->LastName = "1";
$req->Company = "1";
$req->Address1 = "1";
$req->Address2 = "1";
$req->City = "1";
$req->Zip = "1";
$req->Email = "1";
$req->Phone = "1";
$req->Phone2 = "1";
$req->Fax = "1";
$req->Notes1 = "1";
$req->Notes2 = "1";
$req->Notes3 = "1";
$req->Notes4 = "1";
$req->Url1 = "1";
$req->Url2 = "1";
$req->Url3 = "1";
$req->Url4 = "1";
$req->Url5 = "1";
$req->Url6 = "1";
$req->Url7 = "1";
$req->Url8 = "1";
$req->Url9 = "1";
$req->Url10 = "1";
$req->Url1Description = "1";
$req->Url2Description = "1";
$req->Url3Description = "1";
$req->Url4Description = "1";
$req->Url5Description = "1";
$req->Url6Description = "1";
$req->Url7Description = "1";
$req->Url8Description = "1";
$req->Url9Description = "1";
$req->Url10Description = "1";
$req->CustomerKey = "1";
//Send Request to Server and Get Response
$res = $api.SetCustomerSite($req);
//Now examine the results:
}
catch (SoapFault $ex)
{
echo "Error: ", $ex->getMessage();
}
?>
Java
Note: Java is not officially supported.try
{
//Create Main API Context Object
ExigoApi api = new ExigoApi();
//Create Authentication Header
ApiAuthentication auth = new ApiAuthentication();
auth.setLoginName("yourLoginName");
auth.setPassword("yourPassword");
auth.setCompany("yourCompany");
api.setApiAuthenticationValue(auth);
//Create Request
SetCustomerSiteRequest req = new SetCustomerSiteRequest();
req.setCustomerID(1);
req.setWebAlias("1");
req.setFirstName("1");
req.setLastName("1");
req.setCompany("1");
req.setAddress1("1");
req.setAddress2("1");
req.setCity("1");
req.setZip("1");
req.setEmail("1");
req.setPhone("1");
req.setPhone2("1");
req.setFax("1");
req.setNotes1("1");
req.setNotes2("1");
req.setNotes3("1");
req.setNotes4("1");
req.setUrl1("1");
req.setUrl2("1");
req.setUrl3("1");
req.setUrl4("1");
req.setUrl5("1");
req.setUrl6("1");
req.setUrl7("1");
req.setUrl8("1");
req.setUrl9("1");
req.setUrl10("1");
req.setUrl1Description("1");
req.setUrl2Description("1");
req.setUrl3Description("1");
req.setUrl4Description("1");
req.setUrl5Description("1");
req.setUrl6Description("1");
req.setUrl7Description("1");
req.setUrl8Description("1");
req.setUrl9Description("1");
req.setUrl10Description("1");
req.setCustomerKey("1");
//Send Request to Server and Get Response
SetCustomerSiteResponse res = api.getExigoApiSoap().setCustomerSite(req, auth);
//Now examine the results:
}
catch (Exception ex)
{
System.out.println("Error: " + ex.getMessage());
}