文档中心 > API类目 > 五道口API

taobao.rex.iot.skyeye.trade.records (POS交易行为查询)

门店查询POS收银信息,用于门店安防

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
field_id String 必须 8028 门店code
tenant_code String 必须 HM 租户code
order_id String 可选 123 订单号
token String 必须 xxx 登陆session
start_time Number 可选 123 开始时间
relate_cabinet Boolean 可选 false
  • 默认值:false
  • 是否查询货架
    end_time Number 可选 123 结束时间
    session_id String 可选 xxx 交易会话
    user_id String 可选 123 用户id
    pos_session_id String 可选 123 pos交易流水号
    need_detail Boolean 可选 true
  • 默认值:true
  • 是否需要详情
    member_id String 可选 123 商家会员id
    payer_id String 可选 123 支付用户id

    响应参数

    名称 类型 示例值 描述
    result MtopResponse 结果 结果
    • └ success
    • Boolean
    • true
    • 成功
    • orders
    • Datas []
    • 交易列表
    • 交易列表
    • └ sid
    • String
    • 123
    • 交易id
    • └ order_id
    • String
    • 123
    • 订单号
    • └ create_order_time
    • String
    • 123
    • 创单时间
    • └ buyer_id
    • String
    • 123
    • 用户id
    • └ total_fee
    • String
    • 10
    • 总价
    • └ item_num
    • String
    • 10
    • 商品数量
    • └ order_num
    • String
    • 10
    • 子订单数量
    • └ op_log
    • String
    • xxx
    • 操作日志
    • └ risk_op_log
    • String
    • xxx
    • 风险日志
    • └ device_id
    • String
    • 123
    • 设备id
    • └ device_name
    • String
    • 123
    • 设备名称
    • carts
    • Carts []
    • 购物车
    • 购物车
    • └ sku_code
    • String
    • sku
    • sku
    • └ barcode
    • String
    • barcode
    • barcode
    • └ sku_name
    • String
    • 123
    • 商品名
    • └ pic_url
    • String
    • http://
    • 商品图
    • └ price
    • String
    • 12
    • 商品单价
    • └ promotion_price
    • String
    • 123
    • 商品促销价
    • └ sale_unit
    • String
    • 销售单位
    • └ total_fee
    • String
    • 12
    • 总价
    • └ shelf_code
    • String
    • 123
    • 货架code
    • └ sale_quantity
    • String
    • 123
    • 销售数量
    • └ is_weight
    • String
    • true
    • 是否是称重商品
    • └ inv_quantity
    • String
    • 1
    • 库存数量
    • └ inv_unit
    • String
    • 1
    • 库存单位
    • risk_items
    • Items []
    • 风险商品
    • 风险商品列表
    • └ barcode
    • String
    • 123
    • 条码
    • └ sku_code
    • String
    • 123
    • 编码
    • └ sku_name
    • String
    • 商品
    • 名称
    • └ pic_url
    • String
    • http
    • 图片
    • └ price
    • String
    • 10
    • 价格
    • └ promotion_price
    • String
    • 10
    • 优惠金额
    • └ total_fee
    • String
    • 10
    • 总价
    • └ sale_unit
    • String
    • 销售单位
    • └ sale_quantity
    • String
    • 1
    • 销售数量
    • └ shelf_code
    • String
    • 1
    • 货架号
    • └ risk_code
    • String
    • DELETE
    • 风险行为
    • └ risk_name
    • String
    • 删除商品
    • 风险行为
    • └ happen_time
    • String
    • 123
    • 发生时间
    • └ description
    • String
    • 删除商品
    • 描述
    • └ cashier_assist
    • String
    • true
    • 是否辅助
    • └ result
    • String
    • success
    • 结果
    • └ is_weight
    • String
    • true
    • 是否称重
    • └ inv_quantity
    • String
    • 1
    • 库存数量
    • └ inv_unit
    • String
    • 1
    • 库存单位
    • └ order_status
    • String
    • SUCCESS
    • 订单状态,UNCREATE,UNPAY,SUCCESS
    • └ payer_id
    • String
    • payer_id
    • 1231231
    • └ member_card_code
    • String
    • 123
    • 商家会员卡号
    • └ member_card_name
    • String
    • 123
    • 商家会员名称
    • └ msg_info
    • String
    • OK
    • 结果
    • └ msg_code
    • String
    • 200
    • 结果

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
    RexIotSkyeyeTradeRecordsRequest req = new RexIotSkyeyeTradeRecordsRequest();
    req.setFieldId("8028");
    req.setTenantCode("HM");
    req.setOrderId("123");
    req.setToken("xxx");
    req.setStartTime(123L);
    req.setRelateCabinet(false);
    req.setEndTime(123L);
    req.setSessionId("xxx");
    req.setUserId("123");
    req.setPosSessionId("123");
    req.setNeedDetail(true);
    req.setMemberId("123");
    req.setPayerId("123");
    RexIotSkyeyeTradeRecordsResponse rsp = client.execute(req);
    System.out.println(rsp.getBody());

    响应示例

    • XML示例
    • JSON示例
    <rex_iot_skyeye_trade_records_response>
        <result>
            <success>true</success>
            <orders>
                <datas>
                    <sid>123</sid>
                    <order_id>123</order_id>
                    <create_order_time>123</create_order_time>
                    <buyer_id>123</buyer_id>
                    <total_fee>10</total_fee>
                    <item_num>10</item_num>
                    <order_num>10</order_num>
                    <op_log>xxx</op_log>
                    <risk_op_log>xxx</risk_op_log>
                    <device_id>123</device_id>
                    <device_name>123</device_name>
                    <carts>
                        <carts>
                            <sku_code>sku</sku_code>
                            <barcode>barcode</barcode>
                            <sku_name>123</sku_name>
                            <pic_url>http://</pic_url>
                            <price>12</price>
                            <promotion_price>123</promotion_price>
                            <sale_unit>件</sale_unit>
                            <total_fee>12</total_fee>
                            <shelf_code>123</shelf_code>
                            <sale_quantity>123</sale_quantity>
                            <is_weight>true</is_weight>
                            <inv_quantity>1</inv_quantity>
                            <inv_unit>1</inv_unit>
                        </carts>
                    </carts>
                    <risk_items>
                        <items>
                            <barcode>123</barcode>
                            <sku_code>123</sku_code>
                            <sku_name>商品</sku_name>
                            <pic_url>http</pic_url>
                            <price>10</price>
                            <promotion_price>10</promotion_price>
                            <total_fee>10</total_fee>
                            <sale_unit>包</sale_unit>
                            <sale_quantity>1</sale_quantity>
                            <shelf_code>1</shelf_code>
                            <risk_code>DELETE</risk_code>
                            <risk_name>删除商品</risk_name>
                            <happen_time>123</happen_time>
                            <description>删除商品</description>
                            <cashier_assist>true</cashier_assist>
                            <result>success</result>
                            <is_weight>true</is_weight>
                            <inv_quantity>1</inv_quantity>
                            <inv_unit>1</inv_unit>
                        </items>
                    </risk_items>
                    <order_status>SUCCESS</order_status>
                    <payer_id>payer_id</payer_id>
                    <member_card_code>123</member_card_code>
                    <member_card_name>123</member_card_name>
                </datas>
            </orders>
            <msg_info>OK</msg_info>
            <msg_code>200</msg_code>
        </result>
    </rex_iot_skyeye_trade_records_response>

    异常示例

    • XML示例
    • JSON示例
    <error_response>
        <code>50</code>
        <msg>Remote service error</msg>
        <sub_code>isv.invalid-parameter</sub_code>
        <sub_msg>非法参数</sub_msg>
    </error_response>

    错误码解释

    错误码 错误描述 解决方案
    PARAM_ERROR 参数错误 参数错误

    API工具

    如何获得此API

    FAQ

    返回
    顶部