コンテンツにスキップ

注文

POST
/table_uses/{table_use_id}/orders
curl --request POST \
--url https://api.smaregi.dev/TARGET-CONTRACT-ID/waiter/table_uses/example/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "items": [ { "menuId": "100", "quantity": 1, "menuType": "normal", "name": "焼き鳥", "sellingPrice": { "amount": "300", "tax": "included", "taxRate": 10, "taxType": "normal" }, "discount": { "rate": "10" } } ], "orderPrints": { "kitchenTicket": true, "orderSlip": false } }'

注文を登録します。 サブメニュー明細はレスポンスで参照のみ可能です。このAPIでサブメニュー明細を作成・更新することはできません。

table_use_id
required
string

テーブル利用ID(注文ヘッダーID)

Media typeapplication/json
NewOrder

新規注文APIのリクエストスキーマ

object
items
required
Array<object>
>= 1 items <= 100 items
NewOrderItem

新規注文アイテムモデル

object
menuId
required

メニューID。 submenuOnly=true の単品メニューはサブメニュー専用のため、注文に指定できません。

string
quantity
required

数量

integer
>= 1 <= 1000
menuType

注文時のメニュー取扱種別 (項目がない場合、メニューマスタの種別が適用されます)

  • normal:単品
  • plan:プラン
  • inPlan:プラン内メニュー
  • course:コース
string
Allowed values: normal plan inPlan course
name

メニュー名

  • 項目がない場合、メニューマスタの設定が適用されます
  • 絵文字など、UTF-8で4バイトとして扱われる文字は使用できません
string
>= 1 characters <= 85 characters
customContentId

お好みオーダー内容ID

string
nullable
sellingPrice
object
taxRate
required

税率の割合(税率10%の場合、10 。非課税のメニューの場合、指定がなければ標準の税率になります。)

number
<= 100
taxType
required

税種別

  • normal:標準
  • reduced:軽減
  • none:非課税
string
Allowed values: normal reduced none
amount
required

金額(-999999〜999999の整数文字列)

string
>= -999999 <= 999999 <= 7 characters /^[+-]?(?:0|[1-9][0-9]{0,5})(?![\s\S])/
tax
required

金額の税情報

  • included: 税込
  • excluded: 税抜
  • none: 非課税
string
Allowed values: included excluded none
discount
One of:
RateCoupon

注文メニューの値引、割引設定(トッピングからは値引きされません) 値引・割引・値引クーポン・割引クーポン・無料クーポンのいずれか1種類のみ指定できます。

object
rateCoupon
required

クーポン割引率

string
/^([1-9][\d]?|100)$/
toppings

メニューのトッピング

Array<object>
object
id
required

トッピングID

string
name

トッピング名

  • 項目がない場合、メニューマスタの設定が適用されます
  • 絵文字など、UTF-8で4バイトとして扱われる文字は使用できません
string
<= 255 characters
quantity
required

トッピング数量(紐づく親メニュー1つに対して必要な個数を設定してください)

integer
>= 1 <= 1000
sellingPrice
object
taxRate
required

税率の割合(税率10%の場合、10 。非課税のメニューの場合、指定がなければ標準の税率になります。)

number
<= 100
taxType
required

税種別

  • normal:標準
  • reduced:軽減
  • none:非課税
string
Allowed values: normal reduced none
amount
required

金額(-999999〜999999の整数文字列)

string
>= -999999 <= 999999 <= 7 characters /^[+-]?(?:0|[1-9][0-9]{0,5})(?![\s\S])/
tax
required

金額の税情報

  • included: 税込
  • excluded: 税抜
  • none: 非課税
string
Allowed values: included excluded none
courseItems

コース内容

Array<object>
object
menuId
required

メニューID

string
extraAmount

追加料金。-999999〜999999の整数文字列。 項目がない場合、コースマスタで設定された値が適用されます。

string
>= -999999 <= 999999 <= 7 characters /^[+-]?(?:0|[1-9][0-9]{0,5})(?![\s\S])/
orderPrints
OrderPrints

印刷する伝票を指定できます。
印刷共通仕様

object
kitchenTicket

キッチン伝票(チビ伝票)を印刷するかどうかを指定できます

  • true: 印刷する
  • false: 印刷しない
boolean
orderSlip

注文伝票を印刷するかどうかを指定できます

  • true: 印刷する
  • false: 印刷しない
