# 5. Point accumulation API

1. Point accumulation history

URL: <https://apiring.antbuddy.com/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" }]

2. Accumulate points

URL: <https://apiring.antbuddy.com/accumulate>

Method: POST

Content-Type: application/json

| **Parameters** | **Type** | **Required** | **Explain**                                                                                                                                                                                                                                                                    |
| -------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| code           | string   | AND          | Cumulative code                                                                                                                                                                                                                                                                |
| data           | object   | AND          | <p>{</p><p>“emails”: \[{type: “Work”, value:</p><p>“<xyz@example.com>”}], // customer email to redeem gift</p><p>“name”: “thong”, // name of customer redeeming gift</p><p>“phones”: \[{type: “Work”, value: “023232”}] // phone number of customer redeeming gift</p><p>}</p> |

Results returned: HTTP Response Code: 200

Response:

{

"success": 1, }


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.antbuddy.com/huong-dan-tich-hop-api-team-technical-api-integration-guide-technical-team/antcrm/5.-point-accumulation-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
