新增一张销售发票
POST
/api/saleinvoice/add
适用版本:支持U8V12.0 及更高版本
使用场景:销售应用
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://api.yonyouup.com/api/saleinvoice/add?from_account&to_account&app_key=&token=&tradeid&biz_id' \
--header 'Content-Type: application/json' \
--data-raw '{
"saleinvoice":{
"invoiceno":"0000000001",
"vouchertype":"27",
"saletypecode":"01",
"date":"2015-01-29",
"departmentcode":"0301",
"personcode":"00024",
"customercode":"00000006",
"cbaccount":"9800031344000",
"entry":[
{
"warehousecode":"01",
"inventorycode":"010211",
"quantity":"2",
"number":"2",
"quotedprice":"100",
"originalprice":"85.47",
"originaltaxedprice":"100",
"originalmoney":"170.94",
"originaltax":"29.06",
"originalsum":"200",
"originaldiscount":"0",
"price":"85.47",
"money":"170.94",
"tax":"29.06",
"sum":"200",
"assistantunit":"0501",
"exchangerate":"1",
"unitid":"0501"
}
]
}
}'
响应示例响应示例
{
"errcode": "string",
"errmsg": "string",
"id": "string",
"tradeid": "string"
}
请求参数
Query 参数
from_account
调用方id
to_account
提供方id
app_key
应用编码
token
必需
tradeid
必需
ds_sequence
可选
biz_id
必需
sync
可选
Body 参数application/json