boolean
Examples
{
"items": [
{
"menuId": "100",
"quantity": 1,
"menuType": "normal",
"name": "焼き鳥",
"sellingPrice": {
"amount": "300",
"tax": "included",
"taxRate": 10,
"taxType": "normal"
},
"discount": {
"rate": "10"
}
}
],
"orderPrints": {
"kitchenTicket": true,
"orderSlip": false
}
}

OK

Media typeapplication/json
object
orderId

注文ID

string
ordered

注文日時[YYYY-MM-DDThh:mm:ssTZD]

string format: string
items
required
Array<object>
OrderItem

注文レスポンス内の注文明細モデル

object
id

注文明細ID (明細ID)

string
name

注文内容

string
status

ステータス

  • waiting: 提供待ち (注文済)
  • provided: 提供済み (配膳済)
  • canceled: キャンセル済み
string
Allowed values: waiting provided canceled
servedAt

配膳日時 (RFC3339の日時形式)[YYYY-MM-DDThh:mm:ssTZD]

string format: date-time
nullable
memo

メモ

string
menuId

メニューID

string
quantity

注文明細の数量

integer
>= 1
menuType

注文時のメニュー取扱種別

  • normal:単品
  • plan:プラン
  • inPlan:プラン内メニュー
  • course:コース
string
Allowed values: normal plan inPlan course
customContentId

お好みオーダー内容ID

string
nullable
customContentName

お好みオーダー内容

string
categoryId

カテゴリーID

string
sellingPrice
NewOrderItemPrice

販売価格

object
taxRate
required

税率の割合(税率10%の場合、10 。非課税のメニューの場合、指定がなければ標準の税率になります。)

number
<= 100
taxType
required

税種別

  • normal:標準
  • reduced:軽減
  • none:非課税
string
Allowed values: normal reduced none
amount
required

金額(-999999〜999999の整数文字列)

string
>= -999999 <= 999999 <= 7 characters /^[+-]?(?:0|[1-9][0-9]{0,5})(?![\s\S])/
tax
required

金額の税情報

  • included: 税込
  • excluded: 税抜
  • none: 非課税
string
Allowed values: included excluded none
discount
One of:
RateCoupon
object
rateCoupon
required

クーポン割引率

string
/^([1-9][\d]?|100)$/
amount
required

値引金額(単価から減算する金額。単価が負数の場合は負数、0円の場合は0)

string
/^(?:0|-?[1-9][0-9]*)$/
timeLimit

制限時間設定(分)。0 の場合は制限時間通知の対象外となります。

integer
preTimeLimitMinutesLeft

制限時間事前通知設定(分)。0 の場合は事前通知の対象外となります。

integer
toppings

メニューのトッピング

Array<object>
object
id

注文明細ID (明細ID)

string
toppingId

トッピングID

string
name

トッピング名

string
quantity

親注文明細 1 件あたりのトッピング数量です。トッピング実個数を親注文明細の数量で除算した値です。

integer
>= 1
categoryId

カテゴリーID

string
sellingPrice
NewOrderItemPrice

販売価格

object
taxRate
required

税率の割合(税率10%の場合、10 。非課税のメニューの場合、指定がなければ標準の税率になります。)

number
<= 100
taxType
required

税種別

  • normal:標準
  • reduced:軽減
  • none:非課税
string
Allowed values: normal reduced none
amount
required

金額(-999999〜999999の整数文字列)

string
>= -999999 <= 999999 <= 7 characters /^[+-]?(?:0|[1-9][0-9]{0,5})(?![\s\S])/
tax
required

金額の税情報

  • included: 税込
  • excluded: 税抜
  • none: 非課税
string
Allowed values: included excluded none
courseItems

コース内容

Array<object>
object
id

注文明細ID (明細ID)

string
menuId

メニューID

string
name

メニュー名

string
quantity

コース内明細の実数量です。プラットフォームAPI 経由の注文では親注文明細の数量に連動して設定されますが、プラットフォームAPI 以外の経路で登録された注文では連動しない場合があるため、親注文明細の数量と常に一致するとは限りません。

integer
>= 1
categoryId

カテゴリーID

string
sellingPrice
NewOrderItemPrice

追加料金

object
taxRate
required

税率の割合(税率10%の場合、10 。非課税のメニューの場合、指定がなければ標準の税率になります。)

