# 介接規格書 ## PTV 入帳 ### Request - Method > POST - Header | Tag | Name | Type | Value | Description | | --- | --- | --- | --- | --- | | Content-type | Body 格式 | String | application/json | 固定值 | | transactionId | 交易代碼 | String | 廠商提供,格式自訂 | 供廠商和AIS交易串接識別碼 | - Query Params > 無 - Body ```json { "roomNumber": "302", "billDate": "2023/02/15", "billType": "ptv", "billAmount": 160, "billRemark": "HBO - 蜘蛛人" } ``` | Tag | Name | Type | Value | Description | | --- | --- | --- | --- | --- | | roomNumber | 房號 | String | | | | billDate | 發生日期 | Date | YYYY-MM-DD | | | billType | 帳務類別 | String | | | | billAmount | 入帳金額 | Number | | | | billRemark | 備註 | String | nvarchar(100)廠商提供 | 供櫃台及客人對帳的項目說明 | | Value | Description | | --- | --- | | ptv_ptv_item | 付費電視 | |ptv_refridge _item| 冰箱飲料 | |ptv_www_item| 網際網路 | |ptv_rs_item| 餐飲 | ### Response - Body ```json { "code": "EPTV0000", "message": "交易成功" } ``` | Tag | Name | Type | Value | Description | | --- | --- | --- | --- | --- | | code | 回應代碼 | String | | 參考回應代碼表 | | message | 回應訊息 | String | | 參考回應代碼表 | ## PTV 查帳 ### Rquest - Method > GET - Header | Tag | Name | Type | Value | Description | | --- | --- | --- | --- | --- | | Content-type | Body 格式 | String | application/json | 固定值 | - Query Params > `無 - Body > 無 ### Response - Body ```json { "code": "2000", "data": [ { "date": "2022-05-03", "item": "房租", "amount": 800.00, "remark": "null" }, { "date": "2022-05-03", "item": "服務費", "amount": 100.00, "remark": "null" }, { "date": "2022-05-04", "item": "冰箱", "amount": 150.00, "remark": "null" }, { "date": "2022-05-04", "item": "付費電視", "amount": 100.00, "remark": "Netfix - 超人 4 0305-1" } ], "message": null } ``` | Tag | Name | Type | Value | Description | | --- | --- | --- | --- | --- | | code | 回應代碼 | String | | 參考回應代碼表 | | message | 回應訊息 | String | | 參考回應代碼表 | | data | 回傳資料 | Object | | | | Tag | Name | Type | Value | Description | | --- | --- | --- | --- | --- | | date | 日期 | Date | YYYY-MM-DD | | | item | 名稱 | String | | | | amount | 金額 | Number | | | | remark | 說明 | String | | | # 回應代碼表 | Code | Message | | --- | --- | | 6100 | 交易成功 | | 6122 | 傳入資料有誤 | | 6111 | 飯店前檯系統未設定參數 | | 6112 | 服務項目未設定 | | 6121 | 需飯店人員協助 | | 6131 | 此房間未有住客帳 | | 6141 | 入帳失敗 | | 6142 | 查無帳單資料 | | 6501 | 系統非預期錯誤 |