V1/cart/update

来自技术开发小组内部wiki
跳转至: 导航搜索

功能说明

整体更新用户的购物车数据

URL

http://[域名]/v1_5/cart/update

返回格式

支持json,xml.通过format参数来控制

HTTP请求方式

POST.可以post的数据为xml或json.

输入参数说明

参数名称 是否必须 类型 描述
uid string 用户uid
cartinfo string 购物车数据,json格式

请求示例

http://api.fumubang.com/v1_5/cart/update

uid=xxxxxxxx&cartinfo=示例代码1 
示例代码1
{
    
        "listTicketes": 
        [//票种列表
        {
          "cart_id": 12222,//购物车id
          "count": 1, //票种的购买数量
          "optype","del/update"    //del 代表要删除这个票种,update 代表要修改这个票种的数量. del优先
          
        }
        ]
}

参数用POST方式提交

返回方式说明

xml或json

正确返回说明

 <status>success</status>成功返回状态

错误返回示例

参数不全

<error_code>300000</error_code>
<error_msg>错误说明</error_msg>