number
<= 100
taxType
required

税種別

  • normal:標準
  • reduced:軽減
  • none:非課税
string
Allowed values: normal reduced none
amount
required

金額(-999999〜999999の整数文字列)

string
>= -999999 <= 999999 <= 7 characters /^[+-]?(?:0|[1-9][0-9]{0,5})(?![\s\S])/
tax
required

金額の税情報

  • included: 税込
  • excluded: 税抜
  • none: 非課税
string
Allowed values: included excluded none
status

ステータス

string
Allowed values: waiting provided canceled
servedAt

配膳日時 (RFC3339の日時形式)[YYYY-MM-DDThh:mm:ssTZD]

string format: date-time
nullable
timeLimit

制限時間設定(分)。0 の場合は制限時間通知の対象外となります。

integer
preTimeLimitMinutesLeft

制限時間事前通知設定(分)。0 の場合は事前通知の対象外となります。

integer
submenuItems
required

注文明細に紐づくサブメニュー明細です。
サブメニュー明細の有無にかかわらず常に返却され、存在しない場合は空配列を返却します。

Array
OrderSubmenuItem

サブメニュー明細(子階層)

object
id

注文明細ID (明細ID)

string
menuId

メニューID

string
name

メニュー名

string
quantity

サブメニュー明細の実数量です。
当該サブメニュー明細自身の数量を示します。
直近の親要素(1階層上の明細)の数量変更に伴う増減は isQuantitySyncedWithParent の値に従います。

integer
>= 1
categoryId

カテゴリーID

string
sellingPrice
NewOrderItemPrice

販売価格

object
taxRate
required

税率の割合(税率10%の場合、10 。非課税のメニューの場合、指定がなければ標準の税率になります。)

number
<= 100
taxType
required

税種別

  • normal:標準
  • reduced:軽減
  • none:非課税
string
Allowed values: normal reduced none
amount
required

金額(-999999〜999999の整数文字列)

string
>= -999999 <= 999999 <= 7 characters /^[+-]?(?:0|[1-9][0-9]{0,5})(?![\s\S])/
tax
required

金額の税情報

  • included: 税込
  • excluded: 税抜
  • none: 非課税
string
Allowed values: included excluded none
status

ステータス

  • waiting: 提供待ち (注文済)
  • provided: 提供済み (配膳済)
  • canceled: キャンセル済み
string
Allowed values: waiting provided canceled
servedAt

配膳日時 (RFC3339の日時形式)[YYYY-MM-DDThh:mm:ssTZD]

string format: date-time
nullable
timeLimit

制限時間設定(分)。0 の場合は制限時間通知の対象外となります。

integer
preTimeLimitMinutesLeft

制限時間事前通知設定(分)。0 の場合は事前通知の対象外となります。

integer
isQuantitySyncedWithParent
required

直近の親要素(1階層上の明細)の数量変更時に、このサブメニュー明細の数量を連動更新するかを示します。

  • true: 直近の親要素の数量に応じて本明細の数量も増減します。
  • false: 直近の親要素の数量が変わっても本明細の数量は自動変更されません。
boolean
submenuItems
required

サブメニュー明細の子要素(孫階層)です。
孫階層の明細が存在しない場合は空配列を返却します。

Array
OrderSubmenuItemNested

サブメニュー明細(孫階層)。
孫階層の明細には submenuItems は返却されません。

object
id

注文明細ID (明細ID)

string
menuId

メニューID

string
name

メニュー名

string
quantity

サブメニュー明細の実数量です。
当該サブメニュー明細自身の数量を示します。
直近の親要素(1階層上の明細)の数量変更に伴う増減は isQuantitySyncedWithParent の値に従います。

integer
>= 1
categoryId

カテゴリーID

string
sellingPrice
NewOrderItemPrice

販売価格

object
taxRate
required

税率の割合(税率10%の場合、10 。非課税のメニューの場合、指定がなければ標準の税率になります。)

number
<= 100
taxType
required

税種別

  • normal:標準
  • reduced:軽減
  • none:非課税
string
Allowed values: normal reduced none
amount
required

金額(-999999〜999999の整数文字列)

string
>= -999999 <= 999999 <= 7 characters /^[+-]?(?:0|[1-9][0-9]{0,5})(?![\s\S])/
tax
required

