Skip to main content

Contact Service

Contact describe the customers and vendors, that are associated with the Tenant. You can create, update, retrieve, and delete contacts by using API.

Contact Object

Attributes


AttributeTypeDescription
idlongUnique identifier for the contact.
codestringUnique code assigned to the contact.
documentSequenceCodestringUnique code associated with the contact.
sequenceFormatstringSequence format id.
namestringName of the contact.
receivableAccountCodestringAccount code of contact's account receivable.
payableAccountCodestringAccount code of contact's account payable.
isAccountNumberFlagbooleanHas the value true if account number is being sent instead of account code or false otherwise.
currencyCodeenumCurrency code. Possible values for currency code.
paymentTermCodestringPayment term code for contact.
paymentTermstringPayment term name for contact.
billingAddresslistList of billing addresses for contact. Attributes for Address.
shippingAddresslistList of shipping addresses for contact. Attributes for Address.
statusenumStatus of the contact. Possible values for contact status.
customerbooleanHas the value true if the contact is customer or false if the contact is not customer.
vendorbooleanHas the value true if the contact is vendor or false if the contact is not vendor.
deletedbooleanHas the value true if the contact is deleted or false if the contact is not deleted.
tenantIdlongTenant id to whom contact is associated with.
theyOweYouBigDecimalAmount owe by others for contact.
youOweThemBigDecimalAmount that contact owe to others.
totalNetAmountBigDecimalReceivable account opening amount.
totalBillAmountBigDecimalPayable account opening amount.
invoicesmapMap of invoice type to the list of invoices associated with contact. Attributes of Invoice.
customFieldlistList of key-value pairs for custom field name and its value.
emailIdstringEmail address of the contact.
contactMasterIdstringUnique identifier of the contact master record.
contactNumberstringContact phone number.
otherEmailsstringOther email addresses for the contact.
creditLimitBigDecimalCredit limit for the contact.
creditLimitInBaseCurrencyBigDecimalCredit limit for the contact in the tenant's base currency.
isCreditLimitApplicablebooleanHas the value true if a credit limit is applicable to the contact or false otherwise.
invoiceCreditLimitTypeenumInvoice credit limit type. Possible values for credit limit type.
isIncludeCurrentInvoicebooleanHas the value true if the current invoice should be included in the credit limit check or false otherwise.
quotationCreditLimitTypeenumQuotation credit limit type. Possible values for credit limit type.
isIncludeCurrentQuotationbooleanHas the value true if the current quotation should be included in the credit limit check or false otherwise.
salesOrderCreditLimitTypeenumSales order credit limit type. Possible values for credit limit type.
isIncludeCurrentSalesOrderbooleanHas the value true if the current sales order should be included in the credit limit check or false otherwise.
intercompanyTypeenumContact type, either parent or subsidiary. Possible values for contact type.
purchasePriceListslistSet of purchase price list ids applied to the contact.
salesPriceListslistSet of sales price list ids applied to the contact.
autoChargebooleanHas the value true if auto payment charge is enabled for the contact or false otherwise.
attachmentsWithLinklistList of attachment details including download links.
salesPersonMasterlistList of sales persons associated with the contact.
productslistList of vendor products associated with the contact.
avalaraCustomerCodestringAvlara customer code.
uenstringUEN of contact.
taxNumberstringTax number of contact.
taxExemptedbooleanHas the value true if the contact is exempted from tax or false if the contact is not exempted from tax.
taxExemptionNostringTax exemption number of contact.
taxExemptionReasonstringTax exemption reason for contact.
peppolIdstringPeppolId of contact.
singaporeGovtbooleanHas the value true if the contact is a Singapore government agency or false otherwise.
businessUnitstringBusiness unit, when the contact is a Singapore government agency.
attentionTostringContact name within a government agency.
extCompanyNamestringCompany name from an external app the contact was synced from.
additionalPaymentInfoobjectAdditional payment information for the contact.
is1099EligiblebooleanHas the value true if the contact is 1099 eligible or false otherwise.

API


Create Contact

Creates a new contact.

Parameters

Code

  @Autowired
private ContactsApiClient contactsApiClient;

public ContactDto createContact(ContactDto contactDto, String accessToken){
return this.contactsApiClient.createContact(contactDto, accessToken);
}

Retrieve Contact

Retrieves the details of an existing contact. You only need to supply the unique contact code that was returned upon contact creation.

Parameters

Code

  @Autowired
private ContactsApiClient contactsApiClient;

public ContactDto retrieveContactByCode(String contactCode, String accessToken){
return this.contactsApiClient.getClientByCode(contactCode, accessToken);
}

List All Contacts

Returns list of contacts.

Parameters

Code

  @Autowired
private ContactsApiClient contactsApiClient;

public List<ContactDto> getContacts(String accessToken, int limit){
return this.contactsApiClient.getAllContacts(accessToken, limit);
}

Update Contact

Updates the specified contact by passing parameters with unique identified id of the contact.

Parameters

Code


@Autowired
private ContactsApiClient contactsApiClient;

public ContactDto updateContact(long contactId, ContactDto contactDto, String accessToken){
return this.contactsApiClient.updateContact(contactId, contactDto, accessToken);
}

Patch Update Contact

Updates the specified contact by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Parameters

