ECFIT API 範例
ECFIT
API 範例
Order
Order - 取得訂單內容
利用提供的 訂單號碼 :order 取得訂單資訊,包含開立時的商品資料與折讓紀錄),此功能有訪問頻率限制 ( 每分鐘 30 次 ),若超過將會回傳 429: Too Many Attempts.,除 Response 外,API 在標頭也會回傳 X-RateLimit-Limit、X-RateLimit-Remaining、Retry-After ( 如果到達限制次數就只能得到 Retry-After )
GET
Header
Field | Type | Description |
---|---|---|
X-RateLimit-Limit | Integer | 指定時間內最大允許訪問次數 |
X-RateLimit-Remaining | Integer | 指定時間內剩餘訪問次數 |
Retry-After | Integer | 距離下次重新請求的等待時間 |
Parameter
Field | Type | Description |
---|---|---|
order | String | 訂單號碼,ex : EC201601010001Size range: |
Success 200
Field | Type | Description |
---|---|---|
status | String | 開立結果 success : 成功,fail : 失敗 |
code | String | 結果代號 |
00 | String | 查詢成功 |
01 | String | 訂單編號為空 |
11 | String | 訂單不存在 |
msg | String | 回傳處理結果 |
content | Array[] | 內容陣列 |
orderNo | String | 原始訂單編號 |
ecfitNo | String | ECFIT訂單流水號 |
amount | Integer | 訂單金額 |
invoiced | Integer | 是否開立發票 |
ban | String | 買家統編 |
AllPayLogisticsID | String | 綠界物流交易編號 |
paidDate | Date | 付款日期 |
NPO | String | 捐贈碼 |
demand | String | 是否有索取紙本發票 |
collection | Integer | 代收金額 |
logisticsId | String | 貨運公司 |
production | Array[] | 購買商品陣列 |
pid | String | 商品品號 |
barcode | String | 商品條碼 |
name | String | 名稱 |
quantity | Integer | 數量 |
price | Integer | 單價 |
deliveryRecord | Object[] | 物流紀錄 |
key | String | 物流 ID |
value | Array[] | 物流過程 |
customer | Object | 消費者資料 |
name | String | 名字 |
address | String | 地址 |
phone | String | 電話 |
buyer | Object | 購買人資料 |
name | String | 名字 |
address | String | 地址 |
String | 信箱 | |
phone | String | 電話 |
status | String | 0 : 尚未檢查1 : 上傳完成2 : 等待開立發票 (只有有配合開立發票的訂單才會有此狀態)3 : 發票開立完成 (只有有配合開立發票的訂單才會有此狀態)5 : 發票開立完成等待撿貨( 無發票的訂單是 1 的時候就是上傳成功準備出貨,需要開立發票的訂單需要到5 才是可以出貨。以上狀態都可以按訂單結案。 )4 : 撿貨中( 代表此訂單正在理貨批次處理中,但是不代表此訂單今天可以出貨,有可能因為缺貨所以無法包貨成功。撿貨中不可以結案只能取消。 )--以下狀態代表此訂單生命週期結束--6 : 完成( 代表此訂單已經包貨完畢,會看得到物流編號。但是不一定代表已經被物流公司收走,因為物流公司收貨時間是固定。 )8 : 結案( 結案代表為您已經人工將此訂單點選為結案,此訂單已經不會再被處理 )10 : 取消( 代表此訂單您已經人工點選取消,此訂單已經不會再被處理 )99 : 訂單錯誤( 代表此訂單建立失敗,可於修正並刪除錯誤紀錄後重新建立 ) |
Order - 取得訂單內容(post方法)
利用提供的 訂單號碼 取得訂單資訊,包含開立時的商品資料與折讓紀錄),此功能有訪問頻率限制 ( 每分鐘 30 次 ),若超過將會回傳 429: Too Many Attempts.,除 Response 外,API 在標頭也會回傳 X-RateLimit-Limit、X-RateLimit-Remaining、Retry-After ( 如果到達限制次數就只能得到 Retry-After )
POST
Header
Field | Type | Description |
---|---|---|
X-RateLimit-Limit | Integer | 指定時間內最大允許訪問次數 |
X-RateLimit-Remaining | Integer | 指定時間內剩餘訪問次數 |
Retry-After | Integer | 距離下次重新請求的等待時間 |
Parameter
Field | Type | Description |
---|---|---|
orderNo | String | 訂單號碼,ex : EC201601010001Size range: |
Success 200
Field | Type | Description |
---|---|---|
status | String | 開立結果 success : 成功,fail : 失敗 |
code | String | 結果代號 |
00 | String | 查詢成功 |
01 | String | 訂單編號為空 |
11 | String | 訂單不存在 |
msg | String | 回傳處理結果 |
content | Array[] | 內容陣列 |
orderNo | String | 原始訂單編號 |
ecfitNo | String | ECFIT訂單流水號 |
amount | Integer | 訂單金額 |
invoiced | Integer | 是否開立發票 |
invoiceNo | Integer | 發票號碼 |
collection | Integer | 代收金額 |
logisticsId | String | 貨運公司 |
ban | String | 買家統編 |
paidDate | Date | 付款日期 |
NPO | String | 捐贈碼 |
demand | String | 是否有索取紙本發票 |
creditNo | String | 信用卡後4碼 |
carrierType | String | 載具類型 |
carrierId | String | 載具號碼 |
AllPayLogisticsID | String | 綠界物流交易編號 |
status | String | 0 : 尚未檢查1 : 上傳完成2 : 等待開立發票 (只有有配合開立發票的訂單才會有此狀態)3 : 發票開立完成 (只有有配合開立發票的訂單才會有此狀態)5 : 發票開立完成等待撿貨( 無發票的訂單是 1 的時候就是上傳成功準備出貨,需要開立發票的訂單需要到5 才是可以出貨。以上狀態都可以按訂單結案。 )4 : 撿貨中( 代表此訂單正在理貨批次處理中,但是不代表此訂單今天可以出貨,有可能因為缺貨所以無法包貨成功。撿貨中不可以結案只能取消。 )--以下狀態代表此訂單生命週期結束--6 : 完成( 代表此訂單已經包貨完畢,會看得到物流編號。但是不一定代表已經被物流公司收走,因為物流公司收貨時間是固定。 )8 : 結案( 結案代表為您已經人工將此訂單點選為結案,此訂單已經不會再被處理 )10 : 取消( 代表此訂單您已經人工點選取消,此訂單已經不會再被處理 )99 : 訂單錯誤( 代表此訂單建立失敗,可於修正並刪除錯誤紀錄後重新建立 ) |
production | Array[] | 購買商品陣列 |
pid | String | 商品品號 |
barcode | String | 商品條碼 |
name | String | 名稱 |
quantity | Integer | 數量 |
price | Integer | 單價 |
serial | Integer | 流水編號 |
deliveryRecord | Object[] | 物流紀錄 |
key | String | 物流 ID |
value | Array[] | 物流過程 |
customer | Object | 消費者資料 |
name | String | 名字 |
address | String | 地址 |
phone | String | 電話 |
buyer | Object | 購買人資料 |
name | String | 名字 |
address | String | 地址 |
String | 信箱 | |
phone | String | 電話 |
Order - 取消訂單
POST
Parameter
Field | Type | Description |
---|---|---|
orderNo | String | 訂單編號,ex : EC201601010001Size range: |
Success 200
Field | Type | Description |
---|---|---|
status | String | 開立結果 success : 成功,fail : 失敗 |
code | String | 結果代號 |
00 | String | 成功 |
01 | String | 訂單不存在 |
02 | String | 訂單已為 取消 或 結案 |
03 | String | 訂單狀態為 錯誤 不可執行取消 |
msg | String | 回傳處理結果 |
orderNo | String | 訂單編號 |
orderstatusS | String | 訂單處理前狀態 |
orderstatusE | String | 訂單處理後狀態 |
Order - 開立訂單
POST
Parameter
Field | Type | Description |
---|---|---|
orderNo | String | 訂單編號Size range: |
amount | Integer | 訂單金額 |
paidDate | String | 付款日期 ex: 2016-01-01Size range: |
creditNo | Integer | 信用卡末 4 碼(使用非信用卡消費時可以留空)Size range: |
NPO | String | 捐贈給社福單位的愛心碼 (不捐贈可以留空) |
ban | String | 買方統編 (沒有時可以留空)Size range: |
taxType | String | 課稅類別 1 : 應稅, 2 : 零稅率, 3 : 免稅, 9 : 混稅(限收銀機發票無法分辨時使用) 預設為 1 : 應稅Allowed values: |
clearanceMark | String | 通關方式 1 : 非經海關出口, 2 : 經海關出口 (若課稅類別不為零稅率者,此欄無須填寫)Allowed values: |
invoiced | String | 是否開立發票Size range: |
demand | String | 是否索取發票Size range: |
carrierType | String | 使用載具 cellphone : 手機載具, citizen : 自然人憑證 (若不使用載具此欄可以不填)Allowed values: |
carrierId | String | 載具號碼 |
collection | Integer | 代收款項 |
arrive | String | 預計出貨日 ex: 2016-01-01Size range: |
arriveType | String | 配送時段代號,預設為 4(不指定) [09:00 |
logisticsId | String | 貨運公司[黑貓宅急便/通盈/全家/綠界/海外/自訂1] |
code | String | 商店代碼(貨運為全家/綠界時必填,非全家/綠界可以不傳或是傳空值) |
note | Text | 備註 |
production | Array[] | 購買商品陣列 |
barcode | String | 商品條碼 |
name | String | 名稱 |
quantity | Integer | 數量 |
price | Integer | 單價 |
taxType | Integer | 商品課稅類別, 1 : 應稅, 2 : 零稅率, 3 : 免稅,預設為 1 : 應稅API 開立發票以「taxType」為開立依據;若課稅類別為「混稅」之發票,須另外填寫個別商品之稅率及稅別,預設為 應稅Allowed values: |
taxRate | Integer | 商品稅率,填寫正整數,預設為 5(%)API 開立發票以「taxType」為開立依據;若課稅類別為「混稅」之發票,須另外填寫商品之個別稅率及稅別,預設為 應稅 |
customer | Object | 消費者資料 (姓名、地址、郵遞區號、電話 為必填) |
name | String | 姓名 |
address | String | 地址 |
postal | String | 郵遞區號 |
phone | String | 電話 |
buyer | Object | 購買人資料 (欲開立發票者須填寫 姓名、地址、郵遞區號、信箱、電話,用以發票與折讓單的開立及寄送,其餘狀況則不須填寫) |
name | String | 姓名 |
address | String | 地址 |
postal | String | 郵遞區號 |
String | 信箱 | |
phone | String | 電話 |
Success 200
Field | Type | Description |
---|---|---|
status | String | 開立結果 success : 成功,fail : 失敗 |
code | String | 結果代號 |
00 | String | 成功 |
01 | String | 訂單編號為空 |
02 | String | 是否開立發票欄位為空值 |
03 | String | 買方統一編號錯誤 |
04 | String | 捐贈碼錯誤 |
05 | String | 捐贈發票不得開立買方統一編號 |
06 | String | 捐贈發票不得索取 |
07 | String | 消費者資訊有缺 |
08 | String | 品項空白 或 產品數量為 0 |
09 | String | 金額錯誤 (與產品價格對不起來) |
10 | String | 不明原因問題 |
msg | String | 回傳處理結果 |
orderNo | String | 訂單編號 |
Invoice
Invoice - 開立發票
POST
Parameter
Field | Type | Description |
---|---|---|
orderNo | String | 訂單編號Size range: |
amount | Integer | 訂單金額 |
paidDate | String | 付款日期 ex: 2016-01-01Size range: |
creditNo | Integer | 信用卡末 4 碼(使用非信用卡消費時可以留空)Size range: |
note | String | 備註Size range: |
NPO | String | 捐贈給社福單位的愛心碼 (不捐贈可以留空) |
buyerBan | String | 買方統編 (沒有時可以留空)Size range: |
demand | Number | 是否索取發票Allowed values: |
carrierType | String | 使用載具 cellphone : 手機載具, citizen : 自然人憑證 (若不使用載具此欄可以不填)Allowed values: |
carrierId | String | 載具號碼 |
files | string | 是否夾帶檔案,0:否、1:是Allowed values: |
taxType | String | 課稅類別 1 : 應稅, 2 : 零稅率, 3 : 免稅, 9 : 混稅(限收銀機發票無法分辨時使用) 預設為 1 : 應稅Allowed values: |
clearanceMark | String | 通關方式 1 : 非經海關出口, 2 : 經海關出口 (若課稅類別不為零稅率者,此欄無須填寫)Allowed values: |
production | Array[] | 購買商品陣列 |
barcode | String | 商品條碼 |
name | String | 名稱 |
quantity | Integer | 數量 |
price | Integer | 單價 |
taxType | Integer | 商品課稅類別, 1 : 應稅, 2 : 零稅率, 3 : 免稅,預設為 1 : 應稅API 開立發票以「taxType」為開立依據;若課稅類別為「混稅」之發票,須另外填寫個別商品之稅率及稅別,預設為 應稅Allowed values: |
taxRate | Integer | 商品稅率,填寫正整數,預設為 5(%)API 開立發票以「taxType」為開立依據;若課稅類別為「混稅」之發票,須另外填寫商品之個別稅率及稅別,預設為 應稅 |
customer | Object | 消費者資料 (姓名、地址、信箱為必填,用以發票與折讓單的寄送及開立) |
name | String | 名字 |
postal | String | 郵遞區號 |
address | String | 地址 |
String | 信箱 | |
phone | String | 電話 |
Success 200
Field | Type | Description |
---|---|---|
status | String | 開立結果 success : 成功,fail : 失敗 |
code | String | 結果代號 |
00 | String | 開立成功 |
01 | String | 訂單編號為空 |
02 | String | 無法產生開立時間 |
03 | String | 買方統一編號錯誤 |
04 | String | 捐贈碼錯誤 |
05 | String | 捐贈發票不得開立買方統一編號 |
06 | String | 捐贈發票不得索取 |
07 | String | 金額錯誤 (與產品價格對不起來) |
08 | String | 消費者資訊有缺 |
09 | String | 品項空白 或 產品數量為 0 |
10 | String | 不明原因問題 |
msg | String | 回傳處理結果 |
orderNo | String | 訂單編號 |
invoice | String | 發票號碼 |
invoicingDate | DateTime | 開立時間 |
Invoice - 作廢發票
POST
Parameter
Field | Type | Description |
---|---|---|
invoice | String | 發票號碼,ex : AB00000001Size range: |
Success 200
Field | Type | Description |
---|---|---|
status | String | 開立結果 success : 成功,fail : 失敗 |
code | String | 結果代號 |
00 | String | 作廢成功 |
01 | String | 發票不存在 |
02 | String | 發票尚未開立完成 |
03 | String | 此發票已被作廢 |
04 | String | 已過允許作廢期間 |
msg | String | 回傳處理結果 |
invoice | String | 發票號碼 |
cancelDate | DateTime | 作廢時間 |
Invoice - 取得發票內容
利用提供的 發票號碼 :invoice 取得發票資訊,包含開立時的商品資料與折讓紀錄
GET
Parameter
Field | Type | Description |
---|---|---|
invoice | String | 發票號碼,ex : AB00000001Size range: |
Success 200
Field | Type | Description |
---|---|---|
status | String | 發票開立結果:0. 檢查發票內容中1. 等待確認上傳中2. 加值中心正上傳至財政部3. 等待財政部回應開立資訊4. 發票開立成功5. 開立錯誤7. 發票已註銷8. 發票已作廢9. 加值中心處理中 |
code | String | 結果代號 |
00 | String | 查詢成功 |
01 | String | 發票號碼為空 |
02 | String | 發票不存在 |
msg | String | 回傳處理結果 |
orderNo | String | 訂單編號 |
amount | String | 訂單金額 |
remain | String | 有效金額 |
invoice | String | 發票號碼 |
randomNum | String | 隨機碼 |
buyerBan | String | 買家統編 |
paidDate | Date | 付款日期 |
creditNo | Integer | 信用卡末 4 碼(使用非信用卡消費時可以留空) |
invoicingDate | DateTime | 開立時間 |
cancel | String | 是否作廢? (1 : 已作廢) |
cancelDate | DateTime | 作廢日期 (若無作廢沒有值) |
NPO | String | 捐贈碼 |
demand | Integer | 是否有索取紙本發票 |
carrierType | String | 使用載具 cellphone : 手機載具, citizen : 自然人憑證 (若不使用載具此欄為空)Allowed values: |
carrierId | String | 載具號碼 |
url | String | 發票明細連結 |
production | Array[] | 購買商品陣列 |
pid | String | 商品品號 |
barcode | String | 商品條碼 |
name | String | 名稱 |
quantity | Integer | 數量 |
price | Integer | 單價 |
customer | Object | 消費者資料 |
name | String | 名字 |
postal | String | 郵遞區號 |
address | String | 地址 |
String | 信箱 | |
phone | String | 電話 |
allowacne | Array[] | 折讓紀錄 (若沒有折讓則為空) |
allowacneNo | String | 折讓單號 |
allowanceDate | DateTime | 折讓日期 |
cancel | String | 是否作廢? (1 : 已作廢) |
cancelDate | DateTime | 折讓作廢日期 (若無作廢沒有值) |
reason | String | 折讓作廢原因 (若無作廢沒有值) |
amount | String | 折讓金額 |
production | Array[] | 折讓商品陣列 |
id | String | 商品 ID |
name | String | 名稱 |
quantity | Integer | 數量 |
price | Integer | 單價 |
Invoice - 取得發票內容(依訂單編號)
利用提供的 訂單編號 :order 取得所有發票資訊,包含開立時的商品資料與折讓紀錄
GET
Parameter
Field | Type | Description |
---|---|---|
order | String | 訂單編號,ex : AB00000001Size range: |
Success 200
Field | Type | Description |
---|---|---|
status | String | 開立結果 success : 成功,fail : 失敗 |
code | String | 結果代號 |
00 | String | 查詢成功 |
02 | String | 發票不存在 |
03 | String | 訂單編號為空 |
msg | String | 回傳處理結果 |
invoiceArr | Array[] | 所有發票資料 |
orderNo | String | 訂單編號 |
status | String | 開立結果:0. 檢查發票內容中1. 等待確認上傳中2. 加值中心正上傳至財政部3. 等待財政部回應開立資訊4. 發票開立成功5. 開立錯誤7. 發票已註銷8. 發票已作廢9. 加值中心處理中 |
amount | String | 訂單金額 |
remain | String | 有效金額 |
invoice | String | 發票號碼 |
randomNum | String | 隨機碼 |
buyerBan | String | 買家統編 |
paidDate | Date | 付款日期 |
creditNo | Integer | 信用卡末 4 碼(使用非信用卡消費時可以留空) |
invoicingDate | DateTime | 開立時間 |
cancel | String | 是否作廢? (1 : 已作廢) |
cancelDate | DateTime | 作廢日期 (若無作廢沒有值) |
NPO | String | 捐贈碼 |
demand | Integer | 是否有索取紙本發票 |
carrierType | String | 使用載具 cellphone : 手機載具, citizen : 自然人憑證 (若不使用載具此欄為空)Allowed values: |
carrierId | String | 載具號碼 |
url | String | 發票明細連結 |
production | Array[] | 購買商品陣列 |
pid | String | 商品品號 |
barcode | String | 商品條碼 |
name | String | 名稱 |
quantity | Integer | 數量 |
price | Integer | 單價 |
customer | Object | 消費者資料 |
name | String | 名字 |
postal | String | 郵遞區號 |
address | String | 地址 |
String | 信箱 | |
phone | String | 電話 |
allowacne | Array[] | 折讓紀錄 (若沒有折讓則為空) |
allowacneNo | String | 折讓單號 |
allowanceDate | DateTime | 折讓日期 |
cancel | String | 是否作廢? (1 : 已作廢) |
cancelDate | DateTime | 折讓作廢日期 (若無作廢沒有值) |
reason | String | 折讓作廢原因 (若無作廢沒有值) |
amount | String | 折讓金額 |
production | Array[] | 折讓商品陣列 |
id | String | 商品 ID |
name | String | 名稱 |
quantity | Integer | 數量 |
price | Integer | 單價 |
Invoice - 取得發票內容(多筆)
提供 多筆訂單編號 或 多筆發票號碼 查詢發票資訊
POST
Parameter
Field | Type | Description |
---|---|---|
orderNo[] | Array | 訂單編號 |
invoiceNo[] | Array | 發票號碼 |
Success 200
Field | Type | Description |
---|---|---|
status | String | 開立結果 success : 成功,fail : 失敗 |
code | String | 結果代號 |
00 | String | 查詢成功 |
01 | String | 發票不存在 |
msg | String | 回傳處理結果 |
orderNo | Array[] | 依訂單編號查詢結果 |
orderNo | String | 訂單編號 |
invoice | String | 發票號碼 |
invoicingDate | Date | 發票開立日期 |
status | String | 發票開立結果:0. 檢查發票內容中1. 等待確認上傳中2. 加值中心正上傳至財政部3. 等待財政部回應開立資訊4. 發票開立成功5. 開立錯誤7. 發票已註銷8. 發票已作廢9. 加值中心處理中 |
amount | Integer | 發票開立金額 |
remain | Integer | 發票有效金額 |
invoiceNo | Array[] | 依發票號碼查詢結果 |
orderNo | String | 訂單編號 |
invoice | String | 發票號碼 |
invoicingDate | Date | 發票開立日期 |
status | String | 發票開立結果 |
amount | Integer | 發票開立金額 |
remain | Integer | 發票有效金額 |
Invoice - 開立發票 - 測試用
與開立發票傳遞的參數完全相同,但並不會真正開立發票,只有做傳遞參數的格式以及內容檢查,並固定回傳假的發票號嗎 (TE00000000)
POST
Parameter
Field | Type | Description |
---|---|---|
orderNo | String | 訂單編號Size range: |
amount | Integer | 訂單金額 |
paidDate | String | 付款日期 ex: 2016-01-01Size range: |
NPO | String | 捐贈給社福單位的愛心碼 (不捐贈可以留空) |
buyerBan | String | 買方統編 (沒有時可以留空)Size range: |
demand | Number | 是否索取發票Allowed values: |
carrierType | String | 使用載具 cellphone : 手機載具, citizen : 自然人憑證 (若不使用載具此欄可以不填)Allowed values: |
carrierId | String | 載具號碼 |
files | string | 是否夾帶檔案,0:否、1:是Allowed values: |
production | Array[] | 購買商品陣列 |
barcode | String | 商品條碼 |
name | String | 名稱 |
quantity | Integer | 數量 |
price | Integer | 單價 |
customer | Object | 消費者資料 (姓名、地址、信箱為必填,用以發票與折讓單的寄送及開立) |
name | String | 名字 |
address | String | 地址 |
String | 信箱 | |
phone | String | 電話 |
Success 200
Field | Type | Description |
---|---|---|
status | String | 開立結果 success : 成功,fail : 失敗 |
code | String | 結果代號 |
00 | String | 開立成功 |
01 | String | 訂單編號為空 |
02 | String | 無法產生開立時間 |
03 | String | 買方統一編號錯誤 |
04 | String | 捐贈碼錯誤 |
05 | String | 捐贈發票不得開立買方統一編號 |
06 | String | 捐贈發票不得索取 |
07 | String | 金額錯誤 (與產品價格對不起來) |
08 | String | 消費者資訊有缺 |
09 | String | 品項空白 或 產品數量為 0 |
10 | String | 不明原因問題 |
msg | String | 回傳處理結果 |
orderNo | String | 訂單編號 |
invoice | String | 發票號碼 |
invoicingDate | DateTime | 開立時間 |
Allowance
Allowance - 折讓發票
POST
Parameter
Field | Type | Description |
---|---|---|
invoice | String | 發票號碼,ex : AB00000001Size range: |
production | Array[] | 退貨項目 |
name | String | 開立的商品名稱 |
quantity | Integer | 數量 (需小於等於剩餘數量) |
price | Integer | 單價 (不一定要跟原本相同) |
Success 200
Field | Type | Description |
---|---|---|
status | String | 開立結果 success : 成功,fail : 失敗 |
code | String | 結果代號 |
00 | String | 等待折讓單確認 |
01 | String | 發票號碼為空 |
02 | String | 發票不存在 |
03 | String | 沒有退貨商品 |
04 | String | 退貨超過購買數量 |
05 | String | 退貨商品中包含無購買的商品 |
06 | String | 退貨金額超過發票剩餘金額 |
07 | String | 不明原因問題 |
msg | String | 回傳處理結果 |
allowanceSeq | String(16) | 折讓序號 |
Allowance - 折讓確認
POST
Parameter
Field | Type | Description |
---|---|---|
allowanceSeq | String | 折讓序號Size range: |
Success 200
Field | Type | Description |
---|---|---|
status | String | 開立結果 success : 成功,fail : 失敗 |
code | String | 結果代號 |
00 | String | 折讓單已確認 |
01 | String | 折讓序號為空 |
02 | String | 折讓序號不存在 |
03 | String | 該折讓序號未在等待確認的狀態 |
04 | String | 不明原因問題 |
msg | String | 回傳處理結果 |
allowance | String | 折讓單號 |
allowanceDate | DateTime | 折讓確認時間 |
Allowance - 折讓作廢
POST
Parameter
Field | Type | Description |
---|---|---|
allowance | String | 折讓單號Size range: |
reason | Text | 取消原因 |
Success 200
Field | Type | Description |
---|---|---|
status | String | 開立結果 success : 成功,fail : 失敗 |
code | String | 結果代號 |
00 | String | 折讓作廢成功 |
01 | String | 折讓單號為空 |
02 | String | 折讓單號不存在 |
03 | String | 取消原因為空 |
04 | String | 該折讓單已作廢 |
05 | String | 不明原因問題 |
msg | String | 回傳處理結果 |
allowance | String | 折讓單號 |
cancelDate | DateTime | 折讓作廢時間 |
Stock
Stock - 庫存查詢
此功能有訪問頻率限制 ( 每分鐘 5 次 ),若超過將會回傳 429: Too Many Attempts.,除 Response 外,API 在標頭也會回傳 X-RateLimit-Limit、X-RateLimit-Remaining、Retry-After ( 如果到達限制次數就只能得到 Retry-After )
GET
Header
Field | Type | Description |
---|---|---|
X-RateLimit-Limit | Integer | 指定時間內最大允許訪問次數 |
X-RateLimit-Remaining | Integer | 指定時間內剩餘訪問次數 |
Retry-After | Integer | 距離下次重新請求的等待時間 |
Parameter
Field | Type | Description |
---|---|---|
barcode | String | 產品條碼 |
Success 200
Field | Type | Description |
---|---|---|
status | String | 開立結果 success : 成功,fail : 失敗 |
code | String | 結果代號 |
00 | String | 查詢成功 |
01 | String | 該條碼不存在 |
msg | String | 回傳處理結果 |
barcode | String | 條碼 |
name | String | 名稱 |
spec | String | 規格 |
quantity | Integer | 系統庫存 |
availQuantity | Integer | 可用庫存 |
Stock - 庫存查詢 (多筆)
此功能有訪問頻率限制 ( 每分鐘 5 次 ),若超過將會回傳 429: Too Many Attempts.,除 Response 外,API 在標頭也會回傳 X-RateLimit-Limit、X-RateLimit-Remaining、Retry-After ( 如果到達限制次數就只能得到 Retry-After )
POST
Header
Field | Type | Description |
---|---|---|
X-RateLimit-Limit | Integer | 指定時間內最大允許訪問次數 |
X-RateLimit-Remaining | Integer | 指定時間內剩餘訪問次數 |
Retry-After | Integer | 距離下次重新請求的等待時間 |
Parameter
Field | Type | Description |
---|---|---|
barcode[] | Array | 產品條碼 |
Success 200
Field | Type | Description |
---|---|---|
status | String | 開立結果 success : 成功,fail : 失敗 |
code | String | 結果代號 |
00 | String | 查詢成功 |
02 | String | 超過單次能查詢的數量上限 (100 筆) |
msg | String | 回傳處理結果 |
stock | Object | 庫存物件 |
barcode | String | 條碼 |
name | String | 名稱 |
spec | String | 規格 |
quantity | Integer | 系統庫存 |
availQuantity | Integer | 可用庫存 |
Last updated