SelSup Developers

公共的 API · 参考 API

假设测试

假设测试的终点,包括精确的路线,参数,请求机体和可扩展的响应方案.

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

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

/api/hypothesis

准备使用的工作流程

准备使用的工作流程

01

开始使用假设测试

使用专用API代币,首先验证测试数据的读取操作.

  1. 保存代币服务器侧,然后将其发送到Authorization标题中.
  2. 检查所需参数,并扩大请求或响应方案.
  3. 在应用错误中处理HTTP状态和稳定的error字段.

数据模型

数据结构

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

Hypothesis14 字段
idinteger · int32

Id.

namestring

姓名.

previousStartDatestring · date-time

之前的开始日期.

startDatestring · date-time

开始日期.

endDatestring · date-time

终结日期.

modelIdinteger · int64

模型身份证.

modelArticlestring

标题:

viewIdinteger · int64

查看ID.

productIdinteger · int64

产品身份证

organizationIdinteger · int64

组织身份证.

createdDatestring · date-time

创造日期.

createdUserstring

创建用户.

servicestring

服务.

successStatusstring

成功状态.

FindResponseHypothesis1 字段
rowsHypothesis[]

排列.

错误合同

如何返回应用错误

编程的代码在每个地方都相同,而用户面向的消息由服务器翻译. 建立在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"
  }
}

终点

终点

POST

假设

/api/hypothesis/
具有写入的标志

使用POSTX/api/hypothesis/.的假设

要求机构

application/json
对象场Hypothesis
字段类型必填描述
id integer · int32 Id.
name string 姓名.
previousStartDate string · date-time 之前的开始日期.
startDate string · date-time 开始日期.
endDate string · date-time 终结日期.
modelId integer · int64 模型身份证.
modelArticle string 标题:
viewId integer · int64 查看ID.
productId integer · int64 产品身份证
organizationId integer · int64 组织身份证.
createdDate string · date-time 创造日期.
createdUser string 创建用户.
service stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC 服务.
successStatus stringNONE, SUCCESSFUL, UNSUCCESSFUL 成功状态.
curl --request POST 'https://api.selsup.ru/api/hypothesis/' \
  --header 'Authorization: YOUR_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": 1001,
  "name": "Example",
  "previousStartDate": "2026-01-15T12:00:00Z",
  "startDate": "2026-01-15T12:00:00Z",
  "endDate": "2026-01-15T12:00:00Z",
  "modelId": 1001
}'

成功的反应

200
对象场 Hypothesis
字段类型必填描述
id integer · int32 Id.
name string 姓名.
previousStartDate string · date-time 之前的开始日期.
startDate string · date-time 开始日期.
endDate string · date-time 终结日期.
modelId integer · int64 模型身份证.
modelArticle string 标题:
viewId integer · int64 查看ID.
productId integer · int64 产品身份证
organizationId integer · int64 组织身份证.
createdDate string · date-time 创造日期.
createdUser string 创建用户.
service stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC 服务.
successStatus stringNONE, SUCCESSFUL, UNSUCCESSFUL 成功状态.
{
  "id": 1001,
  "name": "Example",
  "previousStartDate": "2026-01-15T12:00:00Z",
  "startDate": "2026-01-15T12:00:00Z",
  "endDate": "2026-01-15T12:00:00Z",
  "modelId": 1001
}
错误8

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

401auth_required
需要进行认证

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

400error_access_denied
拒绝访问

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

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

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

400error_empty_end_date
未指定结束日期

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

400error_empty_name
没有给出名字

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

400error_empty_start_date
未指定开始日期

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

400error_end_less_then_start_date
结束日期必须大于开始日期

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

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

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

GET

标签:

/api/hypothesis/{id}
读取访问的标志

使用 GET /api/hypothesis/{id}.的ID

路径参数

字段类型必填描述
id integer · int32 Id.
curl --request GET 'https://api.selsup.ru/api/hypothesis/1001' \
  --header 'Authorization: YOUR_API_TOKEN'

成功的反应

200
对象场 Hypothesis
字段类型必填描述
id integer · int32 Id.
name string 姓名.
previousStartDate string · date-time 之前的开始日期.
startDate string · date-time 开始日期.
endDate string · date-time 终结日期.
modelId integer · int64 模型身份证.
modelArticle string 标题:
viewId integer · int64 查看ID.
productId integer · int64 产品身份证
organizationId integer · int64 组织身份证.
createdDate string · date-time 创造日期.
createdUser string 创建用户.
service stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC 服务.
successStatus stringNONE, SUCCESSFUL, UNSUCCESSFUL 成功状态.
{
  "id": 1001,
  "name": "Example",
  "previousStartDate": "2026-01-15T12:00:00Z",
  "startDate": "2026-01-15T12:00:00Z",
  "endDate": "2026-01-15T12:00:00Z",
  "modelId": 1001
}
错误4

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

