订单详细查询接口
接口说明
1. 根据订单id查询订单分账明细,支持批量查询
2. 此接口适用于KA,能查询到达人佣金、平台服务费等敏感数据
3. 订单完成后才会生成分账信息
4. 计算公式:
1. 全推(平台配送):实际订单扣完配送费商家赚的钱=商家货款-商家出配送费 -商家出小费(支付给平台)-商家对用户补贴(全推才减) =merchant_amount-merchant_freight-merchant_tip-user_delivery_merchant_subsidy
2. 自配送:实际订单扣完配送费商家赚的钱=商家货款+用户支付配送费=merchant_amount+pay_amount
使用限制
SLA:支持的最大QPS:50;
基本信息
| 名称 | 描述 |
|---|---|
| HTTP URL | https://open.douyin.com/goodlife/v1/settle/ledger/detailed_query_by_order/ |
| HTTP Method | GET |
| Scope | life.capacity.order_billing_detail |
请求参数
请求头
access-token必填String
示例:clt.943da17996fb5cebfbc70c044c3fc25a57T54DcjT6HNKGqnUdxzy1KcxFnZ
content-type必填String
固定值"application/json"
Rpc-Transit-Life-AccountString
来客商户根账户ID
Query
account_id必填String
order_ids必填Array<String>
订单ids
请求示例
curl --location --request GET 'https://open.douyin.com/goodlife/v1/settle/ledger/detailed_query_by_order/?order_ids=121224343435453&account_id=7893456783' \ --header 'content-type: application/json' \ --header 'access-token: 0801121846735352506a356a6' \
响应参数
Body展开全部子属性
extra必填Struct
扩展信息
展开子属性
dataStruct
展开子属性
响应示例
正常响应示例异常响应示例
{ "data": { "ledger_records": { "VnYTLwZ2j5": [ { "status": 1854115439067219000, "id": "1234", "is_mall_store": false, "settle_unit_id": "1234", "item_order_id": "1056583160300111111", "poi_id": "123", "certificate": { "code": "1234", "certificate_id": "1234" }, "order_attrribute": { "video_id": "1234", "room_id": "1234", "source": "1234" }, "receipt_bill_key": "1", "order_source_platform": 1, "goods": { "group_name": "1234", "sku_id": "1234", "sold_start_time": 4844768562048175000, "market_price": 7440378802142483000 }, "amount": { "merchant_ticket": 7891265326130678000, "clerk_commission": 3538631108506803000, "total_merchant_platform_service": 8780351840341035000, "original": 2640707525850073000, "coupon_pay": 7451369299540665000, "user_deliv_coupon_pay": 756674714547640800, "pay_discount": 5262996467746420000, "pay": 5305233457012309000, "platform_duty_freight": 8190056808658437000, "talent_commission": 5224475188119367000, "cdb_total_fee": 5962896314805931000, "user_deliv_platform_subsidy": 1675005219426503400, "merchant_cancel_freight": 8681481663087910000, "platform_ticket": 6480647800153511000, "mall_store_goods": 5387754490471290000, "platform_duty_tip": 7994475209732624000, "actual_insured": 5527669996033132000, "broker_commission": 4644328119154046000, "total_agent_merchant": 3770061316672382000, "user_deliv_merchant_subsidy": 4489171089601304000, "cdb_platform_deduction": 4418419407668271600, "merchant_tip": 2876996551524904400, "goods": 8762888800249034000, "merchant_freight": 3309518660178312700, "thrid_party_commission": 206305404306545120, "ledger_platform_ticket": 5366839786936025000, "crafts_man": 2544051391128686600, "ledger_total": 6515406128064116000, "total_operation_agent": 7192575262242782000, "institution_commission": 5878356666466465000 }, "order_id": "1056583160300111111", "sku_order_id": "1056583160300111111", "account_id": "1056583160300111111", "ledger_id": "LRC1234", "ledger_time": 158788386783939780 } ] }, "ledger_second_records": { "COCNlAYsem": [ { "settle_unit_id": "1234", "account_id": "35345LGRjc", "poi_id": "D0lDsfHBpm", "ledger_time": 8786937844469855000, "order_attrribute": { "room_id": "1234", "source": "1234", "video_id": "1234" }, "id": "f6sHl6gdAc", "status": 2576313049050832400, "order_source_platform": 1, "certificate": { "certificate_id": "1234", "code": "1234" }, "receipt_bill_key": "wqPLWxCTex", "order_id": "wiYbvDDYtc", "amount": { "total_operation_agent": 6579379694377597000, "actual_insured": 5597605324211937000, "mall_store_goods": 5841555778113095000, "thrid_party_commission": 847579556690355500, "merchant_freight": 2192822640870215700, "coupon_pay": 4988857699391678000, "crafts_man": 2723962632666777000, "goods": 1789598936739453200, "platform_ticket": 8310203133772107000, "ledger_total": 6671959131516390000, "broker_commission": 7664649496072159000, "platform_duty_freight": 7539020142895029000, "user_deliv_platform_subsidy": 1430465079607628500, "talent_commission": 7103198829066855000, "merchant_cancel_freight": 2141344849915486200, "user_deliv_merchant_subsidy": 1824429419806820000, "pay": 7022978836026127000, "total_merchant_platform_service": 3316728166770804000, "ledger_platform_ticket": 3697365869500296000, "total_agent_merchant": 8962973377764684000, "merchant_tip": 3208150723093709300, "institution_commission": 3445948373587909000, "clerk_commission": 6401704714720340000, "user_deliv_coupon_pay": 8845150288074222000, "merchant_ticket": 414264548763839500, "platform_duty_tip": 8426660939958334000, "cdb_platform_deduction": 2848509613263496700, "original": 4419121523626083300, "pay_discount": 2214382106429428000, "cdb_total_fee": 4587784829279149600 }, "ledger_id": "gZ1sI1rxrA", "item_order_id": [ "mdxhIGlNez" ], "goods": { "market_price": 9216051949864192000, "group_name": "1234", "sku_id": "1234", "sold_start_time": 935106519287976200 } } ] }, "order_amounts": { "eai79U4zXL": { "merchant_income": 5934124262238678000 } }, "error_code": 0, "description": "" }, "extra": { "error_code": 0, "description": "", "sub_error_code": 0, "sub_description": "", "logid": "202608191402544D47A85842F30D7E16CC", "now": 1787119376 } }
错误码
| HTTP 状态码 | 错误码 | 错误码描述 | 排查建议 |
|---|---|---|---|
| 200 | 2100001 | 未知错误 | 重试接口,重试3次仍报错联系抖音生活服务技术支持 |
| 200 | 2100004 | 系统繁忙,此时请开发者稍候再试 | 重试接口,重试3次仍报错联系抖音生活服务技术支持 |
| 200 | 2100005 | 参数不合法 | 更换参数 |
| 200 | 2190002 | access_token无效 | 调用接口重新生成access_token |
| 200 | 2190004 | 应用未获得该能力, 请去https://open.douyin.com/申请 | 应用申请接口权限 |
| 200 | 2190008 | access_token过期,请刷新或重新授权 | 规范token刷新机制,检查是否有测试环境在同步刷新token |
| 200 | 2119001 | 参数不合法 | 更换参数 |
| 200 | 2119002 | 系统繁忙,请稍候再试 | 重试 |
| 200 | 2119003 | 请求太过频繁,请稍后再试 | 重试 |
| 200 | 2119005 | 应用未获商家授权 | 联系合作商家在商家后台发起授权,并在服务商后台同意授权 |
| 200 | 3000001 | 根据实际业务错误返回 | 对照接口文档规范参数并重试 |
| 200 | 4000001 | 根据实际业务错误返回 | 补充参数 |
| 200 | 4000002 | 根据实际业务错误返回 | 对照接口文档规范参数并重试 |
| 200 | 5000001 | 根据实际业务错误返回 | 联系抖音处理 |
| 200 | 5000001 | 服务器打瞌睡了,请稍后再试。 | |
| 200 | 3000001 | 以实际错误信息为准 |
