[REFACTOR] 標準化 IoT API 方法並修正日期格式
All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 57s
All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 57s
1. 將 B014 (參數下載) 與 B017 (貨道同步) 路由從 POST 改為 GET。 2. 移除 B017 冗餘的 machine 參數,改由 Bearer Token 自動識別。 3. 修正 B017 回傳資料中 expiry_date 的 ISO 8601 格式問題,統一為 Y-m-d。 4. 同步更新所有技術規格文件 (.agents/ 規範) 與 API 說明配置 (config/api-docs.php)。
This commit is contained in:
@@ -62,7 +62,7 @@ return [
|
||||
[
|
||||
'name' => 'B014: 機台參數與金鑰下載 (Config Download)',
|
||||
'slug' => 'b014-config-download',
|
||||
'method' => 'POST',
|
||||
'method' => 'GET',
|
||||
'path' => '/api/v1/app/machine/setting/B014',
|
||||
'description' => '機台引導階段的第二步。在人員登入後,透過此介面下載金流金鑰、電子發票設定與機台專屬通訊 Token。',
|
||||
'headers' => [
|
||||
@@ -97,9 +97,7 @@ return [
|
||||
]
|
||||
],
|
||||
],
|
||||
'request' => [
|
||||
'machine' => 'SN202604130001'
|
||||
],
|
||||
'request' => [],
|
||||
'response' => [
|
||||
'success' => true,
|
||||
'code' => 200,
|
||||
@@ -463,21 +461,14 @@ return [
|
||||
[
|
||||
'name' => 'B017: 貨道庫存同步 (Slot Synchronization)',
|
||||
'slug' => 'b017-slot-sync',
|
||||
'method' => 'POST',
|
||||
'method' => 'GET',
|
||||
'path' => '/api/v1/app/machine/reload_msg/B017',
|
||||
'description' => '用於機台端獲獲取所有貨道的最新庫存、效期與狀態。通常由 B010 回傳 status: 49 時觸發。',
|
||||
'headers' => [
|
||||
'Authorization' => 'Bearer <api_token>',
|
||||
'Content-Type' => 'application/json',
|
||||
],
|
||||
'parameters' => [
|
||||
'machine' => [
|
||||
'type' => 'string',
|
||||
'required' => true,
|
||||
'description' => '機台序號',
|
||||
'example' => 'SN00001'
|
||||
],
|
||||
],
|
||||
'parameters' => [],
|
||||
'response_parameters' => [
|
||||
'success' => [
|
||||
'type' => 'boolean',
|
||||
@@ -498,9 +489,7 @@ return [
|
||||
]
|
||||
],
|
||||
],
|
||||
'request' => [
|
||||
'machine' => 'SN00001'
|
||||
],
|
||||
'request' => [],
|
||||
'response' => [
|
||||
'success' => true,
|
||||
'code' => 200,
|
||||
|
||||
Reference in New Issue
Block a user