出荷
POST
/webhook-shipments
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/pos/webhook-shipments';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"contractId":"your_contract_id","event":"pos:shipments","action":"created","shipmentIds":["100"]}'};
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-shipments \ --header 'Content-Type: application/json' \ --data '{ "contractId": "your_contract_id", "event": "pos:shipments", "action": "created", "shipmentIds": [ "100" ] }'Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Smaregi-Event
string
イベント名 pos:shipments
Request Body
Section titled “Request Body”Media typeapplication/json
object
contractId
契約ID
string
event
イベント
string
action
アクション
- created: 登録
- edited: 更新
- deleted: 削除
- bulk-deleted: 一括削除
string
shipmentIds
出荷IDリスト
array
Example
{ "contractId": "your_contract_id", "event": "pos:shipments", "action": "created", "shipmentIds": [ "100" ]}