Antbuddy.us
  • AntBuddy Inc Documents
    • Guide to Register and Payment
      • Register and Login
        • 1. Register
        • 2. Log in
      • Payment
    • AntCrm Customer Management
      • Settings
        • Create users
        • Create group
        • Invite users to the company
        • View permissions
        • Activity permissions
        • What is Ticket? How to create Ticket?
      • Conversation
        • Omni Facebook user guide
          • 1. Facebook integration
          • 2. Setting Up Facebook Fan page
          • 3. Message Management
            • 3.1. Sending Message
            • 3.2. Viewing Conversation History
          • 4. Comment Management
            • 4.1. Customer Support Commenting
            • 4.2. Hiding comments
            • 4.3. Editing comments
            • 4.4. Delete Comments
            • 4.5. Liking/Unliking Comments
          • 5. Post Management
          • 6. Changing the Session Owner
          • 7. Adding support user
          • 8. Tagging session
          • 9. Sending images
          • 10. Marking done
          • 11. Adding message template
            • 11.1. Add/Edit/Delete templates
            • 11.2. Using message template
          • 12. Setting Up Session Timeout
          • 13. Configuring the Timeout
          • 14. Setting Up Auto-Reply and Sending Messages
          • 15. Setting Up Response Time and Pre-Expiration Warnings
          • 16. Customer operations
          • 17. Marking unread
          • 18. Setting up Omnichannel chat Categories
          • 19. Configuring layout
        • Instagram use guide
          • 1. Instagram integration
          • 2. Using Instagram Omni conversations
            • 2.1 Guide to setting up Instagram on AntCRM
              • 2.1.1 Adding support
              • 2.1.2 Assignment configuration
              • 2.1.3 Interactive Configuration
          • 3. Manage chat with customers
            • 3.1 Send message to customer
            • 3.2 View session history
          • 4. Comment Manager
            • 4.1 Hide comment
            • 4.2 Delete comment
          • 5. Change the person assign to session
          • 6. Adding user support
          • 7. Tags for session
          • 8. Send image
          • 9. Mark as done
          • 10. Adding message template
            • 10.1 Add/Edit/Delete template
            • 10.2 Using messenger template
          • 11. Setting up session timeout)
          • 12. Setting Up Response Time and Pre-Expiration Warnings
        • Whatsapp use guide
          • 1. Integrate whatsapp on CRM
          • 2. Setting whatsapp on CRM
            • 2.1 Adding user support
            • 2.2 Setting close session
            • 2.3 ssignment Configuration
            • 2.4 Interaction Configuration
          • 3. Managing Chats with Whatsapp Customers
            • 3.1 Send message
            • 3.2 Viewing Conversation History
            • 3.3 Changing the Session's Assigned Agent
          • 4. Adding a Support User
          • 5. Tagging a Session
          • 6. Sending image
          • 7. Marking a Session as Completed
          • 8. Adding, Edit and Delete omni message template
          • 9. Session Closure Time
          • 10. Configuring the wait time
          • 11. Setting response Time and Pre-expiration Alerts
          • 12. Creating Whatsapp SMS campaign
          • 13. Sending Whatsapp SMS Campaign
          • 14. Sending the Product Carousel
          • 15. Cross-Channel Campaign Guide
          • 16. Create WhatsApp Template via Meta Business Suite
          • 17. Run Template in AntCRM platform
        • Shopee use guide
        • Live chat use guide
        • Lazada use guide
      • Report
        • View Omnichannel conversation report
      • Customer Experience Management
        • 1. Customer survey setting
          • 1.1 Conversations
          • 1.2 Call Center
          • 1.3 Rating criteria setting
          • 1.4 Setting landing page
        • 2. How to use the Agent interface
        • 3. Satisfaction Report
    • WhatsApp User Guide
      • Guide to Setting Up WhatsApp on AntCRM
      • Guide to Managing Chats with Whatsapp Customers
      • How to Add and Use Omni Message Templates?
      • Guide to Setting Session
      • Guide to Creating and sending Whatsapp SMS campaign
      • Guide to Sending the Product Carousel
      • Cross-Channel Campaign Guide
      • Guide to sending Product Sample Messages on WhatsApp (Product Catalog)
    • User manual for AntBot ChatBot
      • Integrate Omni-channel messaging with Chatbot AntBot
      • The basic features of AntBot Chatbot
      • Use Cases of AntBot Chatbot
      • Detailed explanation of the Chatbot node
      • How to create a google cloud bot
  • Integration Document Guide
    • AntRing
      • API Registration
      • Use API
      • API List
      • Error Code
    • AntBot
      • AntBot API
      • Voice OTP
      • HTTP Response
    • AntCrm
      • ApiRing AntCrm apis description
