1. API customer
Customer API
There are 3 types of customers on AntCrm:
Lead (contactType: “lead")
Contact (contactType: “customer", type: 0) - Account (contactType: “customer", type: 1)
a. Customer list or details of 1 customer via phone number or email or id on Ant CRM
URL: https://apiring.antbuddy.com/contacts
Method: GET
Content-Type: application/json
Parameters
Type
Required
Getting Explained
contactType
string
“lead” or “customer”
type
string
Customer Type. (0: contact, 1: account)
phone
string
phone number
customerId
string
Id of contact or account
leadId
string
lead id
string
page
number
Sequence number of pages, each page has a maximum of 20 customers
limit
number
Number of records per page
updateAtf
string
Updated from. For exp: 2025-05-30
updateAtt
string
Updated to. For exp: 2025-05-30
createdAtf
string
Created from. For exp: 2025-05-30
createdAtt
string
Created from. For exp: 2025-05-30
Results returned:
HTTP Response Code: 200
Response:
{ "name": “”, "contactType": ””, “type”: “”, “leadId”: “”, “customerId”: “”, “dateOfBirth”: “”, “gender”: “”, addresses: [], phones: [], emails: [], industry: “", im: [], bgInfo: “”, stage: “”, tags: [], sourceContact: “”, responsibleStaff: “”, cusFields: [], scoreAvailable: Number, // Điểm tích luỹ scoreRank: Number, // Điểm hạng rankName: “” // Hạng thành viên, createdAt: “”, // Thời gian tạo khách hàng updatedAt: “” // Thời gian cập nhật khách hàng createdByBot: “” //Người tạo khách hàng "sourceLead"://Nếu khách hàng được convert từ lead { "_id": "676bba5b4fc70f0b668c8464", "code": "6", "name": "Website"}, "historiesAds": [ { "_id": "682713cc7965c52864ea2017", "fb_ads_id": "120226012811620067", "fb_post_id": "811442567679759", "createdAt": 1747391436702 } ]
b.Add customers
URL: https://apiring.antbuddy.com/contacts
hod: POST
Content-Type: application/json
Parameters
Type
Required
Explain
name
string
AND
Customer name
customerIdApiRing
string
AND
Customer's code
type
string
Customer Type. (0: contact, 1: account). Default is 0
contactType
string
“lead" or “customer". Default is lead
dateOfBirth
string
Date of birth. (“March 15, 2000”)
gender addresses
string array
Sex. (0: Male, 1: Female, 2: Other). Default is 2
Customer address.
[{ city: "Ho Chi Minh City", state: "Tan Binh District", street: "319", (house number) streetName: "Nguyen Kiem", wards: "Ward 12",
"country": {
"code": "VN",
"name": "Vietnam"
}
}]
Record the same as the address on the system.
phones
array
Phone number.
[{type:”Work”, value: “01223223”} ]
industry
string
Industry (“Real Estate”)
in the
array
Social network.
[{protocol: “Facebook”, “value”: “https://abc.com”}]
bgInfo
string
Note. (“VIP Customer”)
stage
string
Status. ("A new customer")
tags
string
Label.
[ “Not yet contacted”, “Contacted” ]
sourceContact
string
Contact source. ("Advertisement")
cusFields
array
Custom fields on AntCRM.
[
{ name: "Shipping
unit",
value: “Fast delivery”
]
}
Results returned:
HTTP Response Code: 200
Response:
{
"success": 1,
"leadId" or “customerId”: 9457 (customer id on antcrm) }
c. Edit customer
URL: https://apiring.antbuddy.com/contacts
Method: PUT
Content-Type: application/json
Parameters
Type
Catch Setc
Explain
leadId or customerId or customerIdApiRing
string
AND
Customer id on antcrm or customer code passed in
name
string
Customer name
dateOfBirth
string
Date of birth. (“March 15, 2000”)
gender
string
Sex. (0: Male, 1: Female, 2: Other)
addresses
phones
array
array
Customer address.
[{ city: "Ho Chi Minh City", state: "Tan Binh District", street: "319", (house number) streetName: "Nguyen Kiem", wards: "Ward 12",
"country": {
"code": "VN",
"name": "Vietnam"
}
}]
Record the same as the address on the system.
Phone number.
[{type:”Work”, value: “01223223”} ]
industry
string
Industry (“Real Estate”)
in the
array
Social network.
[protocol: “Facebook”, “value”: “
“https://abc.com”” ]
bgInfo
string
Note. (“VIP Customer”)
stage
string
Status. ("A new customer")
tags
string
Label.
[ “Not yet contacted”, “Contacted” ]
sourceContact
string
Contact source. ("Advertisement")
cusFields
array
Custom fields on AntCRM.
[
{
name: "Shipping unit",
value: “Fast delivery”
}
]
Results returned:
HTTP Response Code: 200
Response:
{
"success": 1,
"leadId" or “customerId”: 9457 (customer id on antcrm) }
d. Delete customer
URL: https://apiring.antbuddy.com/contacts
Method: DELETE
Content-Type: application/json
Parameters
Type
Cat ch set c
Explain
leadId or customerId or customerIdApiRing
string
A
N
D
Customer id on antcrm or customer code passed in
Results returned:
HTTP Response Code: 200
Response:
{
"success": 1
}
e. Bulk Add Customers
URL: https://apiring.antbuddy.com/contacts/package
Method: POST
Content-Type: application/json
Limit 100 contacts per request
Body: [{customer data A}, {customer data B}]
Parameters
Type
Cat ch set c
Explain
name
string
A
N
D
Customer name
customerIdApiRing
string
A
N
D
Customer's code
type
string
Customer Type. (0: contact, 1: account). Default is 0
contactType
string
“lead" or “customer". Default is lead
dateOfBirth
string
Date of birth. (“March 15, 2000”)
gender addresses
string array
Sex. (0: Male, 1: Female, 2: Other). Default is 2
Customer address.
[{ city: "Ho Chi Minh City", state: "Tan Binh District", street: "319", (house number) streetName: "Nguyen Kiem", wards: "Ward 12",
"country": {
"code": "VN",
"name": "Vietnam"
}
}]
Record the same as the address on the system.
phones
array
Phone number.
[{type:”Work”, value: “01223223”} ]
industry
string
Industry (“Real Estate”)
in the
array
Social network.
[{protocol: “Facebook”, “value”: “https://abc.com”}]
bgInfo
string
Note. (“VIP Customer”)
stage
string
Status. ("A new customer")
tags
string
Label.
[ “Not yet contacted”, “Contacted” ]
sourceContact
string
Contact source. ("Advertisement")
cusFields
array
Custom fields on AntCRM.
[
{ name: "Shipping unit", value: “Fast delivery”
}
]
Results returned:
HTTP Response Code: 200
Response:
{
"success": 1,
"leadId" or “customerId”: [9457, 9458, 9459] (customer id on antcrm) }
Last updated