抖音开放平台Logo
开发者文档
控制台
  • 接入前准备
  • 通用能力
  • 餐饮
  • 到店餐饮团购解决方案
  • 餐饮在线点单解决方案
  • 门店接单信息设置
  • 点单相关商品查询
  • 在线点单交易能力
  • 「OpenAPI」商家接单/拒单
  • 「OpenAPI」商家回传备餐/出餐/取餐信息
  • 「OpenAPI」商家发起退款
  • 退款结果同步外部商家
  • 查询外部商家订单
  • 通知外部商家待接单
  • 通知外部商家支付成功
  • 通知外部商家订单已关闭
  • 通知外部商家创单
  • 「Webhook」通知外部商家履约备餐状态变更
  • 点单相关商品发布
  • 商品查询
  • 商家账单明细
  • 随心团解决方案
  • 大交通
  • 酒旅
  • 综合
  • 历史版本文档(不推荐)
  • 接口说明

    抖音侧通知第三方创建点单订单。仅支持 支付前 通知第三方创单。

    基本信息

    Scope
    life.trade.meal_retail_spi_create_order_notify
    权限要求
    回调场景

    请求头

      Content-Type:application/json
      X-Bytedance-Logid: 请求 logid, 用于问题排查用
      x-life-clientkey: 服务商应用的 client_key

    请求参数

    请求示例
    暂时无法在飞书文档外展示此内容
    { "amount": { "pay_amount": 400, "origin_amount": 3700, "discount_amount": 3300 }, "poi_id": "7309443067524679724", "open_id": "abcde", "order_id": "1000041821083847671", "order_type": 1, "sku_list": [ { "count": 3, "sku_id": "1804571675007028", "product_id": "1804571674557450", "sku_out_id": "123412345", "item_orders": [ { "sku_specs": [ { "attr_key": "cup", "item_key": "mid_cup", "item_name": "中杯" }, { "attr_key": "sugar", "item_key": "seven", "item_name": "七分糖" }, { "attr_key": "temperature", "item_key": "cold", "item_name": "冷" } ], "item_order_id": "800000084000368998413497671", "item_relations": [ { "relate_to_id": "800000084000368896013817671", "relate_id_type": 1, "relate_to_level": 4, "relate_reason_type": 3 // 关联到团购券Item单 } ] }, { "sku_specs": [ { "attr_key": "cup", "item_key": "mid_cup", "item_name": "中杯" }, { "attr_key": "sugar", "item_key": "seven", "item_name": "七分糖" }, { "attr_key": "temperature", "item_key": "warm", "item_name": "温" } ], "item_order_id": "800000084000369024013007671", "item_relations": [ { "relate_to_id": "800000084000369075213057671", "relate_id_type": 2, "relate_to_level": 4, "relate_reason_type": 2 // 关联到小料品Item单 }, { "relate_to_id": "800000083617023385613887671", "relate_id_type": 1, "relate_to_level": 4, "relate_reason_type": 3 // 关联到团购券Item单 } ] }, { "sku_specs": [ { "attr_key": "cup", "item_key": "mid_cup", "item_name": "中杯" }, { "attr_key": "sugar", "item_key": "seven", "item_name": "七分糖" }, { "attr_key": "temperature", "item_key": "hot", "item_name": "热" } ], "item_order_id": "800000084000369049613577671", "item_relations": [ { "relate_to_id": "800000084000369126413317671", "relate_id_type": 2, "relate_to_level": 4, "relate_reason_type": 2 // 关联到小料品Item单 }, { "relate_to_id": "800000084000369100813097671", "relate_id_type": 2, "relate_to_level": 4, "relate_reason_type": 2 // 关联到小料品Item单 }, { "relate_to_id": "800000083617021977613377671", "relate_id_type": 1, "relate_to_level": 4, "relate_reason_type": 3 // 关联到团购券Item单 } ] } ], "unit_amount": 1100, "product_out_id": "zhizhiputao" }, { "count": 2, "sku_id": "1804571674714202", "product_id": "1804571674714202", "sku_out_id": null, "item_orders": [ { "sku_specs": [], "item_order_id": "800000084000369075213057671", "item_relations": [ { "relate_to_id": "800000084000369024013007671", "relate_id_type": 2, "relate_to_level": 4, "relate_reason_type": 1 // 关联到点单品Item单 } ] }, { "sku_specs": [], "item_order_id": "800000084000369100813097671", "item_relations": [ { "relate_to_id": "800000084000369049613577671", "relate_id_type": 2, "relate_to_level": 4, "relate_reason_type": 1 // 关联到点单品Item单 } ] } ], "unit_amount": 100, "product_out_id": "zzxTest09" }, { "count": 1, "sku_id": "1805349780050954", "product_id": "1805349780050954", "sku_out_id": null, "item_orders": [ { "sku_specs": [], "item_order_id": "800000084000369126413317671", "item_relations": [ { "relate_to_id": "800000084000369049613577671", "relate_id_type": 2, "relate_to_level": 4, "relate_reason_type": 1 // 关联到点单品Item单 } ] } ], "unit_amount": 200, "product_out_id": "zzx_31" } ], "account_id": "7267130009242847276", "source_order_ids": [ "1000041818479367671", "1000041710358407671", "1000041706797447671" ] }

    响应参数

    名称
    类型
    是否必填
    描述
    示例值
    data
    struct
    - error_code
    int
    错误码,合法范围为 [0,999999]
      创单成功:error_code必须设置为0
      请求需要重试:error_code必须设置为100
      创单失败:error_code不能设置为0或100
    0
    - description
    string
    错误信息
    - order_id
    string
    抖音订单ID
    "10011123"
    - order_out_id
    string
    外部订单ID;创单成功时,需要返回
    "1233"
    响应示例

    错误码

      重试-最多12次
      创建订单失败时,若请求未触达商家(如网络错误)或商家返回明确错误码(error_code=100)抖音会进行重试
      重试策略:采用退避策略第一次间隔 5s,之后每次之间间隔 10s, 20s, 40, 60s, 60s, 60s 最多重试12次
      幂等
      为防止重试导致的重复下单,服务商可根据抖音订单 ID 做幂等处理