Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
maxLevel3
typeflat

...

This section provides further details on the operations related to customers.

Anchor

...

createCustomer

...

createCustomer
Creating a new customer

The createCustomer operation creates a new customer. 

Code Block
languagexml
titlecreateCustomer
<vend.createCustomer>
    <customerCode>{$ctx:customerCode}</customerCode>
    <companyName>{$ctx:companyName}</companyName>
    <firstName>{$ctx:firstName}</firstName>
    <lastName>{$ctx:lastName}</lastName>
    <phone>{$ctx:phone}</phone>
    <mobile>{$ctx:mobile}</mobile>
    <fax>{$ctx:fax}</fax>
    <email>{$ctx:email}</email>
    <website>{$ctx:website}</website>
    <physicalAddress1>{$ctx:physicalAddress1}</physicalAddress1>
    <physicalAddress2>{$ctx:physicalAddress2}</physicalAddress2>
    <physicalSuburb>{$ctx:physicalSuburb}</physicalSuburb>
    <physicalCity>{$ctx:physicalCity}</physicalCity>
    <physicalPostcode>{$ctx:physicalPostcode}</physicalPostcode>
    <physicalState>{$ctx:physicalState}</physicalState>
    <physicalCountryId>{$ctx:physicalCountryId}</physicalCountryId>
    <postalAddress1>{$ctx:postalAddress1}</postalAddress1>
    <postalAddress2>{$ctx:postalAddress2}</postalAddress2>
    <postalSuburb>{$ctx:postalSuburb}</postalSuburb>
    <postalCity>{$ctx:postalCity}</postalCity>
    <postalPostcode>{$ctx:postalPostcode}</postalPostcode>
    <postalState>{$ctx:postalState}</postalState>
    <postalCountryId>{$ctx:postalCountryId}</postalCountryId>
    <customerGroupId>{$ctx:customerGroupId}</customerGroupId>
    <customerGroupName>{$ctx:customerGroupName}</customerGroupName>
    <twitter>{$ctx:twitter}</twitter>
    <enableLoyalty>{$ctx:enableLoyalty}</enableLoyalty>
    <dateOfBirth>{$ctx:dateOfBirth}</dateOfBirth>
    <sex>{$ctx:sex}</sex>
    <customField1>{$ctx:customField1}</customField1>
    <customField2>{$ctx:customField2}</customField2>
    <customField3>{$ctx:customField3}</customField3>
    <customField4>{$ctx:customField4}</customField4>
	<note>{$ctx:note}</note>
</vend.createCustomer>
Properties
  • customerCode: The unique identifier for the customer.
  • companyName: Name of the company the customer belongs to.
  • firstName: First name of the customer.
  • lastName: Last name of the customer.
  • phone: Fixed number of the customer.
  • mobile: Mobile number of the customer.
  • fax: Fax of the customer
  • email: E-mail of the customer.
  • website: Website of the customer.
  • physicalAddress1: Address line 1 of the customer.
  • physicalAddress2: Address line 2 of the customer.
  • physicalSuburb: Suburb of the customer.
  • physicalCity: City of the customer.
  • physicalPostcode: Post code of the customer.
  • physicalState: State of the customer.
  • physicalCountryId: The ID of the country of the customer.
  • postalAddress1: Postal Address line 1 of the customer.
  • postalAddress2: Postal Address line 2 of the customer.
  • postalSuburb: Postal suburb of the customer.
  • postalCity: Postal city of the customer.
  • postalPostcode: Postal post code of the customer.
  • postalState: Postal state of the customer.
  • postalCountryId: Postal country ID of the customer.
  • customerGroupId: The ID of the group to which the customer will be put.
  • customerGroupName: Name of the group to which the customer will be put.
  • twitter: Twitter ID of the customer.
  • enableLoyalty: Indicates whether or not to enable loyalty for the customer.
  • dateOfBirth: Date of birth of the customer.
  • sex: Gender of the customer.
  • customField1: Custom Field 1 of the customer.
  • customField2: Custom Field 2 of the customer.
  • customField3: Custom Field 3 of the customer.
  • customField4: Custom Field 4 of the customer.
  • note: Note of the customer.
  
Anchor
request
request
Sample request

...