Code


@Autowired
private ContactsApiClient contactsApiClient;

public ContactAttributeUpdateDto updateContactAttribute(long contactId, ContactAttributeUpdateDto contactAttributeUpdateDto, String accessToken){
return this.contactsApiClient.updateContactAttributes(contactId, contactAttributeUpdateDto, accessToken);
}

Delete Contact

Deletes an existing contact. You only need to supply the unique identifier that was returned upon contact creation.

Parameters

Code

  @Autowired
private ContactsApiClient contactsApiClient;

public void deleteContact(long contactId, String accessToken){
this.contactsApiClient.deleteContact(contactId, accessToken);
}

Get Contacts Summary

Returns a summary count of contacts, customers, and vendors.

Parameters

Code

  @Autowired
private ContactsApiClient contactsApiClient;

public ContactSummaryDto getContactsSummary(String accessToken){
return this.contactsApiClient.getContactsSummary(accessToken);
}

Objects


ContactAttributeUpdateDto

AttributeTypeDescription
billingAddresslistList of billing addresses for contact. Attributes for Address.
shippingAddresslistList of shipping addresses for contact. Attributes for Address.
statusenumStatus of the contact. Possible values for contact status.
customerbooleanHas the value true if the contact is customer or false if the contact is not customer.
vendorbooleanHas the value true if the contact is vendor or false if the contact is not vendor.
customFieldlistList of key-value pairs for custom field name and its value.

Address

AttributeTypeDescription
contactNamestringName of the contact associated with the address.
address1stringAddress line 1.
address2stringAddress line 2.
countrystringCountry.
countryCodestringCountry code.
statestringState.
stateCodestringState code.
citystringCity.
postalCodestringPostal Code.
preferredbooleanHas the value true if the address is default or false if the address is not default address.
placeOfSupplystringPlace of supply.
destinationOfSupplystringDestination of supply.
mobileCountryCodestringCountry code of the mobile number.
mobileNumberstringMobile number.
emailIdstringEmail address.
customFieldslistList of key-value pairs for custom field name and its value.

Invoice

AttributeTypeDescription
idlongUnique identifier for the invoice.
invoiceDatedateInvoice date.
invoiceDueDatedateInvoice due date.
memostringInvoice memo.
documentCodestringDocument code of invoice.
totalAmountBigDecimalTotal amount of invoice.
dueAmountBigDecimalDue amount of invoice.
taxAmountBigDecimalTax amount of invoice.
typestringsale_invoice for invoice or purchase invoice for bill.

ContactSummaryDto

AttributeTypeDescription
totalintTotal number of contacts.
customerintNumber of contacts that are customers.
vendorintNumber of contacts that are vendors.

Enums


CONTACT_STATUS

  • ACTIVE
  • INACTIVE

CREDIT_LIMIT_TYPE

  • IGNORE
  • WARN
  • BLOCK

CONTACT_TYPE

  • PARENT
  • SUBSIDIARY

SUPPORTED_CURRENCY_TYPE

  • AFN
  • ALL
  • DZD
  • AOA
  • ARS
  • AMD
  • AWG
  • AZN
  • BSD
  • BHD
  • BDT
  • BBD
  • BYN
  • BZD
  • BMD
  • BTN
  • BOB
  • BAM
  • BRL
  • BND
  • BGN
  • BIF
  • KHR
  • CAD
  • CVE
  • KYD
  • CLP
  • CNY
  • COP
  • KMF
  • CDF
  • CRC
  • HRK
  • CUC
  • DJF
  • DOP
  • EGP
  • ERN
  • ETB
  • FKP
  • FJD
  • XAF
  • GMD
  • GEL
  • GHS
  • GIP
  • DKK
  • GTQ
  • GNF
  • GYD
  • HTG
  • HNL
  • HKD
  • HUF
  • ISK
  • INR
  • IDR
  • IRR
  • IQD
  • JMD
  • JPY
  • JOD
  • KZT
  • KES
  • KWD
  • KGS
  • LAK
  • LBP
  • LSL
  • LRD
  • LYD
  • MOP
  • MKD
  • MGA
  • MWK
  • MYR
  • MVR
  • MRO
  • MUR
  • MXN
  • MDL
  • MNT
  • MZN
  • MMK
  • NAD
  • NPR
  • NIO
  • NGN
  • KPW
  • OMR
  • PKR
  • ILS
  • PAB
  • PGK
  • PYG
  • PEN
  • PHP
  • PLN
  • QAR
  • RON
  • RUB
  • RWF
  • SHP
  • XCD
  • WST
  • STD
  • SAR
  • RSD
  • SCR
  • SLL
  • SGD
  • ANG
  • SBD
  • SOS
  • ZAR
  • KRW
  • SSP
  • EUR
  • LKR
  • SDG
  • SRD
  • NOK
  • SZL
  • SEK
  • CHF
  • SYP
  • TWD
  • TJS
  • TZS
  • THB
  • XOF
  • NZD
  • TOP
  • TTD
  • TND
  • TRY
  • TMT
  • AUD
  • UGX
  • UAH
  • AED
  • GBP
  • USD
  • UYU
  • VUV
  • VEF
  • VND
  • XPF
  • MAD
  • YER
  • ZMW
  • BWP
  • CNH