Skip to content
API最後更新

資源與欄位 ​

共用格式 ​

項目格式
ID資源的 id 是 UUID 字串。每個物件帶 object 欄位標明資源類型
時間ISO 8601 UTC,例 2026-11-20T02:00:00Z
金額幣別主要單位的數值字串,不含千分位與符號,例 TWD "1200"、USD "12.50"。幣別在同一物件的 currency
幣別幣別代碼,例 TWD

路徑中的 {id} 不是 UUID、不屬於這家店或已刪除時,回 404 resource_missing。

商家 ​

GET /merchant 回傳金鑰所屬的商家。

欄位型別說明
idstring商家 ID
objectstring固定是 merchant
namestring商家名稱
slugstring預約頁網址代稱
timezonestring商家時區(IANA 名稱)
currencystring幣別代碼
localestring預約頁的預設語系:zh_TW、en、ja

服務 ​

json
{
  "id": "0198c5f4-0000-7000-8000-000000000001",
  "object": "service",
  "name": "體驗課",
  "description": null,
  "duration_minutes": 60,
  "price": "1800",
  "currency": "TWD",
  "is_bookable": true,
  "category": { "id": "0198c5f6-0000-7000-8000-000000000001", "name": "課程" },
  "staff_ids": ["0198c5f5-0000-7000-8000-000000000001"],
  "sort_order": 0
}
欄位型別說明
idstring服務 ID
objectstring固定是 service
namestring服務名稱
descriptionstring 或 null服務說明
duration_minutesnumber服務時長(分鐘)
pricestring價格,主要單位的數值字串
currencystring幣別代碼
is_bookableboolean是否開放預約
categoryobject 或 null分類,含 id、name
staff_idsarray提供這項服務的人員 ID,依 ID 遞增排列。每個 ID 都可用 GET /staff/{id} 查詢
sort_ordernumber排列順序

已刪除的服務不在列表中。

人員 ​

json
{
  "id": "0198c5f5-0000-7000-8000-000000000001",
  "object": "staff",
  "name": "範例老師"
}
欄位型別說明
idstring人員 ID
objectstring固定是 staff
namestring姓名

/staff 只列這家店的成員,已離開的人員不列出。

預約 ​

json
{
  "id": "0198c5f1-0000-7000-8000-000000000001",
  "object": "appointment",
  "reference": "7K3M9Q",
  "series_id": null,
  "status": "confirmed",
  "source": "web",
  "start_at": "2026-11-20T02:00:00Z",
  "end_at": "2026-11-20T03:00:00Z",
  "timezone": "Asia/Taipei",
  "local_date": "2026-11-20",
  "local_start_time": "10:00",
  "local_end_time": "11:00",
  "party_size": 1,
  "total_price": "1800",
  "currency": "TWD",
  "payment_status": "unpaid",
  "deposit": {
    "amount": "500",
    "paid": "0",
    "due_at": "2026-11-18T15:59:59Z",
    "reported_at": null
  },
  "status_reason": null,
  "customer": {
    "id": "0198c5f3-0000-7000-8000-000000000001",
    "object": "customer",
    "name": "範例顧客",
    "phone": "+886900000000",
    "email": "customer@example.com"
  },
  "items": [
    {
      "service": { "id": "0198c5f4-0000-7000-8000-000000000001", "name": "體驗課" },
      "staff": { "id": "0198c5f5-0000-7000-8000-000000000001", "name": "範例老師" },
      "start_at": "2026-11-20T02:00:00Z",
      "end_at": "2026-11-20T03:00:00Z",
      "duration_minutes": 60,
      "quantity": 1,
      "unit_price": "1800",
      "pricing_basis": "per_booking",
      "line_total": "1800"
    }
  ],
  "created_at": "2026-11-15T06:29:40Z",
  "updated_at": "2026-11-15T06:29:40Z"
}
欄位型別說明
idstring預約 ID
objectstring固定是 appointment
referencestring 或 null預約編號
series_idstring 或 null系列 ID
statusstringpending、confirmed、completed、cancelled、no_show
sourcestring 或 null預約來源:web、line_liff、line_conversation、merchant_panel
start_atstring開始時間,ISO 8601 UTC
end_atstring服務結束時間,ISO 8601 UTC
timezonestring商家時區(IANA 名稱)
local_datestring商家時區的日期,YYYY-MM-DD
local_start_timestring商家時區的開始時間,HH:mm
local_end_timestring商家時區的結束時間,HH:mm
party_sizenumber人數
total_pricestring總金額,主要單位的數值字串
currencystring幣別代碼
payment_statusstringunpaid、partially_paid、fully_paid
depositobject 或 null訂金,沒有訂金時是 null,欄位見訂金
status_reasonstring 或 null取消或爽約時填寫的原因,其他情況與沒填寫時是 null
customerobject 或 null顧客,沒有顧客時是 null,欄位見預約裡的顧客
itemsarray預約品項,欄位見品項
created_atstring 或 null預約建立時間,ISO 8601 UTC
updated_atstring 或 null預約最後更新時間,ISO 8601 UTC