金額の税情報

  • included: 税込
  • excluded: 税抜
  • none: 非課税
string
Allowed values: included excluded none
status

ステータス

  • waiting: 提供待ち (注文済)
  • provided: 提供済み (配膳済)
  • canceled: キャンセル済み
string
Allowed values: waiting provided canceled
servedAt

配膳日時 (RFC3339の日時形式)[YYYY-MM-DDThh:mm:ssTZD]

string format: date-time
nullable
timeLimit

制限時間設定(分)。0 の場合は制限時間通知の対象外となります。

integer
preTimeLimitMinutesLeft

制限時間事前通知設定(分)。0 の場合は事前通知の対象外となります。

integer
isQuantitySyncedWithParent
required

直近の親要素(1階層上の明細)の数量変更時に、このサブメニュー明細の数量を連動更新するかを示します。

  • true: 直近の親要素の数量に応じて本明細の数量も増減します。
  • false: 直近の親要素の数量が変わっても本明細の数量は自動変更されません。
boolean
tableUseId

テーブル利用ID(注文ヘッダーID)

string
nullable
tableUse
object
id
required

テーブル利用ID(注文ヘッダーID)

string
storeId

店舗ID

string
tables

テーブル

Array<object>
object
id

テーブルID

string
nullable
name

テーブル名

string
status

ステータス

  • started: 利用中
  • ended: 利用終了
  • canceled: キャンセル済み
  • merged: 結合済み
string
Allowed values: started ended canceled merged
Examples
Exampleレスポンス例
{
"orderId": "01ED3EV928A078J0TZAJQR69CK",
"ordered": "2020-09-07T11:35:02+09:00",
"items": [
{
"id": "50001",
"name": "コーヒー",
"status": "waiting",
"servedAt": null,
"memo": "",
"menuId": "124",
"quantity": 2,
"menuType": "normal",
"customContentId": "8",
"customContentName": "微糖",
"categoryId": "156",
"sellingPrice": {
"taxRate": 10,
"taxType": "normal",
"amount": "330",
"tax": "included"
},
"discount": {
"rateCoupon": "10",
"amount": "33"
},
"timeLimit": 30,
"preTimeLimitMinutesLeft": 10,
"toppings": [],
"courseItems": [],
"submenuItems": []
},
{
"id": "50003",
"name": "チキンサラダ",
"status": "waiting",
"servedAt": null,
"memo": "",
"menuId": "125",
"quantity": 2,
"menuType": "normal",
"customContentId": null,
"customContentName": "",
"categoryId": "156",
"sellingPrice": {
"taxRate": 10,
"taxType": "normal",
"amount": "330",
"tax": "included"
},
"discount": null,
"timeLimit": 0,
"preTimeLimitMinutesLeft": 0,
"toppings": [],
"courseItems": [],
"submenuItems": [
{
"id": "60001",
"menuId": "401",
"name": "和風ドレッシング",
"quantity": 2,
"categoryId": "156",
"sellingPrice": {
"taxRate": 10,
"taxType": "normal",
"amount": "100",
"tax": "included"
},
"status": "waiting",
"servedAt": null,
"timeLimit": 0,
"preTimeLimitMinutesLeft": 0,
"isQuantitySyncedWithParent": true,
"submenuItems": [
{
"id": "60002",
"menuId": "402",
"name": "大盛り",
"quantity": 1,
"categoryId": "156",
"sellingPrice": {
"taxRate": 10,
"taxType": "normal",
"amount": "20",
"tax": "included"
},
"status": "waiting",
"servedAt": null,
"timeLimit": 0,
"preTimeLimitMinutesLeft": 0,
"isQuantitySyncedWithParent": false
}
]
}
]
}
],
"tableUseId": "10009",
"tableUse": {
"id": "10009",
"status": "started",
"storeId": "1",
"tables": [
{
"id": "8",
"name": "T2"
},
{
"id": "9",
"name": "T3"
}
]
}
}

入力チェックエラーの場合

Media typeapplication/json
object
title
required
string
type
required
string
status
integer
detail
string
Examplegenerated
{
"title": "example",
"type": "example",
"status": 1,
"detail": "example"
}

指定したデータが存在しない場合

Media typeapplication/json
object
title
required
string
type
required
string
status
integer
detail
string
Examplegenerated
{
"title": "example",
"type": "example",
"status": 1,
"detail": "example"
}