Powered by GitBook
On this page
  • 2. Trading API
  • 3. Product API
  • 4. API ticket
  • 5. Point accumulation API
  • 6. Redeem API
  • 7. API segment
  • 9. API get list of telecalls
  • 10.API get campaign list
  • 11.API get rating list
  1. Integration Document Guide
  2. AntCrm

ApiRing AntCrm apis description

PreviousAntCrm

AntCRM

The document is used for integrating with the AntCRM system to synchronize customer information, order information, and ticket information.

Domains used:

  • Production: https://apiring.antbuddy.com

Security:

  • Secret key, to ensure safety, requests to AntCRM need to contain a pre-agreed secret key in the request header:

headers: {

“apikey”: “<secret key>”

}

  • secret key:

List of APIs

1. Client 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: /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

email

string

email

page

limit

number number

Sequence number of pages, each page has a maximum of 20 customers Number of records per page

Results returned:

HTTP Response Code: 200

Response:

[{

"name": “”,

"contactType": ””,

“type”: “”,

“leadId”: “”,

“customerId”: “”,

“dateOfBirth”: “”, “gender”: “”, addresses: [], phones: [], emails: [], industry: “", in the: [], bgInfo: “”, stage: “”, tags: [], sourceContact: “”, responsibleStaff: “”, cusFields: [], scoreAvailable: Number, // Accumulated points scoreRank: Number, // Rank score rankName: “” // Member rank, createdAt: “”, // Customer creation time updatedAt: “” // Customer update time

}]

  1. Add customers URL: /contacts Method: 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”} ]

emails

array

Email

[{type: “Work”, value: “xyz@example.com”}]

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")

responsibleStaff

string

Email of the employee in charge.

(“nhanvien1@gmail.com”)

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

  1. Edit customer

URL: /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”} ]

emails

array

Email

[type: “Work”, value:

““xyz@example.com””]

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")

responsibleStaff

string

Email of the person in charge.

(“nhanvien1@gmail.com”)

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

  1. Delete customer

URL: /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

}

  1. Add customers in bulk

URL: /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”} ]

emails

array

Email

[{type: “Work”, value: “xyz@example.com”}]

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")

responsibleStaff

string

Email of the person in charge. (“nhanvien1@gmail.com”)

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

2. Trading API

  1. List of transactions or details of a transaction via id on Ant CRM URL:

/opportunities

Method: GET

Content-Type: application/json

Parameters

Type

Cat ch set c

Explain

number

string

Id of opportunity

page

number

Page number, maximum 20 transactions per page

limit

number

Number of records per page

Results returned:

Parameters

Type

Required

Explain

name

string

AND

Trading name

receiverName

string

AND

Customer name

opportunityIdApiRing

string

Code orders

dealByUsers

array

Officer in charge. For example: [“thong.nguyen@antbuddy.com”]

dealWith

receiverPhone

Object

string

{

“customerId”: “123”,

“name”: “thong”,

“phones”: [{type: “Work”, value: “023232”}],

“customerIdApiRing”: “Customer Id” }

Customer phone number

HTTP Response Code: 200

Response:

