票据出票对外接口
开发中
POST
/v3/bill/draw/apply
业务错误码#
错误码 | 错误描述(详情请看返回响应示例) | 解决方案 |
---|---|---|
000000 | 操作成功 | |
300000 | 业务处理异常 | 根据详细提示检查信息或联系相关技术人员进行排查 |
400001 | 入参校验错误 | 请检查入参信息(必填,格式,匹配值,长度等) |
400000 | 业务处理异常,详细错误信息会在data中 | 请检查入参信息(相关信息是否维护,数据是否可操作等) |
400002 | 当前来源批次号重复 | 请检查入参来源批次号信息(来源批次号是否存在并发操作) |
400003 | 数据库来源批次号重复 | 请检查入参来源批次号信息(来源批次号是否已经操作过) |
400004 | 批次内流水号重复 | 请检查入参批次内流水号信息(批次内流水号是否重复) |
400005 | 数据库批内流水号重复 | 请检查入参批次内流水号信息(批次内流水号是否已经操作过) |
请求参数
Body 参数application/json
tenant_id
string
租户id
source_batch_no
string
来源批次号
bill_info_rows
array [object {27}]
必需
source_serial_number
string
来源流水号,每一笔票据唯一
bill_type_code
integer
票据类型
1 电子银行承兑汇票 ,
2 电子商业承兑汇票 ,
13 云信 ,
15 供应链票据;
bill_open_way
integer | null
出票方式
枚举值:
1 全额保证金开票,
2 一定比例开票,
3 质押开票,
4 资产池开票,
5 汽车金融开票,
6 商票保贴开票,
7 信用开票;
online_type
integer
是否直联
amount
string
出票金额
open_bill_date
string
出票日期/开立日期(云信)
end_bill_date
string
到期日期/承诺付款日(云信)
bill_version_type_code
string
票据版本
BILL01 一代票,
BILL02 二代票;
云信只支持二代票
bill_code
string | null
票据号码
is_allow_endorse
integer | null
是否允许流转
split_flag
integer | null
是否允许拆分
biz_type_code
string
支付业务类型
sign_date
string | null
对方签收日期
is_agent
integer | null
是否集团代理开票
is_occupy_credit_contract
integer | null
是否占用授信
pay_fee_rate
string | null
费率
acceptor_type
integer | null
承兑类型
1 在线承兑,
2 普通承兑;
protocol_no
string | null
协议号
comment
string
备注
limit_code
string | null
额度编号
drawer_info
object
出票人信息
payee_info
object
收款人信息
acceptor_info
object | null
承兑人信息
quota_info
object | null
云信额度信息
agent_info
object
集团代理开票信息
bail_info
object | null
保证金信息
credit_info_rows
array [object {1}] | null
占用授信合同信息
示例
{
"tenant_id": "21",
"source_batch_no": "proident eu pariatur cupidatat commodo",
"bill_info_rows": [
{
"source_serial_number": "38",
"bill_type_code": 13,
"bill_open_way": 6,
"online_type": 1,
"amount": 800,
"open_bill_date": "2025-10-15",
"end_bill_date": "2024-10-19",
"bill_version_type_code": "BILL02",
"bill_code": "65",
"is_allow_endorse": 1,
"split_flag": 1,
"biz_type_code": "HK",
"sign_date": "2024-01-22",
"is_agent": 0,
"is_occupy_credit_contract": 0,
"pay_fee_rate": 73,
"acceptor_type": 42,
"protocol_no": "proident voluptate eu elit",
"comment": "consectetur nostrud",
"limit_code": "41",
"drawer_info": {
"account_number": "75",
"org_name": "邓锐专用",
"org_code": "100011"
},
"payee_info": {
"payee": "ex",
"account_name": "着交只",
"account_number": "28",
"bank_branch_name": "层层接",
"bank_branch_code": "16",
"social_credit_code": "66"
},
"acceptor_info": {
"acceptor": null,
"account_number": "33",
"account_name": "将什理",
"bank_branch_name": "况安相",
"bank_branch_code": "1"
},
"quota_info": {
"core_entpay_type": 13
},
"agent_info": {
"org_name": "根且九",
"org_code": "19",
"account_number": "61",
"account_name": "节身养",
"bank_branch_name": "为月见",
"bank_branch_code": "4"
},
"bail_info": null,
"credit_info_rows": [
{
"occupy_credit_no": "elit minim pariatur id ullamco"
},
{
"occupy_credit_no": null
}
],
"bill_attachment_rows": null
}
]
}
示例代码
Java
Shell
JavaScript
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Java
Shell
JavaScript
Swift
curl --location --request POST '/v3/bill/draw/apply' \
--header 'Content-Type: application/json' \
--data-raw '{
"tenant_id": "21",
"source_batch_no": "proident eu pariatur cupidatat commodo",
"bill_info_rows": [
{
"source_serial_number": "38",
"bill_type_code": 13,
"bill_open_way": 6,
"online_type": 1,
"amount": 800,
"open_bill_date": "2025-10-15",
"end_bill_date": "2024-10-19",
"bill_version_type_code": "BILL02",
"bill_code": "65",
"is_allow_endorse": 1,
"split_flag": 1,
"biz_type_code": "HK",
"sign_date": "2024-01-22",
"is_agent": 0,
"is_occupy_credit_contract": 0,
"pay_fee_rate": 73,
"acceptor_type": 42,
"protocol_no": "proident voluptate eu elit",
"comment": "consectetur nostrud",
"limit_code": "41",
"drawer_info": {
"account_number": "75",
"org_name": "邓锐专用",
"org_code": "100011"
},
"payee_info": {
"payee": "ex",
"account_name": "着交只",
"account_number": "28",
"bank_branch_name": "层层接",
"bank_branch_code": "16",
"social_credit_code": "66"
},
"acceptor_info": {
"acceptor": null,
"account_number": "33",
"account_name": "将什理",
"bank_branch_name": "况安相",
"bank_branch_code": "1"
},
"quota_info": {
"core_entpay_type": 13
},
"agent_info": {
"org_name": "根且九",
"org_code": "19",
"account_number": "61",
"account_name": "节身养",
"bank_branch_name": "为月见",
"bank_branch_code": "4"
},
"bail_info": null,
"credit_info_rows": [
{
"occupy_credit_no": "elit minim pariatur id ullamco"
},
{
"occupy_credit_no": null
}
],
"bill_attachment_rows": null
}
]
}'
返回响应
🟢200成功
application/json
Body
code
integer
响应code
msg
string
响应信息
success
boolean
是否成功
data
object
响应数据
source_batch_no
string