抖音开放平台Logo
开发者文档
控制台
  • 接入前准备
  • 通用能力
  • 餐饮
  • 到店餐饮团购解决方案
  • 餐饮在线点单解决方案
  • 随心团解决方案
  • 订单推送
  • 订单配送
  • 订单查询
  • 订单查询
  • 订单接单
  • 订单退款
  • 门店配送设置
  • 结算对账
  • 大交通
  • 酒旅
  • 综合
  • 历史版本文档(不推荐)
  • 订单查询

    收藏
    我的收藏

    接口说明

    1. 服务商通过接口查询订单详情,支持三种查询方式:

    (1)根据订单 id ,查询对应订单详情,入参:订单 id

    (2)根据订单状态和商户 id,查询指定时间内该商户下的订单列表,入参:商家id、订单状态、创单起止时间/修改起止时间

    (3)根据用户 id 和商户 id,查询某用户在该商户下的所有订单,入参:商家id、用户 id、创单起止时间/修改起止时间;

    1. 支付后未发码/发码失败订单查询方式:限定订单状态为“已支付”,如用户下单后超过 10 分钟未发码会发起退款;
    2. 退款申请待审核订单查询方式:限定券状态为“退款中”,如退款状态未响应超过 72 小时会自动退款。
    3. 金额计算公式:
    4. 原始金额 - 折扣金额(优惠金额) = 实付金额 original_amount - discount_amount = pay_amount
    5. 原始金额 = 各子单原始金额之和 (子单包含商品、配送费等)

    基本信息

    名称描述
    HTTP URL
    https://open.douyin.com/goodlife/v1/hermes/trade/order/query/
    HTTP Method
    GET
    Scope
    life.capacity.order.query
    权限要求
    订单查询

    请求参数

    请求头
    access-token必填String
    示例:clt.943da17996fb5cebfbc70c044c3fc25a57T54DcjT6HNKGqnUdxzy1KcxFnZ
    content-type必填String
    固定值"application/json"
    Query
    account_id必填String
    商家ID
    create_order_end_timeInt64
    创单结束时间 秒时间戳
    create_order_start_timeInt64
    创单起始时间 秒时间戳
    ext_order_idString
    外部订单id
    get_secret_numberBool
    是否需要获取隐私号
    open_idString
    抖音用户id
    order_idString
    订单ID
    order_statusInt32
    订单状态
    page_numInt32
    页数 默认1
    page_sizeInt32
    页面大小 默认10 最大200
    update_order_end_timeInt64
    修改起始时间 秒时间戳
    update_order_start_timeInt64
    修改起始时间 秒时间戳
    请求示例
    curl --location --request GET '/goodlife/v1/hermes/trade/order/query/?ext_order_id=bkPM7PLFuY&get_secret_number=false&open_id=NHjLikYStP&update_order_start_time=7378782945877813284&update_order_end_time=1563112550287097399&page_num=1061212232763410542&create_order_end_time=6013298504751029620&create_order_start_time=2316202466402969181&account_id=PN3EFArtwj&order_id=vNZ2MIeDUu&order_status=8602232757115304163&page_size=5585389985738554736' \ --header 'content-type: application/json' \ --header 'access-token: 0801121846735352506a356a6' \

    响应参数

    Body展开全部子属性
    dataStruct

     

    业务数据

    展开子属性
    extraStruct

     

    扩展信息

    展开子属性
    响应示例
    正常响应示例异常响应示例
    { "extra": { "error_code": 0, "description": "", "sub_error_code": 0, "sub_description": "", "logid": "20241219110140D567FEDE7B455E45F05E", "now": 1734577300 }, "data": { "orders": [ { "update_order_time": 9168946996251674000, "order_id": "HomVOKrhhY", "poi_id": "YszeD7KXsr", "products": [ { "product_type": 4212260341812437000, "num": 7486769546831269000, "origin_amount": 7109305845665511000, "commodities": [ { "total_count": 8352204965608132000, "option_count": 9129426427869616000, "item_list": [ { "unit": "2aoYAcGvj2", "name": "gNSB42uCUp", "price": 3956151212062466600, "original_out_sku_id": "Z70afoqRiP", "attr_list": [ "r8cCaDuovH" ], "desc": "TpHUW9yLGt", "count": 4455138997770087000, "out_sku_id": "UF9MjZgTK3", "item_tag": "FGCj4NZVfZ", "original_price": 4828575689082666000, "attributes": [ { "name": "3BwTtWZRQ8", "value": "26sKH6AgKc" } ], "sku_attr_list": [ { "out_id": "ZSkdLt7UWO", "upgrade_price": 6032476711670808000, "attr_name": "X6Ght6KJME", "num": 4755085259189856000, "product_id": "T4OFAnsQCG" } ], "ingredients": [ { "count": 4793315482698607000, "out_id": "sR0bniJwSJ", "product_id": "lcVuSk0svy", "name": "oT5fXYeZNy" } ], "specs": [ { "out_sku_id": "AdbBqNmkPe", "value_type": 8136963282932918000, "value_metric": "56TvteKrnY", "name": "lkmxPh7FJY", "value": "DJK3lZC3qP", "sku_id": "uGRFRaTyjq" } ], "out_id": "DCzyhhcZKP", "sku_id": "fPeSdRZUql", "original_sku_id": "fthVyqGScK", "product_id": "J3GIGoK7XK" } ], "group_name": "VZoXCP6QiM" } ], "product_name": "fJ8SZ3cnzw", "product_origin_amount": 3291212315411783000, "out_id": "oTSD61PM06", "specs": [ { "sku_id": "IG6csViEHB", "out_sku_id": "VnUiQKtskc", "value_type": 2079400633046471400, "value_metric": "aWJ3KGTbVh", "name": "BN1Rm8samw", "value": "4BJbmt9bAc" } ], "attributes": [ { "value": "hvO7mBz74f", "name": "pO1SVGYrOG" } ], "snapshot_product": { "product_attr": { "voucher_par_type": 1, "dynamic_par_rule": { "dynamic_par_min_amount": 5978004579335577000, "dynamic_par_max_amount": 6807440918366192000, "dynamic_par_rule_item_list": [ { "day_of_week": [ 1 ], "time_period": { "use_start_time": "YVbxy0Rs28", "use_end_time": "2UX7vzGlHd", "end_time_is_next_day": false }, "deductible_amount": 8232149875060796000 } ], "dynamic_par_rule_desc": "0F1uGunxlE" } } }, "sku_id": "gnN3vdruMg", "ingredients": [ { "name": "vWPQHwp6PK", "count": 2401749046056615000, "out_id": "3zGEqdQ0Re", "product_id": "QaOVbMTLt6" } ], "product_id": "X922DKc3CM" } ], "dish_sku_type_num": 8841120756401550000, "dish_sku_num": 6594664725895606000, "sku_name": "rGPInlogWh", "is_multi_order": false, "order_type": 3331745454563791000, "pay_time": 8549923766634174000, "merchant_info": { "account_id": "laPXELC8WH", "account_name": "U6LjrcF2Pf" }, "payment_discount": 4493329497634932000, "certificate": [ { "certificate_id": "Rp6xE1IT2J", "item_status": 5654685920748118000, "item_update_time": 7522079482313857000, "refund_amount": 3377387289276474400, "refund_time": 7978763403130614000, "order_item_id": "a44eMPgVZo" } ], "user_id": 1199367703396325400, "order_status": 5346199412433205000, "contacts": [ { "phone": "b0qJCGPDbz", "phone_encrypt": "SCMrUIvRLO", "name": "i6DIrJGSeB" } ], "total_sku_num": 7472288379608643000, "third_sku_id": "o71eg7PN2a", "is_deliver_later": false, "poi": { "poi_id": "3YMWS8XKpo", "poi_name": "9JHRbgR8Bo" }, "sku_id": "865ADTepGn", "create_order_time": 6212997216978687000, "discounts": [ { "discount_type": 2621096243898636000, "discount_amount": 7630903030608796000, "merchant_discount_amount": 5573012838722691000, "platform_discount_amount": 6546284499410151000 } ], "count": 7895967086011741000, "sub_order_amount_infos": [ { "sub_order_id": "AFfliLknFX", "pay_amount": 3148979087922179600, "origin_amount": 7892665901606539000, "discount_amount": 949054973733065200, "discounts": [ { "platform_discount_amount": 2445035531915748000, "discount_type": 6149355912149445000, "discount_amount": 5022263141276023000, "merchant_discount_amount": 6500124543581361000 } ], "sub_order_type": 2019663521523489300 } ], "sku_type_num": 4499757732261569500, "total_sku_type_num": 5769949315332426000, "pay_amount": 140966400543176370, "open_id": "3eCUL4NEdf", "delivery_info": { "is_book": false, "user_expect_time": "iTwql79grS", "sys_expect_time": "wsr7MavazF", "remark": "lWMAOnwvYK", "table_ware": "wEpryAZzJ4", "deliver_model": 4145836082622661600, "shop_number": "2nnZ6B4jH3" }, "products_after_refund": [ { "commodities": [ { "group_name": "xWamaYDCO7", "total_count": 2786104401441054700, "option_count": 708331359470069100, "item_list": [ { "attr_list": [ "fEUIPZfUA9" ], "ingredients": [ { "count": 8810999150210513000, "out_id": "ieHZQVkuHL", "product_id": "DEYuEmschC", "name": "GLxodHbAl4" } ], "original_price": 3775085024281610000, "original_out_sku_id": "FGz6oIDgaJ", "original_sku_id": "wWucdKxWfl", "unit": "dZUiE4kAgS", "desc": "MiUgQClyJ8", "item_tag": "8X9A8WxLTN", "attributes": [ { "name": "648u7W4mCq", "value": "LhiOU6bAOs" } ], "count": 6348917455640679000, "specs": [ { "value_type": 2704282400207582700, "value_metric": "mN2OsznYG4", "name": "OMydNnOZFx", "value": "4LD0cLfLnv", "sku_id": "5PQbOxB8dO", "out_sku_id": "0VOkC7aTLk" } ], "sku_attr_list": [ { "attr_name": "2BoBSZCGP9", "num": 7722838360591627000, "product_id": "W5e1dWyYSD", "out_id": "yUCWDT7NfX", "upgrade_price": 4146254821415844400 } ], "product_id": "BCAtRe3cEL", "sku_id": "zpmyW3Mju5", "out_sku_id": "0nHDzVla2Z", "name": "BIQluw5TaK", "out_id": "aRoS0i06BD", "price": 8303806875915751000 } ] } ], "attributes": [ { "name": "wPO4KcRb1C", "value": "MxLWlZ6Xiw" } ], "snapshot_product": { "product_attr": { "dynamic_par_rule": { "dynamic_par_rule_desc": "QvxtS2hgTI", "dynamic_par_min_amount": 5390005487171950000, "dynamic_par_max_amount": 481336477000223360, "dynamic_par_rule_item_list": [ { "day_of_week": [ 1 ], "time_period": { "use_start_time": "8Vq5vo1yOt", "use_end_time": "JEZ1DUBnhL", "end_time_is_next_day": false }, "deductible_amount": 7068467727806762000 } ] }, "voucher_par_type": 1 } }, "product_type": 1011777290731110900, "sku_id": "62bYnUUoIQ", "out_id": "qTVnFJt2Vg", "num": 1636866646022408700, "product_origin_amount": 2507259924903432000, "product_id": "ZT1nPtGS2I", "specs": [ { "name": "rZrDSrwAxQ", "value": "Oh34UgmEll", "sku_id": "0p7Yvw4u8c", "out_sku_id": "RBV0YZnIp5", "value_type": 205938979421199650, "value_metric": "wFeAkTzDDP" } ], "origin_amount": 1752827344013956000, "ingredients": [ { "count": 8907538776729669000, "out_id": "ug3Jn8MYIC", "product_id": "9lLPtga3uZ", "name": "SlY6mRMKDv" } ], "product_name": "SvCVoxseeE" } ], "amount_info": { "discount_amount": 6465125632663650000, "pay_amount": 8089095105939968000, "estimated_order_income": 6405848738706774000, "freight_pay_amount": 474012783651579100, "packing_price": 2033236087933347300, "pay_discount_amount": 5615242513302073000, "discounts": [ { "discount_type": 3445894897161881000, "discount_amount": 4930134587334038000, "merchant_discount_amount": 7207091585347635000, "platform_discount_amount": 7612066501655560000 } ], "platform_discount_amount": 8093457607099007000, "freight_actual_pay_amount": 399329415094889150, "platform_deliver_freight_fee": 2937975398900202000, "origin_amount": 3805419811716467700, "product_origin_amount": 632490399142132600, "merchant_deliver_freight_fee": 4978332890073372000, "merchant_discount_amount": 3287607782216481000, "commission_amount": 5276710834107320000, "sale_price": 5470521164515151000, "activities_fee_amount": 8898024642773445000, "other_fee_amount": 4075335196071083500 }, "refund_infos": [ { "refund_complete_time": 7973337542095091000, "user_refund_amount": 5413275245984676000, "products_refund": [ { "attributes": [ { "value": "mA13XYzNUh", "name": "kNqavi0M9u" } ], "ingredients": [ { "out_id": "QrkDiTDKEI", "product_id": "gIlDL0XNmq", "name": "yKCgZGxnFV", "count": 4542819714774782000 } ], "sku_id": "kFZNd8B0S6", "snapshot_product": { "product_attr": { "dynamic_par_rule": { "dynamic_par_rule_desc": "2sK8u4DOlR", "dynamic_par_min_amount": 4887277452682092000, "dynamic_par_max_amount": 7308386153994775000, "dynamic_par_rule_item_list": [ { "deductible_amount": 8661272202291842000, "day_of_week": [ 1 ], "time_period": { "end_time_is_next_day": false, "use_start_time": "k5MOgcfzjM", "use_end_time": "LtnmYb9FjY" } } ] }, "voucher_par_type": 1 } }, "product_type": 5604267592846765000, "origin_amount": 148220036077448580, "product_id": "HVjbKlVLyz", "product_origin_amount": 3453529282343245000, "specs": [ { "value_metric": "orQf4YKEWl", "name": "9g6VRapxYZ", "value": "uTJUUhknlg", "sku_id": "lN1ZK0Yi7d", "out_sku_id": "ESFY1Dh5xT", "value_type": 4430956641766652400 } ], "commodities": [ { "total_count": 2820464058358088700, "option_count": 8178468884086328000, "item_list": [ { "original_sku_id": "HYXxx6Niw5", "out_id": "IAX3BdS4G8", "ingredients": [ { "count": 4786878466480638000, "out_id": "XI39oOy44g", "product_id": "FzA6QlP4x4", "name": "GGgusOqmzv" } ], "original_price": 4201604057154223000, "attributes": [ { "value": "ShON15Sjdm", "name": "vxr4bxv7UV" } ], "desc": "IOfNuogzqE", "unit": "jFIAz7GQEz", "count": 184918265697919100, "out_sku_id": "9Q0lbzGmij", "sku_id": "ElY5qQe3GC", "item_tag": "xvknbTFrYX", "price": 5563778115230673000, "sku_attr_list": [ { "attr_name": "8MTRm6Avjh", "num": 2950198123939449000, "product_id": "byQE3sjTTP", "out_id": "GOrp8SO4BQ", "upgrade_price": 5364361621227263000 } ], "original_out_sku_id": "h8E5vEJPBK", "attr_list": [ "WvaucCKqDr" ], "name": "Teda1QI8K6", "specs": [ { "value_metric": "icO7DeO8Zf", "name": "tmmLwU4yjT", "value": "U3WoO48Sx0", "sku_id": "oJn6nBgYGG", "out_sku_id": "XvzJ5xoH6d", "value_type": 3951951147539932700 } ], "product_id": "t2rR0Wdk7d" } ], "group_name": "iYjgLlT6SB" } ], "product_name": "x54SDxxvUr", "num": 2899574479172946000, "out_id": "onD2c8lm5V" } ], "after_sale_id": "kQoxivzdOQ" } ], "original_amount": 1596570078792249900, "receiver_info": { "door_plate_num": "dKWJ4tK0Ui", "district": "PLpXCJk3Ur", "town": "coo5h2zzjt", "lng": 0.6158791224769856, "location_name": "3jlNuBFFB0", "receiver_real_phone": "meLbatbvac", "secret_number": "c2c2IkEIHS", "lat": 0.9591664984421041, "province": "pK95yx6nxl", "city": "jOECpRubeI", "receiver_phone": "2we9LT4odx", "receiver_name": "WjiUg99A0H", "location_address": "eC0eBx2maJ" }, "buyer_info": { "buyer_real_phone": "MC5se93ibL", "buyer_phone": "cgwjajL8hI", "buyer_secret_number": "OCSYwk032N" }, "discount_amount": 7118148708777637000, "sku_num": 3347456484693934000 } ], "page": { "page_size": 6210949388586764000, "total": 6815528034868458000, "page_num": 3067344916003211300 }, "error_code": 0, "description": "" } }
    切换单列布局

    错误码

    HTTP 状态码错误码错误码描述排查建议
    2002100001
    未知错误
    重试接口,重试3次仍报错联系抖音生活服务技术支持
    2002100004
    系统繁忙,此时请开发者稍候再试
    重试接口,重试3次仍报错联系抖音生活服务技术支持
    2002100005
    参数不合法
    更换参数
    2002190002
    access_token无效
    调用接口重新生成access_token
    2002190004
    应用未获得该能力, 请去https://open.douyin.com/申请
    应用申请接口权限
    2002190008
    access_token过期,请刷新或重新授权
    规范token刷新机制,检查是否有测试环境在同步刷新token
    2002119001
    参数不合法
    更换参数
    2002119002
    系统繁忙,请稍候再试
    重试
    2002119003
    请求太过频繁,请稍后再试
    重试
    2002119005
    应用未获商家授权
    联系合作商家在商家后台发起授权,并在服务商后台同意授权
    2003000001
    根据实际业务错误返回
    对照接口文档规范参数并重试
    2004000001
    根据实际业务错误返回
    补充参数
    2004000002
    根据实际业务错误返回
    对照接口文档规范参数并重试
    2005000001
    根据实际业务错误返回
    联系抖音处理
    2005000001
    服务器打瞌睡了,请稍后再试。
    2003000001
    以实际错误信息为准