[{ cusFields: [

{ name: "Shipping unit", value: “Fast delivery”

}

],

description: "", groupPackage: [], name: "test", number: 3609, receiverAddressObj: {street: "", streetName: "", city: "", state: "", wards: "", cityCode: "", stateCode:

""}, receiverName: "Tuyen Do ", receiverPhone: "0123444534", stage: "", value: 4520000,

branch: “ // branch or store name, createdAt: “”, // Order creation time updatedAt: “” // Order update time

}]

  1. Add transaction

URL: /opportunities

Method: POST

Content-Type: application/json

receiverAddressObj

object

Customer address. For example: {

city: "Ho Chi Minh City",

state: "Tan Binh district", street: "3", //(apartment number) streetName: "Nguyen Kiem",

wards: "Ward 12",

"country": {

"code": "VN",

"name": "Vietnam"

}

}

Record the same as the address on the system.

groupPackage

array

Information line. For example:

[

{ name: "Beef combo", // product name quantity: 1, // quantity

typeDiscount: 1, (0: cash, 1: percent) // type of discount discount: 10, // discount amount or % discount value: 1000, // Product price productIdApiRing: “1”, // product id note: "Grilled beef" // Note, code: “Sku” // Product code

}

]

Note:

- The combo name and product in the combo must match the corresponding combo and product name

value

number

Value of the transaction. If there is no value, the system will calculate the value of the transaction according to the price on the system.

receiverNote

string

Delivery notes

description

string

Transaction description

stage

string

Transaction status

branch

string

Store or branch name

cusFields

array

AntCRM custom fields. [

{

name: "Shipping unit", value: “Fast delivery”

}

]

Results returned:

createdAt

Number

Creation time

Type: Timestamp

shipping_cost

Number

Shipping Fee

HTTP Response Code: 200

Response:

