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-12 UTC。
[null,null,["最終更新日 2024-09-12 UTC。"],[[["This document explains the `orders:createWithCustomToken` method, which creates new Google Orders using a custom, Google-minted token."],["Developers should include the `userToken` provided by Google in the request."],["This process is typically used when developers or merchants directly save orders to Google on behalf of the order, rather than using Transactions or AMP flows."],["The request body must include a header, order details (with at least one line item and a specified vertical), and the `userToken`."],["A successful response will return the created `Order` object."]]],["This document outlines how to create a new order using a custom Google-minted token. It involves sending a `POST` request to `https://actions.googleapis.com/v3/orders:createWithCustomToken`. The request body requires a JSON structure with `header` (OrderRequestHeader object), `order` (Order object, including required fields like `create_time`, `merchant_order_id`, and line items), and a `userToken` (an encrypted token from Google). Successful requests return an `Order` object in the response body. The order must contain at least one line item, and all extensions should map to a single vertical type.\n"]]