通过可编辑的独立合同来支持本页面. 在生产使用之前,验证使用测试数据的写作操作.
/api/competitor
准备使用的工作流程
准备使用的工作流程
数据模型
数据结构
模型在此列出一次,并且可以直接从使用它们的终端点扩展.
Competitor10 字段
idinteger · int64Id.
read-onlymodelIdinteger · int64模型身份证.
productIdinteger · int64产品身份证
servicestring服务.
必填urlstring查看一个URL.
必填serviceIdstring服务身份证.
clientIdinteger · int64客户身份证.
read-onlylatestPricenumber · double最新价格.
read-onlycurrencystring货币.
read-onlylatestPriceDatestring · date-time最新价格日期.
read-onlyCompetitorPrice6 字段
idinteger · int64Id.
read-onlycompetitorIdinteger · int64竞争对手的身份.
必填clientIdinteger · int64客户身份证.
read-onlypricenumber · double价格.
必填currencystring货币.
datestring · date-time约会.
CompetitorImportResult2 字段
importedinteger · int32进口.
skippedinteger · int32跳过了.
错误合同
如何返回应用错误
编程的代码在每个地方都相同,而用户面向的消息由服务器翻译. 建立在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/competitor/{competitorId}使用 PUT 更新
路径参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
competitorId |
integer · int64 | 是 | 竞争对手的身份. |
要求机构
application/json对象场Competitor
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
modelId |
integer · int64 | 否 | 模型身份证. |
productId |
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, TEKSHER, KONTUR_LOGISTICS, KONTUR_EDI, VSE_INSTRUMENTI, ELECTRONIC_SIGN | 是 | 服务. |
url |
string | 是 | 查看一个URL. |
serviceId |
string | 否 | 服务身份证. |
clientId |
integer · int64 | 否 | 客户身份证. |
latestPrice |
number · double | 否 | 最新价格. |
currency |
stringRUB, USD, EUR, AUD, AZN, GBP, AMD, BYN, BGN, BRL, HUF, VND, HKD, GEL, DKK, AED, EGP, INR, IDR, KZT, CAD, QAR, KGS, CNY, MDL, NZD, NOK, PLN, RON, XDR, SGD, TJS, THB, TRY, TMT, UZS, UAH, CZK, SEK, CHF, RSD, ZAR, KRW, JPY | 否 | 货币. |
latestPriceDate |
string · date-time | 否 | 最新价格日期. |
curl --request PUT 'https://api.selsup.ru/api/competitor/1001' \
--header 'Authorization: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"service": "NONE",
"url": "https://example.com",
"id": 1001,
"modelId": 1001,
"productId": 1001,
"serviceId": "string"
}'
const response = await fetch('https://api.selsup.ru/api/competitor/1001', {
method: 'PUT',
headers: {
Authorization: process.env.SELSUP_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"service": "NONE",
"url": "https://example.com",
"id": 1001,
"modelId": 1001,
"productId": 1001,
"serviceId": "string"
}),
});
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/competitor/1001', {
method: 'PUT',
headers: {
Authorization: process.env.SELSUP_API_TOKEN!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"service": "NONE",
"url": "https://example.com",
"id": 1001,
"modelId": 1001,
"productId": 1001,
"serviceId": "string"
}),
});
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.put(
'https://api.selsup.ru/api/competitor/1001',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
json={
'service': 'NONE',
'url': 'https://example.com',
'id': 1001,
'modelId': 1001,
'productId': 1001,
'serviceId': 'string'
},
)
response.raise_for_status()
<?php
$payload = <<<'JSON'
{
"service": "NONE",
"url": "https://example.com",
"id": 1001,
"modelId": 1001,
"productId": 1001,
"serviceId": "string"
}
JSON;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/competitor/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/competitor/1001", strings.NewReader(`{
"service": "NONE",
"url": "https://example.com",
"id": 1001,
"modelId": 1001,
"productId": 1001,
"serviceId": "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/competitor/1001"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.header("Content-Type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("""
{
"service": "NONE",
"url": "https://example.com",
"id": 1001,
"modelId": 1001,
"productId": 1001,
"serviceId": "string"
}
"""))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
成功的反应
200答案没有身体.
错误10
应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_cant_extract_tariffs应用逻辑中使用稳定的error_cant_extract_tariffs代码;localMessage包含上述翻译.
error_competitor_id_required应用逻辑中使用稳定的error_competitor_id_required代码;localMessage包含上述翻译.
error_competitor_not_found应用逻辑中使用稳定的error_competitor_not_found代码;localMessage包含上述翻译.
error_competitor_required应用逻辑中使用稳定的error_competitor_required代码;localMessage包含上述翻译.
error_competitor_url_required应用逻辑中使用稳定的error_competitor_url_required代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_service_not_supported应用逻辑中使用稳定的error_service_not_supported代码;localMessage包含上述翻译.
删除
/api/competitor/{competitorId}使用 DELETE /api/competitor/{competitorId}.删除
路径参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
competitorId |
integer · int64 | 是 | 竞争对手的身份. |
curl --request DELETE 'https://api.selsup.ru/api/competitor/1001' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/competitor/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/competitor/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/competitor/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/competitor/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/competitor/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/competitor/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());
}
}
成功的反应
200答案没有身体.
错误7
应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_cant_extract_tariffs应用逻辑中使用稳定的error_cant_extract_tariffs代码;localMessage包含上述翻译.
error_competitor_id_required应用逻辑中使用稳定的error_competitor_id_required代码;localMessage包含上述翻译.
error_competitor_not_found应用逻辑中使用稳定的error_competitor_not_found代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
拿起所有
/api/competitor/{modelId}使用GETX/api/competitor/{modelId}.获取所有内容
路径参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
modelId |
integer · int64 | 是 | 模型身份证. |
curl --request GET 'https://api.selsup.ru/api/competitor/1001' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/competitor/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/competitor/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/competitor/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/competitor/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/competitor/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/competitor/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());
}
}
成功的反应
200
阵列项结构
Competitor[]
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
modelId |
integer · int64 | 否 | 模型身份证. |
productId |
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, TEKSHER, KONTUR_LOGISTICS, KONTUR_EDI, VSE_INSTRUMENTI, ELECTRONIC_SIGN | 是 | 服务. |
url |
string | 是 | 查看一个URL. |
serviceId |
string | 否 | 服务身份证. |
clientId |
integer · int64 | 否 | 客户身份证. |
latestPrice |
number · double | 否 | 最新价格. |
currency |
stringRUB, USD, EUR, AUD, AZN, GBP, AMD, BYN, BGN, BRL, HUF, VND, HKD, GEL, DKK, AED, EGP, INR, IDR, KZT, CAD, QAR, KGS, CNY, MDL, NZD, NOK, PLN, RON, XDR, SGD, TJS, THB, TRY, TMT, UZS, UAH, CZK, SEK, CHF, RSD, ZAR, KRW, JPY | 否 | 货币. |
latestPriceDate |
string · date-time | 否 | 最新价格日期. |
[
"string"
]错误6
应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_cant_extract_tariffs应用逻辑中使用稳定的error_cant_extract_tariffs代码;localMessage包含上述翻译.
error_model_id_required应用逻辑中使用稳定的error_model_id_required代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
创建
/api/competitor/{modelId}使用 POST 创建 /api/competitor/{modelId}.
路径参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
modelId |
integer · int64 | 是 | 模型身份证. |
要求机构
application/json对象场Competitor
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
modelId |
integer · int64 | 否 | 模型身份证. |
productId |
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, TEKSHER, KONTUR_LOGISTICS, KONTUR_EDI, VSE_INSTRUMENTI, ELECTRONIC_SIGN | 是 | 服务. |
url |
string | 是 | 查看一个URL. |
serviceId |
string | 否 | 服务身份证. |
clientId |
integer · int64 | 否 | 客户身份证. |
latestPrice |
number · double | 否 | 最新价格. |
currency |
stringRUB, USD, EUR, AUD, AZN, GBP, AMD, BYN, BGN, BRL, HUF, VND, HKD, GEL, DKK, AED, EGP, INR, IDR, KZT, CAD, QAR, KGS, CNY, MDL, NZD, NOK, PLN, RON, XDR, SGD, TJS, THB, TRY, TMT, UZS, UAH, CZK, SEK, CHF, RSD, ZAR, KRW, JPY | 否 | 货币. |
latestPriceDate |
string · date-time | 否 | 最新价格日期. |
curl --request POST 'https://api.selsup.ru/api/competitor/1001' \
--header 'Authorization: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"service": "NONE",
"url": "https://example.com",
"id": 1001,
"modelId": 1001,
"productId": 1001,
"serviceId": "string"
}'
const response = await fetch('https://api.selsup.ru/api/competitor/1001', {
method: 'POST',
headers: {
Authorization: process.env.SELSUP_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"service": "NONE",
"url": "https://example.com",
"id": 1001,
"modelId": 1001,
"productId": 1001,
"serviceId": "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/competitor/1001', {
method: 'POST',
headers: {
Authorization: process.env.SELSUP_API_TOKEN!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"service": "NONE",
"url": "https://example.com",
"id": 1001,
"modelId": 1001,
"productId": 1001,
"serviceId": "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/competitor/1001',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
json={
'service': 'NONE',
'url': 'https://example.com',
'id': 1001,
'modelId': 1001,
'productId': 1001,
'serviceId': 'string'
},
)
response.raise_for_status()
result = response.json()
<?php
$payload = <<<'JSON'
{
"service": "NONE",
"url": "https://example.com",
"id": 1001,
"modelId": 1001,
"productId": 1001,
"serviceId": "string"
}
JSON;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/competitor/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/competitor/1001", strings.NewReader(`{
"service": "NONE",
"url": "https://example.com",
"id": 1001,
"modelId": 1001,
"productId": 1001,
"serviceId": "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/competitor/1001"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"service": "NONE",
"url": "https://example.com",
"id": 1001,
"modelId": 1001,
"productId": 1001,
"serviceId": "string"
}
"""))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
成功的反应
200
对象场
Competitor
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
modelId |
integer · int64 | 否 | 模型身份证. |
productId |
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, TEKSHER, KONTUR_LOGISTICS, KONTUR_EDI, VSE_INSTRUMENTI, ELECTRONIC_SIGN | 是 | 服务. |
url |
string | 是 | 查看一个URL. |
serviceId |
string | 否 | 服务身份证. |
clientId |
integer · int64 | 否 | 客户身份证. |
latestPrice |
number · double | 否 | 最新价格. |
currency |
stringRUB, USD, EUR, AUD, AZN, GBP, AMD, BYN, BGN, BRL, HUF, VND, HKD, GEL, DKK, AED, EGP, INR, IDR, KZT, CAD, QAR, KGS, CNY, MDL, NZD, NOK, PLN, RON, XDR, SGD, TJS, THB, TRY, TMT, UZS, UAH, CZK, SEK, CHF, RSD, ZAR, KRW, JPY | 否 | 货币. |
latestPriceDate |
string · date-time | 否 | 最新价格日期. |
{
"service": "NONE",
"url": "https://example.com",
"id": 1001,
"modelId": 1001,
"productId": 1001,
"serviceId": "string"
}错误8
应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_cant_extract_tariffs应用逻辑中使用稳定的error_cant_extract_tariffs代码;localMessage包含上述翻译.
error_competitor_required应用逻辑中使用稳定的error_competitor_required代码;localMessage包含上述翻译.
error_competitor_url_required应用逻辑中使用稳定的error_competitor_url_required代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_service_not_supported应用逻辑中使用稳定的error_service_not_supported代码;localMessage包含上述翻译.
按产品排名
/api/competitor/product/{productId}使用 GET /api/competitor/product/{productId}. 获取产品
路径参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
productId |
integer · int64 | 是 | 产品身份证 |
curl --request GET 'https://api.selsup.ru/api/competitor/product/1001' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/competitor/product/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/competitor/product/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/competitor/product/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/competitor/product/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/competitor/product/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/competitor/product/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());
}
}
成功的反应
200
阵列项结构
Competitor[]
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
modelId |
integer · int64 | 否 | 模型身份证. |
productId |
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, TEKSHER, KONTUR_LOGISTICS, KONTUR_EDI, VSE_INSTRUMENTI, ELECTRONIC_SIGN | 是 | 服务. |
url |
string | 是 | 查看一个URL. |
serviceId |
string | 否 | 服务身份证. |
clientId |
integer · int64 | 否 | 客户身份证. |
latestPrice |
number · double | 否 | 最新价格. |
currency |
stringRUB, USD, EUR, AUD, AZN, GBP, AMD, BYN, BGN, BRL, HUF, VND, HKD, GEL, DKK, AED, EGP, INR, IDR, KZT, CAD, QAR, KGS, CNY, MDL, NZD, NOK, PLN, RON, XDR, SGD, TJS, THB, TRY, TMT, UZS, UAH, CZK, SEK, CHF, RSD, ZAR, KRW, JPY | 否 | 货币. |
latestPriceDate |
string · date-time | 否 | 最新价格日期. |
[
"string"
]错误6
应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_cant_extract_tariffs应用逻辑中使用稳定的error_cant_extract_tariffs代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_product_not_found应用逻辑中使用稳定的error_product_not_found代码;localMessage包含上述翻译.
创建产品
/api/competitor/product/{productId}使用 POST /api/competitor/product/{productId}. 创建产品
路径参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
productId |
integer · int64 | 是 | 产品身份证 |
要求机构
application/json对象场Competitor
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
modelId |
integer · int64 | 否 | 模型身份证. |
productId |
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, TEKSHER, KONTUR_LOGISTICS, KONTUR_EDI, VSE_INSTRUMENTI, ELECTRONIC_SIGN | 是 | 服务. |
url |
string | 是 | 查看一个URL. |
serviceId |
string | 否 | 服务身份证. |
clientId |
integer · int64 | 否 | 客户身份证. |
latestPrice |
number · double | 否 | 最新价格. |
currency |
stringRUB, USD, EUR, AUD, AZN, GBP, AMD, BYN, BGN, BRL, HUF, VND, HKD, GEL, DKK, AED, EGP, INR, IDR, KZT, CAD, QAR, KGS, CNY, MDL, NZD, NOK, PLN, RON, XDR, SGD, TJS, THB, TRY, TMT, UZS, UAH, CZK, SEK, CHF, RSD, ZAR, KRW, JPY | 否 | 货币. |
latestPriceDate |
string · date-time | 否 | 最新价格日期. |
curl --request POST 'https://api.selsup.ru/api/competitor/product/1001' \
--header 'Authorization: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"service": "NONE",
"url": "https://example.com",
"id": 1001,
"modelId": 1001,
"productId": 1001,
"serviceId": "string"
}'
const response = await fetch('https://api.selsup.ru/api/competitor/product/1001', {
method: 'POST',
headers: {
Authorization: process.env.SELSUP_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"service": "NONE",
"url": "https://example.com",
"id": 1001,
"modelId": 1001,
"productId": 1001,
"serviceId": "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/competitor/product/1001', {
method: 'POST',
headers: {
Authorization: process.env.SELSUP_API_TOKEN!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"service": "NONE",
"url": "https://example.com",
"id": 1001,
"modelId": 1001,
"productId": 1001,
"serviceId": "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/competitor/product/1001',
headers={'Authorization': os.environ['SELSUP_API_TOKEN']},
json={
'service': 'NONE',
'url': 'https://example.com',
'id': 1001,
'modelId': 1001,
'productId': 1001,
'serviceId': 'string'
},
)
response.raise_for_status()
result = response.json()
<?php
$payload = <<<'JSON'
{
"service": "NONE",
"url": "https://example.com",
"id": 1001,
"modelId": 1001,
"productId": 1001,
"serviceId": "string"
}
JSON;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.selsup.ru/api/competitor/product/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/competitor/product/1001", strings.NewReader(`{
"service": "NONE",
"url": "https://example.com",
"id": 1001,
"modelId": 1001,
"productId": 1001,
"serviceId": "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/competitor/product/1001"))
.header("Authorization", System.getenv("SELSUP_API_TOKEN"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"service": "NONE",
"url": "https://example.com",
"id": 1001,
"modelId": 1001,
"productId": 1001,
"serviceId": "string"
}
"""))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
成功的反应
200
对象场
Competitor
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
modelId |
integer · int64 | 否 | 模型身份证. |
productId |
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, TEKSHER, KONTUR_LOGISTICS, KONTUR_EDI, VSE_INSTRUMENTI, ELECTRONIC_SIGN | 是 | 服务. |
url |
string | 是 | 查看一个URL. |
serviceId |
string | 否 | 服务身份证. |
clientId |
integer · int64 | 否 | 客户身份证. |
latestPrice |
number · double | 否 | 最新价格. |
currency |
stringRUB, USD, EUR, AUD, AZN, GBP, AMD, BYN, BGN, BRL, HUF, VND, HKD, GEL, DKK, AED, EGP, INR, IDR, KZT, CAD, QAR, KGS, CNY, MDL, NZD, NOK, PLN, RON, XDR, SGD, TJS, THB, TRY, TMT, UZS, UAH, CZK, SEK, CHF, RSD, ZAR, KRW, JPY | 否 | 货币. |
latestPriceDate |
string · date-time | 否 | 最新价格日期. |
{
"service": "NONE",
"url": "https://example.com",
"id": 1001,
"modelId": 1001,
"productId": 1001,
"serviceId": "string"
}错误9
应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_cant_extract_tariffs应用逻辑中使用稳定的error_cant_extract_tariffs代码;localMessage包含上述翻译.
error_competitor_required应用逻辑中使用稳定的error_competitor_required代码;localMessage包含上述翻译.
error_competitor_url_required应用逻辑中使用稳定的error_competitor_url_required代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
error_product_not_found应用逻辑中使用稳定的error_product_not_found代码;localMessage包含上述翻译.
error_service_not_supported应用逻辑中使用稳定的error_service_not_supported代码;localMessage包含上述翻译.
创造价格
/api/competitor/price/batch使用 POST 创建价格
要求机构
application/json阵列项结构CompetitorPrice[]
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
competitorId |
integer · int64 | 是 | 竞争对手的身份. |
clientId |
integer · int64 | 否 | 客户身份证. |
price |
number · double | 是 | 价格. |
currency |
stringRUB, USD, EUR, AUD, AZN, GBP, AMD, BYN, BGN, BRL, HUF, VND, HKD, GEL, DKK, AED, EGP, INR, IDR, KZT, CAD, QAR, KGS, CNY, MDL, NZD, NOK, PLN, RON, XDR, SGD, TJS, THB, TRY, TMT, UZS, UAH, CZK, SEK, CHF, RSD, ZAR, KRW, JPY | 否 | 货币. |
date |
string · date-time | 否 | 约会. |
curl --request POST 'https://api.selsup.ru/api/competitor/price/batch' \
--header 'Authorization: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '[
"string"
]'
const response = await fetch('https://api.selsup.ru/api/competitor/price/batch', {
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/competitor/price/batch', {
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/competitor/price/batch',
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/competitor/price/batch',
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/competitor/price/batch", 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/competitor/price/batch"))
.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());
}
}
成功的反应
2001错误9
应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_cant_extract_tariffs应用逻辑中使用稳定的error_cant_extract_tariffs代码;localMessage包含上述翻译.
error_competitor_id_required应用逻辑中使用稳定的error_competitor_id_required代码;localMessage包含上述翻译.
error_competitor_not_found应用逻辑中使用稳定的error_competitor_not_found代码;localMessage包含上述翻译.
error_competitor_price_required应用逻辑中使用稳定的error_competitor_price_required代码;localMessage包含上述翻译.
error_competitor_prices_required应用逻辑中使用稳定的error_competitor_prices_required代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
进口竞争对手
/api/competitor/import通过POST/api/competitor/import.进口竞争对手
要求机构
multipart/form-data| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
file |
string · binary | 是 | 文件. |
curl --request POST 'https://api.selsup.ru/api/competitor/import' \
--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/competitor/import', {
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/competitor/import', {
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/competitor/import',
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/competitor/import',
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/competitor/import", &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/competitor/import"))
.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());
}
}
成功的反应
200
对象场
CompetitorImportResult
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
imported |
integer · int32 | 否 | 进口. |
skipped |
integer · int32 | 否 | 跳过了. |
{
"imported": 1,
"skipped": 1
}错误23
应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_base_creating应用逻辑中使用稳定的error_base_creating代码;localMessage包含上述翻译.
error_cabinet_access_denied应用逻辑中使用稳定的error_cabinet_access_denied代码;localMessage包含上述翻译.
error_cant_extract_tariffs应用逻辑中使用稳定的error_cant_extract_tariffs代码;localMessage包含上述翻译.
error_competitor_required应用逻辑中使用稳定的error_competitor_required代码;localMessage包含上述翻译.
error_competitor_url_required应用逻辑中使用稳定的error_competitor_url_required代码;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_fulfillment_client_access_denied应用逻辑中使用稳定的error_fulfillment_client_access_denied代码;localMessage包含上述翻译.
error_fulfillment_client_contract_required应用逻辑中使用稳定的error_fulfillment_client_contract_required代码;localMessage包含上述翻译.
error_incorrect_excel应用逻辑中使用稳定的error_incorrect_excel代码;localMessage包含上述翻译.
error_max_page应用逻辑中使用稳定的error_max_page代码;localMessage包含上述翻译.
error_max_upload_size_exceeded应用逻辑中使用稳定的error_max_upload_size_exceeded代码;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_products_not_found应用逻辑中使用稳定的error_products_not_found代码;localMessage包含上述翻译.
error_reload应用逻辑中使用稳定的error_reload代码;localMessage包含上述翻译.
error_service_not_supported应用逻辑中使用稳定的error_service_not_supported代码;localMessage包含上述翻译.
error_wrong_inn应用逻辑中使用稳定的error_wrong_inn代码;localMessage包含上述翻译.
获取价格
/api/competitor/{competitorId}/price使用 GET /api/competitor/{competitorId}/price.获取价格
路径参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
competitorId |
integer · int64 | 是 | 竞争对手的身份. |
查询参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
dateFrom |
string · date-time | 否 | 时间从. |
dateTo |
string · date-time | 否 | 约会到. |
curl --request GET 'https://api.selsup.ru/api/competitor/1001/price' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/competitor/1001/price', {
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/competitor/1001/price', {
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/competitor/1001/price',
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/competitor/1001/price',
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/competitor/1001/price", 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/competitor/1001/price"))
.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());
}
}
成功的反应
200
阵列项结构
CompetitorPrice[]
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
competitorId |
integer · int64 | 是 | 竞争对手的身份. |
clientId |
integer · int64 | 否 | 客户身份证. |
price |
number · double | 是 | 价格. |
currency |
stringRUB, USD, EUR, AUD, AZN, GBP, AMD, BYN, BGN, BRL, HUF, VND, HKD, GEL, DKK, AED, EGP, INR, IDR, KZT, CAD, QAR, KGS, CNY, MDL, NZD, NOK, PLN, RON, XDR, SGD, TJS, THB, TRY, TMT, UZS, UAH, CZK, SEK, CHF, RSD, ZAR, KRW, JPY | 否 | 货币. |
date |
string · date-time | 否 | 约会. |
[
"string"
]错误3
应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
获取模板
/api/competitor/template使用 GET /api/competitor/template.获取模板
查询参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
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, TEKSHER, KONTUR_LOGISTICS, KONTUR_EDI, VSE_INSTRUMENTI, ELECTRONIC_SIGN | 否 | 服务. |
curl --request GET 'https://api.selsup.ru/api/competitor/template' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/competitor/template', {
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/competitor/template', {
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/competitor/template',
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/competitor/template',
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/competitor/template", 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/competitor/template"))
.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());
}
}
成功的反应
200"string"错误3
应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
收藏
/api/competitor/collection使用GET/api/competitor/collection.获取收藏
curl --request GET 'https://api.selsup.ru/api/competitor/collection' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/competitor/collection', {
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/competitor/collection', {
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/competitor/collection',
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/competitor/collection',
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/competitor/collection", 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/competitor/collection"))
.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());
}
}
成功的反应
200
阵列项结构
Competitor[]
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
modelId |
integer · int64 | 否 | 模型身份证. |
productId |
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, TEKSHER, KONTUR_LOGISTICS, KONTUR_EDI, VSE_INSTRUMENTI, ELECTRONIC_SIGN | 是 | 服务. |
url |
string | 是 | 查看一个URL. |
serviceId |
string | 否 | 服务身份证. |
clientId |
integer · int64 | 否 | 客户身份证. |
latestPrice |
number · double | 否 | 最新价格. |
currency |
stringRUB, USD, EUR, AUD, AZN, GBP, AMD, BYN, BGN, BRL, HUF, VND, HKD, GEL, DKK, AED, EGP, INR, IDR, KZT, CAD, QAR, KGS, CNY, MDL, NZD, NOK, PLN, RON, XDR, SGD, TJS, THB, TRY, TMT, UZS, UAH, CZK, SEK, CHF, RSD, ZAR, KRW, JPY | 否 | 货币. |
latestPriceDate |
string · date-time | 否 | 最新价格日期. |
[
"string"
]错误5
应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.
error_cant_extract_tariffs应用逻辑中使用稳定的error_cant_extract_tariffs代码;localMessage包含上述翻译.
error_no_client应用逻辑中使用稳定的error_no_client代码;localMessage包含上述翻译.
拿到所有1
/api/competitor/使用GET/api/competitor/.获取所有1
curl --request GET 'https://api.selsup.ru/api/competitor/' \
--header 'Authorization: YOUR_API_TOKEN'
const response = await fetch('https://api.selsup.ru/api/competitor/', {
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/competitor/', {
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/competitor/',
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/competitor/',
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/competitor/", 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/competitor/"))
.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());
}
}
成功的反应
200
阵列项结构
Competitor[]
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id |
integer · int64 | 否 | Id. |
modelId |
integer · int64 | 否 | 模型身份证. |
productId |
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, TEKSHER, KONTUR_LOGISTICS, KONTUR_EDI, VSE_INSTRUMENTI, ELECTRONIC_SIGN | 是 | 服务. |
url |
string | 是 | 查看一个URL. |
serviceId |
string | 否 | 服务身份证. |
clientId |
integer · int64 | 否 | 客户身份证. |
latestPrice |
number · double | 否 | 最新价格. |
currency |
stringRUB, USD, EUR, AUD, AZN, GBP, AMD, BYN, BGN, BRL, HUF, VND, HKD, GEL, DKK, AED, EGP, INR, IDR, KZT, CAD, QAR, KGS, CNY, MDL, NZD, NOK, PLN, RON, XDR, SGD, TJS, THB, TRY, TMT, UZS, UAH, CZK, SEK, CHF, RSD, ZAR, KRW, JPY | 否 | 货币. |
latestPriceDate |
string · date-time | 否 | 最新价格日期. |
[
"string"
]错误3
应用错误通常以 JSON, error,localMessage和 params为回归. 如何返回应用错误 ↑
auth_requiredAuthorization 缺失,空,或包含无效的代币.
error_access_denied代币存在,但它的作用不能执行这个操作.
error_unknown节省请求时间和联系支持;不要盲目重新尝试突变.