顧客 (Customers)

顧客資料與自助管理入口。

檢視 Markdown

顧客通常在完成 Hosted Checkout 時自動建立,你也可以直接用 API 建立。顧客可以透過 /portal/{customerId} 的 magic-link 流程自助管理自己的訂閱、付款方式——這是產品既有機制,目前沒有對應的開發者 API(例如沒有後端可以直接生成 Portal session 的端點),magic-link 驗證仍需要顧客自己輸入 email。

GET/api/Customer— 列出顧客
屬性值
所需權限customers:read
Idempotency-Key不需要
參數位置型別必填
pagequeryinteger (int32)
pageSizequeryinteger (int32)
orderByquerystring
orderDirectionquerystring
createdFromquerystring (date-time)
createdToquerystring (date-time)
POST/api/Customer— 建立一個新顧客
屬性值
所需權限customers:write
Idempotency-Key不需要
參數位置型別必填
emailbodystring (email)
externalIdbodystring
metadatabodyobject
namebodystring
statusbodystring
GET/api/Customer/{customerId}— 讀取單一顧客
屬性值
所需權限customers:read
Idempotency-Key不需要
參數位置型別必填
customerIdpathstring必填
PUT/api/Customer/{customerId}— 更新顧客資料
屬性值
所需權限customers:write
Idempotency-Key不需要
參數位置型別必填
customerIdpathstring必填
emailbodystring (email)
externalIdbodystring
metadatabodyobject
namebodystring
statusbodystring
GET/api/Customer/{customerId}/CustomValue— 顧客:CustomValue。
屬性值
所需權限customers:read
Idempotency-Key不需要
參數位置型別必填
customerIdpathstring必填
pagequeryinteger (int32)
pageSizequeryinteger (int32)
orderByquerystring
orderDirectionquerystring
createdFromquerystring (date-time)
createdToquerystring (date-time)
POST/api/Customer/{customerId}/CustomValue— 顧客:CustomValue。
屬性值
所需權限customers:write
Idempotency-Key不需要
參數位置型別必填
customerIdpathstring必填
PUT/api/Customer/{customerId}/CustomValue— 顧客:CustomValue。
屬性值
所需權限customers:write
Idempotency-Key不需要
參數位置型別必填
customerIdpathstring必填
POST/api/Customer/{customerId}/EntitlementOverride— 顧客:EntitlementOverride。
屬性值
所需權限entitlements:write
Idempotency-Key不需要
參數位置型別必填
customerIdpathstring必填
allowedbodystring
limitbodyinteger (int32)
limitAmountbodyinteger (int32)
GET/api/Customer/{customerId}/PaymentMethod— 列出顧客已儲存的付款方式參照
屬性值
所需權限payments:read
Idempotency-Key不需要
參數位置型別必填
customerIdpathstring必填
pagequeryinteger (int32)
pageSizequeryinteger (int32)
orderByquerystring
orderDirectionquerystring
createdFromquerystring (date-time)
createdToquerystring (date-time)