Contacts are shared across the entire system and are used to send event notifications, to determine ship-to/bill-to, pay-to/return-to addresses in Order Entry and Purchasing transactions, and to determine tax on transactions.


Get Contact Object Definition

lookup

List all the fields and relationships for the contact object:

<lookup>
    <object>CONTACT</object>
</lookup>

Parameters

Name Required Type Description
object Required string Use CONTACT

List Contacts

query

List the record number and name for each contact:

<query>
    <object>CONTACT</object>
    <select>
        <field>RECORDNO</field>
        <field>CONTACTNAME</field>
    </select>
</query>

Parameters

Name Required Type Description
object Required string Use CONTACT
select Required sequence One or more field names and an optional aggregate function such as count or sum. Returning all fields is not supported.
filter Optional object Query filter expression. Check the value of a single field using operators such as equalto/like, or multiple fields using and/or. Query fields on related objects using the dot operator (for example, VENDOR.CREDITLIMIT on APBILL).
orderby Optional object Provide an order element with a field name and choose an ascending or descending sort order, for example:
<order>
        <field>RECORDNO</field>
        <descending/>
</order>
options Optional object Set the caseinsensitive element to true for a case-insensitive query:
    <caseinsensitive>true</caseinsensitive>
In a multi-entity company, set the showprivate element to true to query data in private entities:
   <showprivate>true</showprivate>
pagesize Optional integer Custom page size between 1 and 2000 items (Default: 100)
offset Optional integer Point at which to start indexing into records (Default: 0)

List Contacts (Legacy)

readByQuery

<readByQuery>
    <object>CONTACT</object>
    <fields>*</fields>
    <query></query>
    <pagesize>100</pagesize>
</readByQuery>

Parameters

Name Required Type Description
object Required string Use CONTACT
fields Optional string Comma-separated list of fields on the object to list. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value.
query Required string SQL-like query based on fields on the object. The following operators are supported: <, >, >=, <=, =, like, not like, in, not in, IS NOT NULL, IS NULL, AND, OR. Illegal XML characters must be properly encoded, and single quotes must be escaped with backslashes ('Jane\'s Deli'). Joins are not supported.
pagesize Optional integer Custom page size between 1 and 1000 items (Default: 100)

Get Contact

read

<read>
    <object>CONTACT</object>
    <keys>1</keys>
    <fields>*</fields>
</read>

Parameters

Name Required Type Description
object Required string Use CONTACT
keys Required string Contact RECORDNO to get
fields Optional string Comma-separated list of fields on the object to get. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value.

Get Contact by Name

readByName

<readByName>
    <object>CONTACT</object>
    <keys>TEST</keys>
    <fields>*</fields>
</readByName>

Parameters

Name Required Type Description
object Required string Use CONTACT
keys Required string CONTACTNAME to get
fields Optional string Comma-separated list of fields on the object to get. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value.

Create Contact

create

<create>
    <CONTACT>
        <CONTACTNAME>hello</CONTACTNAME>
        <PRINTAS>world</PRINTAS>
    </CONTACT>
</create>

Parameters

Name Required Type Description
CONTACT Required object Object to create

CONTACT

Name Required Type Description
CONTACTNAME Required string Contact name to create
PRINTAS Required string Print as
COMPANYNAME Optional string Company name
TAXABLE Optional boolean Taxable. Use false for No, true for Yes. (Default: true)
TAXGROUP Optional string Contact tax group name
PREFIX Optional string Prefix
FIRSTNAME Optional string First name
LASTNAME Optional string Last name
INITIAL Optional string Middle name
PHONE1 Optional string Primary phone number
PHONE2 Optional string Secondary phone number
CELLPHONE Optional string Cellular phone number
PAGER Optional string Pager number
FAX Optional string Fax number
EMAIL1 Optional string Primary email address
EMAIL2 Optional string Secondary email address
URL1 Optional string Primary URL
URL2 Optional string Secondary URL
STATUS Optional string Status. Use active for Active or inactive for Inactive (Default: active)
MAILADDRESS Optional object Mail address

MAILADDRESS

Name Required Type Description
ADDRESS1 Optional string Address line 1
ADDRESS2 Optional string Address line 2
CITY Optional string City
STATE Optional string State/province
ZIP Optional string Zip/postal code
COUNTRY Optional string Country
ISOCOUNTRYCODE Optional string ISO country code. When ISO country codes are enabled in a company, both COUNTRY and ISOCOUNTRYCODE must be provided.

Create Contact (Legacy)

create_contact

<create_contact>
    <contactname>Hello</contactname>
    <printas>World</printas>
</create_contact>

Parameters

