Create Ch02 Subscriptions Order
建立商品類型為 Ch02 Subscriptions 的訂單。
Endpoint
| Item | Value |
|---|---|
| Method | POST |
| Path | /platform/order/ch2/subscriptions |
Authentication
資訊
此 endpoint 需要在 request header 帶入 x-api-key。private key 請聯繫客服申請。
Request
Headers
| Header | Required | Description |
|---|---|---|
x-api-key | Yes | 請聯繫客服申請 private key。 |
Content-Type | Yes | 固定使用 application/json。 |
Body
| Field | Type | Required | Description |
|---|---|---|---|
max_quantity | integer(int32) | No | 最大數量。範圍 1 到 10000000。 |
min_quantity | integer(int32) | No | 最小數量。範圍 1 到 10000000。 |
delay_minutes | enum | No | 延遲分鐘數。請參考 Enums.DelayMinutes。 |
new_post_count | integer(int32) | No | 新貼文數量。範圍 1 到 10000000。 |
old_post_count | integer(int32) | No | 舊貼文數量。範圍 1 到 10000000。 |
expiry_date | string(date-time) | No | 任務到期時間。 |
username | string | No | 帳號名稱。 |
product_id | string(uuid) | No | 商品 ID。 |
{
"max_quantity": 100,
"min_quantity": 10,
"delay_minutes": "min30",
"new_post_count": 3,
"old_post_count": 1,
"expiry_date": "2026-07-01T00:00:00+08:00",
"username": "sample_user",
"product_id": "9c07a89a-0994-4f35-98a7-1b922b5c8331"
}
Response
Success Response
成功時回傳 200 OK 與 OrderResponse。
{
"order_id": "2fe533a2-8787-4a61-a4a4-5ce049d59658",
"order_number": "ORD-202606020005",
"payment_type": "credit",
"order_status": "establish",
"payment_status": "complete",
"total": 120,
"order_detail": [],
"create_date_time": "2026-06-02T12:30:00+08:00",
"update_date_time": null
}
Error Responses
| HTTP Status | Code | Meaning | How to Fix |
|---|---|---|---|
400 | data_validation_failed | Request body 欄位格式或數值範圍不符合合約。 | 檢查數量範圍、日期格式、delay_minutes enum 與 product_id。 |
400 | invalid_expiry_date | expiry_date 不符合可接受的日期規則。 | 使用未來日期並確認時區格式。 |
400 | below_minimum_quantity | 數量低於產品設定的最小值。 | 先查詢產品 min,再送出符合範圍的數量。 |
400 | exceeds_maximum_quantity | 數量高於產品設定的最大值。 | 先查詢產品 max,再送出符合範圍的數量。 |
401 | token_validation_failed | private key 缺漏或無效。 | 確認 x-api-key header,必要時聯繫客服重新申請。 |
Examples
curl -X POST "https://api.guo-guo.com/platform/order/ch2/subscriptions" \
-H "x-api-key: <private_key>" \
-H "Content-Type: application/json" \
-d '{"max_quantity":100,"min_quantity":10,"delay_minutes":"min30","new_post_count":3,"old_post_count":1,"expiry_date":"2026-07-01T00:00:00+08:00","username":"sample_user","product_id":"9c07a89a-0994-4f35-98a7-1b922b5c8331"}'