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.


List Contacts

readByQuery

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

Parameters

Name Required Type Description
object Required string Use CONTACT
fields Required string Comma separated list of fields on the object to list. Use * to return all fields.
query Required string SQL-like query based on fields on the object. Illegal XML characters must be properly encoded. The following SQL operators are supported: <, >, >=, <=, =, like, not like, in, not in. When doing NULL comparisons: IS NOT NULL, IS NULL. Multiple fields may be matched using the AND and OR operators. Joins are not supported. Single quotes in any operands must be escaped with a backslash - For example, the value Erik's Deli would become 'Erik\'s Deli'.
pagesize Optional integer Set a 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 The contact RECORDNO to get
fields Required string Comma separated list of fields on the object to get. Use * to return all fields.

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 The contact CONTACTNAME to get
fields Required string Comma separated list of fields on the object to get. Use * to return all fields.

Create Contact

create

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

Parameters

Name Required Type Description
CONTACT Optional object The object to create

CONTACT

Name Required Type Description
CONTACTNAME Required string The 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 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

Update Contact

update

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

Parameters

Name Required Type Description
CONTACT Optional object The object to update

CONTACT

Name Required Type Description
RECORDNO Required integer Record number of contact
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

Delete Contact

delete

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

Parameters

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

Provide feedback