VI | EN
Message us on Messenger
Developer resources

Ad creatives of an account — Facebook API

Ad Creatives · 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 Creatives

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

Creative (nội dung quảng cáo) của tài khoản: loại (ảnh / video / bài có sẵn), bài viết gốc, tiêu đề, nội dung chữ, nút kêu gọi hành động, ảnh thu nhỏ, link Instagram. Dùng để rà nội dung đang / từng chạy, tìm creative theo bài viết, kiểm nút CTA.

  • Đường dẫn có act_<id> → 360 tự chọn token tài khoản.
  • Thứ tự không bảo đảm mới nhất trước. Cần creative của quảng cáo cụ thể thì lấy creative{…} ngay ở danh sách quảng cáo.

Request

Endpoint

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

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_).
fieldsquerystringYesid,name,status,object_type,effective_object_story_id,title,body,call_to_action_type,thumbnail_url,image_url,instagram_permalink_urlTrường cần lấy.
limitqueryintNo25Số creative mỗi trang. Trường body có thể rất dài — giữ limit nhỏ.
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/adcreatives?fields=id%2Cname%2Cstatus%2Cobject_type%2Ceffective_object_story_id%2Ctitle%2Cbody%2Ccall_to_action_type%2Cthumbnail_url&limit=25" \
  -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/adcreatives",
    params={
        "fields": "id,name,status,object_type,effective_object_story_id,title,body,call_to_action_type,thumbnail_url",
        "limit": 25
    },
    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/adcreatives');
for (const [k, v] of Object.entries({"fields":"id,name,status,object_type,effective_object_story_id,title,body,call_to_action_type,thumbnail_url","limit":25})) 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/adcreatives' . '?' . http_build_query(['fields' => 'id,name,status,object_type,effective_object_story_id,title,body,call_to_action_type,thumbnail_url', 'limit' => 25]);
$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[]Creative.
idstring120200000000000001Id creative (khớp `creative.id` ở danh sách quảng cáo).
namestringTên creative (thường do Meta tự đặt).
statusstringACTIVE
object_typestringVIDEOLoại: `VIDEO` · `PHOTO` · `SHARE` (bài có link) · `STATUS` …
effective_object_story_idstring569900000000001_599900000000003Bài viết `<page_id>_<post_id>` mà creative hiển thị.
title / bodystringTiêu đề và nội dung chữ của quảng cáo.
call_to_action_typestringMESSAGE_PAGENút CTA: MESSAGE_PAGE (Gửi tin nhắn) · SHOP_NOW · LEARN_MORE …
thumbnail_url / image_urlstringẢnh thu nhỏ / ảnh — link CDN có hạn, không lưu lâu dài.
instagram_permalink_urlstringLink bài trên Instagram (khi chạy cả Instagram).
pagingobject`{cursors: {before, after}, next}`.

Response sample

{
  "data": [
    {
      "id": "120200000000000001",
      "name": "Cửa hàng mẫu 2025-01-14-example-creative",
      "status": "ACTIVE",
      "object_type": "VIDEO",
      "effective_object_story_id": "569900000000001_599900000000003",
      "title": "Cửa hàng mẫu",
      "body": "ÁO KHOÁC BOMBER – “BẢO BỐI” GIỮ ẤM TRONG NHỮNG NGÀY TRỞ GIÓ…",
      "call_to_action_type": "MESSAGE_PAGE",
      "thumbnail_url": "https://scontent.fsgn4-1.fna.fbcdn.net/v/t15.13418-10/…",
      "instagram_permalink_url": "https://www.instagram.com/p/EXAMPLE1234/"
    }
  ],
  "paging": {
    "cursors": {
      "before": "MTIwMjE0NTEyNTA2MzUwMjU0",
      "after": "MTIwMjE0NTEyNTA1NzkwMjU0"
    },
    "next": ""
  }
}

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