开始使用类别
使用专用API代币,首先验证测试数据的读取操作.
- 保存代币服务器侧,然后将其发送到Authorization标题中.
- 检查所需参数,并扩大请求或响应方案.
- 在应用错误中处理HTTP状态和稳定的error字段.
通过可编辑的独立合同来支持本页面. 在生产使用之前,验证使用测试数据的写作操作.
/api/category
准备使用的工作流程
使用专用API代币,首先验证测试数据的读取操作.
数据模型
模型在此列出一次,并且可以直接从使用它们的终端点扩展.
idinteger · int64Id.
namestring姓名.
publishedboolean发表了.
parentIdinteger · int64亲人身份证.
aliexpressIdinteger · int64快递证件
lastSyncDatestring · date-time最后的同步日期.
notChangedDaysinteger · int32没有改变的日子.
isLeafboolean是叶子.
idinteger · int64Id.
必填namestring姓名.
必填shortNamestring简短名字.
publishedboolean发表了.
parentIdinteger · int64亲人身份证.
lastSyncDatestring · date-time最后的同步日期.
isLeafboolean是叶子.
goodsTypestring货物类型.
categorystring类别.
categoryIdinteger · int32类别的ID.
read-onlynamestring姓名.
必填deletedboolean删除了.
read-onlyparentIdinteger · int32亲人身份证.
clientIdinteger · int64客户身份证.
read-onlymarkedboolean标记了.
categoryClassstring类别类.
wildberriesTypeWildberriesType野生类型.
wildberriesCategoryIdinteger · int64野生类别的身份.
wildberriesFbmCommissionnumber · double野生果联邦调查委员会.
read-onlywildberriesFbwCommissionnumber · double野生果Fbw委员会.
read-onlywildberriesFbsCommissionnumber · double野生果联邦调查委员会.
read-onlywildberriesDbsCommissionnumber · double野生果食品委员会.
read-onlywildberriesEdbsCommissionnumber · double野生果养殖委员会.
read-onlywildberriesCAndCCommissionnumber · double果和果委员会.
read-onlywildberriesBookingCommissionnumber · double野生果预订委员会.
read-onlyozonDescriptionCategoryIdinteger · int64臭氧描述类别ID.
yandexMarketCategoryIdinteger · int64亚兰德克斯市场类别身份证
yandexMarketCategoryYandexMarketCategory亚兰德克斯市场类别
ozonDescriptionCategoryOzonDescriptionCategory臭氧描述类别
ozonCommissionnumber · double臭氧委员会
read-onlytnvedTnved没有.
tnvedIdinteger · int64没有人知道.
laundrystring洗衣.
paramsstring帕姆斯.
namePatternstring姓名是模式.
aliexpressCategoryAliexpressCategory车类别
aliexpressCategoryIdinteger · int64标签: 标识:
avitoCategoryAvitoCategory类别
lamodaCategoryLamodaCategory拉莫达类别.
lamodaCategoryIdinteger · int64拉莫达类别的身份证.
avitoCategoryIdinteger · int64果类别的身份
packDepthinteger · int32包装深度.
packWidthinteger · int32包装宽度.
packHeightinteger · int32包高.
packWeightinteger · int32包装重量.
hasSizeboolean有大小.
hasColorboolean有颜色.
autoNameboolean车名.
removeFbsStockboolean删除FBS股票.
oneCIdstring一个公告.
externalIdstring其他身份证.
moySkladIdstring子子的身份.
useClientParamsboolean使用客户端参数.
requiredExpirationDateboolean要求到期日期
serviceCategoryMappingsobject服务类别地图.
productCountinteger · int32产品数量
idinteger · int64Id.
namestring姓名.
shortNamestring简短名字.
publishedboolean发表了.
isLeafboolean是叶子.
parentIdinteger · int64亲人身份证.
lastSyncDatestring · date-time最后的同步日期.
notChangedDaysinteger · int32没有改变的日子.
idinteger · int64Id.
namestring姓名.
必填publishedboolean发表了.
parentIdinteger · int64亲人身份证.
isLeafboolean是叶子.
lastSyncDatestring · date-time最后的同步日期.
notChangedDaysinteger · int32没有改变的日子.
isErrorboolean是错误.
errorDatestring · date错误日期
typesstring类型.
typeIdinteger · int64打印机号.
purchasePercentAvgnumber · double购买百分比 Avg.
purchasePercentMinnumber · double购买百分比
photoAvginteger · int32照片来源:
photoMininteger · int32照片:
drrAvgnumber · double艾夫博士.
drrMinnumber · double博士.
marginAvgnumber · double边缘 Avg.
marginMinnumber · double边缘分.
promotionCtrAvgnumber · double升级, 检查员.
promotionCtrMinnumber · double升级 升
servicestring服务.
externalIdstring其他身份证.
namestring姓名.
idinteger · int64Id.
namestring姓名.
deletedboolean删除了.
typestringType.
categoryClassstring类别类.
parentIdinteger · int64亲人身份证.
keywordsstring关键词.
descriptionstring描述
paramsTnvedIdinteger · int64帕拉姆斯特内维德身份证.
isInParamboolean在帕拉姆.
certificationstring证书.
parentCodestring家庭代码.
codestringCode.
certificationRequiredboolean需要获得证书.
idinteger · int64Id.
namestring姓名.
publishedboolean发表了.
hasSizeboolean有大小.
monoBoxMinQuantityinteger · int32单盒子最小量.
monoTypestring单一类型.
monoMinPriceinteger · int32单小价格.
hasParentboolean有父母.
parentIdinteger · int64亲人身份证.
wildberriesIdinteger · int64果的身份证.
lastSyncDatestring · date-time最后的同步日期.
notChangedDaysinteger · int32没有改变的日子.
commissionnumber · double委员会.
fbsCommissionnumber · double联邦调查局.
fbwCommissionnumber · double联邦调查委员会.
dbsCommissionnumber · double美国联邦调查局
edbsCommissionnumber · double艾德斯委员会.
cAndCCommissionnumber · double委员会.
bookingCommissionnumber · double预订委员会.
logisticPriceinteger · int32后勤价格.
storagePricenumber · double存储价格.
acceptancePricenumber · double接受价格.
needDimensionsboolean需要维度.
purchasePercentAvgnumber · double购买百分比 Avg.
purchasePercentMinnumber · double购买百分比
photoAvginteger · int32照片来源:
photoMininteger · int32照片:
drrAvgnumber · double艾夫博士.
drrMinnumber · double博士.
marginAvgnumber · double边缘 Avg.
marginMinnumber · double边缘分.
candCCommissionnumber · double委员会.
idinteger · int64Id.
namestring姓名.
必填publishedboolean发表了.
parentIdinteger · int64亲人身份证.
isLeafboolean是叶子.
lastSyncDatestring · date-time最后的同步日期.
notChangedDaysinteger · int32没有改变的日子.
limitinteger · int32限制.
pageinteger · int32页面.
countboolean伯爵.
sortBystring排序了.
ascendingboolean升高.
nationalCatalogIdinteger · int64标签:国家目录
wildberriesTypeIdinteger · int64野生类型的身份证.
wildberriesCategoryIdinteger · int64野生类别的身份.
ozonCategoryIdinteger · int64臭氧类别的ID.
ozonDescriptionCategoryIdinteger · int64臭氧描述类别ID.
aliexpressCategoryIdinteger · int64标签: 标识:
lamodaCategoryIdinteger · int64拉莫达类别的身份证.
kaspiCategoryIdstring卡斯皮类别的身份证.
avitoCategoryIdinteger · int64果类别的身份
yandexMarketCategoryIdinteger · int64亚兰德克斯市场类别身份证
categoryIdinteger · int32类别的ID.
useAllCategoriesboolean使用所有类别.
useCategoryOptionboolean使用类别选项.
idinteger · int64Id.
sourceServiceIdinteger · int32源服务身份证.
sourceCategoryIdstring来源类别ID
resultServiceIdinteger · int32结果服务身份证.
resultCategoryIdstring结果类别ID.
resultCategoryobject结果类别
probabilitynumber · double可能性.
resultServicestring结果服务.
sourceServicestring源服务.
idinteger · int64Id.
codestringCode.
namestring姓名.
publishedboolean发表了.
isLeafboolean是叶子.
lastSyncDatestring · date-time最后的同步日期.
notChangedDaysinteger · int32没有改变的日子.
rowsCategory[]排列.
错误合同
编程的代码在每个地方都相同,而用户面向的消息由服务器翻译. 建立在error周围的应用逻辑,仅用于显示.
鱼类稳定机器可读的代码用于集成逻辑.
鱼类在API代币用户语言中显示准备的消息.
鱼类服务器在本地化消息模板中插入的值.
localMessage使用了 API代币的用户的lang字段.文档语言和 Accept-Language标题不会改变它;当用户没有语言配置时,使用俄语.
{
"error": "error_brand_already_exists",
"localMessage": "Бренд Base уже существует",
"params": {
"name": "Base"
}
}{
"error": "error_brand_already_exists",
"localMessage": "品牌 Base 已经存在",
"params": {
"name": "Base"
}
}终点
/api/category/{categoryId}使用 PUT /api/category/{categoryId}. 设置类别
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
categoryId |
integer · int32 | 是 | 类别的ID. |
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
merge |
boolean | 否 | 合并. |
application/jsonCategory| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
categoryId |
integer · int32 | 否 | 类别的ID. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 是 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
parentId |
integer · int32 | 否 | 亲人身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
marked |
boolean | 否 | 标记了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
categoryClass |
stringSHOES, LIGHT, DRUGS, CAMERA, TYRES, MILK, WATER, TOBACCO, FURS, BEER, BICYCLES, PERFUMES, ELECTRONIC, OTHER, NONE, FOOD, WHEELCHAIRS, OTP, NCP, BIO, ANTISEPTIC, NABEER, SOFTDRINKS, PETFOOD, SEAFOOD, MEAT, TOYS, TITAN, RADIO, OPTIC_FIBER, VEGETABLE_OIL, CONSERVE, VETPHARMA, CHEMISTRY, AUTOFLUIDS, GROCERY, BOOKS, CONSTRUCTION, FIRE, HEATER, CABLERAW, POLYMER, SWEETS, CARPARTS, NATURAL_FUR, NICOTINDEV, GADGETS, FROZEN, FERTILIZERS, HOMEWARE, VETBIO, INDUSTRIAL, PYROTECHNICS | 否 | 类别类. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
wildberriesType |
WildberriesType | 否 | 野生类型. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
published |
boolean | 否 | 发表了. |
hasSize |
boolean | 否 | 有大小. |
monoBoxMinQuantity |
integer · int32 | 否 | 单盒子最小量. |
monoType |
stringALWAYS, NEVER, MONO_IF_MIN_PRICE | 否 | 单一类型. |
monoMinPrice |
integer · int32 | 否 | 单小价格. |
hasParent |
boolean | 否 | 有父母. |
parentId |
integer · int64 | 否 | 亲人身份证. |
wildberriesId |
integer · int64 | 否 | 果的身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
commission |
number · double | 否 | 委员会. |
fbsCommission |
number · double | 否 | 联邦调查局. |
fbwCommission |
number · double | 否 | 联邦调查委员会. |
dbsCommission |
number · double | 否 | 美国联邦调查局 |
edbsCommission |
number · double | 否 | 艾德斯委员会. |
cAndCCommission |
number · double | 否 | 委员会. |
bookingCommission |
number · double | 否 | 预订委员会. |
logisticPrice |
integer · int32 | 否 | 后勤价格. |
storagePrice |
number · double | 否 | 存储价格. |
acceptancePrice |
number · double | 否 | 接受价格. |
needDimensions |
boolean | 否 | 需要维度. |
purchasePercentAvg |
number · double | 否 | 购买百分比 Avg. |
purchasePercentMin |
number · double | 否 | 购买百分比 |
photoAvg |
integer · int32 | 否 | 照片来源: |
photoMin |
integer · int32 | 否 | 照片: |
drrAvg |
number · double | 否 | 艾夫博士. |
drrMin |
number · double | 否 | 博士. |
marginAvg |
number · double | 否 | 边缘 Avg. |
marginMin |
number · double | 否 | 边缘分. |
candCCommission |
number · double | 否 | 委员会. |
wildberriesCategoryIdwildberriesFbmCommissionwildberriesFbwCommissionwildberriesFbsCommissionwildberriesDbsCommissionwildberriesEdbsCommissionwildberriesCAndCCommissionwildberriesBookingCommissionozonDescriptionCategoryIdyandexMarketCategoryIdyandexMarketCategoryYandexMarketCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
isLeaf |
boolean | 否 | 是叶子. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
ozonDescriptionCategoryOzonDescriptionCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
isLeaf |
boolean | 否 | 是叶子. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
isError |
boolean | 否 | 是错误. |
errorDate |
string · date | 否 | 错误日期 |
types |
string | 否 | 类型. |
typeId |
integer · int64 | 否 | 打印机号. |
purchasePercentAvg |
number · double | 否 | 购买百分比 Avg. |
purchasePercentMin |
number · double | 否 | 购买百分比 |
photoAvg |
integer · int32 | 否 | 照片来源: |
photoMin |
integer · int32 | 否 | 照片: |
drrAvg |
number · double | 否 | 艾夫博士. |
drrMin |
number · double | 否 | 博士. |
marginAvg |
number · double | 否 | 边缘 Avg. |
marginMin |
number · double | 否 | 边缘分. |
promotionCtrAvg |
number · double | 否 | 升级, 检查员. |
promotionCtrMin |
number · double | 否 | 升级 升 |
ozonCommissiontnvedTnved
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
deleted |
boolean | 否 | 删除了. |
type |
stringSECTION, GROUP, PRODUCT, MAIN | 否 | Type. |
categoryClass |
stringSHOES, LIGHT, DRUGS, CAMERA, TYRES, MILK, WATER, TOBACCO, FURS, BEER, BICYCLES, PERFUMES, ELECTRONIC, OTHER, NONE, FOOD, WHEELCHAIRS, OTP, NCP, BIO, ANTISEPTIC, NABEER, SOFTDRINKS, PETFOOD, SEAFOOD, MEAT, TOYS, TITAN, RADIO, OPTIC_FIBER, VEGETABLE_OIL, CONSERVE, VETPHARMA, CHEMISTRY, AUTOFLUIDS, GROCERY, BOOKS, CONSTRUCTION, FIRE, HEATER, CABLERAW, POLYMER, SWEETS, CARPARTS, NATURAL_FUR, NICOTINDEV, GADGETS, FROZEN, FERTILIZERS, HOMEWARE, VETBIO, INDUSTRIAL, PYROTECHNICS | 否 | 类别类. |
parentId |
integer · int64 | 否 | 亲人身份证. |
keywords |
string | 否 | 关键词. |
description |
string | 否 | 描述 |
paramsTnvedId |
integer · int64 | 否 | 帕拉姆斯特内维德身份证. |
isInParam |
boolean | 否 | 在帕拉姆. |
certification |
string | 否 | 证书. |
parentCode |
string | 否 | 家庭代码. |
code |
string | 否 | Code. |
certificationRequired |
boolean | 否 | 需要获得证书. |
tnvedIdlaundryparamsnamePatternaliexpressCategoryAliexpressCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
aliexpressId |
integer · int64 | 否 | 快递证件 |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
isLeaf |
boolean | 否 | 是叶子. |
aliexpressCategoryIdavitoCategoryAvitoCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 是 | Id. |
name |
string | 是 | 姓名. |
shortName |
string | 否 | 简短名字. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
isLeaf |
boolean | 否 | 是叶子. |
goodsType |
string | 否 | 货物类型. |
category |
string | 否 | 类别. |
lamodaCategoryLamodaCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
shortName |
string | 否 | 简短名字. |
published |
boolean | 否 | 发表了. |
isLeaf |
boolean | 否 | 是叶子. |
parentId |
integer · int64 | 否 | 亲人身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
lamodaCategoryIdavitoCategoryIdpackDepthpackWidthpackHeightpackWeighthasSizehasColorautoNameremoveFbsStockoneCIdexternalIdmoySkladIduseClientParamsrequiredExpirationDateserviceCategoryMappingsproductCountcurl --request PUT 'https://api.selsup.ru/api/category/1001' \
--header 'Authorization: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"name": "Example",
"categoryId": 1001,
"deleted": false,
"parentId": 1001,
"clientId": 1001,
"marked": false
}'
const response = await fetch('https://api.selsup.ru/api/category/1001', {
method: 'PUT',
headers: {
Authorization: process.env.SELSUP_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Example",
"categoryId": 1001,
"deleted": false,
"parentId": 1001,
"clientId": 1001,
"marked": false
}),
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/category/1001', {
method: 'PUT',
headers: {
Authorization: process.env.SELSUP_API_TOKEN!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Example",
"categoryId": 1001,
"deleted": false,
"parentId": 1001,
"clientId": 1001,
"marked": false
}),
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
const result: unknown = await response.json();
import os
import requests
response = requests.put(
'https://api.selsup.ru/api/category/1001',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
json={
'name': 'Example',
'categoryId': 1001,
'deleted': False,
'parentId': 1001,
'clientId': 1001,
'marked': False
},
)
response.raise_for_status()
result = response.json()
<?php
$payload = <<<'JSON'
{
"name": "Example",
"categoryId": 1001,
"deleted": false,
"parentId": 1001,
"clientId": 1001,
"marked": false
}
JSON;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/category/1001',
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
req, err := http.NewRequest("PUT", "https://api.selsup.ru/api/category/1001", strings.NewReader(`{
"name": "Example",
"categoryId": 1001,
"deleted": false,
"parentId": 1001,
"clientId": 1001,
"marked": false
}`))
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
req.Header.Set("Content-Type", "application/json")
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/category/1001"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.header("Content-Type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("""
{
"name": "Example",
"categoryId": 1001,
"deleted": false,
"parentId": 1001,
"clientId": 1001,
"marked": false
}
"""))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
Category
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
categoryId |
integer · int32 | 否 | 类别的ID. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 是 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
parentId |
integer · int32 | 否 | 亲人身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
marked |
boolean | 否 | 标记了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
categoryClass |
stringSHOES, LIGHT, DRUGS, CAMERA, TYRES, MILK, WATER, TOBACCO, FURS, BEER, BICYCLES, PERFUMES, ELECTRONIC, OTHER, NONE, FOOD, WHEELCHAIRS, OTP, NCP, BIO, ANTISEPTIC, NABEER, SOFTDRINKS, PETFOOD, SEAFOOD, MEAT, TOYS, TITAN, RADIO, OPTIC_FIBER, VEGETABLE_OIL, CONSERVE, VETPHARMA, CHEMISTRY, AUTOFLUIDS, GROCERY, BOOKS, CONSTRUCTION, FIRE, HEATER, CABLERAW, POLYMER, SWEETS, CARPARTS, NATURAL_FUR, NICOTINDEV, GADGETS, FROZEN, FERTILIZERS, HOMEWARE, VETBIO, INDUSTRIAL, PYROTECHNICS | 否 | 类别类. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
wildberriesType |
WildberriesType | 否 | 野生类型. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
published |
boolean | 否 | 发表了. |
hasSize |
boolean | 否 | 有大小. |
monoBoxMinQuantity |
integer · int32 | 否 | 单盒子最小量. |
monoType |
stringALWAYS, NEVER, MONO_IF_MIN_PRICE | 否 | 单一类型. |
monoMinPrice |
integer · int32 | 否 | 单小价格. |
hasParent |
boolean | 否 | 有父母. |
parentId |
integer · int64 | 否 | 亲人身份证. |
wildberriesId |
integer · int64 | 否 | 果的身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
commission |
number · double | 否 | 委员会. |
fbsCommission |
number · double | 否 | 联邦调查局. |
fbwCommission |
number · double | 否 | 联邦调查委员会. |
dbsCommission |
number · double | 否 | 美国联邦调查局 |
edbsCommission |
number · double | 否 | 艾德斯委员会. |
cAndCCommission |
number · double | 否 | 委员会. |
bookingCommission |
number · double | 否 | 预订委员会. |
logisticPrice |
integer · int32 | 否 | 后勤价格. |
storagePrice |
number · double | 否 | 存储价格. |
acceptancePrice |
number · double | 否 | 接受价格. |
needDimensions |
boolean | 否 | 需要维度. |
purchasePercentAvg |
number · double | 否 | 购买百分比 Avg. |
purchasePercentMin |
number · double | 否 | 购买百分比 |
photoAvg |
integer · int32 | 否 | 照片来源: |
photoMin |
integer · int32 | 否 | 照片: |
drrAvg |
number · double | 否 | 艾夫博士. |
drrMin |
number · double | 否 | 博士. |
marginAvg |
number · double | 否 | 边缘 Avg. |
marginMin |
number · double | 否 | 边缘分. |
candCCommission |
number · double | 否 | 委员会. |
wildberriesCategoryIdwildberriesFbmCommissionwildberriesFbwCommissionwildberriesFbsCommissionwildberriesDbsCommissionwildberriesEdbsCommissionwildberriesCAndCCommissionwildberriesBookingCommissionozonDescriptionCategoryIdyandexMarketCategoryIdyandexMarketCategoryYandexMarketCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
isLeaf |
boolean | 否 | 是叶子. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
ozonDescriptionCategoryOzonDescriptionCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
isLeaf |
boolean | 否 | 是叶子. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
isError |
boolean | 否 | 是错误. |
errorDate |
string · date | 否 | 错误日期 |
types |
string | 否 | 类型. |
typeId |
integer · int64 | 否 | 打印机号. |
purchasePercentAvg |
number · double | 否 | 购买百分比 Avg. |
purchasePercentMin |
number · double | 否 | 购买百分比 |
photoAvg |
integer · int32 | 否 | 照片来源: |
photoMin |
integer · int32 | 否 | 照片: |
drrAvg |
number · double | 否 | 艾夫博士. |
drrMin |
number · double | 否 | 博士. |
marginAvg |
number · double | 否 | 边缘 Avg. |
marginMin |
number · double | 否 | 边缘分. |
promotionCtrAvg |
number · double | 否 | 升级, 检查员. |
promotionCtrMin |
number · double | 否 | 升级 升 |
ozonCommissiontnvedTnved
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
deleted |
boolean | 否 | 删除了. |
type |
stringSECTION, GROUP, PRODUCT, MAIN | 否 | Type. |
categoryClass |
stringSHOES, LIGHT, DRUGS, CAMERA, TYRES, MILK, WATER, TOBACCO, FURS, BEER, BICYCLES, PERFUMES, ELECTRONIC, OTHER, NONE, FOOD, WHEELCHAIRS, OTP, NCP, BIO, ANTISEPTIC, NABEER, SOFTDRINKS, PETFOOD, SEAFOOD, MEAT, TOYS, TITAN, RADIO, OPTIC_FIBER, VEGETABLE_OIL, CONSERVE, VETPHARMA, CHEMISTRY, AUTOFLUIDS, GROCERY, BOOKS, CONSTRUCTION, FIRE, HEATER, CABLERAW, POLYMER, SWEETS, CARPARTS, NATURAL_FUR, NICOTINDEV, GADGETS, FROZEN, FERTILIZERS, HOMEWARE, VETBIO, INDUSTRIAL, PYROTECHNICS | 否 | 类别类. |
parentId |
integer · int64 | 否 | 亲人身份证. |
keywords |
string | 否 | 关键词. |
description |
string | 否 | 描述 |
paramsTnvedId |
integer · int64 | 否 | 帕拉姆斯特内维德身份证. |
isInParam |
boolean | 否 | 在帕拉姆. |
certification |
string | 否 | 证书. |
parentCode |
string | 否 | 家庭代码. |
code |
string | 否 | Code. |
certificationRequired |
boolean | 否 | 需要获得证书. |
tnvedIdlaundryparamsnamePatternaliexpressCategoryAliexpressCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
aliexpressId |
integer · int64 | 否 | 快递证件 |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
isLeaf |
boolean | 否 | 是叶子. |
aliexpressCategoryIdavitoCategoryAvitoCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 是 | Id. |
name |
string | 是 | 姓名. |
shortName |
string | 否 | 简短名字. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
isLeaf |
boolean | 否 | 是叶子. |
goodsType |
string | 否 | 货物类型. |
category |
string | 否 | 类别. |
lamodaCategoryLamodaCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
shortName |
string | 否 | 简短名字. |
published |
boolean | 否 | 发表了. |
isLeaf |
boolean | 否 | 是叶子. |
parentId |
integer · int64 | 否 | 亲人身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
lamodaCategoryIdavitoCategoryIdpackDepthpackWidthpackHeightpackWeighthasSizehasColorautoNameremoveFbsStockoneCIdexternalIdmoySkladIduseClientParamsrequiredExpirationDateserviceCategoryMappingsproductCount{
"name": "Example",
"categoryId": 1001,
"deleted": false,
"parentId": 1001,
"clientId": 1001,
"marked": false
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
/api/category/{categoryId}使用 PATCH /api/category/{categoryId}.的补丁类别
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
categoryId |
integer · int32 | 是 | 类别的ID. |
application/jsonCategory| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
categoryId |
integer · int32 | 否 | 类别的ID. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 是 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
parentId |
integer · int32 | 否 | 亲人身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
marked |
boolean | 否 | 标记了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
categoryClass |
stringSHOES, LIGHT, DRUGS, CAMERA, TYRES, MILK, WATER, TOBACCO, FURS, BEER, BICYCLES, PERFUMES, ELECTRONIC, OTHER, NONE, FOOD, WHEELCHAIRS, OTP, NCP, BIO, ANTISEPTIC, NABEER, SOFTDRINKS, PETFOOD, SEAFOOD, MEAT, TOYS, TITAN, RADIO, OPTIC_FIBER, VEGETABLE_OIL, CONSERVE, VETPHARMA, CHEMISTRY, AUTOFLUIDS, GROCERY, BOOKS, CONSTRUCTION, FIRE, HEATER, CABLERAW, POLYMER, SWEETS, CARPARTS, NATURAL_FUR, NICOTINDEV, GADGETS, FROZEN, FERTILIZERS, HOMEWARE, VETBIO, INDUSTRIAL, PYROTECHNICS | 否 | 类别类. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
wildberriesType |
WildberriesType | 否 | 野生类型. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
published |
boolean | 否 | 发表了. |
hasSize |
boolean | 否 | 有大小. |
monoBoxMinQuantity |
integer · int32 | 否 | 单盒子最小量. |
monoType |
stringALWAYS, NEVER, MONO_IF_MIN_PRICE | 否 | 单一类型. |
monoMinPrice |
integer · int32 | 否 | 单小价格. |
hasParent |
boolean | 否 | 有父母. |
parentId |
integer · int64 | 否 | 亲人身份证. |
wildberriesId |
integer · int64 | 否 | 果的身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
commission |
number · double | 否 | 委员会. |
fbsCommission |
number · double | 否 | 联邦调查局. |
fbwCommission |
number · double | 否 | 联邦调查委员会. |
dbsCommission |
number · double | 否 | 美国联邦调查局 |
edbsCommission |
number · double | 否 | 艾德斯委员会. |
cAndCCommission |
number · double | 否 | 委员会. |
bookingCommission |
number · double | 否 | 预订委员会. |
logisticPrice |
integer · int32 | 否 | 后勤价格. |
storagePrice |
number · double | 否 | 存储价格. |
acceptancePrice |
number · double | 否 | 接受价格. |
needDimensions |
boolean | 否 | 需要维度. |
purchasePercentAvg |
number · double | 否 | 购买百分比 Avg. |
purchasePercentMin |
number · double | 否 | 购买百分比 |
photoAvg |
integer · int32 | 否 | 照片来源: |
photoMin |
integer · int32 | 否 | 照片: |
drrAvg |
number · double | 否 | 艾夫博士. |
drrMin |
number · double | 否 | 博士. |
marginAvg |
number · double | 否 | 边缘 Avg. |
marginMin |
number · double | 否 | 边缘分. |
candCCommission |
number · double | 否 | 委员会. |
wildberriesCategoryIdwildberriesFbmCommissionwildberriesFbwCommissionwildberriesFbsCommissionwildberriesDbsCommissionwildberriesEdbsCommissionwildberriesCAndCCommissionwildberriesBookingCommissionozonDescriptionCategoryIdyandexMarketCategoryIdyandexMarketCategoryYandexMarketCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
isLeaf |
boolean | 否 | 是叶子. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
ozonDescriptionCategoryOzonDescriptionCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
isLeaf |
boolean | 否 | 是叶子. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
isError |
boolean | 否 | 是错误. |
errorDate |
string · date | 否 | 错误日期 |
types |
string | 否 | 类型. |
typeId |
integer · int64 | 否 | 打印机号. |
purchasePercentAvg |
number · double | 否 | 购买百分比 Avg. |
purchasePercentMin |
number · double | 否 | 购买百分比 |
photoAvg |
integer · int32 | 否 | 照片来源: |
photoMin |
integer · int32 | 否 | 照片: |
drrAvg |
number · double | 否 | 艾夫博士. |
drrMin |
number · double | 否 | 博士. |
marginAvg |
number · double | 否 | 边缘 Avg. |
marginMin |
number · double | 否 | 边缘分. |
promotionCtrAvg |
number · double | 否 | 升级, 检查员. |
promotionCtrMin |
number · double | 否 | 升级 升 |
ozonCommissiontnvedTnved
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
deleted |
boolean | 否 | 删除了. |
type |
stringSECTION, GROUP, PRODUCT, MAIN | 否 | Type. |
categoryClass |
stringSHOES, LIGHT, DRUGS, CAMERA, TYRES, MILK, WATER, TOBACCO, FURS, BEER, BICYCLES, PERFUMES, ELECTRONIC, OTHER, NONE, FOOD, WHEELCHAIRS, OTP, NCP, BIO, ANTISEPTIC, NABEER, SOFTDRINKS, PETFOOD, SEAFOOD, MEAT, TOYS, TITAN, RADIO, OPTIC_FIBER, VEGETABLE_OIL, CONSERVE, VETPHARMA, CHEMISTRY, AUTOFLUIDS, GROCERY, BOOKS, CONSTRUCTION, FIRE, HEATER, CABLERAW, POLYMER, SWEETS, CARPARTS, NATURAL_FUR, NICOTINDEV, GADGETS, FROZEN, FERTILIZERS, HOMEWARE, VETBIO, INDUSTRIAL, PYROTECHNICS | 否 | 类别类. |
parentId |
integer · int64 | 否 | 亲人身份证. |
keywords |
string | 否 | 关键词. |
description |
string | 否 | 描述 |
paramsTnvedId |
integer · int64 | 否 | 帕拉姆斯特内维德身份证. |
isInParam |
boolean | 否 | 在帕拉姆. |
certification |
string | 否 | 证书. |
parentCode |
string | 否 | 家庭代码. |
code |
string | 否 | Code. |
certificationRequired |
boolean | 否 | 需要获得证书. |
tnvedIdlaundryparamsnamePatternaliexpressCategoryAliexpressCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
aliexpressId |
integer · int64 | 否 | 快递证件 |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
isLeaf |
boolean | 否 | 是叶子. |
aliexpressCategoryIdavitoCategoryAvitoCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 是 | Id. |
name |
string | 是 | 姓名. |
shortName |
string | 否 | 简短名字. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
isLeaf |
boolean | 否 | 是叶子. |
goodsType |
string | 否 | 货物类型. |
category |
string | 否 | 类别. |
lamodaCategoryLamodaCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
shortName |
string | 否 | 简短名字. |
published |
boolean | 否 | 发表了. |
isLeaf |
boolean | 否 | 是叶子. |
parentId |
integer · int64 | 否 | 亲人身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
lamodaCategoryIdavitoCategoryIdpackDepthpackWidthpackHeightpackWeighthasSizehasColorautoNameremoveFbsStockoneCIdexternalIdmoySkladIduseClientParamsrequiredExpirationDateserviceCategoryMappingsproductCountcurl --request PATCH 'https://api.selsup.ru/api/category/1001' \
--header 'Authorization: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"name": "Example",
"categoryId": 1001,
"deleted": false,
"parentId": 1001,
"clientId": 1001,
"marked": false
}'
const response = await fetch('https://api.selsup.ru/api/category/1001', {
method: 'PATCH',
headers: {
Authorization: process.env.SELSUP_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Example",
"categoryId": 1001,
"deleted": false,
"parentId": 1001,
"clientId": 1001,
"marked": false
}),
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/category/1001', {
method: 'PATCH',
headers: {
Authorization: process.env.SELSUP_API_TOKEN!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Example",
"categoryId": 1001,
"deleted": false,
"parentId": 1001,
"clientId": 1001,
"marked": false
}),
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
const result: unknown = await response.json();
import os
import requests
response = requests.patch(
'https://api.selsup.ru/api/category/1001',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
json={
'name': 'Example',
'categoryId': 1001,
'deleted': False,
'parentId': 1001,
'clientId': 1001,
'marked': False
},
)
response.raise_for_status()
result = response.json()
<?php
$payload = <<<'JSON'
{
"name": "Example",
"categoryId": 1001,
"deleted": false,
"parentId": 1001,
"clientId": 1001,
"marked": false
}
JSON;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/category/1001',
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
req, err := http.NewRequest("PATCH", "https://api.selsup.ru/api/category/1001", strings.NewReader(`{
"name": "Example",
"categoryId": 1001,
"deleted": false,
"parentId": 1001,
"clientId": 1001,
"marked": false
}`))
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
req.Header.Set("Content-Type", "application/json")
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/category/1001"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("""
{
"name": "Example",
"categoryId": 1001,
"deleted": false,
"parentId": 1001,
"clientId": 1001,
"marked": false
}
"""))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
Category
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
categoryId |
integer · int32 | 否 | 类别的ID. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 是 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
parentId |
integer · int32 | 否 | 亲人身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
marked |
boolean | 否 | 标记了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
categoryClass |
stringSHOES, LIGHT, DRUGS, CAMERA, TYRES, MILK, WATER, TOBACCO, FURS, BEER, BICYCLES, PERFUMES, ELECTRONIC, OTHER, NONE, FOOD, WHEELCHAIRS, OTP, NCP, BIO, ANTISEPTIC, NABEER, SOFTDRINKS, PETFOOD, SEAFOOD, MEAT, TOYS, TITAN, RADIO, OPTIC_FIBER, VEGETABLE_OIL, CONSERVE, VETPHARMA, CHEMISTRY, AUTOFLUIDS, GROCERY, BOOKS, CONSTRUCTION, FIRE, HEATER, CABLERAW, POLYMER, SWEETS, CARPARTS, NATURAL_FUR, NICOTINDEV, GADGETS, FROZEN, FERTILIZERS, HOMEWARE, VETBIO, INDUSTRIAL, PYROTECHNICS | 否 | 类别类. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
wildberriesType |
WildberriesType | 否 | 野生类型. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
published |
boolean | 否 | 发表了. |
hasSize |
boolean | 否 | 有大小. |
monoBoxMinQuantity |
integer · int32 | 否 | 单盒子最小量. |
monoType |
stringALWAYS, NEVER, MONO_IF_MIN_PRICE | 否 | 单一类型. |
monoMinPrice |
integer · int32 | 否 | 单小价格. |
hasParent |
boolean | 否 | 有父母. |
parentId |
integer · int64 | 否 | 亲人身份证. |
wildberriesId |
integer · int64 | 否 | 果的身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
commission |
number · double | 否 | 委员会. |
fbsCommission |
number · double | 否 | 联邦调查局. |
fbwCommission |
number · double | 否 | 联邦调查委员会. |
dbsCommission |
number · double | 否 | 美国联邦调查局 |
edbsCommission |
number · double | 否 | 艾德斯委员会. |
cAndCCommission |
number · double | 否 | 委员会. |
bookingCommission |
number · double | 否 | 预订委员会. |
logisticPrice |
integer · int32 | 否 | 后勤价格. |
storagePrice |
number · double | 否 | 存储价格. |
acceptancePrice |
number · double | 否 | 接受价格. |
needDimensions |
boolean | 否 | 需要维度. |
purchasePercentAvg |
number · double | 否 | 购买百分比 Avg. |
purchasePercentMin |
number · double | 否 | 购买百分比 |
photoAvg |
integer · int32 | 否 | 照片来源: |
photoMin |
integer · int32 | 否 | 照片: |
drrAvg |
number · double | 否 | 艾夫博士. |
drrMin |
number · double | 否 | 博士. |
marginAvg |
number · double | 否 | 边缘 Avg. |
marginMin |
number · double | 否 | 边缘分. |
candCCommission |
number · double | 否 | 委员会. |
wildberriesCategoryIdwildberriesFbmCommissionwildberriesFbwCommissionwildberriesFbsCommissionwildberriesDbsCommissionwildberriesEdbsCommissionwildberriesCAndCCommissionwildberriesBookingCommissionozonDescriptionCategoryIdyandexMarketCategoryIdyandexMarketCategoryYandexMarketCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
isLeaf |
boolean | 否 | 是叶子. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
ozonDescriptionCategoryOzonDescriptionCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
isLeaf |
boolean | 否 | 是叶子. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
isError |
boolean | 否 | 是错误. |
errorDate |
string · date | 否 | 错误日期 |
types |
string | 否 | 类型. |
typeId |
integer · int64 | 否 | 打印机号. |
purchasePercentAvg |
number · double | 否 | 购买百分比 Avg. |
purchasePercentMin |
number · double | 否 | 购买百分比 |
photoAvg |
integer · int32 | 否 | 照片来源: |
photoMin |
integer · int32 | 否 | 照片: |
drrAvg |
number · double | 否 | 艾夫博士. |
drrMin |
number · double | 否 | 博士. |
marginAvg |
number · double | 否 | 边缘 Avg. |
marginMin |
number · double | 否 | 边缘分. |
promotionCtrAvg |
number · double | 否 | 升级, 检查员. |
promotionCtrMin |
number · double | 否 | 升级 升 |
ozonCommissiontnvedTnved
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
deleted |
boolean | 否 | 删除了. |
type |
stringSECTION, GROUP, PRODUCT, MAIN | 否 | Type. |
categoryClass |
stringSHOES, LIGHT, DRUGS, CAMERA, TYRES, MILK, WATER, TOBACCO, FURS, BEER, BICYCLES, PERFUMES, ELECTRONIC, OTHER, NONE, FOOD, WHEELCHAIRS, OTP, NCP, BIO, ANTISEPTIC, NABEER, SOFTDRINKS, PETFOOD, SEAFOOD, MEAT, TOYS, TITAN, RADIO, OPTIC_FIBER, VEGETABLE_OIL, CONSERVE, VETPHARMA, CHEMISTRY, AUTOFLUIDS, GROCERY, BOOKS, CONSTRUCTION, FIRE, HEATER, CABLERAW, POLYMER, SWEETS, CARPARTS, NATURAL_FUR, NICOTINDEV, GADGETS, FROZEN, FERTILIZERS, HOMEWARE, VETBIO, INDUSTRIAL, PYROTECHNICS | 否 | 类别类. |
parentId |
integer · int64 | 否 | 亲人身份证. |
keywords |
string | 否 | 关键词. |
description |
string | 否 | 描述 |
paramsTnvedId |
integer · int64 | 否 | 帕拉姆斯特内维德身份证. |
isInParam |
boolean | 否 | 在帕拉姆. |
certification |
string | 否 | 证书. |
parentCode |
string | 否 | 家庭代码. |
code |
string | 否 | Code. |
certificationRequired |
boolean | 否 | 需要获得证书. |
tnvedIdlaundryparamsnamePatternaliexpressCategoryAliexpressCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
aliexpressId |
integer · int64 | 否 | 快递证件 |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
isLeaf |
boolean | 否 | 是叶子. |
aliexpressCategoryIdavitoCategoryAvitoCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 是 | Id. |
name |
string | 是 | 姓名. |
shortName |
string | 否 | 简短名字. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
isLeaf |
boolean | 否 | 是叶子. |
goodsType |
string | 否 | 货物类型. |
category |
string | 否 | 类别. |
lamodaCategoryLamodaCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
shortName |
string | 否 | 简短名字. |
published |
boolean | 否 | 发表了. |
isLeaf |
boolean | 否 | 是叶子. |
parentId |
integer · int64 | 否 | 亲人身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
lamodaCategoryIdavitoCategoryIdpackDepthpackWidthpackHeightpackWeighthasSizehasColorautoNameremoveFbsStockoneCIdexternalIdmoySkladIduseClientParamsrequiredExpirationDateserviceCategoryMappingsproductCount{
"name": "Example",
"categoryId": 1001,
"deleted": false,
"parentId": 1001,
"clientId": 1001,
"marked": false
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_subscription_expired应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.
/api/category/{categoryId}使用 DELETE /api/category/{categoryId}.删除类别
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
categoryId |
integer · int32 | 是 | 类别的ID. |
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
deleted |
boolean | 是 | 删除了. |
curl --request DELETE 'https://api.selsup.ru/api/category/1001?deleted=false' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/category/1001?deleted=false', {
method: 'DELETE',
headers: { Authorization: process.env.SELSUP_API_TOKEN },
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/category/1001?deleted=false', {
method: 'DELETE',
headers: { Authorization: process.env.SELSUP_API_TOKEN! },
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
const result: unknown = await response.json();
import os
import requests
response = requests.delete(
'https://api.selsup.ru/api/category/1001?deleted=false',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
)
response.raise_for_status()
result = response.json()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/category/1001?deleted=false',
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN')],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("DELETE", "https://api.selsup.ru/api/category/1001?deleted=false", nil)
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/category/1001?deleted=false"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
"string"应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
/api/category/{categoryId}/merge/{removedCategoryId}使用 POST 合并类别
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
categoryId |
integer · int32 | 是 | 类别的ID. |
removedCategoryId |
integer · int32 | 是 | 删除了类别ID. |
curl --request POST 'https://api.selsup.ru/api/category/1001/merge/1001' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/category/1001/merge/1001', {
method: 'POST',
headers: { Authorization: process.env.SELSUP_API_TOKEN },
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const response: Response = await fetch('https://api.selsup.ru/api/category/1001/merge/1001', {
method: 'POST',
headers: { Authorization: process.env.SELSUP_API_TOKEN! },
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
import os
import requests
response = requests.post(
'https://api.selsup.ru/api/category/1001/merge/1001',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
)
response.raise_for_status()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/category/1001/merge/1001',
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN')],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("POST", "https://api.selsup.ru/api/category/1001/merge/1001", nil)
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/category/1001/merge/1001"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
答案没有身体.
应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_category_not_found应用逻辑中使用稳定的error_category_not_found代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_subscription_expired应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.
/api/category/使用 POST /api/category/. 的帖子类别
application/jsonCategory| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
categoryId |
integer · int32 | 否 | 类别的ID. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 是 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
parentId |
integer · int32 | 否 | 亲人身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
marked |
boolean | 否 | 标记了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
categoryClass |
stringSHOES, LIGHT, DRUGS, CAMERA, TYRES, MILK, WATER, TOBACCO, FURS, BEER, BICYCLES, PERFUMES, ELECTRONIC, OTHER, NONE, FOOD, WHEELCHAIRS, OTP, NCP, BIO, ANTISEPTIC, NABEER, SOFTDRINKS, PETFOOD, SEAFOOD, MEAT, TOYS, TITAN, RADIO, OPTIC_FIBER, VEGETABLE_OIL, CONSERVE, VETPHARMA, CHEMISTRY, AUTOFLUIDS, GROCERY, BOOKS, CONSTRUCTION, FIRE, HEATER, CABLERAW, POLYMER, SWEETS, CARPARTS, NATURAL_FUR, NICOTINDEV, GADGETS, FROZEN, FERTILIZERS, HOMEWARE, VETBIO, INDUSTRIAL, PYROTECHNICS | 否 | 类别类. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
wildberriesType |
WildberriesType | 否 | 野生类型. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
published |
boolean | 否 | 发表了. |
hasSize |
boolean | 否 | 有大小. |
monoBoxMinQuantity |
integer · int32 | 否 | 单盒子最小量. |
monoType |
stringALWAYS, NEVER, MONO_IF_MIN_PRICE | 否 | 单一类型. |
monoMinPrice |
integer · int32 | 否 | 单小价格. |
hasParent |
boolean | 否 | 有父母. |
parentId |
integer · int64 | 否 | 亲人身份证. |
wildberriesId |
integer · int64 | 否 | 果的身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
commission |
number · double | 否 | 委员会. |
fbsCommission |
number · double | 否 | 联邦调查局. |
fbwCommission |
number · double | 否 | 联邦调查委员会. |
dbsCommission |
number · double | 否 | 美国联邦调查局 |
edbsCommission |
number · double | 否 | 艾德斯委员会. |
cAndCCommission |
number · double | 否 | 委员会. |
bookingCommission |
number · double | 否 | 预订委员会. |
logisticPrice |
integer · int32 | 否 | 后勤价格. |
storagePrice |
number · double | 否 | 存储价格. |
acceptancePrice |
number · double | 否 | 接受价格. |
needDimensions |
boolean | 否 | 需要维度. |
purchasePercentAvg |
number · double | 否 | 购买百分比 Avg. |
purchasePercentMin |
number · double | 否 | 购买百分比 |
photoAvg |
integer · int32 | 否 | 照片来源: |
photoMin |
integer · int32 | 否 | 照片: |
drrAvg |
number · double | 否 | 艾夫博士. |
drrMin |
number · double | 否 | 博士. |
marginAvg |
number · double | 否 | 边缘 Avg. |
marginMin |
number · double | 否 | 边缘分. |
candCCommission |
number · double | 否 | 委员会. |
wildberriesCategoryIdwildberriesFbmCommissionwildberriesFbwCommissionwildberriesFbsCommissionwildberriesDbsCommissionwildberriesEdbsCommissionwildberriesCAndCCommissionwildberriesBookingCommissionozonDescriptionCategoryIdyandexMarketCategoryIdyandexMarketCategoryYandexMarketCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
isLeaf |
boolean | 否 | 是叶子. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
ozonDescriptionCategoryOzonDescriptionCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
isLeaf |
boolean | 否 | 是叶子. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
isError |
boolean | 否 | 是错误. |
errorDate |
string · date | 否 | 错误日期 |
types |
string | 否 | 类型. |
typeId |
integer · int64 | 否 | 打印机号. |
purchasePercentAvg |
number · double | 否 | 购买百分比 Avg. |
purchasePercentMin |
number · double | 否 | 购买百分比 |
photoAvg |
integer · int32 | 否 | 照片来源: |
photoMin |
integer · int32 | 否 | 照片: |
drrAvg |
number · double | 否 | 艾夫博士. |
drrMin |
number · double | 否 | 博士. |
marginAvg |
number · double | 否 | 边缘 Avg. |
marginMin |
number · double | 否 | 边缘分. |
promotionCtrAvg |
number · double | 否 | 升级, 检查员. |
promotionCtrMin |
number · double | 否 | 升级 升 |
ozonCommissiontnvedTnved
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
deleted |
boolean | 否 | 删除了. |
type |
stringSECTION, GROUP, PRODUCT, MAIN | 否 | Type. |
categoryClass |
stringSHOES, LIGHT, DRUGS, CAMERA, TYRES, MILK, WATER, TOBACCO, FURS, BEER, BICYCLES, PERFUMES, ELECTRONIC, OTHER, NONE, FOOD, WHEELCHAIRS, OTP, NCP, BIO, ANTISEPTIC, NABEER, SOFTDRINKS, PETFOOD, SEAFOOD, MEAT, TOYS, TITAN, RADIO, OPTIC_FIBER, VEGETABLE_OIL, CONSERVE, VETPHARMA, CHEMISTRY, AUTOFLUIDS, GROCERY, BOOKS, CONSTRUCTION, FIRE, HEATER, CABLERAW, POLYMER, SWEETS, CARPARTS, NATURAL_FUR, NICOTINDEV, GADGETS, FROZEN, FERTILIZERS, HOMEWARE, VETBIO, INDUSTRIAL, PYROTECHNICS | 否 | 类别类. |
parentId |
integer · int64 | 否 | 亲人身份证. |
keywords |
string | 否 | 关键词. |
description |
string | 否 | 描述 |
paramsTnvedId |
integer · int64 | 否 | 帕拉姆斯特内维德身份证. |
isInParam |
boolean | 否 | 在帕拉姆. |
certification |
string | 否 | 证书. |
parentCode |
string | 否 | 家庭代码. |
code |
string | 否 | Code. |
certificationRequired |
boolean | 否 | 需要获得证书. |
tnvedIdlaundryparamsnamePatternaliexpressCategoryAliexpressCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
aliexpressId |
integer · int64 | 否 | 快递证件 |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
isLeaf |
boolean | 否 | 是叶子. |
aliexpressCategoryIdavitoCategoryAvitoCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 是 | Id. |
name |
string | 是 | 姓名. |
shortName |
string | 否 | 简短名字. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
isLeaf |
boolean | 否 | 是叶子. |
goodsType |
string | 否 | 货物类型. |
category |
string | 否 | 类别. |
lamodaCategoryLamodaCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
shortName |
string | 否 | 简短名字. |
published |
boolean | 否 | 发表了. |
isLeaf |
boolean | 否 | 是叶子. |
parentId |
integer · int64 | 否 | 亲人身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
lamodaCategoryIdavitoCategoryIdpackDepthpackWidthpackHeightpackWeighthasSizehasColorautoNameremoveFbsStockoneCIdexternalIdmoySkladIduseClientParamsrequiredExpirationDateserviceCategoryMappingsproductCountcurl --request POST 'https://api.selsup.ru/api/category/' \
--header 'Authorization: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"name": "Example",
"categoryId": 1001,
"deleted": false,
"parentId": 1001,
"clientId": 1001,
"marked": false
}'
const response = await fetch('https://api.selsup.ru/api/category/', {
method: 'POST',
headers: {
Authorization: process.env.SELSUP_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Example",
"categoryId": 1001,
"deleted": false,
"parentId": 1001,
"clientId": 1001,
"marked": false
}),
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/category/', {
method: 'POST',
headers: {
Authorization: process.env.SELSUP_API_TOKEN!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Example",
"categoryId": 1001,
"deleted": false,
"parentId": 1001,
"clientId": 1001,
"marked": false
}),
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
const result: unknown = await response.json();
import os
import requests
response = requests.post(
'https://api.selsup.ru/api/category/',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
json={
'name': 'Example',
'categoryId': 1001,
'deleted': False,
'parentId': 1001,
'clientId': 1001,
'marked': False
},
)
response.raise_for_status()
result = response.json()
<?php
$payload = <<<'JSON'
{
"name": "Example",
"categoryId": 1001,
"deleted": false,
"parentId": 1001,
"clientId": 1001,
"marked": false
}
JSON;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/category/',
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
req, err := http.NewRequest("POST", "https://api.selsup.ru/api/category/", strings.NewReader(`{
"name": "Example",
"categoryId": 1001,
"deleted": false,
"parentId": 1001,
"clientId": 1001,
"marked": false
}`))
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
req.Header.Set("Content-Type", "application/json")
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/category/"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"name": "Example",
"categoryId": 1001,
"deleted": false,
"parentId": 1001,
"clientId": 1001,
"marked": false
}
"""))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
Category
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
categoryId |
integer · int32 | 否 | 类别的ID. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 是 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
parentId |
integer · int32 | 否 | 亲人身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
marked |
boolean | 否 | 标记了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
categoryClass |
stringSHOES, LIGHT, DRUGS, CAMERA, TYRES, MILK, WATER, TOBACCO, FURS, BEER, BICYCLES, PERFUMES, ELECTRONIC, OTHER, NONE, FOOD, WHEELCHAIRS, OTP, NCP, BIO, ANTISEPTIC, NABEER, SOFTDRINKS, PETFOOD, SEAFOOD, MEAT, TOYS, TITAN, RADIO, OPTIC_FIBER, VEGETABLE_OIL, CONSERVE, VETPHARMA, CHEMISTRY, AUTOFLUIDS, GROCERY, BOOKS, CONSTRUCTION, FIRE, HEATER, CABLERAW, POLYMER, SWEETS, CARPARTS, NATURAL_FUR, NICOTINDEV, GADGETS, FROZEN, FERTILIZERS, HOMEWARE, VETBIO, INDUSTRIAL, PYROTECHNICS | 否 | 类别类. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
wildberriesType |
WildberriesType | 否 | 野生类型. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
published |
boolean | 否 | 发表了. |
hasSize |
boolean | 否 | 有大小. |
monoBoxMinQuantity |
integer · int32 | 否 | 单盒子最小量. |
monoType |
stringALWAYS, NEVER, MONO_IF_MIN_PRICE | 否 | 单一类型. |
monoMinPrice |
integer · int32 | 否 | 单小价格. |
hasParent |
boolean | 否 | 有父母. |
parentId |
integer · int64 | 否 | 亲人身份证. |
wildberriesId |
integer · int64 | 否 | 果的身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
commission |
number · double | 否 | 委员会. |
fbsCommission |
number · double | 否 | 联邦调查局. |
fbwCommission |
number · double | 否 | 联邦调查委员会. |
dbsCommission |
number · double | 否 | 美国联邦调查局 |
edbsCommission |
number · double | 否 | 艾德斯委员会. |
cAndCCommission |
number · double | 否 | 委员会. |
bookingCommission |
number · double | 否 | 预订委员会. |
logisticPrice |
integer · int32 | 否 | 后勤价格. |
storagePrice |
number · double | 否 | 存储价格. |
acceptancePrice |
number · double | 否 | 接受价格. |
needDimensions |
boolean | 否 | 需要维度. |
purchasePercentAvg |
number · double | 否 | 购买百分比 Avg. |
purchasePercentMin |
number · double | 否 | 购买百分比 |
photoAvg |
integer · int32 | 否 | 照片来源: |
photoMin |
integer · int32 | 否 | 照片: |
drrAvg |
number · double | 否 | 艾夫博士. |
drrMin |
number · double | 否 | 博士. |
marginAvg |
number · double | 否 | 边缘 Avg. |
marginMin |
number · double | 否 | 边缘分. |
candCCommission |
number · double | 否 | 委员会. |
wildberriesCategoryIdwildberriesFbmCommissionwildberriesFbwCommissionwildberriesFbsCommissionwildberriesDbsCommissionwildberriesEdbsCommissionwildberriesCAndCCommissionwildberriesBookingCommissionozonDescriptionCategoryIdyandexMarketCategoryIdyandexMarketCategoryYandexMarketCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
isLeaf |
boolean | 否 | 是叶子. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
ozonDescriptionCategoryOzonDescriptionCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
isLeaf |
boolean | 否 | 是叶子. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
isError |
boolean | 否 | 是错误. |
errorDate |
string · date | 否 | 错误日期 |
types |
string | 否 | 类型. |
typeId |
integer · int64 | 否 | 打印机号. |
purchasePercentAvg |
number · double | 否 | 购买百分比 Avg. |
purchasePercentMin |
number · double | 否 | 购买百分比 |
photoAvg |
integer · int32 | 否 | 照片来源: |
photoMin |
integer · int32 | 否 | 照片: |
drrAvg |
number · double | 否 | 艾夫博士. |
drrMin |
number · double | 否 | 博士. |
marginAvg |
number · double | 否 | 边缘 Avg. |
marginMin |
number · double | 否 | 边缘分. |
promotionCtrAvg |
number · double | 否 | 升级, 检查员. |
promotionCtrMin |
number · double | 否 | 升级 升 |
ozonCommissiontnvedTnved
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
deleted |
boolean | 否 | 删除了. |
type |
stringSECTION, GROUP, PRODUCT, MAIN | 否 | Type. |
categoryClass |
stringSHOES, LIGHT, DRUGS, CAMERA, TYRES, MILK, WATER, TOBACCO, FURS, BEER, BICYCLES, PERFUMES, ELECTRONIC, OTHER, NONE, FOOD, WHEELCHAIRS, OTP, NCP, BIO, ANTISEPTIC, NABEER, SOFTDRINKS, PETFOOD, SEAFOOD, MEAT, TOYS, TITAN, RADIO, OPTIC_FIBER, VEGETABLE_OIL, CONSERVE, VETPHARMA, CHEMISTRY, AUTOFLUIDS, GROCERY, BOOKS, CONSTRUCTION, FIRE, HEATER, CABLERAW, POLYMER, SWEETS, CARPARTS, NATURAL_FUR, NICOTINDEV, GADGETS, FROZEN, FERTILIZERS, HOMEWARE, VETBIO, INDUSTRIAL, PYROTECHNICS | 否 | 类别类. |
parentId |
integer · int64 | 否 | 亲人身份证. |
keywords |
string | 否 | 关键词. |
description |
string | 否 | 描述 |
paramsTnvedId |
integer · int64 | 否 | 帕拉姆斯特内维德身份证. |
isInParam |
boolean | 否 | 在帕拉姆. |
certification |
string | 否 | 证书. |
parentCode |
string | 否 | 家庭代码. |
code |
string | 否 | Code. |
certificationRequired |
boolean | 否 | 需要获得证书. |
tnvedIdlaundryparamsnamePatternaliexpressCategoryAliexpressCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
aliexpressId |
integer · int64 | 否 | 快递证件 |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
isLeaf |
boolean | 否 | 是叶子. |
aliexpressCategoryIdavitoCategoryAvitoCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 是 | Id. |
name |
string | 是 | 姓名. |
shortName |
string | 否 | 简短名字. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
isLeaf |
boolean | 否 | 是叶子. |
goodsType |
string | 否 | 货物类型. |
category |
string | 否 | 类别. |
lamodaCategoryLamodaCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
shortName |
string | 否 | 简短名字. |
published |
boolean | 否 | 发表了. |
isLeaf |
boolean | 否 | 是叶子. |
parentId |
integer · int64 | 否 | 亲人身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
lamodaCategoryIdavitoCategoryIdpackDepthpackWidthpackHeightpackWeighthasSizehasColorautoNameremoveFbsStockoneCIdexternalIdmoySkladIduseClientParamsrequiredExpirationDateserviceCategoryMappingsproductCount{
"name": "Example",
"categoryId": 1001,
"deleted": false,
"parentId": 1001,
"clientId": 1001,
"marked": false
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_category_already_exists应用逻辑中使用稳定的error_category_already_exists代码;localMessage包含上述翻译.
error_empty_category_name应用逻辑中使用稳定的error_empty_category_name代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_subscription_expired应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.
/api/category/使用 DELETE 删除类别
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
categoryIds |
integer[] | 是 | 类别的身份证. |
deleted |
boolean | 是 | 删除了. |
curl --request DELETE 'https://api.selsup.ru/api/category/?categoryIds=1&deleted=false' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/category/?categoryIds=1&deleted=false', {
method: 'DELETE',
headers: { Authorization: process.env.SELSUP_API_TOKEN },
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/category/?categoryIds=1&deleted=false', {
method: 'DELETE',
headers: { Authorization: process.env.SELSUP_API_TOKEN! },
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
const result: unknown = await response.json();
import os
import requests
response = requests.delete(
'https://api.selsup.ru/api/category/?categoryIds=1&deleted=false',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
)
response.raise_for_status()
result = response.json()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/category/?categoryIds=1&deleted=false',
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN')],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("DELETE", "https://api.selsup.ru/api/category/?categoryIds=1&deleted=false", nil)
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/category/?categoryIds=1&deleted=false"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
"string"应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
/api/category/{id}使用GETX/api/category/{id}.的类别
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 是 | Id. |
curl --request GET 'https://api.selsup.ru/api/category/1001' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/category/1001', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN },
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/category/1001', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN! },
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
const result: unknown = await response.json();
import os
import requests
response = requests.get(
'https://api.selsup.ru/api/category/1001',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
)
response.raise_for_status()
result = response.json()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/category/1001',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN')],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.selsup.ru/api/category/1001", nil)
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/category/1001"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
Category
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
categoryId |
integer · int32 | 否 | 类别的ID. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 是 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
parentId |
integer · int32 | 否 | 亲人身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
marked |
boolean | 否 | 标记了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
categoryClass |
stringSHOES, LIGHT, DRUGS, CAMERA, TYRES, MILK, WATER, TOBACCO, FURS, BEER, BICYCLES, PERFUMES, ELECTRONIC, OTHER, NONE, FOOD, WHEELCHAIRS, OTP, NCP, BIO, ANTISEPTIC, NABEER, SOFTDRINKS, PETFOOD, SEAFOOD, MEAT, TOYS, TITAN, RADIO, OPTIC_FIBER, VEGETABLE_OIL, CONSERVE, VETPHARMA, CHEMISTRY, AUTOFLUIDS, GROCERY, BOOKS, CONSTRUCTION, FIRE, HEATER, CABLERAW, POLYMER, SWEETS, CARPARTS, NATURAL_FUR, NICOTINDEV, GADGETS, FROZEN, FERTILIZERS, HOMEWARE, VETBIO, INDUSTRIAL, PYROTECHNICS | 否 | 类别类. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
wildberriesType |
WildberriesType | 否 | 野生类型. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
published |
boolean | 否 | 发表了. |
hasSize |
boolean | 否 | 有大小. |
monoBoxMinQuantity |
integer · int32 | 否 | 单盒子最小量. |
monoType |
stringALWAYS, NEVER, MONO_IF_MIN_PRICE | 否 | 单一类型. |
monoMinPrice |
integer · int32 | 否 | 单小价格. |
hasParent |
boolean | 否 | 有父母. |
parentId |
integer · int64 | 否 | 亲人身份证. |
wildberriesId |
integer · int64 | 否 | 果的身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
commission |
number · double | 否 | 委员会. |
fbsCommission |
number · double | 否 | 联邦调查局. |
fbwCommission |
number · double | 否 | 联邦调查委员会. |
dbsCommission |
number · double | 否 | 美国联邦调查局 |
edbsCommission |
number · double | 否 | 艾德斯委员会. |
cAndCCommission |
number · double | 否 | 委员会. |
bookingCommission |
number · double | 否 | 预订委员会. |
logisticPrice |
integer · int32 | 否 | 后勤价格. |
storagePrice |
number · double | 否 | 存储价格. |
acceptancePrice |
number · double | 否 | 接受价格. |
needDimensions |
boolean | 否 | 需要维度. |
purchasePercentAvg |
number · double | 否 | 购买百分比 Avg. |
purchasePercentMin |
number · double | 否 | 购买百分比 |
photoAvg |
integer · int32 | 否 | 照片来源: |
photoMin |
integer · int32 | 否 | 照片: |
drrAvg |
number · double | 否 | 艾夫博士. |
drrMin |
number · double | 否 | 博士. |
marginAvg |
number · double | 否 | 边缘 Avg. |
marginMin |
number · double | 否 | 边缘分. |
candCCommission |
number · double | 否 | 委员会. |
wildberriesCategoryIdwildberriesFbmCommissionwildberriesFbwCommissionwildberriesFbsCommissionwildberriesDbsCommissionwildberriesEdbsCommissionwildberriesCAndCCommissionwildberriesBookingCommissionozonDescriptionCategoryIdyandexMarketCategoryIdyandexMarketCategoryYandexMarketCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
isLeaf |
boolean | 否 | 是叶子. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
ozonDescriptionCategoryOzonDescriptionCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
isLeaf |
boolean | 否 | 是叶子. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
isError |
boolean | 否 | 是错误. |
errorDate |
string · date | 否 | 错误日期 |
types |
string | 否 | 类型. |
typeId |
integer · int64 | 否 | 打印机号. |
purchasePercentAvg |
number · double | 否 | 购买百分比 Avg. |
purchasePercentMin |
number · double | 否 | 购买百分比 |
photoAvg |
integer · int32 | 否 | 照片来源: |
photoMin |
integer · int32 | 否 | 照片: |
drrAvg |
number · double | 否 | 艾夫博士. |
drrMin |
number · double | 否 | 博士. |
marginAvg |
number · double | 否 | 边缘 Avg. |
marginMin |
number · double | 否 | 边缘分. |
promotionCtrAvg |
number · double | 否 | 升级, 检查员. |
promotionCtrMin |
number · double | 否 | 升级 升 |
ozonCommissiontnvedTnved
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
deleted |
boolean | 否 | 删除了. |
type |
stringSECTION, GROUP, PRODUCT, MAIN | 否 | Type. |
categoryClass |
stringSHOES, LIGHT, DRUGS, CAMERA, TYRES, MILK, WATER, TOBACCO, FURS, BEER, BICYCLES, PERFUMES, ELECTRONIC, OTHER, NONE, FOOD, WHEELCHAIRS, OTP, NCP, BIO, ANTISEPTIC, NABEER, SOFTDRINKS, PETFOOD, SEAFOOD, MEAT, TOYS, TITAN, RADIO, OPTIC_FIBER, VEGETABLE_OIL, CONSERVE, VETPHARMA, CHEMISTRY, AUTOFLUIDS, GROCERY, BOOKS, CONSTRUCTION, FIRE, HEATER, CABLERAW, POLYMER, SWEETS, CARPARTS, NATURAL_FUR, NICOTINDEV, GADGETS, FROZEN, FERTILIZERS, HOMEWARE, VETBIO, INDUSTRIAL, PYROTECHNICS | 否 | 类别类. |
parentId |
integer · int64 | 否 | 亲人身份证. |
keywords |
string | 否 | 关键词. |
description |
string | 否 | 描述 |
paramsTnvedId |
integer · int64 | 否 | 帕拉姆斯特内维德身份证. |
isInParam |
boolean | 否 | 在帕拉姆. |
certification |
string | 否 | 证书. |
parentCode |
string | 否 | 家庭代码. |
code |
string | 否 | Code. |
certificationRequired |
boolean | 否 | 需要获得证书. |
tnvedIdlaundryparamsnamePatternaliexpressCategoryAliexpressCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
aliexpressId |
integer · int64 | 否 | 快递证件 |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
isLeaf |
boolean | 否 | 是叶子. |
aliexpressCategoryIdavitoCategoryAvitoCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 是 | Id. |
name |
string | 是 | 姓名. |
shortName |
string | 否 | 简短名字. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
isLeaf |
boolean | 否 | 是叶子. |
goodsType |
string | 否 | 货物类型. |
category |
string | 否 | 类别. |
lamodaCategoryLamodaCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
shortName |
string | 否 | 简短名字. |
published |
boolean | 否 | 发表了. |
isLeaf |
boolean | 否 | 是叶子. |
parentId |
integer · int64 | 否 | 亲人身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
lamodaCategoryIdavitoCategoryIdpackDepthpackWidthpackHeightpackWeighthasSizehasColorautoNameremoveFbsStockoneCIdexternalIdmoySkladIduseClientParamsrequiredExpirationDateserviceCategoryMappingsproductCount{
"name": "Example",
"categoryId": 1001,
"deleted": false,
"parentId": 1001,
"clientId": 1001,
"marked": false
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
/api/category/ym/find使用 GET 找到Yandex市场
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
query |
string | 是 | 问问. |
limit |
integer · int32 | 是 | 限制. |
curl --request GET 'https://api.selsup.ru/api/category/ym/find?query=string&limit=50' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/category/ym/find?query=string&limit=50', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN },
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/category/ym/find?query=string&limit=50', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN! },
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
const result: unknown = await response.json();
import os
import requests
response = requests.get(
'https://api.selsup.ru/api/category/ym/find?query=string&limit=50',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
)
response.raise_for_status()
result = response.json()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/category/ym/find?query=string&limit=50',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN')],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.selsup.ru/api/category/ym/find?query=string&limit=50", nil)
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/category/ym/find?query=string&limit=50"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
YandexMarketCategory[]
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
isLeaf |
boolean | 否 | 是叶子. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
[
"string"
]应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
/api/category/wildberries/find使用 GET /api/category/wildberries/find. 找野生类型
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
query |
string | 是 | 问问. |
limit |
integer · int32 | 是 | 限制. |
curl --request GET 'https://api.selsup.ru/api/category/wildberries/find?query=string&limit=50' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/category/wildberries/find?query=string&limit=50', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN },
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/category/wildberries/find?query=string&limit=50', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN! },
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
const result: unknown = await response.json();
import os
import requests
response = requests.get(
'https://api.selsup.ru/api/category/wildberries/find?query=string&limit=50',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
)
response.raise_for_status()
result = response.json()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/category/wildberries/find?query=string&limit=50',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN')],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.selsup.ru/api/category/wildberries/find?query=string&limit=50", nil)
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/category/wildberries/find?query=string&limit=50"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
WildberriesType[]
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
published |
boolean | 否 | 发表了. |
hasSize |
boolean | 否 | 有大小. |
monoBoxMinQuantity |
integer · int32 | 否 | 单盒子最小量. |
monoType |
stringALWAYS, NEVER, MONO_IF_MIN_PRICE | 否 | 单一类型. |
monoMinPrice |
integer · int32 | 否 | 单小价格. |
hasParent |
boolean | 否 | 有父母. |
parentId |
integer · int64 | 否 | 亲人身份证. |
wildberriesId |
integer · int64 | 否 | 果的身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
commission |
number · double | 否 | 委员会. |
fbsCommission |
number · double | 否 | 联邦调查局. |
fbwCommission |
number · double | 否 | 联邦调查委员会. |
dbsCommission |
number · double | 否 | 美国联邦调查局 |
edbsCommission |
number · double | 否 | 艾德斯委员会. |
cAndCCommission |
number · double | 否 | 委员会. |
bookingCommission |
number · double | 否 | 预订委员会. |
logisticPrice |
integer · int32 | 否 | 后勤价格. |
storagePrice |
number · double | 否 | 存储价格. |
acceptancePrice |
number · double | 否 | 接受价格. |
needDimensions |
boolean | 否 | 需要维度. |
purchasePercentAvg |
number · double | 否 | 购买百分比 Avg. |
purchasePercentMin |
number · double | 否 | 购买百分比 |
photoAvg |
integer · int32 | 否 | 照片来源: |
photoMin |
integer · int32 | 否 | 照片: |
drrAvg |
number · double | 否 | 艾夫博士. |
drrMin |
number · double | 否 | 博士. |
marginAvg |
number · double | 否 | 边缘 Avg. |
marginMin |
number · double | 否 | 边缘分. |
candCCommission |
number · double | 否 | 委员会. |
[
"string"
]应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
/api/category/suggest使用 GET 找到类别
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
query |
string | 是 | 问问. |
limit |
integer · int32 | 是 | 限制. |
curl --request GET 'https://api.selsup.ru/api/category/suggest?query=string&limit=50' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/category/suggest?query=string&limit=50', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN },
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/category/suggest?query=string&limit=50', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN! },
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
const result: unknown = await response.json();
import os
import requests
response = requests.get(
'https://api.selsup.ru/api/category/suggest?query=string&limit=50',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
)
response.raise_for_status()
result = response.json()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/category/suggest?query=string&limit=50',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN')],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.selsup.ru/api/category/suggest?query=string&limit=50", nil)
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/category/suggest?query=string&limit=50"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
Category[]
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
categoryId |
integer · int32 | 否 | 类别的ID. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 是 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
parentId |
integer · int32 | 否 | 亲人身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
marked |
boolean | 否 | 标记了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
categoryClass |
stringSHOES, LIGHT, DRUGS, CAMERA, TYRES, MILK, WATER, TOBACCO, FURS, BEER, BICYCLES, PERFUMES, ELECTRONIC, OTHER, NONE, FOOD, WHEELCHAIRS, OTP, NCP, BIO, ANTISEPTIC, NABEER, SOFTDRINKS, PETFOOD, SEAFOOD, MEAT, TOYS, TITAN, RADIO, OPTIC_FIBER, VEGETABLE_OIL, CONSERVE, VETPHARMA, CHEMISTRY, AUTOFLUIDS, GROCERY, BOOKS, CONSTRUCTION, FIRE, HEATER, CABLERAW, POLYMER, SWEETS, CARPARTS, NATURAL_FUR, NICOTINDEV, GADGETS, FROZEN, FERTILIZERS, HOMEWARE, VETBIO, INDUSTRIAL, PYROTECHNICS | 否 | 类别类. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
wildberriesType |
WildberriesType | 否 | 野生类型. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
published |
boolean | 否 | 发表了. |
hasSize |
boolean | 否 | 有大小. |
monoBoxMinQuantity |
integer · int32 | 否 | 单盒子最小量. |
monoType |
stringALWAYS, NEVER, MONO_IF_MIN_PRICE | 否 | 单一类型. |
monoMinPrice |
integer · int32 | 否 | 单小价格. |
hasParent |
boolean | 否 | 有父母. |
parentId |
integer · int64 | 否 | 亲人身份证. |
wildberriesId |
integer · int64 | 否 | 果的身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
commission |
number · double | 否 | 委员会. |
fbsCommission |
number · double | 否 | 联邦调查局. |
fbwCommission |
number · double | 否 | 联邦调查委员会. |
dbsCommission |
number · double | 否 | 美国联邦调查局 |
edbsCommission |
number · double | 否 | 艾德斯委员会. |
cAndCCommission |
number · double | 否 | 委员会. |
bookingCommission |
number · double | 否 | 预订委员会. |
logisticPrice |
integer · int32 | 否 | 后勤价格. |
storagePrice |
number · double | 否 | 存储价格. |
acceptancePrice |
number · double | 否 | 接受价格. |
needDimensions |
boolean | 否 | 需要维度. |
purchasePercentAvg |
number · double | 否 | 购买百分比 Avg. |
purchasePercentMin |
number · double | 否 | 购买百分比 |
photoAvg |
integer · int32 | 否 | 照片来源: |
photoMin |
integer · int32 | 否 | 照片: |
drrAvg |
number · double | 否 | 艾夫博士. |
drrMin |
number · double | 否 | 博士. |
marginAvg |
number · double | 否 | 边缘 Avg. |
marginMin |
number · double | 否 | 边缘分. |
candCCommission |
number · double | 否 | 委员会. |
wildberriesCategoryIdwildberriesFbmCommissionwildberriesFbwCommissionwildberriesFbsCommissionwildberriesDbsCommissionwildberriesEdbsCommissionwildberriesCAndCCommissionwildberriesBookingCommissionozonDescriptionCategoryIdyandexMarketCategoryIdyandexMarketCategoryYandexMarketCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
isLeaf |
boolean | 否 | 是叶子. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
ozonDescriptionCategoryOzonDescriptionCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
isLeaf |
boolean | 否 | 是叶子. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
isError |
boolean | 否 | 是错误. |
errorDate |
string · date | 否 | 错误日期 |
types |
string | 否 | 类型. |
typeId |
integer · int64 | 否 | 打印机号. |
purchasePercentAvg |
number · double | 否 | 购买百分比 Avg. |
purchasePercentMin |
number · double | 否 | 购买百分比 |
photoAvg |
integer · int32 | 否 | 照片来源: |
photoMin |
integer · int32 | 否 | 照片: |
drrAvg |
number · double | 否 | 艾夫博士. |
drrMin |
number · double | 否 | 博士. |
marginAvg |
number · double | 否 | 边缘 Avg. |
marginMin |
number · double | 否 | 边缘分. |
promotionCtrAvg |
number · double | 否 | 升级, 检查员. |
promotionCtrMin |
number · double | 否 | 升级 升 |
ozonCommissiontnvedTnved
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
deleted |
boolean | 否 | 删除了. |
type |
stringSECTION, GROUP, PRODUCT, MAIN | 否 | Type. |
categoryClass |
stringSHOES, LIGHT, DRUGS, CAMERA, TYRES, MILK, WATER, TOBACCO, FURS, BEER, BICYCLES, PERFUMES, ELECTRONIC, OTHER, NONE, FOOD, WHEELCHAIRS, OTP, NCP, BIO, ANTISEPTIC, NABEER, SOFTDRINKS, PETFOOD, SEAFOOD, MEAT, TOYS, TITAN, RADIO, OPTIC_FIBER, VEGETABLE_OIL, CONSERVE, VETPHARMA, CHEMISTRY, AUTOFLUIDS, GROCERY, BOOKS, CONSTRUCTION, FIRE, HEATER, CABLERAW, POLYMER, SWEETS, CARPARTS, NATURAL_FUR, NICOTINDEV, GADGETS, FROZEN, FERTILIZERS, HOMEWARE, VETBIO, INDUSTRIAL, PYROTECHNICS | 否 | 类别类. |
parentId |
integer · int64 | 否 | 亲人身份证. |
keywords |
string | 否 | 关键词. |
description |
string | 否 | 描述 |
paramsTnvedId |
integer · int64 | 否 | 帕拉姆斯特内维德身份证. |
isInParam |
boolean | 否 | 在帕拉姆. |
certification |
string | 否 | 证书. |
parentCode |
string | 否 | 家庭代码. |
code |
string | 否 | Code. |
certificationRequired |
boolean | 否 | 需要获得证书. |
tnvedIdlaundryparamsnamePatternaliexpressCategoryAliexpressCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
aliexpressId |
integer · int64 | 否 | 快递证件 |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
isLeaf |
boolean | 否 | 是叶子. |
aliexpressCategoryIdavitoCategoryAvitoCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 是 | Id. |
name |
string | 是 | 姓名. |
shortName |
string | 否 | 简短名字. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
isLeaf |
boolean | 否 | 是叶子. |
goodsType |
string | 否 | 货物类型. |
category |
string | 否 | 类别. |
lamodaCategoryLamodaCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
shortName |
string | 否 | 简短名字. |
published |
boolean | 否 | 发表了. |
isLeaf |
boolean | 否 | 是叶子. |
parentId |
integer · int64 | 否 | 亲人身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
lamodaCategoryIdavitoCategoryIdpackDepthpackWidthpackHeightpackWeighthasSizehasColorautoNameremoveFbsStockoneCIdexternalIdmoySkladIduseClientParamsrequiredExpirationDateserviceCategoryMappingsproductCount[
"string"
]应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
/api/category/ozon/find使用 GET /api/category/ozon/find. 找到臭氧
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
query |
string | 是 | 问问. |
limit |
integer · int32 | 是 | 限制. |
curl --request GET 'https://api.selsup.ru/api/category/ozon/find?query=string&limit=50' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/category/ozon/find?query=string&limit=50', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN },
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/category/ozon/find?query=string&limit=50', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN! },
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
const result: unknown = await response.json();
import os
import requests
response = requests.get(
'https://api.selsup.ru/api/category/ozon/find?query=string&limit=50',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
)
response.raise_for_status()
result = response.json()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/category/ozon/find?query=string&limit=50',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN')],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.selsup.ru/api/category/ozon/find?query=string&limit=50", nil)
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/category/ozon/find?query=string&limit=50"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
OzonDescriptionCategory[]
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
isLeaf |
boolean | 否 | 是叶子. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
isError |
boolean | 否 | 是错误. |
errorDate |
string · date | 否 | 错误日期 |
types |
string | 否 | 类型. |
typeId |
integer · int64 | 否 | 打印机号. |
purchasePercentAvg |
number · double | 否 | 购买百分比 Avg. |
purchasePercentMin |
number · double | 否 | 购买百分比 |
photoAvg |
integer · int32 | 否 | 照片来源: |
photoMin |
integer · int32 | 否 | 照片: |
drrAvg |
number · double | 否 | 艾夫博士. |
drrMin |
number · double | 否 | 博士. |
marginAvg |
number · double | 否 | 边缘 Avg. |
marginMin |
number · double | 否 | 边缘分. |
promotionCtrAvg |
number · double | 否 | 升级, 检查员. |
promotionCtrMin |
number · double | 否 | 升级 升 |
[
"string"
]应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
/api/category/links使用GET/api/category/links.的链接
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
filter |
ParamsFilter | 是 | 选器. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
limit |
integer · int32 | 否 | 限制. |
page |
integer · int32 | 否 | 页面. |
count |
boolean | 否 | 伯爵. |
sortBy |
string | 否 | 排序了. |
ascending |
boolean | 否 | 升高. |
nationalCatalogId |
integer · int64 | 否 | 标签:国家目录 |
wildberriesTypeId |
integer · int64 | 否 | 野生类型的身份证. |
wildberriesCategoryId |
integer · int64 | 否 | 野生类别的身份. |
ozonCategoryId |
integer · int64 | 否 | 臭氧类别的ID. |
ozonDescriptionCategoryId |
integer · int64 | 否 | 臭氧描述类别ID. |
aliexpressCategoryId |
integer · int64 | 否 | 标签: 标识: |
lamodaCategoryId |
integer · int64 | 否 | 拉莫达类别的身份证. |
kaspiCategoryId |
string | 否 | 卡斯皮类别的身份证. |
avitoCategoryId |
integer · int64 | 否 | 果类别的身份 |
yandexMarketCategoryId |
integer · int64 | 否 | 亚兰德克斯市场类别身份证 |
categoryId |
integer · int32 | 否 | 类别的ID. |
useAllCategories |
boolean | 否 | 使用所有类别. |
useCategoryOption |
boolean | 否 | 使用类别选项. |
curl --request GET 'https://api.selsup.ru/api/category/links?filter=%5Bobject+Object%5D' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/category/links?filter=%5Bobject+Object%5D', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN },
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/category/links?filter=%5Bobject+Object%5D', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN! },
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
const result: unknown = await response.json();
import os
import requests
response = requests.get(
'https://api.selsup.ru/api/category/links?filter=%5Bobject+Object%5D',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
)
response.raise_for_status()
result = response.json()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/category/links?filter=%5Bobject+Object%5D',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN')],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.selsup.ru/api/category/links?filter=%5Bobject+Object%5D", nil)
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/category/links?filter=%5Bobject+Object%5D"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
CategoryLink[]
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
sourceServiceId |
integer · int32 | 否 | 源服务身份证. |
sourceCategoryId |
string | 否 | 来源类别ID |
resultServiceId |
integer · int32 | 否 | 结果服务身份证. |
resultCategoryId |
string | 否 | 结果类别ID. |
resultCategory |
object | 否 | 结果类别 |
probability |
number · double | 否 | 可能性. |
resultService |
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 | 否 | 结果服务. |
sourceService |
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 | 否 | 源服务. |
[
"string"
]应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_subscription_expired应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.
/api/category/lamoda/find使用 GET /api/category/lamoda/find. 找到Lamoda
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
query |
string | 是 | 问问. |
limit |
integer · int32 | 是 | 限制. |
curl --request GET 'https://api.selsup.ru/api/category/lamoda/find?query=string&limit=50' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/category/lamoda/find?query=string&limit=50', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN },
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/category/lamoda/find?query=string&limit=50', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN! },
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
const result: unknown = await response.json();
import os
import requests
response = requests.get(
'https://api.selsup.ru/api/category/lamoda/find?query=string&limit=50',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
)
response.raise_for_status()
result = response.json()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/category/lamoda/find?query=string&limit=50',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN')],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.selsup.ru/api/category/lamoda/find?query=string&limit=50", nil)
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/category/lamoda/find?query=string&limit=50"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
LamodaCategory[]
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
shortName |
string | 否 | 简短名字. |
published |
boolean | 否 | 发表了. |
isLeaf |
boolean | 否 | 是叶子. |
parentId |
integer · int64 | 否 | 亲人身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
[
"string"
]应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
/api/category/kaspi/find使用GET/api/category/kaspi/find.找到Kaspi
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
query |
string | 是 | 问问. |
limit |
integer · int32 | 是 | 限制. |
curl --request GET 'https://api.selsup.ru/api/category/kaspi/find?query=string&limit=50' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/category/kaspi/find?query=string&limit=50', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN },
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/category/kaspi/find?query=string&limit=50', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN! },
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
const result: unknown = await response.json();
import os
import requests
response = requests.get(
'https://api.selsup.ru/api/category/kaspi/find?query=string&limit=50',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
)
response.raise_for_status()
result = response.json()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/category/kaspi/find?query=string&limit=50',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN')],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.selsup.ru/api/category/kaspi/find?query=string&limit=50", nil)
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/category/kaspi/find?query=string&limit=50"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
KaspiCategory[]
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
code |
string | 否 | Code. |
name |
string | 否 | 姓名. |
published |
boolean | 否 | 发表了. |
isLeaf |
boolean | 否 | 是叶子. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
[
"string"
]应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
/api/category/find使用 GET /api/category/find. 找到类别
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
query |
string | 否 | 问问. |
actual |
boolean | 否 | 实际的. |
ozonCategoryId |
integer · int64 | 否 | 臭氧类别的ID. |
aliexpressCategoryId |
integer · int64 | 否 | 标签: 标识: |
categoryOneCId |
string | 否 | 类型一的信息化. |
services |
string[] | 否 | 服务. |
withProductCount |
boolean | 否 | 随着产品数量. |
limit |
integer · int32 | 否 | 限制. |
page |
integer · int32 | 否 | 页面. |
count |
boolean | 否 | 伯爵. |
sortBy |
stringCATEGORYID, NAME, CATEGORYCLASS, TNVED, MARKED | 否 | 排序了. |
ascending |
boolean | 否 | 升高. |
curl --request GET 'https://api.selsup.ru/api/category/find?limit=50&page=1' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/category/find?limit=50&page=1', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN },
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/category/find?limit=50&page=1', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN! },
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
const result: unknown = await response.json();
import os
import requests
response = requests.get(
'https://api.selsup.ru/api/category/find?limit=50&page=1',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
)
response.raise_for_status()
result = response.json()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/category/find?limit=50&page=1',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN')],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.selsup.ru/api/category/find?limit=50&page=1", nil)
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/category/find?limit=50&page=1"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
FindResponseCategory
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rows |
Category[] | 否 | 排列. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
categoryId |
integer · int32 | 否 | 类别的ID. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 是 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
parentId |
integer · int32 | 否 | 亲人身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
marked |
boolean | 否 | 标记了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
categoryClass |
stringSHOES, LIGHT, DRUGS, CAMERA, TYRES, MILK, WATER, TOBACCO, FURS, BEER, BICYCLES, PERFUMES, ELECTRONIC, OTHER, NONE, FOOD, WHEELCHAIRS, OTP, NCP, BIO, ANTISEPTIC, NABEER, SOFTDRINKS, PETFOOD, SEAFOOD, MEAT, TOYS, TITAN, RADIO, OPTIC_FIBER, VEGETABLE_OIL, CONSERVE, VETPHARMA, CHEMISTRY, AUTOFLUIDS, GROCERY, BOOKS, CONSTRUCTION, FIRE, HEATER, CABLERAW, POLYMER, SWEETS, CARPARTS, NATURAL_FUR, NICOTINDEV, GADGETS, FROZEN, FERTILIZERS, HOMEWARE, VETBIO, INDUSTRIAL, PYROTECHNICS | 否 | 类别类. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
wildberriesType |
WildberriesType | 否 | 野生类型. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
published |
boolean | 否 | 发表了. |
hasSize |
boolean | 否 | 有大小. |
monoBoxMinQuantity |
integer · int32 | 否 | 单盒子最小量. |
monoType |
stringALWAYS, NEVER, MONO_IF_MIN_PRICE | 否 | 单一类型. |
monoMinPrice |
integer · int32 | 否 | 单小价格. |
hasParent |
boolean | 否 | 有父母. |
parentId |
integer · int64 | 否 | 亲人身份证. |
wildberriesId |
integer · int64 | 否 | 果的身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
commission |
number · double | 否 | 委员会. |
fbsCommission |
number · double | 否 | 联邦调查局. |
fbwCommission |
number · double | 否 | 联邦调查委员会. |
dbsCommission |
number · double | 否 | 美国联邦调查局 |
edbsCommission |
number · double | 否 | 艾德斯委员会. |
cAndCCommission |
number · double | 否 | 委员会. |
bookingCommission |
number · double | 否 | 预订委员会. |
logisticPrice |
integer · int32 | 否 | 后勤价格. |
storagePrice |
number · double | 否 | 存储价格. |
acceptancePrice |
number · double | 否 | 接受价格. |
needDimensions |
boolean | 否 | 需要维度. |
purchasePercentAvg |
number · double | 否 | 购买百分比 Avg. |
purchasePercentMin |
number · double | 否 | 购买百分比 |
photoAvg |
integer · int32 | 否 | 照片来源: |
photoMin |
integer · int32 | 否 | 照片: |
drrAvg |
number · double | 否 | 艾夫博士. |
drrMin |
number · double | 否 | 博士. |
marginAvg |
number · double | 否 | 边缘 Avg. |
marginMin |
number · double | 否 | 边缘分. |
candCCommission |
number · double | 否 | 委员会. |
wildberriesCategoryIdwildberriesFbmCommissionwildberriesFbwCommissionwildberriesFbsCommissionwildberriesDbsCommissionwildberriesEdbsCommissionwildberriesCAndCCommissionwildberriesBookingCommissionozonDescriptionCategoryIdyandexMarketCategoryIdyandexMarketCategoryYandexMarketCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
isLeaf |
boolean | 否 | 是叶子. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
ozonDescriptionCategoryOzonDescriptionCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
isLeaf |
boolean | 否 | 是叶子. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
isError |
boolean | 否 | 是错误. |
errorDate |
string · date | 否 | 错误日期 |
types |
string | 否 | 类型. |
typeId |
integer · int64 | 否 | 打印机号. |
purchasePercentAvg |
number · double | 否 | 购买百分比 Avg. |
purchasePercentMin |
number · double | 否 | 购买百分比 |
photoAvg |
integer · int32 | 否 | 照片来源: |
photoMin |
integer · int32 | 否 | 照片: |
drrAvg |
number · double | 否 | 艾夫博士. |
drrMin |
number · double | 否 | 博士. |
marginAvg |
number · double | 否 | 边缘 Avg. |
marginMin |
number · double | 否 | 边缘分. |
promotionCtrAvg |
number · double | 否 | 升级, 检查员. |
promotionCtrMin |
number · double | 否 | 升级 升 |
ozonCommissiontnvedTnved
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
deleted |
boolean | 否 | 删除了. |
type |
stringSECTION, GROUP, PRODUCT, MAIN | 否 | Type. |
categoryClass |
stringSHOES, LIGHT, DRUGS, CAMERA, TYRES, MILK, WATER, TOBACCO, FURS, BEER, BICYCLES, PERFUMES, ELECTRONIC, OTHER, NONE, FOOD, WHEELCHAIRS, OTP, NCP, BIO, ANTISEPTIC, NABEER, SOFTDRINKS, PETFOOD, SEAFOOD, MEAT, TOYS, TITAN, RADIO, OPTIC_FIBER, VEGETABLE_OIL, CONSERVE, VETPHARMA, CHEMISTRY, AUTOFLUIDS, GROCERY, BOOKS, CONSTRUCTION, FIRE, HEATER, CABLERAW, POLYMER, SWEETS, CARPARTS, NATURAL_FUR, NICOTINDEV, GADGETS, FROZEN, FERTILIZERS, HOMEWARE, VETBIO, INDUSTRIAL, PYROTECHNICS | 否 | 类别类. |
parentId |
integer · int64 | 否 | 亲人身份证. |
keywords |
string | 否 | 关键词. |
description |
string | 否 | 描述 |
paramsTnvedId |
integer · int64 | 否 | 帕拉姆斯特内维德身份证. |
isInParam |
boolean | 否 | 在帕拉姆. |
certification |
string | 否 | 证书. |
parentCode |
string | 否 | 家庭代码. |
code |
string | 否 | Code. |
certificationRequired |
boolean | 否 | 需要获得证书. |
tnvedIdlaundryparamsnamePatternaliexpressCategoryAliexpressCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
aliexpressId |
integer · int64 | 否 | 快递证件 |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
isLeaf |
boolean | 否 | 是叶子. |
aliexpressCategoryIdavitoCategoryAvitoCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 是 | Id. |
name |
string | 是 | 姓名. |
shortName |
string | 否 | 简短名字. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
isLeaf |
boolean | 否 | 是叶子. |
goodsType |
string | 否 | 货物类型. |
category |
string | 否 | 类别. |
lamodaCategoryLamodaCategory
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
shortName |
string | 否 | 简短名字. |
published |
boolean | 否 | 发表了. |
isLeaf |
boolean | 否 | 是叶子. |
parentId |
integer · int64 | 否 | 亲人身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
lamodaCategoryIdavitoCategoryIdpackDepthpackWidthpackHeightpackWeighthasSizehasColorautoNameremoveFbsStockoneCIdexternalIdmoySkladIduseClientParamsrequiredExpirationDateserviceCategoryMappingsproductCount{
"rows": "string"
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
/api/category/avito/find使用 GET /api/category/avito/find. 找到Avido类别
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
query |
string | 是 | 问问. |
limit |
integer · int32 | 是 | 限制. |
curl --request GET 'https://api.selsup.ru/api/category/avito/find?query=string&limit=50' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/category/avito/find?query=string&limit=50', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN },
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/category/avito/find?query=string&limit=50', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN! },
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
const result: unknown = await response.json();
import os
import requests
response = requests.get(
'https://api.selsup.ru/api/category/avito/find?query=string&limit=50',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
)
response.raise_for_status()
result = response.json()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/category/avito/find?query=string&limit=50',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN')],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.selsup.ru/api/category/avito/find?query=string&limit=50", nil)
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/category/avito/find?query=string&limit=50"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
AvitoCategory[]
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 是 | Id. |
name |
string | 是 | 姓名. |
shortName |
string | 否 | 简短名字. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
isLeaf |
boolean | 否 | 是叶子. |
goodsType |
string | 否 | 货物类型. |
category |
string | 否 | 类别. |
[
"string"
]应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
/api/category/aliexpress/find使用 GET /api/category/aliexpress/find. 搜索Aliexpress类别
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
query |
string | 是 | 问问. |
limit |
integer · int32 | 是 | 限制. |
curl --request GET 'https://api.selsup.ru/api/category/aliexpress/find?query=string&limit=50' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/category/aliexpress/find?query=string&limit=50', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN },
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/category/aliexpress/find?query=string&limit=50', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN! },
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
const result: unknown = await response.json();
import os
import requests
response = requests.get(
'https://api.selsup.ru/api/category/aliexpress/find?query=string&limit=50',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
)
response.raise_for_status()
result = response.json()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/category/aliexpress/find?query=string&limit=50',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN')],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.selsup.ru/api/category/aliexpress/find?query=string&limit=50", nil)
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/category/aliexpress/find?query=string&limit=50"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
AliexpressCategory[]
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 否 | 姓名. |
published |
boolean | 否 | 发表了. |
parentId |
integer · int64 | 否 | 亲人身份证. |
aliexpressId |
integer · int64 | 否 | 快递证件 |
lastSyncDate |
string · date-time | 否 | 最后的同步日期. |
notChangedDays |
integer · int32 | 否 | 没有改变的日子. |
isLeaf |
boolean | 否 | 是叶子. |
[
"string"
]应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
/api/category/{categoryId}/param/{paramId}使用 DELETE /api/category/{categoryId}/param/{paramId}.删除类别参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
paramId |
integer · int64 | 是 | 位名单. |
categoryId |
integer · int32 | 是 | 类别的ID. |
curl --request DELETE 'https://api.selsup.ru/api/category/1001/param/1001' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/category/1001/param/1001', {
method: 'DELETE',
headers: { Authorization: process.env.SELSUP_API_TOKEN },
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const response: Response = await fetch('https://api.selsup.ru/api/category/1001/param/1001', {
method: 'DELETE',
headers: { Authorization: process.env.SELSUP_API_TOKEN! },
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
import os
import requests
response = requests.delete(
'https://api.selsup.ru/api/category/1001/param/1001',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
)
response.raise_for_status()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/category/1001/param/1001',
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN')],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("DELETE", "https://api.selsup.ru/api/category/1001/param/1001", nil)
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/category/1001/param/1001"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
答案没有身体.
应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_subscription_expired应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.
/api/category/{categoryId}/archive使用 DELETE /api/category/{categoryId}/archive. 的档案类别
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
categoryId |
integer · int32 | 是 | 类别的ID. |
curl --request DELETE 'https://api.selsup.ru/api/category/1001/archive' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/category/1001/archive', {
method: 'DELETE',
headers: { Authorization: process.env.SELSUP_API_TOKEN },
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/category/1001/archive', {
method: 'DELETE',
headers: { Authorization: process.env.SELSUP_API_TOKEN! },
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
const result: unknown = await response.json();
import os
import requests
response = requests.delete(
'https://api.selsup.ru/api/category/1001/archive',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
)
response.raise_for_status()
result = response.json()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/category/1001/archive',
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN')],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("DELETE", "https://api.selsup.ru/api/category/1001/archive", nil)
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/category/1001/archive"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
"string"应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
/api/category使用 DELETE /api/category.删除类别1
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
categoryIds |
integer[] | 是 | 类别的身份证. |
deleted |
boolean | 是 | 删除了. |
curl --request DELETE 'https://api.selsup.ru/api/category?categoryIds=1&deleted=false' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/category?categoryIds=1&deleted=false', {
method: 'DELETE',
headers: { Authorization: process.env.SELSUP_API_TOKEN },
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/category?categoryIds=1&deleted=false', {
method: 'DELETE',
headers: { Authorization: process.env.SELSUP_API_TOKEN! },
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
const result: unknown = await response.json();
import os
import requests
response = requests.delete(
'https://api.selsup.ru/api/category?categoryIds=1&deleted=false',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
)
response.raise_for_status()
result = response.json()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/category?categoryIds=1&deleted=false',
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN')],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("DELETE", "https://api.selsup.ru/api/category?categoryIds=1&deleted=false", nil)
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/category?categoryIds=1&deleted=false"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
"string"应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.