- 整体介绍
- 对接约定
- 授权
- 开票
- 产品介绍
- 开发指南
- 税控&数电同步开票
- 业务场景下接口调用顺序
- 1.01.读取税盘信息(czlx-7)
- 1.02 .读取票种信息(czlx-30)
- 1.03.发票开具(czlx-3)
- 1.04.发票作废(czlx-6)
- 1.05.发票查询(czlx-5)
- 1.06.发票打印(czlx-4)
- 1.07.专用发票申请红字信息表(czlx-20)
- 1.08.查询专用发票申请红字信息表(czlx-18)
- 1.09.批量打印(czlx-32)
- 1.11.机动车销售统一发票开具(czlx-40)
- 1.12.机动车销售统一发票查询(czlx-41)
- 1.13.机动车销售统一发票红冲(czlx-42)
- 1.15.核定票种查询(czlx-51)
- 1.21.二手车-发票开具(czlx-43)
- 1.22.二手车-发票查询(czlx-44)
- 1.23.二手车-发票红冲(czlx-45)
- 1.30 .查询授信额度接口(czlx-122)
- 2.01.电子发票开具(czlx-110) ,【注】开数电票请对接:1.03.发票开具(czlx-3)
- 2.02.电子发票信息查询(czlx-113)
- 2.03.电子发票红冲 (只支持全额红冲)(czlx-114)
- 2.04.刷新PDF(czlx-115)
- 2.05.查询电子发票余量(czlx-116)
- 3.01.查询税收分类编码信息(czlx-504)
- 3.03.获取打印机列表(czlx-901)
- 数电异步开票
- 扫码开票
- 企业级-发票云销项查询
- 收票
- 查验识别
- 报销
- 影像
- 档案
2.上传发票销售单接口
测试环境(除税控、数电和扫码开票外的接口)
https://api-dev.piaozone.com/test
测试环境(除税控、数电和扫码开票外的接口)
https://api-dev.piaozone.com/test
POST
/m5/bill/save/salesOrder
上传发票销售单接口
正确返回码 | 描述 |
---|---|
0000 | 保存数据成功 |
错误返回码 | 描述 |
---|---|
0520 | 开票方企业税号不能为空 |
00552 | 销售单编号不能为空 |
00553 | 销售单日期不能为空 |
00554 | 销售单发票类型不能为空 |
00555 | 分盘号不能为空 |
00556 | 销售单明细不能为空 |
00550 | 销售单开票金额不能为空 |
00551 | 销售单金额不能为空 |
00548 | 销售单编号超过规定长度40位 |
00549 | 销售单备注超过规定长度230位 |
00505 | 买方银行账号超过规定长度100位 |
00506 | 买方地址电话超过规定长度100位 |
00579 | 买方邮箱超长 |
00544 | 买方手机号码超长 |
0581 | 买方税号超长 |
00504 | 抬头超过规定长度100位 |
00565 | 销售单已存在,不能重复导入 |
00559 | 商品名称不能为空 |
00560 | 商品编码长度必须为19位 |
00561 | 优惠使用标识参数错误 |
00562 | 发票使用标记为1时,增值税特殊管理不能为空 |
00563 | 明细金额不能为空 |
00564 | 明细税率不能为空 |
00509 | 单位超过规定长度20位 |
00508 | 规格型号超过规定长度40位 |
00507 | 货物名称超过规定长度90位 |
00581 | 企业自编码超过规定长度 |
00580 | 订单总折扣金额大于0时,折扣方式不能为空 |
00583 | 明细税率为零时,必须有零税率标识 |
00569 | 明细金额之和不等于总金额 |
00568 | 总金额减去折扣额不等于开票金额 |
00567 | 折扣金额大于可折扣比例金额 |
0001 | 保存数据失败 |
请求参数
Path 参数
access_token
string
必需
Query 参数
access_token
string
必需
reqid
string
当前时间戳,13位
Body 参数application/json
saleNo
string
订单编号
saleDate
string
必需
invoiceType
string
必需
totalAmount
number
必需
totalDiscount
number
必需
invoiceAmount
number
必需
discountedPortion
number
必需
discountType
string
必需
termValidity
number
必需
remark
string
备注
buyerName
string
可选
buyerTaxNo
string
可选
buyerTelephoneAddress
string
可选
buyerAccount
string
可选
buyerEmail
string
可选
buyerMobilePhone
string
可选
taxDiscNum
string
必需
taxFlag
string
必需
items
array [object {13}]
必需
ownNumber
string
商品自编码
name
string
商品明细名称
spec
string
规格型号
num
number
数量,小数点后8位
unitPrice
number
可选
unit
string
单位
taxRate
number
税率,小数点后两位
taxNumber
string
税收分类编码
zeroTaxFlag
number
可选
prePolicy
number
可选
vatException
string
可选
detailTotalAmount
number
可选
detailTotalDiscount
number
可选
示例
{
"saleNo": "string",
"saleDate": "string",
"invoiceType": "string",
"totalAmount": 0,
"totalDiscount": 0,
"invoiceAmount": 0,
"discountedPortion": 0,
"discountType": "string",
"termValidity": 0,
"remark": "string",
"buyerName": "string",
"buyerTaxNo": "string",
"buyerTelephoneAddress": "string",
"buyerAccount": "string",
"buyerEmail": "string",
"buyerMobilePhone": "string",
"taxDiscNum": "string",
"taxFlag": "string",
"items": [
{
"ownNumber": "string",
"name": "string",
"spec": "string",
"num": 0,
"unitPrice": 0,
"unit": "string",
"taxRate": 0,
"taxNumber": "string",
"zeroTaxFlag": 0,
"prePolicy": 0,
"vatException": "string",
"detailTotalAmount": 0,
"detailTotalDiscount": 0
}
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api-dev.piaozone.com/test/m5/bill/save/salesOrder?access_token=&reqid=' \
--header 'Content-Type: application/json' \
--data-raw '{
"saleNo": "string",
"saleDate": "string",
"invoiceType": "string",
"totalAmount": 0,
"totalDiscount": 0,
"invoiceAmount": 0,
"discountedPortion": 0,
"discountType": "string",
"termValidity": 0,
"remark": "string",
"buyerName": "string",
"buyerTaxNo": "string",
"buyerTelephoneAddress": "string",
"buyerAccount": "string",
"buyerEmail": "string",
"buyerMobilePhone": "string",
"taxDiscNum": "string",
"taxFlag": "string",
"items": [
{
"ownNumber": "string",
"name": "string",
"spec": "string",
"num": 0,
"unitPrice": 0,
"unit": "string",
"taxRate": 0,
"taxNumber": "string",
"zeroTaxFlag": 0,
"prePolicy": 0,
"vatException": "string",
"detailTotalAmount": 0,
"detailTotalDiscount": 0
}
]
}'
返回响应
🟢200成功
application/json
Body
object {0}
示例
{"errcode":"0000","description":"保存数据成功","data":"http://scan.piaozone.com/demo/tyqr?k=000490,12345rwyt4y4jkhlhjk,200,1656382079428,432259adea170f7da2c6cf25432139c4,$"}
🟢200失败