Ủy quyền Portal
Sau khi app của bạn được approved, hãy ủy quyền kênh trong developer portal trước khi gọi API procurement hoặc fulfillment.
Có hai lớp lựa chọn:
- Fulfillment mode — HioBuy có lưu kho và vận chuyển quốc tế hay không
- Procurement mode (chỉ khi bật warehouse fulfillment) — ai mua trên Taobao / 1688 / Weidian
Fulfillment mode (theo app)
| Chế độ | Ai giữ warehouse binding | Vận chuyển quốc tế (/v1/fulfillment/*) |
|---|---|---|
| Self fulfillment (mặc định) | Không — bạn tự xử lý logistics | Không khả dụng (403) |
| HioBuy warehouse | Một warehouse developer code | Khả dụng — Fulfillment overview |
Đường dẫn Public API giữ nguyên (/v1/products/*, /v1/orders/*, …). Gateway định tuyến theo mode của app.
Procurement trong warehouse fulfillment
Khi chọn HioBuy warehouse, procurement hỗ trợ hai tùy chọn. Lưu kho và vận chuyển quốc tế hoạt động ở cả hai; chỉ khác ai đặt đơn mua trên marketplace.
| Procurement mode | Ai mua trên marketplace | Channel tokens | /v1/orders/* | /v1/products/* |
|---|---|---|---|---|
| HioBuy procurement (mặc định) | HioBuy mua hộ bạn | Cấp qua warehouse authorize; Gateway lưu | Định tuyến qua HioBuy warehouse procurement | Gateway dùng token đã lưu → marketplace |
| Self procurement | Bạn mua bằng tài khoản của mình | Bạn tự quản lý OAuth / credentials trong portal | Gateway → marketplace với token của bạn (giống luồng self cổ điển) | Tương tự — token của bạn |
| Khả năng | HioBuy procurement | Self procurement |
|---|---|---|
| Bind warehouse code một lần | Có | Có |
| Warehouse inbound / packages / VAS / returns | Có | Có |
| International shipments & wallet | Có | Có |
| Marketplace OAuth do bạn quản lý | Không | Có (theo từng kênh) |
Chuyển giữa hai tùy chọn procurement có thể xóa hoặc cấp lại channel tokens; portal sẽ yêu cầu bạn xác nhận.
Self fulfillment (không dùng kho HioBuy)
Với mỗi kênh được bật (Taobao, 1688, Weidian, …):
- Mở Authorizations → chọn app → Authorize
- Dán thông tin OAuth hoặc hoàn tất OAuth khi khả dụng
- Portal hiển thị trạng thái, tên tài khoản, thời hạn — không bao giờ hiển thị đầy đủ token
/v1/fulfillment/* không khả dụng trong chế độ này.
HioBuy warehouse fulfillment (thiết lập)
- Lấy warehouse developer code từ ops HioBuy
- Portal → Authorizations → chọn Use HioBuy fulfillment
- Chọn procurement mode: HioBuy procurement hoặc self procurement
- Nhập warehouse code một lần — binding theo app (không theo từng kênh)
- Nếu HioBuy procurement: portal liệt kê trạng thái từng kênh và
expires_at(token không hiển thị hoặc chỉnh sửa được) - Nếu self procurement: tự hoàn tất OAuth / nhập credential theo từng kênh như bình thường; warehouse binding chỉ mở khóa fulfillment APIs
Chuyển lại self fulfillment sẽ xóa warehouse binding; bạn sẽ được yêu cầu xác nhận.
Những gì bạn không bao giờ gửi trong API calls
- Marketplace access tokens
- Warehouse developer code (Gateway tự gắn phía server)
Chỉ dùng Authorization: Bearer hio_live_… (hoặc hio_test_…) trên https://api.hiobuy.com.
Tiếp theo: Fulfillment overview · Orders
Get Support
Need integration help? Contact Developer Support at support@hiobuy.com · Response within 1–2 business days