Campaigns
GET/{version}/act_{account_id}/campaignsVia 360: GET https://partner.quantri360.com/v1/facebook/{version}/act_{account_id}/campaigns
Coming soon. This API already runs in production through 360 and pricing is being finalised — you can read the docs and prepare your integration now.
Description
Danh sách chiến dịch của một tài khoản quảng cáo kèm trạng thái, mục tiêu, kiểu mua, chiến lược giá thầu, ngân sách (chiến dịch dùng ngân sách cấp chiến dịch), thời gian chạy. Dùng để liệt kê chiến dịch đang chạy / tạm dừng, lấy id chiến dịch cho insight hoặc để bật tắt, đổi ngân sách.
- Đường dẫn có
act_<id>nên 360 tự chọn token của đúng tài khoản — không cầnplatform_shop_id. - Lọc
effective_status: ["DELETED"]bị từ chối: Meta trảerror_subcode 1815001"Yêu cầu đối tượng đã xóa không được hỗ trợ trong điểm cuối này". - Chiến dịch không có
daily_budget/lifetime_budget= ngân sách nằm ở từng nhóm quảng cáo (đọc ở/act_{account_id}/adsets). paging.nextcó thể mang phiên bản Graph khác bản bạn gọi (thấyv26.0khi gọiv25.0) — chỉ lấycursors.after.- Hạn mức Marketing API tính theo tài khoản quảng cáo; gọi dồn sẽ bị Meta trả code 17 / 80004 (User request limit reached) — chờ vài phút rồi gọi lại.
Request
Endpoint
GET https://partner.quantri360.com/v1/facebook/{version}/act_{account_id}/campaigns
Authentication & shop
| Name | In | Type | Sample | Description |
|---|---|---|---|---|
| Authorization | header | header | Bearer q360_live_ab12cd34_… | Khóa API của brand (tạo ở mục API key). Bắt buộc với mọi request. Brand suy từ key — không truyền mã brand. |
| platform_shop_id | query | string | act_123456789 hoặc 1234567890 | Tài sản Facebook brand đã nối với 360: tài khoản quảng cáo (act_<id> hoặc <id>), Page id hoặc Pixel id — lấy ở GET /v1/platforms. Có thể bỏ khi đường dẫn đã chứa act_<id> / page id của brand. |
Request parameters
| Name | In | Type | Required | Sample | Description |
|---|---|---|---|---|---|
| version | path | string | Yes | v25.0 | Phiên bản Graph API. |
| account_id | path | string | Yes | 5924809560908319 | Id tài khoản quảng cáo (số, không có act_). Phải là tài khoản brand đã nối, khác → 404. |
| fields | query | string | Yes | id,name,status,effective_status,objective,buying_type,bid_strategy,daily_budget,lifetime_budget,start_time,stop_time,created_time,updated_time | Trường cần lấy, cách nhau dấu phẩy. Không gửi fields thì 360 trả 400; Meta mặc định chỉ trả id. |
| effective_status | query | string | No | ["ACTIVE","PAUSED"] | Lọc trạng thái thực tế — PHẢI là mảng JSON (gửi ACTIVE trần → lỗi param effective_status must be an array). Giá trị: ACTIVE · PAUSED · ARCHIVED · IN_PROCESS · WITH_ISSUES … |
| limit | query | int | No | 100 | Số chiến dịch mỗi trang (mặc định 25). Gọi thật limit=5000 vẫn được nhận; nên giữ ≤ 500 và ít trường để tránh lỗi quá tải dữ liệu. |
| after | query | string | No | paging.cursors.after của trang trước. |
Pagination
Lặp khi phản hồi còn paging.next: gửi lại cùng tham số, thêm after = paging.cursors.after. Hết dữ liệu thì không còn paging.next.
Request examples
curl -s "https://partner.quantri360.com/v1/facebook/v25.0/act_5924809560908319/campaigns?fields=id%2Cname%2Cstatus%2Ceffective_status%2Cobjective%2Cdaily_budget%2Clifetime_budget%2Cstart_time%2Cstop_time&effective_status=%5B%22ACTIVE%22%2C%22PAUSED%22%5D&limit=100" \ -H "Authorization: Bearer $KEY"
Python
import requests
KEY = "q360_live_..." # khóa API của brand
r = requests.get(
"https://partner.quantri360.com/v1/facebook/v25.0/act_5924809560908319/campaigns",
params={
"fields": "id,name,status,effective_status,objective,daily_budget,lifetime_budget,start_time,stop_time",
"effective_status": "[\"ACTIVE\",\"PAUSED\"]",
"limit": 100
},
headers={"Authorization": f"Bearer {KEY}"},
timeout=60,
)
print(r.status_code)
print(r.json())Node.js
const KEY = 'q360_live_...'; // khóa API của brand
const url = new URL('https://partner.quantri360.com/v1/facebook/v25.0/act_5924809560908319/campaigns');
for (const [k, v] of Object.entries({"fields":"id,name,status,effective_status,objective,daily_budget,lifetime_budget,start_time,stop_time","effective_status":"[\"ACTIVE\",\"PAUSED\"]","limit":100})) url.searchParams.set(k, typeof v === 'object' ? JSON.stringify(v) : String(v));
const r = await fetch(url, {
method: 'GET',
headers: { Authorization: `Bearer ${KEY}` },
});
console.log(r.status, await r.json());PHP
<?php $key = 'q360_live_...'; // khóa API của brand $url = 'https://partner.quantri360.com/v1/facebook/v25.0/act_5924809560908319/campaigns' . '?' . http_build_query(['fields' => 'id,name,status,effective_status,objective,daily_budget,lifetime_budget,start_time,stop_time', 'effective_status' => '["ACTIVE","PAUSED"]', 'limit' => 100]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $key]); $res = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); echo $status, "\n", $res;
Response
Response fields (as returned by Facebook)
| Name | Type | Sample | Description |
|---|---|---|---|
| data | object[] | Chiến dịch, mới tạo trước; chỉ có các trường đã yêu cầu (trường không có giá trị thì vắng hẳn). | |
| id | string | 120250025975490254 | Id chiến dịch. |
| name | string | ||
| status | string | ACTIVE | Trạng thái người dùng đặt: ACTIVE · PAUSED · ARCHIVED · DELETED. |
| effective_status | string | ACTIVE | Trạng thái thực tế (xét cả tài khoản, lịch chạy, duyệt): ACTIVE · PAUSED · ARCHIVED · IN_PROCESS · WITH_ISSUES … |
| objective | string | OUTCOME_ENGAGEMENT | Mục tiêu: OUTCOME_ENGAGEMENT · OUTCOME_SALES · OUTCOME_TRAFFIC · OUTCOME_LEADS · OUTCOME_AWARENESS · OUTCOME_APP_PROMOTION. |
| buying_type | string | AUCTION | |
| bid_strategy | string | LOWEST_COST_WITHOUT_CAP | Chỉ có khi ngân sách đặt ở cấp chiến dịch. |
| daily_budget / lifetime_budget | string | 96050 | Ngân sách cấp chiến dịch, đơn vị nhỏ nhất của tiền tệ tài khoản (VND = đồng). VẮNG khi ngân sách đặt ở nhóm quảng cáo. |
| budget_remaining | string | 0 | |
| start_time / stop_time | string | 2026-09-23T15:09:57+0700 | ISO 8601 theo múi giờ tài khoản; `stop_time` vắng = chạy liên tục. |
| created_time / updated_time | string | ||
| paging | object | ||
| cursors | object | `{before, after}`. | |
| next | string | URL trang kế — `access_token` đã được 360 che thành `***`; gọi lại qua 360 bằng `after`. |
Response sample
{
"data": [
{
"id": "120250025975490254",
"name": "Chiến dịch mẫu",
"status": "ACTIVE",
"effective_status": "ACTIVE",
"configured_status": "ACTIVE",
"objective": "OUTCOME_ENGAGEMENT",
"buying_type": "AUCTION",
"bid_strategy": "LOWEST_COST_WITHOUT_CAP",
"daily_budget": "96050",
"budget_remaining": "0",
"special_ad_categories": [],
"start_time": "2026-09-23T15:09:57+0700",
"created_time": "2026-09-23T15:09:56+0700",
"updated_time": "2026-10-28T10:20:37+0700"
},
{
"id": "120249269087300254",
"name": "Chiến dịch mẫu 2",
"status": "ACTIVE",
"effective_status": "ACTIVE",
"configured_status": "ACTIVE",
"objective": "OUTCOME_ENGAGEMENT",
"buying_type": "AUCTION",
"budget_remaining": "0",
"special_ad_categories": [],
"start_time": "2026-08-11T06:57:55+0700",
"created_time": "2026-08-11T06:57:54+0700",
"updated_time": "2026-08-11T06:57:54+0700"
}
],
"paging": {
"cursors": {
"before": "QVFIVHY4ZAzFQeVRK…",
"after": "QVFIVEtpV1ZATay1i…"
},
"next": ""
}
}
Get started
- Sign up for Partner
- Enable a data type of the Quảng cáo (Marketing API) group on the platform page
- Create an API key (tick the Facebook channel)
- Call it as in the examples above