7x9小时
9:00am - 6:00pm
免费售前热线
13338363507
其它接入
客服接入
API指南
SDK用法
线上订单接口
/** 
 * 获得线上订单的明细
 * @param  integer $lastGetPayTime 上次拉取的时间点,这个时间点之后的付款记录会出现在这里 
 * @param  integer $lastRefundTime 上次拉取的时间点,这个时间点之后的退款记录会出现在这里
 * 返回字段说明:
    {
        "errNum":0,
        // 本次返回的支付订单数量
        "payOrdersTotal":"1",
        // 本次返回的退款订单数量
        "refundOrdersTotal":"1",  
        // 本次返回的支付订单列表(单次返回条数20条)
        "payOrdersList": [
        {
            // 订单id
            "id": "90",
            // 商品id
            "gId": null,
            // 单条状态0未使用 1已使用 2 申请退款 3退款成功 4未支付  5已关闭  6已接收,等待扣款  7支付失败(其他原因,如银行返回失败) 8已取消
            "status": "0",
            // 订单的最终价格
            "price": "0.01",
            // 实付的金额
            "cash_fee": null,
            // 订单类型:6:多人拼团,7:产品,23购物车,88:预约服务项目的订单,89积分兑换订单;101退款订单,102充值订单,103企业付款到客户零钱包的订单,104:开卡订单,105:卡续费订单,106:代表店内收银的时候的储值卡充值
            "trade_type": 7,
            // 支付方式:7:微信, 8:账户余额
            "pay_type": "7",
            // 预约订单的时候表示预计到达的时间
            "arrived_at": null,
            // 执行数量
            "excute_num": "0",
            // 未执行数量
            "un_excute_num": "1",
            // 购买时间
            "buyTime": "2019-11-29 14:43:30",
            // 退款时间
            "refundTime": null,
            // 配送的时候的快递地址 
            格式是:客户名字$$客户手机号$$省-市-区,详细地址
            "deliveryAddress": "黄清$$13681622249$$北京市-北京市-西城区,烘焙原料",
            "deliveryAddressInfo":
            {   // 顾客名字
                "cusName": "黄清",
                // 顾客电话
                "cusTel": "13681622249",
                // 省(或直辖市)
                "province": "北京市",
                // 市(或直辖市)
                "city": "北京市",
                // 区
                "region": "西城区",
                // 详细地址
                "address": "烘焙原料"
            },               
            // 自取联系方式
            "selfTakeContact": "15105961111",
            // 自取人姓名
            "selfTakeUserName": "",
            // 顾客的订单备注
            "comment": "",
            // 0:到店自取,1:店铺配送
            "getGoodMethod": "0",
            "finally_pay": 0,
            // 本订单涉及的商品
            "details": [
            {
                // 发货时的$detailIds使用的是该id            
                "id": "22",
                "teamId": "demo",
                "bill_id": "90",
                "good_id": "10029",
                "price": "0",
                "num": "1",
                "sku_id": null,
                "sku_id_2": null,
                "sku_id_3": null,
                "sku_name": "\u9ed1\u8272 ",
                "sku_info": null,
                "create_time": "2019-11-29 14:42:12",
                "use_time": null,
                "handle_user_id": null,
                "user_id": null,
                "handle_customer_id": null,
                "good":
                {
                    // 商品id
                    "id": "10029",
                    // 商品名称
                    "name": "商品",
                    "finally_pay": "0.00"
                },
                // 如果涉及到选择某个商品的某个sku,这里显示sku信息
                "skuOption":
                {
                    // 这个是商品,sku_1,sku_2,sku_3的组合ID,在商品编辑后台可以查看该ID
                    "id": "28",
                    "teamId": "demo",
                    "good_id": "10029",
                    "sku_1": "10",
                    "sku_2": null,
                    "sku_3": null,
                    "option_status": "1",
                    "create_time": "2020-07-09 10:32:36",
                    "original_price": "1",
                    "sale_price": "98",
                    "finally_pay": "0",
                    "stock": "9",
                    "sale_num": "0",
                    "base_sale_num": "11",
                    "cost": "0",
                    "picture": "",
                    "name": "1",
                    "sku_id": "10"
                }
            }]
        }],
        // 本次返回的退款订单列表(单次返回条数20条)
        "refundOrdersList": [
        {
            // 订单id
            "id": "90",
            // 商品id
            "gId": null,
            // 单条状态0未使用 1已使用 2 申请退款 3退款成功 4未支付  5已关闭  6已接收,等待扣款  7支付失败(其他原因,如银行返回失败) 8已取消
            "status": "0",
            // 订单的最终价格
            "price": "0.01",
            // 实付的金额
            "cash_fee": null,
            // 订单类型:6:多人拼团,7:产品,23购物车,88:预约服务项目的订单,89积分兑换订单;101退款订单,102充值订单,103企业付款到客户零钱包的订单,104:开卡订单,105:卡续费订单,106:代表店内收银的时候的储值卡充值
            "trade_type": 7,            
            // 支付方式:7:微信, 8:账户余额
            "pay_type": "7",
            // 预约订单的时候表示预计到达的时间
            "arrived_at": null,
            // 执行数量
            "excute_num": "0",
            // 未执行数量
            "un_excute_num": "1",
            // 购买时间
            "buyTime": "2019-11-29 14:43:30",   
            // 退款时间         
            "refundTime": "2019-12-13 16:43:36",
            // 配送的时候的快递地址 
               格式是:客户名字$$客户手机号$$省-市-区,详细地址
               举例: 廖良斌$$1303881211$$福建省-厦门市-集美区,软三企雀科技            
            "deliveryAddress": null,
            "selfTakeContact": null,
            "selfTakeUserName": null,
            "comment": "123456",
            "getGoodMethod": "0",
            "finally_pay": 0,
            "details": [
            {
                // 发货时的$detailIds使用的是该id
                "id": "119",
                "teamId": "demo",
                "bill_id": "176",
                "good_id": "10043",
                "price": "0",
                "num": "1",
                "sku_id": "10",
                "sku_id_2": null,
                "sku_id_3": null,
                "sku_name": "1",
                "sku_info": null,
                "create_time": "2019-12-13 16:42:06",
                "use_time": null,
                "handle_user_id": null,
                "user_id": null,
                "handle_customer_id": null,
                // 商品信息
                "good":
                {
                    "id": "10043",
                    "name": "\u8587\u989c\u5361",
                    "finally_pay": "0.00"
                },
                // 如果涉及到选择某个商品的某个sku,这里显示sku信息
                "skuOption":
                {
                    // 这个是商品,sku_1,sku_2,sku_3的组合ID,在商品编辑后台可以查看该ID
                    "id": "8",
                    "teamId": "demo",
                    "good_id": "10043",
                    "sku_1": "10",
                    "sku_2": null,
                    "sku_3": null,
                    "option_status": "1",
                    "create_time": "2020-07-09 10:32:36",
                    "original_price": "1",
                    "sale_price": "98",
                    "finally_pay": "0",
                    "stock": "9",
                    "sale_num": "0",
                    "base_sale_num": "11",
                    "cost": "0",
                    "picture": "",
                    "name": "1",
                    "sku_id": "10"
                }
            }]
        }]
    }      
*/    
public function actionGetonlineorders($lastGetPayTime = null, $lastRefundTime = null)
/**
 * 对某个订单进行发货/核销操作
 * @param  integer $type           0:到店自取,1:自己联系快递(api接口一般是这个),2:无需快递,3:在线下单,4:签约物流下单
 * @param  [type]  $billId         对应的订单id(优先用这个来查找对应的订单)
 * @param  [type]  $useCode        小程序订单的核销码(如果没有billId,则会根据核销码来查找对应的订单)
 * @param  string  $detailIds      本次发货/核销了这个订单里的哪个商品(不传则全部发货/核销,多个的时候用逗号分隔)
 * @param  [type]  $deliveryCompany 物流公司
 * @param  string  $deliveryNumber  物流编号
 * @param  string  $deliveryComment 物流备注
 * @param  string  $type            0:到店自取,1:自己联系快递,2:无需快递,3:在线下单,4:签约物流下单
*/   
public function delivery($billId = null, $useCode = null, $detailIds = '', $deliveryCompany = null, $deliveryNumber = null, $deliveryComment = null, $type = 1)
/**
 * 获得在线商品列表
 * @param  integer $page 页码
 * @param  integer $goodType 0拼团 1商品
 * 返回:
    {
        "errNum": 0,
        // 获得的商品列表
        "list": [
        {
            // 商品id
            "id": "10003",
            // 商品名称
            "name": "商品1",
            // 商品价格
            "price": "500.00",
            // 商品售卖起始时间
            "startTime": "2017-03-01 00:00:00",
            // 商品售卖结束时间                
            "endTime": "2019-11-18 00:00:00",
            // 0拼团,1商品
            "goodType": "1",
            // 商品封面图
            "picture": "\/\/res.qique.cn\/demo\/ueditor\/card\/19\/11\/17\/11-07-267998.png"
        },
        {
            "id": "10006",
            "name": "商品2",
            "price": "33.00",
            "startTime": "2019-11-01 00:00:00",
            "endTime": "2019-11-01 00:00:00",
            "goodType": "1",
            "picture": "\/\/res.qique.cn\/demo\/ueditor\/card\/19\/11\/17\/11-03-346500.png"
        }]
    }     
 * @return [type]        [description]
 */
