VI | EN
Message us on Messenger
Developer resources

Pixels of an account — Facebook API

Ad Account Pixels · call it through Quantri360 with one API key for your own accounts / assets that you connected and authorized — 360 handles request signing and refreshing the authorization you granted.

Ad Account Pixels

GET/{version}/act_{account_id}/adspixelsVia 360: GET https://partner.quantri360.com/v1/facebook/{version}/act_{account_id}/adspixels
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

Pixel (tập dữ liệu sự kiện web) mà tài khoản quảng cáo dùng được: id, tên, lần cuối nhận sự kiện, doanh nghiệp sở hữu. Dùng để lấy pixel_id (cho thống kê sự kiện, đối tượng web, chuyển đổi tùy chỉnh) và kiểm pixel còn bắn sự kiện không.

  • Đường dẫn có act_<id> → 360 tự chọn token tài khoản.
  • Một pixel có thể dùng chung cho nhiều tài khoản quảng cáo.

Request

Endpoint

GET https://partner.quantri360.com/v1/facebook/{version}/act_{account_id}/adspixels

Authentication & shop

NameInTypeSampleDescription
AuthorizationheaderheaderBearer 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_idquerystringact_123456789 hoặc 1234567890Tà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

NameInTypeRequiredSampleDescription
versionpathstringYesv25.0
account_idpathstringYes5999000000000001Id tài khoản quảng cáo (số, không có act_).
fieldsquerystringNoid,name,creation_time,last_fired_time,is_unavailable,data_use_setting,owner_businessTrường cần lấy. Không gửi = chỉ id.
limitqueryintNo25
afterquerystringNoCon trỏ trang kế.

Pagination

Lặp khi có paging.next: thêm after = paging.cursors.after.

Request examples

curl -s "https://partner.quantri360.com/v1/facebook/v25.0/act_5999000000000001/adspixels?fields=id%2Cname%2Ccreation_time%2Clast_fired_time%2Cis_unavailable%2Cowner_business" \
  -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_5999000000000001/adspixels",
    params={
        "fields": "id,name,creation_time,last_fired_time,is_unavailable,owner_business"
    },
    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_5999000000000001/adspixels');
for (const [k, v] of Object.entries({"fields":"id,name,creation_time,last_fired_time,is_unavailable,owner_business"})) 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_5999000000000001/adspixels' . '?' . http_build_query(['fields' => 'id,name,creation_time,last_fired_time,is_unavailable,owner_business']);
$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)

NameTypeSampleDescription
dataobject[]Pixel.
idstring889900000000001Pixel id.
namestring
creation_timestring2024-01-11T07:36:15+0000Giờ UTC.
last_fired_timestring2026-10-29T23:59:58+0000Lần cuối nhận sự kiện (UTC) — cũ vài ngày trở lên = pixel đã ngừng gắn trên web.
is_unavailableboolfalse`true` = pixel bị gắn cờ / không dùng được.
data_use_settingstringadvertising_and_analytics
owner_businessobject`{id, name}` doanh nghiệp sở hữu pixel.
pagingobject`{cursors: {before, after}}`.

Response sample

{
  "data": [
    {
      "id": "4699000000000001",
      "name": "Pixel cũ",
      "creation_time": "2021-10-19T03:15:24+0000",
      "last_fired_time": "2026-05-12T23:33:15+0000",
      "is_unavailable": false,
      "data_use_setting": "advertising_and_analytics",
      "owner_business": {
        "id": "449900000000001",
        "name": "Doanh nghiệp mẫu"
      }
    },
    {
      "id": "889900000000001",
      "name": "Cửa hàng mẫu",
      "creation_time": "2024-01-11T07:36:15+0000",
      "last_fired_time": "2026-10-29T23:59:58+0000",
      "is_unavailable": false,
      "data_use_setting": "advertising_and_analytics",
      "owner_business": {
        "id": "189900000000001",
        "name": "Doanh nghiệp mẫu 2"
      }
    }
  ],
  "paging": {
    "cursors": {
      "before": "NDY0MTgwNzA3NTg4MDgzMwZDZD",
      "after": "ODgwOTAzNTYwNzAzMzI4"
    }
  }
}

Get started

  1. Sign up for Partner
  2. Enable a data type of the Quảng cáo (Marketing API) group on the platform page
  3. Create an API key (tick the Facebook channel)
  4. Call it as in the examples above