受注
POST
/webhook-orders
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/order-shipment/webhook-orders';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"contractId":"smaregi","event":"order-shipment:orders","action":"shipped","storeId":"1","orderHeadIds":["111","222"]}'};
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/order-shipment/webhook-orders \ --header 'Content-Type: application/json' \ --data '{ "contractId": "smaregi", "event": "order-shipment:orders", "action": "shipped", "storeId": "1", "orderHeadIds": [ "111", "222" ] }'Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Smaregi-Event
string
イベント名 order-shipment:orders
Request Body
Section titled “Request Body”Media typeapplication/json
object
contractId
契約ID
string
event
イベント
string
action
アクション
shipped: 出荷済canceled: キャンセル済
※actionは今後追加される場合があります。
string
storeId
受注店舗ID
string
orderHeadIds
受注IDリスト
Array<string>
Example
{ "contractId": "smaregi", "event": "order-shipment:orders", "action": "shipped", "storeId": "1", "orderHeadIds": [ "111", "222" ]}Responses
Section titled “Responses”受信成功