> For the complete documentation index, see [llms.txt](https://apidocs.nhanh.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.nhanh.vn/v3/vpage/bao-cao/meta_capi_report.md).

# Meta Conversions API

* Lấy báo cáo Meta CAPI

## Request

* Xem sample Postman.

```curl
curl --location 'https://vpage.open.nhanh.vn/v3.0/report/capi?appId={{appId}}&businessId={{businessId}}' \
--header 'Authorization: {{accessToken}}' \
--header 'Content-Type: application/json' \
--body '{
        "filters": {
        "createdAt": {
            "to": 1767200399,
            "from": 1764522000
        },
        "timeZone": "Asia/Ho_Chi_Minh",
        "pageIds": [],
        "events": ["Purchase", "LeadSubmitted"]
    },
}'
```

### Filters

| Key       | Type   | Required | Description                                                                                         |
| --------- | ------ | -------- | --------------------------------------------------------------------------------------------------- |
| pageIds   | array  | Required | Danh sách pageIds                                                                                   |
| createdAt | array  | Required | Khoảng thời gian gửi, tối đa 31 ngày. ( ví dụ "createdAt": {"from": 1764522000, "to": 1766768399} ) |
| timeZone  | string | optional | Múi giờ. Default: Asia/Ho\_Chi\_Minh                                                                |
| events    | array  | Required | Danh sách event                                                                                     |

## Response

* Xem cấu trúc chung [tại đây](/v3/readme.md#response).

### Failed response

* Xem các mã lỗi chung [tại đây](/v3/readme.md#failed-response).

### Successful response

```json
{
  "code": 1,
  "data": [
    {
      "date": "2025-12-15",
      "events": [
        {
          "event": "Purchase",
          "totalOrders": 2,
          "totalCustomerShipFee": 23400,
          "totalOrderValue": 0,
          "totalRevenue": 23400
        }
      ]
    },
    {
      "date": "2025-12-29",
      "events": [
        {
          "event": "LeadSubmitted",
          "totalOrders": 1
        },
        {
          "event": "Purchase",
          "totalOrders": 1,
          "totalCustomerShipFee": 0,
          "totalOrderValue": 1000,
          "totalRevenue": 1000
        }
      ]
    }
  ]
}
```
