注文伝票印刷
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/waiter/store_print/example/order_slip';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"appName":"サンプルプラットフォームアプリ名","slipType":"newOrder","headerTitle":"受渡時間\n2025/06/09 14:05\n引換券番号\nX00001898","headerContents":"お渡しまでの時間 19分\n注文時間 2025/06/09 12:30","items":[{"menuId":null,"name":"ラーメン","sellingPrice":"600","quantity":2,"subtotalPrice":"1200","priceOptions":null,"note":null,"courseItems":null,"toppings":null,"customOrderContents":null},{"menuId":null,"name":"目玉焼き","sellingPrice":"500","quantity":2,"subtotalPrice":"1000","priceOptions":null,"note":null,"courseItems":null,"toppings":[{"name":"七味","sellingPrice":"50","quantity":2,"subtotalPrice":"100"}],"customOrderContents":null}],"subtotalPrice":"2300","subtotalPriceOptions":null,"totalPrice":"2300","totalPriceOptions":null,"totalQuantity":6,"footerTitle":"配達情報","footerContents":"配達方法:配達代行"}'};
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/waiter/store_print/example/order_slip \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "appName": "サンプルプラットフォームアプリ名", "slipType": "newOrder", "headerTitle": "受渡時間\n2025/06/09 14:05\n引換券番号\nX00001898", "headerContents": "お渡しまでの時間 19分\n注文時間 2025/06/09 12:30", "items": [ { "menuId": null, "name": "ラーメン", "sellingPrice": "600", "quantity": 2, "subtotalPrice": "1200", "priceOptions": null, "note": null, "courseItems": null, "toppings": null, "customOrderContents": null }, { "menuId": null, "name": "目玉焼き", "sellingPrice": "500", "quantity": 2, "subtotalPrice": "1000", "priceOptions": null, "note": null, "courseItems": null, "toppings": [ { "name": "七味", "sellingPrice": "50", "quantity": 2, "subtotalPrice": "100" } ], "customOrderContents": null } ], "subtotalPrice": "2300", "subtotalPriceOptions": null, "totalPrice": "2300", "totalPriceOptions": null, "totalQuantity": 6, "footerTitle": "配達情報", "footerContents": "配達方法:配達代行" }'注文伝票の印刷を実行します。
※ null指定が可能な項目について、nullを指定した場合は項目が印字されません
※ 店舗に登録されたホールプリンターから印刷されます
※ 明細にメニューIDが指定されている場合、メニューの印刷対象伝票の注文伝票の設定が適用されます
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”店舗ID
Request Body
Section titled “Request Body”新規注文伝票印刷APIのリクエストスキーマ
object
アプリ名
伝票に印字するアプリ名を指定してください。
- 絵文字など、UTF-8で4バイトとして扱われる文字は使用できません
- 不可視文字のみの登録はできません
伝票種別
newOrder: 新規注文addOrder: 追加注文changeQuantity: 数量変更cancelOrder: 注文キャンセル
選択した伝票種別に応じた伝票名が印字されます。
※ 注文キャンセルを指定した場合、印字の際に数量と明細小計の符号が反転します
ヘッダータイトル
- 絵文字など、UTF-8で4バイトとして扱われる文字は使用できません
ヘッダー内容
- 絵文字など、UTF-8で4バイトとして扱われる文字は使用できません
明細
印字時に、ウェイターの店舗に設定したアプリ設定が適用されます。
注文伝票明細情報
object
メニューID
メニュー名
- 絵文字など、UTF-8で4バイトとして扱われる文字は使用できません
- 不可視文字のみの登録はできません
販売単価
-99999999 ~ 99999999 の範囲の整数値を指定してください
数量
明細小計金額
-999999999999 ~ 999999999999 の範囲の整数値を指定してください
明細オプション金額
印刷の際は各明細の下に印字されます。
object
項目名
- 絵文字など、UTF-8で4バイトとして扱われる文字は使用できません
- 不可視文字のみの登録はできません
金額
-99999999 ~ 99999999 の範囲の整数値を指定してください
メモ
- 絵文字など、UTF-8で4バイトとして扱われる文字は使用できません
コース内容
object
メニューID
メニュー名
- 絵文字など、UTF-8で4バイトとして扱われる文字は使用できません
- 不可視文字のみの登録はできません
販売単価
-99999999 ~ 99999999 の範囲の整数値を指定してください
数量
明細小計金額
-999999999999 ~ 999999999999 の範囲の整数値を指定してください
メモ
- 絵文字など、UTF-8で4バイトとして扱われる文字は使用できません
トッピング
object
メニュー名
- 絵文字など、UTF-8で4バイトとして扱われる文字は使用できません
- 不可視文字のみの登録はできません
販売単価
-99999999 ~ 99999999 の範囲の整数値を指定してください
数量
明細小計金額
-999999999999 ~ 999999999999 の範囲の整数値を指定してください
お好みオーダー内容
object
お好みオーダー名
- 絵文字など、UTF-8で4バイトとして扱われる文字は使用できません
- 不可視文字のみの登録はできません
小計金額
-9999999999999999 ~ 9999999999999999 の範囲の整数値を指定してください
小計オプション金額
印刷の際は小計の下に印字されます。
object
項目名
- 絵文字など、UTF-8で4バイトとして扱われる文字は使用できません
- 不可視文字のみの登録はできません
金額
-99999999 ~ 99999999 の範囲の整数値を指定してください
合計金額
-99999999999999999 ~ 99999999999999999 の範囲の整数値を指定してください
合計オプション金額
印刷の際は合計の下に印字されます。
object
項目名
- 絵文字など、UTF-8で4バイトとして扱われる文字は使用できません
- 不可視文字のみの登録はできません
金額
-99999999 ~ 99999999 の範囲の整数値を指定してください
合計点数
フッタータイトル
- 絵文字など、UTF-8で4バイトとして扱われる文字は使用できません
フッター内容
- 絵文字など、UTF-8で4バイトとして扱われる文字は使用できません
Examples
{ "appName": "サンプルプラットフォームアプリ名", "slipType": "newOrder", "headerTitle": "受渡時間\n2025/06/09 14:05\n引換券番号\nX00001898", "headerContents": "お渡しまでの時間 19分\n注文時間 2025/06/09 12:30", "items": [ { "menuId": null, "name": "ラーメン", "sellingPrice": "600", "quantity": 2, "subtotalPrice": "1200", "priceOptions": null, "note": null, "courseItems": null, "toppings": null, "customOrderContents": null }, { "menuId": null, "name": "目玉焼き", "sellingPrice": "500", "quantity": 2, "subtotalPrice": "1000", "priceOptions": null, "note": null, "courseItems": null, "toppings": [ { "name": "七味", "sellingPrice": "50", "quantity": 2, "subtotalPrice": "100" } ], "customOrderContents": null } ], "subtotalPrice": "2300", "subtotalPriceOptions": null, "totalPrice": "2300", "totalPriceOptions": null, "totalQuantity": 6, "footerTitle": "配達情報", "footerContents": "配達方法:配達代行"}Responses
Section titled “Responses”Accepted
object
Examplegenerated
{}- リクエストパラメーターが不正
- 指定されたメニューIDが存在しない、または店舗で取り扱わない場合
- 不正なフォーマットの値を指定した場合
- 休止中の店舗IDが指定された場合
- 指定の店舗にウェイターターミナルが登録されていない場合
object
Examples
{ "type": "about:blank", "title": "Bad Request", "detail": "(エラー内容の説明メッセージ)", "status": 400}{ "type": "https://api.smaregi.jp/problems/waiter/no-waiter-terminal", "title": "店舗にウェイターターミナル未登録", "detail": "指定の店舗はウェイターターミナルが登録されていないため、印刷できません。", "status": 400}指定した店舗が存在しない場合
object
Examplegenerated
{ "title": "example", "type": "example", "status": 1, "detail": "example"}