ApiRing AntCrm apis description

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: “[email protected]”}]

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.

(“[email protected]”)

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:

““[email protected]””]

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.

(“[email protected]”)

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: “[email protected]”}]

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. (“[email protected]”)

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: [“[email protected]”]

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: [“[email protected]”]

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: "[email protected]", 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:

[email protected]”}], “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": "[email protected]"

}

],

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

[email protected]”}], // 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": "[email protected]"

}

],

"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”: “[email protected]”, // 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. (“[email protected]”)

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

}