已刪除的預約不在列表中。

訂金 ​

欄位型別說明
amountstring訂金金額,主要單位的數值字串
paidstring已付訂金,主要單位的數值字串
due_atstring 或 null訂金期限,ISO 8601 UTC
reported_atstring 或 null顧客回報已付款的時間,ISO 8601 UTC

預約裡的顧客 ​

金鑰有 customers:read 時:

欄位型別說明
idstring顧客 ID
objectstring固定是 customer
namestring 或 null姓名
phonestring 或 null電話
emailstring 或 nullEmail

金鑰沒有 customers:read 時只有 id 與 object:

json
{ "id": "0198c5f3-0000-7000-8000-000000000001", "object": "customer" }

品項 ​

欄位型別說明
service.idstring服務 ID
service.namestring 或 null服務名稱
staffobject 或 null人員。沒有指定人員時是 null;有值時含 id、name(name 可為 null)
start_atstring 或 null品項開始時間,ISO 8601 UTC
end_atstring 或 null品項的服務結束時間,ISO 8601 UTC
duration_minutesnumber服務時長(分鐘)
quantitynumber人數
unit_pricestring單價,主要單位的數值字串
pricing_basisstringper_booking(整組定價)或 per_person(依人數計價)
line_totalstring這個品項的金額,主要單位的數值字串

品項的 staff.id 是已不在這家店的人員時,GET /staff/{id} 回 404。

顧客 ​

json
{
  "id": "0198c5f3-0000-7000-8000-000000000001",
  "object": "customer",
  "name": "範例顧客",
  "email": "customer@example.com",
  "phone": "+886900000000",
  "preferred_locale": "zh_TW",
  "created_at": "2026-11-01T08:00:00Z",
  "updated_at": "2026-11-15T06:29:40Z"
}
欄位型別說明
idstring顧客 ID
objectstring固定是 customer
namestring 或 null姓名
emailstring 或 nullEmail
phonestring 或 null電話
preferred_localestring 或 null偏好語系:zh_TW、en、ja
created_atstring 或 null建立時間,ISO 8601 UTC
updated_atstring 或 null最後更新時間,ISO 8601 UTC

封存的顧客不在列表中,GET /customers/{id} 回 404。

收款 ​

json
{
  "id": "0198c5f4-0000-7000-8000-000000000001",
  "object": "payment",
  "appointment_id": "0198c5f1-0000-7000-8000-000000000001",
  "amount": "500",
  "currency": "TWD",
  "method": "cash",
  "created_at": "2026-11-20T03:05:00Z"
}
欄位型別說明
idstring收款 ID
objectstring固定是 payment
appointment_idstring這筆收款所屬的預約 ID
amountstring金額,主要單位的數值字串,不帶正負號
currencystring幣別代碼
methodstringcash、points(點數)、bank_transfer、line_pay、newebpay(藍新金流)、payuni(統一金流)、stripe、other
created_atstring記下這筆收款的時間,ISO 8601 UTC
  • 已刪除預約的收款不在列表中,GET /payments/{id} 回 404。
  • GET /payments/{id} 帶退款的 ID 時回 404。

退款 ​

欄位與收款相同,object 固定是 refund,amount 同樣不帶正負號。

  • 已刪除預約的退款不在列表中,GET /refunds/{id} 回 404。
  • GET /refunds/{id} 帶收款的 ID 時回 404。