SelSup Developers

公共的 API · 参考 API

制造商

制造商的终点,包括精确的路线,参数,请求机构和可扩展的响应方案.

5 终点/api/manufacturer稳定机器可读的描述 ↗
{ }

通过可编辑的独立合同来支持本页面. 在生产使用之前,验证使用测试数据的写作操作.

/api/manufacturer

准备使用的工作流程

准备使用的工作流程

数据模型

数据结构

模型在此列出一次,并且可以直接从使用它们的终端点扩展.

Manufacturer11 字段
manufacturerIdinteger · int32

制造商身份

titlestring

标题

namestring

姓名.

必填
addressstring

现在,我有个地址.

organizationIdinteger · int64

组织身份证.

clientIdinteger · int64

客户身份证.

read-only
countryIdinteger · int32

国家的身份证.

countryNamestring

国家的名称.

read-only
innstring

酒店.

deletedboolean

删除了.

oneCIdstring

一个公告.

FindResponseManufacturer1 字段
rowsManufacturer[]

排列.

错误合同

如何返回应用错误

编程的代码在每个地方都相同,而用户面向的消息由服务器翻译. 建立在error周围的应用逻辑,仅用于显示.

鱼类

稳定机器可读的代码用于集成逻辑.

鱼类

在API代币用户语言中显示准备的消息.

鱼类

服务器在本地化消息模板中插入的值.

localMessage使用了 API代币的用户的lang字段.文档语言和 Accept-Language标题不会改变它;当用户没有语言配置时,使用俄语.

RU用户位置是 ru
{
  "error": "error_brand_already_exists",
  "localMessage": "Бренд Base уже существует",
  "params": {
    "name": "Base"
  }
}
CN中文 (cn)
{
  "error": "error_brand_already_exists",
  "localMessage": "品牌 Base 已经存在",
  "params": {
    "name": "Base"
  }
}

终点

终点

GET

根据生产商身份查询

/api/manufacturer/{manufacturerId}
读取访问的标志

使用 GET /api/manufacturer/{manufacturerId}.获取制造商身份

路径参数

字段类型必填描述
manufacturerId integer · int32 制造商身份
curl --request GET 'https://api.selsup.ru/api/manufacturer/1001' \
  --header 'Authorization: YOUR_API_TOKEN'

成功的反应

200
对象场 Manufacturer
字段类型必填描述
manufacturerId integer · int32 制造商身份
title string 标题
name string 姓名.
address string 现在,我有个地址.
organizationId integer · int64 组织身份证.
clientId integer · int64 客户身份证.
countryId integer · int32 国家的身份证.
countryName string 国家的名称.
inn string 酒店.
deleted boolean 删除了.
oneCId string 一个公告.
{
  "name": "Example",
  "manufacturerId": 1001,
  "title": "Example",
  "address": "string",
  "organizationId": 1001,
  "clientId": 1001
}
错误6

应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑

401auth_required
需要进行认证

Authorization 缺失,空,或包含无效的代币.

400error_access_denied
拒绝访问

代币存在,但它的作用不能执行这个操作.

500error_unknown
发生了一个未知的错误。如果该问题再次发生,请联系支持

节省请求时间和联系支持;不要盲目重新尝试突变.

400error_manufacturer_not_found
未发现制造商: {id}。

应用逻辑中使用稳定的error_manufacturer_not_found代码;localMessage包含上述翻译.

400error_no_client
没有找到该客户或已被删除。写信给支持部门

应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.

400error_subscription_expired
你的费率已经过期。支付关税以继续使用该服务。

应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.

PUT

更新制造商

/api/manufacturer/{manufacturerId}
具有写入的标志

使用 PUT /api/manufacturer/{manufacturerId}. 更新制造商

路径参数

字段类型必填描述
manufacturerId integer · int64 制造商身份

要求机构

application/json
对象场Manufacturer
字段类型必填描述
manufacturerId integer · int32 制造商身份
title string 标题
name string 姓名.
address string 现在,我有个地址.
organizationId integer · int64 组织身份证.
clientId integer · int64 客户身份证.
countryId integer · int32 国家的身份证.
countryName string 国家的名称.
inn string 酒店.
deleted boolean 删除了.
oneCId string 一个公告.
curl --request PUT 'https://api.selsup.ru/api/manufacturer/1001' \
  --header 'Authorization: YOUR_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Example",
  "manufacturerId": 1001,
  "title": "Example",
  "address": "string",
  "organizationId": 1001,
  "clientId": 1001
}'

成功的反应

200
对象场 Manufacturer
字段类型必填描述
manufacturerId integer · int32 制造商身份
title string 标题
name string 姓名.
address string 现在,我有个地址.
organizationId integer · int64 组织身份证.
clientId integer · int64 客户身份证.
countryId integer · int32 国家的身份证.
countryName string 国家的名称.
inn string 酒店.
deleted boolean 删除了.
oneCId string 一个公告.
{
  "name": "Example",
  "manufacturerId": 1001,
  "title": "Example",
  "address": "string",
  "organizationId": 1001,
  "clientId": 1001
}
错误7

应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑

401auth_required
需要进行认证

Authorization 缺失,空,或包含无效的代币.

400error_access_denied
拒绝访问

代币存在,但它的作用不能执行这个操作.

500error_unknown
发生了一个未知的错误。如果该问题再次发生,请联系支持

节省请求时间和联系支持;不要盲目重新尝试突变.

400error_empty_manufacturer_name
未注明制造商名称