{

"success": 1,

"number”: 9457 (id of transaction on antcrm) }

  1. Edit transaction

URL: /opportunities

Method: PUT

Content-Type: application/json

Parameters

Type

Required

Explain

number

string

AND

id on crm

name

string

Trading name

receiverName

string

Customer name

receiverPhone

string

Customer phone number

receiverAddress Obj

groupPackage

object

array

Customer address. For example: {

city: "Ho Chi Minh City",

state: "Tan Binh district", street: "3", //(apartment number) streetName: "Nguyen Kiem",

wards: "Ward 12",

"country": {

"code": "VN",

"name": "Vietnam"

}

}

Record the same as the address on the system.

Information line. For example:

[

{ name: "Beef combo", // product name quantity: 1, // quantity

typeDiscount: 1, (0: cash, 1: percent) //

type of discount discount: 10, // discount amount or % discount value: 1000, // Product price productIdApiRing: “1”, // product id note: "Grilled beef" // Note, code: “Sku” // Product code

}

]

Note:

- The combo name and product in the combo must match the corresponding combo and product name on the system.

value

number

Value of the transaction. If there is no value, the system will calculate the value of the transaction according to the price on the system.

receiverNote

string

Delivery notes

description

string

Transaction description

stage

string

Transaction status

branch

string

Store or branch name

cusFields

array

Custom fields on AntCRM.

[

{

name: "Shipping unit", value: “Fast delivery”

}

]

shipping_cost

Number

Shipping fee

Results returned:

HTTP Response Code: 200

Response:

{

"success": 1,

"number”: 9457 (id of transaction on antcrm) }

  1. Delete transaction

URL: /opportunities

Method: DELETE

Content-Type: application/json

Parameters

Type

Cat ch set c

Explain

number

string

A

N

D

id of the transaction on antcrm

Results returned: HTTP Response Code: 200

Response:

{

"success": 1 }

  1. Add bulk transactions URL: /opportunities/package

Method: POST

Content-Type: application/json

Limit 100 orders per request

Body: [{order data A}, {order data B}]

Parameters

Type

Required

Explain

name

string

AND

Trading name

receiverName

string

AND

Customer name

opportunityIdApiRing

string

Code orders

dealByUsers

array

Officer in charge. For example: [“thong.nguyen@antbuddy.com”]

dealWith

receiverPhone

Object

string

{

“customerId”: “123”,

“name”: “thong”,

“phones”: [{type: “Work”, value: “023232”}],

“customerIdApiRing”: “Customer Id” }

Customer phone number

receiverAddressObj

object

Customer address. For example: {

city: "Ho Chi Minh City",

state: "Tan Binh district", street: "3", //(apartment number) streetName: "Nguyen Kiem",

wards: "Ward 12",

"country": {

"code": "VN",

"name": "Vietnam"

}

}

Record the same as the address on the system.

groupPackage

array

Information line. For example:

[

{name: "Beef combo", // product name quantity: 1, // quantity typeDiscount: 1, (0: cash, 1: percent) //

type of discount discount: 10, // discount amount or % discount value: 1000, // Product price productIdApiRing: “1”, // product id note: "Grilled beef" // Note, code: “Sku” // Product code

}

]

Note:

- The combo name and product in the combo must match the corresponding combo and product name on the system.

Value of the transaction. If there is no value, the system will calculate the value of the transaction according to the price on the system.

value

number

The transaction value. If no value is provided, the system will calculate the transaction value based on the system's pricing

receiverNote

number

Delivery notes

description

string

Transaction description

stage

string

Transaction status

branch

string

Store or branch name

cusFields

array

Custom fields on AntCRM.

[

{ name: "Shipping unit", value: “Fast delivery”

}

]

createdAt

Number

Creation time

Type: Timestamp

shipping_cost

Number

Shipping fee

Results returned: HTTP Response Code: 200

Response:

{

"success": 1,

"number”: [9457, 9458, 9459] (antcrm transaction id) }

  1. Edit transaction URL: /opportunities/package

Method: PUT

Content-Type: application/json Limit 100 orders per request

Body: [{order data A}, {order data B}]

Parameters

Type

Required

Explain

number

string

AND

id on crm

name

string

Trading name

receiverName

string

Customer name

receiverPhone

string

Customer phone number

receiverAddress Obj

groupPackage

object

array

Customer address. For example: {

city: "Ho Chi Minh City",

state: "Tan Binh district", street: "3", //(apartment number) streetName: "Nguyen Kiem",

wards: "Ward 12",

"country": {

"code": "VN",

"name": "Vietnam"

}

}

Record the same as the address on the system.

Information line. For example:

[

{ name: "Beef combo", // product name quantity: 1, // quantity typeDiscount: 1, (0: cash, 1: percent) // type

of discount discount: 10, // discount amount or % discount value: 1000, // Product price productIdApiRing: “1”, // product id note: "Grilled beef" // Note,

code: “Sku” // Product code

}

]

Note:

- The combo name and product in the combo must match the corresponding combo and product name on the system.

value

number

Value of the transaction. If there is no value, the system will calculate the value of the transaction according to the price on the system.

receiverNote

string

Delivery notes

description

string

Transaction description

stage

string

Transaction status

branch

string

Store or branch name

cusFields

array

AntCRM custom fields.

[

{ name: "Shipping unit", value: “Fast delivery”

}

]

shipping_cost

Number

Shipping Fee

Results returned:

HTTP Response Code: 200

Response:

{

"success": 1,

"number”: [9457, 9458] (antcrm transaction id) }

3. Product API

  1. List of products or details of a product via code on Ant CRM

URL: /products

Method: GET

Content-Type: application/json

Parameters

Type

Required

Explain

code

string

product code

type

string

Product type. If it is a combo, then the type is passed as combo, and for individual products, the type is product. If not passed, all will be taken.

page

number

Page number, maximum 20 products per page

limit

number

Number of records per page

Results returned: HTTP Response Code: 200

Response:

[{ value: "",

name: "test", code: “3609”, productIdApiRing: “”,

_id: “” }]

  1. Add products URL: /products

Method: POST

Content-Type: application/json

Parameters

Type

Required

Explain

name

string

AND

Product's name

code

string

AND

Product code on CRM

productIdApiRing

string

AND

Product code

value

string

Amount of money

canEdit

Boolean

Can the product price be updated when placing an order?

Results returned:

HTTP Response Code: 200

Response:

{

"success": 1,

"code”: 9457 (product code on antcrm) }

  1. Repair products

URL: /products

Method: PUT

Content-Type: application/json

Parameters

Type

Required

Explain

name

string

Product's name

code

string

Product code on CRM

productIdApiRing

string

AND

Product code

value

string

Amount of money

canEdit

Boolean

Can the product price be updated when placing an order?

Results returned:

HTTP Response Code: 200

Response:

{

"success": 1,

"code”: 9457 (product code on antcrm) }

  1. Delete product

URL: /products

Method: DELETE

Content-Type: application/json

Parameters

Type

Required

Explain

productIdApiRing

string

AND

Results returned:

HTTP Response Code: 200

Response:

{

"success": 1

}

4. API ticket

a. List of tickets or details of a ticket via id on Ant CRM

URL: /tickets

Method: GET

Content-Type: application/json

Parameters

Type

Required

Explain

TicketId

string

Id of ticket

page

number

Page number, maximum 20 transactions per page

limit

number

Number of records per page

Results returned: HTTP Response Code: 200

Response:

[{

SLA: "", TicketId: 17464, assignedTo: "thong.nguyen@antbuddy.com", group: “”, category: “”, resolutionTypeOb: “”, contact: {}, cusFields: [] deal: {}, files: []

priority: "Medium" status: "Assigned" summary: "<p>test</p>" title: "[Phone] Clearance test", createdAt: “”, // Ticket creation time updatedAt: “” // Ticket update time

}]

  1. Add tickets

URL: /tickets

Method: POST

Content-Type: application/json

Parameters

Type

Required

Explain

title

string

AND

Ticket name

ticketIdApiRing

string

Ticket code

summary

string

Summary/Summary

priority

string

Priority. Default: Medium

SLA

string

AND

Sla

contact

object Y

Y

{

“id”: “661ca720f70843211b05712a” //

Customer id code If yes, it is not required.

“emails”: [{type: “Work”, value:

“xyz@example.com”}], “name”: “thong”, // required

“phones”: [{type: “Work”, value: “023232”}]

}

deal

object

group

string

category

string

status

string

resolutionTypeOb

string

files

array

cusFields

array

AntCRM custom fields.

[

{ name: "Shipping

unit",

value: “Fast delivery”

}

]

Results returned:

HTTP Response Code: 200

Response:

{

"success": 1,

"TicketId”: 9457 (ticket id on antcrm) }

  1. Edit tickets

URL: /tickets

Method: PUT

Content-Type: application/json

Parameters

Type

Required

Explain

TicketId

string

AND

title

string

Ticket name

summary

string

Summary/Summary

priority

string

Priority

SLA

string

deal

object

category

string

status

string

resolutionTypeOb

string

filed

array

cusFields

array

AntCRM custom fields.

[

{ name: "Shipping

unit",

value: “Fast delivery”

}

]

Results returned:

HTTP Response Code: 200

Response:

{

"success": 1,

"number”: 9457 (id of transaction on antcrm) }

  1. Delete tickets

URL: /tickets

Method: DELETE

Content-Type: application/json

Parameters

Type

Required

Explain

TicketId

string

AND

ticket id on antcrm

Results returned: HTTP Response Code: 200

Response:

{

"success": 1

}

5. Point accumulation API

  1. Point accumulation history

URL: /history-point?type=point

Method: GET

Content-Type: application/json

Parameters

Type

Required

Explain

createdAtRangeFrom

number

Start time

createdAtRangeTo

number

End time

phone

String

Customer phone number

email

String

Customer email

page

number

Page number, maximum 20 records per page

Results returned:

HTTP Response Code: 200

Response:

[{

"type": 1, // cumulative type

"score": 100, // accumulated points

"status": 1, // accumulated status (success: 1, failure: 0)

"product": {

"code": "TIVI01", // cumulative product code

"name": "TV", // cumulative product name

"id": "64d9f28b2b3ba308b322c710"

},

"contact": {

"phones": [

{

"type": "Work",

"_id": "64db290a7796fe24bfe876a8",

"value": "0867123456"

}

],

"name": "Garnacho",

"emails": [

{

"type": "Work",

"_id": "64db290a7796fe24bfe876a9",

"value": "garnacho@gmail.com"

}

],

"lastname": "",

"customerId": 475,

"id": "64db290a7796fe24bfe876a7"

},

"org": "62c10674cbe832bc9245a5b8",

"code": "TIVInpmx8b98pfg", // cumulative code

"serialNumber": "npmx8b98pfg", // serial number tích luỹ

"createdAt": 1692084490615, // accumulated time

"id": "64db290a7796fe24bfe876b4" }]

  1. Accumulate points

URL: /accumulate

Method: POST

Content-Type: application/json

Parameters

Type

Required

Explain

code

string

AND

Cumulative code

data

object

AND

{

“emails”: [{type: “Work”, value:

“xyz@example.com”}], // customer email to redeem gift

“name”: “thong”, // name of customer redeeming gift

“phones”: [{type: “Work”, value: “023232”}] // phone number of customer redeeming gift

}

Results returned: HTTP Response Code: 200

Response:

{

"success": 1, }

6. Redeem API

  1. Point accumulation history

URL: /history-point

Method: GET

Content-Type: application/json

Parameters

Type

Cat ch set c

Explain

createdAtRangeFrom

number

Start time

createdAtRangeTo

number

End time

phone

String

Customer phone number

email

String

Customer email

page

number

Page number, maximum 20 records per page

Results returned:

HTTP Response Code: 200

Response:

[{

"type": 2, // exchange type

"score": 10, // number of points used to redeem gifts

"status": 1, // redemption status (success: 1, failure: 0)

"gift": {

"code": "DAUMAY01", // gift code

"name": "Locomotive", // name of gift

"score": 10, // number of points to redeem gifts

"id": "64d9f2ec2b3ba308b322c782"

},

"contact": {

"phones": [

{

"type": "Work",

"_id": "64db290a7796fe24bfe876a8",

"value": "0867123456"

}

],

"name": "Garnacho",

"emails": [

{

"type": "Work",

"_id": "64db290a7796fe24bfe876a9",

"value": "garnacho@gmail.com"

}

],

"customerId": 475, // contact id on CRM

"id": "64db290a7796fe24bfe876a7"

},

"org": "62c10674cbe832bc9245a5b8",

"createdAt": 1692085265818, // redemption time

"id": "64db2c11cbad5f4fdd254567" }]

  1. Accumulate points URL: /redeem

Method: POST

Content-Type: application/json

Parameters

Type

Required

Explain

code

string

AND

Gift code code

data

object

AND

{

“email”: “xyz@example.com”, // email of customer redeeming gift “phone”: “023232” // phone number of customer redeeming gift }

Results returned: HTTP Response Code: 200

Response:

{

"success": 1,

}

7. API segment

URL: /segments/set-contact

Method: POST

Content-Type: application/json Limit 100 contacts per request

Body: { contacts: [{customer data A}, {customer data B}], segmentId: “CRM segment id”

}

Parameters

Type

Required

Explain

name

string

AND

Customer name

customerIdApiRing

string

N

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

string

Sex. (0: Male, 1: Female, 2: Other). Default is 2

dateOfBirth

string

Date of birth. (“March 15, 2000”)

gender

string

Sex. (0: Male, 1: Female, 2: Other). Default is 2

addresses

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

array

Phone number.

[{type:”Work”, value: “01223223”} ]

emails

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")

responsibleStaff

string

Email of the person in charge. (“nhanvien1@gmail.com”)

cusFields

array

Custom fields on AntCRM.

[

{ name: "Shipping unit", value: “Fast delivery”

}

]

Results returned:

HTTP Response Code: 200

Response: Ok

8. API get list of telesales

URL: /telesales

Method: GET

Parameters

Type

Cat ch set c

Explain

campaignId

string

A

N

D

Campaign id

survey

Boolean

If survey is true, only telesales with values in the survey form will be taken

dateStart

string

Telesale creation time. For example:2024-03-13T06:24:20.673Z

dateEnd

string

Telesale creation time. For example:2024-03-19T06:24:20.673Z

page Number Serial number of the page. limit Number Number of records per page. (Maximum 100 records)

Results returned:

{

"success": true,

"data": [], // list of records

"total": 2,

"limit": 20

}

Sample data:

curl --location

'https://apiring.antbuddy.com/telesales?campaignId=65f8faf6f829af63ddc831dc&survey=true&dateStart=202 4-03-13T06%3A24%3A20.673Z&dateEnd=2024-03-19T06%3A24%3A20.673Z' \ --header 'apikey:

9. API get list of telecalls

URL: /telecalls

Method: GET

Parameters

Type

Required

Explain

campaignId

string

AND

Campaign id

dateStart

string

Call making time. For example:2024-03-13T06:24:20.673Z

dateEnd

string

Call making time. For example:2024-03-19T06:24:20.673Z

page

Number

Page number.

limit

Number

Number of records per page. (Maximum 100 records)

Results returned:

{

"success": true,

"data": [], // list of records

"total": 2,

"limit": 20

}

Sample data: curl --location

'https://apiring.antbuddy.com/telesales?campaignId=65f8faf6f829af63ddc831dc&survey=true&dateStart=202

4-03-13T06%3A24%3A20.673Z&dateEnd=2024-03-19T06%3A24%3A20.673Z' \ --header 'apikey:'

10.API get campaign list

URL: /telecalls

Method: GET

Parameters

Type

Required

Explain

dateStart

string

Call making time. For example:2024-03-13T06:24:20.673Z

dateEnd

string

Call making time. For example:2024-03-19T06:24:20.673Z

page

Number

Page number.

limit

Number

Number of records per page. (Maximum 100 records)

Results returned:

{

"success": true,

"data": [], // list of records

"total": 2,

"limit": 20

}

Curl sample: curl --location 'https://apiring.antbuddy.com/campaigns?limit=300&page=1' \

--header 'apikey:' \

--data ''

11.API get rating list

URL: /rating

Method: GET

Parameters

Type

Required

Explain

dateStart

string

Rating time. For example:2024-03-13T06:24:20.673Z

dateEnd

string

Ratingi time. For example:2024-03-19T06:24:20.673Z

page

Number

Page number.

limit

Number

Number of records per page. (Maximum

100 records)

type

String

Rating source

VD: ticket, deal, call, omni, other

rating_score

Number

Rating score VD:

ZNS/EMAIL/ECOM/CALL/ZALO/F

ACEBOOK

Results returned:

{

"success": true,

"data": [], // list of records

"total": 2,

"limit": 20

}

Sample data:

{

"success": true,

"data": [

{

"_id": "6613a508dc31dd206d0239b5", "org": "62c10674cbe832bc9245a5b8",

"session": {

"_id": "66139e5904bf311bf963a979",

"channel": "ZALO",

"normalize": "nguyen-dinh-minh-thong",

"isDone": true,

"rating_value": 3,

"rating_comment": "",

"conversationId": "36737553777762229502111865670400779963",

"conversationName": "RiskEhn Dinh Minh Thong",

"snippet": "test adidas dawda", "senderName": "RiskEhn Dinh Minh Thong",

"senderAvatar": "https://s120-ava-talk.zadn.vn/1/e/4/8/0/120/16d1cfb17288a106fe9f0fe847173314.jpg", "conversationAvatar": "https://s120-ava-talk.zadn.vn/1/e/4/8/0/120/16d1cfb17288a106fe9f0fe847173314.jpg",

"pageId": "3673755377776222950",

"doneAt": 1712738571708

},

"contact": {

"_id": "66139e5804bf311bf963a975",

"contactType": "lead",

"type": 0,

"lastname": "",

"gender": 2,

"dateOfBirth": null,

"dateOfBirth2": "",

"name": "RiskEhn Dinh Minh Thong",

"addresses": [

{

"type": "Work",

"street": "",

"city": "",

"state": "",

"zip": "",

"_id": "66139e5804bf311bf963a976",

"country": {

"code": "VN",

"name": "Vietnam"

}

}

],

"phones": [],

"emails": [],

"leadId": 2964 },

"rating_score": 3,

"comment": null,

"rating_time": 1712563464292,

"type": "omni",

"source": "ZALO",

"__in": 0

},

{

"_id": "6613a4541da91b1fd51d67de", "org": "62c10674cbe832bc9245a5b8",

"session": {

"_id": "66139e5904bf311bf963a979", // CRM customer id code

"channel": "ZALO",

"normalize": "nguyen-dinh-minh-thong",

"isDone": true,

"rating_value": 3,

"rating_comment": "",

"conversationId": "36737553777762229502111865670400779963",

"conversationName": "RiskEhn Dinh Minh Thong",

"snippet": "test adidas dawda", "senderName": "RiskEhn Dinh Minh Thong",

"senderAvatar": "https://s120-ava-talk.zadn.vn/1/e/4/8/0/120/16d1cfb17288a106fe9f0fe847173314.jpg", "conversationAvatar": "https://s120-ava-talk.zadn.vn/1/e/4/8/0/120/16d1cfb17288a106fe9f0fe847173314.jpg",

"pageId": "3673755377776222950",

"doneAt": 1712738571708

},

"contact": {

"_id": "66139e5804bf311bf963a975",

"contactType": "lead",

"type": 0,

"lastname": "",

"gender": 2,

"dateOfBirth": null,

"dateOfBirth2": "",

"name": "RiskEhn Dinh Minh Thong",

"addresses": [

{

"type": "Work",

"street": "",

"city": "",

"state": "",

"zip": "",

"_id": "66139e5804bf311bf963a976",

"country": {

"code": "VN",

"name": "Vietnam"

}

}

],

"phones": [],

"emails": [],

"leadId": 2964 },

"rating_score": 5,

"comment": null,

"rating_time": 1712563284246,

"type": "omni",

"source": "ZALO",

"__in": 0

},

{

"_id": "6613a30300e6c11e1173dce4",

"org": "62c10674cbe832bc9245a5b8",

"session": {

"_id": "66139e5904bf311bf963a979",

"channel": "ZALO",

"normalize": "nguyen-dinh-minh-thong",

"isDone": true,

"rating_value": 3,

"rating_comment": "",

"conversationId": "36737553777762229502111865670400779963",

"conversationName": "RiskEhn Dinh Minh Thong",

"snippet": "test adidas dawda", "senderName": "RiskEhn Dinh Minh Thong",

"senderAvatar": "https://s120-ava-talk.zadn.vn/1/e/4/8/0/120/16d1cfb17288a106fe9f0fe847173314.jpg", "conversationAvatar": "https://s120-ava-talk.zadn.vn/1/e/4/8/0/120/16d1cfb17288a106fe9f0fe847173314.jpg",

"pageId": "3673755377776222950",

"doneAt": 1712738571708

},

"contact": {

"_id": "66139e5804bf311bf963a975",

"contactType": "lead",

"type": 0,

"lastname": "",

"gender": 2,

"dateOfBirth": null,

"dateOfBirth2": "",

"name": "RiskEhn Dinh Minh Thong",

"addresses": [

{

"type": "Work",

"street": "",

"city": "",

"state": "",

"zip": "",

"_id": "66139e5804bf311bf963a976",

"country": {

"code": "VN",

"name": "Vietnam"

}

}

],

"phones": [],

"emails": [],

"leadId": 2964 },

"rating_score": 4,

"comment": null,

"rating_time": 1712562947587,

"type": "omni",

"source": "ZALO",

"__in": 0

}

],

"limit": 20

}