Home Order Information

Tài liệu API sản phẩm

GET https://caoshop.net/api/v1/products/list?search=test
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[]
Product information:
Product ID: 62
Slug: test
Plans:
ID: 8913 - test 1m
ID: 8914 - test max
Sample code:
curl "https://caoshop.net/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://caoshop.net/api/v1/orders/create
Request Body:
{
  "items": [
    {
      "plan_id": 8913,
      "quantity": 1,
      "fields": {
        "field_key": "field_value"
      }
    }
  ],
  "coupon_code": ""
}
Các gói có thể mua:
ID: 8913 test 1m
$0.10
ID: 8914 test max
$100.000.00
Sample code:
curl -X POST "https://caoshop.net/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":8913,"quantity":1}]}'
GET https://caoshop.net/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 - Order information
  • delivery.items - Delivery details
  • status - pending, processing, completed, cancelled
Sample code:
curl "https://caoshop.net/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"

test 1m

Instant delivery
$0.10

test max

Instant delivery
$100.000.00

No fields need to be filled in.

Do you have a discount code?
Estimate $0.10
Total $0.10
Warehouse: 4 Product