Name Required Type Description
contactname Required string Contact name to create
printas Required string Print as
companyname Optional string Company name
taxable Optional boolean Taxable. Use false for No, true for Yes. (Default: true)
taxgroup Optional string Contact tax group name
prefix Optional string Prefix
firstname Optional string First name
lastname Optional string Last name
initial Optional string Middle name
phone1 Optional string Primary phone number
phone2 Optional string Secondary phone number
cellphone Optional string Cellular phone number
pager Optional string Pager number
fax Optional string Fax number
email1 Optional string Primary email address
email2 Optional string Secondary email address
url1 Optional string Primary URL
url2 Optional string Secondary URL
status Optional string Status. Use active for Active or inactive for Inactive (Default: active)
mailaddress Optional object Mail address
taxid Optional string Tax ID

mailaddress

Name Required Type Description
address1 Optional string Address line 1
address2 Optional string Address line 2
city Optional string City
state Optional string State/province
zip Optional string Zip/postal code
country Optional string Country
isocountrycode Optional string ISO country code. When ISO country codes are enabled in a company, both country and isocountrycode must be provided.
latitude Optional string Latitude
longitude Optional string Longitude

Update Contact

update

<update>
    <CONTACT>
        <RECORDNO>11</RECORDNO>
        <PRINTAS>hello world</PRINTAS>
    </CONTACT>
</update>

Parameters

Name Required Type Description
CONTACT Optional object Object to update

CONTACT

Name Required Type Description
RECORDNO Optional integer Record number of contact to update. Required if not using CONTACTNAME.
CONTACTNAME Optional string Contact name. Required if not using RECORDNO.
PRINTAS Optional string Print as
COMPANYNAME Optional string Company name
TAXABLE Optional boolean Taxable. Use false for No, true for Yes. (Default: true)
TAXGROUP Optional string Contact tax group name
PREFIX Optional string Prefix
FIRSTNAME Optional string First name
LASTNAME Optional string Last name
INITIAL Optional string Middle name
PHONE1 Optional string Primary phone number
PHONE2 Optional string Secondary phone number
CELLPHONE Optional string Cellular phone number
PAGER Optional string Pager number
FAX Optional string Fax number
EMAIL1 Optional string Primary email address
EMAIL2 Optional string Secondary email address
URL1 Optional string Primary URL
URL2 Optional string Secondary URL
STATUS Optional string Status. Use active for Active otherwise use inactive for Inactive (Default: active)
MAILADDRESS Optional object Mail address

MAILADDRESS

Name Required Type Description
ADDRESS1 Optional string Address line 1
ADDRESS2 Optional string Address line 2
CITY Optional string City
STATE Optional string State/province
ZIP Optional string Zip/postal code
COUNTRY Optional string Country
ISOCOUNTRYCODE Optional string ISO country code. When ISO country codes are enabled in a company, both COUNTRY and ISOCOUNTRYCODE must be provided.

Update Contact (Legacy)

update_contact

<update_contact contactname="Hello">
    <printas>World</printas>
</update_contact>

Parameters

Name Required Type Description
contactname Required string Contact name to update
printas Required string Print as
companyname Optional string Company name
taxable Optional boolean Taxable. Use false for No, true for Yes. (Default: true)
taxgroup Optional string Contact tax group name
prefix Optional string Prefix
firstname Optional string First name
lastname Optional string Last name
initial Optional string Middle name
phone1 Optional string Primary phone number
phone2 Optional string Secondary phone number
cellphone Optional string Cellular phone number
pager Optional string Pager number
fax Optional string Fax number
email1 Optional string Primary email address
email2 Optional string Secondary email address
url1 Optional string Primary URL
url2 Optional string Secondary URL
status Optional string Status. Use active for Active or inactive for Inactive (Default: active)
mailaddress Optional object Mail address
taxid Optional string Tax ID

mailaddress

Name Required Type Description
address1 Optional string Address line 1
address2 Optional string Address line 2
city Optional string City
state Optional string State/province
zip Optional string Zip/postal code
country Optional string Country
isocountrycode Optional string ISO country code. When ISO country codes are enabled in a company, both country and isocountrycode must be provided.
latitude Optional string Latitude
longitude Optional string Longitude

Delete Contact

delete

<delete>
    <object>CONTACT</object>
    <keys>112</keys>
</delete>

Parameters

Name Required Type Description
object Required string Use CONTACT
keys Required string Contact RECORDNO to delete

Delete Contact (Legacy)

delete_contact

<delete_contact contactname="hello"></delete_contact>

Parameters

Name Required Type Description
contactname Required string Contact name to delete

Create Contact Tax Group (Legacy)

create_contacttaxgroup

<create_contacttaxgroup>
    <name>TN-19</name>
</create_contacttaxgroup>

Parameters

Name Required Type Description
name Required string Name

Delete Contact Tax Group (Legacy)

delete_contacttaxgroup

<delete_contacttaxgroup name="TN-14"></delete_contacttaxgroup>

Parameters

Name Required Type Description
name Required string Contact tax group name to delete

Provide feedback