Skip to main content
GET
/
orders
列出訂單
curl --request GET \
  --url https://api.zangsho.com/v1/orders \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": 123,
      "order_no": "<string>",
      "amount": "<string>",
      "currency": "TWD",
      "status": "pending",
      "payment_method": "credit_card",
      "source": "api",
      "billing_cycle": "<string>",
      "paid_at": "2023-11-07T05:31:56Z",
      "refunded_at": "2023-11-07T05:31:56Z",
      "failed_at": "2023-11-07T05:31:56Z",
      "metadata": {},
      "customer_email": "<string>",
      "customer_name": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "meta": {
    "current_page": 123,
    "from": 123,
    "last_page": 123,
    "per_page": 123,
    "to": 123,
    "total": 123
  }
}

Authorizations

Authorization
string
header
required

使用 Laravel Sanctum Token 進行認證。

Token 可在商家後台的「API 設定」頁面取得。

Query Parameters

page
integer
default:1

頁碼

Required range: x >= 1
per_page
integer
default:20

每頁筆數(最大 100)

Required range: 1 <= x <= 100
status
enum<string>

篩選訂單狀態

Available options:
pending,
paid,
failed,
refunded,
cancelled
customer_id
integer

篩選特定客戶的訂單

start_date
string<date>

起始日期(含)

end_date
string<date>

結束日期(含)

Response

訂單列表

data
object[]
meta
object