ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# 订单接口 #### 1.生成订单 ``` <pre class="calibre14">``` post:/index.php?ctl=Buyer_Order&met=addOrder&typ=json *string:receiver_name#收货人姓名 *string:receiver_address#收货地址 *string:receiver_phone#收货人电话 string:invoice#发票信息 int:invoice_id#发票id string:invoice_title#发票抬头 string:invoice_content#发票内容 *row:cart_id#购物车id *row:shop_id#店铺id row:remark#备注 row:increase_arr#加价购商品 row:voucher_id#使用的代金券id string:redpacket_id#使用的红包id *int:pay_way_id#支付方式id 1-在线支付 2-货到付款 *int:address_id#收货地址id string:from#订单来源 <<< success {"cmd_id":-140,"status":200,"msg":"success","data":{"uorder":合并支付订单}} <<< error {"cmd_id":-140,"status":250,"msg":"failure","data":{}} ``` ``` #### 2.商家发货 ``` <pre class="calibre14">``` post:/index.php?ctl=Seller_Trade_Order&met=send&typ=json *string:order_id#订单号 *int:order_shipping_code#物流单号 *int:order_shipping_express_id#物流公司id string:order_shipping_message#发货备忘 string:order_seller_message#给买家留言 <<< success {"cmd_id":-140,"status":200,"msg":"success","data":{}} <<< error {"cmd_id":-140,"status":250,"msg":"failure","data":{}} ``` ``` #### 3.确认收货 ``` <pre class="calibre14">``` post:/index.php?ctl=Buyer_Order&met=confirmOrder&typ=json *string:order_id#订单号 <<< success {"cmd_id":-140,"status":200,"msg":"success","data":{}} <<< error {"cmd_id":-140,"status":250,"msg":"failure","data":{}} ``` ``` #### 4.评价订单 ``` <pre class="calibre14">``` get:/index.php?ctl=Goods_Evaluation&met=addGoodsEvaluation&typ=json *int:package_scores=5#描述相符 *int:send_scores=5#发货速度 *int:service_scores=5#服务态度 *int:isanonymous#是否匿名 0-不匿名 1-匿名 *row:evaluation#商品评价信息 <<< success {cmd_id: -140, status: 200, msg: 1, data: Object} <<< error {cmd_id: -140, status: 250, msg: 1, data: Object} ``` ``` #### 5.追加评价订单 ``` <pre class="calibre14">``` get:/index.php?ctl=Goods_Evaluation&met=againGoodsEvaluation&typ=json *int:goods_scores#商品评价 *string:result#评价结果 good,neutral,bad *string:content#评论内容 *string:evaluate_img#晒图 *int:isanonymous=0#是否匿名 0-不匿名 1-匿名 <<< success {"cmd_id":-140,"status":200,"msg":"success","data":{}} <<< error {"cmd_id":-140,"status":250,"msg":"failure","data":{}} ``` ``` #### 6.取消订单 ``` <pre class="calibre14">``` post:/index.php?ctl=Buyer_Order&met=orderCancel&typ=json *string:order_id#订单id *string:state_info#取消原因 *string:state_info1#其他取消原因 <<< success {"cmd_id":-140,"status":200,"msg":"success","data":{}} <<< error {"cmd_id":-140,"status":250,"msg":"failure","data":{}} ``` ``` #### 7.买家申请退款退货 ``` <pre class="calibre14">``` post:/index.php?ctl=Buyer_Service_Return&met=addReturn&typ=json *string:order_id#订单id *int:goods_id#订单商品id string:return_message#"退款/退货"说明 int:return_reason_id#"退款/退货"原因id int:nums#"退款/退货"商品数量 <<< success {"cmd_id":-140,"status":200,"msg":"success","data":{}} <<< error {"cmd_id":-140,"status":250,"msg":"failure","data":{}} ``` ``` #### 8.商家审核退款退货 ``` <pre class="calibre14">``` post:/index.php?ctl=Seller_Service_Return&met=agreeReturn&typ=json *string:order_return_id#退单id string:return_shop_message#商家处理备注 <<< success {"cmd_id":-140,"status":200,"msg":"success","data":{}} <<< error {"cmd_id":-140,"status":250,"msg":"failure","data":{}} ``` ``` #### 9.平台审核退款退货 ``` <pre class="calibre14">``` post:/index.php?ctl=Api_Trade_Return&met=agree&typ=json *string:order_return_id#退单id string:return_platform_message#处理备注 <<< success {"cmd_id":-140,"status":200,"msg":"success","data":{"rs":处理结果}} <<< error {"cmd_id":-140,"status":250,"msg":"failure","data":{}} ``` ``` #### 10.实物订单列表与订单详情 ``` <pre class="calibre14">``` get:/index.php?ctl=Buyer_Order&met=physical&typ=json string:act#操作标识 details:订单详情 string:order_id#订单id <<< success cmd_id : -140 status:200 msg:"success" data { page:当前页数 total:共计页数 totalsize:记录总数 items { 0 { order_id:订单id shop_id:店铺id shop_name:店铺名称 buyer_user_id:买家id buyer_user_name:买家名称 seller_user_id:卖家id seller_user_name:卖家名称 order_date:订单生成日期 年-月-日 order_create_time:订单生成日期 年-月-日 时:分:秒 order_receiver_name:收货人姓名 order_receiver_address:收货地址 order_receiver_contact:收货人联系电话 order_receiver_date:收货时间(最晚收货时间) payment_id:支付方式id payment_name:支付方式名称 payment_time:支付时间 payment_number:订单支付单号 payment_other_number:最终支付单号 order_seller_name:发货人名称 order_seller_address:发货人地址 order_seller_contact:发货人联系电话 order_shipping_time:发货时间 order_shipping_express_id:物流公司id order_shipping_code:物流单号 order_shipping_message:卖家备注 order_finished_time:订单完成时间 order_invoice:发票信息 order_invoice_id:发票id order_goods_amount:商品总价格(不包含运费) order_payment_amount:应付金额(商品支付金额+运费) order_discount_fee:优惠价格 order_point_fee:买家使用积分 order_shipping_fee:运费 order_buyer_evaluation_status:买家评价状态 0-未评价 1-已评价 order_buyer_evaluation_time:买家评价时间 order_seller_evaluation_status:卖家评价状态 0-未评价 1-已评价 order_seller_evaluation_time:卖家评价时间 order_message:订单留言 order_status:订单状态 order_points_add:订单赠送积分 voucher_id:代金券id voucher_price:代金券面额 voucher_code:代金券编码 order_refund_status:退款状态:0-无退款 1-退款中 2-退款完成 order_return_status:退货状态:0-无退货 1-退货中 2-退货完成 order_refund_amount:退款金额 order_return_num:退货数量 order_from:订单来源 1-pc 2-wap order_commission_fee:交易佣金 order_commission_return_fee:交易佣金退款 order_is_virtual:虚拟订单 order_virtual_code:虚拟商品兑换码 order_virtual_use:虚拟商品是否使用 0-未使用 1-已使用 order_shop_hidden:卖家删除 order_buyer_hidden:买家删除 order_subuser_hidden:主管账号删除 order_cancel_identity:订单取消者 1-买家 2-卖家 3-系统 order_cancel_reason:订单取消原因 order_cancel_date:订单取消时间 order_shop_benefit:订单取消时间 chain_id:门店id order_seller_message:卖家给买家留言 directseller_flag:是否是分佣订单 directseller_p_id:推广员上级 redpacket_code:红包编码 redpacket_price:红包金额 order_rpt_price:红包抵扣金额 order_rpt_return:红包退还金额 order_settlement_time:订单结算时间 order_is_settlement:订单是否结算 0-未结算 1-已结算 shop_distributor_id:分销商 order_distribution_seller_type:SO订单分销类型 1:直销(E) 2:分销代销转发销售(P, SP) order_distribution_buyer_type:PO订单类型 1:购买(E采购,SP:代销采购) 2:分销采购,代客下单 (P开头) order_source_id:源订单Id(P开头):SP开头订单对应的P开头订单 directseller_gp_id:推广员上级的上级 directseller_id:推广员上级的上级 directseller_is_settlement:推广员 district_id:所在地 order_sub_pay:0-自己支付 1-主管账号支付 order_sub_user:付款主管账号id order_directseller_commission:分销员三级总佣金 directseller_discount:等级折扣金额 id:主键 express_name:快递公司名称 order_state_con:订单状态 order_refund_status_con:订单退款状态 shop_names:店铺名称 complain_day:交易投诉的有效时间 complain_status:投诉状态 0-不可投诉 1-不可投诉 goods_list: { 0 { order_goods_id:订单商品id order_id:订单id goods_id:商品id common_id:商品common_id buyer_user_id:买家id goods_name:商品名称 goods_class_id:商品对应的类目id spec_id:规格id order_spec_info:规格描述 goods_price:商品价格 order_goods_num:订单商品数量 goods_image:商品图片 order_goods_returnnum:退货数量 order_goods_amount:商品实付金额 order_goods_discount_fee:优惠金额 order_goods_payment_amount:实付金额 order_goods_adjust_fee:手工调整金额 order_goods_point_fee:积分费用 order_goods_commission:订单商品的佣金(总) shop_id:店铺id order_goods_status:订单状态 order_goods_evaluation_status:订单商品评价状态 0-未评价 1-已评价 order_goods_benefit:订单商品优惠 goods_return_status:退款状态 0-无退款 1-退款中 2-退款完成 3-商家拒绝退款 goods_refund_status:退货状态 0-无退货 1-退货中 2-退货完成 3-商家拒绝退货 order_goods_time:时间 directseller_flag:是否参与分销 directseller_id:推广销售员-订单 directseller_is_settlement:分销佣金是否结算 0-未结算 1-已结算 directseller_commission_0:直属一级分佣 directseller_commission_1:直属二级分佣 directseller_commission_2:直属三级分佣 directseller_goods_discount:等级折扣金额 order_goods_source_id:SP订单号 order_goods_source_ship:供应商物流 order_goods_finish_time:订单商品完成时间 id:主键 evaluation_count:评价数 goods_refund_status_con:退货状况 goods_return_status_con:退款状况 order_refund_id:退货id order_return_id:退款id } evala_status:订单评价状态,1表示待评价,2表示已评价待追加评价,3表示查看评价 } <<< error cmd_id : -140 status:250 msg:"failure" data{} ``` ``` #### 11.删除订单 此处的删除订单只是改变订单的显示状态,使其不显示 ``` <pre class="calibre14">``` get:/index.php?ctl=Buyer_Order&met=hideOrder&typ=json *string:order_id#订单id user#删除者身份 op#操作类型 ,当值为del时表示彻底删除订单 <<< success {"cmd_id":-140,"status":200,"msg":"success","data":{}} <<< error {"cmd_id":-140,"status":250,"msg":"failure","data":{}} ``` ``` #### 12.还原回收站中的订单 ``` <pre class="calibre14">``` get:/index.php?ctl=Buyer_Order&met=restoreOrder&typ=json *string:order_id#订单id user#操作者身份 <<< success {"cmd_id":-140,"status":200,"msg":"success","data":{}} <<< error {"cmd_id":-140,"status":250,"msg":"failure","data":{}} ``` ``` #### 13.采购单列表与详情 ``` <pre class="calibre15">``` get:index.php?ctl=Buyer_Order&met=subPhysical&typ=json string:act:操作 order_id#需要查看详情的订单id name#说明文字 <<< success <<< error ``` ```