开始使用仓库
使用专用API代币,首先验证测试数据的读取操作.
- 保存代币服务器侧,然后将其发送到Authorization标题中.
- 检查所需参数,并扩大请求或响应方案.
- 在应用错误中处理HTTP状态和稳定的error字段.
通过可编辑的独立合同来支持本页面. 在生产使用之前,验证使用测试数据的写作操作.
/api/warehouse
准备使用的工作流程
使用专用API代币,首先验证测试数据的读取操作.
数据模型
模型在此列出一次,并且可以直接从使用它们的终端点扩展.
idinteger · int32Id.
postCodestring邮政代码.
countryCountry乡村.
regionRegion地区.
regionIdinteger · int32区域ID
streetstring路上.
housestring房子.
districtstring地区.
citystring城市.
localitystring地方.
buildingstring建筑物.
flatstring没有什么.
shortstring短暂.
addressIdAddress联系方式
fullstring满满.
idinteger · int32Id.
read-onlywarehouseIdinteger · int64仓库身份证.
passageIdinteger · int32通过身份证.
shelfIdinteger · int32货架身份证.
rackIdinteger · int32查看身份证.
namestring姓名.
fullNamestring完整名字.
sortNamestring某种名字.
barcodestring条码.
deletedboolean删除了.
widthinteger · int32宽度.
heightinteger · int32高.
depthinteger · int32深度.
clientIdinteger · int64客户身份证.
read-onlylastInventoryIdinteger · int32最后的库存身份证.
read-onlytypestringType.
countryIdinteger · int32国家的身份证.
namestring姓名.
code2string代码2
code3string代码3
namesobject他们的名字.
printNamestring打印名字.
idinteger · int64Id.
read-onlynamestring姓名.
必填shortNamestring简短名字.
taxTypestring税收类型.
taxRateinteger · int32税率.
taxNdsinteger · int32税收.
inputTaxNdsinteger · int32输入税税.
outputTaxNdsinteger · int32产出税法
enableNewTaxCalculationboolean启用新的税收计算.
useNdsCostPriceboolean使用NDS成本价格.
innstring酒店.
必填kppstring现在,我们要去.
bankstring银行.
bikstring骑自行车.
corrBillstring科尔比尔.
billNumberstring账号号.
stampPathstring邮票路径.
read-onlystampUrlstring邮票URL.
read-onlystampSizeinteger · int32邮票大小.
read-onlystampWidthinteger · int32盖章宽度.
read-onlystampHeightinteger · int32邮票高度.
read-onlysignaturePathstring签字之路.
read-onlysignatureUrlstring签字的URL.
read-onlysignatureSizeinteger · int32签名大小.
read-onlysignatureWidthinteger · int32签字宽度.
read-onlysignatureHeightinteger · int32签字高度.
read-onlyipPersonPerson个人.
formstring形式.
必填ipboolean,我知道.
clientIdinteger · int64客户身份证.
read-onlyaddressAddress现在,我有个地址.
phoneNumberstring电话号码.
addressFullstring地址是完整的.
read-onlyidinteger · int32Id.
namestring姓名.
warehouseIdinteger · int64仓库身份证.
deletedboolean删除了.
clientIdinteger · int64客户身份证.
racksRack[]货架.
personIdinteger · int64个人身份证.
read-onlyfirstNamestring姓名
必填lastNamestring姓名
必填surNamestring苏尔名
clientIdinteger · int64客户身份证.
read-onlypositionPersonPosition位置.
必填versionIdinteger · int64版本ID.
read-onlycreatedUserstring创建用户.
read-onlycreatedDatestring · date-time创造日期.
read-onlydeletedboolean删除了.
read-onlyuserIdinteger · int32用户身份证
read-onlyhasChangesboolean有变化.
fullNamestring完整名字.
read-onlyshortNamestring简短名字.
read-onlyidinteger · int64Id.
read-onlynamestring姓名.
必填deletedboolean删除了.
read-onlyclientIdinteger · int64客户身份证.
read-onlydefaultJobIdinteger · int64默认工作身份证.
createdUserstring创建用户.
read-onlycreatedDatestring · date-time创造日期.
read-onlyidinteger · int32Id.
namestring姓名.
warehouseIdinteger · int64仓库身份证.
passageIdinteger · int32通过身份证.
deletedboolean删除了.
clientIdinteger · int64客户身份证.
shelvesShelf[]货架.
regionIdinteger · int32区域ID
countryIdinteger · int32国家的身份证.
namestring姓名.
regionSynonymsRegionSynonym[]区域同义词
idinteger · int64Id.
regionIdinteger · int64区域ID
synonymstring标语是同义词.
servicestring服务.
idinteger · int64Id.
read-onlynamestring姓名.
必填externalIdstring其他身份证.
必填warehouseIdinteger · int64仓库身份证.
必填servicestring服务.
必填organizationIdinteger · int64组织身份证.
必填serviceOrganizationIdinteger · int64服务组织身份证.
idinteger · int32Id.
namestring姓名.
warehouseIdinteger · int64仓库身份证.
rackIdinteger · int32查看身份证.
deletedboolean删除了.
clientIdinteger · int64客户身份证.
cellsCell[]细胞.
idinteger · int64Id.
namestring姓名.
servicestring服务.
organizationIdinteger · int64组织身份证.
fboOrganizationIdinteger · int64联邦调查局组织身份证.
noPlaceCellIdinteger · int32没有地方细胞身份证.
noPlaceCellCell没有地方细胞.
refundCellIdinteger · int32退还电话身份证.
organizationOrganization组织.
priorityinteger · int32优先考虑.
useForOrderboolean为了秩序而使用.
clientIdinteger · int64客户身份证.
externalNamestring其他名字
notSyncStocksboolean没有同步股票.
ignoreOrdersboolean忽略命令.
passagesPassage[]经文.
warehouseServicesServiceWarehouse[]仓库服务.
deliveriesobject交货.
deletedboolean删除了.
captionstring标题
durationHoursinteger · int32时间时间
reservationDaysinteger · int32预订日.
schedulestring时间表.
urAddressstring您的地址
citystring城市.
longitudenumber · double长度.
latitudenumber · double广度.
warehouseServiceIdinteger · int64仓库服务身份证.
warehouseTypestring仓库类型.
descriptionstring描述
inninteger · int64酒店.
kppinteger · int64现在,我们要去.
paymentAccountstring支付账户
telephonestring电话.
regionNamestring区域名称
regionRegion地区.
regionIdinteger · int32区域ID
isPrepayOnlineboolean现在,我们在网上做了预付.
isCashboolean这是现金.
isCardboolean是卡德.
isGoodsActiveboolean货物活动.
orgIdWarehouse组织身份证.
addressstring现在,我有个地址.
cellIdinteger · int32电话身份证.
shelfIdinteger · int32货架身份证.
rackIdinteger · int32查看身份证.
passageIdinteger · int32通过身份证.
warehouseIdinteger · int64仓库身份证.
createdinteger · int32创造了.
updatedinteger · int32更新了.
latitudenumber · double广度.
longitudenumber · double长度.
addressstring现在,我有个地址.
namestring姓名.
coordinatesCoordinates坐标.
warehouse_idinteger · int64仓库身份证.
warehouse_typestring仓库类型.
idobjectId.
namestring姓名.
warehouseIdinteger · int64仓库身份证.
quantityinteger · int32量量.
distinctQuantityinteger · int64显而易见的数量.
purchasePricenumber · double买价.
additionalExpensesAmountnumber · double额外费用
wildberriesRetailPricenumber · double野生果零售价格
ozonRetailPricenumber · double子零售价格
yandexMarketRetailPricenumber · double亚兰德克斯市场零售价格
aliexpressRetailPricenumber · double果零售价格
sberMegaMarketRetailPricenumber · double瑞银大市场零售价格
retailPriceByMarketplacenumber · double按市场价格.
错误合同
编程的代码在每个地方都相同,而用户面向的消息由服务器翻译. 建立在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/warehouse/{warehouseId}使用GETX/api/warehouse/{warehouseId}.的仓库ID
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
warehouseId |
integer · int64 | 是 | 仓库身份证. |
curl --request GET 'https://api.selsup.ru/api/warehouse/1001' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/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/warehouse/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/warehouse/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/warehouse/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/warehouse/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/warehouse/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());
}
}
Warehouse
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int64 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 否 | 服务. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
organizationId |
integer · int64 | 否 | 组织身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fboOrganizationId |
integer · int64 | 否 | 联邦调查局组织身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
noPlaceCellId |
integer · int32 | 否 | 没有地方细胞身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
noPlaceCell |
Cell | 否 | 没有地方细胞. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
name |
string | 否 | 姓名. |
fullName |
string | 否 | 完整名字. |
sortName |
string | 否 | 某种名字. |
barcode |
string | 否 | 条码. |
deleted |
boolean | 否 | 删除了. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
clientId |
integer · int64 | 否 | 客户身份证. |
lastInventoryId |
integer · int32 | 否 | 最后的库存身份证. |
type |
stringNORMAL, NO_PLACE, REFUND | 否 | Type. |
refundCellIdorganizationOrganization
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int64 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 是 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
shortName |
string | 否 | 简短名字. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxType |
stringYSN, YSN_CONSUMPTION, AUSN, AUSN_CONSUMPTION, OSNO, SELF_EMPLOYED | 否 | 税收类型. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxRate |
integer · int32 | 否 | 税率. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxNds |
integer · int32 | 否 | 税收. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
inputTaxNds |
integer · int32 | 否 | 输入税税. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
outputTaxNds |
integer · int32 | 否 | 产出税法 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enableNewTaxCalculation |
boolean | 否 | 启用新的税收计算. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
useNdsCostPrice |
boolean | 否 | 使用NDS成本价格. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
inn |
string | 是 | 酒店. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
kpp |
string | 否 | 现在,我们要去. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bank |
string | 否 | 银行. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bik |
string | 否 | 骑自行车. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
corrBill |
string | 否 | 科尔比尔. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
billNumber |
string | 否 | 账号号. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampPath |
string | 否 | 邮票路径. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampUrl |
string | 否 | 邮票URL. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampSize |
integer · int32 | 否 | 邮票大小. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampWidth |
integer · int32 | 否 | 盖章宽度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampHeight |
integer · int32 | 否 | 邮票高度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signaturePath |
string | 否 | 签字之路. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureUrl |
string | 否 | 签字的URL. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureSize |
integer · int32 | 否 | 签名大小. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureWidth |
integer · int32 | 否 | 签字宽度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureHeight |
integer · int32 | 否 | 签字高度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ipPerson |
Person | 否 | 个人. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
personId |
integer · int64 | 否 | 个人身份证. |
firstName |
string | 是 | 姓名 |
lastName |
string | 是 | 姓名 |
surName |
string | 否 | 苏尔名 |
clientId |
integer · int64 | 否 | 客户身份证. |
position |
PersonPosition | 是 | 位置. |
versionId |
integer · int64 | 否 | 版本ID. |
createdUser |
string | 否 | 创建用户. |
createdDate |
string · date-time | 否 | 创造日期. |
deleted |
boolean | 否 | 删除了. |
userId |
integer · int32 | 否 | 用户身份证 |
hasChanges |
boolean | 否 | 有变化. |
fullName |
string | 否 | 完整名字. |
shortName |
string | 否 | 简短名字. |
formipclientIdaddressAddress
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
postCode |
string | 否 | 邮政代码. |
country |
Country | 否 | 乡村. |
region |
Region | 否 | 地区. |
regionId |
integer · int32 | 否 | 区域ID |
street |
string | 否 | 路上. |
house |
string | 否 | 房子. |
district |
string | 否 | 地区. |
city |
string | 否 | 城市. |
locality |
string | 否 | 地方. |
building |
string | 否 | 建筑物. |
flat |
string | 否 | 没有什么. |
short |
string | 否 | 短暂. |
addressId |
Address | 否 | 联系方式 |
full |
string | 否 | 满满. |
phoneNumberaddressFullpriorityuseForOrderclientIdexternalNamenotSyncStocksignoreOrderspassagesPassage
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||
racks |
Rack[] | 否 | 货架. | ||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
name |
string | 否 | 姓名. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
deleted |
boolean | 否 | 删除了. |
clientId |
integer · int64 | 否 | 客户身份证. |
shelves |
Shelf[] | 否 | 货架. |
warehouseServicesServiceWarehouse
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
externalId |
string | 是 | 其他身份证. |
warehouseId |
integer · int64 | 是 | 仓库身份证. |
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 是 | 服务. |
organizationId |
integer · int64 | 是 | 组织身份证. |
serviceOrganizationId |
integer · int64 | 否 | 服务组织身份证. |
deliveriesdeletedcaptiondurationHoursreservationDaysscheduleurAddresscitylongitudelatitudewarehouseServiceIdwarehouseTypedescriptioninnkpppaymentAccounttelephoneregionNameregionRegion
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
regionId |
integer · int32 | 否 | 区域ID | ||||||||||||||||||||
countryId |
integer · int32 | 否 | 国家的身份证. | ||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||
regionSynonyms |
RegionSynonym[] | 否 | 区域同义词 | ||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
regionId |
integer · int64 | 否 | 区域ID |
synonym |
string | 否 | 标语是同义词. |
service |
string | 否 | 服务. |
regionIdisPrepayOnlineisCashisCardisGoodsActiveorgIdaddress{
"id": 1001,
"name": "Example",
"service": "NONE",
"organizationId": 1001,
"fboOrganizationId": 1001,
"noPlaceCellId": 1001
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_cell_not_found应用逻辑中使用稳定的error_cell_not_found代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_warehouse_not_found应用逻辑中使用稳定的error_warehouse_not_found代码;localMessage包含上述翻译.
/api/warehouse/{warehouseId}使用 PUT /api/warehouse/{warehouseId}.的补丁仓库
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
warehouseId |
integer · int64 | 是 | 仓库身份证. |
application/jsonWarehouse| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int64 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 否 | 服务. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
organizationId |
integer · int64 | 否 | 组织身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fboOrganizationId |
integer · int64 | 否 | 联邦调查局组织身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
noPlaceCellId |
integer · int32 | 否 | 没有地方细胞身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
noPlaceCell |
Cell | 否 | 没有地方细胞. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
name |
string | 否 | 姓名. |
fullName |
string | 否 | 完整名字. |
sortName |
string | 否 | 某种名字. |
barcode |
string | 否 | 条码. |
deleted |
boolean | 否 | 删除了. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
clientId |
integer · int64 | 否 | 客户身份证. |
lastInventoryId |
integer · int32 | 否 | 最后的库存身份证. |
type |
stringNORMAL, NO_PLACE, REFUND | 否 | Type. |
refundCellIdorganizationOrganization
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int64 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 是 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
shortName |
string | 否 | 简短名字. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxType |
stringYSN, YSN_CONSUMPTION, AUSN, AUSN_CONSUMPTION, OSNO, SELF_EMPLOYED | 否 | 税收类型. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxRate |
integer · int32 | 否 | 税率. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxNds |
integer · int32 | 否 | 税收. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
inputTaxNds |
integer · int32 | 否 | 输入税税. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
outputTaxNds |
integer · int32 | 否 | 产出税法 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enableNewTaxCalculation |
boolean | 否 | 启用新的税收计算. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
useNdsCostPrice |
boolean | 否 | 使用NDS成本价格. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
inn |
string | 是 | 酒店. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
kpp |
string | 否 | 现在,我们要去. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bank |
string | 否 | 银行. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bik |
string | 否 | 骑自行车. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
corrBill |
string | 否 | 科尔比尔. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
billNumber |
string | 否 | 账号号. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampPath |
string | 否 | 邮票路径. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampUrl |
string | 否 | 邮票URL. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampSize |
integer · int32 | 否 | 邮票大小. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampWidth |
integer · int32 | 否 | 盖章宽度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampHeight |
integer · int32 | 否 | 邮票高度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signaturePath |
string | 否 | 签字之路. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureUrl |
string | 否 | 签字的URL. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureSize |
integer · int32 | 否 | 签名大小. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureWidth |
integer · int32 | 否 | 签字宽度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureHeight |
integer · int32 | 否 | 签字高度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ipPerson |
Person | 否 | 个人. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
personId |
integer · int64 | 否 | 个人身份证. |
firstName |
string | 是 | 姓名 |
lastName |
string | 是 | 姓名 |
surName |
string | 否 | 苏尔名 |
clientId |
integer · int64 | 否 | 客户身份证. |
position |
PersonPosition | 是 | 位置. |
versionId |
integer · int64 | 否 | 版本ID. |
createdUser |
string | 否 | 创建用户. |
createdDate |
string · date-time | 否 | 创造日期. |
deleted |
boolean | 否 | 删除了. |
userId |
integer · int32 | 否 | 用户身份证 |
hasChanges |
boolean | 否 | 有变化. |
fullName |
string | 否 | 完整名字. |
shortName |
string | 否 | 简短名字. |
formipclientIdaddressAddress
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
postCode |
string | 否 | 邮政代码. |
country |
Country | 否 | 乡村. |
region |
Region | 否 | 地区. |
regionId |
integer · int32 | 否 | 区域ID |
street |
string | 否 | 路上. |
house |
string | 否 | 房子. |
district |
string | 否 | 地区. |
city |
string | 否 | 城市. |
locality |
string | 否 | 地方. |
building |
string | 否 | 建筑物. |
flat |
string | 否 | 没有什么. |
short |
string | 否 | 短暂. |
addressId |
Address | 否 | 联系方式 |
full |
string | 否 | 满满. |
phoneNumberaddressFullpriorityuseForOrderclientIdexternalNamenotSyncStocksignoreOrderspassagesPassage
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||
racks |
Rack[] | 否 | 货架. | ||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
name |
string | 否 | 姓名. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
deleted |
boolean | 否 | 删除了. |
clientId |
integer · int64 | 否 | 客户身份证. |
shelves |
Shelf[] | 否 | 货架. |
warehouseServicesServiceWarehouse
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
externalId |
string | 是 | 其他身份证. |
warehouseId |
integer · int64 | 是 | 仓库身份证. |
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 是 | 服务. |
organizationId |
integer · int64 | 是 | 组织身份证. |
serviceOrganizationId |
integer · int64 | 否 | 服务组织身份证. |
deliveriesdeletedcaptiondurationHoursreservationDaysscheduleurAddresscitylongitudelatitudewarehouseServiceIdwarehouseTypedescriptioninnkpppaymentAccounttelephoneregionNameregionRegion
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
regionId |
integer · int32 | 否 | 区域ID | ||||||||||||||||||||
countryId |
integer · int32 | 否 | 国家的身份证. | ||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||
regionSynonyms |
RegionSynonym[] | 否 | 区域同义词 | ||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
regionId |
integer · int64 | 否 | 区域ID |
synonym |
string | 否 | 标语是同义词. |
service |
string | 否 | 服务. |
regionIdisPrepayOnlineisCashisCardisGoodsActiveorgIdaddresscurl --request PUT 'https://api.selsup.ru/api/warehouse/1001' \
--header 'Authorization: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"id": 1001,
"name": "Example",
"service": "NONE",
"organizationId": 1001,
"fboOrganizationId": 1001,
"noPlaceCellId": 1001
}'
const response = await fetch('https://api.selsup.ru/api/warehouse/1001', {
method: 'PUT',
headers: {
Authorization: process.env.SELSUP_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id": 1001,
"name": "Example",
"service": "NONE",
"organizationId": 1001,
"fboOrganizationId": 1001,
"noPlaceCellId": 1001
}),
});
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/warehouse/1001', {
method: 'PUT',
headers: {
Authorization: process.env.SELSUP_API_TOKEN!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id": 1001,
"name": "Example",
"service": "NONE",
"organizationId": 1001,
"fboOrganizationId": 1001,
"noPlaceCellId": 1001
}),
});
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/warehouse/1001',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
json={
'id': 1001,
'name': 'Example',
'service': 'NONE',
'organizationId': 1001,
'fboOrganizationId': 1001,
'noPlaceCellId': 1001
},
)
response.raise_for_status()
result = response.json()
<?php
$payload = <<<'JSON'
{
"id": 1001,
"name": "Example",
"service": "NONE",
"organizationId": 1001,
"fboOrganizationId": 1001,
"noPlaceCellId": 1001
}
JSON;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/warehouse/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/warehouse/1001", strings.NewReader(`{
"id": 1001,
"name": "Example",
"service": "NONE",
"organizationId": 1001,
"fboOrganizationId": 1001,
"noPlaceCellId": 1001
}`))
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/warehouse/1001"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.header("Content-Type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("""
{
"id": 1001,
"name": "Example",
"service": "NONE",
"organizationId": 1001,
"fboOrganizationId": 1001,
"noPlaceCellId": 1001
}
"""))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
Warehouse
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int64 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 否 | 服务. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
organizationId |
integer · int64 | 否 | 组织身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fboOrganizationId |
integer · int64 | 否 | 联邦调查局组织身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
noPlaceCellId |
integer · int32 | 否 | 没有地方细胞身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
noPlaceCell |
Cell | 否 | 没有地方细胞. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
name |
string | 否 | 姓名. |
fullName |
string | 否 | 完整名字. |
sortName |
string | 否 | 某种名字. |
barcode |
string | 否 | 条码. |
deleted |
boolean | 否 | 删除了. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
clientId |
integer · int64 | 否 | 客户身份证. |
lastInventoryId |
integer · int32 | 否 | 最后的库存身份证. |
type |
stringNORMAL, NO_PLACE, REFUND | 否 | Type. |
refundCellIdorganizationOrganization
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int64 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 是 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
shortName |
string | 否 | 简短名字. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxType |
stringYSN, YSN_CONSUMPTION, AUSN, AUSN_CONSUMPTION, OSNO, SELF_EMPLOYED | 否 | 税收类型. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxRate |
integer · int32 | 否 | 税率. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxNds |
integer · int32 | 否 | 税收. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
inputTaxNds |
integer · int32 | 否 | 输入税税. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
outputTaxNds |
integer · int32 | 否 | 产出税法 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enableNewTaxCalculation |
boolean | 否 | 启用新的税收计算. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
useNdsCostPrice |
boolean | 否 | 使用NDS成本价格. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
inn |
string | 是 | 酒店. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
kpp |
string | 否 | 现在,我们要去. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bank |
string | 否 | 银行. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bik |
string | 否 | 骑自行车. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
corrBill |
string | 否 | 科尔比尔. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
billNumber |
string | 否 | 账号号. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampPath |
string | 否 | 邮票路径. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampUrl |
string | 否 | 邮票URL. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampSize |
integer · int32 | 否 | 邮票大小. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampWidth |
integer · int32 | 否 | 盖章宽度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampHeight |
integer · int32 | 否 | 邮票高度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signaturePath |
string | 否 | 签字之路. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureUrl |
string | 否 | 签字的URL. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureSize |
integer · int32 | 否 | 签名大小. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureWidth |
integer · int32 | 否 | 签字宽度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureHeight |
integer · int32 | 否 | 签字高度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ipPerson |
Person | 否 | 个人. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
personId |
integer · int64 | 否 | 个人身份证. |
firstName |
string | 是 | 姓名 |
lastName |
string | 是 | 姓名 |
surName |
string | 否 | 苏尔名 |
clientId |
integer · int64 | 否 | 客户身份证. |
position |
PersonPosition | 是 | 位置. |
versionId |
integer · int64 | 否 | 版本ID. |
createdUser |
string | 否 | 创建用户. |
createdDate |
string · date-time | 否 | 创造日期. |
deleted |
boolean | 否 | 删除了. |
userId |
integer · int32 | 否 | 用户身份证 |
hasChanges |
boolean | 否 | 有变化. |
fullName |
string | 否 | 完整名字. |
shortName |
string | 否 | 简短名字. |
formipclientIdaddressAddress
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
postCode |
string | 否 | 邮政代码. |
country |
Country | 否 | 乡村. |
region |
Region | 否 | 地区. |
regionId |
integer · int32 | 否 | 区域ID |
street |
string | 否 | 路上. |
house |
string | 否 | 房子. |
district |
string | 否 | 地区. |
city |
string | 否 | 城市. |
locality |
string | 否 | 地方. |
building |
string | 否 | 建筑物. |
flat |
string | 否 | 没有什么. |
short |
string | 否 | 短暂. |
addressId |
Address | 否 | 联系方式 |
full |
string | 否 | 满满. |
phoneNumberaddressFullpriorityuseForOrderclientIdexternalNamenotSyncStocksignoreOrderspassagesPassage
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||
racks |
Rack[] | 否 | 货架. | ||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
name |
string | 否 | 姓名. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
deleted |
boolean | 否 | 删除了. |
clientId |
integer · int64 | 否 | 客户身份证. |
shelves |
Shelf[] | 否 | 货架. |
warehouseServicesServiceWarehouse
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
externalId |
string | 是 | 其他身份证. |
warehouseId |
integer · int64 | 是 | 仓库身份证. |
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 是 | 服务. |
organizationId |
integer · int64 | 是 | 组织身份证. |
serviceOrganizationId |
integer · int64 | 否 | 服务组织身份证. |
deliveriesdeletedcaptiondurationHoursreservationDaysscheduleurAddresscitylongitudelatitudewarehouseServiceIdwarehouseTypedescriptioninnkpppaymentAccounttelephoneregionNameregionRegion
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
regionId |
integer · int32 | 否 | 区域ID | ||||||||||||||||||||
countryId |
integer · int32 | 否 | 国家的身份证. | ||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||
regionSynonyms |
RegionSynonym[] | 否 | 区域同义词 | ||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
regionId |
integer · int64 | 否 | 区域ID |
synonym |
string | 否 | 标语是同义词. |
service |
string | 否 | 服务. |
regionIdisPrepayOnlineisCashisCardisGoodsActiveorgIdaddress{
"id": 1001,
"name": "Example",
"service": "NONE",
"organizationId": 1001,
"fboOrganizationId": 1001,
"noPlaceCellId": 1001
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_cant_extract_tariffs应用逻辑中使用稳定的error_cant_extract_tariffs代码;localMessage包含上述翻译.
error_duplicate_warehouse_name应用逻辑中使用稳定的error_duplicate_warehouse_name代码;localMessage包含上述翻译.
error_empty_first_name应用逻辑中使用稳定的error_empty_first_name代码;localMessage包含上述翻译.
error_empty_last_name应用逻辑中使用稳定的error_empty_last_name代码;localMessage包含上述翻译.
error_empty_organization_form应用逻辑中使用稳定的error_empty_organization_form代码;localMessage包含上述翻译.
error_empty_organization_inn应用逻辑中使用稳定的error_empty_organization_inn代码;localMessage包含上述翻译.
error_empty_organization_name应用逻辑中使用稳定的error_empty_organization_name代码;localMessage包含上述翻译.
error_empty_position_name应用逻辑中使用稳定的error_empty_position_name代码;localMessage包含上述翻译.
error_empty_warehouse_name应用逻辑中使用稳定的error_empty_warehouse_name代码;localMessage包含上述翻译.
error_max_page应用逻辑中使用稳定的error_max_page代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_organization_create_failed应用逻辑中使用稳定的error_organization_create_failed代码;localMessage包含上述翻译.
error_organization_exists应用逻辑中使用稳定的error_organization_exists代码;localMessage包含上述翻译.
error_position_exists应用逻辑中使用稳定的error_position_exists代码;localMessage包含上述翻译.
error_reload应用逻辑中使用稳定的error_reload代码;localMessage包含上述翻译.
error_subscription_expired应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.
error_warehouses_limit_exceeded应用逻辑中使用稳定的error_warehouses_limit_exceeded代码;localMessage包含上述翻译.
error_wrong_inn应用逻辑中使用稳定的error_wrong_inn代码;localMessage包含上述翻译.
error_wrong_version应用逻辑中使用稳定的error_wrong_version代码;localMessage包含上述翻译.
/api/warehouse/{warehouseId}使用 DELETE /api/warehouse/{warehouseId}.删除仓库
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
warehouseId |
integer · int64 | 是 | 仓库身份证. |
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
restore |
boolean | 否 | 恢复. |
curl --request DELETE 'https://api.selsup.ru/api/warehouse/1001' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/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 result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/warehouse/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');
}
const result: unknown = await response.json();
import os
import requests
response = requests.delete(
'https://api.selsup.ru/api/warehouse/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/warehouse/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/warehouse/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/warehouse/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());
}
}
"string"应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
/api/warehouse/shelf使用 PUT /api/warehouse/shelf. 放上架
application/jsonShelf| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rackId |
integer · int32 | 否 | 查看身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cells |
Cell[] | 否 | 细胞. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
name |
string | 否 | 姓名. |
fullName |
string | 否 | 完整名字. |
sortName |
string | 否 | 某种名字. |
barcode |
string | 否 | 条码. |
deleted |
boolean | 否 | 删除了. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
clientId |
integer · int64 | 否 | 客户身份证. |
lastInventoryId |
integer · int32 | 否 | 最后的库存身份证. |
type |
stringNORMAL, NO_PLACE, REFUND | 否 | Type. |
curl --request PUT 'https://api.selsup.ru/api/warehouse/shelf' \
--header 'Authorization: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"rackId": 1001,
"deleted": false,
"clientId": 1001
}'
const response = await fetch('https://api.selsup.ru/api/warehouse/shelf', {
method: 'PUT',
headers: {
Authorization: process.env.SELSUP_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"rackId": 1001,
"deleted": false,
"clientId": 1001
}),
});
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/warehouse/shelf', {
method: 'PUT',
headers: {
Authorization: process.env.SELSUP_API_TOKEN!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"rackId": 1001,
"deleted": false,
"clientId": 1001
}),
});
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/warehouse/shelf',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
json={
'id': 1001,
'name': 'Example',
'warehouseId': 1001,
'rackId': 1001,
'deleted': False,
'clientId': 1001
},
)
response.raise_for_status()
result = response.json()
<?php
$payload = <<<'JSON'
{
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"rackId": 1001,
"deleted": false,
"clientId": 1001
}
JSON;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/warehouse/shelf',
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/warehouse/shelf", strings.NewReader(`{
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"rackId": 1001,
"deleted": false,
"clientId": 1001
}`))
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/warehouse/shelf"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.header("Content-Type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("""
{
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"rackId": 1001,
"deleted": false,
"clientId": 1001
}
"""))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
Shelf
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rackId |
integer · int32 | 否 | 查看身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cells |
Cell[] | 否 | 细胞. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
name |
string | 否 | 姓名. |
fullName |
string | 否 | 完整名字. |
sortName |
string | 否 | 某种名字. |
barcode |
string | 否 | 条码. |
deleted |
boolean | 否 | 删除了. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
clientId |
integer · int64 | 否 | 客户身份证. |
lastInventoryId |
integer · int32 | 否 | 最后的库存身份证. |
type |
stringNORMAL, NO_PLACE, REFUND | 否 | Type. |
{
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"rackId": 1001,
"deleted": false,
"clientId": 1001
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_shelf_already_exist应用逻辑中使用稳定的error_shelf_already_exist代码;localMessage包含上述翻译.
error_shelf_not_found应用逻辑中使用稳定的error_shelf_not_found代码;localMessage包含上述翻译.
error_subscription_expired应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.
/api/warehouse/rack使用 PUT /api/warehouse/rack. 放 Rack
application/jsonRack| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
passageId |
integer · int32 | 否 | 通过身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
shelves |
Shelf[] | 否 | 货架. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rackId |
integer · int32 | 否 | 查看身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cells |
Cell[] | 否 | 细胞. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
name |
string | 否 | 姓名. |
fullName |
string | 否 | 完整名字. |
sortName |
string | 否 | 某种名字. |
barcode |
string | 否 | 条码. |
deleted |
boolean | 否 | 删除了. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
clientId |
integer · int64 | 否 | 客户身份证. |
lastInventoryId |
integer · int32 | 否 | 最后的库存身份证. |
type |
stringNORMAL, NO_PLACE, REFUND | 否 | Type. |
curl --request PUT 'https://api.selsup.ru/api/warehouse/rack' \
--header 'Authorization: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"passageId": 1001,
"deleted": false,
"clientId": 1001
}'
const response = await fetch('https://api.selsup.ru/api/warehouse/rack', {
method: 'PUT',
headers: {
Authorization: process.env.SELSUP_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"passageId": 1001,
"deleted": false,
"clientId": 1001
}),
});
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/warehouse/rack', {
method: 'PUT',
headers: {
Authorization: process.env.SELSUP_API_TOKEN!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"passageId": 1001,
"deleted": false,
"clientId": 1001
}),
});
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/warehouse/rack',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
json={
'id': 1001,
'name': 'Example',
'warehouseId': 1001,
'passageId': 1001,
'deleted': False,
'clientId': 1001
},
)
response.raise_for_status()
result = response.json()
<?php
$payload = <<<'JSON'
{
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"passageId": 1001,
"deleted": false,
"clientId": 1001
}
JSON;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/warehouse/rack',
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/warehouse/rack", strings.NewReader(`{
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"passageId": 1001,
"deleted": false,
"clientId": 1001
}`))
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/warehouse/rack"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.header("Content-Type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("""
{
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"passageId": 1001,
"deleted": false,
"clientId": 1001
}
"""))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
Rack
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
passageId |
integer · int32 | 否 | 通过身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
shelves |
Shelf[] | 否 | 货架. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rackId |
integer · int32 | 否 | 查看身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cells |
Cell[] | 否 | 细胞. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
name |
string | 否 | 姓名. |
fullName |
string | 否 | 完整名字. |
sortName |
string | 否 | 某种名字. |
barcode |
string | 否 | 条码. |
deleted |
boolean | 否 | 删除了. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
clientId |
integer · int64 | 否 | 客户身份证. |
lastInventoryId |
integer · int32 | 否 | 最后的库存身份证. |
type |
stringNORMAL, NO_PLACE, REFUND | 否 | Type. |
{
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"passageId": 1001,
"deleted": false,
"clientId": 1001
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_rack_already_exist应用逻辑中使用稳定的error_rack_already_exist代码;localMessage包含上述翻译.
error_rack_not_found应用逻辑中使用稳定的error_rack_not_found代码;localMessage包含上述翻译.
error_subscription_expired应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.
/api/warehouse/passage通过PUT/api/warehouse/passage. 设置通行
application/jsonPassage| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
racks |
Rack[] | 否 | 货架. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||
passageId |
integer · int32 | 否 | 通过身份证. | ||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||
shelves |
Shelf[] | 否 | 货架. | ||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
name |
string | 否 | 姓名. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
deleted |
boolean | 否 | 删除了. |
clientId |
integer · int64 | 否 | 客户身份证. |
cells |
Cell[] | 否 | 细胞. |
curl --request PUT 'https://api.selsup.ru/api/warehouse/passage' \
--header 'Authorization: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"deleted": false,
"clientId": 1001,
"racks": "string"
}'
const response = await fetch('https://api.selsup.ru/api/warehouse/passage', {
method: 'PUT',
headers: {
Authorization: process.env.SELSUP_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"deleted": false,
"clientId": 1001,
"racks": "string"
}),
});
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/warehouse/passage', {
method: 'PUT',
headers: {
Authorization: process.env.SELSUP_API_TOKEN!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"deleted": false,
"clientId": 1001,
"racks": "string"
}),
});
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/warehouse/passage',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
json={
'id': 1001,
'name': 'Example',
'warehouseId': 1001,
'deleted': False,
'clientId': 1001,
'racks': 'string'
},
)
response.raise_for_status()
result = response.json()
<?php
$payload = <<<'JSON'
{
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"deleted": false,
"clientId": 1001,
"racks": "string"
}
JSON;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/warehouse/passage',
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/warehouse/passage", strings.NewReader(`{
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"deleted": false,
"clientId": 1001,
"racks": "string"
}`))
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/warehouse/passage"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.header("Content-Type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("""
{
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"deleted": false,
"clientId": 1001,
"racks": "string"
}
"""))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
Passage
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
racks |
Rack[] | 否 | 货架. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||
passageId |
integer · int32 | 否 | 通过身份证. | ||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||
shelves |
Shelf[] | 否 | 货架. | ||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
name |
string | 否 | 姓名. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
deleted |
boolean | 否 | 删除了. |
clientId |
integer · int64 | 否 | 客户身份证. |
cells |
Cell[] | 否 | 细胞. |
{
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"deleted": false,
"clientId": 1001,
"racks": "string"
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_passage_already_exist应用逻辑中使用稳定的error_passage_already_exist代码;localMessage包含上述翻译.
error_passage_not_found应用逻辑中使用稳定的error_passage_not_found代码;localMessage包含上述翻译.
error_subscription_expired应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.
/api/warehouse/cell通过PUT/api/warehouse/cell.将Cell放入
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
passageId |
integer · int32 | 是 | 通过身份证. |
rackId |
integer · int32 | 是 | 查看身份证. |
shelfId |
integer · int32 | 是 | 货架身份证. |
application/jsonCell| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
name |
string | 否 | 姓名. |
fullName |
string | 否 | 完整名字. |
sortName |
string | 否 | 某种名字. |
barcode |
string | 否 | 条码. |
deleted |
boolean | 否 | 删除了. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
clientId |
integer · int64 | 否 | 客户身份证. |
lastInventoryId |
integer · int32 | 否 | 最后的库存身份证. |
type |
stringNORMAL, NO_PLACE, REFUND | 否 | Type. |
curl --request PUT 'https://api.selsup.ru/api/warehouse/cell?passageId=1001&rackId=1001&shelfId=1001' \
--header 'Authorization: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"id": 1001,
"warehouseId": 1001,
"passageId": 1001,
"shelfId": 1001,
"rackId": 1001,
"name": "Example"
}'
const response = await fetch('https://api.selsup.ru/api/warehouse/cell?passageId=1001&rackId=1001&shelfId=1001', {
method: 'PUT',
headers: {
Authorization: process.env.SELSUP_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id": 1001,
"warehouseId": 1001,
"passageId": 1001,
"shelfId": 1001,
"rackId": 1001,
"name": "Example"
}),
});
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/warehouse/cell?passageId=1001&rackId=1001&shelfId=1001', {
method: 'PUT',
headers: {
Authorization: process.env.SELSUP_API_TOKEN!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id": 1001,
"warehouseId": 1001,
"passageId": 1001,
"shelfId": 1001,
"rackId": 1001,
"name": "Example"
}),
});
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/warehouse/cell?passageId=1001&rackId=1001&shelfId=1001',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
json={
'id': 1001,
'warehouseId': 1001,
'passageId': 1001,
'shelfId': 1001,
'rackId': 1001,
'name': 'Example'
},
)
response.raise_for_status()
result = response.json()
<?php
$payload = <<<'JSON'
{
"id": 1001,
"warehouseId": 1001,
"passageId": 1001,
"shelfId": 1001,
"rackId": 1001,
"name": "Example"
}
JSON;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/warehouse/cell?passageId=1001&rackId=1001&shelfId=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/warehouse/cell?passageId=1001&rackId=1001&shelfId=1001", strings.NewReader(`{
"id": 1001,
"warehouseId": 1001,
"passageId": 1001,
"shelfId": 1001,
"rackId": 1001,
"name": "Example"
}`))
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/warehouse/cell?passageId=1001&rackId=1001&shelfId=1001"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.header("Content-Type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("""
{
"id": 1001,
"warehouseId": 1001,
"passageId": 1001,
"shelfId": 1001,
"rackId": 1001,
"name": "Example"
}
"""))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
Cell
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
name |
string | 否 | 姓名. |
fullName |
string | 否 | 完整名字. |
sortName |
string | 否 | 某种名字. |
barcode |
string | 否 | 条码. |
deleted |
boolean | 否 | 删除了. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
clientId |
integer · int64 | 否 | 客户身份证. |
lastInventoryId |
integer · int32 | 否 | 最后的库存身份证. |
type |
stringNORMAL, NO_PLACE, REFUND | 否 | Type. |
{
"id": 1001,
"warehouseId": 1001,
"passageId": 1001,
"shelfId": 1001,
"rackId": 1001,
"name": "Example"
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_cell_already_exist应用逻辑中使用稳定的error_cell_already_exist代码;localMessage包含上述翻译.
error_cell_not_found应用逻辑中使用稳定的error_cell_not_found代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_subscription_expired应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.
/api/warehouse/shelf/{shelfId}/copy使用 POST /api/warehouse/shelf/{shelfId}/copy. 复制货架
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
shelfId |
integer · int32 | 是 | 货架身份证. |
curl --request POST 'https://api.selsup.ru/api/warehouse/shelf/1001/copy' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/shelf/1001/copy', {
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 result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/warehouse/shelf/1001/copy', {
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');
}
const result: unknown = await response.json();
import os
import requests
response = requests.post(
'https://api.selsup.ru/api/warehouse/shelf/1001/copy',
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/warehouse/shelf/1001/copy',
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/warehouse/shelf/1001/copy", 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/warehouse/shelf/1001/copy"))
.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());
}
}
Shelf
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rackId |
integer · int32 | 否 | 查看身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cells |
Cell[] | 否 | 细胞. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
name |
string | 否 | 姓名. |
fullName |
string | 否 | 完整名字. |
sortName |
string | 否 | 某种名字. |
barcode |
string | 否 | 条码. |
deleted |
boolean | 否 | 删除了. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
clientId |
integer · int64 | 否 | 客户身份证. |
lastInventoryId |
integer · int32 | 否 | 最后的库存身份证. |
type |
stringNORMAL, NO_PLACE, REFUND | 否 | Type. |
{
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"rackId": 1001,
"deleted": false,
"clientId": 1001
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_shelf_not_found应用逻辑中使用稳定的error_shelf_not_found代码;localMessage包含上述翻译.
error_subscription_expired应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.
/api/warehouse/removeServiceWarehouse使用 POST /api/warehouse/removeServiceWarehouse. 移除服务仓库
application/jsonServiceWarehouse| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
externalId |
string | 是 | 其他身份证. |
warehouseId |
integer · int64 | 是 | 仓库身份证. |
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 是 | 服务. |
organizationId |
integer · int64 | 是 | 组织身份证. |
serviceOrganizationId |
integer · int64 | 否 | 服务组织身份证. |
curl --request POST 'https://api.selsup.ru/api/warehouse/removeServiceWarehouse' \
--header 'Authorization: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"name": "Example",
"externalId": "string",
"warehouseId": 1001,
"service": "NONE",
"organizationId": 1001,
"id": 1001
}'
const response = await fetch('https://api.selsup.ru/api/warehouse/removeServiceWarehouse', {
method: 'POST',
headers: {
Authorization: process.env.SELSUP_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Example",
"externalId": "string",
"warehouseId": 1001,
"service": "NONE",
"organizationId": 1001,
"id": 1001
}),
});
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/warehouse/removeServiceWarehouse', {
method: 'POST',
headers: {
Authorization: process.env.SELSUP_API_TOKEN!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Example",
"externalId": "string",
"warehouseId": 1001,
"service": "NONE",
"organizationId": 1001,
"id": 1001
}),
});
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/warehouse/removeServiceWarehouse',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
json={
'name': 'Example',
'externalId': 'string',
'warehouseId': 1001,
'service': 'NONE',
'organizationId': 1001,
'id': 1001
},
)
response.raise_for_status()
<?php
$payload = <<<'JSON'
{
"name": "Example",
"externalId": "string",
"warehouseId": 1001,
"service": "NONE",
"organizationId": 1001,
"id": 1001
}
JSON;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/warehouse/removeServiceWarehouse',
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/warehouse/removeServiceWarehouse", strings.NewReader(`{
"name": "Example",
"externalId": "string",
"warehouseId": 1001,
"service": "NONE",
"organizationId": 1001,
"id": 1001
}`))
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/warehouse/removeServiceWarehouse"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"name": "Example",
"externalId": "string",
"warehouseId": 1001,
"service": "NONE",
"organizationId": 1001,
"id": 1001
}
"""))
.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_cant_extract_tariffs应用逻辑中使用稳定的error_cant_extract_tariffs代码;localMessage包含上述翻译.
error_empty_first_name应用逻辑中使用稳定的error_empty_first_name代码;localMessage包含上述翻译.
error_empty_last_name应用逻辑中使用稳定的error_empty_last_name代码;localMessage包含上述翻译.
error_empty_organization_form应用逻辑中使用稳定的error_empty_organization_form代码;localMessage包含上述翻译.
error_empty_organization_inn应用逻辑中使用稳定的error_empty_organization_inn代码;localMessage包含上述翻译.
error_empty_organization_name应用逻辑中使用稳定的error_empty_organization_name代码;localMessage包含上述翻译.
error_empty_position_name应用逻辑中使用稳定的error_empty_position_name代码;localMessage包含上述翻译.
error_max_page应用逻辑中使用稳定的error_max_page代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_organization_create_failed应用逻辑中使用稳定的error_organization_create_failed代码;localMessage包含上述翻译.
error_organization_exists应用逻辑中使用稳定的error_organization_exists代码;localMessage包含上述翻译.
error_organization_not_found应用逻辑中使用稳定的error_organization_not_found代码;localMessage包含上述翻译.
error_position_exists应用逻辑中使用稳定的error_position_exists代码;localMessage包含上述翻译.
error_reload应用逻辑中使用稳定的error_reload代码;localMessage包含上述翻译.
error_subscription_expired应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.
error_user_does_not_have_this_organization应用逻辑中使用稳定的error_user_does_not_have_this_organization代码;localMessage包含上述翻译.
error_wrong_inn应用逻辑中使用稳定的error_wrong_inn代码;localMessage包含上述翻译.
error_wrong_version应用逻辑中使用稳定的error_wrong_version代码;localMessage包含上述翻译.
/api/warehouse/rack/{rackId}/copy使用 POST /api/warehouse/rack/{rackId}/copy.的架子复制
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
rackId |
integer · int32 | 是 | 查看身份证. |
curl --request POST 'https://api.selsup.ru/api/warehouse/rack/1001/copy' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/rack/1001/copy', {
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 result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/warehouse/rack/1001/copy', {
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');
}
const result: unknown = await response.json();
import os
import requests
response = requests.post(
'https://api.selsup.ru/api/warehouse/rack/1001/copy',
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/warehouse/rack/1001/copy',
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/warehouse/rack/1001/copy", 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/warehouse/rack/1001/copy"))
.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());
}
}
Rack
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
passageId |
integer · int32 | 否 | 通过身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
shelves |
Shelf[] | 否 | 货架. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rackId |
integer · int32 | 否 | 查看身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cells |
Cell[] | 否 | 细胞. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
name |
string | 否 | 姓名. |
fullName |
string | 否 | 完整名字. |
sortName |
string | 否 | 某种名字. |
barcode |
string | 否 | 条码. |
deleted |
boolean | 否 | 删除了. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
clientId |
integer · int64 | 否 | 客户身份证. |
lastInventoryId |
integer · int32 | 否 | 最后的库存身份证. |
type |
stringNORMAL, NO_PLACE, REFUND | 否 | Type. |
{
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"passageId": 1001,
"deleted": false,
"clientId": 1001
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_rack_not_found应用逻辑中使用稳定的error_rack_not_found代码;localMessage包含上述翻译.
error_subscription_expired应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.
/api/warehouse/passage/{passageId}/copy使用 POST /api/warehouse/passage/{passageId}/copy. 复制页面
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
passageId |
integer · int32 | 是 | 通过身份证. |
curl --request POST 'https://api.selsup.ru/api/warehouse/passage/1001/copy' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/passage/1001/copy', {
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 result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/warehouse/passage/1001/copy', {
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');
}
const result: unknown = await response.json();
import os
import requests
response = requests.post(
'https://api.selsup.ru/api/warehouse/passage/1001/copy',
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/warehouse/passage/1001/copy',
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/warehouse/passage/1001/copy", 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/warehouse/passage/1001/copy"))
.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());
}
}
Passage
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
racks |
Rack[] | 否 | 货架. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||
passageId |
integer · int32 | 否 | 通过身份证. | ||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||
shelves |
Shelf[] | 否 | 货架. | ||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
name |
string | 否 | 姓名. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
deleted |
boolean | 否 | 删除了. |
clientId |
integer · int64 | 否 | 客户身份证. |
cells |
Cell[] | 否 | 细胞. |
{
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"deleted": false,
"clientId": 1001,
"racks": "string"
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_passage_not_found应用逻辑中使用稳定的error_passage_not_found代码;localMessage包含上述翻译.
error_subscription_expired应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.
/api/warehouse/getCellsByFilter使用POST/api/warehouse/getCellsByFilter.来过细胞
application/jsonCellFilter| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
cellId |
integer · int32 | 否 | 电话身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
curl --request POST 'https://api.selsup.ru/api/warehouse/getCellsByFilter' \
--header 'Authorization: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"cellId": 1001,
"shelfId": 1001,
"rackId": 1001,
"passageId": 1001,
"warehouseId": 1001
}'
const response = await fetch('https://api.selsup.ru/api/warehouse/getCellsByFilter', {
method: 'POST',
headers: {
Authorization: process.env.SELSUP_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"cellId": 1001,
"shelfId": 1001,
"rackId": 1001,
"passageId": 1001,
"warehouseId": 1001
}),
});
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/warehouse/getCellsByFilter', {
method: 'POST',
headers: {
Authorization: process.env.SELSUP_API_TOKEN!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"cellId": 1001,
"shelfId": 1001,
"rackId": 1001,
"passageId": 1001,
"warehouseId": 1001
}),
});
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/warehouse/getCellsByFilter',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
json={
'cellId': 1001,
'shelfId': 1001,
'rackId': 1001,
'passageId': 1001,
'warehouseId': 1001
},
)
response.raise_for_status()
result = response.json()
<?php
$payload = <<<'JSON'
{
"cellId": 1001,
"shelfId": 1001,
"rackId": 1001,
"passageId": 1001,
"warehouseId": 1001
}
JSON;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/warehouse/getCellsByFilter',
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/warehouse/getCellsByFilter", strings.NewReader(`{
"cellId": 1001,
"shelfId": 1001,
"rackId": 1001,
"passageId": 1001,
"warehouseId": 1001
}`))
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/warehouse/getCellsByFilter"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"cellId": 1001,
"shelfId": 1001,
"rackId": 1001,
"passageId": 1001,
"warehouseId": 1001
}
"""))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
Cell[]
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
name |
string | 否 | 姓名. |
fullName |
string | 否 | 完整名字. |
sortName |
string | 否 | 某种名字. |
barcode |
string | 否 | 条码. |
deleted |
boolean | 否 | 删除了. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
clientId |
integer · int64 | 否 | 客户身份证. |
lastInventoryId |
integer · int32 | 否 | 最后的库存身份证. |
type |
stringNORMAL, NO_PLACE, REFUND | 否 | Type. |
[
"string"
]应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
/api/warehouse/createServiceWarehouse使用 POST 创建服务仓库
application/jsonServiceWarehouse| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
externalId |
string | 是 | 其他身份证. |
warehouseId |
integer · int64 | 是 | 仓库身份证. |
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 是 | 服务. |
organizationId |
integer · int64 | 是 | 组织身份证. |
serviceOrganizationId |
integer · int64 | 否 | 服务组织身份证. |
curl --request POST 'https://api.selsup.ru/api/warehouse/createServiceWarehouse' \
--header 'Authorization: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"name": "Example",
"externalId": "string",
"warehouseId": 1001,
"service": "NONE",
"organizationId": 1001,
"id": 1001
}'
const response = await fetch('https://api.selsup.ru/api/warehouse/createServiceWarehouse', {
method: 'POST',
headers: {
Authorization: process.env.SELSUP_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Example",
"externalId": "string",
"warehouseId": 1001,
"service": "NONE",
"organizationId": 1001,
"id": 1001
}),
});
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/warehouse/createServiceWarehouse', {
method: 'POST',
headers: {
Authorization: process.env.SELSUP_API_TOKEN!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Example",
"externalId": "string",
"warehouseId": 1001,
"service": "NONE",
"organizationId": 1001,
"id": 1001
}),
});
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/warehouse/createServiceWarehouse',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
json={
'name': 'Example',
'externalId': 'string',
'warehouseId': 1001,
'service': 'NONE',
'organizationId': 1001,
'id': 1001
},
)
response.raise_for_status()
result = response.json()
<?php
$payload = <<<'JSON'
{
"name": "Example",
"externalId": "string",
"warehouseId": 1001,
"service": "NONE",
"organizationId": 1001,
"id": 1001
}
JSON;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/warehouse/createServiceWarehouse',
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/warehouse/createServiceWarehouse", strings.NewReader(`{
"name": "Example",
"externalId": "string",
"warehouseId": 1001,
"service": "NONE",
"organizationId": 1001,
"id": 1001
}`))
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/warehouse/createServiceWarehouse"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"name": "Example",
"externalId": "string",
"warehouseId": 1001,
"service": "NONE",
"organizationId": 1001,
"id": 1001
}
"""))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
ServiceWarehouse
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
externalId |
string | 是 | 其他身份证. |
warehouseId |
integer · int64 | 是 | 仓库身份证. |
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 是 | 服务. |
organizationId |
integer · int64 | 是 | 组织身份证. |
serviceOrganizationId |
integer · int64 | 否 | 服务组织身份证. |
{
"name": "Example",
"externalId": "string",
"warehouseId": 1001,
"service": "NONE",
"organizationId": 1001,
"id": 1001
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_cant_extract_tariffs应用逻辑中使用稳定的error_cant_extract_tariffs代码;localMessage包含上述翻译.
error_empty_first_name应用逻辑中使用稳定的error_empty_first_name代码;localMessage包含上述翻译.
error_empty_last_name应用逻辑中使用稳定的error_empty_last_name代码;localMessage包含上述翻译.
error_empty_name应用逻辑中使用稳定的error_empty_name代码;localMessage包含上述翻译.
error_empty_organization_form应用逻辑中使用稳定的error_empty_organization_form代码;localMessage包含上述翻译.
error_empty_organization_inn应用逻辑中使用稳定的error_empty_organization_inn代码;localMessage包含上述翻译.
error_empty_organization_name应用逻辑中使用稳定的error_empty_organization_name代码;localMessage包含上述翻译.
error_empty_position_name应用逻辑中使用稳定的error_empty_position_name代码;localMessage包含上述翻译.
error_empty_service应用逻辑中使用稳定的error_empty_service代码;localMessage包含上述翻译.
error_max_page应用逻辑中使用稳定的error_max_page代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_organization_create_failed应用逻辑中使用稳定的error_organization_create_failed代码;localMessage包含上述翻译.
error_organization_exists应用逻辑中使用稳定的error_organization_exists代码;localMessage包含上述翻译.
error_organization_not_found应用逻辑中使用稳定的error_organization_not_found代码;localMessage包含上述翻译.
error_position_exists应用逻辑中使用稳定的error_position_exists代码;localMessage包含上述翻译.
error_reload应用逻辑中使用稳定的error_reload代码;localMessage包含上述翻译.
error_service_warehouse_exists应用逻辑中使用稳定的error_service_warehouse_exists代码;localMessage包含上述翻译.
error_subscription_expired应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.
error_warehouse_empty_id应用逻辑中使用稳定的error_warehouse_empty_id代码;localMessage包含上述翻译.
error_wrong_inn应用逻辑中使用稳定的error_wrong_inn代码;localMessage包含上述翻译.
error_wrong_version应用逻辑中使用稳定的error_wrong_version代码;localMessage包含上述翻译.
/api/warehouse/cells使用 POST 创建细胞
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
passageId |
integer · int32 | 是 | 通过身份证. |
rackId |
integer · int32 | 是 | 查看身份证. |
shelfId |
integer · int32 | 是 | 货架身份证. |
application/jsonCell[]| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
name |
string | 否 | 姓名. |
fullName |
string | 否 | 完整名字. |
sortName |
string | 否 | 某种名字. |
barcode |
string | 否 | 条码. |
deleted |
boolean | 否 | 删除了. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
clientId |
integer · int64 | 否 | 客户身份证. |
lastInventoryId |
integer · int32 | 否 | 最后的库存身份证. |
type |
stringNORMAL, NO_PLACE, REFUND | 否 | Type. |
curl --request POST 'https://api.selsup.ru/api/warehouse/cells?passageId=1001&rackId=1001&shelfId=1001' \
--header 'Authorization: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '[
"string"
]'
const response = await fetch('https://api.selsup.ru/api/warehouse/cells?passageId=1001&rackId=1001&shelfId=1001', {
method: 'POST',
headers: {
Authorization: process.env.SELSUP_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify([
"string"
]),
});
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/warehouse/cells?passageId=1001&rackId=1001&shelfId=1001', {
method: 'POST',
headers: {
Authorization: process.env.SELSUP_API_TOKEN!,
'Content-Type': 'application/json',
},
body: JSON.stringify([
"string"
]),
});
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/warehouse/cells?passageId=1001&rackId=1001&shelfId=1001',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
json=[
'string'
],
)
response.raise_for_status()
result = response.json()
<?php
$payload = <<<'JSON'
[
"string"
]
JSON;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/warehouse/cells?passageId=1001&rackId=1001&shelfId=1001',
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/warehouse/cells?passageId=1001&rackId=1001&shelfId=1001", strings.NewReader(`[
"string"
]`))
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/warehouse/cells?passageId=1001&rackId=1001&shelfId=1001"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
[
"string"
]
"""))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
Cell[]
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
name |
string | 否 | 姓名. |
fullName |
string | 否 | 完整名字. |
sortName |
string | 否 | 某种名字. |
barcode |
string | 否 | 条码. |
deleted |
boolean | 否 | 删除了. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
clientId |
integer · int64 | 否 | 客户身份证. |
lastInventoryId |
integer · int32 | 否 | 最后的库存身份证. |
type |
stringNORMAL, NO_PLACE, REFUND | 否 | Type. |
[
"string"
]应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_cell_already_exist应用逻辑中使用稳定的error_cell_already_exist代码;localMessage包含上述翻译.
error_cell_not_found应用逻辑中使用稳定的error_cell_not_found代码;localMessage包含上述翻译.
error_cells_batch_size_invalid应用逻辑中使用稳定的error_cells_batch_size_invalid代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_subscription_expired应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.
/api/warehouse/cells/excel使用 GET /api/warehouse/cells/excel.的出口细胞
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
warehouseId |
integer · int64 | 是 | 仓库身份证. |
curl --request GET 'https://api.selsup.ru/api/warehouse/cells/excel?warehouseId=1001' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/cells/excel?warehouseId=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/warehouse/cells/excel?warehouseId=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/warehouse/cells/excel?warehouseId=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/warehouse/cells/excel?warehouseId=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/warehouse/cells/excel?warehouseId=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/warehouse/cells/excel?warehouseId=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());
}
}
"string"应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_cells_excel_failed应用逻辑中使用稳定的error_cells_excel_failed代码;localMessage包含上述翻译.
error_cells_excel_limit应用逻辑中使用稳定的error_cells_excel_limit代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_warehouse_not_found应用逻辑中使用稳定的error_warehouse_not_found代码;localMessage包含上述翻译.
/api/warehouse/cells/excel使用 POST /api/warehouse/cells/excel. 进口细胞
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
warehouseId |
integer · int64 | 是 | 仓库身份证. |
multipart/form-data| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
file |
string · binary | 是 | 文件. |
curl --request POST 'https://api.selsup.ru/api/warehouse/cells/excel?warehouseId=1001' \
--header 'Authorization: YOUR_API_TOKEN' \
--form 'file=@./file.bin'
const form = new FormData();
form.append('file', fileInput.files[0]);
const response = await fetch('https://api.selsup.ru/api/warehouse/cells/excel?warehouseId=1001', {
method: 'POST',
headers: { Authorization: process.env.SELSUP_API_TOKEN },
body: form,
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const result = await response.json();
const form: FormData = new FormData();
form.append('file', fileInput.files![0]);
const response: Response = await fetch('https://api.selsup.ru/api/warehouse/cells/excel?warehouseId=1001', {
method: 'POST',
headers: { Authorization: process.env.SELSUP_API_TOKEN! },
body: form,
});
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/warehouse/cells/excel?warehouseId=1001',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
files={'file': open('./logo.png', 'rb')},
)
response.raise_for_status()
result = response.json()
<?php
$payload = ['file' => new CURLFile('./logo.png')];
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/warehouse/cells/excel?warehouseId=1001',
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN')],
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 (
"bytes"
"fmt"
"io"
"mime/multipart"
"net/http"
"os"
"path/filepath"
)
func main() {
var body bytes.Buffer
writer := multipart.NewWriter(&body)
file, err := os.Open("./logo.png")
if err != nil { panic(err) }
defer file.Close()
part, err := writer.CreateFormFile("file", filepath.Base(file.Name()))
if err != nil { panic(err) }
if _, err = io.Copy(part, file); err != nil { panic(err) }
writer.Close()
req, err := http.NewRequest("POST", "https://api.selsup.ru/api/warehouse/cells/excel?warehouseId=1001", &body)
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
req.Header.Set("Content-Type", writer.FormDataContentType())
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;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
public class SelSupExample {
public static void main(String[] args) throws Exception {
String boundary = "SelSupBoundary" + System.currentTimeMillis();
byte[] file = Files.readAllBytes(Path.of("./logo.png"));
byte[] head = ("--" + boundary + "\r\n" +
"Content-Disposition: form-data; name=\"file\"; filename=\"logo.png\"\r\n" +
"Content-Type: image/png\r\n\r\n").getBytes(StandardCharsets.UTF_8);
byte[] tail = ("\r\n--" + boundary + "--\r\n").getBytes(StandardCharsets.UTF_8);
byte[] payload = new byte[head.length + file.length + tail.length];
System.arraycopy(head, 0, payload, 0, head.length);
System.arraycopy(file, 0, payload, head.length, file.length);
System.arraycopy(tail, 0, payload, head.length + file.length, tail.length);
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/warehouse/cells/excel?warehouseId=1001"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.header("Content-Type", "multipart/form-data; boundary=" + boundary)
.method("POST", HttpRequest.BodyPublishers.ofByteArray(payload))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
ImportResult
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
created |
integer · int32 | 否 | 创造了. |
updated |
integer · int32 | 否 | 更新了. |
{
"created": 1,
"updated": 1
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_cells_excel_conflict应用逻辑中使用稳定的error_cells_excel_conflict代码;localMessage包含上述翻译.
error_cells_excel_failed应用逻辑中使用稳定的error_cells_excel_failed代码;localMessage包含上述翻译.
error_cells_excel_id_invalid应用逻辑中使用稳定的error_cells_excel_id_invalid代码;localMessage包含上述翻译.
error_cells_excel_limit应用逻辑中使用稳定的error_cells_excel_limit代码;localMessage包含上述翻译.
error_cells_excel_parent应用逻辑中使用稳定的error_cells_excel_parent代码;localMessage包含上述翻译.
error_cells_excel_row应用逻辑中使用稳定的error_cells_excel_row代码;localMessage包含上述翻译.
error_incorrect_excel应用逻辑中使用稳定的error_incorrect_excel代码;localMessage包含上述翻译.
error_max_upload_size_exceeded应用逻辑中使用稳定的error_max_upload_size_exceeded代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_subscription_expired应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.
error_warehouse_not_found应用逻辑中使用稳定的error_warehouse_not_found代码;localMessage包含上述翻译.
/api/warehouse/使用 POST 创建新仓库
application/jsonWarehouse| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int64 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 否 | 服务. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
organizationId |
integer · int64 | 否 | 组织身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fboOrganizationId |
integer · int64 | 否 | 联邦调查局组织身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
noPlaceCellId |
integer · int32 | 否 | 没有地方细胞身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
noPlaceCell |
Cell | 否 | 没有地方细胞. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
name |
string | 否 | 姓名. |
fullName |
string | 否 | 完整名字. |
sortName |
string | 否 | 某种名字. |
barcode |
string | 否 | 条码. |
deleted |
boolean | 否 | 删除了. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
clientId |
integer · int64 | 否 | 客户身份证. |
lastInventoryId |
integer · int32 | 否 | 最后的库存身份证. |
type |
stringNORMAL, NO_PLACE, REFUND | 否 | Type. |
refundCellIdorganizationOrganization
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int64 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 是 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
shortName |
string | 否 | 简短名字. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxType |
stringYSN, YSN_CONSUMPTION, AUSN, AUSN_CONSUMPTION, OSNO, SELF_EMPLOYED | 否 | 税收类型. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxRate |
integer · int32 | 否 | 税率. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxNds |
integer · int32 | 否 | 税收. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
inputTaxNds |
integer · int32 | 否 | 输入税税. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
outputTaxNds |
integer · int32 | 否 | 产出税法 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enableNewTaxCalculation |
boolean | 否 | 启用新的税收计算. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
useNdsCostPrice |
boolean | 否 | 使用NDS成本价格. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
inn |
string | 是 | 酒店. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
kpp |
string | 否 | 现在,我们要去. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bank |
string | 否 | 银行. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bik |
string | 否 | 骑自行车. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
corrBill |
string | 否 | 科尔比尔. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
billNumber |
string | 否 | 账号号. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampPath |
string | 否 | 邮票路径. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampUrl |
string | 否 | 邮票URL. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampSize |
integer · int32 | 否 | 邮票大小. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampWidth |
integer · int32 | 否 | 盖章宽度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampHeight |
integer · int32 | 否 | 邮票高度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signaturePath |
string | 否 | 签字之路. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureUrl |
string | 否 | 签字的URL. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureSize |
integer · int32 | 否 | 签名大小. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureWidth |
integer · int32 | 否 | 签字宽度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureHeight |
integer · int32 | 否 | 签字高度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ipPerson |
Person | 否 | 个人. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
personId |
integer · int64 | 否 | 个人身份证. |
firstName |
string | 是 | 姓名 |
lastName |
string | 是 | 姓名 |
surName |
string | 否 | 苏尔名 |
clientId |
integer · int64 | 否 | 客户身份证. |
position |
PersonPosition | 是 | 位置. |
versionId |
integer · int64 | 否 | 版本ID. |
createdUser |
string | 否 | 创建用户. |
createdDate |
string · date-time | 否 | 创造日期. |
deleted |
boolean | 否 | 删除了. |
userId |
integer · int32 | 否 | 用户身份证 |
hasChanges |
boolean | 否 | 有变化. |
fullName |
string | 否 | 完整名字. |
shortName |
string | 否 | 简短名字. |
formipclientIdaddressAddress
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
postCode |
string | 否 | 邮政代码. |
country |
Country | 否 | 乡村. |
region |
Region | 否 | 地区. |
regionId |
integer · int32 | 否 | 区域ID |
street |
string | 否 | 路上. |
house |
string | 否 | 房子. |
district |
string | 否 | 地区. |
city |
string | 否 | 城市. |
locality |
string | 否 | 地方. |
building |
string | 否 | 建筑物. |
flat |
string | 否 | 没有什么. |
short |
string | 否 | 短暂. |
addressId |
Address | 否 | 联系方式 |
full |
string | 否 | 满满. |
phoneNumberaddressFullpriorityuseForOrderclientIdexternalNamenotSyncStocksignoreOrderspassagesPassage
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||
racks |
Rack[] | 否 | 货架. | ||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
name |
string | 否 | 姓名. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
deleted |
boolean | 否 | 删除了. |
clientId |
integer · int64 | 否 | 客户身份证. |
shelves |
Shelf[] | 否 | 货架. |
warehouseServicesServiceWarehouse
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
externalId |
string | 是 | 其他身份证. |
warehouseId |
integer · int64 | 是 | 仓库身份证. |
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 是 | 服务. |
organizationId |
integer · int64 | 是 | 组织身份证. |
serviceOrganizationId |
integer · int64 | 否 | 服务组织身份证. |
deliveriesdeletedcaptiondurationHoursreservationDaysscheduleurAddresscitylongitudelatitudewarehouseServiceIdwarehouseTypedescriptioninnkpppaymentAccounttelephoneregionNameregionRegion
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
regionId |
integer · int32 | 否 | 区域ID | ||||||||||||||||||||
countryId |
integer · int32 | 否 | 国家的身份证. | ||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||
regionSynonyms |
RegionSynonym[] | 否 | 区域同义词 | ||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
regionId |
integer · int64 | 否 | 区域ID |
synonym |
string | 否 | 标语是同义词. |
service |
string | 否 | 服务. |
regionIdisPrepayOnlineisCashisCardisGoodsActiveorgIdaddresscurl --request POST 'https://api.selsup.ru/api/warehouse/' \
--header 'Authorization: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"id": 1001,
"name": "Example",
"service": "NONE",
"organizationId": 1001,
"fboOrganizationId": 1001,
"noPlaceCellId": 1001
}'
const response = await fetch('https://api.selsup.ru/api/warehouse/', {
method: 'POST',
headers: {
Authorization: process.env.SELSUP_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id": 1001,
"name": "Example",
"service": "NONE",
"organizationId": 1001,
"fboOrganizationId": 1001,
"noPlaceCellId": 1001
}),
});
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/warehouse/', {
method: 'POST',
headers: {
Authorization: process.env.SELSUP_API_TOKEN!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id": 1001,
"name": "Example",
"service": "NONE",
"organizationId": 1001,
"fboOrganizationId": 1001,
"noPlaceCellId": 1001
}),
});
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/warehouse/',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
json={
'id': 1001,
'name': 'Example',
'service': 'NONE',
'organizationId': 1001,
'fboOrganizationId': 1001,
'noPlaceCellId': 1001
},
)
response.raise_for_status()
result = response.json()
<?php
$payload = <<<'JSON'
{
"id": 1001,
"name": "Example",
"service": "NONE",
"organizationId": 1001,
"fboOrganizationId": 1001,
"noPlaceCellId": 1001
}
JSON;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/warehouse/',
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/warehouse/", strings.NewReader(`{
"id": 1001,
"name": "Example",
"service": "NONE",
"organizationId": 1001,
"fboOrganizationId": 1001,
"noPlaceCellId": 1001
}`))
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/warehouse/"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"id": 1001,
"name": "Example",
"service": "NONE",
"organizationId": 1001,
"fboOrganizationId": 1001,
"noPlaceCellId": 1001
}
"""))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
Warehouse
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int64 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 否 | 服务. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
organizationId |
integer · int64 | 否 | 组织身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fboOrganizationId |
integer · int64 | 否 | 联邦调查局组织身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
noPlaceCellId |
integer · int32 | 否 | 没有地方细胞身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
noPlaceCell |
Cell | 否 | 没有地方细胞. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
name |
string | 否 | 姓名. |
fullName |
string | 否 | 完整名字. |
sortName |
string | 否 | 某种名字. |
barcode |
string | 否 | 条码. |
deleted |
boolean | 否 | 删除了. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
clientId |
integer · int64 | 否 | 客户身份证. |
lastInventoryId |
integer · int32 | 否 | 最后的库存身份证. |
type |
stringNORMAL, NO_PLACE, REFUND | 否 | Type. |
refundCellIdorganizationOrganization
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int64 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 是 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
shortName |
string | 否 | 简短名字. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxType |
stringYSN, YSN_CONSUMPTION, AUSN, AUSN_CONSUMPTION, OSNO, SELF_EMPLOYED | 否 | 税收类型. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxRate |
integer · int32 | 否 | 税率. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxNds |
integer · int32 | 否 | 税收. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
inputTaxNds |
integer · int32 | 否 | 输入税税. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
outputTaxNds |
integer · int32 | 否 | 产出税法 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enableNewTaxCalculation |
boolean | 否 | 启用新的税收计算. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
useNdsCostPrice |
boolean | 否 | 使用NDS成本价格. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
inn |
string | 是 | 酒店. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
kpp |
string | 否 | 现在,我们要去. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bank |
string | 否 | 银行. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bik |
string | 否 | 骑自行车. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
corrBill |
string | 否 | 科尔比尔. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
billNumber |
string | 否 | 账号号. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampPath |
string | 否 | 邮票路径. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampUrl |
string | 否 | 邮票URL. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampSize |
integer · int32 | 否 | 邮票大小. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampWidth |
integer · int32 | 否 | 盖章宽度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampHeight |
integer · int32 | 否 | 邮票高度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signaturePath |
string | 否 | 签字之路. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureUrl |
string | 否 | 签字的URL. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureSize |
integer · int32 | 否 | 签名大小. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureWidth |
integer · int32 | 否 | 签字宽度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureHeight |
integer · int32 | 否 | 签字高度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ipPerson |
Person | 否 | 个人. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
personId |
integer · int64 | 否 | 个人身份证. |
firstName |
string | 是 | 姓名 |
lastName |
string | 是 | 姓名 |
surName |
string | 否 | 苏尔名 |
clientId |
integer · int64 | 否 | 客户身份证. |
position |
PersonPosition | 是 | 位置. |
versionId |
integer · int64 | 否 | 版本ID. |
createdUser |
string | 否 | 创建用户. |
createdDate |
string · date-time | 否 | 创造日期. |
deleted |
boolean | 否 | 删除了. |
userId |
integer · int32 | 否 | 用户身份证 |
hasChanges |
boolean | 否 | 有变化. |
fullName |
string | 否 | 完整名字. |
shortName |
string | 否 | 简短名字. |
formipclientIdaddressAddress
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
postCode |
string | 否 | 邮政代码. |
country |
Country | 否 | 乡村. |
region |
Region | 否 | 地区. |
regionId |
integer · int32 | 否 | 区域ID |
street |
string | 否 | 路上. |
house |
string | 否 | 房子. |
district |
string | 否 | 地区. |
city |
string | 否 | 城市. |
locality |
string | 否 | 地方. |
building |
string | 否 | 建筑物. |
flat |
string | 否 | 没有什么. |
short |
string | 否 | 短暂. |
addressId |
Address | 否 | 联系方式 |
full |
string | 否 | 满满. |
phoneNumberaddressFullpriorityuseForOrderclientIdexternalNamenotSyncStocksignoreOrderspassagesPassage
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||
racks |
Rack[] | 否 | 货架. | ||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
name |
string | 否 | 姓名. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
deleted |
boolean | 否 | 删除了. |
clientId |
integer · int64 | 否 | 客户身份证. |
shelves |
Shelf[] | 否 | 货架. |
warehouseServicesServiceWarehouse
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
externalId |
string | 是 | 其他身份证. |
warehouseId |
integer · int64 | 是 | 仓库身份证. |
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 是 | 服务. |
organizationId |
integer · int64 | 是 | 组织身份证. |
serviceOrganizationId |
integer · int64 | 否 | 服务组织身份证. |
deliveriesdeletedcaptiondurationHoursreservationDaysscheduleurAddresscitylongitudelatitudewarehouseServiceIdwarehouseTypedescriptioninnkpppaymentAccounttelephoneregionNameregionRegion
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
regionId |
integer · int32 | 否 | 区域ID | ||||||||||||||||||||
countryId |
integer · int32 | 否 | 国家的身份证. | ||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||
regionSynonyms |
RegionSynonym[] | 否 | 区域同义词 | ||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
regionId |
integer · int64 | 否 | 区域ID |
synonym |
string | 否 | 标语是同义词. |
service |
string | 否 | 服务. |
regionIdisPrepayOnlineisCashisCardisGoodsActiveorgIdaddress{
"id": 1001,
"name": "Example",
"service": "NONE",
"organizationId": 1001,
"fboOrganizationId": 1001,
"noPlaceCellId": 1001
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_cant_extract_tariffs应用逻辑中使用稳定的error_cant_extract_tariffs代码;localMessage包含上述翻译.
error_duplicate_warehouse_name应用逻辑中使用稳定的error_duplicate_warehouse_name代码;localMessage包含上述翻译.
error_empty_first_name应用逻辑中使用稳定的error_empty_first_name代码;localMessage包含上述翻译.
error_empty_last_name应用逻辑中使用稳定的error_empty_last_name代码;localMessage包含上述翻译.
error_empty_organization_form应用逻辑中使用稳定的error_empty_organization_form代码;localMessage包含上述翻译.
error_empty_organization_inn应用逻辑中使用稳定的error_empty_organization_inn代码;localMessage包含上述翻译.
error_empty_organization_name应用逻辑中使用稳定的error_empty_organization_name代码;localMessage包含上述翻译.
error_empty_position_name应用逻辑中使用稳定的error_empty_position_name代码;localMessage包含上述翻译.
error_empty_warehouse_name应用逻辑中使用稳定的error_empty_warehouse_name代码;localMessage包含上述翻译.
error_max_page应用逻辑中使用稳定的error_max_page代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_organization_create_failed应用逻辑中使用稳定的error_organization_create_failed代码;localMessage包含上述翻译.
error_organization_exists应用逻辑中使用稳定的error_organization_exists代码;localMessage包含上述翻译.
error_position_exists应用逻辑中使用稳定的error_position_exists代码;localMessage包含上述翻译.
error_reload应用逻辑中使用稳定的error_reload代码;localMessage包含上述翻译.
error_subscription_expired应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.
error_warehouses_limit_exceeded应用逻辑中使用稳定的error_warehouses_limit_exceeded代码;localMessage包含上述翻译.
error_wrong_inn应用逻辑中使用稳定的error_wrong_inn代码;localMessage包含上述翻译.
error_wrong_version应用逻辑中使用稳定的error_wrong_version代码;localMessage包含上述翻译.
/api/warehouse/{warehouseId}/sort使用GETX/api/warehouse/{warehouseId}/sort.进行仓库排序
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
warehouseId |
integer · int64 | 是 | 仓库身份证. |
curl --request GET 'https://api.selsup.ru/api/warehouse/1001/sort' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/1001/sort', {
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 response: Response = await fetch('https://api.selsup.ru/api/warehouse/1001/sort', {
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');
}
import os
import requests
response = requests.get(
'https://api.selsup.ru/api/warehouse/1001/sort',
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/warehouse/1001/sort',
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/warehouse/1001/sort", 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/warehouse/1001/sort"))
.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());
}
}
答案没有身体.
应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
/api/warehouse/shelf/{shelfId}使用GET/api/warehouse/shelf/{shelfId}.的货架
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
shelfId |
integer · int32 | 是 | 货架身份证. |
curl --request GET 'https://api.selsup.ru/api/warehouse/shelf/%7BshelfId%7D?shelfId=1001' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/shelf/%7BshelfId%7D?shelfId=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/warehouse/shelf/%7BshelfId%7D?shelfId=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/warehouse/shelf/%7BshelfId%7D?shelfId=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/warehouse/shelf/%7BshelfId%7D?shelfId=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/warehouse/shelf/%7BshelfId%7D?shelfId=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/warehouse/shelf/%7BshelfId%7D?shelfId=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());
}
}
Shelf
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rackId |
integer · int32 | 否 | 查看身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cells |
Cell[] | 否 | 细胞. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
name |
string | 否 | 姓名. |
fullName |
string | 否 | 完整名字. |
sortName |
string | 否 | 某种名字. |
barcode |
string | 否 | 条码. |
deleted |
boolean | 否 | 删除了. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
clientId |
integer · int64 | 否 | 客户身份证. |
lastInventoryId |
integer · int32 | 否 | 最后的库存身份证. |
type |
stringNORMAL, NO_PLACE, REFUND | 否 | Type. |
{
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"rackId": 1001,
"deleted": false,
"clientId": 1001
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_shelf_not_found应用逻辑中使用稳定的error_shelf_not_found代码;localMessage包含上述翻译.
/api/warehouse/shelf/{shelfId}使用 DELETE /api/warehouse/shelf/{shelfId}.删除Shelf
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
shelfId |
integer · int32 | 是 | 货架身份证. |
curl --request DELETE 'https://api.selsup.ru/api/warehouse/shelf/1001' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/shelf/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/warehouse/shelf/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/warehouse/shelf/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/warehouse/shelf/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/warehouse/shelf/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/warehouse/shelf/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_cell_denied_delete应用逻辑中使用稳定的error_cell_denied_delete代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_subscription_expired应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.
/api/warehouse/service使用GET/api/warehouse/service.获取服务仓库
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 否 | 服务. |
externalName |
string | 否 | 其他名字 |
curl --request GET 'https://api.selsup.ru/api/warehouse/service' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/service', {
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/warehouse/service', {
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/warehouse/service',
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/warehouse/service',
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/warehouse/service", 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/warehouse/service"))
.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());
}
}
Warehouse[]
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int64 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 否 | 服务. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
organizationId |
integer · int64 | 否 | 组织身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fboOrganizationId |
integer · int64 | 否 | 联邦调查局组织身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
noPlaceCellId |
integer · int32 | 否 | 没有地方细胞身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
noPlaceCell |
Cell | 否 | 没有地方细胞. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
name |
string | 否 | 姓名. |
fullName |
string | 否 | 完整名字. |
sortName |
string | 否 | 某种名字. |
barcode |
string | 否 | 条码. |
deleted |
boolean | 否 | 删除了. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
clientId |
integer · int64 | 否 | 客户身份证. |
lastInventoryId |
integer · int32 | 否 | 最后的库存身份证. |
type |
stringNORMAL, NO_PLACE, REFUND | 否 | Type. |
refundCellIdorganizationOrganization
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int64 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 是 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
shortName |
string | 否 | 简短名字. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxType |
stringYSN, YSN_CONSUMPTION, AUSN, AUSN_CONSUMPTION, OSNO, SELF_EMPLOYED | 否 | 税收类型. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxRate |
integer · int32 | 否 | 税率. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxNds |
integer · int32 | 否 | 税收. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
inputTaxNds |
integer · int32 | 否 | 输入税税. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
outputTaxNds |
integer · int32 | 否 | 产出税法 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enableNewTaxCalculation |
boolean | 否 | 启用新的税收计算. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
useNdsCostPrice |
boolean | 否 | 使用NDS成本价格. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
inn |
string | 是 | 酒店. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
kpp |
string | 否 | 现在,我们要去. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bank |
string | 否 | 银行. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bik |
string | 否 | 骑自行车. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
corrBill |
string | 否 | 科尔比尔. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
billNumber |
string | 否 | 账号号. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampPath |
string | 否 | 邮票路径. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampUrl |
string | 否 | 邮票URL. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampSize |
integer · int32 | 否 | 邮票大小. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampWidth |
integer · int32 | 否 | 盖章宽度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampHeight |
integer · int32 | 否 | 邮票高度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signaturePath |
string | 否 | 签字之路. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureUrl |
string | 否 | 签字的URL. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureSize |
integer · int32 | 否 | 签名大小. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureWidth |
integer · int32 | 否 | 签字宽度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureHeight |
integer · int32 | 否 | 签字高度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ipPerson |
Person | 否 | 个人. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
personId |
integer · int64 | 否 | 个人身份证. |
firstName |
string | 是 | 姓名 |
lastName |
string | 是 | 姓名 |
surName |
string | 否 | 苏尔名 |
clientId |
integer · int64 | 否 | 客户身份证. |
position |
PersonPosition | 是 | 位置. |
versionId |
integer · int64 | 否 | 版本ID. |
createdUser |
string | 否 | 创建用户. |
createdDate |
string · date-time | 否 | 创造日期. |
deleted |
boolean | 否 | 删除了. |
userId |
integer · int32 | 否 | 用户身份证 |
hasChanges |
boolean | 否 | 有变化. |
fullName |
string | 否 | 完整名字. |
shortName |
string | 否 | 简短名字. |
formipclientIdaddressAddress
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
postCode |
string | 否 | 邮政代码. |
country |
Country | 否 | 乡村. |
region |
Region | 否 | 地区. |
regionId |
integer · int32 | 否 | 区域ID |
street |
string | 否 | 路上. |
house |
string | 否 | 房子. |
district |
string | 否 | 地区. |
city |
string | 否 | 城市. |
locality |
string | 否 | 地方. |
building |
string | 否 | 建筑物. |
flat |
string | 否 | 没有什么. |
short |
string | 否 | 短暂. |
addressId |
Address | 否 | 联系方式 |
full |
string | 否 | 满满. |
phoneNumberaddressFullpriorityuseForOrderclientIdexternalNamenotSyncStocksignoreOrderspassagesPassage
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||
racks |
Rack[] | 否 | 货架. | ||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
name |
string | 否 | 姓名. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
deleted |
boolean | 否 | 删除了. |
clientId |
integer · int64 | 否 | 客户身份证. |
shelves |
Shelf[] | 否 | 货架. |
warehouseServicesServiceWarehouse
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
externalId |
string | 是 | 其他身份证. |
warehouseId |
integer · int64 | 是 | 仓库身份证. |
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 是 | 服务. |
organizationId |
integer · int64 | 是 | 组织身份证. |
serviceOrganizationId |
integer · int64 | 否 | 服务组织身份证. |
deliveriesdeletedcaptiondurationHoursreservationDaysscheduleurAddresscitylongitudelatitudewarehouseServiceIdwarehouseTypedescriptioninnkpppaymentAccounttelephoneregionNameregionRegion
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
regionId |
integer · int32 | 否 | 区域ID | ||||||||||||||||||||
countryId |
integer · int32 | 否 | 国家的身份证. | ||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||
regionSynonyms |
RegionSynonym[] | 否 | 区域同义词 | ||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
regionId |
integer · int64 | 否 | 区域ID |
synonym |
string | 否 | 标语是同义词. |
service |
string | 否 | 服务. |
regionIdisPrepayOnlineisCashisCardisGoodsActiveorgIdaddress[
"string"
]应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
/api/warehouse/rack/{rackId}使用GET/api/warehouse/rack/{rackId}.的架子
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
rackId |
integer · int32 | 是 | 查看身份证. |
curl --request GET 'https://api.selsup.ru/api/warehouse/rack/1001' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/rack/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/warehouse/rack/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/warehouse/rack/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/warehouse/rack/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/warehouse/rack/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/warehouse/rack/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());
}
}
Rack
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
passageId |
integer · int32 | 否 | 通过身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
shelves |
Shelf[] | 否 | 货架. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rackId |
integer · int32 | 否 | 查看身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cells |
Cell[] | 否 | 细胞. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
name |
string | 否 | 姓名. |
fullName |
string | 否 | 完整名字. |
sortName |
string | 否 | 某种名字. |
barcode |
string | 否 | 条码. |
deleted |
boolean | 否 | 删除了. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
clientId |
integer · int64 | 否 | 客户身份证. |
lastInventoryId |
integer · int32 | 否 | 最后的库存身份证. |
type |
stringNORMAL, NO_PLACE, REFUND | 否 | Type. |
{
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"passageId": 1001,
"deleted": false,
"clientId": 1001
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_rack_not_found应用逻辑中使用稳定的error_rack_not_found代码;localMessage包含上述翻译.
/api/warehouse/rack/{rackId}使用 DELETE /api/warehouse/rack/{rackId}.删除 Rack
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
rackId |
integer · int32 | 是 | 查看身份证. |
curl --request DELETE 'https://api.selsup.ru/api/warehouse/rack/1001' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/rack/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/warehouse/rack/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/warehouse/rack/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/warehouse/rack/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/warehouse/rack/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/warehouse/rack/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_cell_denied_delete应用逻辑中使用稳定的error_cell_denied_delete代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_subscription_expired应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.
/api/warehouse/plan/crossdock-warehouses使用GET/api/warehouse/plan/crossdock-warehouses.获得Ozon Crossdock仓库
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
organizationId |
integer · int64 | 是 | 组织身份证. |
search |
string | 是 | 搜索. |
curl --request GET 'https://api.selsup.ru/api/warehouse/plan/crossdock-warehouses?organizationId=1001&search=string' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/plan/crossdock-warehouses?organizationId=1001&search=string', {
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/warehouse/plan/crossdock-warehouses?organizationId=1001&search=string', {
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/warehouse/plan/crossdock-warehouses?organizationId=1001&search=string',
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/warehouse/plan/crossdock-warehouses?organizationId=1001&search=string',
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/warehouse/plan/crossdock-warehouses?organizationId=1001&search=string", 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/warehouse/plan/crossdock-warehouses?organizationId=1001&search=string"))
.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());
}
}
OzonFboWarehouse[]
| 字段 | 类型 | 必填 | 描述 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
address |
string | 否 | 现在,我有个地址. | ||||||||||||
name |
string | 否 | 姓名. | ||||||||||||
coordinates |
Coordinates | 否 | 坐标. | ||||||||||||
对象场
|
|||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
latitude |
number · double | 否 | 广度. |
longitude |
number · double | 否 | 长度. |
warehouse_idwarehouse_type[
"string"
]应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_empty_ozon_id应用逻辑中使用稳定的error_empty_ozon_id代码;localMessage包含上述翻译.
error_token_expired_or_revoked应用逻辑中使用稳定的error_token_expired_or_revoked代码;localMessage包含上述翻译.
/api/warehouse/passage/{passageId}使用GETX/api/warehouse/passage/{passageId}.的通行
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
passageId |
integer · int32 | 是 | 通过身份证. |
curl --request GET 'https://api.selsup.ru/api/warehouse/passage/1001' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/passage/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/warehouse/passage/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/warehouse/passage/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/warehouse/passage/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/warehouse/passage/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/warehouse/passage/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());
}
}
Passage
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
racks |
Rack[] | 否 | 货架. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||
passageId |
integer · int32 | 否 | 通过身份证. | ||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||
shelves |
Shelf[] | 否 | 货架. | ||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
name |
string | 否 | 姓名. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
deleted |
boolean | 否 | 删除了. |
clientId |
integer · int64 | 否 | 客户身份证. |
cells |
Cell[] | 否 | 细胞. |
{
"id": 1001,
"name": "Example",
"warehouseId": 1001,
"deleted": false,
"clientId": 1001,
"racks": "string"
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_passage_not_found应用逻辑中使用稳定的error_passage_not_found代码;localMessage包含上述翻译.
/api/warehouse/passage/{passageId}使用 DELETE /api/warehouse/passage/{passageId}.删除通行
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
passageId |
integer · int32 | 是 | 通过身份证. |
curl --request DELETE 'https://api.selsup.ru/api/warehouse/passage/1001' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/passage/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/warehouse/passage/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/warehouse/passage/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/warehouse/passage/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/warehouse/passage/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/warehouse/passage/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_cell_denied_delete应用逻辑中使用稳定的error_cell_denied_delete代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_subscription_expired应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.
/api/warehouse/list使用 GET /api/warehouse/list.的列表
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 否 | 服务. |
curl --request GET 'https://api.selsup.ru/api/warehouse/list' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/list', {
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/warehouse/list', {
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/warehouse/list',
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/warehouse/list',
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/warehouse/list", 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/warehouse/list"))
.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());
}
}
Warehouse[]
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int64 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 否 | 服务. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
organizationId |
integer · int64 | 否 | 组织身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fboOrganizationId |
integer · int64 | 否 | 联邦调查局组织身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
noPlaceCellId |
integer · int32 | 否 | 没有地方细胞身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
noPlaceCell |
Cell | 否 | 没有地方细胞. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
name |
string | 否 | 姓名. |
fullName |
string | 否 | 完整名字. |
sortName |
string | 否 | 某种名字. |
barcode |
string | 否 | 条码. |
deleted |
boolean | 否 | 删除了. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
clientId |
integer · int64 | 否 | 客户身份证. |
lastInventoryId |
integer · int32 | 否 | 最后的库存身份证. |
type |
stringNORMAL, NO_PLACE, REFUND | 否 | Type. |
refundCellIdorganizationOrganization
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int64 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 是 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
shortName |
string | 否 | 简短名字. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxType |
stringYSN, YSN_CONSUMPTION, AUSN, AUSN_CONSUMPTION, OSNO, SELF_EMPLOYED | 否 | 税收类型. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxRate |
integer · int32 | 否 | 税率. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxNds |
integer · int32 | 否 | 税收. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
inputTaxNds |
integer · int32 | 否 | 输入税税. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
outputTaxNds |
integer · int32 | 否 | 产出税法 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enableNewTaxCalculation |
boolean | 否 | 启用新的税收计算. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
useNdsCostPrice |
boolean | 否 | 使用NDS成本价格. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
inn |
string | 是 | 酒店. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
kpp |
string | 否 | 现在,我们要去. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bank |
string | 否 | 银行. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bik |
string | 否 | 骑自行车. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
corrBill |
string | 否 | 科尔比尔. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
billNumber |
string | 否 | 账号号. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampPath |
string | 否 | 邮票路径. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampUrl |
string | 否 | 邮票URL. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampSize |
integer · int32 | 否 | 邮票大小. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampWidth |
integer · int32 | 否 | 盖章宽度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampHeight |
integer · int32 | 否 | 邮票高度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signaturePath |
string | 否 | 签字之路. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureUrl |
string | 否 | 签字的URL. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureSize |
integer · int32 | 否 | 签名大小. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureWidth |
integer · int32 | 否 | 签字宽度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureHeight |
integer · int32 | 否 | 签字高度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ipPerson |
Person | 否 | 个人. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
personId |
integer · int64 | 否 | 个人身份证. |
firstName |
string | 是 | 姓名 |
lastName |
string | 是 | 姓名 |
surName |
string | 否 | 苏尔名 |
clientId |
integer · int64 | 否 | 客户身份证. |
position |
PersonPosition | 是 | 位置. |
versionId |
integer · int64 | 否 | 版本ID. |
createdUser |
string | 否 | 创建用户. |
createdDate |
string · date-time | 否 | 创造日期. |
deleted |
boolean | 否 | 删除了. |
userId |
integer · int32 | 否 | 用户身份证 |
hasChanges |
boolean | 否 | 有变化. |
fullName |
string | 否 | 完整名字. |
shortName |
string | 否 | 简短名字. |
formipclientIdaddressAddress
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
postCode |
string | 否 | 邮政代码. |
country |
Country | 否 | 乡村. |
region |
Region | 否 | 地区. |
regionId |
integer · int32 | 否 | 区域ID |
street |
string | 否 | 路上. |
house |
string | 否 | 房子. |
district |
string | 否 | 地区. |
city |
string | 否 | 城市. |
locality |
string | 否 | 地方. |
building |
string | 否 | 建筑物. |
flat |
string | 否 | 没有什么. |
short |
string | 否 | 短暂. |
addressId |
Address | 否 | 联系方式 |
full |
string | 否 | 满满. |
phoneNumberaddressFullpriorityuseForOrderclientIdexternalNamenotSyncStocksignoreOrderspassagesPassage
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||
racks |
Rack[] | 否 | 货架. | ||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
name |
string | 否 | 姓名. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
deleted |
boolean | 否 | 删除了. |
clientId |
integer · int64 | 否 | 客户身份证. |
shelves |
Shelf[] | 否 | 货架. |
warehouseServicesServiceWarehouse
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
externalId |
string | 是 | 其他身份证. |
warehouseId |
integer · int64 | 是 | 仓库身份证. |
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 是 | 服务. |
organizationId |
integer · int64 | 是 | 组织身份证. |
serviceOrganizationId |
integer · int64 | 否 | 服务组织身份证. |
deliveriesdeletedcaptiondurationHoursreservationDaysscheduleurAddresscitylongitudelatitudewarehouseServiceIdwarehouseTypedescriptioninnkpppaymentAccounttelephoneregionNameregionRegion
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
regionId |
integer · int32 | 否 | 区域ID | ||||||||||||||||||||
countryId |
integer · int32 | 否 | 国家的身份证. | ||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||
regionSynonyms |
RegionSynonym[] | 否 | 区域同义词 | ||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
regionId |
integer · int64 | 否 | 区域ID |
synonym |
string | 否 | 标语是同义词. |
service |
string | 否 | 服务. |
regionIdisPrepayOnlineisCashisCardisGoodsActiveorgIdaddress[
"string"
]应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_subscription_expired应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.
/api/warehouse/getWarehousesByService使用GET/api/warehouse/getWarehousesByService.获得仓库按服务
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 是 | 服务. |
externalName |
string | 否 | 其他名字 |
curl --request GET 'https://api.selsup.ru/api/warehouse/getWarehousesByService?service=NONE' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/getWarehousesByService?service=NONE', {
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/warehouse/getWarehousesByService?service=NONE', {
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/warehouse/getWarehousesByService?service=NONE',
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/warehouse/getWarehousesByService?service=NONE',
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/warehouse/getWarehousesByService?service=NONE", 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/warehouse/getWarehousesByService?service=NONE"))
.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());
}
}
Warehouse[]
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int64 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 否 | 服务. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
organizationId |
integer · int64 | 否 | 组织身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fboOrganizationId |
integer · int64 | 否 | 联邦调查局组织身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
noPlaceCellId |
integer · int32 | 否 | 没有地方细胞身份证. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
noPlaceCell |
Cell | 否 | 没有地方细胞. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
name |
string | 否 | 姓名. |
fullName |
string | 否 | 完整名字. |
sortName |
string | 否 | 某种名字. |
barcode |
string | 否 | 条码. |
deleted |
boolean | 否 | 删除了. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
clientId |
integer · int64 | 否 | 客户身份证. |
lastInventoryId |
integer · int32 | 否 | 最后的库存身份证. |
type |
stringNORMAL, NO_PLACE, REFUND | 否 | Type. |
refundCellIdorganizationOrganization
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int64 | 否 | Id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
string | 是 | 姓名. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
shortName |
string | 否 | 简短名字. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxType |
stringYSN, YSN_CONSUMPTION, AUSN, AUSN_CONSUMPTION, OSNO, SELF_EMPLOYED | 否 | 税收类型. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxRate |
integer · int32 | 否 | 税率. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxNds |
integer · int32 | 否 | 税收. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
inputTaxNds |
integer · int32 | 否 | 输入税税. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
outputTaxNds |
integer · int32 | 否 | 产出税法 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enableNewTaxCalculation |
boolean | 否 | 启用新的税收计算. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
useNdsCostPrice |
boolean | 否 | 使用NDS成本价格. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
inn |
string | 是 | 酒店. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
kpp |
string | 否 | 现在,我们要去. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bank |
string | 否 | 银行. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bik |
string | 否 | 骑自行车. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
corrBill |
string | 否 | 科尔比尔. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
billNumber |
string | 否 | 账号号. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampPath |
string | 否 | 邮票路径. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampUrl |
string | 否 | 邮票URL. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampSize |
integer · int32 | 否 | 邮票大小. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampWidth |
integer · int32 | 否 | 盖章宽度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stampHeight |
integer · int32 | 否 | 邮票高度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signaturePath |
string | 否 | 签字之路. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureUrl |
string | 否 | 签字的URL. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureSize |
integer · int32 | 否 | 签名大小. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureWidth |
integer · int32 | 否 | 签字宽度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureHeight |
integer · int32 | 否 | 签字高度. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ipPerson |
Person | 否 | 个人. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
对象场
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
personId |
integer · int64 | 否 | 个人身份证. |
firstName |
string | 是 | 姓名 |
lastName |
string | 是 | 姓名 |
surName |
string | 否 | 苏尔名 |
clientId |
integer · int64 | 否 | 客户身份证. |
position |
PersonPosition | 是 | 位置. |
versionId |
integer · int64 | 否 | 版本ID. |
createdUser |
string | 否 | 创建用户. |
createdDate |
string · date-time | 否 | 创造日期. |
deleted |
boolean | 否 | 删除了. |
userId |
integer · int32 | 否 | 用户身份证 |
hasChanges |
boolean | 否 | 有变化. |
fullName |
string | 否 | 完整名字. |
shortName |
string | 否 | 简短名字. |
formipclientIdaddressAddress
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
postCode |
string | 否 | 邮政代码. |
country |
Country | 否 | 乡村. |
region |
Region | 否 | 地区. |
regionId |
integer · int32 | 否 | 区域ID |
street |
string | 否 | 路上. |
house |
string | 否 | 房子. |
district |
string | 否 | 地区. |
city |
string | 否 | 城市. |
locality |
string | 否 | 地方. |
building |
string | 否 | 建筑物. |
flat |
string | 否 | 没有什么. |
short |
string | 否 | 短暂. |
addressId |
Address | 否 | 联系方式 |
full |
string | 否 | 满满. |
phoneNumberaddressFullpriorityuseForOrderclientIdexternalNamenotSyncStocksignoreOrderspassagesPassage
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer · int32 | 否 | Id. | ||||||||||||||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||||||||||||||
warehouseId |
integer · int64 | 否 | 仓库身份证. | ||||||||||||||||||||||||||||||||
deleted |
boolean | 否 | 删除了. | ||||||||||||||||||||||||||||||||
clientId |
integer · int64 | 否 | 客户身份证. | ||||||||||||||||||||||||||||||||
racks |
Rack[] | 否 | 货架. | ||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
name |
string | 否 | 姓名. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
deleted |
boolean | 否 | 删除了. |
clientId |
integer · int64 | 否 | 客户身份证. |
shelves |
Shelf[] | 否 | 货架. |
warehouseServicesServiceWarehouse
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
externalId |
string | 是 | 其他身份证. |
warehouseId |
integer · int64 | 是 | 仓库身份证. |
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 是 | 服务. |
organizationId |
integer · int64 | 是 | 组织身份证. |
serviceOrganizationId |
integer · int64 | 否 | 服务组织身份证. |
deliveriesdeletedcaptiondurationHoursreservationDaysscheduleurAddresscitylongitudelatitudewarehouseServiceIdwarehouseTypedescriptioninnkpppaymentAccounttelephoneregionNameregionRegion
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
regionId |
integer · int32 | 否 | 区域ID | ||||||||||||||||||||
countryId |
integer · int32 | 否 | 国家的身份证. | ||||||||||||||||||||
name |
string | 否 | 姓名. | ||||||||||||||||||||
regionSynonyms |
RegionSynonym[] | 否 | 区域同义词 | ||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
regionId |
integer · int64 | 否 | 区域ID |
synonym |
string | 否 | 标语是同义词. |
service |
string | 否 | 服务. |
regionIdisPrepayOnlineisCashisCardisGoodsActiveorgIdaddress[
"string"
]应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
/api/warehouse/getWarehouseOfService使用GETX/api/warehouse/getWarehouseOfService.获取服务仓库
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
organizationId |
integer · int64 | 是 | 组织身份证. |
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 是 | 服务. |
curl --request GET 'https://api.selsup.ru/api/warehouse/getWarehouseOfService?organizationId=1001&service=NONE' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/getWarehouseOfService?organizationId=1001&service=NONE', {
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/warehouse/getWarehouseOfService?organizationId=1001&service=NONE', {
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/warehouse/getWarehouseOfService?organizationId=1001&service=NONE',
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/warehouse/getWarehouseOfService?organizationId=1001&service=NONE',
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/warehouse/getWarehouseOfService?organizationId=1001&service=NONE", 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/warehouse/getWarehouseOfService?organizationId=1001&service=NONE"))
.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());
}
}
WarehouseOfService[]
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
object | 否 | Id. |
name |
string | 否 | 姓名. |
[
"string"
]应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_empty_ozon_id应用逻辑中使用稳定的error_empty_ozon_id代码;localMessage包含上述翻译.
error_ms_error应用逻辑中使用稳定的error_ms_error代码;localMessage包含上述翻译.
error_no_business_id_yandex_market应用逻辑中使用稳定的error_no_business_id_yandex_market代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_no_integration_with_service应用逻辑中使用稳定的error_no_integration_with_service代码;localMessage包含上述翻译.
error_no_integration_with_wb_ozon应用逻辑中使用稳定的error_no_integration_with_wb_ozon代码;localMessage包含上述翻译.
error_no_integration_with_wildberries应用逻辑中使用稳定的error_no_integration_with_wildberries代码;localMessage包含上述翻译.
error_no_integration_with_yandex_market应用逻辑中使用稳定的error_no_integration_with_yandex_market代码;localMessage包含上述翻译.
error_organization_not_found应用逻辑中使用稳定的error_organization_not_found代码;localMessage包含上述翻译.
error_ozon_api应用逻辑中使用稳定的error_ozon_api代码;localMessage包含上述翻译.
error_ozon_api_limit应用逻辑中使用稳定的error_ozon_api_limit代码;localMessage包含上述翻译.
error_ozon_premium_plus_subscription_required应用逻辑中使用稳定的error_ozon_premium_plus_subscription_required代码;localMessage包含上述翻译.
error_ozon_token_invalid应用逻辑中使用稳定的error_ozon_token_invalid代码;localMessage包含上述翻译.
error_prepared_integration_not_found应用逻辑中使用稳定的error_prepared_integration_not_found代码;localMessage包含上述翻译.
error_remote_error应用逻辑中使用稳定的error_remote_error代码;localMessage包含上述翻译.
error_service_error应用逻辑中使用稳定的error_service_error代码;localMessage包含上述翻译.
error_token_expired_or_revoked应用逻辑中使用稳定的error_token_expired_or_revoked代码;localMessage包含上述翻译.
/api/warehouse/getWarehouseBalancesWithPrices使用GET/api/warehouse/getWarehouseBalancesWithPrices.获得仓库余额与价格
curl --request GET 'https://api.selsup.ru/api/warehouse/getWarehouseBalancesWithPrices' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/getWarehouseBalancesWithPrices', {
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/warehouse/getWarehouseBalancesWithPrices', {
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/warehouse/getWarehouseBalancesWithPrices',
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/warehouse/getWarehouseBalancesWithPrices',
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/warehouse/getWarehouseBalancesWithPrices", 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/warehouse/getWarehouseBalancesWithPrices"))
.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());
}
}
WarehouseBalancesWithPrices[]
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
warehouseId |
integer · int64 | 否 | 仓库身份证. |
quantity |
integer · int32 | 否 | 量量. |
distinctQuantity |
integer · int64 | 否 | 显而易见的数量. |
purchasePrice |
number · double | 否 | 买价. |
additionalExpensesAmount |
number · double | 否 | 额外费用 |
wildberriesRetailPrice |
number · double | 否 | 野生果零售价格 |
ozonRetailPrice |
number · double | 否 | 子零售价格 |
yandexMarketRetailPrice |
number · double | 否 | 亚兰德克斯市场零售价格 |
aliexpressRetailPrice |
number · double | 否 | 果零售价格 |
sberMegaMarketRetailPrice |
number · double | 否 | 瑞银大市场零售价格 |
retailPriceByMarketplace |
number · double | 否 | 按市场价格. |
[
"string"
]应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
/api/warehouse/getServiceWarehouse使用 GET /api/warehouse/getServiceWarehouse.获取服务仓库
curl --request GET 'https://api.selsup.ru/api/warehouse/getServiceWarehouse' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/getServiceWarehouse', {
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/warehouse/getServiceWarehouse', {
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/warehouse/getServiceWarehouse',
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/warehouse/getServiceWarehouse',
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/warehouse/getServiceWarehouse", 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/warehouse/getServiceWarehouse"))
.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());
}
}
ServiceWarehouse[]
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
name |
string | 是 | 姓名. |
externalId |
string | 是 | 其他身份证. |
warehouseId |
integer · int64 | 是 | 仓库身份证. |
service |
stringNONE, WILDBERRIES, OZON, YANDEX_MARKET, FAMILIYA, NATIONAL_CATALOG, ALIEXPRESS, OTHER, MOY_SKLAD, SBER_MEGA_MARKET, CISLINK, ONE_C, AVITO, LEROY_MERLIN, DETMIR, KAZAN_EXPRESS, EVOTOR, WEBASYST, AMAZON, EBAY, SIMALAND, INSALES, LAMODA, OZON_PERFORMANCE, WALMART, GOOGLE, YANDEX_DISC, EMAIL, WOOCOMMERCE, MAGNIT, OPENCART, M_VIDEO, TAKEALOT, UZUM, SHOPIFY, MAKRO, YANDEX_KIT, BOB_SHOP, KASPI, DIADOC | 是 | 服务. |
organizationId |
integer · int64 | 是 | 组织身份证. |
serviceOrganizationId |
integer · int64 | 否 | 服务组织身份证. |
[
"string"
]应用错误通常以 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/warehouse/getRegionWarehousesByService使用GET/api/warehouse/getRegionWarehousesByService.获取区域仓库按服务
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
services |
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 | 是 | 服务. |
curl --request GET 'https://api.selsup.ru/api/warehouse/getRegionWarehousesByService?services=NONE' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/getRegionWarehousesByService?services=NONE', {
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/warehouse/getRegionWarehousesByService?services=NONE', {
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/warehouse/getRegionWarehousesByService?services=NONE',
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/warehouse/getRegionWarehousesByService?services=NONE',
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/warehouse/getRegionWarehousesByService?services=NONE", 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/warehouse/getRegionWarehousesByService?services=NONE"))
.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());
}
}
[
"string"
]应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_service_not_found应用逻辑中使用稳定的error_service_not_found代码;localMessage包含上述翻译.
/api/warehouse/findCell使用 GET /api/warehouse/findCell. 找到细胞
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
barcode |
string | 是 | 条码. |
curl --request GET 'https://api.selsup.ru/api/warehouse/findCell?barcode=string' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/findCell?barcode=string', {
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/warehouse/findCell?barcode=string', {
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/warehouse/findCell?barcode=string',
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/warehouse/findCell?barcode=string',
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/warehouse/findCell?barcode=string", 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/warehouse/findCell?barcode=string"))
.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());
}
}
Cell
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
name |
string | 否 | 姓名. |
fullName |
string | 否 | 完整名字. |
sortName |
string | 否 | 某种名字. |
barcode |
string | 否 | 条码. |
deleted |
boolean | 否 | 删除了. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
clientId |
integer · int64 | 否 | 客户身份证. |
lastInventoryId |
integer · int32 | 否 | 最后的库存身份证. |
type |
stringNORMAL, NO_PLACE, REFUND | 否 | Type. |
{
"id": 1001,
"warehouseId": 1001,
"passageId": 1001,
"shelfId": 1001,
"rackId": 1001,
"name": "Example"
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
/api/warehouse/cell/{cellId}使用GET/api/warehouse/cell/{cellId}.的细胞
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
cellId |
integer · int32 | 是 | 电话身份证. |
curl --request GET 'https://api.selsup.ru/api/warehouse/cell/%7BcellId%7D?cellId=1001' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/cell/%7BcellId%7D?cellId=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/warehouse/cell/%7BcellId%7D?cellId=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/warehouse/cell/%7BcellId%7D?cellId=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/warehouse/cell/%7BcellId%7D?cellId=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/warehouse/cell/%7BcellId%7D?cellId=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/warehouse/cell/%7BcellId%7D?cellId=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());
}
}
Cell
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int32 | 否 | Id. |
warehouseId |
integer · int64 | 否 | 仓库身份证. |
passageId |
integer · int32 | 否 | 通过身份证. |
shelfId |
integer · int32 | 否 | 货架身份证. |
rackId |
integer · int32 | 否 | 查看身份证. |
name |
string | 否 | 姓名. |
fullName |
string | 否 | 完整名字. |
sortName |
string | 否 | 某种名字. |
barcode |
string | 否 | 条码. |
deleted |
boolean | 否 | 删除了. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
clientId |
integer · int64 | 否 | 客户身份证. |
lastInventoryId |
integer · int32 | 否 | 最后的库存身份证. |
type |
stringNORMAL, NO_PLACE, REFUND | 否 | Type. |
{
"id": 1001,
"warehouseId": 1001,
"passageId": 1001,
"shelfId": 1001,
"rackId": 1001,
"name": "Example"
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_cell_not_found应用逻辑中使用稳定的error_cell_not_found代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
/api/warehouse/cell/{cellId}使用 DELETE /api/warehouse/cell/{cellId}.删除Cell
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
cellId |
integer · int32 | 是 | 电话身份证. |
curl --request DELETE 'https://api.selsup.ru/api/warehouse/cell/1001' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/warehouse/cell/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/warehouse/cell/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/warehouse/cell/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/warehouse/cell/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/warehouse/cell/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/warehouse/cell/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_cell_denied_delete应用逻辑中使用稳定的error_cell_denied_delete代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_subscription_expired应用逻辑中使用稳定的error_subscription_expired代码;localMessage包含上述翻译.