新建或修改供应商
POST
/api/open/v2/suppliers/createOrUpdate
请求参数
Body 参数application/json
body
object (SupplierSaveParam)
必需
code
string
编码
name
string
名称
procurementTaxRate
number | null
采购税率
staffCodes
array[string] | null
员工编码
contacts
string
联系人
countryCode
string | null
国家(地区)编号
country
string | null
所在地区-国家
province
string | null
所在地区-省份
city
string | null
所在地区-城市
district
string | null
所在地区-区域
defaultPayCondition
string | null
默认付款条件
zipcode
integer | null
邮编
categoryCode
string | null
分类码
fax
string | null
传真
email
string | null
Email
mobilePhone
string | null
手机
phone
string | null
电话
address
string | null
详细地址
comment
string | null
备注
currency
string | null
可选
默认是CNY
bankAccount
string | null
银行账户
bankAccountName
string | null
开户名称
bankName
string | null
开户银行
invoice
string | null
发票抬头
invoiceAddress
string | null
开票地址
invoicePhone
string | null
开票电话
taxNum
string | null
纳税人识别号
trade
string | null
行业
attachmentInfo
array[object (AttachmentDTO) {6}] | null
附件信息
示例
{
"body": {
"code": "string",
"name": "string",
"procurementTaxRate": 0,
"staffCodes": [
"string"
],
"contacts": "string",
"countryCode": "string",
"country": "string",
"province": "string",
"city": "string",
"district": "string",
"defaultPayCondition": "string",
"zipcode": 0,
"categoryCode": "string",
"fax": "string",
"email": "string",
"mobilePhone": "string",
"phone": "string",
"address": "string",
"comment": "string",
"currency": "string",
"bankAccount": "string",
"bankAccountName": "string",
"bankName": "string",
"invoice": "string",
"invoiceAddress": "string",
"invoicePhone": "string",
"taxNum": "string",
"trade": "string",
"attachmentInfo": [
{
"uid": "string",
"url": "string",
"type": "string",
"name": "string",
"size": 0,
"status": "string"
}
]
}
}
示例代码
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://c2.xinheyun.com/api/open/v2/suppliers/createOrUpdate' \
--header 'Content-Type: application/json' \
--data-raw '{
"body": {
"code": "string",
"name": "string",
"procurementTaxRate": 0,
"staffCodes": [
"string"
],
"contacts": "string",
"countryCode": "string",
"country": "string",
"province": "string",
"city": "string",
"district": "string",
"defaultPayCondition": "string",
"zipcode": 0,
"categoryCode": "string",
"fax": "string",
"email": "string",
"mobilePhone": "string",
"phone": "string",
"address": "string",
"comment": "string",
"currency": "string",
"bankAccount": "string",
"bankAccountName": "string",
"bankName": "string",
"invoice": "string",
"invoiceAddress": "string",
"invoicePhone": "string",
"taxNum": "string",
"trade": "string",
"attachmentInfo": [
{
"uid": "string",
"url": "string",
"type": "string",
"name": "string",
"size": 0,
"status": "string"
}
]
}
}'
返回响应
🟢200成功
application/json
Body
com.xinheyun.model.response.BaseResponse
code
integer
可选
message
string
可选
示例
{
"code": 0,
"message": ""
}