401auth_required
需要进行认证

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

400error_access_denied
拒绝访问

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

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

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

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

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

PATCH

补丁假设

/api/hypothesis/{id}
具有写入的标志

使用 PATCH /api/hypothesis/{id}.的补丁假设

要求机构

application/json
对象场Hypothesis
字段类型必填描述
id integer · int32 Id.
name string 姓名.
previousStartDate string · date-time 之前的开始日期.
startDate string · date-time 开始日期.
endDate string · date-time 终结日期.
modelId integer · int64 模型身份证.
modelArticle string 标题:
viewId integer · int64 查看ID.
productId integer · int64 产品身份证
organizationId integer · int64 组织身份证.
createdDate string · date-time 创造日期.
createdUser string 创建用户.
service stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC 服务.
successStatus stringNONE, SUCCESSFUL, UNSUCCESSFUL 成功状态.
curl --request PATCH 'https://api.selsup.ru/api/hypothesis/%7Bid%7D' \
  --header 'Authorization: YOUR_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": 1001,
  "name": "Example",
  "previousStartDate": "2026-01-15T12:00:00Z",
  "startDate": "2026-01-15T12:00:00Z",
  "endDate": "2026-01-15T12:00:00Z",
  "modelId": 1001
}'

成功的反应

200
对象场 Hypothesis
字段类型必填描述
id integer · int32 Id.
name string 姓名.
previousStartDate string · date-time 之前的开始日期.
startDate string · date-time 开始日期.
endDate string · date-time 终结日期.
modelId integer · int64 模型身份证.
modelArticle string 标题:
viewId integer · int64 查看ID.
productId integer · int64 产品身份证
organizationId integer · int64 组织身份证.
createdDate string · date-time 创造日期.
createdUser string 创建用户.
service stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC 服务.
successStatus stringNONE, SUCCESSFUL, UNSUCCESSFUL 成功状态.
{
  "id": 1001,
  "name": "Example",
  "previousStartDate": "2026-01-15T12:00:00Z",
  "startDate": "2026-01-15T12:00:00Z",
  "endDate": "2026-01-15T12:00:00Z",
  "modelId": 1001
}
错误9

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

401auth_required
需要进行认证

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

400error_access_denied
拒绝访问

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

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

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

400error_empty_end_date
未指定结束日期

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

400error_empty_id
未指定标识符

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

400error_empty_name
没有给出名字

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

400error_empty_start_date
未指定开始日期

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

400error_end_less_then_start_date
结束日期必须大于开始日期

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

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

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

DELETE

删除假设

/api/hypothesis/{id}
具有写入的标志

使用 DELETE /api/hypothesis/{id}.删除假设

路径参数

字段类型必填描述
id integer · int32 Id.
curl --request DELETE 'https://api.selsup.ru/api/hypothesis/1001' \
  --header 'Authorization: YOUR_API_TOKEN'

成功的反应

200

答案没有身体.

错误4

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

401auth_required
需要进行认证

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

400error_access_denied
拒绝访问

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

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

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

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

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

GET

找一个

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

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

查询参数

字段类型必填描述
query string 问问.
modelId integer · int64 模型身份证.
service stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC 服务.
endDateFrom string · date-time 终止日期从.
endDateTo string · date-time 终止日期到.
limit integer · int32 限制.
page integer · int32 页面.
count boolean 伯爵.
sortBy stringID, NAME, CREATEDDATE, CREATEDUSER, STARTDATE, ENDDATE, PREVIOUSSTARTDATE, SUCCESSSTATUS 排序了.
ascending boolean 升高.
curl --request GET 'https://api.selsup.ru/api/hypothesis/find?limit=50&page=1' \
  --header 'Authorization: YOUR_API_TOKEN'

成功的反应

200
对象场 FindResponseHypothesis
字段类型必填描述
rows Hypothesis[] 排列.
阵列项结构 Hypothesis
字段类型必填描述
id integer · int32 Id.
name string 姓名.
previousStartDate string · date-time 之前的开始日期.
startDate string · date-time 开始日期.
endDate string · date-time 终结日期.
modelId integer · int64 模型身份证.
modelArticle string 标题:
viewId integer · int64 查看ID.
productId integer · int64 产品身份证
organizationId integer · int64 组织身份证.
createdDate string · date-time 创造日期.
createdUser string 创建用户.
service stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC 服务.
successStatus stringNONE, SUCCESSFUL, UNSUCCESSFUL 成功状态.
{
  "rows": "string"
}
错误4

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

401auth_required
需要进行认证

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

400error_access_denied
拒绝访问

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

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

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

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

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

Authorization

测试请求的标志

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

试一试

实际请求参数

现场API响应

发送请求查看SelSup的响应.