Skip to main content

Contacts

Customers, vendors and employees. A contact can be both a customer and a vendor.

List contacts​

GET /masterdata/getContacts/{gtimeStamp?} — Permission: any role

QueryTypeNotes
balanceDuebooleantrue to include receivable/payable balances on each contact.

Returns Contact[]. getContactsNew takes the same parameters and returns the same shape; it is the newer implementation of the same call.

Get a contact​

GET /masterdata/getContact/{contactId} — Permission: any role — returns a Contact, or 404.

Create or update a contact​

POST /masterdata/upsertContact — Permission: Contact · Write

JSON body: a Contact. contactId and contactName are required. Contact names must be unique within a business; a duplicate returns 400.

curl -X POST "$BASE_URL/masterdata/upsertContact" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contactId": "c3b1f0e2-6a52-4c1a-9d0e-2f6b9a7d1e10",
"contactName": "Acme Traders",
"displayName": "Acme Traders",
"custFlg": true,
"vendorFlg": false,
"contactTyp": ["Customer"],
"emailTxt": "accounts@acme.example",
"mobileNumber": "9876543210",
"billingAddress": "12 Market Road, Chennai 600001",
"taxIdNo": "33ABCDE1234F1Z5"
}'

Response 200:

{ "contact": { "contactId": "c3b1f0e2-...", "contactName": "Acme Traders", "...": "..." }, "status": "..." }

Opening receivable/payable amounts (receivableAmt, payableAmt) cannot be negative.

POST /masterdata/upsertContactwFile does the same with attachments — see Uploading files. Permission: Contact · Write.

Contact balance​

GET /masterdata/getContactBalance/{contactId} — Permission: Contact · Read

QueryTypeNotes
dateFilterJSON (required)For all-time use {"predefinedDateFilter":"AllTime"}.

Response:

{
"receivables": 12500.00,
"payables": 0,
"unallocatedReceivableCredit": 0,
"unallocatedPayableCredit": 0,
"receivableCreditSources": [],
"payableCreditSources": []
}

getContactBalanceNew/{contactId} takes the same query and returns just receivables and payables.

Delete contacts​

EndpointPermissionBody
DELETE /masterdata/deleteContact/{contactId}Contact · Full—
POST /masterdata/deleteContactsContact · FullJSON array of contact IDs, e.g. ["id1","id2"]

A contact that has transactions cannot be deleted (409). deleteContacts processes each ID independently and returns a summary:

{
"success": true,
"message": "Bulk delete completed. 2 deleted, 1 skipped, 0 failed.",
"summary": { "total": 3, "deleted": 2, "skipped": 1, "failed": 0 },
"details": { "success": [...], "skipped": [...], "failed": [...] }
}

Data model​

Only the commonly used properties are listed. Unless marked required, every property is optional. Properties that the server sets itself (bizId, createdBy, modifiedBy, app, and creation/modification timestamps) should be left out of requests. The OpenAPI document has the complete definitions.

Contact​

PropertyTypeNotes
contactIdstringRequired. Caller-generated unique ID.
contactNamestringRequired. Unique within the business.
displayName, firstName, lastName, companyNamestring
custFlg, vendorFlgbooleanWhether the contact is a customer and/or a vendor.
contactTypstring[]Any of Customer, Vendor, Employee.
emailTxt, mobileNumber, workPhone, website, faxNumberstring
billingAddress, shippingAddressstringFree text.
addressesobject[]Additional structured addresses.
taxIdNostringTax registration number (GSTIN/VAT/…).
inGSTNo, inGSTRegister, inGSTTreatment, panNostringIndia GST fields. Prefer taxIdNo for the GSTIN.
taxExempt, isBusinessboolean
currIdstringCurrency ID.
paymentTermsstringPayment terms ID.
creditLimitnumber
receivableAmt, payableAmtnumberOpening balances — cannot be negative.
contactCategory, contactGroupstring
parentContactstringParent contact ID for branches/sub-contacts.
customFieldsobject[]User-defined fields.
portalAccess, portalEmailboolean, stringCustomer-portal access.