public function actionGetgoodslist($page = 0, $goodType = 1)
/**
* 获取某个在线订单的订单和商品的信息
* @param  [type]  $billId         对应的订单id(优先用这个来查找对应的订单)
* @param  [type]  $useCode        小程序订单的核销码(如果没有billId,则会根据核销码来查找对应的订单)
* @return [type]          [description]
{
    errNum: 0,
    order: {
        // 订单id
        "id": "90",
        // 单条状态0未使用 1已使用 2 申请退款 3退款成功 4未支付  5已关闭  6已接收,等待扣款  7支付失败(其他原因,如银行返回失败) 8已取消
        "status": "0",
        // 订单的最终价格
        "price": "0.01",
        // 实付的金额
        "cash_fee": null,
        // 订单类型:6:多人拼团,7:产品,23购物车,88:预约服务项目的订单,89积分兑换订单;101退款订单,102充值订单,103企业付款到客户零钱包的订单,104:开卡订单,105:卡续费订单,106:代表店内收银的时候的储值卡充值
        "trade_type": 7,        
        // 支付方式:7:微信, 8:账户余额
        "pay_type": "7",
        // 预约订单的时候表示预计到达的时间
        "arrived_at": null,
        // 执行数量
        "excute_num": "0",
        // 未执行数量
        "un_excute_num": "1",
        // 购买时间
        "buyTime": "2019-11-29 14:43:30",
        // 退款时间
        "refundTime": null,
        // 配送的时候的快递地址 
        格式是:客户名字$$客户手机号$$省-市-区,详细地址
        "deliveryAddress": "黄清$$13681622249$$北京市-北京市-西城区,烘焙原料",
        "deliveryAddressInfo":
        {   
            // 顾客名字
            "cusName": "黄清",
            // 顾客电话
            "cusTel": "13681622249",
            // 省(或直辖市)
            "province": "北京市",
            // 市(或直辖市)
            "city": "北京市",
            // 区
            "region": "西城区",
            // 详细地址
            "address": "烘焙原料"
        },                            
        // 自取联系方式
        "selfTakeContact": "15105961111",
        // 自取人姓名
        "selfTakeUserName": "",
        // 顾客的订单备注
        "comment": "",
        // 0:到店自取,1:店铺配送
        "getGoodMethod": "0",
        "finally_pay": 0,
        // 本订单涉及的商品
        "details": [
            {
                // 发货时的$detailIds使用的是该id  
                id: "3414",
                teamId: "demo",
                bill_id: "2927",
                good_id: "13154",
                price: "0",
                num: "1",
                sku_id: null,
                sku_id_2: null,
                sku_id_3: null,
                sku_name: "",
                sku_info: null,
                create_time: "2022-09-13 00:10:55",
                use_time: "2022-10-13 15:49:25",
                handle_user_id: null,
                user_id: null,
                handle_customer_id: null,
                // 商品信息
                "good":
                {
                    "id": "10257",
                    "name": "商品1",
                    "finally_pay": "0.00"
                },
                // 如果涉及到选择某个商品的某个sku,这里显示sku信息
                "skuOption":
                {
                    "id": "8",
                    "teamId": "demo",
                    "good_id": "10257",
                    // 第1组中的sku id
                    "sku_1": "10",
                    // 第2组中的sku id
                    "sku_2": null,
                    // 第3组中的sku id
                    "sku_3": null,
                    "option_status": "1",
                    "create_time": "2020-07-09 10:32:36",
                    "original_price": "1",
                    "sale_price": "98",
                    "finally_pay": "0",
                    "stock": "9",
                    "sale_num": "0",
                    "base_sale_num": "11",
                    "cost": "0",
                    "picture": "",
                    "name": "1",
                    "sku_id": "10"
                }
            }
        ]
    }
}     
*/
public function actionGetorderdetail($billId = null, $useCode = null)


有用 没用 分享到微信

打开微信“扫一扫”转发给朋友

小程序内打开

打开微信“扫一扫”在小程序中打开