Exigo Web Services API v2022.12.19.1

CreateCustomer

Creates a new Customer. Can optionally be put in one or more trees.

Input Properties

CreateCustomerRequest
PropertyData TypeNotes
FirstNameStringOptional. The customer's first name.
LastNameStringOptional. The customer's last name.
CompanyStringOptional. The customer's company name.
CustomerTypeInt32The customer's type as defined by the company.
CustomerStatusInt32Optional. The customer's status as defined by the company. Defaults to 1.
EmailStringOptional.
PhoneStringOptional.
Phone2StringOptional.
MobilePhoneStringOptional.
FaxStringOptional.
NotesStringOptional.
MainAddress1StringOptional.
MainAddress2StringOptional.
MainAddress3StringOptional.
MainCityStringOptional.
MainStateStringOptional. The state of the customer's primary address. This field is required if MainAddress1 is provided.
MainZipStringOptional.
MainCountryStringOptional. The country of the customer's primary address. This field is required if MainAddress1 is provided.
MainCountyStringOptional.
MailAddress1StringOptional.
MailAddress2StringOptional.
MailAddress3StringOptional.
MailCityStringOptional.
MailStateStringOptional. The state of the customer's mailing address. This field is required if MailAddress1 is provided.
MailZipStringOptional.
MailCountryStringOptional. The country of the customer's mailing address. This field is required if MailAddress1 is provided.
MailCountyStringOptional.
OtherAddress1StringOptional.
OtherAddress2StringOptional.
OtherAddress3StringOptional.
OtherCityStringOptional.
OtherStateStringOptional. The state of the customer's other address. This field is required if OtherAddress1 is provided.
OtherZipStringOptional.
OtherCountryStringOptional. The country of the customer's other address. This field is required if OtherAddress1 is provided.
OtherCountyStringOptional.
CanLoginBooleanOptional. If true, the customer will be able to be authenticated using their login name and password. Defaults to False.
LoginNameStringOptional. The customer's desired login name.
LoginPasswordStringOptional. The customer's desired password.
InsertEnrollerTreeBooleanOptional. If true, the customer will be inserted into the Enroller tree using the provided EnrollerID. Defaults to False.
EnrollerIDInt32The customer's enroller's unique identifier. Required only when InsertEnrollerTree is true.
InsertUnilevelTreeBooleanOptional. If true, the customer will be inserted into the UniLevel tree using the provided SponsorID. Defaults to False.
SponsorIDInt32The customer's UniLevel sponsor's unique identifier. Required only when InsertSponsorTree is true.
UseManualCustomerIDBooleanOptional. If true, the customer's ID will be set to the ID provided in the ManualCustomerID or ManualCustomerKeyfield. Defaults to False.
ManualCustomerIDInt32Unique numeric identifier for new customer record. If set, UseManualCustomerID must also be set to true.
TaxIDStringOptional. The customer's tax ID.
SalesTaxIDStringOptional. The customer's sales tax ID.
SalesTaxExemptExpireDateDateTimeOptional.
IsSalesTaxExemptBooleanOptional. If true, the customer will be considered exempt from sales tax.
BirthDateDateTimeOptional. The customer's birth date. The provided date must be greater than 1/1/1900.
Field1 StringOptional.
Field2 StringOptional.
Field3 StringOptional.
Field4 StringOptional.
Field5 StringOptional.
Field6 StringOptional.
Field7 StringOptional.
Field8 StringOptional.
Field9 StringOptional.
Field10 StringOptional.
Field11 StringOptional.
Field12 StringOptional.
Field13 StringOptional.
Field14 StringOptional.
Field15 StringOptional.
SubscribeToBroadcastsBooleanIf true, the customer will be opted in to receive email broadcasts. Note that the SubscribeFromIPAddress field must also be provided.
SubscribeFromIPAddressStringOptional. The IP address the customer is being subscribed from.
CurrencyCodeStringOptional. The default currency code this customer will use in future transactions. Defaults to 'usd'.
PayableToNameStringOptional.
EntryDateDateTimeThe date the customer was created. The provided date must be greater than 1/1/1900.
DefaultWarehouseIDInt32Optional. The default warehouse this customer will use in future transactions.
CheckThresholdDecimalOptional.
TaxIDType StringOptional.
LanguageIDInt32Optional. The customer's preferred language. Defaults to 0.
Gender GenderOptional. The customer's gender.
VatRegistrationStringOptional.
Date1DateTimeOptional.
Date2DateTimeOptional.
Date3DateTimeOptional.
Date4DateTimeOptional.
Date5DateTimeOptional.
MiddleNameStringOptional. The customer's middle name.
NameSuffixStringOptional. The customer's name suffix.
BinaryPlacementPreferenceInt32Optional.
UseBinaryHoldingTankBooleanOptional.
MainAddressVerifiedBooleanOptional.
MailAddressVerifiedBooleanOptional.
OtherAddressVerifiedBooleanOptional.
SponsorKeyStringOptional. The customer's uniLevel sponsor's unique alpha numeric identifier. Required only when InsertSponsorTree is true.
EnrollerKeyStringOptional. The customer's enroller's unique alpha numeric identifier. Required only when InsertEnrollerTree is true.
ManualCustomerKeyStringOptional. Unique alpha numeric identifier for new customer record. If set, UseManualCustomerID must also be set to true. Exception will occur if ManualCustomerID & ManualCustomerKey are provided.
PayableTy StringOptional.

