Transactions API のサポートは 2023 年 6 月 13 日に終了します。2023 年 5 月 3 日に終了します。詳細については、
会話型アクションの廃止をご覧ください。
Method: orders.createWithCustomToken
Google によって作成されたカスタム トークンを使用して新しい注文を作成し、その注文を返します。このメソッドを使用するデベロッパーは、Google から渡された userToken をリクエストに設定する必要があります。このメソッドは、(取引および AMP フローを使用するのではなく)デベロッパーまたは販売者が注文を直接 Google に保存する場合に使用します。
HTTP リクエスト
POST https://actions.googleapis.com/v3/orders:createWithCustomToken
この URL は gRPC Transcoding 構文を使用します。
リクエストの本文
リクエストの本文には、次の構造のデータが含まれます。
フィールド |
header |
object (OrderRequestHeader )
必須: 注文作成リクエストのヘッダー。
|
order |
object (Order )
必須: 作成するオーダー。 注: 1. 有効な注文を作成するには、必ず次のフィールドが必要です。order.create_time、order.merchant_order_id、order.contents.line_items、order.contents.line_items.id。2. 注文には少なくとも 1 つの項目が必要であり、項目ではカテゴリ(vertical)または拡張情報(extension)が定義されている必要があります。3. すべての拡張情報(注文レベルと項目レベルの両方)は 1 つのカテゴリタイプに対応付けられている必要があります。すなわち、複数のカテゴリを表している注文は有効な注文ではありません。
|
userToken |
string
必須: 非同期チャネルを介して Google からパートナーに提供される暗号化トークン。
|
レスポンスの本文
成功した場合、レスポンスの本文には Order
のインスタンスが含まれます。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-09-13 UTC。
[null,null,["最終更新日 2024-09-13 UTC。"],[[["Creates new Orders using a custom token provided by Google, enabling developers to save orders directly on behalf of the user."],["Requires a `POST` request to `https://actions.googleapis.com/v3/orders:createWithCustomToken` with specific data in the request body."],["The request body must contain `header`, `order`, and `userToken` fields with specified data structures and requirements."],["A successful response returns the created `Order` object with details of the order."]]],["This describes the process of creating a new order using a custom Google-minted token. A `POST` request is sent to `https://actions.googleapis.com/v3/orders:createWithCustomToken`. The request body requires a JSON payload with `header`, `order` (including `create_time`, `merchant_order_id`, and at least one valid `line_item` with an ID and vertical extension), and `userToken` (an encrypted token from Google). A successful request returns an `Order` instance in the response body.\n"]]