- 评论
- souring相关
- 站点->sourcing
- 购物车 -> 购物车
- 个人中心->订单管理
- 产品->详情
- 订单 -> 订单
- 站点->支付方式
- 产品搜索->列表
- 购物车 -> 结算
- 商品详情->激光定制
- 商品定制
- 多买多奖
加购购物车
POST
/st-cart/cart/add
请求参数
Body 参数application/json
pageNum
integer
可选
默认值:
1
pageSize
integer
可选
默认值:
500
scanToAdd
integer
可选
默认值:
0
type
integer
可选
appCartKey
string
可选
selectAll
integer
可选
deleteAll
integer
删除全部有效商品
deleteInvalidAll
integer
可选
skuInfoList
array[object (CartSkuInfoParam) {11}]
购物车信息
默认值:
new ArrayList<>()
cartId
integer
主键
number
integer
用户购买的数量
selected
integer
是否选中了该商品
sku
string
sku
price
number
sku的价格
spu
string
spu
type
integer
类型
weight
number
weight
cartQty
integer
可选
scanToAdd
integer
可选
date
string
可选
moveToWhishAll
integer
全部移到心愿单
spuList
array[string]
查询的spu
spu
string
可选
sourceSpu
string
可选
加购来源商品spu
skuList
array[string]
可选
sourceKeyword
string
埋点用
sourcePage
string
可选
sourceType
string
可选
utmInfo
string
可选
pointUid
string
可选
referrerUrl
string
可选
logToken
string
可选
customerId
integer
可选
iso2
string
可选
platform
string
可选
appVersion
string
可选
SalesProhibitionSkuList
array[string]
可选
默认值:
new ArrayList<>()
queryMxCount
integer
可选
默认值:
0
freeShipAll
integer
可选
sensorsPublicParam
object (SensorsPublicParam)
神策埋点需要
formerPageUrl
string
前向来源链接
formerFirstLevelPage
string
前向一级页面
visitorTypes
string
新老访客类型
formerModuleId
string
前向模块id
formerMktId
string
前向模块下内容id
currentPageTitle
string
当前页面名称
shipToCountry
string
shipTo国家
spm
string
spm字段
bhvType
string
行为类型
isLogin
boolean
是否登录
pushExternalBatchId
string
可选
eventAttributionProperties
object (JSONObject)
aws需要参数
key
object (key)
可选
normalConfirm
integer
可选
默认值:
0
filterLabel
integer
可选
用于购物车数据过滤
supplierGroup
boolean
可选
用于按照供应商分组
supplierCode
string
可选
用于按照供应商分组
labelList
array[integer]
可选
默认值:
new ArrayList<>()
pushExternalBatchId
string
可选
示例
{
"pageNum": 1,
"pageSize": 500,
"scanToAdd": 0,
"type": 0,
"appCartKey": "string",
"selectAll": 0,
"deleteAll": 0,
"deleteInvalidAll": 0,
"skuInfoList": "new ArrayList<>()",
"moveToWhishAll": 0,
"spuList": [
"string"
],
"spu": "string",
"sourceSpu": "string",
"skuList": [
"string"
],
"sourceKeyword": "string",
"sourcePage": "string",
"sourceType": "string",
"utmInfo": "string",
"pointUid": "string",
"referrerUrl": "string",
"logToken": "string",
"customerId": 0,
"iso2": "string",
"platform": "string",
"appVersion": "string",
"SalesProhibitionSkuList": "new ArrayList<>()",
"queryMxCount": 0,
"freeShipAll": 0,
"sensorsPublicParam": {
"formerPageUrl": "string",
"formerFirstLevelPage": "string",
"visitorTypes": "string",
"formerModuleId": "string",
"formerMktId": "string",
"currentPageTitle": "string",
"shipToCountry": "string",
"spm": "string",
"bhvType": "string",
"isLogin": true,
"pushExternalBatchId": "string"
},
"eventAttributionProperties": {
"key": {}
},
"normalConfirm": 0,
"filterLabel": 0,
"supplierGroup": true,
"supplierCode": "string",
"labelList": "new ArrayList<>()",
"pushExternalBatchId": "string"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://www.nihaocloud.cn/st-cart/cart/add' \
--header 'Content-Type: application/json' \
--data-raw '{
"pageNum": 1,
"pageSize": 500,
"scanToAdd": 0,
"type": 0,
"appCartKey": "string",
"selectAll": 0,
"deleteAll": 0,
"deleteInvalidAll": 0,
"skuInfoList": "new ArrayList<>()",
"moveToWhishAll": 0,
"spuList": [
"string"
],
"spu": "string",
"sourceSpu": "string",
"skuList": [
"string"
],
"sourceKeyword": "string",
"sourcePage": "string",
"sourceType": "string",
"utmInfo": "string",
"pointUid": "string",
"referrerUrl": "string",
"logToken": "string",
"customerId": 0,
"iso2": "string",
"platform": "string",
"appVersion": "string",
"SalesProhibitionSkuList": "new ArrayList<>()",
"queryMxCount": 0,
"freeShipAll": 0,
"sensorsPublicParam": {
"formerPageUrl": "string",
"formerFirstLevelPage": "string",
"visitorTypes": "string",
"formerModuleId": "string",
"formerMktId": "string",
"currentPageTitle": "string",
"shipToCountry": "string",
"spm": "string",
"bhvType": "string",
"isLogin": true,
"pushExternalBatchId": "string"
},
"eventAttributionProperties": {
"key": {}
},
"normalConfirm": 0,
"filterLabel": 0,
"supplierGroup": true,
"supplierCode": "string",
"labelList": "new ArrayList<>()",
"pushExternalBatchId": "string"
}'
返回响应
🟢200成功
application/json
Body
boolean
可选
示例
false
修改于 2025-05-22 06:16:33