文档
测试

添加加价购商品

POST
AddPurchase

接口描述

添加加价购商品,用户选完加价购商品后,结算前请求本接口,每笔订单只可请求一次,/AddPurchase

请求头

参数名
类型
描述
必填
token
用户token
必填

请求参数

参数名
类型
描述
必填
id
string
订单id,示例:225951
必填
goods
array
数据列表
必填
id
string
示例:493
必填
spec
object
规格数组
必填
id
string
示例:1936
必填
type
string
示例:规格
必填
value
string
示例:欧氧清多效焕能修护安瓶液*2+桃丽丝水润裸感粉底液*1+欧氧清多重防护隔离乳(丁香紫)*1
必填
images
string
示例:
必填
stock
int
购买数量,示例:3
必填
price
string
示例:399.00
必填
original_price
string
示例:439.10
必填
title
string
示例:完美底妆套装(二)
必填
balance_deduct
是否余额抵扣(0或1)
可选
pay_password
余额抵扣则提交支付密码
可选

响应参数

参数名
类型
描述
必填
msg
string
示例:success
必填
code
int
示例:0
必填
data
object
数据字典
必填
add_purchase_number
int
成功添加加价购商品数量,示例:3
必填
total_price
int
添加加价购商品后订单总金额,示例:579.13
必填

说明 / 示例

请求示例: ```language { "id": "225951", "goods": [ { "id": "493", "spec": [ { "id": "1936", "type": "规格", "value": "欧氧清多效焕能修护安瓶液*2+桃丽丝水润裸感粉底液*1+欧氧清多重防护隔离乳(丁香紫)*1", "images": "", "stock": 3, "price": "399.00", "original_price": "439.10", "title": "完美底妆套装(二)" } ] }, { "id": "495", "spec": [ { "id": "1968", "type": "规格", "value": "粉底*1+防晒喷雾*2+美妆蛋*1", "images": "", "stock": 1, "price": "129.70", "original_price": "623.90", "title": "桃丽丝水润裸感粉底液*1+伊本冰爽美肌防雾霾防护喷雾*2+美妆蛋*1" } ] } ] } ``` 返回示例: ```language { "msg": "success", "code": 0, "data": { "add_purchase_number": 3, "total_price": 579.13 } } ```