Create an order #

POST/orders
鉴权: bearerAuth (bearer)

Creates an order waiting for payment at one store. The pay_url in the response is valid for 15 minutes; after that the order is cancelled.

参数 #

请求头
Idempotency-Keystring(uuid)
Repeating a request with the same key creates the order only once.

请求体 #

application/json
{
}
}
],
}

响应 #

The order, waiting for payment.
application/json
{
},
}
}
],
}

代码示例 #

curl -X POST "https://api.kawa-coffee.example/v2/orders" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "store_id": "st_shanghai_01",
    "items": [
      {
        "menu_item_id": "mi_oat_latte",
        "quantity": 2,
        "options": {
          "milk": "oat",
          "size": "grande"
        }
      }
    ],
    "pickup_at": "2026-12-01T08:30:00+08:00",
    "note": "Less ice"
  }'

评论