精算処理
POST
/webhook-adjustments
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/pos/webhook-adjustments';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"contractId":"string","event":"string","action":"executed","ids":[{"storeId":"1","terminalId":"5","adjustmentDateTime":"2022-10-26T15:22:35+09:00"}],"cashAdjustment":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.smaregi.dev/TARGET-CONTRACT-ID/pos/webhook-adjustments \ --header 'Content-Type: application/json' \ --data '{ "contractId": "string", "event": "string", "action": "executed", "ids": [ { "storeId": "1", "terminalId": "5", "adjustmentDateTime": "2022-10-26T15:22:35+09:00" } ], "cashAdjustment": true }'Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Smaregi-Event
string
イベント名 pos:adjustments
Request Body
Section titled “Request Body”Media typeapplication/json
object
contractId
契約ID
string
event
イベント
string
action
アクション
- executed: 精算実施
- canceled: 現金精算情報の取消
string
ids
Array<object>
object
storeId
店舗ID
string
terminalId
端末ID
※ 親子設定が設定されていた場合、親端末IDだけ設定されます
string
adjustmentDateTime
精算日時
YYYY-MM-DDThh:mm:ssTZD
※ 現金精算情報の取消をした場合は、取消した現金精算情報が紐づく精算情報の精算日時が設定されます
string
cashAdjustment
現金精算情報の有無
現金精算情報がある場合: true、ない場合: false
※ 現金精算情報の取消のときは、常にfalseになります
boolean
Example
{ "contractId": "string", "event": "string", "action": "executed", "ids": [ { "storeId": "1", "terminalId": "5", "adjustmentDateTime": "2022-10-26T15:22:35+09:00" } ], "cashAdjustment": true}