DOCS

チェックアウトの作成

チェックアウトの作成

チェックアウト作成に関わるキー/値ペアを確認します。

このAPIエンドポイントは、顧客のカートから商品情報とカート内容をZonos APIに送信するために使用します。

JSONレスポンスにはtempCartUUID(Zonosシステム内の一意のカート識別子)が含まれます。これを使用して、顧客をZonos Checkoutにリダイレクトし、注文を完了します。

属性 

リクエストボディ内のJSONキー/値ペア

POST https://api.iglobalstores.com/v1/createTempCart

fieldnotes
boxCountExample value: 22x15x15(1),8x8x4(2),32x22x14(1)
Format: Comma-separated list of box dimensions and count. In the example above, there are a total of 4 boxes. The first box in the list will be 22 inches long, by 15 inches wide, by 15 inches high. There will only be one box used for that size. There will be two boxes of size: 8x8x4 inches. It is acceptable to pass the same box dimension multiple times if that is easy for you, like this: “22x15x15(1),22x15x15(1)”, which means 2 boxes of size: 22x15x15 inches.This field describes the boxes that will be used to ship the order. It is not expected that a merchant knows this at time of order; however, if it is known, it may be passed in the string format.
contShoppingURLZonos Checkout内の「Continue Shopping」ボタンのHREFを上書きするURLを渡すために使用します。string
domesticShippingCharge国内配送料をZonos Checkoutに渡すために使用し、金額は配送料に加算されます。配送合計として追加するか、別の明細項目として表示するかを設定できます。positive floating point, two decimal places
externalConfirmationPageURL注文確認/サンキューページのURLを渡すために使用します。顧客がZonos Checkout内で支払いを完了すると、このURLにリダイレクトされて注文確認が行われます。このURLは、Zonos「orderDetail」APIサービスエンドポイントを呼び出して注文詳細を取得し、システムに注文をインポートするトリガーとしてよく使用されます。string
footerHTMLURLエンコードされたHTML文字列を渡すために使用します。このHTML文字列はデコードされ、チェックアウトページのbody終了タグの直前に配置されます。リマーケティング、分析などのコードを渡す際によく使用されます。URL encoded string
items

REQUIRED

商品マップのリストです。JSON string
items[index].countryOfOrigin商品の原産国を渡すために使用します。パラメーターは国の2文字ISOコードである必要があります。string
items[index].description

REQUIRED

カート明細の完全な商品説明(オプション、色などを含む)を渡すために使用します。string
items[index].height商品の高さを渡すために使用し、正確な配送見積もりのために強く推奨されます。高さの単位は

REQUIRED

インチです。string - positive floating point, two decimal places / integer (inches)
items[index].imageURL

REQUIRED

商品画像のURLを渡すために使用します。URLはHTTPSである必要があり、Zonos Checkout内で表示されます。string / HTTPS URL
items[index]itemBrand商品ブランドを渡すために使用します。string
items[index]itemCategory商品カテゴリを渡すために使用し、複数カテゴリがある場合はパイプ区切りで渡すことができます。
Example values: “shoes” or “shoes|sport-shoes|discount-shoes”string
items[index]itemCustomizationZonos Checkoutには表示されない商品の追加詳細を渡すために使用しますが、「orderDetail」APIサービスエンドポイントから取得できます。
items[index]itemHSCode商品のHSコードを渡すために使用し、ピリオドの有無どちらでも構いません。
Example values: “3926901000” or “3926.90.1000”string
items[index].itemURL商品ページのURLを渡すために使用します。string / URL
items[index].length商品の長さを渡すために使用し、正確な配送見積もりのために強く推奨されます。長さの単位は

REQUIRED

インチです。string - positive floating point, two decimal places / integer (inches)
items[index].nonShippable商品を配送、関税、税金の計算に含めるかどうかを示すために使用します。デジタルダウンロード、割引コード、手数料などは「true」の値で渡す必要があります。boolean: true or false
items[index].productId明細数量を渡すために使用します。string
items[index].quantity

REQUIRED

明細数量を渡すために使用します。string
items[index].sku商品SKU/UPCなどを渡すために使用します。string
items[index].unitPrice

REQUIRED

