查询对账单

更新时间 2024-07-24 02:58:49
收藏
我的收藏

接口说明

获取用户单日领券记录,与本地记录进行比对,及时补充缺省的券数据,可防止资金亏损。

使用限制

只可查询T-1到6个月前内数据。

基本信息

名称描述
HTTP URL
https://open.douyin.com/api/promotion/v1/coupon/get_bill_download_url/
HTTP Method
POST
Scope
promotion.coupon.admin

请求头

名称字段类型是否必填示例描述
access-tokenStringclt.943da17996fb5cebfbc70c044c3fc25a57T54DcjT6HNKGqnUdxzy1KcxFnZ
content-typeStringapplication/json
固定值"application/json"

请求参数

Body

名称字段类型是否必填示例描述
app_idStringttec789ac573xxxxxx01

应用appid

bill_dateString20230405

账单时间,格式为yyyyMMdd

bill_typeStringreceive_record

账单类型,当前支持的账单类型有:

  • receive_record:用户领券记录

请求示例

curl --location --request POST 'https://open.douyin.com/api/promotion/v1/coupon/get_bill_download_url' \
--header 'Content-Type: application/json' \
--header 'access-token: clt.xxx' \
--data-raw '{
    "bill_type":"receive_record",
    "bill_date": "20230405",
    "app_id": "ttec789ac573xxxxxx01"
}' 

响应参数

Body

名称字段类型是否必填示例描述
err_msgString

err_no非0时对应的错误信息文案提示,成功时为空字符串

err_noInt320

0表示成功

is_generatedBooltrue

是否完成营销账单生成,为false时表示账单还在生成中,需等待一段时间后重新调用接口获取链接。

log_idString202008121419360101980821035705926A

标识请求的唯一id

响应示例

正常响应示例

{
  "err_no": 0,
  "err_msg": "",
  "log_id": "202008121419360101980821035705926A",
  "data": {
    "bill_download_url": "https://p0-open-promotion-private.byteimg.com/tos-cn-i-gyhr0m0lve/20160405_tt123456789_coupon_record.csv"
  }
}

异常响应示例

{
  "err_no": 28001007,
  "err_msg": "参数不合法",
  "log_id": "202008121419360101980821035705926A"
}

错误码

http状态码错误码错误码描述排查建议
2000
success
接口请求成功,无需排查
20028001005
系统内部错误,请重试
请求重试,若依然无解请向平台提交反馈
20028001007
参数不合法
检查请求参数是否填写正常
20029005077
资源不存在
无对账数据