开始使用促销活动
使用专用API代币,首先验证测试数据的读取操作.
- 保存代币服务器侧,然后将其发送到Authorization标题中.
- 检查所需参数,并扩大请求或响应方案.
- 在应用错误中处理HTTP状态和稳定的error字段.
通过可编辑的独立合同来支持本页面. 在生产使用之前,验证使用测试数据的写作操作.
/api/promotion
准备使用的工作流程
使用专用API代币,首先验证测试数据的读取操作.
数据模型
模型在此列出一次,并且可以直接从使用它们的终端点扩展.
promotionIdinteger · int64提升身份证.
idinteger · int64Id.
totalCountinteger · int64总计.
namestring姓名.
dateStartstring · date-time开始日期.
dateEndstring · date-time约会结束.
changeCommissionboolean改变委员会.
changeCommissionAmountnumber · double改变佣金金额
createdDatestring · date-time创造日期.
servicestring服务.
isDeletedboolean已被删除.
descriptionstring描述
promotionIdOnMpstring优惠名单在MP上
clientIdinteger · int64客户身份证.
organizationIdinteger · int64组织身份证.
candidateCountinteger · int64候选人伯爵.
inPromotionCountinteger · int64在晋升计数.
autoboolean车辆.
hotsaleboolean鱼.
candidateCountOnMpinteger · int64候选人数量在MP.
inPromotionCountOnMpinteger · int64在促销部下
idinteger · int64Id.
read-onlystatusstringStatus.
read-onlytypestringType.
read-onlynamestring姓名.
clientIdinteger · int64客户身份证.
entityIdinteger · int64实体身份证
progressinteger · int32进步.
processedQuantityinteger · int32处理量
organizationIdinteger · int64组织身份证.
priorityinteger · int32优先考虑.
propertiesstring房产.
messagestring信息.
messageParamsstring消息帕拉姆.
createdDatestring · date-time创造日期.
startDatestring · date-time开始日期.
finishDatestring · date-time终结日期.
urlstring查看一个URL.
inputFileUrlstring输入文件URL.
retryNumberinteger · int32复试号码.
userIdinteger · int32用户身份证
retryDatestring · date-time试一次.
debugboolean调试.
forcedStartboolean强迫开始.
servicestring服务.
langstringLang.
categoryNamestring类别名称
brandNamestring品牌名字.
subjectstring问题.
purchasePricenumber · double买价.
deliveryCostnumber · double交货成本
additionalCostnumber · double额外的成本
barcodestring条码.
instockQuantityinteger · int64存量量
wildberriesStockCountinteger · int64野生果股票数量.
yandexMarketStockCountinteger · int64亚兰德克斯市场股票计数.
createdDatestring · date-time创造日期.
minPricenumber · double价格不到.
isDuplicateboolean是复制.
ozonArticlestring臭氧条款
ozonStockCountinteger · int64子股票计数.
salesExpensesOnMpPercentnumber · double销售费用在MP百分比上
taxeRatenumber · double税率.
widthinteger · int32宽度.
heightinteger · int32高.
depthinteger · int32深度.
ozonPurchasePercentnumber · double气购买率
warehouseRationumber · double仓库比例.
wildberriesCommissionnumber · double野生果委员会.
wildberriesFbwCommissionnumber · double野生果Fbw委员会.
wildberriesFbsCommissionnumber · double野生果联邦调查委员会.
wildberriesDbsCommissionnumber · double野生果食品委员会.
wildberriesEdbsCommissionnumber · double野生果养殖委员会.
wildberriesCAndCCommissionnumber · double果和果委员会.
wildberriesBookingCommissionnumber · double野生果预订委员会.
wildberriesAdditionalExpensesnumber · double其他费用
ozonAdditionalExpensesnumber · double臭氧额外支出
ozonCommissionnumber · double臭氧委员会
wildberriesIdinteger · int64果的身份证.
productIdinteger · int64产品身份证
promotionIdinteger · int64提升身份证.
ozonFbsCommissionnumber · double子联邦调查委员会.
ozonFboCommissionnumber · double子贸易委员会
servicestring服务.
acquiringPercentnumber · double获得百分比.
currentPricenumber · double现在的价格.
currentPriceWithoutDiscountnumber · double现货价格没有折扣.
plannedPricenumber · double计划的价格.
totalStockCountinteger · int64总股票数量.
commissionReductionnumber · double减少委员会.
profitDifferencenumber · double利差异
marginDifferencenumber · double边缘差异
markupDifferencenumber · double标记差异.
plannedAndMinPriceDiffnumber · double计划和最低价格差异
incomeDifferencenumber · double收入差异
currentDiscountnumber · double现在的折扣.
productCreatedDatestring · date-time产品创建日期
mainImageUrlstring标签: 标题:
isProfitablyboolean利的.
taskIdinteger · int64任务身份证.
serviceArticlestring服务条款
articlestring关于此的文章.
daysCountOnServiceinteger · int32服务时间是数日的.
turnoverinteger · int32转换时间.
fboStockinteger · int32美国联邦调查局.
fbsStockinteger · int32联邦调查局.
newDiscountForPromotionnumber · double促销额度新折扣.
saleLogisticsnumber · double销售物流.
returnLogisticsnumber · double返回物流.
purchasePercentnumber · double购买百分比.
totalLogisticsnumber · double总物流.
commissionsnumber · double佣金.
currentProfitnumber · double现在的利.
promotionProfitnumber · double提升利.
currentMarginalitynumber · double现在的边缘化.
promotionMarginalitynumber · double晋升边缘化.
currentMarkUpnumber · double现在的标记.
promotionMarkUpnumber · double提升,提升.
additionalDiscountForPromotionRubnumber · double更多的优惠.
additionalDiscountForPromotionPercentnumber · double促销额外折扣.
isDeletedboolean已被删除.
organizationIdinteger · int64组织身份证.
clientIdinteger · int64客户身份证.
addModestring加入模式.
ozonAverageExpensesnumber · double臭氧平均支出
isActiveboolean现在还在行动.
changeNamestring改变名字.
changeDatestring · date-time改变日期.
productNamestring产品名称
idinteger · int64Id.
totalCountinteger · int64总计.
serviceCardstring服务卡.
isNotFoundboolean没有找到.
isArchivedboolean已被存档.
productCommissionsstring产品委员会
currentGrossProfitnumber · double现货总利
plannedGrossProfitnumber · double预计的总利.
product_idinteger · int64产品身份证
action_pricenumber · double股价.
stockinteger · int32股票.
reasonstring原因.
rowsProductPromotion[]排列.
rowsPromotion[]排列.
错误合同
编程的代码在每个地方都相同,而用户面向的消息由服务器翻译. 建立在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/promotion/{promotionId}通过PUTX/api/promotion/{promotionId}.进行促销
application/jsonPromotion| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
promotionId |
integer · int64 | 否 | 提升身份证. |
id |
integer · int64 | 否 | Id. |
totalCount |
integer · int64 | 否 | 总计. |
name |
string | 否 | 姓名. |
dateStart |
string · date-time | 否 | 开始日期. |
dateEnd |
string · date-time | 否 | 约会结束. |
changeCommission |
boolean | 否 | 改变委员会. |
changeCommissionAmount |
number · double | 否 | 改变佣金金额 |
createdDate |
string · date-time | 否 | 创造日期. |
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 | 否 | 服务. |
isDeleted |
boolean | 否 | 已被删除. |
description |
string | 否 | 描述 |
promotionIdOnMp |
string | 否 | 优惠名单在MP上 |
clientId |
integer · int64 | 否 | 客户身份证. |
organizationId |
integer · int64 | 否 | 组织身份证. |
candidateCount |
integer · int64 | 否 | 候选人伯爵. |
inPromotionCount |
integer · int64 | 否 | 在晋升计数. |
auto |
boolean | 否 | 车辆. |
hotsale |
boolean | 否 | 鱼. |
candidateCountOnMp |
integer · int64 | 否 | 候选人数量在MP. |
inPromotionCountOnMp |
integer · int64 | 否 | 在促销部下 |
curl --request PUT 'https://api.selsup.ru/api/promotion/%7BpromotionId%7D' \
--header 'Authorization: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"promotionId": 1001,
"id": 1001,
"totalCount": 1,
"name": "Example",
"dateStart": "2026-01-15T12:00:00Z",
"dateEnd": "2026-01-15T12:00:00Z"
}'
const response = await fetch('https://api.selsup.ru/api/promotion/%7BpromotionId%7D', {
method: 'PUT',
headers: {
Authorization: process.env.SELSUP_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"promotionId": 1001,
"id": 1001,
"totalCount": 1,
"name": "Example",
"dateStart": "2026-01-15T12:00:00Z",
"dateEnd": "2026-01-15T12:00:00Z"
}),
});
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/promotion/%7BpromotionId%7D', {
method: 'PUT',
headers: {
Authorization: process.env.SELSUP_API_TOKEN!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"promotionId": 1001,
"id": 1001,
"totalCount": 1,
"name": "Example",
"dateStart": "2026-01-15T12:00:00Z",
"dateEnd": "2026-01-15T12:00:00Z"
}),
});
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/promotion/%7BpromotionId%7D',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
json={
'promotionId': 1001,
'id': 1001,
'totalCount': 1,
'name': 'Example',
'dateStart': '2026-01-15T12:00:00Z',
'dateEnd': '2026-01-15T12:00:00Z'
},
)
response.raise_for_status()
result = response.json()
<?php
$payload = <<<'JSON'
{
"promotionId": 1001,
"id": 1001,
"totalCount": 1,
"name": "Example",
"dateStart": "2026-01-15T12:00:00Z",
"dateEnd": "2026-01-15T12:00:00Z"
}
JSON;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/promotion/%7BpromotionId%7D',
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/promotion/%7BpromotionId%7D", strings.NewReader(`{
"promotionId": 1001,
"id": 1001,
"totalCount": 1,
"name": "Example",
"dateStart": "2026-01-15T12:00:00Z",
"dateEnd": "2026-01-15T12:00:00Z"
}`))
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/promotion/%7BpromotionId%7D"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.header("Content-Type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("""
{
"promotionId": 1001,
"id": 1001,
"totalCount": 1,
"name": "Example",
"dateStart": "2026-01-15T12:00:00Z",
"dateEnd": "2026-01-15T12:00:00Z"
}
"""))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
Promotion
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
promotionId |
integer · int64 | 否 | 提升身份证. |
id |
integer · int64 | 否 | Id. |
totalCount |
integer · int64 | 否 | 总计. |
name |
string | 否 | 姓名. |
dateStart |
string · date-time | 否 | 开始日期. |
dateEnd |
string · date-time | 否 | 约会结束. |
changeCommission |
boolean | 否 | 改变委员会. |
changeCommissionAmount |
number · double | 否 | 改变佣金金额 |
createdDate |
string · date-time | 否 | 创造日期. |
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 | 否 | 服务. |
isDeleted |
boolean | 否 | 已被删除. |
description |
string | 否 | 描述 |
promotionIdOnMp |
string | 否 | 优惠名单在MP上 |
clientId |
integer · int64 | 否 | 客户身份证. |
organizationId |
integer · int64 | 否 | 组织身份证. |
candidateCount |
integer · int64 | 否 | 候选人伯爵. |
inPromotionCount |
integer · int64 | 否 | 在晋升计数. |
auto |
boolean | 否 | 车辆. |
hotsale |
boolean | 否 | 鱼. |
candidateCountOnMp |
integer · int64 | 否 | 候选人数量在MP. |
inPromotionCountOnMp |
integer · int64 | 否 | 在促销部下 |
{
"promotionId": 1001,
"id": 1001,
"totalCount": 1,
"name": "Example",
"dateStart": "2026-01-15T12:00:00Z",
"dateEnd": "2026-01-15T12:00:00Z"
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
/api/promotion/{promotionId}使用 PATCH /api/promotion/{promotionId}.恢复促销按ID
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
promotionId |
integer · int64 | 是 | 提升身份证. |
curl --request PATCH 'https://api.selsup.ru/api/promotion/1001' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/promotion/1001', {
method: 'PATCH',
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/promotion/1001', {
method: 'PATCH',
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.patch(
'https://api.selsup.ru/api/promotion/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/promotion/1001',
CURLOPT_CUSTOMREQUEST => 'PATCH',
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("PATCH", "https://api.selsup.ru/api/promotion/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/promotion/1001"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.method("PATCH", 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节省请求时间和联系支持;不要盲目重新尝试突变.
/api/promotion/{promotionId}使用 DELETE /api/promotion/{promotionId}.删除促销
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
promotionId |
integer · int64 | 是 | 提升身份证. |
curl --request DELETE 'https://api.selsup.ru/api/promotion/1001' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/promotion/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/promotion/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/promotion/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/promotion/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/promotion/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/promotion/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节省请求时间和联系支持;不要盲目重新尝试突变.
/api/promotion/update/{service}使用 POST 更新
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
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 | 否 | 组织身份证. |
curl --request POST 'https://api.selsup.ru/api/promotion/update/NONE' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/promotion/update/NONE', {
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/promotion/update/NONE', {
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/promotion/update/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/promotion/update/NONE',
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/promotion/update/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/promotion/update/NONE"))
.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());
}
}
TmsTask
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
status |
stringCREATED, RUNNING, FINISHED, ERROR, RESTARTING, INTERRUPTING, INTERRUPTED, STOPPED, EXCEPTION | 否 | Status. |
type |
stringWILDBERRIES_CREATE_CARD, NATIONAL_CATALOG_CREATE_CARD, OZON_CREATE_CARD, OZON_CARDS_IMPORT, IMPORT_FBS_ORDERS, UPLOAD_PHOTOGRAPHY, WILDBERRIES_UPDATE_PRICE, WILDBERRIES_CARD_IMPORT, WILDBERRIES_CARD_UPDATE, SELSUP_STOCKS, REFRESH_PHOTOGRAPHY, SUPPLYING_QUANTITY_TASK, EXPORT_PRICE, OZON_UPDATE_PRICE, WILDBERRIES_FILE_TASK, YANDEX_MARKET_CARD_CREATE, OZON_CARD_UPDATE_TASK, OZON_IMPORT_STAT_TASK, WILDBERRIES_PROFIT_STAT_TASK, ALIEXPRESS_CREATE_CARD_TASK, ALIEXPRESS_UPDATE_CARD_TASK, PRICES_IMPORT_TASK, WILDBERRIES_PRICES_TASK, YANDEX_MARKET_CARD_IMPORT, STOCKS_UPDATE, WILDBERRIES_STOCKS_IMPORT_TASK, WILDBERRIES_ORDERS_AND_SALES_TASK, WILDBERRIES_INCOMES_IMPORT_TASK, OZON_STOCKS_IMPORT_TASK, TURNOVER_DOCUMENTS_TASK, INTRODUCE_WMS_ITEMS_TASK, PRODUCTS_FILE_TASK, MODELS_FILE_TASK, UPDATE_PRODUCT_CODES_TASK, INTRODUCE_CODES_TASK, PRODUCTS_IMPORT_TASK, PRICES_FILE_TASK, YANDEX_MARKET_UPDATE_PRICE_TASK, IMPORT_STOCKS_TASK, MOY_SKLAD_EXPORT_ORDERS, MERGE_PRODUCTS_TASK, PRODUCTS_WILDBERRIES_EXCEL_IMPORT_TASK, MOY_SKLAD_CREATE_CARD, IMPORT_FBO_STOCKS_FROM_FILE, CREATE_WMS_ITEMS, MOY_SKLAD_CARDS_IMPORT, PROMOTION_FILE, UNUSED_1, UNUSED, PRODUCT_ANALYTICS_FILE_TASK, PROMOTION_RESET_FILE, MOY_SKLAD_IMPORT_ORDERS, FINANCE_REPORT_FILE_TASK, YML_FILE_EXPORT, PRODUCT_BALANCE_REPORT_FILE_TASK, CURRENT_PRODUCT_BALANCE_FILE_TASK, IMPORT_TRANSACTIONS, MATCH_UNREGISTERED_PROFIT_REPORT_TASK, UPDATE_AVERAGE_SERVICE_EXPENSES_TASK, YANDEX_MARKET_ORDER_IMPORT_STAT_TASK, ABC_REPORT_FILE_TASK, MODEL_CONTRACTORS_IMPORT, MODEL_CONTRACTORS_EXPORT, BANK_TRANSACTION_IMPORT_FILE_TASK, YML_IMPORT_TASK, SALES_DYNAMIC_REPORT_FILE_TASK, UPDATE_FBS_ORDERS, EXPORT_TRANSACTION_IN_EXCEL_FILE_TASK, IMPORT_TRANSACTION_FROM_EXCEL_FILE_TASK, EXPORT_PROFIT_REPORT_FILE_TASK, IMPORT_PROFIT_REPORT_FROM_EXCEL_FILE_TASK, IMPORT_REALIZATION_REPORT_TASK, STOCK_RECONCILIATION, ORDER_REPORT_FILE_TASK, GET_WB_FBO_ORDER_FROM_PROFIT_REPORT_TASK, TO_QUANTITY_STORAGE_METHOD, APPLY_RECONCILIATION, OZON_IMPORT_FBO_ORDERS_TASK, UPDATE_PURCHASE_PRICE_IN_PROFIT_REPORT_TASK, FBS_LABELS, MERGE_PRODUCT_STOCKS, CREATE_ORDER_FROM_FILE, ALIEXPRESS_CARD_IMPORT, PRICE_LIST_IMPORT, WB_STOCK_REPORT_FILE, CONTRACTORS_REPORT_FILE, PRODUCTS_SBER_MEGA_MARKET_EXCEL_IMPORT_TASK, EXPORT_PROBLEMATIC_PRODUCT_REPORT, PLAN_SUPPLY_REPORT_TASK, PLAN_FACT_SALES_REPORT_FILE, IMPORT_PLAN_SALES_FROM_EXCEL_FILE_TASK, EXPORT_PLAN_SALES_EXCEL_FILE_TASK, ORDERS_TO_BUY_FILE_TASK, MERGE_PRICE_ON_OTHER_MP_TASK, MATCH_PRODUCT_LAST_OPERATION_DATE_TASK, PROBLEMATIC_PRODUCT_PRICE_FILE_TASK, CATEGORIES_IMPORT_EXCEL_TASK, AVITO_CARD_IMPORT, UPDATE_OLD_WB_ORDER_STATUSES_TASK, PRESTA_SHOP_IMPORT_TASK, PRODUCTS_AVITO_EXCEL_IMPORT_TASK, FBO_STOCK_RECONCILIATION_TASK, APPLY_FBO_RECONCILIATION_TASK, EXPORT_REPRICE_PRODUCT_CONFIG_TASK, IMPORT_REPRICE_PRODUCT_CONFIG_TASK, OZON_CASH_FLOW_STATEMENT_IMPORT_TASK, IMPORT_PROMOTION_STRATEGY_FILE_TASK, UPDATE_ORDER_DELIVERY_INFO_TASK, BILLING_OPERATION_TASK, SET_PURCHASE_PERCENT_TASK, REMOVE_PRODUCT_IMAGES_TASK, STRUCTURE_TURNOVER_TASK, OZON_NEW_UPDATE_PRICE, REPLACE_PRODUCT_IMAGE_TASK, UPDATE_OZON_PROMOTION_DATA_TASK, WILDBERRIES_IMPORT_CAMPAIGN_TASK, WILDBERRIES_STORAGE_REPORT_TASK, WEBASYST_LINK_ARTICLE_TASK, DELIVERY_SERVICE_LABELS, HAND_ON_PULSE_FILE_TASK, ITEMS_INCOME_EXCEL_TASK, UPDATE_SETS_EXCEL_TASK, DELETE_PROFIT_REPORTS_BY_FILE_HISTORY_IDS_TASK, EXPORT_PRODUCT_SETS_TASK, AMAZON_CARD_IMPORT, IMPORT_ACCEPTED_PRODUCTS_TASK, ADD_ORDER_PRODUCT_FROM_FILE_TASK, EXPORT_ITEM_HISTORY_FILE_TASK, WILDBERRIES_IMPORT_CAMPAIGN_BY_EXCEL_TASK, REMOVE_CLIENT_ORGANIZATION, EBAY_CARD_IMPORT_TASK, PRODUCTS_IMPORT_FROM_ORGANIZATION_TASK, IMPORT_FBO_ORDERS, LAMODA_CARD_IMPORT, UPDATE_WB_PROMOTION_DATA_TASK, IMPORT_RETURNS_REPORT_TASK, UPDATE_PROMOTION_DATA_TASK, RESTORE_CLIENT_ORGANIZATION, LEROY_MERLIN_CARD_IMPORT, YANDEX_MARKET_STOCKS_IMPORT_TASK, WILDBERRIES_IMPORT_NM_REPORT_TASK, ORDER_ANALYTICS_FILE_TASK, CLIENT_DATABASE_MOVE_TASK, FAST_CARD_IMPORT, EXPORT_PRODUCT_CODE, INSALES_CARD_IMPORT_TASK, REMOVE_PRODUCT_VIDEOS_TASK, UPDATE_CARDS_TASK, FIND_UNPROFITABLE_PRODUCTS_TASK, FIND_UNPURCHASED_PRODUCTS_TASK, WALMART_CARD_IMPORT, PRODUCT_GROUPS_TASK, CONTRACTOR_ARTICLE_EXPORT_TASK, CONTRACTOR_ARTICLE_IMPORT_TASK, CURRENCY_CONVERSION_TASK, UPDATE_SUPPLY_PLAN_REPORT_TASK, EXPORT_SUPPLY_PLAN_REPORT_FILE_TASK, CHECK_STOCK_ORDER, PHOTOGRAPHY_EXCEL, PREPARE_FINDIR_DATA_TASK, CARD_SPLITTING_TASK, EXPORT_IMAGE_UPDATES_TEMPLATE_TASK, IMPORT_IMAGE_UPDATES_TASK, PREPARE_PRODUCT_HAND_ON_PULSE_TASK, UPDATE_OZON_AVERAGE_DELIVERY_TIME, UPDATE_COMMISSIONS_TASK, WOOCOMMERCE_CARD_IMPORT, UPDATE_FBS_STOCKS_HISTORY, RETURNS_FILE_TASK, FAST_PRODUCTS_IMPORT_TASK, ANALYZE_PRODUCT_CARDS_TASK, DETMIR_CARD_IMPORT, MATCH_OZON_REALIZATION_REPORT_TASK, MAGNIT_IMPORT_PRODUCTS_TASK, UPDATE_PURCHASE_PRICE_FROM_STOCKS_IN_PROFIT_REPORT_TASK, MOY_SKLAD_FBO_MP_DATES_FIX, PRICE_HISTORY_FILE_TASK, FBM_ORDERS_IMPORT_TASK, UZUM_IMPORT_PRODUCTS_TASK, OPENCART_CARD_IMPORT, CARDS_IMPORT, OZON_CROSSDOCK_TRANSIT_ROUTES_TASK, UNUSED_2, OZON_IMPORT_SALES_FUNNEL_REPORT_TASK, WRITE_OFF_PRODUCTS_FILE_TASK, CLIENT_DATABASE_CREATE_TASK, UPDATE_FBS_LABELS_TASK, REBUILD_PROFIT_REPORT_HOURLY_AGGREGATE_TASK, OZON_IMPORT_CAMPAIGN_TASK, EXPORT_SUPPLY_PLAN_FILE_TASK, IMPORT_SUPPLY_PLAN_FILE_TASK, CREATE_SERVICE_CARDS, WAREHOUSE_ECONOMICS_FILE_TASK, UPDATE_WILDBERRIES_ACQUIRING_RATE_TASK, PRODUCT_SALES_FORECAST_TASK, UPDATE_PRODUCT_CODES_STATUSES_TASK, MARKETPLACE_UPDATE_PRICE_TASK, UZUM_IMPORT_STAT_TASK, CAMPAIGN_STATS_FILE_TASK, OZON_FBO_WORKFLOW_TASK, EXPORT_CERTIFICATE_TEMPLATE_TASK, IMPORT_CERTIFICATES_TASK, REBUILD_LOCAL_ORDER_PROFIT_REPORT_TASK, SHOPIFY_CARD_IMPORT | 否 | Type. |
name |
string | 否 | 姓名. |
clientId |
integer · int64 | 否 | 客户身份证. |
entityId |
integer · int64 | 否 | 实体身份证 |
progress |
integer · int32 | 否 | 进步. |
processedQuantity |
integer · int32 | 否 | 处理量 |
organizationId |
integer · int64 | 否 | 组织身份证. |
priority |
integer · int32 | 否 | 优先考虑. |
properties |
string | 否 | 房产. |
message |
string | 否 | 信息. |
messageParams |
string | 否 | 消息帕拉姆. |
createdDate |
string · date-time | 否 | 创造日期. |
startDate |
string · date-time | 否 | 开始日期. |
finishDate |
string · date-time | 否 | 终结日期. |
url |
string | 否 | 查看一个URL. |
inputFileUrl |
string | 否 | 输入文件URL. |
retryNumber |
integer · int32 | 否 | 复试号码. |
userId |
integer · int32 | 否 | 用户身份证 |
retryDate |
string · date-time | 否 | 试一次. |
debug |
boolean | 否 | 调试. |
forcedStart |
boolean | 否 | 强迫开始. |
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 | 否 | 服务. |
lang |
string | 否 | Lang. |
{
"id": 1001,
"status": "CREATED",
"type": "WILDBERRIES_CREATE_CARD",
"name": "Example",
"clientId": 1001,
"entityId": 1001
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_cannot_deleted_order_product应用逻辑中使用稳定的error_cannot_deleted_order_product代码;localMessage包含上述翻译.
error_competitor_id_required应用逻辑中使用稳定的error_competitor_id_required代码;localMessage包含上述翻译.
error_competitor_required应用逻辑中使用稳定的error_competitor_required代码;localMessage包含上述翻译.
error_competitor_service_required应用逻辑中使用稳定的error_competitor_service_required代码;localMessage包含上述翻译.
error_competitor_url_required应用逻辑中使用稳定的error_competitor_url_required代码;localMessage包含上述翻译.
error_customer_not_found应用逻辑中使用稳定的error_customer_not_found代码;localMessage包含上述翻译.
error_duplicate_order_product应用逻辑中使用稳定的error_duplicate_order_product代码;localMessage包含上述翻译.
error_empty_warehouse应用逻辑中使用稳定的error_empty_warehouse代码;localMessage包含上述翻译.
error_group_already_exist应用逻辑中使用稳定的error_group_already_exist代码;localMessage包含上述翻译.
error_incorrect_order_data应用逻辑中使用稳定的error_incorrect_order_data代码;localMessage包含上述翻译.
error_invalid_url应用逻辑中使用稳定的error_invalid_url代码;localMessage包含上述翻译.
error_moy_sklad_organization应用逻辑中使用稳定的error_moy_sklad_organization代码;localMessage包含上述翻译.
error_ms_error应用逻辑中使用稳定的error_ms_error代码;localMessage包含上述翻译.
error_ms_no_warehouse应用逻辑中使用稳定的error_ms_no_warehouse代码;localMessage包含上述翻译.
error_ms_update_order_state应用逻辑中使用稳定的error_ms_update_order_state代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_no_marketplace应用逻辑中使用稳定的error_no_marketplace代码;localMessage包含上述翻译.
error_no_organization应用逻辑中使用稳定的error_no_organization代码;localMessage包含上述翻译.
error_no_price_for_order_product应用逻辑中使用稳定的error_no_price_for_order_product代码;localMessage包含上述翻译.
error_no_products_in_order应用逻辑中使用稳定的error_no_products_in_order代码;localMessage包含上述翻译.
error_no_quantity_for_order_product应用逻辑中使用稳定的error_no_quantity_for_order_product代码;localMessage包含上述翻译.
error_not_reserved应用逻辑中使用稳定的error_not_reserved代码;localMessage包含上述翻译.
error_not_uniq_external_id应用逻辑中使用稳定的error_not_uniq_external_id代码;localMessage包含上述翻译.
error_order_not_found应用逻辑中使用稳定的error_order_not_found代码;localMessage包含上述翻译.
error_order_product_stock应用逻辑中使用稳定的error_order_product_stock代码;localMessage包含上述翻译.
error_organization_not_found应用逻辑中使用稳定的error_organization_not_found代码;localMessage包含上述翻译.
error_product_not_found_by_id应用逻辑中使用稳定的error_product_not_found_by_id代码;localMessage包含上述翻译.
error_source_cell_change_not_allowed_for_inter_warehouse_movement应用逻辑中使用稳定的error_source_cell_change_not_allowed_for_inter_warehouse_movement代码;localMessage包含上述翻译.
error_stock_update_busy应用逻辑中使用稳定的error_stock_update_busy代码;localMessage包含上述翻译.
error_token_expired_or_revoked应用逻辑中使用稳定的error_token_expired_or_revoked代码;localMessage包含上述翻译.
error_unsupported_service应用逻辑中使用稳定的error_unsupported_service代码;localMessage包含上述翻译.
error_warehouse_not_found应用逻辑中使用稳定的error_warehouse_not_found代码;localMessage包含上述翻译.
error_wms_item_not_found应用逻辑中使用稳定的error_wms_item_not_found代码;localMessage包含上述翻译.
/api/promotion/deleteProductsInPromotion使用 POST /api/promotion/deleteProductsInPromotion.删除促销中的产品
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
promotionId |
integer · int64 | 是 | 提升身份证. |
clientOrganizationId |
integer · int64 | 是 | 客户组织身份证. |
application/jsonProductPromotion[]| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
categoryName |
string | 否 | 类别名称 |
brandName |
string | 否 | 品牌名字. |
subject |
string | 否 | 问题. |
purchasePrice |
number · double | 否 | 买价. |
deliveryCost |
number · double | 否 | 交货成本 |
additionalCost |
number · double | 否 | 额外的成本 |
barcode |
string | 否 | 条码. |
instockQuantity |
integer · int64 | 否 | 存量量 |
wildberriesStockCount |
integer · int64 | 否 | 野生果股票数量. |
yandexMarketStockCount |
integer · int64 | 否 | 亚兰德克斯市场股票计数. |
createdDate |
string · date-time | 否 | 创造日期. |
minPrice |
number · double | 否 | 价格不到. |
isDuplicate |
boolean | 否 | 是复制. |
ozonArticle |
string | 否 | 臭氧条款 |
ozonStockCount |
integer · int64 | 否 | 子股票计数. |
salesExpensesOnMpPercent |
number · double | 否 | 销售费用在MP百分比上 |
taxeRate |
number · double | 否 | 税率. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
ozonPurchasePercent |
number · double | 否 | 气购买率 |
warehouseRatio |
number · double | 否 | 仓库比例. |
wildberriesCommission |
number · double | 否 | 野生果委员会. |
wildberriesFbwCommission |
number · double | 否 | 野生果Fbw委员会. |
wildberriesFbsCommission |
number · double | 否 | 野生果联邦调查委员会. |
wildberriesDbsCommission |
number · double | 否 | 野生果食品委员会. |
wildberriesEdbsCommission |
number · double | 否 | 野生果养殖委员会. |
wildberriesCAndCCommission |
number · double | 否 | 果和果委员会. |
wildberriesBookingCommission |
number · double | 否 | 野生果预订委员会. |
wildberriesAdditionalExpenses |
number · double | 否 | 其他费用 |
ozonAdditionalExpenses |
number · double | 否 | 臭氧额外支出 |
ozonCommission |
number · double | 否 | 臭氧委员会 |
wildberriesId |
integer · int64 | 否 | 果的身份证. |
productId |
integer · int64 | 否 | 产品身份证 |
promotionId |
integer · int64 | 否 | 提升身份证. |
ozonFbsCommission |
number · double | 否 | 子联邦调查委员会. |
ozonFboCommission |
number · double | 否 | 子贸易委员会 |
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 | 否 | 服务. |
acquiringPercent |
number · double | 否 | 获得百分比. |
currentPrice |
number · double | 否 | 现在的价格. |
currentPriceWithoutDiscount |
number · double | 否 | 现货价格没有折扣. |
plannedPrice |
number · double | 否 | 计划的价格. |
totalStockCount |
integer · int64 | 否 | 总股票数量. |
commissionReduction |
number · double | 否 | 减少委员会. |
profitDifference |
number · double | 否 | 利差异 |
marginDifference |
number · double | 否 | 边缘差异 |
markupDifference |
number · double | 否 | 标记差异. |
plannedAndMinPriceDiff |
number · double | 否 | 计划和最低价格差异 |
incomeDifference |
number · double | 否 | 收入差异 |
currentDiscount |
number · double | 否 | 现在的折扣. |
productCreatedDate |
string · date-time | 否 | 产品创建日期 |
mainImageUrl |
string | 否 | 标签: 标题: |
isProfitably |
boolean | 否 | 利的. |
taskId |
integer · int64 | 否 | 任务身份证. |
serviceArticle |
string | 否 | 服务条款 |
article |
string | 否 | 关于此的文章. |
daysCountOnService |
integer · int32 | 否 | 服务时间是数日的. |
turnover |
integer · int32 | 否 | 转换时间. |
fboStock |
integer · int32 | 否 | 美国联邦调查局. |
fbsStock |
integer · int32 | 否 | 联邦调查局. |
newDiscountForPromotion |
number · double | 否 | 促销额度新折扣. |
saleLogistics |
number · double | 否 | 销售物流. |
returnLogistics |
number · double | 否 | 返回物流. |
purchasePercent |
number · double | 否 | 购买百分比. |
totalLogistics |
number · double | 否 | 总物流. |
commissions |
number · double | 否 | 佣金. |
currentProfit |
number · double | 否 | 现在的利. |
promotionProfit |
number · double | 否 | 提升利. |
currentMarginality |
number · double | 否 | 现在的边缘化. |
promotionMarginality |
number · double | 否 | 晋升边缘化. |
currentMarkUp |
number · double | 否 | 现在的标记. |
promotionMarkUp |
number · double | 否 | 提升,提升. |
additionalDiscountForPromotionRub |
number · double | 否 | 更多的优惠. |
additionalDiscountForPromotionPercent |
number · double | 否 | 促销额外折扣. |
isDeleted |
boolean | 否 | 已被删除. |
organizationId |
integer · int64 | 否 | 组织身份证. |
clientId |
integer · int64 | 否 | 客户身份证. |
addMode |
string | 否 | 加入模式. |
ozonAverageExpenses |
number · double | 否 | 臭氧平均支出 |
isActive |
boolean | 否 | 现在还在行动. |
changeName |
string | 否 | 改变名字. |
changeDate |
string · date-time | 否 | 改变日期. |
productName |
string | 否 | 产品名称 |
id |
integer · int64 | 否 | Id. |
totalCount |
integer · int64 | 否 | 总计. |
serviceCard |
string | 否 | 服务卡. |
isNotFound |
boolean | 否 | 没有找到. |
isArchived |
boolean | 否 | 已被存档. |
productCommissions |
string | 否 | 产品委员会 |
currentGrossProfit |
number · double | 否 | 现货总利 |
plannedGrossProfit |
number · double | 否 | 预计的总利. |
curl --request POST 'https://api.selsup.ru/api/promotion/deleteProductsInPromotion?promotionId=1001&clientOrganizationId=1001' \
--header 'Authorization: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '[
"string"
]'
const response = await fetch('https://api.selsup.ru/api/promotion/deleteProductsInPromotion?promotionId=1001&clientOrganizationId=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/promotion/deleteProductsInPromotion?promotionId=1001&clientOrganizationId=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/promotion/deleteProductsInPromotion?promotionId=1001&clientOrganizationId=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/promotion/deleteProductsInPromotion?promotionId=1001&clientOrganizationId=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/promotion/deleteProductsInPromotion?promotionId=1001&clientOrganizationId=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/promotion/deleteProductsInPromotion?promotionId=1001&clientOrganizationId=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());
}
}
OzonProduct[]
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
product_id |
integer · int64 | 否 | 产品身份证 |
action_price |
number · double | 否 | 股价. |
stock |
integer · int32 | 否 | 股票. |
reason |
string | 否 | 原因. |
[
"string"
]应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_auto_promotion_not_supported应用逻辑中使用稳定的error_auto_promotion_not_supported代码;localMessage包含上述翻译.
error_empty_ozon_id应用逻辑中使用稳定的error_empty_ozon_id代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_organization_not_found应用逻辑中使用稳定的error_organization_not_found代码;localMessage包含上述翻译.
error_promotion_exists应用逻辑中使用稳定的error_promotion_exists代码;localMessage包含上述翻译.
error_remote应用逻辑中使用稳定的error_remote代码;localMessage包含上述翻译.
error_token_expired_or_revoked应用逻辑中使用稳定的error_token_expired_or_revoked代码;localMessage包含上述翻译.
error_wildberries_import_error应用逻辑中使用稳定的error_wildberries_import_error代码;localMessage包含上述翻译.
/api/promotion/addProductsInPromotion使用 POST /api/promotion/addProductsInPromotion. 添加促销产品
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
promotionId |
integer · int64 | 是 | 提升身份证. |
clientOrganizationId |
integer · int64 | 是 | 客户组织身份证. |
application/jsonProductPromotion[]| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
categoryName |
string | 否 | 类别名称 |
brandName |
string | 否 | 品牌名字. |
subject |
string | 否 | 问题. |
purchasePrice |
number · double | 否 | 买价. |
deliveryCost |
number · double | 否 | 交货成本 |
additionalCost |
number · double | 否 | 额外的成本 |
barcode |
string | 否 | 条码. |
instockQuantity |
integer · int64 | 否 | 存量量 |
wildberriesStockCount |
integer · int64 | 否 | 野生果股票数量. |
yandexMarketStockCount |
integer · int64 | 否 | 亚兰德克斯市场股票计数. |
createdDate |
string · date-time | 否 | 创造日期. |
minPrice |
number · double | 否 | 价格不到. |
isDuplicate |
boolean | 否 | 是复制. |
ozonArticle |
string | 否 | 臭氧条款 |
ozonStockCount |
integer · int64 | 否 | 子股票计数. |
salesExpensesOnMpPercent |
number · double | 否 | 销售费用在MP百分比上 |
taxeRate |
number · double | 否 | 税率. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
ozonPurchasePercent |
number · double | 否 | 气购买率 |
warehouseRatio |
number · double | 否 | 仓库比例. |
wildberriesCommission |
number · double | 否 | 野生果委员会. |
wildberriesFbwCommission |
number · double | 否 | 野生果Fbw委员会. |
wildberriesFbsCommission |
number · double | 否 | 野生果联邦调查委员会. |
wildberriesDbsCommission |
number · double | 否 | 野生果食品委员会. |
wildberriesEdbsCommission |
number · double | 否 | 野生果养殖委员会. |
wildberriesCAndCCommission |
number · double | 否 | 果和果委员会. |
wildberriesBookingCommission |
number · double | 否 | 野生果预订委员会. |
wildberriesAdditionalExpenses |
number · double | 否 | 其他费用 |
ozonAdditionalExpenses |
number · double | 否 | 臭氧额外支出 |
ozonCommission |
number · double | 否 | 臭氧委员会 |
wildberriesId |
integer · int64 | 否 | 果的身份证. |
productId |
integer · int64 | 否 | 产品身份证 |
promotionId |
integer · int64 | 否 | 提升身份证. |
ozonFbsCommission |
number · double | 否 | 子联邦调查委员会. |
ozonFboCommission |
number · double | 否 | 子贸易委员会 |
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 | 否 | 服务. |
acquiringPercent |
number · double | 否 | 获得百分比. |
currentPrice |
number · double | 否 | 现在的价格. |
currentPriceWithoutDiscount |
number · double | 否 | 现货价格没有折扣. |
plannedPrice |
number · double | 否 | 计划的价格. |
totalStockCount |
integer · int64 | 否 | 总股票数量. |
commissionReduction |
number · double | 否 | 减少委员会. |
profitDifference |
number · double | 否 | 利差异 |
marginDifference |
number · double | 否 | 边缘差异 |
markupDifference |
number · double | 否 | 标记差异. |
plannedAndMinPriceDiff |
number · double | 否 | 计划和最低价格差异 |
incomeDifference |
number · double | 否 | 收入差异 |
currentDiscount |
number · double | 否 | 现在的折扣. |
productCreatedDate |
string · date-time | 否 | 产品创建日期 |
mainImageUrl |
string | 否 | 标签: 标题: |
isProfitably |
boolean | 否 | 利的. |
taskId |
integer · int64 | 否 | 任务身份证. |
serviceArticle |
string | 否 | 服务条款 |
article |
string | 否 | 关于此的文章. |
daysCountOnService |
integer · int32 | 否 | 服务时间是数日的. |
turnover |
integer · int32 | 否 | 转换时间. |
fboStock |
integer · int32 | 否 | 美国联邦调查局. |
fbsStock |
integer · int32 | 否 | 联邦调查局. |
newDiscountForPromotion |
number · double | 否 | 促销额度新折扣. |
saleLogistics |
number · double | 否 | 销售物流. |
returnLogistics |
number · double | 否 | 返回物流. |
purchasePercent |
number · double | 否 | 购买百分比. |
totalLogistics |
number · double | 否 | 总物流. |
commissions |
number · double | 否 | 佣金. |
currentProfit |
number · double | 否 | 现在的利. |
promotionProfit |
number · double | 否 | 提升利. |
currentMarginality |
number · double | 否 | 现在的边缘化. |
promotionMarginality |
number · double | 否 | 晋升边缘化. |
currentMarkUp |
number · double | 否 | 现在的标记. |
promotionMarkUp |
number · double | 否 | 提升,提升. |
additionalDiscountForPromotionRub |
number · double | 否 | 更多的优惠. |
additionalDiscountForPromotionPercent |
number · double | 否 | 促销额外折扣. |
isDeleted |
boolean | 否 | 已被删除. |
organizationId |
integer · int64 | 否 | 组织身份证. |
clientId |
integer · int64 | 否 | 客户身份证. |
addMode |
string | 否 | 加入模式. |
ozonAverageExpenses |
number · double | 否 | 臭氧平均支出 |
isActive |
boolean | 否 | 现在还在行动. |
changeName |
string | 否 | 改变名字. |
changeDate |
string · date-time | 否 | 改变日期. |
productName |
string | 否 | 产品名称 |
id |
integer · int64 | 否 | Id. |
totalCount |
integer · int64 | 否 | 总计. |
serviceCard |
string | 否 | 服务卡. |
isNotFound |
boolean | 否 | 没有找到. |
isArchived |
boolean | 否 | 已被存档. |
productCommissions |
string | 否 | 产品委员会 |
currentGrossProfit |
number · double | 否 | 现货总利 |
plannedGrossProfit |
number · double | 否 | 预计的总利. |
curl --request POST 'https://api.selsup.ru/api/promotion/addProductsInPromotion?promotionId=1001&clientOrganizationId=1001' \
--header 'Authorization: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '[
"string"
]'
const response = await fetch('https://api.selsup.ru/api/promotion/addProductsInPromotion?promotionId=1001&clientOrganizationId=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/promotion/addProductsInPromotion?promotionId=1001&clientOrganizationId=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/promotion/addProductsInPromotion?promotionId=1001&clientOrganizationId=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/promotion/addProductsInPromotion?promotionId=1001&clientOrganizationId=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/promotion/addProductsInPromotion?promotionId=1001&clientOrganizationId=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/promotion/addProductsInPromotion?promotionId=1001&clientOrganizationId=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());
}
}
OzonProduct[]
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
product_id |
integer · int64 | 否 | 产品身份证 |
action_price |
number · double | 否 | 股价. |
stock |
integer · int32 | 否 | 股票. |
reason |
string | 否 | 原因. |
[
"string"
]应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_auto_promotion_not_supported应用逻辑中使用稳定的error_auto_promotion_not_supported代码;localMessage包含上述翻译.
error_empty_ozon_id应用逻辑中使用稳定的error_empty_ozon_id代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_organization_not_found应用逻辑中使用稳定的error_organization_not_found代码;localMessage包含上述翻译.
error_promotion_exists应用逻辑中使用稳定的error_promotion_exists代码;localMessage包含上述翻译.
error_remote应用逻辑中使用稳定的error_remote代码;localMessage包含上述翻译.
error_token_expired_or_revoked应用逻辑中使用稳定的error_token_expired_or_revoked代码;localMessage包含上述翻译.
error_wildberries_import_error应用逻辑中使用稳定的error_wildberries_import_error代码;localMessage包含上述翻译.
/api/promotion/使用 POST /api/promotion/. 的后期促销
application/jsonPromotion| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
promotionId |
integer · int64 | 否 | 提升身份证. |
id |
integer · int64 | 否 | Id. |
totalCount |
integer · int64 | 否 | 总计. |
name |
string | 否 | 姓名. |
dateStart |
string · date-time | 否 | 开始日期. |
dateEnd |
string · date-time | 否 | 约会结束. |
changeCommission |
boolean | 否 | 改变委员会. |
changeCommissionAmount |
number · double | 否 | 改变佣金金额 |
createdDate |
string · date-time | 否 | 创造日期. |
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 | 否 | 服务. |
isDeleted |
boolean | 否 | 已被删除. |
description |
string | 否 | 描述 |
promotionIdOnMp |
string | 否 | 优惠名单在MP上 |
clientId |
integer · int64 | 否 | 客户身份证. |
organizationId |
integer · int64 | 否 | 组织身份证. |
candidateCount |
integer · int64 | 否 | 候选人伯爵. |
inPromotionCount |
integer · int64 | 否 | 在晋升计数. |
auto |
boolean | 否 | 车辆. |
hotsale |
boolean | 否 | 鱼. |
candidateCountOnMp |
integer · int64 | 否 | 候选人数量在MP. |
inPromotionCountOnMp |
integer · int64 | 否 | 在促销部下 |
curl --request POST 'https://api.selsup.ru/api/promotion/' \
--header 'Authorization: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"promotionId": 1001,
"id": 1001,
"totalCount": 1,
"name": "Example",
"dateStart": "2026-01-15T12:00:00Z",
"dateEnd": "2026-01-15T12:00:00Z"
}'
const response = await fetch('https://api.selsup.ru/api/promotion/', {
method: 'POST',
headers: {
Authorization: process.env.SELSUP_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"promotionId": 1001,
"id": 1001,
"totalCount": 1,
"name": "Example",
"dateStart": "2026-01-15T12:00:00Z",
"dateEnd": "2026-01-15T12:00:00Z"
}),
});
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/promotion/', {
method: 'POST',
headers: {
Authorization: process.env.SELSUP_API_TOKEN!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"promotionId": 1001,
"id": 1001,
"totalCount": 1,
"name": "Example",
"dateStart": "2026-01-15T12:00:00Z",
"dateEnd": "2026-01-15T12:00:00Z"
}),
});
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/promotion/',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
json={
'promotionId': 1001,
'id': 1001,
'totalCount': 1,
'name': 'Example',
'dateStart': '2026-01-15T12:00:00Z',
'dateEnd': '2026-01-15T12:00:00Z'
},
)
response.raise_for_status()
result = response.json()
<?php
$payload = <<<'JSON'
{
"promotionId": 1001,
"id": 1001,
"totalCount": 1,
"name": "Example",
"dateStart": "2026-01-15T12:00:00Z",
"dateEnd": "2026-01-15T12:00:00Z"
}
JSON;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/promotion/',
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/promotion/", strings.NewReader(`{
"promotionId": 1001,
"id": 1001,
"totalCount": 1,
"name": "Example",
"dateStart": "2026-01-15T12:00:00Z",
"dateEnd": "2026-01-15T12:00:00Z"
}`))
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/promotion/"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"promotionId": 1001,
"id": 1001,
"totalCount": 1,
"name": "Example",
"dateStart": "2026-01-15T12:00:00Z",
"dateEnd": "2026-01-15T12:00:00Z"
}
"""))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
Promotion
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
promotionId |
integer · int64 | 否 | 提升身份证. |
id |
integer · int64 | 否 | Id. |
totalCount |
integer · int64 | 否 | 总计. |
name |
string | 否 | 姓名. |
dateStart |
string · date-time | 否 | 开始日期. |
dateEnd |
string · date-time | 否 | 约会结束. |
changeCommission |
boolean | 否 | 改变委员会. |
changeCommissionAmount |
number · double | 否 | 改变佣金金额 |
createdDate |
string · date-time | 否 | 创造日期. |
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 | 否 | 服务. |
isDeleted |
boolean | 否 | 已被删除. |
description |
string | 否 | 描述 |
promotionIdOnMp |
string | 否 | 优惠名单在MP上 |
clientId |
integer · int64 | 否 | 客户身份证. |
organizationId |
integer · int64 | 否 | 组织身份证. |
candidateCount |
integer · int64 | 否 | 候选人伯爵. |
inPromotionCount |
integer · int64 | 否 | 在晋升计数. |
auto |
boolean | 否 | 车辆. |
hotsale |
boolean | 否 | 鱼. |
candidateCountOnMp |
integer · int64 | 否 | 候选人数量在MP. |
inPromotionCountOnMp |
integer · int64 | 否 | 在促销部下 |
{
"promotionId": 1001,
"id": 1001,
"totalCount": 1,
"name": "Example",
"dateStart": "2026-01-15T12:00:00Z",
"dateEnd": "2026-01-15T12:00:00Z"
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
/api/promotion/{promotionId}/product/export使用GET/api/promotion/{promotionId}/product/export.的产品出口
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
promotionId |
integer · int64 | 是 | 提升身份证. |
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
dateFrom |
string · date-time | 否 | 时间从. |
dateTo |
string · date-time | 否 | 约会到. |
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 | 否 | 服务. |
reDownload |
boolean | 否 | 接下来. |
clientOrganizationId |
integer · int64 | 否 | 客户组织身份证. |
minMargin |
number · double | 否 | 没有任何限制. |
minMarginPercent |
number · double | 否 | 利率最低百分比. |
isActive |
boolean | 否 | 现在还在行动. |
isDeleted |
boolean | 否 | 已被删除. |
query |
string | 否 | 问问. |
promotionIdOnMp |
integer · int64 | 否 | 优惠名单在MP上 |
categoryId |
integer · int64 | 否 | 类别的ID. |
categoryIds |
integer[] | 否 | 类别的身份证. |
clientId |
integer · int64 | 否 | 客户身份证. |
inStock |
boolean | 否 | 在斯托克. |
isNotFound |
boolean | 否 | 没有找到. |
limit |
integer · int32 | 否 | 限制. |
page |
integer · int32 | 否 | 页面. |
count |
boolean | 否 | 伯爵. |
sortBy |
stringCATEGORYNAME, BRANDNAME, PRODUCTNAME, ARTICLE, BARCODE, SERVICEARTICLE, CURRENTPRICEWITHOUTDISCOUNT, CURRENTPRICE, PLANNEDPRICE, CURRENTDISCOUNT, NEWDISCOUNTFORPROMOTION, CURRENTPROFIT, PROMOTIONPROFIT, CURRENTMARGINALITY, PROMOTIONMARGINALITY, CURRENTMARKUP, PLANNEDMARKUPRATIO, OZONPRODUCTIDONMP, WILDBERRIESPRODUCTIDONMP, PURCHASEPERCENT, FBOSTOCK, FBSSTOCK, TURNOVER | 否 | 排序了. |
ascending |
boolean | 否 | 升高. |
curl --request GET 'https://api.selsup.ru/api/promotion/1001/product/export?limit=50&page=1' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/promotion/1001/product/export?limit=50&page=1', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN },
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/promotion/1001/product/export?limit=50&page=1', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN! },
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
const result: unknown = await response.json();
import os
import requests
response = requests.get(
'https://api.selsup.ru/api/promotion/1001/product/export?limit=50&page=1',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
)
response.raise_for_status()
result = response.json()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/promotion/1001/product/export?limit=50&page=1',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN')],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.selsup.ru/api/promotion/1001/product/export?limit=50&page=1", nil)
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/promotion/1001/product/export?limit=50&page=1"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
"string"应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_cant_download_file应用逻辑中使用稳定的error_cant_download_file代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_promotion_not_found应用逻辑中使用稳定的error_promotion_not_found代码;localMessage包含上述翻译.
error_service_not_found应用逻辑中使用稳定的error_service_not_found代码;localMessage包含上述翻译.
/api/promotion/product/find使用 GET 找到 /api/promotion/product/find.
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
dateFrom |
string · date-time | 否 | 时间从. |
dateTo |
string · date-time | 否 | 约会到. |
promotionId |
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 | 否 | 服务. |
reDownload |
boolean | 否 | 接下来. |
clientOrganizationId |
integer · int64 | 否 | 客户组织身份证. |
minMargin |
number · double | 否 | 没有任何限制. |
minMarginPercent |
number · double | 否 | 利率最低百分比. |
isActive |
boolean | 否 | 现在还在行动. |
isDeleted |
boolean | 否 | 已被删除. |
query |
string | 否 | 问问. |
promotionIdOnMp |
integer · int64 | 否 | 优惠名单在MP上 |
categoryId |
integer · int64 | 否 | 类别的ID. |
categoryIds |
integer[] | 否 | 类别的身份证. |
clientId |
integer · int64 | 否 | 客户身份证. |
inStock |
boolean | 否 | 在斯托克. |
isNotFound |
boolean | 否 | 没有找到. |
limit |
integer · int32 | 否 | 限制. |
page |
integer · int32 | 否 | 页面. |
count |
boolean | 否 | 伯爵. |
sortBy |
stringCATEGORYNAME, BRANDNAME, PRODUCTNAME, ARTICLE, BARCODE, SERVICEARTICLE, CURRENTPRICEWITHOUTDISCOUNT, CURRENTPRICE, PLANNEDPRICE, CURRENTDISCOUNT, NEWDISCOUNTFORPROMOTION, CURRENTPROFIT, PROMOTIONPROFIT, CURRENTMARGINALITY, PROMOTIONMARGINALITY, CURRENTMARKUP, PLANNEDMARKUPRATIO, OZONPRODUCTIDONMP, WILDBERRIESPRODUCTIDONMP, PURCHASEPERCENT, FBOSTOCK, FBSSTOCK, TURNOVER | 否 | 排序了. |
ascending |
boolean | 否 | 升高. |
curl --request GET 'https://api.selsup.ru/api/promotion/product/find?limit=50&page=1' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/promotion/product/find?limit=50&page=1', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN },
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/promotion/product/find?limit=50&page=1', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN! },
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
const result: unknown = await response.json();
import os
import requests
response = requests.get(
'https://api.selsup.ru/api/promotion/product/find?limit=50&page=1',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
)
response.raise_for_status()
result = response.json()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/promotion/product/find?limit=50&page=1',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN')],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.selsup.ru/api/promotion/product/find?limit=50&page=1", nil)
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/promotion/product/find?limit=50&page=1"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
FindResponseProductPromotion
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rows |
ProductPromotion[] | 否 | 排列. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
categoryName |
string | 否 | 类别名称 |
brandName |
string | 否 | 品牌名字. |
subject |
string | 否 | 问题. |
purchasePrice |
number · double | 否 | 买价. |
deliveryCost |
number · double | 否 | 交货成本 |
additionalCost |
number · double | 否 | 额外的成本 |
barcode |
string | 否 | 条码. |
instockQuantity |
integer · int64 | 否 | 存量量 |
wildberriesStockCount |
integer · int64 | 否 | 野生果股票数量. |
yandexMarketStockCount |
integer · int64 | 否 | 亚兰德克斯市场股票计数. |
createdDate |
string · date-time | 否 | 创造日期. |
minPrice |
number · double | 否 | 价格不到. |
isDuplicate |
boolean | 否 | 是复制. |
ozonArticle |
string | 否 | 臭氧条款 |
ozonStockCount |
integer · int64 | 否 | 子股票计数. |
salesExpensesOnMpPercent |
number · double | 否 | 销售费用在MP百分比上 |
taxeRate |
number · double | 否 | 税率. |
width |
integer · int32 | 否 | 宽度. |
height |
integer · int32 | 否 | 高. |
depth |
integer · int32 | 否 | 深度. |
ozonPurchasePercent |
number · double | 否 | 气购买率 |
warehouseRatio |
number · double | 否 | 仓库比例. |
wildberriesCommission |
number · double | 否 | 野生果委员会. |
wildberriesFbwCommission |
number · double | 否 | 野生果Fbw委员会. |
wildberriesFbsCommission |
number · double | 否 | 野生果联邦调查委员会. |
wildberriesDbsCommission |
number · double | 否 | 野生果食品委员会. |
wildberriesEdbsCommission |
number · double | 否 | 野生果养殖委员会. |
wildberriesCAndCCommission |
number · double | 否 | 果和果委员会. |
wildberriesBookingCommission |
number · double | 否 | 野生果预订委员会. |
wildberriesAdditionalExpenses |
number · double | 否 | 其他费用 |
ozonAdditionalExpenses |
number · double | 否 | 臭氧额外支出 |
ozonCommission |
number · double | 否 | 臭氧委员会 |
wildberriesId |
integer · int64 | 否 | 果的身份证. |
productId |
integer · int64 | 否 | 产品身份证 |
promotionId |
integer · int64 | 否 | 提升身份证. |
ozonFbsCommission |
number · double | 否 | 子联邦调查委员会. |
ozonFboCommission |
number · double | 否 | 子贸易委员会 |
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 | 否 | 服务. |
acquiringPercent |
number · double | 否 | 获得百分比. |
currentPrice |
number · double | 否 | 现在的价格. |
currentPriceWithoutDiscount |
number · double | 否 | 现货价格没有折扣. |
plannedPrice |
number · double | 否 | 计划的价格. |
totalStockCount |
integer · int64 | 否 | 总股票数量. |
commissionReduction |
number · double | 否 | 减少委员会. |
profitDifference |
number · double | 否 | 利差异 |
marginDifference |
number · double | 否 | 边缘差异 |
markupDifference |
number · double | 否 | 标记差异. |
plannedAndMinPriceDiff |
number · double | 否 | 计划和最低价格差异 |
incomeDifference |
number · double | 否 | 收入差异 |
currentDiscount |
number · double | 否 | 现在的折扣. |
productCreatedDate |
string · date-time | 否 | 产品创建日期 |
mainImageUrl |
string | 否 | 标签: 标题: |
isProfitably |
boolean | 否 | 利的. |
taskId |
integer · int64 | 否 | 任务身份证. |
serviceArticle |
string | 否 | 服务条款 |
article |
string | 否 | 关于此的文章. |
daysCountOnService |
integer · int32 | 否 | 服务时间是数日的. |
turnover |
integer · int32 | 否 | 转换时间. |
fboStock |
integer · int32 | 否 | 美国联邦调查局. |
fbsStock |
integer · int32 | 否 | 联邦调查局. |
newDiscountForPromotion |
number · double | 否 | 促销额度新折扣. |
saleLogistics |
number · double | 否 | 销售物流. |
returnLogistics |
number · double | 否 | 返回物流. |
purchasePercent |
number · double | 否 | 购买百分比. |
totalLogistics |
number · double | 否 | 总物流. |
commissions |
number · double | 否 | 佣金. |
currentProfit |
number · double | 否 | 现在的利. |
promotionProfit |
number · double | 否 | 提升利. |
currentMarginality |
number · double | 否 | 现在的边缘化. |
promotionMarginality |
number · double | 否 | 晋升边缘化. |
currentMarkUp |
number · double | 否 | 现在的标记. |
promotionMarkUp |
number · double | 否 | 提升,提升. |
additionalDiscountForPromotionRub |
number · double | 否 | 更多的优惠. |
additionalDiscountForPromotionPercent |
number · double | 否 | 促销额外折扣. |
isDeleted |
boolean | 否 | 已被删除. |
organizationId |
integer · int64 | 否 | 组织身份证. |
clientId |
integer · int64 | 否 | 客户身份证. |
addMode |
string | 否 | 加入模式. |
ozonAverageExpenses |
number · double | 否 | 臭氧平均支出 |
isActive |
boolean | 否 | 现在还在行动. |
changeName |
string | 否 | 改变名字. |
changeDate |
string · date-time | 否 | 改变日期. |
productName |
string | 否 | 产品名称 |
id |
integer · int64 | 否 | Id. |
totalCount |
integer · int64 | 否 | 总计. |
serviceCard |
string | 否 | 服务卡. |
isNotFound |
boolean | 否 | 没有找到. |
isArchived |
boolean | 否 | 已被存档. |
productCommissions |
string | 否 | 产品委员会 |
currentGrossProfit |
number · double | 否 | 现货总利 |
plannedGrossProfit |
number · double | 否 | 预计的总利. |
{
"rows": "string"
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
/api/promotion/find所有使用 GET /api/promotion/find.
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
dateFrom |
string · date-time | 否 | 时间从. |
dateTo |
string · date-time | 否 | 约会到. |
promotionId |
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 | 否 | 服务. |
reDownload |
boolean | 否 | 接下来. |
clientOrganizationId |
integer · int64 | 否 | 客户组织身份证. |
minMargin |
number · double | 否 | 没有任何限制. |
minMarginPercent |
number · double | 否 | 利率最低百分比. |
isActive |
boolean | 否 | 现在还在行动. |
isDeleted |
boolean | 否 | 已被删除. |
query |
string | 否 | 问问. |
promotionIdOnMp |
integer · int64 | 否 | 优惠名单在MP上 |
categoryId |
integer · int64 | 否 | 类别的ID. |
categoryIds |
integer[] | 否 | 类别的身份证. |
clientId |
integer · int64 | 否 | 客户身份证. |
inStock |
boolean | 否 | 在斯托克. |
isNotFound |
boolean | 否 | 没有找到. |
limit |
integer · int32 | 否 | 限制. |
page |
integer · int32 | 否 | 页面. |
count |
boolean | 否 | 伯爵. |
sortBy |
stringCATEGORYNAME, BRANDNAME, PRODUCTNAME, ARTICLE, BARCODE, SERVICEARTICLE, CURRENTPRICEWITHOUTDISCOUNT, CURRENTPRICE, PLANNEDPRICE, CURRENTDISCOUNT, NEWDISCOUNTFORPROMOTION, CURRENTPROFIT, PROMOTIONPROFIT, CURRENTMARGINALITY, PROMOTIONMARGINALITY, CURRENTMARKUP, PLANNEDMARKUPRATIO, OZONPRODUCTIDONMP, WILDBERRIESPRODUCTIDONMP, PURCHASEPERCENT, FBOSTOCK, FBSSTOCK, TURNOVER | 否 | 排序了. |
ascending |
boolean | 否 | 升高. |
curl --request GET 'https://api.selsup.ru/api/promotion/find?limit=50&page=1' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/promotion/find?limit=50&page=1', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN },
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/promotion/find?limit=50&page=1', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN! },
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
const result: unknown = await response.json();
import os
import requests
response = requests.get(
'https://api.selsup.ru/api/promotion/find?limit=50&page=1',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
)
response.raise_for_status()
result = response.json()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/promotion/find?limit=50&page=1',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN')],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.selsup.ru/api/promotion/find?limit=50&page=1", nil)
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/promotion/find?limit=50&page=1"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
FindResponsePromotion
| 字段 | 类型 | 必填 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rows |
Promotion[] | 否 | 排列. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
阵列项结构
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
promotionId |
integer · int64 | 否 | 提升身份证. |
id |
integer · int64 | 否 | Id. |
totalCount |
integer · int64 | 否 | 总计. |
name |
string | 否 | 姓名. |
dateStart |
string · date-time | 否 | 开始日期. |
dateEnd |
string · date-time | 否 | 约会结束. |
changeCommission |
boolean | 否 | 改变委员会. |
changeCommissionAmount |
number · double | 否 | 改变佣金金额 |
createdDate |
string · date-time | 否 | 创造日期. |
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 | 否 | 服务. |
isDeleted |
boolean | 否 | 已被删除. |
description |
string | 否 | 描述 |
promotionIdOnMp |
string | 否 | 优惠名单在MP上 |
clientId |
integer · int64 | 否 | 客户身份证. |
organizationId |
integer · int64 | 否 | 组织身份证. |
candidateCount |
integer · int64 | 否 | 候选人伯爵. |
inPromotionCount |
integer · int64 | 否 | 在晋升计数. |
auto |
boolean | 否 | 车辆. |
hotsale |
boolean | 否 | 鱼. |
candidateCountOnMp |
integer · int64 | 否 | 候选人数量在MP. |
inPromotionCountOnMp |
integer · int64 | 否 | 在促销部下 |
{
"rows": "string"
}应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_service_not_found应用逻辑中使用稳定的error_service_not_found代码;localMessage包含上述翻译.
/api/promotion/export使用GET/api/promotion/export.出口
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
dateFrom |
string · date-time | 否 | 时间从. |
dateTo |
string · date-time | 否 | 约会到. |
promotionId |
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 | 否 | 服务. |
reDownload |
boolean | 否 | 接下来. |
clientOrganizationId |
integer · int64 | 否 | 客户组织身份证. |
minMargin |
number · double | 否 | 没有任何限制. |
minMarginPercent |
number · double | 否 | 利率最低百分比. |
isActive |
boolean | 否 | 现在还在行动. |
isDeleted |
boolean | 否 | 已被删除. |
query |
string | 否 | 问问. |
promotionIdOnMp |
integer · int64 | 否 | 优惠名单在MP上 |
categoryId |
integer · int64 | 否 | 类别的ID. |
categoryIds |
integer[] | 否 | 类别的身份证. |
clientId |
integer · int64 | 否 | 客户身份证. |
inStock |
boolean | 否 | 在斯托克. |
isNotFound |
boolean | 否 | 没有找到. |
limit |
integer · int32 | 否 | 限制. |
page |
integer · int32 | 否 | 页面. |
count |
boolean | 否 | 伯爵. |
sortBy |
stringCATEGORYNAME, BRANDNAME, PRODUCTNAME, ARTICLE, BARCODE, SERVICEARTICLE, CURRENTPRICEWITHOUTDISCOUNT, CURRENTPRICE, PLANNEDPRICE, CURRENTDISCOUNT, NEWDISCOUNTFORPROMOTION, CURRENTPROFIT, PROMOTIONPROFIT, CURRENTMARGINALITY, PROMOTIONMARGINALITY, CURRENTMARKUP, PLANNEDMARKUPRATIO, OZONPRODUCTIDONMP, WILDBERRIESPRODUCTIDONMP, PURCHASEPERCENT, FBOSTOCK, FBSSTOCK, TURNOVER | 否 | 排序了. |
ascending |
boolean | 否 | 升高. |
curl --request GET 'https://api.selsup.ru/api/promotion/export?limit=50&page=1' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/promotion/export?limit=50&page=1', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN },
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'selsup_request_failed');
}
const result = await response.json();
const response: Response = await fetch('https://api.selsup.ru/api/promotion/export?limit=50&page=1', {
method: 'GET',
headers: { Authorization: process.env.SELSUP_API_TOKEN! },
});
if (!response.ok) {
const error = await response.json() as { error?: string };
throw new Error(error.error ?? 'selsup_request_failed');
}
const result: unknown = await response.json();
import os
import requests
response = requests.get(
'https://api.selsup.ru/api/promotion/export?limit=50&page=1',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
)
response.raise_for_status()
result = response.json()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/promotion/export?limit=50&page=1',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: ' . getenv('SELSUP_API_TOKEN')],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($response === false || $status >= 400) {
throw new RuntimeException($response ?: 'selsup_request_failed');
}
echo $response;
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.selsup.ru/api/promotion/export?limit=50&page=1", nil)
if err != nil { panic(err) }
req.Header.Set("Authorization", os.Getenv("SELSUP_API_TOKEN"))
response, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer response.Body.Close()
result, _ := io.ReadAll(response.Body)
fmt.Printf("%d\n%s\n", response.StatusCode, result)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SelSupExample {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.selsup.ru/api/promotion/export?limit=50&page=1"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
"string"应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_cant_download_file应用逻辑中使用稳定的error_cant_download_file代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_service_not_found应用逻辑中使用稳定的error_service_not_found代码;localMessage包含上述翻译.