跳到主要内容

发票

添加发票抬头

创建新的发票抬头。

  • URL/member/invoiceTitle/appCreateInvoiceTitle
  • MethodPOST
  • 需要鉴权:是

请求参数

参数类型约束说明
invoiceTypeLong-发票类型,1-普票,2-专票
titleString-发票抬头
titleTypeLong-抬头类型,1-个人,2-公司
taxNoString-发票税号
addressString-注册地址
phoneString-注册电话
bankAddressString-开户银行
bankNoString-银行账号
emailString-邮箱

请求示例

{
"title": "张三",
"titleType": 1,
"taxNo": "12345678910",
"address": "北京市大兴区",
"phone": "12345678911",
"bankAddress": "工商银行",
"bankNo": "987654321123456",
"email": "123@qq.com"
}

响应示例

{
"code": 200,
"data": 2,
"msg": "成功"
}

响应说明

参数类型说明
dataLong发票抬头编号

更新发票抬头

修改已有的发票抬头信息。

  • URL/member/invoiceTitle/appUpdateInvoiceTitle
  • MethodPOST
  • 需要鉴权:是

请求参数

参数类型约束说明
idLong必传发票抬头编号
titleString-发票抬头
titleTypeString-抬头类型,1-个人,2-公司
taxNoString-发票税号
addressString-注册地址
phoneString-注册电话
bankAddressString-开户银行地址
bankNoString-银行账号

请求示例

{
"id": 2,
"title": "张三",
"titleType": 1,
"taxNo": "12345678910",
"address": "北京市大兴区",
"phone": "12345678911",
"bankAddress": "工商银行",
"bankNo": "987654321123456"
}

响应示例

{
"code": 200,
"data": true,
"msg": "成功"
}

响应说明

参数类型说明
dataBooleantrue 成功,false 失败

获取发票抬头列表

获取用户的发票抬头列表,按企业和个人分类返回。

  • URL/member/invoiceTitle/appGetInvoiceTitleList
  • MethodPOST
  • 需要鉴权:是

请求参数

参数类型约束说明
titleTypeInteger-抬头类型,1-个人,2-公司,不筛选则传 null

请求示例

// 获取抬头类型为个人的抬头
{
"titleType": 1
}

// 获取抬头类型为企业的抬头
{
"titleType": 2
}

响应示例

{
"code": 200,
"data": {
"companyList": [
{
"id": 2,
"title": "久滴科技有限公司",
"titleType": 2,
"taxNo": "1234567891011111",
"address": "北京市大兴区西红门",
"phone": "12345678911",
"bankAddress": "招商银行",
"bankNo": "987654321123456"
}
],
"personList": [
{
"id": 1,
"title": "张三",
"titleType": 1,
"taxNo": "12345678910",
"address": "北京市大兴区",
"phone": "12345678911",
"bankAddress": "招商银行",
"bankNo": "987654321123456"
}
]
},
"msg": "成功"
}

响应说明

参数类型说明
companyListList企业发票列表
personListList个人发票列表
companyList.idLong发票抬头编号
companyList.titleString发票抬头
companyList.titleTypeString抬头类型,1-个人,2-公司
companyList.taxNoString发票税号
companyList.addressString注册地址
companyList.phoneString注册电话
companyList.bankAddressString开户银行地址
companyList.bankNoString银行账号
说明

个人发票列表字段同企业发票列表。


删除发票抬头

删除指定的发票抬头。

  • URL/member/invoiceTitle/appDeleteInvoiceTitle/{id}
  • MethodPOST
  • 需要鉴权:是

请求参数

路径参数,{id} 为发票抬头编号。

请求示例

POST /member/invoiceTitle/appDeleteInvoiceTitle/2

响应示例

{
"code": 200,
"data": true,
"msg": "成功"
}

响应说明

参数类型说明
dataBooleantrue 成功,false 失败

添加发票信息(订单开票)

为订单添加开票信息。

  • URL/member/invoiceInfo/appCreateOrderInvoiceInfo
  • MethodPOST
  • 需要鉴权:是

请求参数

参数类型约束说明
orderNumberLong必传订单号
invoiceTypeLong必传发票类型,1-普票,2-专票
invoicePriceString必传开票金额
titleString必传发票抬头
titleTypeString必传抬头类型,1-个人,2-公司
taxNoString-发票税号
addressString-注册地址
phoneString-注册电话
bankAddressString-开户银行地址
bankNoString-银行账号
typeLong必传发票类型,1-纸质票,2-电子票
emailString电子票必传邮箱
mailingAddressString纸质票必传邮寄地址

请求示例

{
"orderNumber": 1731695587630235648,
"invoiceType": 1,
"invoicePrice": 499,
"titleType": 1,
"title": "张三",
"taxNo": "12345678910",
"address": "北京市大兴区",
"phone": "12345678911",
"bankAddress": "招商银行",
"bankNo": "987654321123456",
"type": 2,
"email": "123@qq.com",
"mailingAddress": null
}

响应示例

成功:

{
"code": 200,
"data": true,
"msg": "成功"
}

订单已存在开票信息:

{
"code": 2000024,
"data": null,
"msg": "该订单已存在开票信息"
}

响应说明

参数类型说明
dataBooleantrue 成功,false 失败

获取开票/已开发票列表

获取申请开票列表或已开发票列表。

  • URL/member/invoiceInfo/appOrderInvoicedListPage
  • MethodPOST
  • 需要鉴权:是

请求参数

参数类型约束说明
invoiceTypeLong必传1-申请开票列表,2-已开发票列表(含已申请、开票中、开票完成)

请求示例

申请开票:

{
"invoiceType": 1,
"pageNo": 1,
"pageSize": 10
}

已开发票:

{
"invoiceType": 2,
"pageNo": 1,
"pageSize": 10
}

响应示例

{
"code": 200,
"data": {
"list": [
{
"tradeOrderId": 96,
"no": "O202310020940161",
"createTime": 1696210817000,
"payPrice": 699900,
"invoiceStatus": 3,
"spuName": "HUAWEI Mate 60 Pro",
"picUrl": "https://example.com/image.jpg",
"type": 2,
"invoiceUrl": "http://www.example.com/invoice"
}
],
"total": 1
},
"msg": "成功"
}

响应说明

参数类型说明
tradeOrderIdLong订单 ID 编号
noString订单号(订单流水号)
createTimeLocalDateTime开票时间
payPriceInteger开票金额,单位:分
invoiceStatusLong开票状态,0-未开票,1-已申请,2-开票中,3-开票完成
spuNameStringSPU 名称
picUrlStringSPU 封面图
typeLong发票类型,1-纸质票,2-电子票
invoiceUrlString电子票地址
totalLong分页总数量
说明
  • typeinvoiceUrl 在申请开票列表中不返回。
  • 在已开票列表中,仅电子票时 invoiceUrl 有值,其它情况为 null