共用方式為


Square Business (獨立發行商) (預覽版)

Square 幫助數百萬賣家經營業務 - 從安全的信用卡處理到銷售點解決方案。 此連接器包含下列端點的動作:忠誠度、禮品卡、預訂、商務、團隊、財務、線上和驗證。

此連接器適用於以下產品和區域:

服務 Class Regions
副駕駛工作室 進階 除下列區域外的所有 Power Automate 區域
     - 美國政府 (GCC)
     - 美國政府(海灣合作委員會高中)
     - 由 21Vianet 營運的中國雲
     - 美國國防部 (DoD)
邏輯應用程式 標準 所有 Logic Apps 區域, 但下列區域除外:
     - Azure Government 區域
     - Azure 中國區域
     - 美國國防部 (DoD)
Power Apps 進階 除下列區域外的所有 Power Apps 區域
     - 美國政府 (GCC)
     - 美國政府(海灣合作委員會高中)
     - 由 21Vianet 營運的中國雲
     - 美國國防部 (DoD)
Power Automate(自動化服務) 進階 除下列區域外的所有 Power Automate 區域
     - 美國政府 (GCC)
     - 美國政府(海灣合作委員會高中)
     - 由 21Vianet 營運的中國雲
     - 美國國防部 (DoD)
連絡人​​
名稱 特洛伊·泰勒
URL https://www.hitachisolutions.com
Email ttaylor@hitachisolutions.com
連接器中繼資料
Publisher 特洛伊·泰勒
網站 https://squareup.com/
隱私策略 https://squareup.com/us/en/legal/general/privacy
類別 商;銷售和客戶關係管理

節流限制

名稱 呼叫 續約期間
每個連線的 API 呼叫 100 60 秒

動作

兌換忠誠度獎勵

兌換忠誠度獎勵。 獎勵達到終端狀態後,無法刪除。 換句話說,用於獎勵的積分無法退還至帳戶。

列出位置

提供企業所有位置的資訊。

列出商家

傳回指定存取權杖的商家資訊。

列出團隊成員工資

傳回企業的 TeamMemberWage 執行個體編頁清單。

列出團隊成員預約設定檔 (Beta 版)

列出團隊成員的預訂設定檔。

列出工作週設定

傳回企業的 WorkweekConfig 執行個體清單。

列出收銀機班次

提供日期範圍內某個位置的所有現金抽屜班次的詳細資訊。

列出收銀機輪班事件

提供單一現金抽屜班次的分頁事件清單。

列出禮品卡活動 (Beta 版)

列出禮品卡活動。 根據預設,您會取得賣家帳戶中所有禮品卡的禮品卡活動。 您可以選擇性地指定查詢參數來篩選清單。 例如,您可以取得禮品卡、特定區域中所有禮品卡或時間範圍內活動的禮品卡活動清單。

列出網站

列出屬於賣家的 Square Online 網站。

列出裝置代碼

列出與商家相關聯的所有裝置代碼。

列出銀行帳戶

傳回連結至 Square 帳戶的 BankAccount 物件清單。

刪除中斷類型

刪除現有的 BreakType。 即使 BreakType 是從 Shift 參考,也可以刪除它。

刪除忠誠度獎勵

刪除忠誠度獎勵。 將忠誠度點數傳回忠誠度帳戶。 您無法刪除已達到終端狀態(已兌換)的獎勵。

刪除班次

刪除班次

刪除程式碼片段

從 Square Online 網站移除程式碼片段。

創造忠誠度獎勵

創建忠誠度獎勵。 創建獎勵後,積分將被鎖定,買家無法兌換其他獎勵。

取得中斷類型

傳回 id 指定的單一 BreakType。

取得裝置代碼

擷取具有相關聯識別碼的 DeviceCode。

取得銀行帳戶

傳回連結至 Square 帳戶的銀行帳戶詳細資料。

取消顧客與禮品卡的連結 (Beta 版)

取消客戶與禮品卡的連結。

大量建立團隊成員

建立多個 TeamMember 物件。

大量更新團隊成員

更新多個 TeamMember 物件。

將顧客連結至禮品卡 (Beta 版)

將客戶連結至禮品卡

建立中斷類型

建立新的 BreakType。 BreakType 是用於建立 Break 物件的範本。

建立位置 (Beta 版)

建立位置。

建立團隊成員

建立單一 TeamMember 物件。

建立忠誠度帳戶

建立忠誠度帳戶。

建立班次

建立新的班次。 輪班代表單一員工的完整工作日

建立禮品卡活動 (Beta 版)

建立禮品卡活動。

建立結帳

將 checkoutId 連結至客戶導向的checkout_page_url,以便使用付款處理工作流程提供其付款資訊。

建立行動授權碼

生成代碼以授權移動應用程序連接到 Square 讀卡機。 授權碼是一次性使用的,發出後 60 分鐘後過期。

建立裝置程式碼

建立一個 DeviceCode,可用於登入 Square Terminal 裝置以進入連接的終端模式。

建立預訂 (Beta 版)

建立預約。

從 GAN 檢索禮品卡(測試版)

使用禮品卡帳號 (GAN) 擷取禮品卡。

從隨機數擷取禮品卡 (Beta)

使用代表禮品卡的隨機數(安全權杖)擷取禮品卡。

搜尋可用性 (Beta 版)

搜尋預訂的空房情況。

搜尋團隊成員

傳回企業的 TeamMember 物件的編頁清單。

搜尋忠誠度帳戶

在忠誠度計畫中搜尋忠誠度帳戶。

搜尋忠誠度活動

搜尋忠誠度活動。 Square 忠誠度計劃維護買家忠誠度帳戶生命週期內發生的事件分類帳。 積分餘額的每次變化(例如,賺取的積分、兌換的積分和過期的積分)都會記錄在分類帳中。 使用此端點,您可以在分類帳中搜尋事件。

搜尋忠誠度獎勵

在忠誠度帳戶中搜尋忠誠度獎勵。

搜尋班次

傳回企業的班次記錄的編頁清單。

擷取企業預訂資料 (Beta 版)

擷取賣家的預訂設定檔。

擷取位置

擷取位置的詳細資料。 您可以指定「main」作為位置 ID,以擷取主要位置的詳細資料。

擷取商家

擷取指定merchant_id的 Merchant 物件。

擷取團隊成員

擷取指定 TeamMember 識別碼的 TeamMember 物件。

擷取忠誠度帳戶

擷取忠誠度帳戶。

擷取忠誠度獎勵

擷取忠誠度獎勵。

擷取忠誠度計畫

擷取賣方帳戶中的忠誠度計劃,由計劃 ID 或關鍵字 main 指定。 忠誠度計劃定義了買家如何賺取積分並用積分兌換獎勵。

擷取禮品卡 (Beta)

使用禮品卡的 ID 擷取禮品卡。

擷取程式碼片段

從 Square Online 網站擷取您的程式碼片段。 一個網站可以包含來自多個程式碼片段應用程式的程式碼片段,但您只能擷取應用程式新增的程式碼片段。

更新中斷類型

更新現有的 BreakType。

更新位置 (Beta 版)

更新位置。

更新團隊成員

更新單一 TeamMember 物件。

更新工作週設定

更新 WorkweekConfig。

更新工資設定

建立或更新 WageSetting 物件。

更新插入程式碼片段

將程式碼片段新增至 Square Online 網站,或更新網站上的現有程式碼片段。 程式碼片段程式碼會附加至網站每個頁面的 head 元素結尾,結帳頁面除外。 程式碼片段應用程式可以將一個程式碼片段新增至指定的網站。

更新班次

更新現有班次。

檢索工資設定

擷取 TeamMember 識別碼所指定小組成員的 WageSetting 物件。

檢索現金抽屜班次

提供單一現金抽屜班次的摘要詳細資料。

清單中斷類型

傳回企業的 BreakType 執行個體的編頁清單。

獲得團隊成員工資

傳回 id 所指定的單一 TeamMemberWage。

累積忠誠度積分

為忠誠度帳戶添加積分。

計算忠誠度積分

計算購買所賺取的積分。 應用程式可能會呼叫此端點,以顯示買家可以透過特定購買賺取的點數。

調整忠誠度積分

在買家帳戶中添加積分或從購買者帳戶中扣除積分。 只有在您需要手動調整點時,才使用此端點。

輪班

傳回 id 指定的單一 Shift。

通過 V1 ID 獲取銀行賬戶

傳回 V1 銀行帳戶識別之 BankAccount 的詳細資料。

兌換忠誠度獎勵

兌換忠誠度獎勵。 獎勵達到終端狀態後,無法刪除。 換句話說,用於獎勵的積分無法退還至帳戶。

參數

名稱 機碼 必要 類型 Description
獎勵 ID
reward_id True string

獎勵的識別碼。

冪等金鑰
idempotency_key string

您指定的值,可在所有要求中唯一識別此要求。 建立有效冪等索引鍵的常見方式是使用通用唯一識別碼 (UUID)。

位置標識碼
location_id string

位置識別碼。

傳回

名稱 路徑 類型 Description
ID
event.id string

Square 發行的唯一識別碼。

類型
event.type string

此物件的類型。

創建於
event.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

忠誠度計劃ID
event.redeem_reward.loyalty_program_id string

忠誠度計畫的識別碼

獎勵 ID
event.redeem_reward.reward_id string

忠誠度獎勵的 Square 指派 ID。

忠誠度帳戶 ID
event.loyalty_account_id string

發生事件的忠誠度帳戶的ID。

位置標識碼
event.location_id string

位置的識別碼。

來源
event.source string

來源。

列出位置

提供企業所有位置的資訊。

傳回

名稱 路徑 類型 Description
位置
locations array of object
ID
locations.id string

Square 發行的唯一識別碼。

名稱
locations.name string

物件的名稱。

地址行 1
locations.address.address_line_1 string

地址的第一行。

地區
locations.address.locality string

地址所在的城市或城鎮。

行政區一級
locations.address.administrative_district_level_1 string

地址所在國家/地區內的民間實體。 在美國,這就是州。

郵遞區號
locations.address.postal_code string

地址的郵遞區號。

國家
locations.address.country string

地址的國家/地區,採用 ISO 3166-1-alpha-2 格式。

Timezone
locations.timezone string

用於解譯發票上行事曆日期的時區,例如due_date。 建立發票時,此欄位會設定為為賣方位置指定的時區。 無法變更值。

能力
locations.capabilities array of string
地位
locations.status string

此物件的目前驗證狀態。

創建於
locations.created_at string

ISO 8601 格式的事件時間。

商家 ID
locations.merchant_id string

擁有該地點的商家的 ID。

國家
locations.country string

ISO 3166 Alpha-2 國家代碼。

語言代碼
locations.language_code string

與位置相關聯的語言,採用 BCP 47 格式。

貨幣
locations.currency string

3 個字元的 ISO 4217 貨幣代碼。

電話號碼
locations.phone_number string

與客戶設定檔相關聯的 11 位電話號碼。

企業名稱
locations.business_name string

位置的企業名稱這是該位置的客戶可見的名稱。 例如,此名稱會顯示在客戶收據上。

列出商家

傳回指定存取權杖的商家資訊。

參數

名稱 機碼 必要 類型 Description
Cursor
cursor integer

先前呼叫此端點所傳回的分頁游標。

傳回

名稱 路徑 類型 Description
商人
merchant array of object
ID
merchant.id string

Square 發行的唯一識別碼。

企業名稱
merchant.business_name string

位置的企業名稱這是該位置的客戶可見的名稱。 例如,此名稱會顯示在客戶收據上。

國家
merchant.country string

ISO 3166 Alpha-2 國家代碼。

語言代碼
merchant.language_code string

與位置相關聯的語言,採用 BCP 47 格式。

貨幣
merchant.currency string

3 個字元的 ISO 4217 貨幣代碼。

地位
merchant.status string

此物件的目前驗證狀態。

主要位置 ID
merchant.main_location_id string

此商家的主要位置 ID。

列出團隊成員工資

傳回企業的 TeamMemberWage 執行個體編頁清單。

參數

名稱 機碼 必要 類型 Description
團隊成員 ID
team_member_id string

將退回的工資過濾為僅與指定團隊成員相關聯的工資。

限制
limit integer

回應中要傳回的數目上限。

Cursor
cursor string

先前呼叫此端點所傳回的分頁游標。

傳回

名稱 路徑 類型 Description
團隊成員工資
team_member_wages array of object
ID
team_member_wages.id string

Square 發行的唯一識別碼。

團隊成員 ID
team_member_wages.team_member_id string

與物件相關聯之小組成員的 TeamMember 物件 ID。

Title
team_member_wages.title string

發票的標題。

總數
team_member_wages.hourly_rate.amount integer

金額。

貨幣
team_member_wages.hourly_rate.currency string

貨幣。

Cursor
cursor string

在此端點的後續呼叫中包含分頁游標,以擷取與原始查詢相關聯的下一組結果。

列出團隊成員預約設定檔 (Beta 版)

列出團隊成員的預訂設定檔。

參數

名稱 機碼 必要 類型 Description
僅限預訂
bookable_only boolean

指出是否只包含可預約的小組成員傳回的結果 (true) 或不包含 (false)。

限制
limit integer

回應中要傳回的數目上限。

Cursor
cursor string

先前呼叫此端點所傳回的分頁游標。

位置標識碼
location_id string

您可以指定此選用篩選器,以僅擷取屬於特定位置的記錄。

傳回

名稱 路徑 類型 Description
團隊成員預訂設定檔
team_member_booking_profiles array of object
團隊成員 ID
team_member_booking_profiles.team_member_id string

與物件相關聯之小組成員的 TeamMember 物件 ID。

顯示名稱
team_member_booking_profiles.display_name string

小組成員的顯示名稱。

可預訂
team_member_booking_profiles.is_bookable boolean

