> For the complete documentation index, see [llms.txt](https://evotech-1.gitbook.io/evotech-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://evotech-1.gitbook.io/evotech-docs/huong-dan-van-hanh/api-public/points/cap-nhat-diem.md).

# Cập nhật điểm

**HTTP request**

* **URL:** {{baseUrl}}/api/public/v1/points/adjust
* **Method:** POST

**Example request**

```powershell
curl --location 'https://stg-admin.evotech.vn/api/public/v1/points/adjust' \
--header 'Content-Type: application/json-patch+json' \
--header 'X-Webhook-Secret: 5tiiBzAbj/USfdFzRPQ/4y3hS5d61Gh3Z8tQ3+8jCxI=' \
--data '{
  "userId": "3e77822f-26a5-4b7a-b795-4decc003d7d1", 
  "points": 500,
  "isAddition": true, 
  "externalSource": "Odoo", 
  "externalId": "TEST-TRANSACTION-0011",
  "note": "Cộng điểm cho khách hàng nga 1"
}'
```

**Tham số header**

* **Content-Type**: application/json-patch+json
* **X-Webhook-Secret**: \<secret-key>

**Request: Json**

<table><thead><tr><th width="173">Thuộc tính</th><th width="130">Kiểu dữ liệu</th><th width="341">Mô tả</th><th>Required?</th></tr></thead><tbody><tr><td>userId</td><td>String</td><td>ID khách hàng</td><td>Y</td></tr><tr><td>points</td><td>number</td><td>Điểm</td><td>Y</td></tr><tr><td>isAddition</td><td>boolean</td><td><p>Thay đổi điểm:</p><ul><li><strong>true :</strong>  Cộng điểm</li><li><strong>false :</strong>  Trừ điểm</li></ul></td><td>Y</td></tr><tr><td>externalSource</td><td>String</td><td>Tên hoặc mã của hệ thống bên thứ 3 cung cấp (Sapo, KiotViet, NhanhVN, Odoo, Misa, GoboxAsia, Other)</td><td>N</td></tr><tr><td>externalId</td><td>String</td><td>ID của danh mục từ hệ thống bên thứ 3</td><td>Y</td></tr><tr><td>note</td><td>String</td><td>Ghi chú</td><td>Y</td></tr></tbody></table>

**Example respond**

```json
{
    "timestamp": "2026-04-18T17:06:30.345",
    "success": true,
    "message": "Success",
    "data": true,
    "pagination": null
}
```

**Response: Json**

<table><thead><tr><th width="231">Thuộc tính</th><th width="125">Kiểu dữ liệu</th><th>Mô tả</th></tr></thead><tbody><tr><td>timestamp</td><td>String</td><td>Thời gian chính xác (dấu thời gian) khi phản hồi này được tạo ra</td></tr><tr><td>message</td><td>String</td><td>Message thông báo chung về trạng thái của yêu cầu. (Ví dụ: "Success" nếu thành công).</td></tr></tbody></table>
