Khuyến mãi — Tạo
Tạo chương trình khuyến mãi mới.
Tạo khuyến mãi với tên và loại. Loại: discount_by_product, discount_by_order_price, fixed_prices, coupon, double_reward_point...
Endpoint
| Method | Endpoint | Mô tả |
|---|---|---|
POST | /api/v1/shops/{shop_id}/promotion_advance | Tạo khuyến mãi |
Tham số
| Tham số | Vị trí | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
shop_id | đường dẫn | string | Có | ID cửa hàng |
name | thân | string | Có | Tên chương trình |
type | thân | string | Có | Loại khuyến mãi |
Kiểm thử tại chỗ
POST
https://pos.hitechcloud.vn/api/v1/shops/{shop_id}/promotion_advanceKiểm thử tại chỗNhập tham số và API Key rồi bấm Gửi thử. Key không được lưu lại.
Tham số đường dẫn
Body
cURL mẫu (POST)
curl -X POST "https://pos.hitechcloud.vn/api/v1/shops/shop_0a1b2c3d/promotion_advance" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"promotion_advance": {
"name": "Giam 10% ao",
"type": "discount_by_product",
"value": 10
}
}'Phản hồi mẫu
{
"status": "success",
"data": {
"id": "promo_11",
"name": "Giam 10% ao"
}
}Tạo khuyến mãi với tên và loại. Loại: discount_by_product, discount_by_order_price, fixed_prices, coupon, double_reward_point...
Endpoint
| Method | Endpoint | Mô tả |
|---|---|---|
POST | /api/v1/shops/{shop_id}/promotion_advance | Tạo khuyến mãi |
Tham số
| Tham số | Vị trí | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
shop_id | đường dẫn | string | Có | ID cửa hàng |
name | thân | string | Có | Tên chương trình |
type | thân | string | Có | Loại khuyến mãi |
Kiểm thử tại chỗ
POST
https://pos.hitechcloud.vn/api/v1/shops/{shop_id}/promotion_advanceKiểm thử tại chỗNhập tham số và API Key rồi bấm Gửi thử. Key không được lưu lại.
Tham số đường dẫn
Body
cURL mẫu (POST)
curl -X POST "https://pos.hitechcloud.vn/api/v1/shops/shop_0a1b2c3d/promotion_advance" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"promotion_advance": {
"name": "Giam 10% ao",
"type": "discount_by_product",
"value": 10
}
}'Phản hồi mẫu
{
"status": "success",
"data": {
"id": "promo_11",
"name": "Giam 10% ao"
}
}