Skip to main content

檔案上傳

此 API 有以下頻次限制:
  1. 單個 IP 1秒內最多請求 100 次,達到限制會block 該 IP 1 分鐘。
  2. 同個平台特店 1 秒內最多請求 20 次,超出的請求會被攔截。

介面路徑

請求方式API 路徑
POST生產環境: file-api.shoplinepayments.com/api/v1/kyc/file/upload
沙盒環境: file-api-sandbox.shoplinepayments.com/api/v1/kyc/file/upload

請求電文

Http.header 參數

Content-TypeString必填
固定值:multipart/form-data
platformIdString必填
SLP 平台 ID,平台特店必填
merchantIdString必填
SLP 特店 ID

Http.form

filefile必填
需上傳的檔案,最大支援 10 MB

回應電文

處理結果 http.statusCode

* 500 /429 /400:處理異常

codeString必填
錯誤碼,錯誤碼及錯誤描述詳情查看: Server 錯誤碼
msgString必填
錯誤描述,錯誤碼及錯誤描述詳情查看: Server 錯誤碼

* 200:處理成功

fileIdString必填
SLP 分配的檔案 ID
POST/api/v1/kyc/file/upload

sandbox api

https://file-api-sandbox.shoplinepayments.com/api/v1/kyc/file/upload

live api

https://file-api.shoplinepayments.com/api/v1/kyc/file/upload
請求電文範例
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="file"; filename="demo_file.jpg"
Content-Type: image/jpeg

[檔案二進制內容]
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="documentType"

IDENTITY_CARD_FRONT
------WebKitFormBoundary7MA4YWxkTrZu0gW--
回應電文範例
{
"fileId": "FSS89765432101234567890"
}