{"info":{"name":"Zalo OA SaaS — API công khai","description":"Xác thực bằng `client_credentials` (xem `POST /v1/auth/token`) — mỗi request kèm `Authorization: Bearer <token>`.\n\n**Header phản hồi trên mọi route** (trừ `/v1/auth/token`, `/v1/health`): `X-Request-Id`, `X-RateLimit-Limit`/`X-RateLimit-Remaining`/`X-RateLimit-Reset`, `X-Quota-Used`/`X-Quota-Limit`.\n\n`Idempotency-Key` **bắt buộc** trên mọi `POST`/`PATCH` — gọi lại đúng key trong 24h trả về nguyên response cũ, không tạo thêm bản ghi.\n\nWebhook ra (sự kiện `message.sent`, `message.delivered`, `message.seen`, `message.failed`, `campaign.completed`, `contact.opted_out`, `oa.token_error`, `quota.threshold_reached`) ký bằng `X-Signature: sha256=HMAC_SHA256(secret, timestamp + \".\" + rawBody)` — cấu hình endpoint trong web app, mục Tích hợp.","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{access_token}}","type":"string"}]},"variable":[{"key":"baseUrl","value":"https://api.phanmempanda.com"}],"item":[{"name":"Auth","item":[{"name":"Cấp access token bằng client_credentials","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Idempotency-Key","value":"{{$guid}}"}],"url":{"raw":"{{baseUrl}}/v1/auth/token","host":["{{baseUrl}}"],"path":["v1","auth","token"]},"body":{"mode":"raw","raw":"{\n  \"grant_type\": \"client_credentials\",\n  \"client_id\": \"\",\n  \"client_secret\": \"\"\n}","options":{"raw":{"language":"json"}}}}}]},{"name":"Health","item":[{"name":"Kiểm tra API còn sống","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/v1/health","host":["{{baseUrl}}"],"path":["v1","health"]}}}]},{"name":"Messages","item":[{"name":"Gửi 1 tin nhắn","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Idempotency-Key","value":"{{$guid}}"}],"url":{"raw":"{{baseUrl}}/v1/messages/send","host":["{{baseUrl}}"],"path":["v1","messages","send"]},"body":{"mode":"raw","raw":"{\n  \"oa_code\": \"\",\n  \"template_id\": \"\",\n  \"phone\": \"\",\n  \"params\": {},\n  \"routing\": {\n    \"mode\": \"auto\"\n  },\n  \"schedule_send_at\": \"\",\n  \"tracking\": \"\"\n}","options":{"raw":{"language":"json"}}}}},{"name":"Gửi hàng loạt (tối đa 5.000 tin/request)","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Idempotency-Key","value":"{{$guid}}"}],"url":{"raw":"{{baseUrl}}/v1/messages/send-bulk","host":["{{baseUrl}}"],"path":["v1","messages","send-bulk"]},"body":{"mode":"raw","raw":"{\n  \"oa_code\": \"\",\n  \"template_id\": \"\",\n  \"routing\": {\n    \"mode\": \"auto\"\n  },\n  \"messages\": [\n    {\n      \"phone\": \"\",\n      \"params\": {},\n      \"tracking\": \"\",\n      \"schedule_send_at\": \"\"\n    }\n  ]\n}","options":{"raw":{"language":"json"}}}}},{"name":"Tìm tin nhắn","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/v1/messages","host":["{{baseUrl}}"],"path":["v1","messages"]}}},{"name":"Xem chi tiết 1 tin nhắn","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/v1/messages/{id}","host":["{{baseUrl}}"],"path":["v1","messages",":id"]}}},{"name":"Huỷ 1 tin đang chờ gửi","request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"Idempotency-Key","value":"{{$guid}}"}],"url":{"raw":"{{baseUrl}}/v1/messages/{id}/cancel","host":["{{baseUrl}}"],"path":["v1","messages",":id","cancel"]}}}]},{"name":"Campaigns","item":[{"name":"Liệt kê chiến dịch","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/v1/campaigns","host":["{{baseUrl}}"],"path":["v1","campaigns"]}}},{"name":"Xem chi tiết 1 chiến dịch","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/v1/campaigns/{code}","host":["{{baseUrl}}"],"path":["v1","campaigns",":code"]}}},{"name":"Huỷ 1 chiến dịch đang gửi","request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"Idempotency-Key","value":"{{$guid}}"}],"url":{"raw":"{{baseUrl}}/v1/campaigns/{code}/cancel","host":["{{baseUrl}}"],"path":["v1","campaigns",":code","cancel"]}}}]},{"name":"OA accounts","item":[{"name":"Liệt kê Official Account đã kết nối","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/v1/oa-accounts","host":["{{baseUrl}}"],"path":["v1","oa-accounts"]}}}]},{"name":"Templates","item":[{"name":"Liệt kê mẫu tin đã đồng bộ từ Zalo","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/v1/templates","host":["{{baseUrl}}"],"path":["v1","templates"]}}}]},{"name":"Segments","item":[{"name":"Liệt kê phân khúc liên hệ","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/v1/segments","host":["{{baseUrl}}"],"path":["v1","segments"]}}}]},{"name":"Contacts","item":[{"name":"Tìm liên hệ trong sổ địa chỉ","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/v1/contacts","host":["{{baseUrl}}"],"path":["v1","contacts"]}}},{"name":"Tạo 1 liên hệ","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Idempotency-Key","value":"{{$guid}}"}],"url":{"raw":"{{baseUrl}}/v1/contacts","host":["{{baseUrl}}"],"path":["v1","contacts"]},"body":{"mode":"raw","raw":"{\n  \"phone\": \"\",\n  \"name\": \"\",\n  \"email\": \"\",\n  \"attributes\": {},\n  \"tags\": []\n}","options":{"raw":{"language":"json"}}}}},{"name":"Xem chi tiết 1 liên hệ","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/v1/contacts/{id}","host":["{{baseUrl}}"],"path":["v1","contacts",":id"]}}},{"name":"Cập nhật 1 liên hệ","request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"Idempotency-Key","value":"{{$guid}}"}],"url":{"raw":"{{baseUrl}}/v1/contacts/{id}","host":["{{baseUrl}}"],"path":["v1","contacts",":id"]},"body":{"mode":"raw","raw":"{\n  \"phone\": \"\",\n  \"name\": \"\",\n  \"email\": \"\",\n  \"attributes\": {},\n  \"tags\": [],\n  \"optedOut\": false\n}","options":{"raw":{"language":"json"}}}}},{"name":"Xoá mềm 1 liên hệ","request":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/v1/contacts/{id}","host":["{{baseUrl}}"],"path":["v1","contacts",":id"]}}},{"name":"Tạo/cập nhật hàng loạt liên hệ (tối đa 1.000/request)","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Idempotency-Key","value":"{{$guid}}"}],"url":{"raw":"{{baseUrl}}/v1/contacts/bulk-upsert","host":["{{baseUrl}}"],"path":["v1","contacts","bulk-upsert"]},"body":{"mode":"raw","raw":"{\n  \"contacts\": [\n    {\n      \"phone\": \"\",\n      \"name\": \"\",\n      \"email\": \"\",\n      \"attributes\": {},\n      \"tags\": []\n    }\n  ]\n}","options":{"raw":{"language":"json"}}}}}]},{"name":"Blacklists","item":[{"name":"Liệt kê số điện thoại bị chặn","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/v1/blacklists","host":["{{baseUrl}}"],"path":["v1","blacklists"]}}},{"name":"Chặn 1 số điện thoại","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Idempotency-Key","value":"{{$guid}}"}],"url":{"raw":"{{baseUrl}}/v1/blacklists","host":["{{baseUrl}}"],"path":["v1","blacklists"]},"body":{"mode":"raw","raw":"{\n  \"phone\": \"\",\n  \"scope\": 1,\n  \"reason\": \"\",\n  \"expiresAt\": \"\"\n}","options":{"raw":{"language":"json"}}}}},{"name":"Bỏ chặn","request":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/v1/blacklists/{id}","host":["{{baseUrl}}"],"path":["v1","blacklists",":id"]}}}]},{"name":"Automations","item":[{"name":"Kích hoạt 1 kịch bản tự động (trigger loại webhook)","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Idempotency-Key","value":"{{$guid}}"}],"url":{"raw":"{{baseUrl}}/v1/automations/{id}/trigger","host":["{{baseUrl}}"],"path":["v1","automations",":id","trigger"]},"body":{"mode":"raw","raw":"{\n  \"contact_id\": \"\",\n  \"phone\": \"\",\n  \"event_id\": \"\"\n}","options":{"raw":{"language":"json"}}}}}]},{"name":"Usage","item":[{"name":"Xem hạn mức/đã dùng kỳ hiện tại","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/v1/usage","host":["{{baseUrl}}"],"path":["v1","usage"]}}}]},{"name":"Reports","item":[{"name":"Báo cáo tổng quan (theo ngày/OA/mẫu tin)","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{baseUrl}}/v1/reports/summary","host":["{{baseUrl}}"],"path":["v1","reports","summary"]}}}]}]}