Branch #17 docs/api/17-automation-templates.md

19. Automation Template Hub

Branch #17 — Chợ workflow template để nhân bản quy trình CRM, marketing, ops cho doanh nghiệp.

Endpoints

GET
https://bizgpt.vn/wp-json/bizcity/v1/automation-templates/categories

Danh sách category

Auth: Public

GET
https://bizgpt.vn/wp-json/bizcity/v1/automation-templates

Danh sách template

Auth: Public

GET
https://bizgpt.vn/wp-json/bizcity/v1/automation-templates/{id}

Chi tiết template

Auth: Public

POST
https://bizgpt.vn/wp-json/bizcity/v1/automation-templates/submit

Submit template mới

Auth: Bearer

PATCH
https://bizgpt.vn/wp-json/bizcity/v1/automation-templates/{id}/rate

Đánh giá template

Auth: Bearer

Method Path Auth Mô tả
GET https://bizgpt.vn/wp-json/bizcity/v1/automation-templates/categories Public Danh sách category
GET https://bizgpt.vn/wp-json/bizcity/v1/automation-templates Public Danh sách template
GET https://bizgpt.vn/wp-json/bizcity/v1/automation-templates/{id} Public Chi tiết template
POST https://bizgpt.vn/wp-json/bizcity/v1/automation-templates/submit Bearer Submit template mới
PATCH https://bizgpt.vn/wp-json/bizcity/v1/automation-templates/{id}/rate Bearer Đánh giá template

Query Examples

GET Danh sách category
curl -X GET "https://bizgpt.vn/wp-json/bizcity/v1/automation-templates/categories"
const res = await fetch('https://bizgpt.vn/wp-json/bizcity/v1/automation-templates/categories', {
  method: 'GET',
});
const data = await res.json();
console.log(data);
import requests
url = "https://bizgpt.vn/wp-json/bizcity/v1/automation-templates/categories"
headers = {}
res = requests.get(url, headers=headers)
print(res.json())
GET Danh sách template
curl -X GET "https://bizgpt.vn/wp-json/bizcity/v1/automation-templates"
const res = await fetch('https://bizgpt.vn/wp-json/bizcity/v1/automation-templates', {
  method: 'GET',
});
const data = await res.json();
console.log(data);
import requests
url = "https://bizgpt.vn/wp-json/bizcity/v1/automation-templates"
headers = {}
res = requests.get(url, headers=headers)
print(res.json())
GET Chi tiết template
curl -X GET "https://bizgpt.vn/wp-json/bizcity/v1/automation-templates/{id}"
const res = await fetch('https://bizgpt.vn/wp-json/bizcity/v1/automation-templates/{id}', {
  method: 'GET',
});
const data = await res.json();
console.log(data);
import requests
url = "https://bizgpt.vn/wp-json/bizcity/v1/automation-templates/{id}"
headers = {}
res = requests.get(url, headers=headers)
print(res.json())
POST Submit template mới
curl -X POST "https://bizgpt.vn/wp-json/bizcity/v1/automation-templates/submit" -H "Authorization: Bearer biz-YOUR_KEY" -H "Content-Type: application/json" -d '{"sample":true}'
const res = await fetch('https://bizgpt.vn/wp-json/bizcity/v1/automation-templates/submit', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer biz-YOUR_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"sample":true}),
});
const data = await res.json();
console.log(data);
import requests
url = "https://bizgpt.vn/wp-json/bizcity/v1/automation-templates/submit"
headers = {'Authorization': 'Bearer biz-YOUR_KEY', 'Content-Type': 'application/json'}
payload = '{"sample":true}'
res = requests.request("POST", url, headers=headers, data=payload)
print(res.json())
PATCH Đánh giá template
curl -X PATCH "https://bizgpt.vn/wp-json/bizcity/v1/automation-templates/{id}/rate" -H "Authorization: Bearer biz-YOUR_KEY" -H "Content-Type: application/json" -d '{"sample":true}'
const res = await fetch('https://bizgpt.vn/wp-json/bizcity/v1/automation-templates/{id}/rate', {
  method: 'PATCH',
  headers: {
    Authorization: 'Bearer biz-YOUR_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"sample":true}),
});
const data = await res.json();
console.log(data);
import requests
url = "https://bizgpt.vn/wp-json/bizcity/v1/automation-templates/{id}/rate"
headers = {'Authorization': 'Bearer biz-YOUR_KEY', 'Content-Type': 'application/json'}
payload = '{"sample":true}'
res = requests.request("PATCH", url, headers=headers, data=payload)
print(res.json())

Use Cases

  • Tái sử dụng workflow tốt nhất giữa nhiều doanh nghiệp/site.
  • Rút ngắn thời gian setup automation campaign.
  • Chuẩn hóa logic vận hành qua template đã kiểm thử.

Implementation Steps

  1. Browse template theo category và mức phổ biến.
  2. Import về site client và chỉnh tham số riêng.
  3. Theo dõi hiệu quả chạy và feedback ngược về hub.

Quick Start cURL

bash
curl -X GET "https://bizgpt.vn/wp-json/bizcity/v1/automation-templates?category=facebook&sort=popular&per_page=18"
Canonical Spec

docs/api/17-automation-templates.md