属性
リクエストボディ内のJSONキー/値ペア
POST https://api.iglobalstores.com/v1/createTempCart
| field↕ | notes↕ |
|---|---|
boxCount | Example 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. |
contShoppingURL | Zonos 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 |
footerHTML | URLエンコードされた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]itemCustomization | Zonos 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].itemDescriptionLongitems[index].itemDescriptionDetaileditems[index].itemFabricContentitems[index].itemColoritems[index].itemLtlClassitems[index].statusitems[index].itemMaterial
割引、クーポン、プロモコード
割引、クーポン、プロモコードをサーバーPOST経由でZonosに送信するには、パラメーター“unitPrice”に負の値、“nonShippable”:trueを設定した別の商品として渡す必要があります。
1
{2
"description": "Discount (10OFF) - 10% OFF",3
"unitPrice": -15.5,4
"quantity": 1,5
"nonShippable": true6
}HTTPSレスポンス
成功時のHTTPレスポンス
Message format: JSON
1
{2
"tempCartUUID": "826b8f22-0de6-4717-90c7-366def7d0782"3
}レスポンスJSONの定義
| field↕ | notes↕ |
|---|---|
tempCartUUID | このパラメーターには、顧客の国際カートに割り当てられ、Zonosシステム内で作成されたGUIDが含まれます。このフィールドは、ユーザーのブラウザをZonos Checkoutにリダイレクトする際にURLクエリstringパラメーターとして渡されます。 |
エラーHTTPレスポンス
| Error code↕ | meaning↕ |
|---|---|
| 400 | リクエストボディに予期しない文字が含まれています。 |
| 406 | Not Acceptable。「Accept」HTTPヘッダーが無効です。 |
| 415 | Unsupported media type。「Content-Type」HTTPヘッダーが無効です。 |
| 422 | Unprocessable entity。 |
| 500 | 「storeId」が正しくないか、JSONボディを解析できませんでした。 |
1
2
3
4
5
6
7
Error 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リクエストパラメーター
| field↕ | notes↕ |
|---|---|
tempCartUUID REQUIRED | この値はZonos createTempCart APIサービスエンドポイントを呼び出すことで取得します。string / GUID |
country | 配送先国の2文字ISOコード。ユーザー体験のため、このパラメーターの送信を強く推奨します。countryパラメーターはZonos Checkout内で配送先国を事前選択します。サイトでZonos Hello JS(JavaScript)を使用している場合、JavaScriptメソッドzonos.country()を呼び出すことでこの値を取得できます。string (Length: 2) |
追加の文字列データ型
customerNamecustomerCompanycustomerEmailcustomerPhonecustomerAltPhonecustomerAddress1customerAddress2customerCitycustomerStatecustomerZip
チェックアウトの作成
チェックアウト作成に関わるキー/値ペアを確認します。
このAPIエンドポイントは、顧客のカートから商品情報とカート内容をZonos APIに送信するために使用します。
JSONレスポンスには
tempCartUUID(Zonosシステム内の一意のカート識別子)が含まれます。これを使用して、顧客をZonos Checkoutにリダイレクトし、注文を完了します。