指出小組成員是否可以透過 Bookings API 或賣方的線上預約管道或網站 (true) 或不預約 (false') 。

Errors
errors array of

列出工作週設定

傳回企業的 WorkweekConfig 執行個體清單。

參數

名稱 機碼 必要 類型 Description
限制
limit integer

回應中要傳回的數目上限。

Cursor
cursor string

先前呼叫此端點所傳回的分頁游標。

傳回

名稱 路徑 類型 Description
工作週設定
workweek_configs array of object
ID
workweek_configs.id string

Square 發行的唯一識別碼。

一周開始
workweek_configs.start_of_week string

出於補償目的,工作週結束的星期幾。

當地時間一天的開始
workweek_configs.start_of_day_local_time string

工作週結束的當地時間。 以 HH:MM 格式表示為字串 (也接受 HH:MM:SS,但秒數會被截斷)。

版本
workweek_configs.version integer

物件的目前版本。

創建於
workweek_configs.created_at string

ISO 8601 格式的事件時間。

更新於
workweek_configs.updated_at string

RFC 3339 格式的上次修改時間戳記

Cursor
cursor string

在此端點的後續呼叫中包含分頁游標,以擷取與原始查詢相關聯的下一組結果。

列出收銀機班次

提供日期範圍內某個位置的所有現金抽屜班次的詳細資訊。

參數

名稱 機碼 必要 類型 Description
位置標識碼
location_id string

您可以指定此選用篩選器,以僅擷取屬於特定位置的記錄。

排序順序
sort_order string

依照以指定順序建立卡片的時間來排序傳回的清單。

開始時間
begin_time string

opened_at上查詢的包含開始時間,採用 ISO 8601 格式。

結束時間
end_time string

opened_at上查詢的獨佔結束日期,採用 ISO 8601 格式。

限制
limit integer

回應中要傳回的數目上限。

Cursor
cursor string

先前呼叫此端點所傳回的分頁游標。

傳回

名稱 路徑 類型 Description
物品
items array of object
ID
items.id string

Square 發行的唯一識別碼。

State
items.state string

目前的狀態。

開放時間
items.opened_at string

ISO 8601 格式的輪班開始時間。

結束時間
items.ended_at string

ISO 8601 格式的班次結束時間。

關閉時間
items.closed_at string

ISO 8601 格式的班次關閉時間。

Description
items.title string

描述。

總數
items.opened_cash_money.amount integer

金額。

貨幣
items.opened_cash_money.currency string

貨幣。

總數
items.expected_cash_money.amount integer

金額。

貨幣
items.expected_cash_money.currency string

貨幣。

總數
items.closed_cash_money.amount integer

金額。

貨幣
items.closed_cash_money.currency string

貨幣。

列出收銀機輪班事件

提供單一現金抽屜班次的分頁事件清單。

參數

名稱 機碼 必要 類型 Description
班次識別碼
shift_id True string

班次的識別碼。

位置標識碼
location_id True string

您可以指定此選用篩選器,以僅擷取屬於特定位置的記錄。

限制
limit integer

回應中要傳回的數目上限。

Cursor
cursor string

先前呼叫此端點所傳回的分頁游標。

傳回

名稱 路徑 類型 Description
活動
events array of object
ID
events.id string

Square 發行的唯一識別碼。

事件類型
events.event_type string

現金抽屜移位事件的類型。

總數
events.event_money.amount integer

金額。

貨幣
events.event_money.currency string

貨幣。

創建於
events.created_at string

ISO 8601 格式的事件時間。

Description
events.title string

描述。

列出禮品卡活動 (Beta 版)

列出禮品卡活動。 根據預設,您會取得賣家帳戶中所有禮品卡的禮品卡活動。 您可以選擇性地指定查詢參數來篩選清單。 例如,您可以取得禮品卡、特定區域中所有禮品卡或時間範圍內活動的禮品卡活動清單。

參數

名稱 機碼 必要 類型 Description
禮品卡 ID
gift_card_id string

如果您提供禮品卡 ID,端點會傳回屬於指定禮品卡的活動。 否則,端點會傳回賣家的所有禮品卡活動。

類型
type string

如果您提供型別,端點會傳回此型別的禮品卡活動。 否則,端點會傳回所有類型的禮品卡活動。

位置標識碼
location_id string

您可以指定此選用篩選器,以僅擷取屬於特定位置的記錄。

開始時間
begin_time string

opened_at上查詢的包含開始時間,採用 ISO 8601 格式。

結束時間
end_time string

opened_at上查詢的獨佔結束日期,採用 ISO 8601 格式。

限制
limit integer

回應中要傳回的數目上限。

Cursor
cursor string

先前呼叫此端點所傳回的分頁游標。

排序順序
sort_order string

依照以指定順序建立卡片的時間來排序傳回的清單。

傳回

名稱 路徑 類型 Description
禮品卡活動
gift_card_activities array of object
ID
gift_card_activities.id string

Square 發行的唯一識別碼。

類型
gift_card_activities.type string

此物件的類型。

位置標識碼
gift_card_activities.location_id string

位置的識別碼。

創建於
gift_card_activities.created_at string

ISO 8601 格式的事件時間。

禮品卡 ID
gift_card_activities.gift_card_id string

禮品卡 ID。 如果存在GAN,則不需要ID。

禮品卡 GAN
gift_card_activities.gift_card_gan string

禮品卡 GAN. 如果存在 gift_card_id則不需要 GAN。

總數
gift_card_activities.gift_card_balance_money.amount integer

金額。

貨幣
gift_card_activities.gift_card_balance_money.currency string

貨幣。

總數
gift_card_activities.redeem_activity_details.amount_money.amount integer

金額。

貨幣
gift_card_activities.redeem_activity_details.amount_money.currency string

貨幣。

總數
gift_card_activities.activate_activity_details.amount_money.amount integer

金額。

貨幣
gift_card_activities.activate_activity_details.amount_money.currency string

貨幣。

訂單編號
gift_card_activities.activate_activity_details.order_id string

與活動相關聯的訂單ID。

明細項目 UID
gift_card_activities.activate_activity_details.line_item_uid string

訂單中禮品卡明細項目的line_item_uid。

列出網站

列出屬於賣家的 Square Online 網站。

傳回

名稱 路徑 類型 Description
Sites
sites array of object
ID
sites.id string

Square 發行的唯一識別碼。

網站名稱
sites.site_title string

網站的標題。

網域
sites.domain string

網站的網域 (不含通訊協定)。

已發布
sites.is_published boolean

指出網站是否已發佈。

創建於
sites.created_at string

ISO 8601 格式的事件時間。

更新於
sites.updated_at string

RFC 3339 格式的上次修改時間戳記

列出裝置代碼

列出與商家相關聯的所有裝置代碼。

參數

名稱 機碼 必要 類型 Description
Cursor
cursor string

先前呼叫此端點所傳回的分頁游標。

位置標識碼
location_id string

您可以指定此選用篩選器,以僅擷取屬於特定位置的記錄。

產品類型
product_type string

如果指定,則只會傳回以指定產品類型為目標的 DeviceCodes。 如果是空的,則傳回所有產品類型的 DeviceCodes。

地位
status string

如果指定,則只會傳回符合指定狀態的物件。

傳回

名稱 路徑 類型 Description
設備代碼
device_codes array of object
ID
device_codes.id string

Square 發行的唯一識別碼。

名稱
device_codes.name string

物件的名稱。

Code
device_codes.code string

可用於登入的唯一代碼。

產品類型
device_codes.product_type string

裝置代碼的目標產品型別。

位置標識碼
device_codes.location_id string

位置的識別碼。

創建於
device_codes.created_at string

ISO 8601 格式的事件時間。

配對方式
device_codes.pair_by string

此 DeviceCode 何時過期且不再登入。 RFC 3339 格式的時間戳記。

地位
device_codes.status string

此物件的目前驗證狀態。

裝置標識碼
device_codes.device_id string

使用此代碼之裝置的唯一識別碼。 裝置配對時填入。

狀態變更時間
device_codes.status_changed_at string

上次變更此 DeviceCode 的狀態的時間。 RFC 3339 格式的時間戳記。

列出銀行帳戶

傳回連結至 Square 帳戶的 BankAccount 物件清單。

參數

名稱 機碼 必要 類型 Description
Cursor
cursor string

先前呼叫此端點所傳回的分頁游標。

限制
limit integer

回應中要傳回的數目上限。

位置標識碼
location_id string

您可以指定此選用篩選器,以僅擷取屬於特定位置的記錄。

傳回

名稱 路徑 類型 Description
銀行帳戶
bank_accounts array of object
ID
bank_accounts.id string

Square 發行的唯一識別碼。

帳號後綴
bank_accounts.account_number_suffix string

帳號的最後幾位數字。

國家
bank_accounts.country string

ISO 3166 Alpha-2 國家代碼。

貨幣
bank_accounts.currency string

3 個字元的 ISO 4217 貨幣代碼。

帳戶類型
bank_accounts.account_type string

關聯銀行帳戶的財務用途。

持有人姓名
bank_accounts.holder_name string

帳戶持有人的姓名。 此名稱必須與目標銀行帳戶記錄上的名稱相符。

主要銀行識別號碼
bank_accounts.primary_bank_identification_number string

銀行的主要識別碼。

位置標識碼
bank_accounts.location_id string

位置的識別碼。

地位
bank_accounts.status string

此物件的目前驗證狀態。

可信賴
bank_accounts.creditable boolean

指出 Square 是否可以匯款至此銀行帳戶。

可借記
bank_accounts.debitable boolean

指出 Square 是否可以匯款至此銀行帳戶。

版本
bank_accounts.version integer

物件的目前版本。

銀行名稱
bank_accounts.bank_name string

實際金融機構名稱。

刪除中斷類型

刪除現有的 BreakType。 即使 BreakType 是從 Shift 參考,也可以刪除它。

參數

名稱 機碼 必要 類型 Description
ID
id True string

識別碼。

傳回

response
object

刪除忠誠度獎勵

刪除忠誠度獎勵。 將忠誠度點數傳回忠誠度帳戶。 您無法刪除已達到終端狀態(已兌換)的獎勵。

參數

名稱 機碼 必要 類型 Description
獎勵 ID
reward_id True string

獎勵的識別碼。

傳回

response
object

刪除班次

刪除班次

參數

名稱 機碼 必要 類型 Description
ID
id True string

識別碼。

傳回

response
object

刪除程式碼片段

從 Square Online 網站移除程式碼片段。

參數

名稱 機碼 必要 類型 Description
站台識別碼
site_id True string

網站的識別碼。

傳回

response
object

創造忠誠度獎勵

創建忠誠度獎勵。 創建獎勵後,積分將被鎖定,買家無法兌換其他獎勵。

參數

名稱 機碼 必要 類型 Description
忠誠度帳戶 ID
loyalty_account_id string

發生事件的忠誠度帳戶的ID。

獎勵等級 ID
reward_tier_id string

用於建立獎勵的獎勵層級的 Square 指派 ID。

訂單編號
order_id string

訂單的識別碼。

冪等金鑰
idempotency_key string

您指定的值,可在所有要求中唯一識別此要求。 建立有效冪等索引鍵的常見方式是使用通用唯一識別碼 (UUID)。

傳回

名稱 路徑 類型 Description
ID
reward.id string

Square 發行的唯一識別碼。

地位
reward.status string

此物件的目前驗證狀態。

忠誠度帳戶 ID
reward.loyalty_account_id string

發生事件的忠誠度帳戶的ID。

獎勵等級 ID
reward.reward_tier_id string

用於建立獎勵的獎勵層級的 Square 指派 ID。

Points
reward.points integer

新增或移除的點數。

訂單編號
reward.order_id string

訂單的識別碼。

創建於
reward.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

更新於
reward.updated_at string

指定此物件最近更新時間的時間戳記,採用 RFC 3339 格式。

取得中斷類型

傳回 id 指定的單一 BreakType。

參數

名稱 機碼 必要 類型 Description
ID
id True string

識別碼。

傳回

名稱 路徑 類型 Description
ID
break_type.id string

Square 發行的唯一識別碼。

位置標識碼
break_type.location_id string

位置的識別碼。

中斷名稱
break_type.break_name string

這種類型的中斷的人類可讀名稱。 該名稱在 Square 產品中顯示給員工。

預期持續時間
break_type.expected_duration string

此中斷的預期長度。 格式:RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S。 小於分鐘的精確度會被截斷。

已付費
break_type.is_paid boolean

此休息時間是否計入補償目的的工作時間。

版本
break_type.version integer

此物件的目前版本。

創建於
break_type.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

更新於
break_type.updated_at string

指定此物件最近更新時間的時間戳記,採用 RFC 3339 格式。

取得裝置代碼

擷取具有相關聯識別碼的 DeviceCode。

參數

名稱 機碼 必要 類型 Description
ID
id True string

識別碼。

傳回

名稱 路徑 類型 Description
ID
device_code.id string

Square 發行的唯一識別碼。

名稱
device_code.name string

物件的名稱。

Code
device_code.code string

可用於登入的唯一代碼。

產品類型
device_code.product_type string

裝置代碼的目標產品型別。

位置標識碼
device_code.location_id string

位置的識別碼。

創建於
device_code.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

配對方式
device_code.pair_by string

此 DeviceCode 何時過期且不再登入。 RFC 3339 格式的時間戳記。

地位
device_code.status string

此物件的目前驗證狀態。

裝置標識碼
device_code.device_id string

裝置的識別碼。

狀態變更時間
device_code.status_changed_at string

上次變更此 DeviceCode 的狀態的時間。 RFC 3339 格式的時間戳記。

取得銀行帳戶

傳回連結至 Square 帳戶的銀行帳戶詳細資料。

參數

名稱 機碼 必要 類型 Description
銀行帳戶 ID
bank_account_id True string

所需銀行帳戶的 Square 簽發的 ID。

傳回

名稱 路徑 類型 Description
ID
bank_account.id string

Square 發行的唯一識別碼。

帳號後綴
bank_account.account_number_suffix string

帳號的最後幾位數字。

國家
bank_account.country string

ISO 3166 Alpha-2 國家代碼。

貨幣
bank_account.currency string

3 個字元的 ISO 4217 貨幣代碼。

帳戶類型
bank_account.account_type string

帳戶的類型。

持有人姓名
bank_account.holder_name string

帳戶持有人的姓名。

主要銀行識別號碼
bank_account.primary_bank_identification_number string

銀行的主要識別碼。

位置標識碼
bank_account.location_id string

位置的識別碼。

地位
bank_account.status string

此物件的目前驗證狀態。

可信賴
bank_account.creditable boolean

指出 Square 是否可以向此帳戶匯款。

可借記
bank_account.debitable boolean

指出 Square 是否可以從此帳戶中提取資金。

版本
bank_account.version integer

此物件的目前版本。

銀行名稱
bank_account.bank_name string

實際金融機構名稱。

取消顧客與禮品卡的連結 (Beta 版)

取消客戶與禮品卡的連結。

參數

名稱 機碼 必要 類型 Description
禮品卡 ID
gift_card_id True string

禮品卡的識別碼。

客戶識別碼
customer_id string

要連結的客戶 ID。

傳回

名稱 路徑 類型 Description
ID
gift_card.id string

Square 發行的唯一識別碼。

類型
gift_card.type string

此物件的類型。

GAN來源
gift_card.gan_source string

指出禮品卡帳號 (GAN) 是由 Square 產生還是從非 Square 系統匯入。

State
gift_card.state string

目前的狀態。

總數
gift_card.balance_money.amount integer

金額。

貨幣
gift_card.balance_money.currency string

貨幣。

氮化鎵
gift_card.gan string

禮品卡帳號。

創建於
gift_card.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

大量建立團隊成員

建立多個 TeamMember 物件。

參數

名稱 機碼 必要 類型 Description
名字
given_name string

與團隊成員相關聯的給定名稱 (即名字)。

family_name string

與團隊成員相關聯的姓氏 (即姓氏)。

電子郵件地址
email_address string

與團隊成員相關聯的電子郵件地址。

參考標識碼
reference_id string

第二個 ID 用於將團隊成員與另一個系統中的實體相關聯。

電話號碼
phone_number string

團隊成員的電話號碼,採用 E.164 格式。

位置 ID
location_ids array of string
指派類型
assignment_type string

小組成員的目前指派類型。

名字
given_name string

與團隊成員相關聯的給定名稱 (即名字)。

family_name string

與團隊成員相關聯的姓氏 (即姓氏)。

電子郵件地址
email_address string

與團隊成員相關聯的電子郵件地址。

參考標識碼
reference_id string

第二個 ID 用於將團隊成員與另一個系統中的實體相關聯。

電話號碼
phone_number string

團隊成員的電話號碼,採用 E.164 格式。

指派類型
assignment_type string

小組成員的目前指派類型。

傳回

名稱 路徑 類型 Description
ID
team_members.idempotency-key-1.team_member.id string

參考此物件的識別碼。

參考標識碼
team_members.idempotency-key-1.team_member.reference_id string

第二個 ID 用於將團隊成員與另一個系統中的實體相關聯。

是擁有者
team_members.idempotency-key-1.team_member.is_owner boolean

團隊成員是否是 Square 帳戶的擁有者。

地位
team_members.idempotency-key-1.team_member.status string

描述小組成員的狀態。

名字
team_members.idempotency-key-1.team_member.given_name string

與團隊成員相關聯的給定名稱 (即名字)。

team_members.idempotency-key-1.team_member.family_name string

與團隊成員相關聯的姓氏 (即姓氏)。

電子郵件地址
team_members.idempotency-key-1.team_member.email_address string

與團隊成員相關聯的電子郵件地址。

電話號碼
team_members.idempotency-key-1.team_member.phone_number string

團隊成員的電話號碼,採用 E.164 格式。

指派類型
team_members.idempotency-key-1.team_member.assigned_locations.assignment_type string

小組成員的目前指派類型。

位置 ID
team_members.idempotency-key-1.team_member.assigned_locations.location_ids array of string
ID
team_members.idempotency-key-2.team_member.id string

參考此物件的識別碼。

參考標識碼
team_members.idempotency-key-2.team_member.reference_id string

第二個 ID 用於將團隊成員與另一個系統中的實體相關聯。

是擁有者
team_members.idempotency-key-2.team_member.is_owner boolean

團隊成員是否是 Square 帳戶的擁有者。

地位
team_members.idempotency-key-2.team_member.status string

描述小組成員的狀態。

名字
team_members.idempotency-key-2.team_member.given_name string

與團隊成員相關聯的給定名稱 (即名字)。

team_members.idempotency-key-2.team_member.family_name string

與團隊成員相關聯的姓氏 (即姓氏)。

電子郵件地址
team_members.idempotency-key-2.team_member.email_address string

與團隊成員相關聯的電子郵件地址。

電話號碼
team_members.idempotency-key-2.team_member.phone_number string

團隊成員的電話號碼,採用 E.164 格式。

指派類型
team_members.idempotency-key-2.team_member.assigned_locations.assignment_type string

小組成員的目前指派類型。

大量更新團隊成員

更新多個 TeamMember 物件。

參數

名稱 機碼 必要 類型 Description
參考標識碼
reference_id string

第二個 ID 用於將團隊成員與另一個系統中的實體相關聯。

是擁有者
is_owner boolean

團隊成員是否是 Square 帳戶的擁有者。

地位
status string

描述小組成員的狀態。

名字
given_name string

與團隊成員相關聯的給定名稱 (即名字)。

family_name string

與團隊成員相關聯的姓氏 (即姓氏)。

電子郵件地址
email_address string

與團隊成員相關聯的電子郵件地址。

電話號碼
phone_number string

團隊成員的電話號碼,採用 E.164 格式。

位置 ID
location_ids array of string
指派類型
assignment_type string

小組成員的目前指派類型。

參考標識碼
reference_id string

第二個 ID 用於將團隊成員與另一個系統中的實體相關聯。

是擁有者
is_owner boolean

團隊成員是否是 Square 帳戶的擁有者。

地位
status string

描述小組成員的狀態。

名字
given_name string

與團隊成員相關聯的給定名稱 (即名字)。

family_name string

與團隊成員相關聯的姓氏 (即姓氏)。

電子郵件地址
email_address string

與團隊成員相關聯的電子郵件地址。

電話號碼
phone_number string

團隊成員的電話號碼,採用 E.164 格式。

指派類型
assignment_type string

小組成員的目前指派類型。

傳回

名稱 路徑 類型 Description
ID
team_members.team_member_id.team_member.id string

參考此物件的識別碼。

參考標識碼
team_members.team_member_id.team_member.reference_id string

第二個 ID 用於將團隊成員與另一個系統中的實體相關聯。

是擁有者
team_members.team_member_id.team_member.is_owner boolean

團隊成員是否是 Square 帳戶的擁有者。

地位
team_members.team_member_id.team_member.status string

描述小組成員的狀態。

名字
team_members.team_member_id.team_member.given_name string

與團隊成員相關聯的給定名稱 (即名字)。

team_members.team_member_id.team_member.family_name string

與團隊成員相關聯的姓氏 (即姓氏)。

電子郵件地址
team_members.team_member_id.team_member.email_address string

與團隊成員相關聯的電子郵件地址。

電話號碼
team_members.team_member_id.team_member.phone_number string

團隊成員的電話號碼,採用 E.164 格式。

創建於
team_members.team_member_id.team_member.created_at string

時間戳記 (RFC 3339 格式) 描述團隊成員的建立時間

指派類型
team_members.team_member_id.team_member.assigned_locations.assignment_type string

小組成員的目前指派類型。

位置 ID
team_members.team_member_id.team_member.assigned_locations.location_ids array of string

將顧客連結至禮品卡 (Beta 版)

將客戶連結至禮品卡

參數

名稱 機碼 必要 類型 Description
禮品卡 ID
gift_card_id True string

禮品卡的識別碼。

客戶識別碼
customer_id string

要連結的客戶 ID。

傳回

名稱 路徑 類型 Description
ID
gift_card.id string

Square 發行的唯一識別碼。

類型
gift_card.type string

此物件的類型。

GAN來源
gift_card.gan_source string

指出禮品卡帳號 (GAN) 是由 Square 產生還是從非 Square 系統匯入。

State
gift_card.state string

目前的狀態。

總數
gift_card.balance_money.amount integer

金額。

貨幣
gift_card.balance_money.currency string

貨幣。

氮化鎵
gift_card.gan string

禮品卡帳號。

創建於
gift_card.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

客戶 ID
gift_card.customer_ids array of string

建立中斷類型

建立新的 BreakType。 BreakType 是用於建立 Break 物件的範本。

參數

名稱 機碼 必要 類型 Description
冪等金鑰
idempotency_key string

您指定的值,可在所有要求中唯一識別此要求。 建立有效冪等索引鍵的常見方式是使用通用唯一識別碼 (UUID)。

位置標識碼
location_id string

位置的識別碼。

中斷名稱
break_name string

這種類型的中斷的人類可讀名稱。 該名稱在 Square 產品中顯示給員工。

預期持續時間
expected_duration string

此中斷的預期長度。 格式:RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S。 小於分鐘的精確度會被截斷。

已付費
is_paid boolean

此休息時間是否計入補償目的的工作時間。

傳回

名稱 路徑 類型 Description
ID
break_type.id string

Square 發行的唯一識別碼。

位置標識碼
break_type.location_id string

位置的識別碼。

中斷名稱
break_type.break_name string

這種類型的中斷的人類可讀名稱。 該名稱在 Square 產品中顯示給員工。

預期持續時間
break_type.expected_duration string

此中斷的預期長度。 格式:RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S。 小於分鐘的精確度會被截斷。

已付費
break_type.is_paid boolean

此休息時間是否計入補償目的的工作時間。

版本
break_type.version integer

此物件的目前版本。

創建於
break_type.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

更新於
break_type.updated_at string

指定此物件最近更新時間的時間戳記,採用 RFC 3339 格式。

建立位置 (Beta 版)

建立位置。

參數

名稱 機碼 必要 類型 Description
名稱
name string

物件的名稱。

Description
description string

描述。

臉書網址
facebook_url string

位置的 Facebook 設定檔 URL。 URL 應以「facebook.com/」開頭。

地址行 1
address_line_1 string

地址的第一行。 以address_line開頭的欄位提供地址最具體的詳細信息,例如街道號碼、街道名稱和建築物名稱。

行政區一級
administrative_district_level_1 string

地址所在國家/地區內的民間實體。 在美國,這就是州。

地區
locality string

地址所在的城市或城鎮。

郵遞區號
postal_code string

地址的郵遞區號。

傳回

名稱 路徑 類型 Description
ID
location.id string

Square 發行的唯一識別碼。

名稱
location.name string

物件的名稱。

地址行 1
location.address.address_line_1 string

地址的第一行。 以address_line開頭的欄位提供地址最具體的詳細信息,例如街道號碼、街道名稱和建築物名稱。

地區
location.address.locality string

地址所在的城市或城鎮。

行政區一級
location.address.administrative_district_level_1 string

地址所在國家/地區內的民間實體。 在美國,這就是州。

郵遞區號
location.address.postal_code string

地址的郵遞區號。

能力
location.capabilities array of string
地位
location.status string

此物件的目前驗證狀態。

創建於
location.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

商家 ID
location.merchant_id string

商家的 ID。

國家
location.country string

ISO 3166 Alpha-2 國家代碼。

語言代碼
location.language_code string

語言代碼,採用 BCP 47 格式。

貨幣
location.currency string

3 個字元的 ISO 4217 貨幣代碼。

類型
location.type string

此物件的類型。

Description
location.description string

描述。

網站 URL
location.website_url string

位置的網站 URL。

推特用戶名
location.twitter_username string

位置的 Twitter 用戶名,不帶“@”符號。

Instagram 用戶名
location.instagram_username string

該位置的 Instagram 用戶名,不帶“@”符號。

緯度
location.coordinates.latitude float

座標的緯度以度數表示。

經度
location.coordinates.longitude float

座標的經度以度數表示。

MCC公司
location.mcc string

該地點的商家類別代碼 (MCC),由 ISO 18245 標準化。 MCC 描述了在該地點銷售的商品或服務的類型。

建立團隊成員

建立單一 TeamMember 物件。

參數

名稱 機碼 必要 類型 Description
冪等金鑰
idempotency_key string

您指定的值,可在所有要求中唯一識別此要求。 建立有效冪等索引鍵的常見方式是使用通用唯一識別碼 (UUID)。

參考標識碼
reference_id string

選用的使用者定義參照 ID。

地位
status string

此物件的目前驗證狀態。

名字
given_name string

與客戶設定檔相關聯的給定(即名字)名稱。

family_name string

與客戶設定檔相關聯的家族 (即姓氏) 名稱。

電子郵件地址
email_address string

與客戶設定檔相關聯的電子郵件地址。

電話號碼
phone_number string

與客戶設定檔相關聯的 11 位電話號碼。

位置 ID
location_ids array of string
指派類型
assignment_type string

小組成員的目前指派類型。

傳回

名稱 路徑 類型 Description
ID
team_member.id string

Square 發行的唯一識別碼。

參考標識碼
team_member.reference_id string

選用的使用者定義參照 ID。

是擁有者
team_member.is_owner boolean

團隊成員是否是 Square 帳戶的擁有者。

地位
team_member.status string

此物件的目前驗證狀態。

名字
team_member.given_name string

與客戶設定檔相關聯的給定(即名字)名稱。

team_member.family_name string

與客戶設定檔相關聯的家族 (即姓氏) 名稱。

電子郵件地址
team_member.email_address string

與客戶設定檔相關聯的電子郵件地址。

電話號碼
team_member.phone_number string

與客戶設定檔相關聯的 11 位電話號碼。

指派類型
team_member.assigned_locations.assignment_type string

小組成員的目前指派類型。

位置 ID
team_member.assigned_locations.location_ids array of string

建立忠誠度帳戶

建立忠誠度帳戶。

參數

名稱 機碼 必要 類型 Description
電話號碼
phone_number string

收件者的電話號碼。

方案標識碼
program_id string

程式的 Square 指派 ID。

冪等金鑰
idempotency_key string

您指定的值,可在所有要求中唯一識別此要求。 建立有效冪等索引鍵的常見方式是使用通用唯一識別碼 (UUID)。

傳回

名稱 路徑 類型 Description
ID
loyalty_account.id string

Square 發行的唯一識別碼。

ID
loyalty_account.mapping.id string

Square 指派的 ID。

電話號碼
loyalty_account.mapping.phone_number string

收件者的電話號碼。

創建於
loyalty_account.mapping.created_at string

建立時的時間戳記,採用 RFC 3339 格式。

方案標識碼
loyalty_account.program_id string

程式的 Square 指派 ID。

loyalty_account.balance integer

可用餘額。

終身積分
loyalty_account.lifetime_points integer

帳戶生命週期內累積的總積分。

創建於
loyalty_account.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

更新於
loyalty_account.updated_at string

指定此物件最近更新時間的時間戳記,採用 RFC 3339 格式。

建立班次

建立新的班次。 輪班代表單一員工的完整工作日

參數

名稱 機碼 必要 類型 Description
冪等金鑰
idempotency_key string

您指定的值,可在所有要求中唯一識別此要求。 建立有效冪等索引鍵的常見方式是使用通用唯一識別碼 (UUID)。

團隊成員 ID
team_member_id string

團隊成員的 ID。

位置標識碼
location_id string

位置的識別碼。

開始於
start_at string

指定此物件開始時間的時間戳記,採用 RFC 3339 格式。

結束時間
end_at string

RFC 3339;已移至時區 + 偏移量。 尊重分鐘的精確度;秒會被截斷。

Title
title string

在此班次期間執行的工作名稱。 Square 勞工報告 UI 可能會依職稱將班次分組在一起。

總數
amount integer

金額。

貨幣
currency string

貨幣。

開始於
start_at string

RFC 3339;遵循與 Shift 相同的時區資訊。 尊重分鐘的精確度;秒會被截斷。

結束時間
end_at string

RFC 3339;遵循與 Shift 相同的時區資訊。 尊重分鐘的精確度;秒會被截斷。

中斷類型 ID
break_type_id string

此 Break 範本化的 BreakType。

名稱
name string

項目的名稱。 這是用於適用查詢過濾器的可搜尋屬性,其值不得為空,且長度為 Unicode 字碼點。

預期持續時間
expected_duration string

預期的休息時間長度。 格式:RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S。

已付費
is_paid boolean

此休息時間是否計入補償目的的工作時間。

傳回

名稱 路徑 類型 Description
ID
shift.id string

Square 發行的唯一識別碼。

團隊成員 ID
shift.team_member_id string

團隊成員的 ID。

員工 ID
shift.employee_id string

員工的 Square 產生的 ID。

位置標識碼
shift.location_id string

位置的識別碼。

Timezone
shift.timezone string

用來解譯行事曆日期的時區。 建立發票時,此欄位會設定為為賣方位置指定的時區。 無法變更值。

開始於
shift.start_at string

指定此物件開始時間的時間戳記,採用 RFC 3339 格式。

結束時間
shift.end_at string

RFC 3339;已移至時區 + 偏移量。 尊重分鐘的精確度;秒會被截斷。

Title
shift.wage.title string

在此班次期間執行的工作名稱。 Square 勞工報告 UI 可能會依職稱將班次分組在一起。

總數
shift.wage.hourly_rate.amount integer

金額。

貨幣
shift.wage.hourly_rate.currency string

貨幣。

休息
shift.breaks array of object
ID
shift.breaks.id string

物件的識別碼

開始於
shift.breaks.start_at string

RFC 3339;遵循與 Shift 相同的時區資訊。 尊重分鐘的精確度;秒會被截斷。

結束時間
shift.breaks.end_at string

RFC 3339;遵循與 Shift 相同的時區資訊。 尊重分鐘的精確度;秒會被截斷。

中斷類型 ID
shift.breaks.break_type_id string

此 Break 範本化的 BreakType。

名稱
shift.breaks.name string

項目的名稱。 這是用於適用查詢過濾器的可搜尋屬性,其值不得為空,且長度為 Unicode 字碼點。

預期持續時間
shift.breaks.expected_duration string

預期的休息時間長度。 格式:RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S。

已付費
shift.breaks.is_paid boolean

此休息時間是否計入補償目的的工作時間。

地位
shift.status string

此物件的目前驗證狀態。

版本
shift.version integer

此物件的目前版本。

創建於
shift.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

更新於
shift.updated_at string

指定此物件最近更新時間的時間戳記,採用 RFC 3339 格式。

建立禮品卡活動 (Beta 版)

建立禮品卡活動。

參數

名稱 機碼 必要 類型 Description
冪等金鑰
idempotency_key string

您指定的值,可在所有要求中唯一識別此要求。 建立有效冪等索引鍵的常見方式是使用通用唯一識別碼 (UUID)。

禮品卡 ID
gift_card_id string

禮品卡 ID。 如果存在GAN,則不需要ID。

類型
type string

此物件的類型。

位置標識碼
location_id string

位置的識別碼。

訂單編號
order_id string

與活動相關聯的訂單ID。

明細項目 UID
line_item_uid string

訂單中禮品卡明細項目的line_item_uid。

傳回

名稱 路徑 類型 Description
ID
gift_card_activity.id string

Square 發行的唯一識別碼。

禮品卡 ID
gift_card_activity.gift_card_id string

禮品卡 ID。 如果存在GAN,則不需要ID。

禮品卡 GAN
gift_card_activity.gift_card_gan string

禮品卡 GAN. 如果存在 gift_card_id則不需要 GAN。

類型
gift_card_activity.type string

此物件的類型。

總數
gift_card_activity.gift_card_balance_money.amount integer

金額。

貨幣
gift_card_activity.gift_card_balance_money.currency string

貨幣。

位置標識碼
gift_card_activity.location_id string

位置的識別碼。

創建於
gift_card_activity.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

總數
gift_card_activity.activate_activity_details.amount_money.amount integer

金額。

貨幣
gift_card_activity.activate_activity_details.amount_money.currency string

貨幣。

訂單編號
gift_card_activity.activate_activity_details.order_id string

與活動相關聯的訂單ID。

明細項目 UID
gift_card_activity.activate_activity_details.line_item_uid string

訂單中禮品卡明細項目的line_item_uid。

建立結帳

將 checkoutId 連結至客戶導向的checkout_page_url,以便使用付款處理工作流程提供其付款資訊。

參數

名稱 機碼 必要 類型 Description
位置標識碼
location_id True string

位置的識別碼。

冪等金鑰
idempotency_key string

您指定的值,可在所有要求中唯一識別此要求。 建立有效冪等索引鍵的常見方式是使用通用唯一識別碼 (UUID)。

重新導向網址
redirect_url string

例如,如果提供的重新導向URL是 http://www.example.com/order-complete,則成功的交易會將客戶重新導向至:

http://www.example.com/order-complete?checkoutId=xxxxxx&referenceId=xxxxxx&transactionId=xxxxxx
如果您未提供重新導向 URL,Square Checkout 會代表您顯示訂單確認頁面;但是,強烈建議您提供重新導向 URL,以便透過現有/正常確認工作流程驗證交易結果並完成訂單。

冪等金鑰
idempotency_key string

您指定的值,可在您建立的訂單中唯一識別此訂單。 如果您不確定特定訂單是否已成功建立,您可以使用相同的冪等鍵重試,而不必擔心建立重複的訂單。

位置標識碼
location_id string

查詢運算式,用於搜尋符合指定賣家位置 ID 的可用性。

客戶識別碼
customer_id string

與訂單相關聯的客戶識別碼。

參考標識碼
reference_id string

用戶端指定的 ID,用於將另一個系統中的實體與此訂單相關聯。

名稱
name string

項目的名稱。

數量
quantity string

購買的數量,格式為十進位數。 數量為 0 的明細項目會在付款或以其他方式完成訂單時自動移除。

總數
amount integer

金額。

貨幣
currency string

貨幣。

折扣 UID
discount_uid string

套用折扣所代表的折扣的 UID。 它必須參考 order.discounts 欄位中存在的折扣。 此欄位是不可變的。 若要變更哪些折扣適用於明細項目,您必須刪除折扣,然後重新新增為新的 OrderLineItemAppliedDiscount。

稅務 UID
tax_uid string

此套用稅金所代表之稅金的 UID。 它必須參考 order.taxes 欄位中存在的稅金。 此欄位是不可變的。 若要變更哪些稅金適用於明細項目,請刪除並新增 OrderLineItemAppliedTax。

UID
uid string

唯一的 ID。

類型
type string

此物件的類型。

百分比
percentage string

稅金的百分比,作為十進位數的字串表示法。

Scope
scope string

指出物件套用的層級。

UID
uid string

唯一的 ID。

類型
type string

此物件的類型。

Scope
scope string

指出物件套用的層級。

總數
amount integer

金額。

貨幣
currency string

貨幣。

位置標識碼
location_id string

位置的識別碼。

Description
title string

描述。

總數
amount integer

金額。

貨幣
currency string

貨幣。

詢問送貨地址
ask_for_shipping_address boolean

如果屬實,Square Checkout 會代表您收集運送資訊,並將該資訊與交易資訊一起儲存在 Square 賣家儀表板中。

商家支援電子郵件
merchant_support_email string

要在 Square 結帳確認頁面上顯示的電子郵件地址,以及買家可用來聯絡賣家的確認電子郵件。 如果未設定此值,確認頁面和電子郵件會顯示與賣家的 Square 帳戶相關聯的主要電子郵件地址。

預先填入買家電子郵件
pre_populate_buyer_email string

如果提供,買家的電子郵件會以可編輯的文字欄位的形式預先填入結帳頁面。

地址行 1
address_line_1 string

地址的第一行。

地址行 2
address_line_2 string

地址的第二行(如果有的話)。

地區
locality string

地址所在的城市或城鎮。

行政區一級
administrative_district_level_1 string

地址所在國家/地區內的民間實體。 在美國,這就是州。

郵遞區號
postal_code string

地址的郵遞區號。

國家
country string

ISO 3166 Alpha-2 國家代碼。

名字
first_name string

代表收件者時的選用名字。

姓氏
last_name string

代表收件者時的選用姓氏。

傳回

名稱 路徑 類型 Description
ID
checkout.id string

Square 發行的唯一識別碼。

結帳頁面網址
checkout.checkout_page_url string

結帳完成後,買方瀏覽器應重新導向至的URL。

詢問送貨地址
checkout.ask_for_shipping_address boolean

如果屬實,Square Checkout 將代表您收集運送資訊,並將該資訊與交易資訊一起儲存在您的 Square 儀表板中。

商家支援電子郵件
checkout.merchant_support_email string

要在 Square 結帳確認頁面上顯示的電子郵件地址,以及買家可用來聯絡商家的確認電子郵件。

預先填入買家電子郵件
checkout.pre_populate_buyer_email string

如果提供,買家的電子郵件會預先填入結帳頁面上,做為可編輯的文字欄位。

地址行 1
checkout.pre_populate_shipping_address.address_line_1 string

地址的第一行。 以address_line開頭的欄位提供地址最具體的詳細信息,例如街道號碼、街道名稱和建築物名稱。

地址行 2
checkout.pre_populate_shipping_address.address_line_2 string

地址的第二行(如果有的話)。

地區
checkout.pre_populate_shipping_address.locality string

地址所在的城市或城鎮。

行政區一級
checkout.pre_populate_shipping_address.administrative_district_level_1 string

地址所在國家/地區內的民間實體。 在美國,這就是州。

郵遞區號
checkout.pre_populate_shipping_address.postal_code string

地址的郵遞區號。

國家
checkout.pre_populate_shipping_address.country string

地址的國家/地區,採用 ISO 3166-1-alpha-2 格式。

名字
checkout.pre_populate_shipping_address.first_name string

代表收件者時的選用名字。

姓氏
checkout.pre_populate_shipping_address.last_name string

代表收件者時的可選 lsat 名稱。

重新導向網址
checkout.redirect_url string

結帳後要重新導向的網址,並附加 checkoutId、Square 的 orderId、transactionId 和 referenceId 作為網址參數。 例如,如果提供的redirect_url是 http://www.example.com/order-complete,成功的交易會將客戶重新導向至:

http://www.example.com/order-complete?checkoutId=xxxxxx&orderId=xxxxxx&referenceId=xxxxxx&transactionId=xxxxxx
如果您未提供重新導向 URL,Square Checkout 將代表您顯示訂單確認頁面;但是,Square 強烈建議您提供重定向 URL,以便您可以驗證交易結果並通過現有/正常確認工作流程完成訂單。

位置標識碼
checkout.order.location_id string

查詢運算式,用於搜尋符合指定賣家位置 ID 的可用性。

客戶識別碼
checkout.order.customer_id string

與訂單相關聯的客戶識別碼。

參考標識碼
checkout.order.reference_id string

用戶端指定的 ID,用於將另一個系統中的實體與此訂單相關聯。

明細項目
checkout.order.line_items array of object
名稱
checkout.order.line_items.name string

委刊項的名稱。

數量
checkout.order.line_items.quantity string

購買的數量,格式為十進位數。 數量為 0 的明細項目會在付款或以其他方式完成訂單時自動移除。

適用稅項
checkout.order.line_items.applied_taxes array of object
稅務 UID
checkout.order.line_items.applied_taxes.tax_uid string

此套用稅金所代表之稅金的 UID。 它必須參考 order.taxes 欄位中存在的稅金。 此欄位是不可變的。 若要變更哪些稅金適用於明細項目,請刪除並新增 OrderLineItemAppliedTax。

總數
checkout.order.line_items.applied_taxes.applied_money.amount integer

貨幣的金額,以貨幣表示的貨幣的最小面額。 例如,當貨幣為美元時,金額以美分為單位。 貨幣金額可以是正數或負數。 請參閱特定欄位描述,以判斷特定情況下符號的含義。

貨幣
checkout.order.line_items.applied_taxes.applied_money.currency string

貨幣類型,採用 ISO 4217 格式。 例如,美元的貨幣代碼是美元。

適用折扣
checkout.order.line_items.applied_discounts array of object
折扣 UID
checkout.order.line_items.applied_discounts.discount_uid string

套用折扣所代表的折扣的 UID。 它必須參考 order.discounts 欄位中存在的折扣。 此欄位是不可變的。 若要變更哪些折扣適用於明細項目,您必須刪除折扣,然後重新新增為新的 OrderLineItemAppliedDiscount。

總數
checkout.order.line_items.applied_discounts.applied_money.amount integer

貨幣的金額,以貨幣表示的貨幣的最小面額。 例如,當貨幣為美元時,金額以美分為單位。 貨幣金額可以是正數或負數。 請參閱特定欄位描述,以判斷特定情況下符號的含義。

貨幣
checkout.order.line_items.applied_discounts.applied_money.currency string

貨幣類型,採用 ISO 4217 格式。 例如,美元的貨幣代碼是美元。

總數
checkout.order.line_items.base_price_money.amount integer

金額。

貨幣
checkout.order.line_items.base_price_money.currency string

貨幣。

總數
checkout.order.line_items.total_tax_money.amount integer

金額。

貨幣
checkout.order.line_items.total_tax_money.currency string

貨幣。

總數
checkout.order.line_items.total_discount_money.amount integer

金額。

貨幣
checkout.order.line_items.total_discount_money.currency string

貨幣。

總數
checkout.order.line_items.total_money.amount integer

金額。

貨幣
checkout.order.line_items.total_money.currency string

貨幣。

稅款
checkout.order.taxes array of object
UID
checkout.order.taxes.uid string

唯一的 ID。

類型
checkout.order.taxes.type string

此物件的類型。

百分比
checkout.order.taxes.percentage string

稅金的百分比,作為十進位數的字串表示法。

Scope
checkout.order.taxes.scope string

指出物件套用的層級。

折扣
checkout.order.discounts array of object
UID
checkout.order.discounts.uid string

唯一的 ID。

類型
checkout.order.discounts.type string

此物件的類型。

Scope
checkout.order.discounts.scope string

指出物件套用的層級。

總數
checkout.order.discounts.amount_money.amount integer

金額。

貨幣
checkout.order.discounts.amount_money.currency string

貨幣。

總數
checkout.order.discounts.applied_money.amount integer

金額。

貨幣
checkout.order.discounts.applied_money.currency string

貨幣。

總數
checkout.order.total_money.amount integer

金額。

貨幣
checkout.order.total_money.currency string

貨幣。

總數
checkout.order.total_tax_money.amount integer

金額。

貨幣
checkout.order.total_tax_money.currency string

貨幣。

總數
checkout.order.total_discount_money.amount integer

金額。

貨幣
checkout.order.total_discount_money.currency string

貨幣。

創建於
checkout.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

版本
checkout.version integer

此物件的目前版本。

其他收件人
checkout.additional_recipients array of object
位置標識碼
checkout.additional_recipients.location_id string

接收此投標部分的收件人(商家除外)的位置 ID。

Description
checkout.additional_recipients.title string

項目的描述。 這是用於適用查詢過濾器的可搜尋屬性,其值長度是 Unicode 字碼點。

總數
checkout.additional_recipients.amount_money.amount integer

金額。

貨幣
checkout.additional_recipients.amount_money.currency string

貨幣。

建立行動授權碼

生成代碼以授權移動應用程序連接到 Square 讀卡機。 授權碼是一次性使用的,發出後 60 分鐘後過期。

參數

名稱 機碼 必要 類型 Description
位置標識碼
location_id string

位置識別碼。

傳回

名稱 路徑 類型 Description
授權碼
authorization_code string

產生的授權碼,用於將行動應用程式執行個體連接到 Square 帳戶。

過期時間
expires_at string

authorization_code到期時的時間戳記,以 RFC 3339 格式呈現。

建立裝置程式碼

建立一個 DeviceCode,可用於登入 Square Terminal 裝置以進入連接的終端模式。

參數

名稱 機碼 必要 類型 Description
冪等金鑰
idempotency_key string

您指定的值,可在所有要求中唯一識別此要求。 建立有效冪等索引鍵的常見方式是使用通用唯一識別碼 (UUID)。

名稱
name string

物件的名稱。

位置標識碼
location_id string

位置的識別碼。

產品類型
product_type string

裝置代碼的目標產品型別。

傳回

名稱 路徑 類型 Description
ID
device_code.id string

Square 發行的唯一識別碼。

名稱
device_code.name string

物件的名稱。

Code
device_code.code string

可用於登入的唯一代碼。

產品類型
device_code.product_type string

裝置代碼的目標產品型別。

位置標識碼
device_code.location_id string

位置的識別碼。

創建於
device_code.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

配對方式
device_code.pair_by string

此 DeviceCode 何時過期且不再登入。 RFC 3339 格式的時間戳記。

地位
device_code.status string

此物件的目前驗證狀態。

狀態變更時間
device_code.status_changed_at string

上次變更此 DeviceCode 的狀態的時間。 RFC 3339 格式的時間戳記。

建立預訂 (Beta 版)

建立預約。

參數

名稱 機碼 必要 類型 Description
客戶識別碼
customer_id string

此物件代表客戶的 ID。

開始於
start_at string

指定此物件開始時間的時間戳記,採用 RFC 3339 格式。

位置標識碼
location_id string

位置的識別碼。

持續時間分鐘
duration_minutes integer

約會區段的時間跨度 (以分鐘為單位)。

團隊成員 ID
team_member_id string

TeamMember 物件的 ID,代表在此區段中預約的團隊成員。

服務變化 ID
service_variation_id string

CatalogItemVariation 物件的識別碼,代表此區段中預約的服務。

服務變化版本
service_variation_version integer

項目變化的當前版本,代表此區段中預訂的服務。

傳回

名稱 路徑 類型 Description
ID
booking.id string

Square 發行的唯一識別碼。

版本
booking.version integer

此物件的目前版本。

地位
booking.status string

此物件的目前驗證狀態。

創建於
booking.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

更新於
booking.updated_at string

指定此物件最近更新時間的時間戳記,採用 RFC 3339 格式。

位置標識碼
booking.location_id string

位置的識別碼。

客戶識別碼
booking.customer_id string

此物件代表客戶的 ID。

客戶說明
booking.customer_note string

供客戶提供有關預訂的附註的自由文字欄位。

賣家備註
booking.seller_note string

賣方提供有關預訂的附註的自由文字欄位。

開始於
booking.start_at string

指定此物件開始時間的時間戳記,採用 RFC 3339 格式。

預約部分
booking.appointment_segments array of object
持續時間分鐘
booking.appointment_segments.duration_minutes integer

約會區段的時間跨度 (以分鐘為單位)。

服務變化 ID
booking.appointment_segments.service_variation_id string

CatalogItemVariation 物件的識別碼,代表此區段中預約的服務。

團隊成員 ID
booking.appointment_segments.team_member_id string

TeamMember 物件的 ID,代表在此區段中預約的團隊成員。

服務變化版本
booking.appointment_segments.service_variation_version integer

項目變化的當前版本,代表此區段中預訂的服務。

Errors
errors array of

從 GAN 檢索禮品卡(測試版)

使用禮品卡帳號 (GAN) 擷取禮品卡。

參數

名稱 機碼 必要 類型 Description
氮化鎵
gan string

禮品卡帳號。

傳回

名稱 路徑 類型 Description
ID
gift_card.id string

Square 發行的唯一識別碼。

類型
gift_card.type string

此物件的類型。

GAN來源
gift_card.gan_source string

指出禮品卡帳號 (GAN) 是由 Square 產生還是從非 Square 系統匯入。

State
gift_card.state string

目前的狀態。

總數
gift_card.balance_money.amount integer

金額。

貨幣
gift_card.balance_money.currency string

貨幣。

氮化鎵
gift_card.gan string

禮品卡帳號。

創建於
gift_card.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

從隨機數擷取禮品卡 (Beta)

使用代表禮品卡的隨機數(安全權杖)擷取禮品卡。

參數

名稱 機碼 必要 類型 Description
隨機數
nonce string

要擷取的禮品卡的隨機數。

傳回

名稱 路徑 類型 Description
ID
gift_card.id string

Square 發行的唯一識別碼。

類型
gift_card.type string

此物件的類型。

GAN來源
gift_card.gan_source string

指出禮品卡帳號 (GAN) 是由 Square 產生還是從非 Square 系統匯入。

State
gift_card.state string

目前的狀態。

總數
gift_card.balance_money.amount integer

金額。

貨幣
gift_card.balance_money.currency string

貨幣。

氮化鎵
gift_card.gan string

禮品卡帳號。

創建於
gift_card.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

搜尋可用性 (Beta 版)

搜尋預訂的空房情況。

參數

名稱 機碼 必要 類型 Description
開始於
start_at string

RFC 3339 格式的日期時間值,指出時間範圍何時開始。

結束時間
end_at string

RFC 3339 格式的日期時間值,指出時間範圍何時結束。

位置標識碼
location_id string

查詢運算式,用於搜尋符合指定賣家位置 ID 的可用性。

服務變化 ID
service_variation_id string

CatalogItemVariation 的識別碼,代表此區段中預約的服務。

任意
any array of string

傳回

名稱 路徑 類型 Description
可用性
availabilities array of object
開始於
availabilities.start_at string

RFC 3339 時間戳記,指定可用插槽的開始時間。

位置標識碼
availabilities.location_id string

位置的識別碼。

預約區段
availabilities.appointment_segments array of object
持續時間分鐘
availabilities.appointment_segments.duration_minutes integer

約會區段的時間跨度 (以分鐘為單位)。

團隊成員 ID
availabilities.appointment_segments.team_member_id string

TeamMember 物件的 ID,代表在此區段中預約的團隊成員。

服務變化 ID
availabilities.appointment_segments.service_variation_id string

CatalogItemVariation 物件的識別碼,代表此區段中預約的服務。

服務變化版本
availabilities.appointment_segments.service_variation_version integer

項目變化的當前版本,代表此區段中預訂的服務。

Errors
errors array of

搜尋團隊成員

傳回企業的 TeamMember 物件的編頁清單。

參數

名稱 機碼 必要 類型 Description
位置 ID
location_ids array of string
地位
status string

目前狀態。

限制
limit integer

在單一頁面中傳回的結果數目限制。 限制是建議性的 - 實作可能會傳回更多或更少的結果。 如果提供的限制為負數、零或高於 1,000 的最大限制,則會忽略它。

傳回

名稱 路徑 類型 Description
小組成員
team_members array of object
ID
team_members.id string

Square 發行的唯一識別碼。

參考標識碼
team_members.reference_id string

選用的第二個 ID,用來將客戶設定檔與另一個系統中的實體建立關聯。

是擁有者
team_members.is_owner boolean

團隊成員是否是 Square 帳戶的擁有者。

地位
team_members.status string

此物件的目前驗證狀態。

名字
team_members.given_name string

與客戶設定檔相關聯的給定(即名字)名稱。

team_members.family_name string

與客戶設定檔相關聯的家族 (即姓氏) 名稱。

電子郵件地址
team_members.email_address string

與客戶設定檔相關聯的電子郵件地址。

創建於
team_members.created_at string

ISO 8601 格式的事件時間。

更新於
team_members.updated_at string

RFC 3339 格式的上次修改時間戳記

指派類型
team_members.assigned_locations.assignment_type string

小組成員的目前指派類型。

電話號碼
team_members.phone_number string

與客戶設定檔相關聯的 11 位電話號碼。

Cursor
cursor string

在此端點的後續呼叫中包含分頁游標,以擷取與原始查詢相關聯的下一組結果。

搜尋忠誠度帳戶

在忠誠度計畫中搜尋忠誠度帳戶。

參數

名稱 機碼 必要 類型 Description
限制
limit integer

在單一頁面中傳回的結果數目限制。 限制是建議性的 - 實作可能會傳回更多或更少的結果。 如果提供的限制為負數、零或高於 1,000 的最大限制,則會忽略它。

傳回

名稱 路徑 類型 Description
忠誠度帳戶
loyalty_accounts array of object
ID
loyalty_accounts.id string

Square 發行的唯一識別碼。

ID
loyalty_accounts.mapping.id string

物件的識別碼

電話號碼
loyalty_accounts.mapping.phone_number string

收件者的電話號碼。

創建於
loyalty_accounts.mapping.created_at string

建立時的時間戳記,採用 RFC 3339 格式。

方案標識碼
loyalty_accounts.program_id string

帳戶所屬忠誠度計畫的Square指派ID。

loyalty_accounts.balance integer

忠誠度帳戶中的可用積分餘額。

終身積分
loyalty_accounts.lifetime_points integer

帳戶生命週期內累積的總積分。

客戶識別碼
loyalty_accounts.customer_id string

與帳戶相關聯之客戶的 Square 指派 ID。

創建於
loyalty_accounts.created_at string

ISO 8601 格式的事件時間。

更新於
loyalty_accounts.updated_at string

RFC 3339 格式的上次修改時間戳記

Cursor
cursor string

在此端點的後續呼叫中包含分頁游標,以擷取與原始查詢相關聯的下一組結果。

搜尋忠誠度活動

搜尋忠誠度活動。 Square 忠誠度計劃維護買家忠誠度帳戶生命週期內發生的事件分類帳。 積分餘額的每次變化(例如,賺取的積分、兌換的積分和過期的積分)都會記錄在分類帳中。 使用此端點,您可以在分類帳中搜尋事件。

參數

名稱 機碼 必要 類型 Description
訂單編號
order_id string

訂單識別碼。

限制
limit integer

在單一頁面中傳回的結果數目限制。 限制是建議性的 - 實作可能會傳回更多或更少的結果。 如果提供的限制為負數、零或高於 1,000 的最大限制,則會忽略它。

傳回

名稱 路徑 類型 Description
活動
events array of object
ID
events.id string

Square 發行的唯一識別碼。

類型
events.type string

此物件的類型。

創建於
events.created_at string

ISO 8601 格式的事件時間。

忠誠度計劃ID
events.accumulate_points.loyalty_program_id string

忠誠度計畫的識別碼

Points
events.accumulate_points.points integer

活動累積的積分數。

訂單編號
events.accumulate_points.order_id string

與活動相關聯的訂單ID。

忠誠度帳戶 ID
events.loyalty_account_id string

發生事件的忠誠度帳戶的ID。

位置標識碼
events.location_id string

位置的識別碼。

來源
events.source string

定義事件是否由 Square Point of Sale 產生。

忠誠度計劃ID
events.redeem_reward.loyalty_program_id string

忠誠度計畫的識別碼

獎勵 ID
events.redeem_reward.reward_id string

已兌換忠誠度獎勵的ID。

訂單編號
events.redeem_reward.order_id string

與活動相關聯的訂單ID。

忠誠度計劃ID
events.create_reward.loyalty_program_id string

忠誠度計畫的識別碼

獎勵 ID
events.create_reward.reward_id string

已兌換忠誠度獎勵的ID。

Points
events.create_reward.points integer

活動累積的積分數。

搜尋忠誠度獎勵

在忠誠度帳戶中搜尋忠誠度獎勵。

參數

名稱 機碼 必要 類型 Description
忠誠度帳戶 ID
loyalty_account_id string

發生事件的忠誠度帳戶的ID。

限制
limit integer

在單一頁面中傳回的結果數目限制。 限制是建議性的 - 實作可能會傳回更多或更少的結果。 如果提供的限制為負數、零或高於 1,000 的最大限制,則會忽略它。

傳回

名稱 路徑 類型 Description
獎勵
rewards array of object
ID
rewards.id string

Square 發行的唯一識別碼。

地位
rewards.status string

此物件的目前驗證狀態。

忠誠度帳戶 ID
rewards.loyalty_account_id string

發生事件的忠誠度帳戶的ID。

獎勵等級 ID
rewards.reward_tier_id string

用於建立獎勵的獎勵層級的 Square 指派 ID。

Points
rewards.points integer

用於獎勵的忠誠度點數。

訂單編號
rewards.order_id string

訂單的識別碼。

創建於
rewards.created_at string

ISO 8601 格式的事件時間。

更新於
rewards.updated_at string

RFC 3339 格式的上次修改時間戳記

兌換方式
rewards.redeemed_at string

兌換獎勵的時間戳記,採用 RFC 3339 格式。

搜尋班次

傳回企業的班次記錄的編頁清單。

參數

名稱 機碼 必要 類型 Description
開始日期
start_date string

YYYY-MM-DD 格式的字串,例如 2017-10-31,符合日曆日期的 ISO 8601 擴充格式。 日期範圍 (含) 的開頭。

結束日期
end_date string

YYYY-MM-DD 格式的字串,例如 2017-10-31,符合日曆日期的 ISO 8601 擴充格式。 日期範圍 (含) 的結尾。

比賽班次依據
match_shifts_by string

套用日期的策略。

預設時區
default_timezone string

特定位置時區會將工作日轉換為日期時間篩選器。 查詢中包含的每個位置都必須具有時區,或必須提供此欄位作為後援。 格式:相關時區的 IANA 時區資料庫識別碼。

限制
limit integer

在單一頁面中傳回的結果數目限制。 限制是建議性的 - 實作可能會傳回更多或更少的結果。 如果提供的限制為負數、零或高於 1,000 的最大限制,則會忽略它。

傳回

名稱 路徑 類型 Description
班次
shifts array of object
ID
shifts.id string

Square 發行的唯一識別碼。

團隊成員 ID
shifts.team_member_id string

與物件相關聯之小組成員的 TeamMember 物件 ID。

位置標識碼
shifts.location_id string

位置的識別碼。

Timezone
shifts.timezone string

用於解譯發票上行事曆日期的時區,例如due_date。 建立發票時,此欄位會設定為為賣方位置指定的時區。 無法變更值。

開始於
shifts.start_at string

RFC 3339 時間戳記,指定可用插槽的開始時間。

結束時間
shifts.end_at string

RFC 3339;已移至時區 + 偏移量。 尊重分鐘的精確度;秒會被截斷。

Title
shifts.wage.title string

在此班次期間執行的工作名稱。 Square 勞工報告 UI 可能會依職稱將班次分組在一起。

總數
shifts.wage.hourly_rate.amount integer

金額。

貨幣
shifts.wage.hourly_rate.currency string

貨幣。

休息
shifts.breaks array of object
ID
shifts.breaks.id string

參考此物件的識別碼。

開始於
shifts.breaks.start_at string

RFC 3339 格式的日期時間值,指出時間範圍何時開始。

結束時間
shifts.breaks.end_at string

RFC 3339 格式的日期時間值,指出時間範圍何時結束。

中斷類型 ID
shifts.breaks.break_type_id string

此 Break 範本化的 BreakType。

名稱
shifts.breaks.name string

人類可讀的名稱。

預期持續時間
shifts.breaks.expected_duration string

預期的休息時間長度。 格式:RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S。

已付費
shifts.breaks.is_paid boolean

此休息時間是否計入補償目的的工作時間。

地位
shifts.status string

此物件的目前驗證狀態。

版本
shifts.version integer

物件的目前版本。

創建於
shifts.created_at string

ISO 8601 格式的事件時間。

更新於
shifts.updated_at string

RFC 3339 格式的上次修改時間戳記

擷取企業預訂資料 (Beta 版)

擷取賣家的預訂設定檔。

傳回

名稱 路徑 類型 Description
賣家編號
business_booking_profile.seller_id string

賣家的ID,可使用商家API取得。

創建於
business_booking_profile.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

已啟用預訂
business_booking_profile.booking_enabled boolean

指出賣家是否開放預訂。

客戶時區選擇
business_booking_profile.customer_timezone_choice string

選擇客戶預訂的時區資訊。 Square 線上預訂網站和給客戶的所有通知都使用賣家所在地的時區或客戶在預訂時選擇的時區。

預訂政策
business_booking_profile.booking_policy string

賣家自動接受預訂請求 (ACCEPT_ALL) 或不接受預訂請求 (REQUIRES_ACCEPTANCE) 的政策。

允許使用者取消
business_booking_profile.allow_user_cancel boolean

指出客戶是否可以取消或重新排程自己的預訂 (true) 或不取消 (false)。

位置類型
business_booking_profile.business_appointment_settings.location_types array of string
對齊時間
business_booking_profile.business_appointment_settings.alignment_time string

預約服務持續時間的時間單位。

最小預訂茶時間秒數
business_booking_profile.business_appointment_settings.min_booking_lead_time_seconds integer

預訂服務之前的最短前置時間(以秒為單位)。 預訂必須至少在預訂開始時間之前建立。

最大預訂前置時間秒數
business_booking_profile.business_appointment_settings.max_booking_lead_time_seconds integer

預訂服務之前的最大前置時間(以秒為單位)。 預訂最多必須在預訂開始時間之前建立。

已啟用任何團隊成員預訂
business_booking_profile.business_appointment_settings.any_team_member_booking_enabled boolean

指出客戶是否可以從所有可用時段中選擇,並自動指派員工 (true) 或不指派 (false)。

啟用多項服務預訂
business_booking_profile.business_appointment_settings.multiple_service_booking_enabled boolean

指出客戶是否可以在單一線上預訂中預訂多項服務。

總數
business_booking_profile.business_appointment_settings.cancellation_fee_money.amount string

貨幣金額,以貨幣表示的貨幣的最小面額

貨幣
business_booking_profile.business_appointment_settings.cancellation_fee_money.currency string

貨幣類型,採用 ISO 4217 格式。

取消政策
business_booking_profile.business_appointment_settings.cancellation_policy string

賣方採用的取消政策。

跳過預訂流程員工選擇
business_booking_profile.business_appointment_settings.skip_booking_flow_staff_selection boolean

指出客戶是否有指派的員工 (true) 或可以選取他們選擇的員工 (false)。

Errors
errors array of

擷取位置

擷取位置的詳細資料。 您可以指定「main」作為位置 ID,以擷取主要位置的詳細資料。

參數

名稱 機碼 必要 類型 Description
位置標識碼
location_id True string

位置的識別碼。

傳回

名稱 路徑 類型 Description
ID
location.id string

Square 發行的唯一識別碼。

名稱
location.name string

物件的名稱。

地址行 1
location.address.address_line_1 string

地址的第一行。 以address_line開頭的欄位提供地址最具體的詳細信息,例如街道號碼、街道名稱和建築物名稱。

地區
location.address.locality string

地址所在的城市或城鎮。

行政區一級
location.address.administrative_district_level_1 string

地址所在國家/地區內的民間實體。 在美國,這就是州。

郵遞區號
location.address.postal_code string

地址的郵遞區號。

國家
location.address.country string

地址的國家/地區,採用 ISO 3166-1-alpha-2 格式。

Timezone
location.timezone string

用來解譯行事曆日期的時區。 建立發票時,此欄位會設定為為賣方位置指定的時區。 無法變更值。

能力
location.capabilities array of string
地位
location.status string

此物件的目前驗證狀態。

創建於
location.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

商家 ID
location.merchant_id string

商家的 ID。

國家
location.country string

ISO 3166 Alpha-2 國家代碼。

語言代碼
location.language_code string

語言代碼,採用 BCP 47 格式。

貨幣
location.currency string

3 個字元的 ISO 4217 貨幣代碼。

電話號碼
location.phone_number string

與客戶設定檔相關聯的 11 位電話號碼。

企業名稱
location.business_name string

位置的企業名稱這是該位置的客戶可見的名稱。 例如,此名稱會顯示在客戶收據上。

擷取商家

擷取指定merchant_id的 Merchant 物件。

參數

名稱 機碼 必要 類型 Description
商家 ID
merchant_id True string

商家的識別碼。

傳回

名稱 路徑 類型 Description
ID
merchant.id string

Square 發行的唯一識別碼。

企業名稱
merchant.business_name string

位置的企業名稱這是該位置的客戶可見的名稱。 例如,此名稱會顯示在客戶收據上。

國家
merchant.country string

ISO 3166 Alpha-2 國家代碼。

語言代碼
merchant.language_code string

語言代碼,採用 BCP 47 格式。

貨幣
merchant.currency string

3 個字元的 ISO 4217 貨幣代碼。

地位
merchant.status string

此物件的目前驗證狀態。

主要位置 ID
merchant.main_location_id string

此商家的主要位置 ID。

擷取團隊成員

擷取指定 TeamMember 識別碼的 TeamMember 物件。

參數

名稱 機碼 必要 類型 Description
團隊成員 ID
team_member_id True string

團隊成員的識別碼。

傳回

名稱 路徑 類型 Description
ID
team_member.id string

Square 發行的唯一識別碼。

參考標識碼
team_member.reference_id string

選用的使用者定義參照 ID。

是擁有者
team_member.is_owner boolean

團隊成員是否是 Square 帳戶的擁有者。

地位
team_member.status string

此物件的目前驗證狀態。

名字
team_member.given_name string

與客戶設定檔相關聯的給定(即名字)名稱。

team_member.family_name string

與客戶設定檔相關聯的家族 (即姓氏) 名稱。

電子郵件地址
team_member.email_address string

與客戶設定檔相關聯的電子郵件地址。

電話號碼
team_member.phone_number string

與客戶設定檔相關聯的 11 位電話號碼。

創建於
team_member.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

更新於
team_member.updated_at string

指定此物件最近更新時間的時間戳記,採用 RFC 3339 格式。

指派類型
team_member.assigned_locations.assignment_type string

小組成員的目前指派類型。

位置 ID
team_member.assigned_locations.location_ids array of string

擷取忠誠度帳戶

擷取忠誠度帳戶。

參數

名稱 機碼 必要 類型 Description
帳戶識別碼
account_id True string

帳戶的識別碼。

傳回

名稱 路徑 類型 Description
ID
loyalty_account.id string

Square 發行的唯一識別碼。

ID
loyalty_account.mapping.id string

Square 指派的 ID。

電話號碼
loyalty_account.mapping.phone_number string

收件者的電話號碼。

創建於
loyalty_account.mapping.created_at string

建立時的時間戳記,採用 RFC 3339 格式。

方案標識碼
loyalty_account.program_id string

程式的 Square 指派 ID。

loyalty_account.balance integer

可用餘額。

終身積分
loyalty_account.lifetime_points integer

帳戶生命週期內累積的總積分。

客戶識別碼
loyalty_account.customer_id string

此物件代表客戶的 ID。

創建於
loyalty_account.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

更新於
loyalty_account.updated_at string

指定此物件最近更新時間的時間戳記,採用 RFC 3339 格式。

擷取忠誠度獎勵

擷取忠誠度獎勵。

參數

名稱 機碼 必要 類型 Description
獎勵 ID
reward_id True string

獎勵的識別碼。

傳回

名稱 路徑 類型 Description
ID
reward.id string

Square 發行的唯一識別碼。

地位
reward.status string

此物件的目前驗證狀態。

忠誠度帳戶 ID
reward.loyalty_account_id string

發生事件的忠誠度帳戶的ID。

獎勵等級 ID
reward.reward_tier_id string

用於建立獎勵的獎勵層級的 Square 指派 ID。

Points
reward.points integer

新增或移除的點數。

創建於
reward.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

更新於
reward.updated_at string

指定此物件最近更新時間的時間戳記,採用 RFC 3339 格式。

兌換方式
reward.redeemed_at string

兌換獎勵的時間戳記,採用 RFC 3339 格式。

擷取忠誠度計畫

擷取賣方帳戶中的忠誠度計劃,由計劃 ID 或關鍵字 main 指定。 忠誠度計劃定義了買家如何賺取積分並用積分兌換獎勵。

參數

名稱 機碼 必要 類型 Description
方案標識碼
program_id True string

程式的識別碼。

傳回

名稱 路徑 類型 Description
ID
program.id string

Square 發行的唯一識別碼。

地位
program.status string

此物件的目前驗證狀態。

獎勵等級
program.reward_tiers array of object
ID
program.reward_tiers.id string

物件的識別碼

Points
program.reward_tiers.points integer

活動累積的積分數。

名稱
program.reward_tiers.name string

項目的名稱。 這是用於適用查詢過濾器的可搜尋屬性,其值不得為空,且長度為 Unicode 字碼點。

Scope
program.reward_tiers.definition.scope string

指出物件套用的層級。

折扣類型
program.reward_tiers.definition.discount_type string

獎勵層級提供的折扣類型。

百分比折扣
program.reward_tiers.definition.percentage_discount string

折扣的固定百分比。

創建於
program.reward_tiers.created_at string

建立時的時間戳記,採用 RFC 3339 格式。

物件識別碼
program.reward_tiers.pricing_rule_reference.object_id string

參考物件的識別碼。

目錄版本
program.reward_tiers.pricing_rule_reference.catalog_version string

物件的版本。

One
program.terminology.one string

一個點的奇異單位(例如,1 個點稱為 1 顆星)。

Other
program.terminology.other string

點的複數單位(例如,10 點稱為 10 顆星)。

位置 ID
program.location_ids array of string
創建於
program.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

更新於
program.updated_at string

指定此物件最近更新時間的時間戳記,採用 RFC 3339 格式。

應計規則
program.accrual_rules array of object
應計類型
program.accrual_rules.accrual_type string

定義買家如何賺取積分的累算規則類型。

Points
program.accrual_rules.points integer

活動累積的積分數。

總數
program.accrual_rules.spend_amount_money.amount integer

金額。

排除的類別 ID
program.accrual_rules.excluded_category_ids array of string
排除的項目變化 ID
program.accrual_rules.excluded_item_variation_ids array of string

擷取禮品卡 (Beta)

使用禮品卡的 ID 擷取禮品卡。

參數

名稱 機碼 必要 類型 Description
ID
id True string

識別碼。

傳回

名稱 路徑 類型 Description
ID
gift_card.id string

Square 發行的唯一識別碼。

類型
gift_card.type string

此物件的類型。

GAN來源
gift_card.gan_source string

指出禮品卡帳號 (GAN) 是由 Square 產生還是從非 Square 系統匯入。

State
gift_card.state string

目前的狀態。

總數
gift_card.balance_money.amount integer

金額。

貨幣
gift_card.balance_money.currency string

貨幣。

氮化鎵
gift_card.gan string

禮品卡帳號。

創建於
gift_card.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

擷取程式碼片段

從 Square Online 網站擷取您的程式碼片段。 一個網站可以包含來自多個程式碼片段應用程式的程式碼片段,但您只能擷取應用程式新增的程式碼片段。

參數

名稱 機碼 必要 類型 Description
站台識別碼
site_id True string

網站的識別碼。

傳回

名稱 路徑 類型 Description
ID
snippet.id string

Square 發行的唯一識別碼。

站台識別碼
snippet.site_id string

包含程式碼片段的網站識別碼。

Content
snippet.content string

程式碼片段程式碼,可以包含有效的 HTML、JavaScript 或兩者。

創建於
snippet.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

更新於
snippet.updated_at string

指定此物件最近更新時間的時間戳記,採用 RFC 3339 格式。

更新中斷類型

更新現有的 BreakType。

參數

名稱 機碼 必要 類型 Description
ID
id True string

識別碼。

位置標識碼
location_id string

位置的識別碼。

中斷名稱
break_name string

這種類型的中斷的人類可讀名稱。 該名稱在 Square 產品中顯示給員工。

預期持續時間
expected_duration string

此中斷的預期長度。 格式:RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S。 小於分鐘的精確度會被截斷。

已付費
is_paid boolean

此休息時間是否計入補償目的的工作時間。

版本
version integer

此物件的目前版本。

傳回

名稱 路徑 類型 Description
ID
break_type.id string

Square 發行的唯一識別碼。

位置標識碼
break_type.location_id string

位置的識別碼。

中斷名稱
break_type.break_name string

這種類型的中斷的人類可讀名稱。 該名稱在 Square 產品中顯示給員工。

預期持續時間
break_type.expected_duration string

此中斷的預期長度。 格式:RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S。 小於分鐘的精確度會被截斷。

已付費
break_type.is_paid boolean

此休息時間是否計入補償目的的工作時間。

版本
break_type.version integer

此物件的目前版本。

創建於
break_type.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

更新於
break_type.updated_at string

指定此物件最近更新時間的時間戳記,採用 RFC 3339 格式。

更新位置 (Beta 版)

更新位置。

參數

名稱 機碼 必要 類型 Description
位置標識碼
location_id True string

位置的識別碼。

名稱
name string

物件的名稱。

Description
description string

描述。

臉書網址
facebook_url string

位置的 Facebook 設定檔 URL。 URL 應以「facebook.com/」開頭。

推特用戶名
twitter_username string

位置的 Twitter 用戶名,不帶“@”符號。

Instagram 用戶名
instagram_username string

該位置的 Instagram 用戶名,不帶“@”符號。

地址行 1
address_line_1 string

地址的第一行。 以address_line開頭的欄位提供地址最具體的詳細信息,例如街道號碼、街道名稱和建築物名稱。

行政區一級
administrative_district_level_1 string

地址所在國家/地區內的民間實體。 在美國,這就是州。

地區
locality string

地址所在的城市或城鎮。

郵遞區號
postal_code string

地址的郵遞區號。

星期幾
day_of_week string

此時段的星期幾。

開始當地時間
start_local_time string

上班時間期間的開始時間,使用部分時間 RFC 3339 格式以當地時間指定。

結束當地時間
end_local_time string

上班時間期間的結束時間,使用部分時間 RFC 3339 格式以當地時間指定。

傳回

名稱 路徑 類型 Description
ID
location.id string

Square 發行的唯一識別碼。

名稱
location.name string

物件的名稱。

地址行 1
location.address.address_line_1 string

地址的第一行。 以address_line開頭的欄位提供地址最具體的詳細信息,例如街道號碼、街道名稱和建築物名稱。

地區
location.address.locality string

地址所在的城市或城鎮。

行政區一級
location.address.administrative_district_level_1 string

地址所在國家/地區內的民間實體。 在美國,這就是州。

郵遞區號
location.address.postal_code string

地址的郵遞區號。

Timezone
location.timezone string

用來解譯行事曆日期的時區。 建立發票時,此欄位會設定為為賣方位置指定的時區。 無法變更值。

能力
location.capabilities array of string
地位
location.status string

此物件的目前驗證狀態。

創建於
location.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

商家 ID
location.merchant_id string

商家的 ID。

國家
location.country string

ISO 3166 Alpha-2 國家代碼。

語言代碼
location.language_code string

語言代碼,採用 BCP 47 格式。

貨幣
location.currency string

3 個字元的 ISO 4217 貨幣代碼。

電話號碼
location.phone_number string

與客戶設定檔相關聯的 11 位電話號碼。

企業名稱
location.business_name string

位置的企業名稱這是該位置的客戶可見的名稱。 例如,此名稱會顯示在客戶收據上。

類型
location.type string

此物件的類型。

網站 URL
location.website_url string

位置的網站 URL。

期間
location.business_hours.periods array of object
星期幾
location.business_hours.periods.day_of_week string

此時段的星期幾。

開始當地時間
location.business_hours.periods.start_local_time string

上班時間期間的開始時間,使用部分時間 RFC 3339 格式以當地時間指定。

結束當地時間
location.business_hours.periods.end_local_time string

上班時間期間的結束時間,使用部分時間 RFC 3339 格式以當地時間指定。

企業電子郵件
location.business_email string

位置的電子郵件。 該位置的客戶可以看到此電子郵件。 例如,電子郵件會顯示在客戶收據上。

Description
location.description string

描述。

推特用戶名
location.twitter_username string

位置的 Twitter 用戶名,不帶“@”符號。

Instagram 用戶名
location.instagram_username string

該位置的 Instagram 用戶名,不帶“@”符號。

緯度
location.coordinates.latitude float

座標的緯度以度數表示。

經度
location.coordinates.longitude float

座標的經度以度數表示。

MCC公司
location.mcc string

該地點的商家類別代碼 (MCC),由 ISO 18245 標準化。 MCC 描述了在該地點銷售的商品或服務的類型。

更新團隊成員

更新單一 TeamMember 物件。

參數

名稱 機碼 必要 類型 Description
團隊成員 ID
team_member_id True string

團隊成員的識別碼。

參考標識碼
reference_id string

選用的使用者定義參照 ID。

地位
status string

此物件的目前驗證狀態。

名字
given_name string

與客戶設定檔相關聯的給定(即名字)名稱。

family_name string

與客戶設定檔相關聯的家族 (即姓氏) 名稱。

電子郵件地址
email_address string

與客戶設定檔相關聯的電子郵件地址。

電話號碼
phone_number string

與客戶設定檔相關聯的 11 位電話號碼。

位置 ID
location_ids array of string
指派類型
assignment_type string

小組成員的目前指派類型。

傳回

名稱 路徑 類型 Description
ID
team_member.id string

Square 發行的唯一識別碼。

參考標識碼
team_member.reference_id string

選用的使用者定義參照 ID。

是擁有者
team_member.is_owner boolean

團隊成員是否是 Square 帳戶的擁有者。

地位
team_member.status string

此物件的目前驗證狀態。

名字
team_member.given_name string

與客戶設定檔相關聯的給定(即名字)名稱。

team_member.family_name string

與客戶設定檔相關聯的家族 (即姓氏) 名稱。

電子郵件地址
team_member.email_address string

與客戶設定檔相關聯的電子郵件地址。

電話號碼
team_member.phone_number string

與客戶設定檔相關聯的 11 位電話號碼。

創建於
team_member.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

指派類型
team_member.assigned_locations.assignment_type string

小組成員的目前指派類型。

位置 ID
team_member.assigned_locations.location_ids array of string

更新工作週設定

更新 WorkweekConfig。

參數

名稱 機碼 必要 類型 Description
ID
id True string

識別碼。

一周開始
start_of_week string

出於補償目的,工作週結束的星期幾。

當地時間一天的開始
start_of_day_local_time string

工作週結束的當地時間。 以 HH:MM 格式表示為字串 (也接受 HH:MM:SS,但秒數會被截斷)。

版本
version integer

此物件的目前版本。

傳回

名稱 路徑 類型 Description
ID
workweek_config.id string

Square 發行的唯一識別碼。

一周開始
workweek_config.start_of_week string

出於補償目的,工作週結束的星期幾。

當地時間一天的開始
workweek_config.start_of_day_local_time string

工作週結束的當地時間。 以 HH:MM 格式表示為字串 (也接受 HH:MM:SS,但秒數會被截斷)。

版本
workweek_config.version integer

此物件的目前版本。

創建於
workweek_config.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

更新於
workweek_config.updated_at string

指定此物件最近更新時間的時間戳記,採用 RFC 3339 格式。

更新工資設定

建立或更新 WageSetting 物件。

參數

名稱 機碼 必要 類型 Description
團隊成員 ID
team_member_id True string

團隊成員的識別碼。

是否免除加班費
is_overtime_exempt boolean

團隊成員是否不受賣家所在國家的加班規則的約束。

職稱
job_title string

工作的標題。

薪酬類型
pay_type string

用於計算付款期間內薪資金額的工作指派的目前薪資類型。

總數
amount integer

金額。

貨幣
currency string

貨幣。

每週時數
weekly_hours integer

工作的每週計畫時數。 如果工作 PayType 為 SALARY,請設定。

總數
amount integer

金額。

貨幣
currency string

貨幣。

傳回

名稱 路徑 類型 Description
團隊成員 ID
wage_setting.team_member_id string

團隊成員的 ID。

工作分配
wage_setting.job_assignments array of object
職稱
wage_setting.job_assignments.job_title string

工作的標題。

薪酬類型
wage_setting.job_assignments.pay_type string

用於計算付款期間內薪資金額的工作指派的目前薪資類型。

總數
wage_setting.job_assignments.hourly_rate.amount integer

金額。

貨幣
wage_setting.job_assignments.hourly_rate.currency string

貨幣。

總數
wage_setting.job_assignments.annual_rate.amount integer

金額。

貨幣
wage_setting.job_assignments.annual_rate.currency string

貨幣。

每週時數
wage_setting.job_assignments.weekly_hours integer

工作的每週計畫時數。 如果工作 PayType 為 SALARY,請設定。

是否免除加班費
wage_setting.is_overtime_exempt boolean

團隊成員是否不受賣家所在國家的加班規則的約束。

版本
wage_setting.version integer

此物件的目前版本。

創建於
wage_setting.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

更新於
wage_setting.updated_at string

指定此物件最近更新時間的時間戳記,採用 RFC 3339 格式。

更新插入程式碼片段

將程式碼片段新增至 Square Online 網站,或更新網站上的現有程式碼片段。 程式碼片段程式碼會附加至網站每個頁面的 head 元素結尾,結帳頁面除外。 程式碼片段應用程式可以將一個程式碼片段新增至指定的網站。

參數

名稱 機碼 必要 類型 Description
站台識別碼
site_id True string

網站的識別碼。

Content
content string

程式碼片段程式碼,可以包含有效的 HTML、JavaScript 或兩者。

傳回

名稱 路徑 類型 Description
ID
snippet.id string

Square 發行的唯一識別碼。

站台識別碼
snippet.site_id string

包含程式碼片段的網站識別碼。

Content
snippet.content string

程式碼片段程式碼,可以包含有效的 HTML、JavaScript 或兩者。

創建於
snippet.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

更新於
snippet.updated_at string

指定此物件最近更新時間的時間戳記,採用 RFC 3339 格式。

更新班次

更新現有班次。

參數

名稱 機碼 必要 類型 Description
ID
id True string

識別碼。

團隊成員 ID
team_member_id string

團隊成員的 ID。

位置標識碼
location_id string

位置的識別碼。

開始於
start_at string

指定此物件開始時間的時間戳記,採用 RFC 3339 格式。

結束時間
end_at string

RFC 3339;已移至時區 + 偏移量。 尊重分鐘的精確度;秒會被截斷。

Title
title string

在此班次期間執行的工作名稱。 Square 勞工報告 UI 可能會依職稱將班次分組在一起。

總數
amount integer

金額。

貨幣
currency string

貨幣。

ID
id string

物件的識別碼

開始於
start_at string

RFC 3339;遵循與 Shift 相同的時區資訊。 尊重分鐘的精確度;秒會被截斷。

結束時間
end_at string

RFC 3339;遵循與 Shift 相同的時區資訊。 尊重分鐘的精確度;秒會被截斷。

中斷類型 ID
break_type_id string

此 Break 範本化的 BreakType。

名稱
name string

項目的名稱。 這是用於適用查詢過濾器的可搜尋屬性,其值不得為空,且長度為 Unicode 字碼點。

預期持續時間
expected_duration string

預期的休息時間長度。 格式:RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S。

已付費
is_paid boolean

此休息時間是否計入補償目的的工作時間。

版本
version integer

此物件的目前版本。

傳回

名稱 路徑 類型 Description
ID
shift.id string

Square 發行的唯一識別碼。

團隊成員 ID
shift.team_member_id string

團隊成員的 ID。

員工 ID
shift.employee_id string

員工的 Square 產生的 ID。

位置標識碼
shift.location_id string

位置的識別碼。

Timezone
shift.timezone string

用來解譯行事曆日期的時區。 建立發票時,此欄位會設定為為賣方位置指定的時區。 無法變更值。

開始於
shift.start_at string

指定此物件開始時間的時間戳記,採用 RFC 3339 格式。

結束時間
shift.end_at string

RFC 3339;已移至時區 + 偏移量。 尊重分鐘的精確度;秒會被截斷。

Title
shift.wage.title string

在此班次期間執行的工作名稱。 Square 勞工報告 UI 可能會依職稱將班次分組在一起。

總數
shift.wage.hourly_rate.amount integer

金額。

貨幣
shift.wage.hourly_rate.currency string

貨幣。

休息
shift.breaks array of object
ID
shift.breaks.id string

物件的識別碼

開始於
shift.breaks.start_at string

RFC 3339;遵循與 Shift 相同的時區資訊。 尊重分鐘的精確度;秒會被截斷。

結束時間
shift.breaks.end_at string

RFC 3339;遵循與 Shift 相同的時區資訊。 尊重分鐘的精確度;秒會被截斷。

中斷類型 ID
shift.breaks.break_type_id string

此 Break 範本化的 BreakType。

名稱
shift.breaks.name string

項目的名稱。 這是用於適用查詢過濾器的可搜尋屬性,其值不得為空,且長度為 Unicode 字碼點。

預期持續時間
shift.breaks.expected_duration string

預期的休息時間長度。 格式:RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S。

已付費
shift.breaks.is_paid boolean

此休息時間是否計入補償目的的工作時間。

地位
shift.status string

此物件的目前驗證狀態。

版本
shift.version integer

此物件的目前版本。

創建於
shift.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

更新於
shift.updated_at string

指定此物件最近更新時間的時間戳記,採用 RFC 3339 格式。

檢索工資設定

擷取 TeamMember 識別碼所指定小組成員的 WageSetting 物件。

參數

名稱 機碼 必要 類型 Description
團隊成員 ID
team_member_id True string

團隊成員的識別碼。

傳回

名稱 路徑 類型 Description
團隊成員 ID
wage_setting.team_member_id string

團隊成員的 ID。

工作分配
wage_setting.job_assignments array of object
職稱
wage_setting.job_assignments.job_title string

工作的標題。

薪酬類型
wage_setting.job_assignments.pay_type string

用於計算付款期間內薪資金額的工作指派的目前薪資類型。

總數
wage_setting.job_assignments.hourly_rate.amount integer

金額。

貨幣
wage_setting.job_assignments.hourly_rate.currency string

貨幣。

總數
wage_setting.job_assignments.annual_rate.amount integer

金額。

貨幣
wage_setting.job_assignments.annual_rate.currency string

貨幣。

每週時數
wage_setting.job_assignments.weekly_hours integer

工作的每週計畫時數。 如果工作 PayType 為 SALARY,請設定。

是否免除加班費
wage_setting.is_overtime_exempt boolean

團隊成員是否不受賣家所在國家的加班規則的約束。

版本
wage_setting.version integer

此物件的目前版本。

創建於
wage_setting.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

更新於
wage_setting.updated_at string

指定此物件最近更新時間的時間戳記,採用 RFC 3339 格式。

檢索現金抽屜班次

提供單一現金抽屜班次的摘要詳細資料。

參數

名稱 機碼 必要 類型 Description
班次識別碼
shift_id True string

班次的識別碼。

位置標識碼
location_id True string

您可以指定此選用篩選器,以僅擷取屬於特定位置的記錄。

傳回

名稱 路徑 類型 Description
ID
cash_drawer_shift.id string

Square 發行的唯一識別碼。

State
cash_drawer_shift.state string

目前的狀態。

開放時間
cash_drawer_shift.opened_at string

輪班開始的時間,以 ISO 8601 格式。

結束時間
cash_drawer_shift.ended_at string

班次結束的時間,以 ISO 8601 格式。

關閉時間
cash_drawer_shift.closed_at string

關閉時間,以 ISO 8601 格式。

開設員工 ID
cash_drawer_shift.opening_employee_id string

開始現金抽屜班次的員工的 ID。

結束員工 ID
cash_drawer_shift.ending_employee_id string

結束現金抽屜班次的員工識別碼。

關閉員工 ID
cash_drawer_shift.closing_employee_id string

透過稽核現金抽屜內容來關閉現金抽屜班次的員工的 ID。

Description
cash_drawer_shift.description string

描述。

總數
cash_drawer_shift.opened_cash_money.amount integer

金額。

貨幣
cash_drawer_shift.opened_cash_money.currency string

貨幣。

總數
cash_drawer_shift.cash_payment_money.amount integer

金額。

貨幣
cash_drawer_shift.cash_payment_money.currency string

貨幣。

總數
cash_drawer_shift.cash_refunds_money.amount integer

金額。

貨幣
cash_drawer_shift.cash_refunds_money.currency string

貨幣。

總數
cash_drawer_shift.cash_paid_in_money.amount integer

金額。

貨幣
cash_drawer_shift.cash_paid_in_money.currency string

貨幣。

總數
cash_drawer_shift.cash_paid_out_money.amount integer

金額。

貨幣
cash_drawer_shift.cash_paid_out_money.currency string

貨幣。

總數
cash_drawer_shift.expected_cash_money.amount integer

金額。

貨幣
cash_drawer_shift.expected_cash_money.currency string

貨幣。

總數
cash_drawer_shift.closed_cash_money.amount integer

金額。

貨幣
cash_drawer_shift.closed_cash_money.currency string

貨幣。

名稱
cash_drawer_shift.device.name string

名稱。

清單中斷類型

傳回企業的 BreakType 執行個體的編頁清單。

參數

名稱 機碼 必要 類型 Description
位置標識碼
location_id string

您可以指定此選用篩選器,以僅擷取屬於特定位置的記錄。

限制
limit integer

回應中要傳回的數目上限。

Cursor
cursor string

先前呼叫此端點所傳回的分頁游標。

傳回

名稱 路徑 類型 Description
中斷類型
break_types array of object
ID
break_types.id string

Square 發行的唯一識別碼。

位置標識碼
break_types.location_id string

位置的識別碼。

中斷名稱
break_types.break_name string

這種類型的中斷的人類可讀名稱。 該名稱在 Square 產品中顯示給員工。

預期持續時間
break_types.expected_duration string

此中斷的預期長度。 格式:RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S。 小於分鐘的精確度會被截斷。

已付費
break_types.is_paid boolean

此休息時間是否計入補償目的的工作時間。

版本
break_types.version integer

物件的目前版本。

創建於
break_types.created_at string

ISO 8601 格式的事件時間。

更新於
break_types.updated_at string

RFC 3339 格式的上次修改時間戳記

Cursor
cursor string

在此端點的後續呼叫中包含分頁游標,以擷取與原始查詢相關聯的下一組結果。

獲得團隊成員工資

傳回 id 所指定的單一 TeamMemberWage。

參數

名稱 機碼 必要 類型 Description
ID
id True string

識別碼。

傳回

名稱 路徑 類型 Description
ID
team_member_wage.id string

Square 發行的唯一識別碼。

團隊成員 ID
team_member_wage.team_member_id string

團隊成員的 ID。

Title
team_member_wage.title string

標題。

總數
team_member_wage.hourly_rate.amount integer

金額。

貨幣
team_member_wage.hourly_rate.currency string

貨幣。

累積忠誠度積分

為忠誠度帳戶添加積分。

參數

名稱 機碼 必要 類型 Description
帳戶識別碼
account_id True string

帳戶的識別碼。

訂單編號
order_id string

訂單的識別碼。

位置標識碼
location_id string

位置識別碼。

冪等金鑰
idempotency_key string

您指定的值,可在所有要求中唯一識別此要求。 建立有效冪等索引鍵的常見方式是使用通用唯一識別碼 (UUID)。

傳回

名稱 路徑 類型 Description
ID
event.id string

Square 發行的唯一識別碼。

類型
event.type string

此物件的類型。

創建於
event.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

忠誠度計劃ID
event.accumulate_points.loyalty_program_id string

忠誠度計畫的識別碼

Points
event.accumulate_points.points integer

活動累積的積分數。

訂單編號
event.accumulate_points.order_id string

與活動相關聯的訂單ID。

忠誠度帳戶 ID
event.loyalty_account_id string

發生事件的忠誠度帳戶的ID。

位置標識碼
event.location_id string

位置的識別碼。

來源
event.source string

來源。

計算忠誠度積分

計算購買所賺取的積分。 應用程式可能會呼叫此端點,以顯示買家可以透過特定購買賺取的點數。

參數

名稱 機碼 必要 類型 Description
方案標識碼
program_id True string

程式的識別碼。

訂單編號
order_id string

訂單識別碼。

傳回

名稱 路徑 類型 Description
Points
points integer

買家可以從指定購買中獲得的積分。

調整忠誠度積分

在買家帳戶中添加積分或從購買者帳戶中扣除積分。 只有在您需要手動調整點時,才使用此端點。

參數

名稱 機碼 必要 類型 Description
帳戶識別碼
account_id True string

帳戶的識別碼。

Points
points integer

新增或移除的點數。

原因
reason string

這個物件的原因。

冪等金鑰
idempotency_key string

您指定的值,可在所有要求中唯一識別此要求。 建立有效冪等索引鍵的常見方式是使用通用唯一識別碼 (UUID)。

傳回

名稱 路徑 類型 Description
ID
event.id string

Square 發行的唯一識別碼。

類型
event.type string

此物件的類型。

創建於
event.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

忠誠度計劃ID
event.adjust_points.loyalty_program_id string

忠誠度計畫的識別碼

Points
event.adjust_points.points integer

活動累積的積分數。

原因
event.adjust_points.reason string

積分調整的原因。

忠誠度帳戶 ID
event.loyalty_account_id string

發生事件的忠誠度帳戶的ID。

來源
event.source string

來源。

輪班

傳回 id 指定的單一 Shift。

參數

名稱 機碼 必要 類型 Description
ID
id True string

識別碼。

傳回

名稱 路徑 類型 Description
ID
shift.id string

Square 發行的唯一識別碼。

團隊成員 ID
shift.team_member_id string

團隊成員的 ID。

員工 ID
shift.employee_id string

員工的 Square 產生的 ID。

位置標識碼
shift.location_id string

位置的識別碼。

Timezone
shift.timezone string

用來解譯行事曆日期的時區。 建立發票時,此欄位會設定為為賣方位置指定的時區。 無法變更值。

開始於
shift.start_at string

指定此物件開始時間的時間戳記,採用 RFC 3339 格式。

結束時間
shift.end_at string

RFC 3339;已移至時區 + 偏移量。 尊重分鐘的精確度;秒會被截斷。

Title
shift.wage.title string

在此班次期間執行的工作名稱。 Square 勞工報告 UI 可能會依職稱將班次分組在一起。

總數
shift.wage.hourly_rate.amount integer

金額。

貨幣
shift.wage.hourly_rate.currency string

貨幣。

休息
shift.breaks array of object
ID
shift.breaks.id string

物件的識別碼

開始於
shift.breaks.start_at string

RFC 3339;遵循與 Shift 相同的時區資訊。 尊重分鐘的精確度;秒會被截斷。

結束時間
shift.breaks.end_at string

RFC 3339;遵循與 Shift 相同的時區資訊。 尊重分鐘的精確度;秒會被截斷。

中斷類型 ID
shift.breaks.break_type_id string

此 Break 範本化的 BreakType。

名稱
shift.breaks.name string

項目的名稱。 這是用於適用查詢過濾器的可搜尋屬性,其值不得為空,且長度為 Unicode 字碼點。

預期持續時間
shift.breaks.expected_duration string

預期的休息時間長度。 格式:RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S。

已付費
shift.breaks.is_paid boolean

此休息時間是否計入補償目的的工作時間。

地位
shift.status string

此物件的目前驗證狀態。

版本
shift.version integer

此物件的目前版本。

創建於
shift.created_at string

指定此物件建立時間的時間戳記,採用 RFC 3339 格式。

更新於
shift.updated_at string

指定此物件最近更新時間的時間戳記,採用 RFC 3339 格式。

通過 V1 ID 獲取銀行賬戶

傳回 V1 銀行帳戶識別之 BankAccount 的詳細資料。

參數

名稱 機碼 必要 類型 Description
V1 銀行帳戶 ID
v1_bank_account_id True string

連接所需銀行賬戶的 V1 ID。

傳回

名稱 路徑 類型 Description
ID
bank_account.id string

Square 發行的唯一識別碼。

帳號後綴
bank_account.account_number_suffix string

帳號的最後幾位數字。

國家
bank_account.country string

ISO 3166 Alpha-2 國家代碼。

貨幣
bank_account.currency string

3 個字元的 ISO 4217 貨幣代碼。

帳戶類型
bank_account.account_type string

帳戶的類型。

持有人姓名
bank_account.holder_name string

帳戶持有人的姓名。

主要銀行識別號碼
bank_account.primary_bank_identification_number string

銀行的主要識別碼。

位置標識碼
bank_account.location_id string

位置的識別碼。

地位
bank_account.status string

此物件的目前驗證狀態。

可信賴
bank_account.creditable boolean

指出 Square 是否可以向此帳戶匯款。

可借記
bank_account.debitable boolean

指出 Square 是否可以從此帳戶中提取資金。

版本
bank_account.version integer

此物件的目前版本。

銀行名稱
bank_account.bank_name string

實際金融機構名稱。

定義

物件

這是類型 'object'。