Skip to main content

Contact Service

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

Contact Object

Attributes


AttributeTypeDescription
idlongUnique identifier for the contact.
codestringUnique code assigned to the contact.
namestringName of the contact.
receivableAccountCodestringAccount code of contact's account receivable.
payableAccountCodestringAccount code of contact's account payable.
currencyCodeenumCurrency code. Possible values for currency code.
paymentTermCodestringPayment term 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.
invoiceslistList of invoices associated with contact. Attributes of Invoice.
customFieldjsonobjectKey-value pair for custom field name and its value
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.

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);
}

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.
customFieldjsonobjectKey-value pair for custom field name and its value.

Address

AttributeTypeDescription
address1stringAddress line 1.
address2stringAddress line 2.
countrystringCountry.
statestringState.
citystringCity.
postalCodestringPostal Code.
preferredbooleanHas the value true if the address is default or false if the address is not default address.

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.

Enums


CONTACT_STATUS

  • ACTIVE
  • INACTIVE

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