備註:[yourassignedsubdomain] - 請聯絡您的 Zonos 實施團隊成員以接收您的 Zonos.com 子網域。
URL 要求參數
欄位↕
備註↕
tempCartUUID
REQUIRED
此值是通過呼叫 Zonos createTempCart API 服務端點取得的。string / GUID
country
目的地國家/地區的兩個字母的 ISO 代碼。我們強烈建議傳遞此參數以改進使用者體驗。country 參數將在 Zonos 結帳內預先選擇目的地國家/地區。當在網站上使用 Zonos Hello JS (JavaScript) 時,您可以透過呼叫 JavaScript 方法取得此值:zonos.country()。string (Length: 2)
建立結帳
建立結帳
瞭解建立結帳所涉及的鍵值對。
此 API 端點用於將客戶購物車中的購物車資訊及商品傳送至 Zonos API。
您將收到一份 JSON 回應,其中包含
tempCartUUID,這是 Zonos 系統中的唯一購物車識別碼。此識別碼將用於將客戶重新導向至 Zonos 結帳,以完成訂單。屬性
請求本文中的 JSON 鍵值對
POST
https://api.iglobalstores.com/v1/createTempCartboxCount格式:逗號分隔的箱子尺寸和數量清單。在上述範例中,共有 4 個箱子。清單中的第一個箱子長 22 英寸、寬 15 英寸、高 15 英寸。該尺寸只有一個箱子。有兩個尺寸為 8x8x4 英寸的箱子。如果對您來說比較便利,可以多次傳遞相同的箱子尺寸,例如:"22x15x15(1),22x15x15(1)",表示 2 個尺寸為 22x15x15 英寸的箱子。此欄位說明將用於運送訂單的箱子。雖然商家在訂單時間可能不知道此資訊,但如果知道,可以以
string格式傳遞。contShoppingURLstringdomesticShippingChargepositive floating point, two decimal placesexternalConfirmationPageURLstringfooterHTMLURL encoded stringitemsREQUIRED
JSON stringitems[index].countryOfOriginstringitems[index].descriptionREQUIRED
stringitems[index].heightREQUIRED
string - positive floating point, two decimal places / integer (inches)items[index].imageURLREQUIRED
string / HTTPS URLitems[index]itemBrandstringitems[index]itemCategory範例值:"shoes" 或 "shoes|sport-shoes|discount-shoes"
stringitems[index]itemCustomizationitems[index]itemHSCode範例值:"3926901000" 或 "3926.90.1000"
stringitems[index].itemURLstring / URLitems[index].lengthREQUIRED
string - positive floating point, two decimal places / integer (inches)items[index].nonShippableboolean: true or falseitems[index].productIdstringitems[index].quantityREQUIRED
stringitems[index].skustringitems[index].unitPriceREQUIRED
positive floating point, two decimal places / integeritems[index].weightitems[index].itemWeightUnits中傳遞其他重量單位string - positive floating point, two decimal places / integeritems[index].weightUnitsstring - "LB", "OZ", "KG", or "G"items[index].widthREQUIRED
string - positive floating point, two decimal places / integer (inches)misc1 - misc6stringreferenceIdstringstoreIdREQUIRED
integer其他字串資料類型
items[index].itemDescriptionLongitems[index].itemDescriptionDetaileditems[index].itemFabricContentitems[index].itemColoritems[index].itemLtlClassitems[index].statusitems[index].itemMaterial折扣、優惠券和促銷代碼
若要透過伺服器 post 將折扣、優惠券和促銷代碼傳送至 Zonos,必須以單獨項目的形式傳遞,並為
"unitPrice"和"nonShippable":true參數使用負值。{"description": "Discount (10OFF) - 10% OFF","unitPrice": -15.5,"quantity": 1,"nonShippable": true}HTTPS 回應
成功 HTTP 回應
訊息格式:JSON
{"tempCartUUID": "826b8f22-0de6-4717-90c7-366def7d0782"}回應 JSON 定義
tempCartUUIDstring參數傳遞,同時將使用者的瀏覽器重新導向至 Zonos 結帳。錯誤 HTTP 回應
HTTP ERROR 422
Problem accessing /v2/createTempCart. Reason:The request entity had the following errors:
重新導向至 Zonos 結帳
收到包含
tempCartUUID的成功回應後,您的伺服器會從客戶的瀏覽器傳送重新導向至 Zonos 結帳,其中包含下述涵蓋的適當 URL 查詢字串參數。URL 要求參數
tempCartUUIDREQUIRED
createTempCartAPI 服務端點取得的。string / GUIDcountrycountry參數將在 Zonos 結帳內預先選擇目的地國家/地區。當在網站上使用 Zonos Hello JS (JavaScript) 時,您可以透過呼叫 JavaScript 方法取得此值:zonos.country()。string(Length: 2)其他字串資料類型
customerNamecustomerCompanycustomerEmailcustomerPhonecustomerAltPhonecustomerAddress1customerAddress2customerCitycustomerStatecustomerZip這個頁面有幫助嗎?