Output Properties

CreateCustomerResponse
PropertyData TypeNotes
CustomerIDInt32Unique numeric identifier for customer record.
CustomerKeyStringUnique alpha numeric identifier for customer record .

Http Request

POST https://yourcompany-api.exigo.com/3.0/customers HTTP/1.1
Content-Type: application/json
Authorization: Basic base64Encoded(yourlogin@yourcompany:yourpassword)

{ "firstName": "John", "lastName": "Doe", "company": "ACME, Inc.", "customerType": 1, "customerStatus": 1, "email": "joecool@me.com", "phone": "555-555-5555", "mainAddress1": "123 Some Street", "mainCity": "Dallas", "mainState": "TX", "mainZip": "75207", "mailState": "1", "mailCountry": "1", "otherState": "1", "otherCountry": "1", "taxIDType": "SSN", "middleName": "1", "nameSuffix": "1", "binaryPlacementPreference": 1, "useBinaryHoldingTank": true, "mainAddressVerified": true, "mailAddressVerified": true, "otherAddressVerified": true, "payableTy": "Check" }

Http Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: length

{ "customerID": 1, "customerKey": "", "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: api.exigo.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "https://api.exigo.com/CreateCustomer"

<?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> <CreateCustomerRequest xmlns="http://api.exigo.com/"> <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> <Notes>string</Notes> <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> <InsertEnrollerTree>boolean</InsertEnrollerTree> <EnrollerID>int</EnrollerID> <InsertUnilevelTree>boolean</InsertUnilevelTree> <SponsorID>int</SponsorID> <UseManualCustomerID>boolean</UseManualCustomerID> <ManualCustomerID>int</ManualCustomerID> <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> <EntryDate>dateTime</EntryDate> <DefaultWarehouseID>int</DefaultWarehouseID> <PayableType>Check or WireTransfer or PaymentCard or DirectDeposit or OnHold or BankWire or DebitCardHold or Other100</PayableType> <CheckThreshold>decimal</CheckThreshold> <TaxIDType>string</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> <SponsorKey>string</SponsorKey> <EnrollerKey>string</EnrollerKey> <ManualCustomerKey>string</ManualCustomerKey> <PayableTy>string</PayableTy> </CreateCustomerRequest> </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> <CreateCustomerResult xmlns="http://api.exigo.com/"> <CustomerID>int</CustomerID> <CustomerKey>string</CustomerKey> </CreateCustomerResult> </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 CreateCustomerRequest();

 

    req.FirstName = "John";         //The customer's first name

    req.LastName = "Doe";           //The customer's last name

    req.Company = "ACME, Inc.";     //The customer's company name

    req.CustomerType = 1;           //The customer's type as defined by the company

    req.CustomerStatus = 1;         //The customer's status as defined by the company. Defaults to 1.

    req.Email = "joecool@me.com";

    req.Phone = "555-555-5555";

    req.MainAddress1 = "123 Some Street";

    req.MainCity = "Dallas";

    req.MainState = "TX";           //The state of the customer's primary address. This field is required if MainAddress1 is provided.

    req.MainZip = "75207";

    req.MailState = "1";            //The state of the customer's mailing address. This field is required if MailAddress1 is provided.

    req.MailCountry = "1";          //The country of the customer's mailing address. This field is required if MailAddress1 is provided.

    req.OtherState = "1";           //The state of the customer's other address. This field is required if OtherAddress1 is provided.

    req.OtherCountry = "1";         //The country of the customer's other address. This field is required if OtherAddress1 is provided.

    req.TaxIDType = "SSN";

    req.MiddleName = "1";           //The customer's middle name

    req.NameSuffix = "1";           //The customer's name suffix

    req.BinaryPlacementPreference = 1;

    req.UseBinaryHoldingTank = true;

    req.MainAddressVerified = true;

    req.MailAddressVerified = true;

    req.OtherAddressVerified = true;

    req.PayableTy = "Check";

 

    //Send Request to Server and Get Response

    var res = await api.CreateCustomerAsync(req);

 

    //Now examine the results:

    Console.WriteLine("CustomerID: {0}", res.CustomerID);

    Console.WriteLine("CustomerKey: {0}", res.CustomerKey);

}

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

    CreateCustomerRequest req = new CreateCustomerRequest();

 

    req.FirstName = "John";         //The customer's first name

    req.LastName = "Doe";           //The customer's last name

    req.Company = "ACME, Inc.";     //The customer's company name

    req.CustomerType = 1;           //The customer's type as defined by the company

    req.CustomerStatus = 1;         //The customer's status as defined by the company. Defaults to 1.

    req.Email = "joecool@me.com";

    req.Phone = "555-555-5555";

    req.MainAddress1 = "123 Some Street";

    req.MainCity = "Dallas";

    req.MainState = "TX";           //The state of the customer's primary address. This field is required if MainAddress1 is provided.

    req.MainZip = "75207";

    req.MailState = "1";            //The state of the customer's mailing address. This field is required if MailAddress1 is provided.

    req.MailCountry = "1";          //The country of the customer's mailing address. This field is required if MailAddress1 is provided.

    req.OtherState = "1";           //The state of the customer's other address. This field is required if OtherAddress1 is provided.

    req.OtherCountry = "1";         //The country of the customer's other address. This field is required if OtherAddress1 is provided.

    req.TaxIDType = "SSN";

    req.MiddleName = "1";           //The customer's middle name

    req.NameSuffix = "1";           //The customer's name suffix

    req.BinaryPlacementPreference = 1;

    req.UseBinaryHoldingTank = true;

    req.MainAddressVerified = true;

    req.MailAddressVerified = true;

    req.OtherAddressVerified = true;

    req.PayableTy = "Check";

 

    //Send Request to Server and Get Response

    CreateCustomerResponse res = api.CreateCustomer(req);

 

    //Now examine the results:

    Console.WriteLine("CustomerID: {0}", res.CustomerID);

    Console.WriteLine("CustomerKey: {0}", res.CustomerKey);

}

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 CreateCustomerRequest()

 

    req.FirstName = "John"

    req.LastName = "Doe"

    req.Company = "ACME, Inc."

    req.CustomerType = 1

    req.CustomerStatus = 1

    req.Email = "joecool@me.com"

    req.Phone = "555-555-5555"

    req.MainAddress1 = "123 Some Street"

    req.MainCity = "Dallas"

    req.MainState = "TX"

    req.MainZip = "75207"

    req.MailState = "1"

    req.MailCountry = "1"

    req.OtherState = "1"

    req.OtherCountry = "1"

    req.TaxIDType = "SSN"

    req.MiddleName = "1"

    req.NameSuffix = "1"

    req.BinaryPlacementPreference = 1

    req.UseBinaryHoldingTank = true

    req.MainAddressVerified = true

    req.MailAddressVerified = true

    req.OtherAddressVerified = true

    req.PayableTy = "Check"

 

    'Send Request to Server and Get Response

    Dim res As CreateCustomerResponse = api.CreateCustomer(req)

 

    'Now examine the results:

    Console.WriteLine("CustomerID: {0}", res.CustomerID)

    Console.WriteLine("CustomerKey: {0}", res.CustomerKey)

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->FirstName = "John";

    $req->LastName = "Doe";

    $req->Company = "ACME, Inc.";

    $req->CustomerType = 1;

    $req->CustomerStatus = 1;

    $req->Email = "joecool@me.com";

    $req->Phone = "555-555-5555";

    $req->MainAddress1 = "123 Some Street";

    $req->MainCity = "Dallas";

    $req->MainState = "TX";

    $req->MainZip = "75207";

    $req->MailState = "1";

    $req->MailCountry = "1";

    $req->OtherState = "1";

    $req->OtherCountry = "1";

    $req->TaxIDType = "SSN";

    $req->MiddleName = "1";

    $req->NameSuffix = "1";

    $req->BinaryPlacementPreference = 1;

    $req->UseBinaryHoldingTank = 1;

    $req->MainAddressVerified = 1;

    $req->MailAddressVerified = 1;

    $req->OtherAddressVerified = 1;

    $req->PayableTy = "Check";

 

    //Send Request to Server and Get Response

    $res = $api.CreateCustomer($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

    CreateCustomerRequest req = new CreateCustomerRequest();

 

    req.setFirstName("John");

    req.setLastName("Doe");

    req.setCompany("ACME, Inc.");

    req.setCustomerType(1);

    req.setCustomerStatus(1);

    req.setEmail("joecool@me.com");

    req.setPhone("555-555-5555");

    req.setMainAddress1("123 Some Street");

    req.setMainCity("Dallas");

    req.setMainState("TX");

    req.setMainZip("75207");

    req.setMailState("1");

    req.setMailCountry("1");

    req.setOtherState("1");

    req.setOtherCountry("1");

    req.setTaxIDType("SSN");

    req.setMiddleName("1");

    req.setNameSuffix("1");

    req.setBinaryPlacementPreference(1);

    req.setUseBinaryHoldingTank(1);

    req.setMainAddressVerified(1);

    req.setMailAddressVerified(1);

    req.setOtherAddressVerified(1);

    req.setPayableTy("Check");

 

    //Send Request to Server and Get Response

    CreateCustomerResponse res = api.getExigoApiSoap().createCustomer(req, auth);

 

    //Now examine the results:

}

catch (Exception ex)

{

    System.out.println("Error: " + ex.getMessage());

}

CSV

This method does not support csv output.