Ad Images
GET/{version}/act_{account_id}/adimagesVia 360: GET https://partner.quantri360.com/v1/facebook/{version}/act_{account_id}/adimages
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
Thư viện ảnh quảng cáo của tài khoản: mã băm (hash — dùng khi tạo creative), tên, kích thước, link ảnh, thời gian tải lên. Dùng để tìm lại ảnh đã tải, lấy hash cho creative mới, kiểm ảnh đủ kích thước.
- Đường dẫn có
act_<id>→ 360 tự chọn token tài khoản. - Gọi thật: tài khoản mẫu có 322 ảnh (
summary=total_count).
Request
Endpoint
GET https://partner.quantri360.com/v1/facebook/{version}/act_{account_id}/adimages
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 | |
| account_id | path | string | Yes | 5924809560908319 | Id tài khoản quảng cáo (số, không có act_). |
| fields | query | string | No | id,hash,name,url,permalink_url,width,height,original_width,original_height,status,created_time,updated_time | Trường cần lấy. Không gửi = chỉ hash, id. |
| hashes | query | string | No | ["32ad77949160486cbd5e5844745aad7b"] | Mảng JSON mã băm — chỉ lấy các ảnh này. |
| name | query | string | No | Lọc theo tên ảnh. | |
| minwidth / minheight | query | int | No | 1080 | Chỉ lấy ảnh có chiều rộng / cao tối thiểu (px). |
| summary | query | string | No | total_count | Thêm summary.total_count = tổng số ảnh của tài khoản. |
| limit | query | int | No | 50 | Số ảnh mỗi trang. |
| after | query | string | No | Con 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_5924809560908319/adimages?fields=hash%2Cname%2Curl%2Cwidth%2Cheight%2Ccreated_time&limit=50" \ -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/adimages",
params={
"fields": "hash,name,url,width,height,created_time",
"limit": 50
},
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/adimages');
for (const [k, v] of Object.entries({"fields":"hash,name,url,width,height,created_time","limit":50})) 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/adimages' . '?' . http_build_query(['fields' => 'hash,name,url,width,height,created_time', 'limit' => 50]); $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[] | Ảnh, mới tải trước. | |
| id | string | 5924809560908319:32ad77949160486cbd5e5844745aad7b | Dạng `<account_id>:<hash>`. |
| hash | string | 32ad77949160486cbd5e5844745aad7b | Mã băm ảnh — dùng trong `image_hash` khi tạo creative. |
| name | string | editorial_collage | Tên tệp lúc tải lên. |
| url | string | Link CDN có hạn — không lưu lâu dài. | |
| permalink_url | string | Link cố định của ảnh. | |
| width / height | int | 1080 / 1350 | Kích thước (px). |
| original_width / original_height | int | Kích thước gốc. | |
| status | string | ACTIVE | |
| created_time / updated_time | string | 2026-07-06T23:25:02+0700 | Theo múi giờ tài khoản. |
| paging | object | `{cursors: {before, after}, next}`. | |
| summary | object | Chỉ có khi gửi `summary=total_count`: `{total_count}`. |
Response sample
{
"data": [
{
"id": "5924809560908319:7cbda0c882fa973ed56617ccf91b47f9",
"hash": "7cbda0c882fa973ed56617ccf91b47f9",
"name": "editorial_collage",
"url": "https://scontent.fsgn13-2.fna.fbcdn.net/v/t45.1600-4/…",
"width": 1080,
"height": 1350,
"original_width": 1080,
"original_height": 1350,
"status": "ACTIVE",
"created_time": "2026-07-06T23:25:02+0700",
"updated_time": "2026-07-06T23:26:09+0700"
}
],
"paging": {
"cursors": {
"before": "QVFIVGJLRUU4…",
"after": "QVFIVDlBOGpM…"
},
"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