应用逻辑中使用稳定的error_empty_manufacturer_name代码;localMessage包含上述翻译.

400error_manufacturer_already_exist
已经有一个制造商的名字是 {name}。

应用逻辑中使用稳定的error_manufacturer_already_exist代码;localMessage包含上述翻译.

400error_no_client
没有找到该客户或已被删除。写信给支持部门

应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.

400error_subscription_expired
你的费率已经过期。支付关税以继续使用该服务。

应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.

DELETE

移除制造商

/api/manufacturer/{manufacturerId}
具有写入的标志

使用 DELETE /api/manufacturer/{manufacturerId}.的制造商删除

路径参数

字段类型必填描述
manufacturerId integer · int32 制造商身份

查询参数

字段类型必填描述
deleted boolean 删除了.
curl --request DELETE 'https://api.selsup.ru/api/manufacturer/1001?deleted=false' \
  --header 'Authorization: YOUR_API_TOKEN'

成功的反应

200
"string"
错误3

应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑

401auth_required
需要进行认证

Authorization 缺失,空,或包含无效的代币.

400error_access_denied
拒绝访问

代币存在,但它的作用不能执行这个操作.

500error_unknown
发生了一个未知的错误。如果该问题再次发生,请联系支持

节省请求时间和联系支持;不要盲目重新尝试突变.

POST

创建制造商

/api/manufacturer
具有写入的标志

使用 POST /api/manufacturer.创建制造商

要求机构

application/json
对象场Manufacturer
字段类型必填描述
manufacturerId integer · int32 制造商身份
title string 标题
name string 姓名.
address string 现在,我有个地址.
organizationId integer · int64 组织身份证.
clientId integer · int64 客户身份证.
countryId integer · int32 国家的身份证.
countryName string 国家的名称.
inn string 酒店.
deleted boolean 删除了.
oneCId string 一个公告.
curl --request POST 'https://api.selsup.ru/api/manufacturer' \
  --header 'Authorization: YOUR_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Example",
  "manufacturerId": 1001,
  "title": "Example",
  "address": "string",
  "organizationId": 1001,
  "clientId": 1001
}'

成功的反应

200
对象场 Manufacturer
字段类型必填描述
manufacturerId integer · int32 制造商身份
title string 标题
name string 姓名.
address string 现在,我有个地址.
organizationId integer · int64 组织身份证.
clientId integer · int64 客户身份证.
countryId integer · int32 国家的身份证.
countryName string 国家的名称.
inn string 酒店.
deleted boolean 删除了.
oneCId string 一个公告.
{
  "name": "Example",
  "manufacturerId": 1001,
  "title": "Example",
  "address": "string",
  "organizationId": 1001,
  "clientId": 1001
}
错误7

应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑

401auth_required
需要进行认证

Authorization 缺失,空,或包含无效的代币.

400error_access_denied
拒绝访问

代币存在,但它的作用不能执行这个操作.

500error_unknown
发生了一个未知的错误。如果该问题再次发生,请联系支持

节省请求时间和联系支持;不要盲目重新尝试突变.

400error_empty_manufacturer_name
未注明制造商名称

应用逻辑中使用稳定的error_empty_manufacturer_name代码;localMessage包含上述翻译.

400error_manufacturer_already_exist
已经有一个制造商的名字是 {name}。

应用逻辑中使用稳定的error_manufacturer_already_exist代码;localMessage包含上述翻译.

400error_no_client
没有找到该客户或已被删除。写信给支持部门

应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.

400error_subscription_expired
你的费率已经过期。支付关税以继续使用该服务。

应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.

GET

找一个

/api/manufacturer/find
读取访问的标志

使用 GET 找到 /api/manufacturer/find.

查询参数

字段类型必填描述
query string 问问.
manufacturerOneCId string 制造商1号信息中心
limit integer · int32 限制.
page integer · int32 页面.
count boolean 伯爵.
sortBy stringMANUFACTURERID, NAME 排序了.
ascending boolean 升高.
curl --request GET 'https://api.selsup.ru/api/manufacturer/find?limit=50&page=1' \
  --header 'Authorization: YOUR_API_TOKEN'

成功的反应

200
对象场 FindResponseManufacturer
字段类型必填描述
rows Manufacturer[] 排列.
阵列项结构 Manufacturer
字段类型必填描述
manufacturerId integer · int32 制造商身份
title string 标题
name string 姓名.
address string 现在,我有个地址.
organizationId integer · int64 组织身份证.
clientId integer · int64 客户身份证.
countryId integer · int32 国家的身份证.
countryName string 国家的名称.
inn string 酒店.
deleted boolean 删除了.
oneCId string 一个公告.
{
  "rows": "string"
}
错误5

应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑

401auth_required
需要进行认证

Authorization 缺失,空,或包含无效的代币.

400error_access_denied
拒绝访问

代币存在,但它的作用不能执行这个操作.

500error_unknown
发生了一个未知的错误。如果该问题再次发生,请联系支持

节省请求时间和联系支持;不要盲目重新尝试突变.

400error_no_client
没有找到该客户或已被删除。写信给支持部门

应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.

400error_subscription_expired
你的费率已经过期。支付关税以继续使用该服务。

应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.

Authorization

测试请求的标志

代币存储在本浏览器的本地存储库中,只会在要求的Authorization头上发送到 api.selsup.ru.

试一试

实际请求参数

现场API响应

发送请求查看SelSup的响应.