Code Block
languagexml
titleupdateCustomer
<vend.updateCustomer>
	<customerCode>{$ctx:customerCode}</customerCode>
    <companyName>{$ctx:companyName}</companyName>
    <firstName>{$ctx:firstName}</firstName>
    <lastName>{$ctx:lastName}</lastName>
    <phone>{$ctx:phone}</phone>
    <mobile>{$ctx:mobile}</mobile>
    <fax>{$ctx:fax}</fax>
    <email>{$ctx:email}</email>
    <website>{$ctx:website}</website>
    <physicalAddress1>{$ctx:physicalAddress1}</physicalAddress1>
    <physicalAddress2>{$ctx:physicalAddress2}</physicalAddress2>
    <physicalSuburb>{$ctx:physicalSuburb}</physicalSuburb>
    <physicalCity>{$ctx:physicalCity}</physicalCity>
    <physicalPostcode>{$ctx:physicalPostcode}</physicalPostcode>
    <physicalState>{$ctx:physicalState}</physicalState>
    <physicalCountryId>{$ctx:physicalCountryId}</physicalCountryId>
    <postalAddress1>{$ctx:postalAddress1}</postalAddress1>
    <postalAddress2>{$ctx:postalAddress2}</postalAddress2>
    <postalSuburb>{$ctx:postalSuburb}</postalSuburb>
    <postalCity>{$ctx:postalCity}</postalCity>
    <postalPostcode>{$ctx:postalPostcode}</postalPostcode>
    <postalState>{$ctx:postalState}</postalState>
    <postalCountryId>{$ctx:postalCountryId}</postalCountryId>
    <customerGroupId>{$ctx:customerGroupId}</customerGroupId>
    <customerGroupName>{$ctx:customerGroupName}</customerGroupName>
    <twitter>{$ctx:twitter}</twitter>
    <enableLoyalty>{$ctx:enableLoyalty}</enableLoyalty>
    <dateOfBirth>{$ctx:dateOfBirth}</dateOfBirth>
    <sex>{$ctx:sex}</sex>
    <customField1>{$ctx:customField1}</customField1>
    <customField2>{$ctx:customField2}</customField2>
    <customField3>{$ctx:customField3}</customField3>
    <customField4>{$ctx:customField4}</customField4>
    <note>{$ctx:note}</note>
	<customerId>{$ctx:customerId}</customerId>
</vend.updateCustomer>
Properties
  • customerCode: The unique identifier for the customer.
  • companyName: Name of the company the customer belongs to.
  • firstName: First name of the customer.
  • lastName: Last name of the customer.
  • phone: Fixed number of the customer.
  • mobile: Mobile number of the customer.
  • fax: Fax of the customer
  • email: E-mail of the customer.
  • website: Website of the customer.
  • physicalAddress1: Address line 1 of the customer.
  • physicalAddress2: Address line 2 of the customer.
  • physicalSuburb: Suburb of the customer.
  • physicalCity: City of the customer.
  • physicalPostcode: Post code of the customer.
  • physicalState: State of the customer.
  • physicalCountryId: The ID of the country of the customer.
  • postalAddress1: Postal Address line 1 of the customer.
  • postalAddress2: Postal Address line 2 of the customer.
  • postalSuburb: Postal suburb of the customer.
  • postalCity: Postal city of the customer.
  • postalPostcode: Postal post code of the customer.
  • postalState: Postal state of the customer.
  • postalCountryId: Postal country ID of the customer.
  • customerGroupId: The ID of the group to which the customer will be put.
  • customerGroupName: Name of the group to which the customer will be put.
  • twitter: Twitter ID of the customer.
  • enableLoyalty: Indicates whether or not to enable loyalty for the customer.
  • dateOfBirth: Date of birth of the customer.
  • sex: Gender of the customer.
  • customField1: Custom Field 1 of the customer.
  • customField2: Custom Field 2 of the customer.
  • customField3: Custom Field 3 of the customer.
  • customField4: Custom Field 4 of the customer.
  • note: Note of the customer.
  • customerId: The ID of the customer to update.
  
Anchor
request
request
Sample request

...

Code Block
languagexml
titlelistCustomers
<vend.listCustomers>
    <id>{$ctx:id}</id>
    <code>{$ctx:code}</code>
    <email>{$ctx:email}</email>
	<since>{$ctx:since}</since>
</vend.listCustomers>
Properties
  • id: If included, searches for customers with the given unique ID. The ID option cannot be used with the code or e-mail options.
  • code: If included, searches for customers with the given customer code. The code option cannot be used with ID or e-mail options.
  • email: If included, searches for customers with the given e-mail address. This is an exact match search. The e-mail option cannot be used with the ID or code options.
  • since: If included, searches for customers modified since the given time. The provided date and time should be in UTC and formatted according to ISO 8601.
  
Anchor
request
request
Sample request

...