有赞新零售社区

发帖
API使用问题»如何查询交易列表

[API调用-商品/交易] 如何查询交易列表

阿祥 2023-04-24 680 浏览 3 评论 | 只看楼主 [打印]  关闭
问题一、
查询交易列表,是可以通过  youzan.trades.sold.get(订单搜索接口) 进行查询;
或者还有其它的接口;

问题二:
通用接口:access_token.get.self(获取access_token)
返回:
{
  "access_token": "45d430829781702fdbbc38aac454b34",
  "authority_id": "123343627",
  "expires": 1682911671356,
  "refresh_token": "82daeef02ae5ee48e262cffcbad1383",
  "scope": "item item_advanced item_super item_category item_category_advanced item_category_super trade trade_super trading_setting_advanced user user_advanced account_advanced utility utility_advanced utility_super shop_super statistics_advanced logistics coupon_advanced reward_advanced present_advanced wish_advanced peerpay_advanced gift_advanced crm_advanced fenxiao_advanced pay_advanced union_advanced wxd_app aixuedai_app oauth_advanced account_super shop weixin_advanced oauth_super shop_compatible feature_advanced pay_qrcode wsc_app store mars trade_virtual coupon pf nine bbs offline notice_center store_api_normal youren courier points_store time_limited_discount salesman seller_data_center cross_boarder niece multi_store reviews wechat_program_mars weapp_wsc open_market wm app_sdk dzt_crm union_pay pay_trans cy buyer_cart buyer_bill buyer_trade buyer_refund points storage pay_fund_channel meeting cash retail ka_customization panama beauty silently_create_account trade-delivery content_delivery trade_selffetch retail_goods retail_headquater retail_trade beauty_partner spotlight h5_resource_accelerator retail_store dsp_api app_engine oa_api retail-ump retail-peripheral retail-scrm retail-pay retail-data e_commerce_app buyer_address new_wxd_app sharing_tech_mobile seller_refund trade_invoice_platform customer electronic_invoice ebiz-owl stored_value_card gift_card beauty_staff tag beauty_item beauty_appointment beauty_member beauty_order beauty_cashier beauty_stock beauty_shop sougou cloud_api cms extension_analysis business_profile shop_advanced mei_promoter item_hotel item_standard circle selffetchcode virtualticket tags trade_advanced retail_product retail_stock retail_shop retail_supplier supplier data stored_value_card_operation retail_finance general_data level_membership project pay-customs-declaration account_import retail_permission multi_precard pay-gateway open_education_curriculum open_education_line open_education_customer open_education_student open_education_classroom open_education_class open_education_schedule open_education_order open_education_signin open_education_order open_tickets open_education_message open_education_column open_education_content open_education_broadcast rds迁移 open_beauty_service_log open_beauty_work_order open_fenxiao open_fenxiao_trade fin-consumerfin-prod 测试分组删除 open_education_order pay-gateway pay-login pay-ucashier retail_tag retail_tag retail_user retail_logistics retail_virtualcode retail_crossborder retail_reviews retail_reviews retail_crm retail_giftcard retail_address retail_scrm_customer retail_valuecard retail_scrm_tag retail_virtualticket retail_user retail_growth appstore_data retail_pay showcase_api MicroPageAPI open_beauty_verification open_education_coursegroup IoT iot-printer open_msg test open_robot open_clue_manage mei_open_partner material-callback enable_im crm_api transfer-portal youzan_cloud_api retail_peripheral mei_open_ka open_youzan_mcn yunying retail_finance open_isv open_bill data_center callback retail_store retail_ump retail_trade retail_SupplyChain open_trade_fenxiao pay"
}

获取到: "access_token": "45d430829781702fdbbc38aac454b34"
再调用:youzan.trades.sold.get(订单搜索接口) 传参access_token等
{
  "gw_err_resp": {
    "trace_id": "yz7-0ae859b2-1682307010426-261497",
    "err_msg": "openid不存在",
    "err_code": 4009
  }
}
















用手机打开
收藏 ··· 回复
    千寻   有赞云团队   2023-04-24 | 只看该作者
    您好,可以通过youzan.user.openid.get.1.0.0获取有赞openId,文档https://doc.youzanyun.com/detail/API/0/323

      阿祥 青铜   2023-04-24 | 只看该作者
      调试工具,显示如下:
      "orders": [
                  {
                    "is_cross_border": "",
                    "outer_item_id": "BM230418222659789",
                    "item_type": 183,
                    "discount_price": "0.01",
                    "num": 1,
                    "oid": "2935687658387931308",
                    "title": "电子卡券(购买时无需填写收货地址,测试商品,不发货,不退款)"
      ... ... ...
      问题一、应是调用成功了吧?
      问题二、我没有传参openID,查询openID时,需要UserID,UserID应该从哪边进行查询?求助一下,谢谢!


            
               

        千寻   有赞云团队   2023-04-24 | 只看该作者
        您好,接口返回200就是成功了
        可以通过用户详情获取用户信息,文档:https://doc.youzanyun.com/detail/API/0/2193

        1跳至
        您需要登录后才可以回帖 登录 | 立即注册

        本版积分规则

        复制链接
        新浪微博
        QQ空间
        微信扫码
        • 回复

        • 评分

        客服工作时间是9:00-18:00,客服妹子当前不在线,若不能及时回复请谅解。试试右上角的搜索吧,论坛有丰富的经验贴、公告贴,相信一定能够帮到您~

        复制成功