探索建立結帳所涉及的鍵值對。
此 API 端點用於將購物車資訊和客戶購物車中的商品發送至 Zonos API。
您將收到包含 tempCartUUID 的 JSON 回應,這是 Zonos 系統中的唯一購物車識別碼。這將用於將客戶重定向到 Zonos Checkout,以完成訂單。
tempCartUUID
POST https://api.iglobalstores.com/v1/createTempCart
https://api.iglobalstores.com/v1/createTempCart
boxCount
string
contShoppingURL
domesticShippingCharge
positive floating point, two decimal places
externalConfirmationPageURL
footerHTML
URL encoded string
items
必填
JSON string
items[index].countryOfOrigin
items[index].description
items[index].height
string - positive floating point, two decimal places / integer (inches)
items[index].imageURL
string / HTTPS URL
items[index]itemBrand
items[index]itemCategory
items[index]itemCustomization
items[index]itemHSCode
items[index].itemURL
string / URL
items[index].length
items[index].nonShippable
boolean: true or false
items[index].productId
items[index].quantity
items[index].sku
items[index].unitPrice
positive floating point, two decimal places / integer
items[index].weight
items[index].itemWeightUnits
string - positive floating point, two decimal places / integer
items[index].weightUnits
string - "LB", "OZ", "KG", or "G"
items[index].width
misc1 - misc6
referenceId
storeId
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 傳入負值。
"unitPrice"
"nonShippable":true
{
"description": "Discount (10OFF) - 10% OFF",
"unitPrice": -15.5,
"quantity": 1,
"nonShippable": true
}
成功的 HTTP 回應
訊息格式:JSON
"tempCartUUID": "826b8f22-0de6-4717-90c7-366def7d0782"
Error 422 Unprocessable Entity
HTTP ERROR 422
Problem accessing /v2/createTempCart. Reason:
Unprocessable Entity
The request entity had the following errors:
items may not be empty (was null)
items may not be null (was null)
收到包含 tempCartUUID 的成功回應後,您的伺服器將從客戶的瀏覽器向下面涵蓋的相應 URL 查詢字串參數的 Zonos Checkout 發送重定向。
重定向 URL 範例:https://[yourassignedsubdomain].iglobalstores.com/?tempCartUUID=826b8f22-0de6-4717-90c7-366def7d0782&country=CA
備註:[yourassignedsubdomain] - 聯絡您的 Zonos 實施團隊成員以取得您的 Zonos.com 子網域。
createTempCart
string / GUID
country
zonos.country()
customerName
customerCompany
customerEmail
customerPhone
customerAltPhone
customerAddress1
customerAddress2
customerCity
customerState
customerZip
建立結帳
建立結帳
探索建立結帳所涉及的鍵值對。
此 API 端點用於將購物車資訊和客戶購物車中的商品發送至 Zonos API。
您將收到包含
tempCartUUID的 JSON 回應,這是 Zonos 系統中的唯一購物車識別碼。這將用於將客戶重定向到 Zonos Checkout,以完成訂單。屬性
請求正文中的 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 stringitems必填
JSON stringitems[index].countryOfOriginstringitems[index].description必填
stringitems[index].height必填
string - positive floating point, two decimal places / integer (inches)items[index].imageURL必填
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].length必填
string - positive floating point, two decimal places / integer (inches)items[index].nonShippableboolean: true or falseitems[index].productIdstringitems[index].quantity必填
stringitems[index].skustringitems[index].unitPrice必填
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].width必填
string - positive floating point, two decimal places / integer (inches)misc1 - misc6stringreferenceIdstringstoreId必填
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 Checkout 時傳入。錯誤 HTTP 回應
HTTP ERROR 422
Problem accessing /v2/createTempCart. Reason:The request entity had the following errors:
重定向至 Zonos Checkout
收到包含
tempCartUUID的成功回應後,您的伺服器將從客戶的瀏覽器向下面涵蓋的相應 URL 查詢字串參數的 Zonos Checkout 發送重定向。URL 請求參數
tempCartUUID必填
createTempCartAPI 服務端點取得。string / GUIDcountrycountry參數將在 Zonos Checkout 內預選目的地國家。使用網站上的 Zonos Hello JS (JavaScript) 時,您可以呼叫 JavaScript 方法來取得此值:zonos.country()。string(Length: 2)其他字串資料型別
customerNamecustomerCompanycustomerEmailcustomerPhonecustomerAltPhonecustomerAddress1customerAddress2customerCitycustomerStatecustomerZip這個頁面有幫助嗎?