MarketingMã giới thiệu
Cập nhật mã giới thiệu
Cập nhật thông tin mã giới thiệu
Endpoint
PUT /v1/affiliatecodes/:id
Path Parameters
| Tên | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|
id | int | Có | ID mã giới thiệu |
Request Payload
JSON Object Payload:
{
"company_id": 1,
"creator_id": 1,
"affiliate_id": 2,
"code": "aaacb2f2f",
"description": "Mã giới thiệu cho đối tác VIP",
"tag": "vip",
"status": 1
}Lưu ý
Đây là cập nhật toàn bộ:
affiliate_id, code, description, tag, status không gửi lên sẽ bị ghi đè thành rỗng / 0. API cập nhật không kiểm tra code rỗng.Response Schema
HTTP 200 - JSON Object
Xem AffiliateCode Object Schema
Error Codes
Xem các lỗi khi tạo mã giới thiệu (trừ error_code_required; lỗi hệ thống trả error_edit). Trả 404 error_not_found nếu không tìm thấy mã.