GET
https://sanmmovn.vn/api/v1/products/list?search=v11-pia-vpn-dung-android-pc-ios-5-thiet-bi-han-4-7-ngay-giao-san-tai-khoan-ver-29
Response chứa:
id - ID sản phẩm
name - Tên sản phẩm
plans[] - Danh sách gói: id, name, price, sale_price, fields[]
Thông tin sản phẩm này:
Product ID:
89154
Slug:
v11-pia-vpn-dung-android-pc-ios-5-thiet-bi-han-4-7-ngay-giao-san-tai-khoan-ver-29
Plans:
ID: 106521 - V1.1 | PIA VPN - DÙNG ANDROID/ PC/ IOS - 5 THIẾT BỊ - HẠN 4-7 NGÀY - GIAO SẴN TÀI KHOẢN - VER 29
Code mẫu:
curl "https://sanmmovn.vn/api/v1/products/list" \
-H "X-API-Key: sk_live_your_api_key_here" \
-H "X-API-Secret: sk_secret_your_api_secret_here"
POST
https://sanmmovn.vn/api/v1/orders/create
Request Body:
{
"items": [
{
"plan_id": 106521,
"quantity": 1,
"fields": {
"field_key": "field_value"
}
}
],
"coupon_code": ""
}
Các gói có thể mua:
ID: 106521
V1.1 | PIA VPN - DÙNG ANDROID/ PC/ IOS - 5 THIẾT BỊ - HẠN 4-7 NGÀY - GIAO SẴN TÀI KHOẢN - VER 29
22.880đ
Code mẫu:
curl -X POST "https://sanmmovn.vn/api/v1/orders/create" \
-H "Content-Type: application/json" \
-H "X-API-Key: sk_live_your_api_key_here" \
-H "X-API-Secret: sk_secret_your_api_secret_here" \
-d '{"items":[{"plan_id":106521,"quantity":1}]}'
GET
https://sanmmovn.vn/api/v1/orders/status?trans_id={trans_id}
Parameters:
trans_id - Mã giao dịch từ kết quả tạo đơn
Response chứa:
order - Thông tin đơn hàng
delivery.items - Nội dung giao hàng
status - pending, processing, completed, cancelled
Code mẫu:
curl "https://sanmmovn.vn/api/v1/orders/status?trans_id=ORD123456" \
-H "X-API-Key: sk_live_your_api_key_here" \
-H "X-API-Secret: sk_secret_your_api_secret_here"