iCHEF ERP 接合服務 是提供發票明細 API 讓 iCHEF 用戶所使用的 ERP 系統主動查詢,讓營運資料分析更完整,ERP 需求更輕量。詳細服務內容如下:
服務內容
接合方式
- 接合說明:須由 ERP 系統依據日期、時段區間或發票號碼,透過發票明細 API 主動篩選查詢。
- 支援格式:JSON
- 查詢方式:API
- Authentication:Provisioned Token
- Note::When query with no argument, API will return oldest 25 issued/cancelled invoices.
- 查詢所須的設定資訊:
- API Endpoint
- Access Token API
免責聲明
- 須由 ERP 系統主動透過發票明細 API 查詢,並於查詢當下進行資料擷取。
- 處理時間依資料量將有所不同,因此服務啟動和實際收到資料的時間會有差距。
- 以下幾種情況可能導致資料擷取不完整,恕無法自動補傳或更新:
- 店內無對外網路,資料無法完整上傳至 iCHEF 雲端。
- 店家在資料完整上傳至 iCHEF 雲端前,關閉 iCHEF POS App。
- 店內資料在上傳至 iCHEF 雲端時已經有錯誤。
API 更新紀錄
API 更新紀錄
| 更新日期 | 版本 | 更動內容 |
|---|---|---|
| 2025-12-30 | v1.2.2 | – 更新 Python 版本至 3.11 – 修正 original_price 的計算欄位,確保即使透過雲餐付款也可以拿到「單個商品」的價格 |
| 2024-07-29 | v1.2.11 | 因 Global Payments 美國運通卡只傳末三碼,會導致 Xero 無法顯示,因此將credit_card_last_four_digits 中包含的 * 字元去除 |
| 2024-02-12 | v1.2.11 | 因台灣稅局要求,若台灣 buyer_tax_info_tax_id 為 null 時,buyer_tax_info_tax_id 改為輸出 0000000000。 |
| 2021-12-23 | v1.2.10 | 若 paymane.type 為 credit_card 且 credit_card_type 為 null 時,credit_card_type 改為輸出 `other`。 |
Issued Invoice API
版本:v1.2.2
查詢參數
| URI / GET | impl | Argument | Example | Required | Description | Description |
|---|---|---|---|---|---|---|
| * Production URI: https://api.ichefpos.com/invoice-v1/{store_id}/issued * Stage URI: https://api.ichefpos.com/invoice-v1-stage/{store_id}/issued | invoice_numbers | * invoice_number format supported for each region: TW: AB12345678, AB12345679 SG/MY: AAAA12345678, AAAA12345679 Receipt: #-12345678, #-12345679 (# should be encoded as %23 when submit request) * query example: https://api.ichefpost.com/invoice_v1/issued?invoice_numbers=AB12345678, AB12345679, AB12345680, AB12345681 | Optional | If both invoice_number and (invoice_issued_dtime_from / invoice_issued_dtime_to) are specified, API will return "intersection" of both conditions. | 如果 invoice_number 以及 invoice_issued_dtime_from / invoice_issued_dtime_to 都有進行指定,則 API 將會回傳這兩個條件的交集。 | |
| invoice_issued_dtime_from | yyyymmdd-hhmmss * example: 20170512-162900 -> 20170512-162900.000 (System will append 000millisecond) | Optional | * For example, for getting info of all issued invoices in 2018/08/21, please set them as `invoice_issued_dtime_from=20180821-000000&invoice_issued_dtime_to=20180821-235959` (from 00:00:00, Aug. 21 to 23:59:59, Aug. 21), and the invoices issued in the last second will be also included. * If user only specify invoice_issued_dtime_to without invoice_issued_dtime_from, invoice_issued_dtime_from will be automatically set to the datetime of the oldest issued invoice in this store. | * 例:如需取用 2018/8/21 當日所有開立發票 請將時間參數設為 `invoice_issued_dtime_from=20180821-000000&invoice_issued_dtime_to=20180821-235959`( 2018年8月21日 0時0分0秒 至 2018年8月21日 23時59分59秒 ) 系統會自動將那最後 1 秒內的發票也包含進去。 * 若僅設定 invoice_issued_dtime_to 而未設定 invoice_issued_dtime_from,則 invoice_issued_dtime_from 會被自動設定為該店家最早開立之發票的時間。 |
||
| invoice_issued_dtime_to | yyyymmdd-hhmmss * example: 20170512-162900 -> 20170512-162900.000 (System will append 000millisecond) | Optional | ||||
| timezone | +8 (+ should be encoded as %2B when submit request) | Optional (default +0) | UTC | UTC | ||
| begin_invoice_number | TW: AB-12345678, AB-12345679 SG/MY: AAAA12345678, AAAA12345679 Receipt: #-12345678, #-12345679 | Optional (default: the invoice number of newest invoice) | API supports two ways to specify pagenation information but they are mutual exclusive. Error message will be returned when both arguments are populated. 1. begin_invoice_number 2. page | API 支援兩種互斥的條件來進行分頁設定,所以當兩個條件都被設定時,將會回傳錯誤代碼。 1. begin_invoice_number 2. page |
||
| page_index | 2 | Optional (default 0) | First page is page_index 0 (zero-based) | 第一頁的 page_index 為 0。 | ||
| limit | 25 | Optional (default 25) (hard limit 500) | User specify limit > hard-limit, or zero/negative/float limit number, API will return 400 bad parameter | 當指定的 limit 超過 500,或為 0、負數、或帶有小數時,將會回傳 400 bad parameter。 |
匯出資訊
| Object / Dictionary | Key | Data Type | Example Value | Description (English) | Description (Chinese) | |
|---|---|---|---|---|---|---|
| Response | store_id | String | mazendo | iCHEF store id | iCHEF store id | |
| paging | Dictionary | |||||
| invoices | Array of "invoice" dictionary | Qualified invoices sorted in ascending order of time | 合格的發票依照時間順序排列。 | |||
| paging | begin_invoice_number | Number or NULL | The first invoice number in the invoices array NULL when page_index type of pagenation is used | 陣列中第一張發票的號碼。 當分頁設定使用 page_index 時,會是空值。 |
||
| next_begin_invoice_number | String/Id or NULL | The invoice number of the first invoice in the next page NULL when page_index type of pagenation is used | 次頁陣列中第一張發票的號碼。 當分頁設定使用 page_index 時,會是空值。 |
|||
| previous_begin_invoice_number | String/Id or NULL | The invoice number of the first invoice in the previous page NULL when page_index type of pagenation is used | 前頁陣列中第一張發票的號碼。 當分頁設定使用 page_index 時,會是空值。 |
|||
| page_index | Number or NULL | 2 | Current page index (First page is page_index 0)(zero-based) NULL when begin_invoice_number type of pagenation is used | 目前的頁碼 (第一頁為 0)。 當分頁設定使用 begin_invoice_number 時,會是空值。 |
||
| limit | Number | 25 | Limit specified in request | 回傳的發票數量限制 | ||
| total_count | Number | Totoal qualified invoice number based on query argument | 指定條件中合格的發票總數。 | |||
| invoice | v | invoice_number | String | TW: "AB12345678" SG/MY: "AAAA12345678" Receipt: "#-12345678" | Invoice / Receipt number | 發票/收據號碼 |
| v | invoice_status | String | "issued", "cancelled" | Invoice / receipt's current issued status: issued or cancelled | 發票/收據目前的開立狀態:開立 / 作廢 | |
| v | invoice_issued_date | Date (unix timestamp) | Date time of Invoice issued | 發票開立時間 | ||
| v | invoice_cancelled_date | Date or NULL (unix timestamp) | Date time of Invoice cancelled: this field will be NULL if invoice status is issued | 發票作廢時間 (若發票/收據的開立狀態是開立,此欄位則為空) | ||
| v | customer_count | Number | 4 | Customer count for this invoice / receipt | 來客數 | |
| v | serve_ type | String | "takeout", "dine-in" | Whether customer is dine-in or take-out | 用餐類型 | |
| v | sales_amount_include_tax | Number | 110 | Sales amount including tax and after rounding | 含稅總價(小數點價格調整後) | |
| v | sales_amount_exclude_tax | Number | Sales amount excluding tax (no rounding) | 不含稅總價(無小數點價格調整) | ||
| v | tax_amount | Number | Tax amount (no rounding); In SG/MY, this field refers to GST tax amount | 稅額(無小數點價格調整); SG/MY: GST稅額 | ||
| v | tax_rate | Number | 0.05, 0.08 | Tax rate; Taiwan is 0.05, SG is 0.08 (Will be changed with government regulations) | 稅率 (例如:台灣0.05, 新加坡0.08,會隨政府規定變更) | |
| v | service_charge | Number | Service charge (no rounding) | 服務費(無小數點價格調整) | ||
| v | rounding | Number | +0.01 , +0.03 | Rounding amount | 小數點價格調整 | |
| v | buyer_tax_info_tax_id | String or NULL | Taiwan: Buyer's tax id; SG/MY: Buyer's GST Registration Number | 台灣: 買方統編 (因台灣稅局要求,台灣買方統編為 null 時,輸出 0000000000 ); SG/MY: Buyer's GST Registration Number | ||
| v | buyer_tax_info_company_name | String or NULL | mazendo | Buyer's company name | 買方公司名稱 | |
| buyer_tax_info_company_address | String or NULL | 231 Sunshine Street, Taipei, Taiwan | Buyer's company address | 買方公司地址 | ||
| v | buyer_tax_info_customer_name | String or NULL | Matt | Buyer's customer name | 買方客戶名稱 | |
| v | buyer_tax_info_customer_address | String or NULL | 231 Sunshine Street, Taipei, Taiwan | Buyer's customer address | 買方客戶地址 | |
| v | discounts | Array of "discount" dictionary | Discounts being applied | 此發票/收據套用的折扣 (0~多個) | ||
| v | payments | Array of "payment" dictionary | Payment method customer used | 此發票/收據使用的支付方式 (1~多個) | ||
| v | order_items | Array of "order_item" dictionary | Items customer ordered | 此發票/收據銷售的品項 (1~多個) | ||
| v | member_info | Dictionary | The snapshot of member information while generating this invoice / receipt | 開立此張發票/收據當下的會員資訊 (因為Facebook Rewards的集點模式有可能是先發點數,再讓消費者建立會員, 所以有可能出現member_point_events裡有給點的紀錄,但是member_info為null的情形) |
||
| v | member_point_events | Array of "member_point_event" dictionary | Point events being applied | 此發票/收據套用的點數集點/兑點事件 (0~多個) | ||
| is_mixed_payment_on | boolean | Turn on/off mixed payment | 開啟/關閉混合支付模式 | |||
| table_name | String | “A5","takeout","indoor" | Invoice / receipt's table at checkout | 此發票/收據結帳時的桌位 | ||
| discount | v | id | String/Id | Discount module id | 折扣模組id | |
| v | name | String | Discount module name (user editable) | 折扣模組名稱 | ||
| v | amount | Number | Discount amount | 折扣額 | ||
| payment | v | id | String/Id | Payment module id | 支付模組id | |
| v | name | String | "Cash", "Credit Card", "Food Panda" | Payment module name (user editable) | 支付模組名稱 | |
| v | type | String | "cash", "credit_card", "custom" | Payment module type | 支付模組類型 | |
| amount | Numeric | Payment amount | 支付結帳金額 | |||
| v | note | String or NULL | "Gomaji serial number" | Payment module text note | 支付模組註記 | |
| v | cash_change | Number or NULL | 23, 5.6 | Change amount when user paid with cash | 現金付款的找零 (若用非現金的支付模組,此欄位則為空) | |
| customer_pair_amount | Numeric | Customer pay amount | 客戶付款金額 | |||
| changa_amount | Numeric | Customer chang amount | 客戶找零金額 | |||
| v | credit_card_type | String or NULL | "visa", "master", "jcb", "china_union", "nets", "ae", "diners_club", "discover", "other" | Credit card type when user paid with credit card | 信用卡別,如果支付模組類型為"credit_card"時,此欄位儲存支付的信用卡別 (若用非信用卡的支付模組,此欄位則為空) |
|
| v | credit_card_last_four_digits | String or NULL | 3412 | Last four digit of credit card number when user paid with credit card Any * within last four digit will be trimmed. (Ex: *412 will have 412 returned) Note: Currently, only AE card have last four digit contain * | 付款信用卡的末四碼 (若用非信用卡的支付模組,此欄位則為空) 任何在末四碼的 * 字元會被移除 (Ex: *412 會得到 412) Note: 目前只有 AE (美國運通) 末 4 碼會包含 * |
|
| order_item | v | combos | Array of "combo" dictionary | Combos customer ordered | 銷售的套餐 (0~多個) | |
| v | items | Array of "item" dictionary | Items customer ordered | 銷售的單品 (0~多個) | ||
| member_info | v | name | String or NULL | Steve | Name of the member | 會員的姓名 (選填) |
| v | mobile | String | 0912345678*# | Mobile number of the member | 會員的手機號碼 | |
| v | tel | String or NULL | 021234567*# | Telephone number of the member | 會員的室內電話號碼 (選填) | |
| v | gender | String or NULL | Male, Female, Other | Gender of the member | 會員的性別 (選填) | |
| v | birth_year | String or NULL | 2019 | Birth year of the member | 會員的出生年份 (選填) | |
| v | birth_date | String or NULL | 01/01 | Birth date of the member | 會員的出生日期 (選填) | |
| v | address | String or NULL | No. 12, Ln. 145, Dunhua N. Rd., Songshan Dist., Taipei City 105, Taiwan (R.O.C.) | Address of the member | 會員的地址 (選填) | |
| v | String or NULL | test@ichef.com.tw | Email address of the member | 會員的email (選填) | ||
| v | note | String or NULL | Non-spicy food only | Note of the member | 會員的註記 (選填) | |
| v | ipad_created_at | Date (unix timestamp) | Created time of the member record | 會員資料被建立的時間 | ||
| v | ipad_updated_at | Date (unix timestamp) | Last modify time of the member record | 最近一次會員資料被更新的時間 | ||
| member_point_event | v | actual_discount_value | Number | 0, 10 | Actual discount value after user used his member points (Sales amount might be less than the expected discount value when user used his member points) | 此次消費使用點數後,實際的折扣金額 (消費金額有可能比使用點數時可折抵的金額小) |
| v | expected_discount_value | Number | 0, 10 | Expected discount value when user used his member points | 此次消費使用點數時,預計的折扣金額 | |
| v | added_points | Number | 0, 100 | Added member points during this transaction | 此次消費中增加的點數量 | |
| v | deducted_points | Number | 0, 100 | Deducted member points during this transaction | 此次消費中減少的點數量 | |
| combo | v | id | String/Id | Combo id | 套餐id | |
| v | external_id | String or NULL | Combo's external id when checkout | 套餐結帳時App中套餐所設定的外部接合代碼 | ||
| v | setting_external_id | String or NULL | Combo's external id in the setting when export | 套餐匯出時系統中套餐所設定的外部接合代碼 | ||
| v | name | String | Beef Noodle Combo | Combo name | 套餐名稱 | |
| v | category_id | String/Id | Category id combo belongs to | 套餐所屬類別id | ||
| v | category_name | String | Noodle category | Category name combo belongs to | 套餐所屬類別名稱 | |
| v | quantity | Number | 1 | Quantity of combo being ordered | 此套餐被點的數量 | |
| v | original_price | Number | 120 | Combo's original price | 套餐原價 | |
| v | sales_price | Number | 100 | Combo's sales price (price after price adjustment and discount) | 套餐售價(已乘上數量):價格經註記加減價,套餐特定選項加價,折扣後金額 | |
| v | ordered_time | Date (unix timestamp) | Date time of combo ordered | 此套餐被點的時間 | ||
| v | tags | Array of "tag" dictionary | Tags applied to the combo | 套餐的註記 | ||
| v | combo_items | Array of "combo_item" dictionary | Items in the combo | 此套餐中的單品 (0~多個) | ||
| item | v | id | String/Id | Item's id | 品項id | |
| v | external_id | String or NULL | Item's external id when checkout | 品項結帳時App中套餐所設定的外部接合代碼 | ||
| v | setting_external_id | String or NULL | Item's external id in the setting when export | 品項匯出時系統中套餐所設定的外部接合代碼 | ||
| v | name | String | Fried Rice | Item name | 品項名稱 | |
| v | category_id | String/Id | Category id item belongs to | 品項所屬類別id | ||
| v | category_name | String | Rice category | Category name item belongs to | 品項所屬類別名稱 | |
| v | quantity | Number | 1 | Quantity of item being ordered | 品項數量 | |
| v | original_price | Number | 120 | Item's original price | 品項原價 | |
| v | sales_price | Number | 100 | Item's sales price (price after price adjustment and discount) | 品項售價(已乘上數量):價格經註記加減價,套餐特定選項加價,折扣後金額 | |
| v | ordered_time | Date (unix timestamp) | Date time of item ordered | 此品項被點的時間 | ||
| v | tags | Array of tag | Tags applied to the item | 品項所套用註記 (0~多個) | ||
| combo_item | v | id | String/Id | Combo item's id | 品項id | |
| v | external_id | String or NULL | Combo item's external id when checkout | 品項結帳時App中套餐所設定的外部接合代碼 | ||
| v | setting_external_id | String or NULL | Combo item's external id in the setting when export | 品項匯出時系統中套餐所設定的外部接合代碼 | ||
| v | name | String | Beef Noodle | Combo item name | 品項名稱 | |
| v | category_id | String/Id | Category id combo item belongs to | 品項所屬類別id | ||
| v | category_name | String | Noodle category | Category name combo item belongs to | 品項所屬類別名稱 | |
| v | quantity | Number | 1 | Quantity of combo item being ordered | 品項數量 | |
| v | original_price | Number | 120 | Combo item's original price | 品項原價 (套餐品項在商品庫的原價) | |
| v | course_name | String | Appetizer, Main course, Side-dish, Desert | Course name of combo item | 套餐品項所屬的套餐類型, Ex. 前菜,主餐,附餐,甜點 | |
| v | price_adjustment | Number | 0, 50, -20 | Price adjustment amount when specific combo item is selected (exclude price adjustment incurred by tags) | 選擇此套餐品項所需加價或減價的金額, Ex. 主餐選豬肉不加價,選牛肉加50,選雞肉少20 (不包含註記的價格調整) | |
| v | tags | Array of tag | Tags applied to the combo item | 品項所套用註記 (0~多個) | ||
| tag | v | id | String/Id | Tag's id | 品項所套用註記id | |
| v | external_id | String or NULL | Tag's external id when checkout | 註記結帳時App中套餐所設定的外部接合代碼 | ||
| v | setting_external_id | String or NULL | Tag's external id in the setting when export | 註記匯出時系統中套餐所設定的外部接合代碼 | ||
| v | name | String | Extra noodle, Extra spicy | Tag name | 品項所套用註記名稱 | |
| v | price_adjustment | Number | 20, -20 | Price adjustment amount when specific tag is selected | 品項所套用註記的變價額 正值代表加價,負值代表減價 |
錯誤訊息
| Error Code | Error Message | Example | |
|---|---|---|---|
| 400: bad request | bad parameters | from timestamp > to timestamp | |
| missing required field | |||
| 401: missing credential | security token revoked | ||
| invoke without token | |||
| 404: not found | using mazendo’s security token to ask boogoo’s invoice (github style) | ||
| 405: method not allow | api only accept GET method | ||
| 500: internal server error |
Cancelled Invoice API
版本:v1.2.11
查詢參數
| URI / GET | impl | Argument | Example | Required | Description | Description |
|---|---|---|---|---|---|---|
| * Production URI: https://api.ichefpos.com/invoice_v1/{store_id}/cancelled * Stage URI: https://api.ichefpos.com/invoice_v1_stage/{store_id}/cancelled * Dev URI: https://api.ichefpos.com/invoice_v1_dev/{store_id}/cancelled | invoice_numbers | * invoice_number format supported for each region: TW: AB12345678, AB12345679 SG/MY: AAAA12345678, AAAA12345679 Receipt: #-12345678, #-12345679 (# should be encoded as %23 when submit request) * query example: https://api.ichefpost.com/invoice_v1/cancelled?invoice_numbers=AB12345678, AB12345679, AB12345680, AB12345681 | Array | If both invoice_number and (invoice_cancelled_dtime_from / invoice_cancelled_dtime_to) are specified, API will return "intersection" of both conditions. | 如果 invoice_number 以及 invoice_cancelled_dtime_from / invoice_cancelled_dtime_to 都有進行指定,則 API 將會回傳這兩個條件的交集。 | |
| invoice_cancelled_dtime_from | yyyymmdd-hhmmss * example: 20170512-162900 -> 20170512-162900.000 (System will append 000millisecond) | Optional | * For example, for getting info of all cancelled invoices in 2018/08/21, please set them as `invoice_cancelled_dtime_from=20180821-000000&invoice_cancelled_dtime_to=20180821-235959` (from 00:00:00, Aug. 21 to 23:59:59, Aug. 21), and the invoices cancelled in the last second will be also included. * If user only specify invoice_cancelled_dtime_to without invoice_cancelled_dtime_from, invoice_cancelled_dtime_from will be automatically set to the datetime of the oldest cancelled invoice in this store. | * 例:如需取用 2018/8/21 當日所有作廢發票 請將時間參數設為 `invoice_cancelled_dtime_from=20180821-000000&invoice_cancelled_dtime_to=20180821-235959`( 2018年8月21日 0時0分0秒 至 2018年8月21日 23時59分59秒 ) 系統會自動將那最後 1 秒內作廢的發票也包含進去。 * 若僅設定 invoice_cancelled_dtime_to 而未設定 invoice_cancelled_dtime_from,則 invoice_cancelled_dtime_from 會被自動設定為該店家最早作廢之發票的時間。 |
||
| invoice_cancelled_dtime_to | yyyymmdd-hhmmss * example: 20170512-162900 -> 20170512-162900.000 (System will append 000millisecond) | Optional | ||||
| timezone | +8 (+ should be encoded as %2B when submit request) | Optional (default +0) | UTC | UTC | ||
| begin_invoice_number | TW: AB-12345678, AB-12345679 SG/MY: AAAA12345678, AAAA12345679 Receipt: #-12345678, #-12345679 | Optional (default: the invoice number of newest invoice) | API supports two ways to specify pagenation information but they are mutual exclusive. Error message will be returned when both arguments are populated. 1. begin_invoice_number 2. page | API 支援兩種互斥的條件來進行分頁設定,所以當兩個條件都被設定時,將會回傳錯誤代碼。 1. begin_invoice_number 2. page |
||
| page_index | 2 | Optional (default 0) | First page is page_index 0 (zero-based) | 第一頁的 page_index 為 0。 | ||
| limit | 25 | Optional (default 25) (hard limit 500) | User specify limit > hard-limit, or zero/negative/float limit number, API will return 400 bad parameter | 當指定的 limit 超過 500,或為 0、負數、或帶有小數時,將會回傳 400 bad parameter。 |
匯出資訊
| Object / Dictionary | Key | Data Type | Example Value | Description (English) | Description (Chinese) | |
|---|---|---|---|---|---|---|
| Response | store_id | String | mazendo | iCHEF store id | iCHEF store id | |
| paging | Dictionary | |||||
| invoices | Array of "invoice" dictionary | Qualified invoices sorted in ascending order of time | 合格的發票依照時間順序排列。 | |||
| paging | begin_invoice_number | Number or NULL | The first invoice number in the invoices array NULL when page_index type of pagenation is used | 陣列中第一張發票的號碼。 當分頁設定使用 page_index 時,會是空值。 |
||
| next_begin_invoice_number | String/Id or NULL | The invoice number of the first invoice in the next page NULL when page_index type of pagenation is used | 次頁陣列中第一張發票的號碼。 當分頁設定使用 page_index 時,會是空值。 |
|||
| previous_begin_invoice_number | String/Id or NULL | The invoice number of the first invoice in the previous page NULL when page_index type of pagenation is used | 前頁陣列中第一張發票的號碼。 當分頁設定使用 page_index 時,會是空值。 |
|||
| page_index | Number or NULL | 2 | Current page index (First page is page_index 0)(zero-based) NULL when begin_invoice_number type of pagenation is used | 目前的頁碼 (第一頁為 0)。 當分頁設定使用 begin_invoice_number 時,會是空值。 |
||
| limit | Number | 25 | Limit specified in request | 回傳的發票數量限制 | ||
| total_count | Number | Totoal qualified invoice number based on query argument | 指定條件中合格的發票總數。 | |||
| invoice | v | invoice_number | String | TW: "AB12345678" SG/MY: "AAAA12345678" Receipt: "#-12345678" | Invoice / Receipt number | 發票/收據號碼 |
| v | invoice_status | String | "issued", "cancelled" | Invoice / receipt's current issued status: issued or cancelled | 發票/收據目前的開立狀態:開立 / 作廢 | |
| v | invoice_issued_date | Date (unix timestamp) | Date time of Invoice issued | 發票開立時間 | ||
| v | invoice_cancelled_date | Date or NULL (unix timestamp) | Date time of Invoice cancelled: this field will be NULL if invoice status is issued | 發票作廢時間 (若發票/收據的開立狀態是開立,此欄位則為空) | ||
| v | customer_count | Number | 4 | Customer count for this invoice / receipt | 來客數 | |
| v | serve_type | String | "takeout", "dine-in" | Whether customer is dine-in or take-out | 用餐類型 | |
| v | sales_amount_include_tax | Number | 110 | Sales amount including tax and after rounding | 含稅總價(小數點價格調整後) | |
| v | sales_amount_exclude_tax | Number | Sales amount excluding tax (no rounding) | 不含稅總價(無小數點價格調整) | ||
| v | tax_amount | Number | Tax amount (no rounding); In SG/MY, this field refers to GST tax amount | 稅額(無小數點價格調整); SG/MY: GST稅額 | ||
| v | tax_rate | Number | 0.05, 0.07 | Tax rate; Taiwan is 0.05, SG is 0.07 | 稅率 (台灣0.05, 新加坡0.07) | |
| v | service_charge | Number | Service charge (no rounding) | 服務費(無小數點價格調整) | ||
| v | rounding | Number | +0.01 , +0.03 | Rounding amount | 小數點價格調整 | |
| v | buyer_tax_info_tax_id | String or NULL | Taiwan: Buyer's tax id; SG/MY: Buyer's GST Registration Number | 台灣: 買方統編 (因台灣稅局要求,無買方統編時為 0000000000 ); SG/MY: Buyer's GST Registration Number | ||
| v | buyer_tax_info_company_name | String or NULL | mazendo | Buyer's company name | 買方公司名稱 | |
| buyer_tax_info_company_address | String or NULL | 231 Sunshine Street, Taipei, Taiwan | Buyer's company address | 買方公司地址 | ||
| v | buyer_tax_info_customer_name | String or NULL | Matt | Buyer's customer name | 買方客戶名稱 | |
| v | buyer_tax_info_customer_address | String or NULL | 231 Sunshine Street, Taipei, Taiwan | Buyer's customer address | 買方客戶地址 | |
| v | discounts | Array of "discount" dictionary | Discounts being applied | 此發票/收據套用的折扣 (0~多個) | ||
| v | payments | Array of "payment" dictionary | Payment method customer used | 此發票/收據使用的支付方式 (1~多個) | ||
| v | order_items | Array of "order_item" dictionary | Items customer ordered | 此發票/收據銷售的品項 (1~多個) | ||
| v | member_info | Dictionary | The snapshot of member information while generating this invoice / receipt | 開立此張發票/收據當下的會員資訊 (因為Facebook Rewards的集點模式有可能是先發點數,再讓消費者建立會員, 所以有可能出現member_point_events裡有給點的紀錄,但是member_info為null的情形) |
||
| v | member_point_events | Array of "member_point_event" dictionary | Point events being applied | 此發票/收據套用的點數集點/兑點事件 (0~多個) | ||
| is_mixed_payment_on | boolean | Turn on/off mixed payment | 開啟/關閉混合支付模式 | |||
| table_name | String | “A5","takeout","indoor" | Invoice / receipt's table at checkout | 此發票/收據結帳時的桌位 | ||
| discount | v | id | String/Id | Discount module id | 折扣模組id | |
| v | name | String | Discount module name | 折扣模組名稱 | ||
| v | amount | Number | Discount amount | 折扣額 | ||
| payment | v | id | String/Id | Payment module id | 支付模組id | |
| v | name | String | Payment module name | 支付模組名稱 | ||
| v | type | String | "cash", "credit_card" | Payment module type | 支付模組類型 | |
| v | note | String or NULL | "Gomaji serial number" | Payment module text note | 支付模組註記 | |
| v | cash_change | Number or NULL | 23, 5.6 | Change amount when user paid with cash | 現金付款的找零 (若用非現金的支付模組,此欄位則為空) | |
| customer_pair_amount | Numeric | Customer pay amount | 客戶付款金額 | |||
| changa_amount | Numeric | Customer chang amount | 客戶找零金額 | |||
| v | credit_card_type | String or NULL | "visa", "master", "jcb", "china_union", "nets", "ae", "diners_club", "discover", "other" | Credit card type when user paid with credit card | 信用卡別,如果支付模組類型為"credit_card"時,此欄位儲存支付的信用卡別 (若用非信用卡的支付模組,此欄位則為空) | |
| v | credit_card_last_four_digits | String or NULL | 3412 | Last four digit of credit card number when user paid with credit card | 付款信用卡的末四碼 (若用非信用卡的支付模組,此欄位則為空) | |
| order_item | v | combos | Array of "combo" dictionary | Combos customer ordered | 銷售的套餐 (0~多個) | |
| v | items | Array of "item" dictionary | Items customer ordered | 銷售的單品 (0~多個) | ||
| member_info | v | name | String or NULL | Steve | Name of the member | 會員的姓名 (選填) |
| v | mobile | String | 0912345678*# | Mobile number of the member | 會員的手機號碼 | |
| v | tel | String or NULL | 021234567*# | Telephone number of the member | 會員的室內電話號碼 (選填) | |
| v | gender | String or NULL | Male, Female, Other | Gender of the member | 會員的性別 (選填) | |
| v | birth_year | String or NULL | 2019 | Birth year of the member | 會員的出生年份 (選填) | |
| v | birth_date | String or NULL | 01/01 | Birth date of the member | 會員的出生日期 (選填) | |
| v | address | String or NULL | No. 12, Ln. 145, Dunhua N. Rd., Songshan Dist., Taipei City 105, Taiwan (R.O.C.) | Address of the member | 會員的地址 (選填) | |
| v | String or NULL | test@ichef.com.tw | Email address of the member | 會員的email (選填) | ||
| v | note | String or NULL | Non-spicy food only | Note of the member | 會員的註記 (選填) | |
| v | ipad_created_at | Date (unix timestamp) | Created time of the member record | 會員資料被建立的時間 | ||
| v | ipad_updated_at | Date (unix timestamp) | Last modify time of the member record | 最近一次會員資料被更新的時間 | ||
| member_point_event | v | actual_discount_value | Number | 0, 10 | Actual discount value after user used his member points (Sales amount might be less than the expected discount value when user used his member points) | 此次消費使用點數後,實際的折扣金額 (消費金額有可能比使用點數時可折抵的金額小) |
| v | expected_discount_value | Number | 0, 10 | Expected discount value when user used his member points | 此次消費使用點數時,預計的折扣金額 | |
| v | added_points | Number | 0, 100 | Added member points during this transaction | 此次消費中增加的點數量 | |
| v | deducted_points | Number | 0, 100 | Deducted member points during this transaction | 此次消費中減少的點數量 | |
| combo | v | id | String/Id | Combo id | 套餐id | |
| v | external_id | String or NULL | Combo's external id when checkout | 套餐結帳時App中套餐所設定的外部接合代碼 | ||
| v | setting_external_id | String or NULL | Combo's external id in the setting when export | 套餐匯出時系統中套餐所設定的外部接合代碼 | ||
| v | name | String | Beef Noodle Combo | Combo name | 套餐名稱 | |
| v | category_id | String/Id | Category id combo belongs to | 套餐所屬類別 | ||
| v | category_name | String | Noodle category | Category name combo belongs to | 套餐所屬類別名稱 | |
| v | quantity | Number | 1 | Quantity of combo being ordered | 此套餐被點的數量 | |
| v | original_price | Number | 120 | Combo's original price | 套餐原價 | |
| v | sales_price | Number | 100 | Combo's sales price (price after price adjustment and discount) | 套餐售價:價格經註記加減價,套餐特定選項加價,折扣後金額 | |
| v | ordered_time | Date (unix timestamp) | Date time of combo ordered | 此套餐被點的時間 | ||
| v | tags | Array of "tag" dictionary | Tags applied to the combo | 套餐的註記 | ||
| v | combo_items | Array of "combo_item" dictionary | Items in the combo | 此套餐中的單品 (0~多個) | ||
| item | v | id | String/Id | Item's id | 品項id | |
| v | external_id | String or NULL | Item's external id when checkout | 品項結帳時App中套餐所設定的外部接合代碼 | ||
| v | setting_external_id | String or NULL | Item's external id in the setting when export | 品項匯出時系統中套餐所設定的外部接合代碼 | ||
| v | name | String | Fried Rice | Item name | 品項名稱 | |
| v | category_id | String/Id | Category id item belongs to | 品項所屬類別id | ||
| v | category_name | String | Rice category | Category name item belongs to | 品項所屬類別名稱 | |
| v | quantity | Number | 1 | Quantity of item being ordered | 品項數量 | |
| v | original_price | Number | 120 | Item's original price | 品項原價 | |
| v | sales_price | Number | 100 | Item's sales price (price after price adjustment and discount) | 品項售價 | |
| v | ordered_time | Date (unix timestamp) | Date time of item ordered | 此品項被點的時間 | ||
| v | tags | Array of tag | Tags applied to the item | 品項所套用註記 (0~多個) | ||
| combo_item | v | id | String/Id | Combo item's id | 品項id | |
| v | external_id | String or NULL | Combo item's external id when checkout | 品項結帳時App中套餐所設定的外部接合代碼 | ||
| v | setting_external_id | String or NULL | Combo item's external id in the setting when export | 品項匯出時系統中套餐所設定的外部接合代碼 | ||
| v | name | String | Beef Noodle | Combo item name | 品項名稱 | |
| v | category_id | String/Id | Category id combo item belongs to | 品項所屬類別id | ||
| v | category_name | String | Noodle category | Category name combo item belongs to | 品項所屬類別名稱 | |
| v | quantity | Number | 1 | Quantity of combo item being ordered | 品項數量 | |
| v | original_price | Number | 120 | Combo item's original price | 品項原價 (套餐品項在商品庫的原價) | |
| v | course_name | String | Appetizer, Main course, Side-dish, Desert | Course name of combo item | 套餐品項所屬的套餐類型, Ex. 前菜,主餐,附餐,甜點 | |
| v | price_adjustment | Number | 0, 50, -20 | Price adjustment amount when specific combo item is selected (exclude price adjustment incurred by tags) | 選擇此套餐品項所需加價或減價的金額, Ex. 主餐選豬肉不加價,選牛肉加50,選雞肉少20 (不包含註記的價格調整) | |
| v | tags | Array of tag | Tags applied to the combo item | 品項所套用註記 (0~多個) | ||
| tag | v | id | String/Id | Tag's id | 品項所套用註記id | |
| v | external_id | String or NULL | Tag's external id when checkout | 註記結帳時App中套餐所設定的外部接合代碼 | ||
| v | setting_external_id | String or NULL | Tag's external id in the setting when export | 註記匯出時系統中套餐所設定的外部接合代碼 | ||
| v | name | String | Extra noodle, Extra spicy | Tag name | 品項所套用註記名稱 | |
| v | price_adjustment | Number | 20, -20 | Price adjustment amount when specific tag is selected | 品項所套用註記的變價額 正值代表加價,負值代表減價 |
錯誤訊息
| Error Code | Error Message | Example | |
|---|---|---|---|
| 400: bad request | bad parameters | from timestamp > to timestamp | |
| missing required field | |||
| 401: missing credential | security token revoked | ||
| invoke without token | |||
| 404: not found | using mazendo’s security token to ask boogoo’s invoice (github style) | ||
| 405: method not allow | api only accept GET method | ||
| 500: internal server error |