探索创建结账所涉及的关键/值对。
此API端点用于向Zonos API发送来自客户购物车的购物车信息和项目。
您将收到一个JSON响应,其中包含一个 tempCartUUID,这是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
REQUIRED
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 的成功响应后,您的服务器将从客户的浏览器发送重定向到Zonos Checkout,并使用下面涵盖的适当URL查询字符串参数。
重定向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发送来自客户购物车的购物车信息和项目。
您将收到一个JSON响应,其中包含一个
tempCartUUID,这是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 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 Checkout。错误HTTP响应
HTTP ERROR 422
Problem accessing /v2/createTempCart. Reason:The request entity had the following errors:
重定向到Zonos Checkout
收到包含
tempCartUUID的成功响应后,您的服务器将从客户的浏览器发送重定向到Zonos Checkout,并使用下面涵盖的适当URL查询字符串参数。URL请求参数
tempCartUUIDREQUIRED
createTempCartAPI服务端点获得。string / GUIDcountrycountry参数将在Zonos Checkout内预选目标国家。使用Zonos Hello JS(JavaScript)在网站上时,您可以通过调用JavaScript方法获得此值:zonos.country()。string(长度: 2)其他字符串数据类型
customerNamecustomerCompanycustomerEmailcustomerPhonecustomerAltPhonecustomerAddress1customerAddress2customerCitycustomerStatecustomerZip这个页面有帮助吗?