# 6. API get redeem

1. Point accumulation history

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

2. Accumulate points&#x20;

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

Method: POST

Content-Type: application/json

| **Parameters** | **Type** | **Required** | **Explain**                                                                                                                                     |
| -------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| code           | string   | AND          | Gift code code                                                                                                                                  |
| data           | object   | AND          | <p>{</p><p>“email”: “<xyz@example.com>”, // email of customer redeeming gift “phone”: “023232” // phone number of customer redeeming gift }</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/6.-api-get-redeem.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.