明細の単価を渡すために使用します。positive floating point, two decimal places / integer
items[index].weight商品の重量を渡すために使用し、正確な配送見積もりのために強く推奨されます。重量単位はitems[index].itemWeightUnitsで別の単位が渡されない限りデフォルトで「LBS」です。string - positive floating point, two decimal places / integer
items[index].weightUnitsデフォルトの商品重量単位を上書きするために使用します。商品重量単位は、このフィールドで別の単位が渡されない限りデフォルトで「LBS」です。string - "LB", "OZ", "KG", or "G”
items[index].width商品の幅を渡すために使用し、正確な配送見積もりのために強く推奨されます。幅の単位は

REQUIRED

インチです。string - positive floating point, two decimal places / integer (inches)
misc1 - misc6注文に関連するその他のデータをZonos API経由で渡し、Zonos「orderDetail」APIサービスエンドポイントから返される注文データと一緒に取得するために使用します。string
referenceIdカート/セッションなどのシステム内で一意の参照識別値を渡すために使用します。Zonos「orderDetail」APIサービスエンドポイント経由でZonos注文IDを検索する際に使用できます。string
storeId

REQUIRED

Zonosから提供されるストアID。integer

追加の文字列データ型

  • items[index].itemDescriptionLong
  • items[index].itemDescriptionDetailed
  • items[index].itemFabricContent
  • items[index].itemColor
  • items[index].itemLtlClass
  • items[index].status
  • items[index].itemMaterial

割引、クーポン、プロモコード 

割引、クーポン、プロモコードをサーバーPOST経由でZonosに送信するには、パラメーター“unitPrice”に負の値、“nonShippable”:trueを設定した別の商品として渡す必要があります。

1{
2 "description": "Discount (10OFF) - 10% OFF",
3 "unitPrice": -15.5,
4 "quantity": 1,
5 "nonShippable": true
6}

HTTPSレスポンス

成功時のHTTPレスポンス

Message format: JSON

1{
2 "tempCartUUID": "826b8f22-0de6-4717-90c7-366def7d0782"
3}

レスポンスJSONの定義

fieldnotes
tempCartUUIDこのパラメーターには、顧客の国際カートに割り当てられ、Zonosシステム内で作成されたGUIDが含まれます。このフィールドは、ユーザーのブラウザをZonos Checkoutにリダイレクトする際にURLクエリstringパラメーターとして渡されます。

エラーHTTPレスポンス

Error codemeaning
400リクエストボディに予期しない文字が含まれています。
406Not Acceptable。「Accept」HTTPヘッダーが無効です。
415Unsupported media type。「Content-Type」HTTPヘッダーが無効です。
422Unprocessable entity。
500「storeId」が正しくないか、JSONボディを解析できませんでした。
1
2 
3
4 
5
6 
7Error 422 Unprocessable Entity
8 
9
10 
11
12 
13

HTTP ERROR 422

14 
15

16 Problem accessing /v2/createTempCart. Reason:
17
Unprocessable Entity
18 
19

20 
21

The request entity had the following errors:

22 
23
24 
25
  • items may not be empty (was null)
  • 26 
    27
  • items may not be null (was null)
  • 28 
    29
    30 
    31
    32 
    33

    Zonos Checkoutへのリダイレクト 

    tempCartUUIDを含む成功レスポンスを受信した後、サーバーは以下で説明する適切なURLクエリ文字列パラメーターとともに、顧客のブラウザからZonos Checkoutへリダイレクトを送信します。

    Example Redirect URL: https://[yourassignedsubdomain].iglobalstores.com/?tempCartUUID=826b8f22-0de6-4717-90c7-366def7d0782&country=CA

    Note: [yourassignedsubdomain] — Zonos.comサブドメインについては、Zonos実装チームの担当者にお問い合わせください。

    URLリクエストパラメーター

    fieldnotes
    tempCartUUID

    REQUIRED

    この値はZonos createTempCart APIサービスエンドポイントを呼び出すことで取得します。string / GUID
    country配送先国の2文字ISOコード。ユーザー体験のため、このパラメーターの送信を強く推奨します。countryパラメーターはZonos Checkout内で配送先国を事前選択します。サイトでZonos Hello JS(JavaScript)を使用している場合、JavaScriptメソッドzonos.country()を呼び出すことでこの値を取得できます。string (Length: 2)

    追加の文字列データ型

    • customerName
    • customerCompany
    • customerEmail
    • customerPhone
    • customerAltPhone
    • customerAddress1
    • customerAddress2
    • customerCity
    • customerState
    • customerZip

    このページは役に立ちましたか?