UpdateCustomer
Updates one or more fields on an existing customer. Can participate in a transaction.Input Properties
UpdateCustomerRequest
Output Properties
UpdateCustomerResponse
Http Request
PATCH https://yourcompany-api.exigo.com/3.0/customers HTTP/1.1 Content-Type: application/json Authorization: Basic base64Encoded(yourlogin@yourcompany:yourpassword){ "customerID": 1, "firstName": null, "lastName": null, "company": null, "customerType": null, "customerStatus": null, "email": null, "phone": null, "phone2": null, "mobilePhone": null, "fax": null, "mainAddress1": null, "mainAddress2": null, "mainAddress3": null, "mainCity": null, "mainState": null, "mainZip": null, "mainCountry": null, "mainCounty": null, "mailAddress1": null, "mailAddress2": null, "mailAddress3": null, "mailCity": null, "mailZip": null, "mailCounty": null, "otherAddress1": null, "otherAddress2": null, "otherAddress3": null, "otherCity": null, "otherZip": null, "otherCounty": null, "canLogin": null, "loginName": null, "loginPassword": null, "taxID": null, "salesTaxID": null, "salesTaxExemptExpireDate": "2024-11-21T00:00:00-06:00", "birthDate": null, "payableToName": null, "defaultWarehouseID": 1, "date1": "2024-11-21T00:00:00-06:00", "date2": "2024-11-21T00:00:00-06:00", "date3": "2024-11-21T00:00:00-06:00", "date4": "2024-11-21T00:00:00-06:00", "date5": "2024-11-21T00:00:00-06:00", "middleName": null, "nameSuffix": null, "binaryPlacementPreference": 1, "useBinaryHoldingTank": true, "mainAddressVerified": true, "mailAddressVerified": true, "otherAddressVerified": true, "customerKey": "1", "payableTy": "Check", "taxIDTy": "SSN" }
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/UpdateCustomer" <?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> <UpdateCustomerRequest xmlns="http://api.exigo.com/"> <CustomerID>int</CustomerID> <FirstName>string</FirstName> <LastName>string</LastName> <Company>string</Company> <CustomerType>int</CustomerType> <CustomerStatus>int</CustomerStatus> <Email>string</Email> <Phone>string</Phone> <Phone2>string</Phone2> <MobilePhone>string</MobilePhone> <Fax>string</Fax> <MainAddress1>string</MainAddress1> <MainAddress2>string</MainAddress2> <MainAddress3>string</MainAddress3> <MainCity>string</MainCity> <MainState>string</MainState> <MainZip>string</MainZip> <MainCountry>string</MainCountry> <MainCounty>string</MainCounty> <MailAddress1>string</MailAddress1> <MailAddress2>string</MailAddress2> <MailAddress3>string</MailAddress3> <MailCity>string</MailCity> <MailState>string</MailState> <MailZip>string</MailZip> <MailCountry>string</MailCountry> <MailCounty>string</MailCounty> <OtherAddress1>string</OtherAddress1> <OtherAddress2>string</OtherAddress2> <OtherAddress3>string</OtherAddress3> <OtherCity>string</OtherCity> <OtherState>string</OtherState> <OtherZip>string</OtherZip> <OtherCountry>string</OtherCountry> <OtherCounty>string</OtherCounty> <CanLogin>boolean</CanLogin> <LoginName>string</LoginName> <LoginPassword>string</LoginPassword> <TaxID>string</TaxID> <SalesTaxID>string</SalesTaxID> <SalesTaxExemptExpireDate>dateTime</SalesTaxExemptExpireDate> <IsSalesTaxExempt>boolean</IsSalesTaxExempt> <BirthDate>dateTime</BirthDate> <Field1>string</Field1> <Field2>string</Field2> <Field3>string</Field3> <Field4>string</Field4> <Field5>string</Field5> <Field6>string</Field6> <Field7>string</Field7> <Field8>string</Field8> <Field9>string</Field9> <Field10>string</Field10> <Field11>string</Field11> <Field12>string</Field12> <Field13>string</Field13> <Field14>string</Field14> <Field15>string</Field15> <SubscribeToBroadcasts>boolean</SubscribeToBroadcasts> <SubscribeFromIPAddress>string</SubscribeFromIPAddress> <CurrencyCode>string</CurrencyCode> <PayableToName>string</PayableToName> <PayableType>Check or WireTransfer or PaymentCard or DirectDeposit or OnHold or BankWire or DebitCardHold or Other100</PayableType> <DefaultWarehouseID>int</DefaultWarehouseID> <CheckThreshold>decimal</CheckThreshold> <CreatedDate>dateTime</CreatedDate> <TaxIDType>SSN or EIN or OtherType3 or OtherType4 or OtherType5 or OtherType6 or OtherType7 or OtherType8 or OtherType9 or OtherType10 or OtherType11 or OtherType12 or OtherType13 or OtherType14 or OtherType15 or OtherType16 or OtherType17 or OtherType18 or OtherType19 or OtherType20</TaxIDType> <LanguageID>int</LanguageID> <Gender>Unknown or Male or Female</Gender> <VatRegistration>string</VatRegistration> <Date1>dateTime</Date1> <Date2>dateTime</Date2> <Date3>dateTime</Date3> <Date4>dateTime</Date4> <Date5>dateTime</Date5> <MiddleName>string</MiddleName> <NameSuffix>string</NameSuffix> <BinaryPlacementPreference>int</BinaryPlacementPreference> <UseBinaryHoldingTank>boolean</UseBinaryHoldingTank> <MainAddressVerified>boolean</MainAddressVerified> <MailAddressVerified>boolean</MailAddressVerified> <OtherAddressVerified>boolean</OtherAddressVerified> <CustomerKey>string</CustomerKey> <PayableTy>string</PayableTy> <TaxIDTy>string</TaxIDTy> </UpdateCustomerRequest> </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> <UpdateCustomerResult 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 UpdateCustomerRequest();
req.CustomerID = 1; //Unique numeric identifier for customer record.
req.FirstName = 1;
req.LastName = 1;
req.Company = 1;
req.CustomerType = 1; //Classification of a customer as defined by the company
req.CustomerStatus = 1; //Current status of a customer as defined by the company
req.Email = 1;
req.Phone = 1;
req.Phone2 = 1;
req.MobilePhone = 1;
req.Fax = 1;
req.MainAddress1 = 1;
req.MainAddress2 = 1;
req.MainAddress3 = 1;
req.MainCity = 1;
req.MainState = TX;
req.MainZip = 1;
req.MainCountry = US;
req.MainCounty = 1;
req.MailAddress1 = 1;
req.MailAddress2 = 1;
req.MailAddress3 = 1;
req.MailCity = 1;
req.MailZip = 1;
req.MailCounty = 1;
req.OtherAddress1 = 1;
req.OtherAddress2 = 1;
req.OtherAddress3 = 1;
req.OtherCity = 1;
req.OtherZip = 1;
req.OtherCounty = 1;
req.CanLogin = 1;
req.LoginName = 1;
req.LoginPassword = 1;
req.TaxID = 1;
req.SalesTaxID = 1;
req.SalesTaxExemptExpireDate = DateTime.Today;
req.BirthDate = 1;
req.PayableToName = 1;
req.DefaultWarehouseID = 1; //Unique location for orders
req.Date1 = DateTime.Today;
req.Date2 = DateTime.Today;
req.Date3 = DateTime.Today;
req.Date4 = DateTime.Today;
req.Date5 = DateTime.Today;
req.MiddleName = 1;
req.NameSuffix = 1;
req.BinaryPlacementPreference = 1;
req.UseBinaryHoldingTank = true;
req.MainAddressVerified = true;
req.MailAddressVerified = true;
req.OtherAddressVerified = true;
req.CustomerKey = "1"; //Unique alpha numeric identifier for customer record. Exeption will occur if CustomerID & CustomerKey are provided.
req.PayableTy = "Check";
req.TaxIDTy = "SSN";
//Send Request to Server and Get Response
var res = await api.UpdateCustomerAsync(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
UpdateCustomerRequest req = new UpdateCustomerRequest();
req.CustomerID = 1; //Unique numeric identifier for customer record.
req.FirstName = 1;
req.LastName = 1;
req.Company = 1;
req.CustomerType = 1; //Classification of a customer as defined by the company
req.CustomerStatus = 1; //Current status of a customer as defined by the company
req.Email = 1;
req.Phone = 1;
req.Phone2 = 1;
req.MobilePhone = 1;
req.Fax = 1;
req.MainAddress1 = 1;
req.MainAddress2 = 1;
req.MainAddress3 = 1;
req.MainCity = 1;
req.MainState = TX;
req.MainZip = 1;
req.MainCountry = US;
req.MainCounty = 1;
req.MailAddress1 = 1;
req.MailAddress2 = 1;
req.MailAddress3 = 1;
req.MailCity = 1;
req.MailZip = 1;
req.MailCounty = 1;
req.OtherAddress1 = 1;
req.OtherAddress2 = 1;
req.OtherAddress3 = 1;
req.OtherCity = 1;
req.OtherZip = 1;
req.OtherCounty = 1;
req.CanLogin = 1;
req.LoginName = 1;
req.LoginPassword = 1;
req.TaxID = 1;
req.SalesTaxID = 1;
req.SalesTaxExemptExpireDate = DateTime.Today;
req.BirthDate = 1;
req.PayableToName = 1;
req.DefaultWarehouseID = 1; //Unique location for orders
req.Date1 = DateTime.Today;
req.Date2 = DateTime.Today;
req.Date3 = DateTime.Today;
req.Date4 = DateTime.Today;
req.Date5 = DateTime.Today;
req.MiddleName = 1;
req.NameSuffix = 1;
req.BinaryPlacementPreference = 1;
req.UseBinaryHoldingTank = true;
req.MainAddressVerified = true;
req.MailAddressVerified = true;
req.OtherAddressVerified = true;
req.CustomerKey = "1"; //Unique alpha numeric identifier for customer record. Exeption will occur if CustomerID & CustomerKey are provided.
req.PayableTy = "Check";
req.TaxIDTy = "SSN";
//Send Request to Server and Get Response
UpdateCustomerResponse res = api.UpdateCustomer(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 UpdateCustomerRequest()
req.CustomerID = 1
req.FirstName = 1
req.LastName = 1
req.Company = 1
req.CustomerType = 1
req.CustomerStatus = 1
req.Email = 1
req.Phone = 1
req.Phone2 = 1
req.MobilePhone = 1
req.Fax = 1
req.MainAddress1 = 1
req.MainAddress2 = 1
req.MainAddress3 = 1
req.MainCity = 1
req.MainState = TX
req.MainZip = 1
req.MainCountry = US
req.MainCounty = 1
req.MailAddress1 = 1
req.MailAddress2 = 1
req.MailAddress3 = 1
req.MailCity = 1
req.MailZip = 1
req.MailCounty = 1
req.OtherAddress1 = 1
req.OtherAddress2 = 1
req.OtherAddress3 = 1
req.OtherCity = 1
req.OtherZip = 1
req.OtherCounty = 1
req.CanLogin = 1
req.LoginName = 1
req.LoginPassword = 1
req.TaxID = 1
req.SalesTaxID = 1
req.SalesTaxExemptExpireDate = DateTime.Today
req.BirthDate = 1
req.PayableToName = 1
req.DefaultWarehouseID = 1
req.Date1 = DateTime.Today
req.Date2 = DateTime.Today
req.Date3 = DateTime.Today
req.Date4 = DateTime.Today
req.Date5 = DateTime.Today
req.MiddleName = 1
req.NameSuffix = 1
req.BinaryPlacementPreference = 1
req.UseBinaryHoldingTank = true
req.MainAddressVerified = true
req.MailAddressVerified = true
req.OtherAddressVerified = true
req.CustomerKey = "1"
req.PayableTy = "Check"
req.TaxIDTy = "SSN"
'Send Request to Server and Get Response
Dim res As UpdateCustomerResponse = api.UpdateCustomer(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->FirstName = 1;
$req->LastName = 1;
$req->Company = 1;
$req->CustomerType = 1;
$req->CustomerStatus = 1;
$req->Email = 1;
$req->Phone = 1;
$req->Phone2 = 1;
$req->MobilePhone = 1;
$req->Fax = 1;
$req->MainAddress1 = 1;
$req->MainAddress2 = 1;
$req->MainAddress3 = 1;
$req->MainCity = 1;
$req->MainState = TX;
$req->MainZip = 1;
$req->MainCountry = US;
$req->MainCounty = 1;
$req->MailAddress1 = 1;
$req->MailAddress2 = 1;
$req->MailAddress3 = 1;
$req->MailCity = 1;
$req->MailZip = 1;
$req->MailCounty = 1;
$req->OtherAddress1 = 1;
$req->OtherAddress2 = 1;
$req->OtherAddress3 = 1;
$req->OtherCity = 1;
$req->OtherZip = 1;
$req->OtherCounty = 1;
$req->CanLogin = 1;
$req->LoginName = 1;
$req->LoginPassword = 1;
$req->TaxID = 1;
$req->SalesTaxID = 1;
$req->SalesTaxExemptExpireDate = 1;
$req->BirthDate = 1;
$req->PayableToName = 1;
$req->DefaultWarehouseID = 1;
$req->Date1 = 1;
$req->Date2 = 1;
$req->Date3 = 1;
$req->Date4 = 1;
$req->Date5 = 1;
$req->MiddleName = 1;
$req->NameSuffix = 1;
$req->BinaryPlacementPreference = 1;
$req->UseBinaryHoldingTank = 1;
$req->MainAddressVerified = 1;
$req->MailAddressVerified = 1;
$req->OtherAddressVerified = 1;
$req->CustomerKey = "1";
$req->PayableTy = "Check";
$req->TaxIDTy = "SSN";
//Send Request to Server and Get Response
$res = $api.UpdateCustomer($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
UpdateCustomerRequest req = new UpdateCustomerRequest();
req.setCustomerID(1);
req.setFirstName(1);
req.setLastName(1);
req.setCompany(1);
req.setCustomerType(1);
req.setCustomerStatus(1);
req.setEmail(1);
req.setPhone(1);
req.setPhone2(1);
req.setMobilePhone(1);
req.setFax(1);
req.setMainAddress1(1);
req.setMainAddress2(1);
req.setMainAddress3(1);
req.setMainCity(1);
req.setMainState(TX);
req.setMainZip(1);
req.setMainCountry(US);
req.setMainCounty(1);
req.setMailAddress1(1);
req.setMailAddress2(1);
req.setMailAddress3(1);
req.setMailCity(1);
req.setMailZip(1);
req.setMailCounty(1);
req.setOtherAddress1(1);
req.setOtherAddress2(1);
req.setOtherAddress3(1);
req.setOtherCity(1);
req.setOtherZip(1);
req.setOtherCounty(1);
req.setCanLogin(1);
req.setLoginName(1);
req.setLoginPassword(1);
req.setTaxID(1);
req.setSalesTaxID(1);
req.setSalesTaxExemptExpireDate(1);
req.setBirthDate(1);
req.setPayableToName(1);
req.setDefaultWarehouseID(1);
req.setDate1(1);
req.setDate2(1);
req.setDate3(1);
req.setDate4(1);
req.setDate5(1);
req.setMiddleName(1);
req.setNameSuffix(1);
req.setBinaryPlacementPreference(1);
req.setUseBinaryHoldingTank(1);
req.setMainAddressVerified(1);
req.setMailAddressVerified(1);
req.setOtherAddressVerified(1);
req.setCustomerKey("1");
req.setPayableTy("Check");
req.setTaxIDTy("SSN");
//Send Request to Server and Get Response
UpdateCustomerResponse res = api.getExigoApiSoap().updateCustomer(req, auth);
//Now examine the results:
}
catch (Exception ex)
{
System.out.println("Error: " + ex.getMessage());
}