服务成本计算器
方法适用于所有模式.
如果您使用API-Key令牌,调用该方法时需要具备列表中可用权限之一
计算具有指定参数的产品的市场服务成本。 请求和响应中的项的顺序保存以确定, 为哪个产品计算服务的成本。
请注意:计算器执行近似计算。 每个订单的最终成本取决于所提供的服务。
在请求中,您可以指定参数 campaignId,或 sellingProgram. 共享参数将导致错误。
| ⚙️ 限制: 每分钟100个请求 |
|---|
Request
POST
https://api.partner.market.yandex.ru/v2/tariffs/calculate
Body
application/json
{
"parameters": {
"campaignId": 0,
"sellingProgram": "FBY",
"frequency": "DAILY",
"currency": "RUR"
},
"offers": [
{
"categoryId": 0,
"price": 0,
"length": 0,
"width": 0,
"height": 0,
"weight": 0,
"quantity": 1
}
]
}
|
Name |
Description |
|
offers* |
Type: CalculateTariffsOfferDTO[] 您需要计算服务成本的产品。 Min items: Max items: |
|
parameters* |
Type: CalculateTariffsParametersDTO Параметры для расчета стоимости услуг. |
CalculateTariffsOfferDTO
您需要计算服务成本的产品参数。
|
Name |
Description |
|
categoryId* |
Type: integer<int64> 市场上的产品类别的标识符。 要计算服务的成本,您必须指定[叶类别]的ID(*list-category) 的产物。 要找出产品所属类别的ID,请使用请求 POST v2/categories/tree. Min value (exclusive): |
|
height* |
Type: number 产品的高度以厘米为单位。 Min value (exclusive): |
|
length* |
Type: number 产品的长度以厘米为单位。 Min value (exclusive): |
|
price* |
Type: number 以卢布为单位的产品价格。 Min value (exclusive): |
|
weight* |
Type: number 以公斤为单位的产品重量。 Min value (exclusive): |
|
width* |
Type: number 产品的宽度以厘米为单位。 Min value (exclusive): |
|
quantity |
Type: integer<int32> 销售量 — 一个产品报价中的产品单元数。 Default: Min value: |
CalculateTariffsParametersDTO
用于计算服务成本的参数。
|
Name |
Description |
|
campaignId |
Type: integer<int64> 活动ID。 您可以使用查询找到它 GET v2/campaigns 或者在市场上的卖家办公室找到 — 点击您的帐户图标→ 设置 在左边的菜单中,选择 Api和模块:
⚠️ 不要发送商店ID,这是在市场上的卖家帐户旁边的商店名称和一些报告。 执行请求的用户必须有权访问此活动。 使用参数 如果未指定参数,则需要参数 Min value: |
|
currency |
Type: CurrencyType 货币代码:
Enum: |
|
frequency |
Type: PaymentFrequencyType Частота выплат. Enum: |
|
sellingProgram |
Type: SellingProgramType 安置模式:
Enum: |
CurrencyType
货币代码:
RUR— 俄罗斯卢布。UAH— 乌克兰格里夫纳。BYR— 白俄罗斯卢布。KZT— 哈萨克斯坦坚戈。UZS— 乌兹别克总和。
|
Type |
Description |
|
Enum: |
PaymentFrequencyType
付款频率:
DAILY— 每天。WEEKLY— 每周一次。BIWEEKLY— 每两周。MONTHLY— 每月一次。
阅读更多关于付款时间表。 在市场对卖家的帮助.
|
Type |
Description |
|
Enum: |
SellingProgramType
安置模式:
FBY— FBY.FBS— FBS.DBS— DBS.EXPRESS— Express.
|
Type |
Description |
|
Enum: |
Responses
200 OK
务的成本。
Body
application/json
{
"status": "OK",
"result": {
"offers": [
{
"offer": {
"categoryId": 0,
"price": 0,
"length": 0,
"width": 0,
"height": 0,
"weight": 0,
"quantity": 1
},
"tariffs": [
{
"type": "AGENCY_COMMISSION",
"amount": 0,
"currency": "RUR",
"parameters": [
{
"name": "string",
"value": "string"
}
]
}
]
}
]
}
}
|
Name |
Description |
|
status* |
Type: ApiResponseStatusType 响应的类型。 可能的值:
Enum: |
|
result |
Type: CalculateTariffsResponseDTO Стоимость услуг. |
ApiResponseStatusType
响应的类型。 可能的值:
OK— 没有错误。ERROR— 处理请求时出错。
|
Type |
Description |
|
Enum: |
CalculateTariffsResponseDTO
服务成本的计算。
|
Name |
Description |
|
offers* |
Type: CalculateTariffsOfferInfoDTO[] 务的成本。 |
CalculateTariffsOfferInfoDTO
务的成本。
|
Name |
Description |
|
offer* |
Type: CalculateTariffsOfferDTO 您需要计算服务成本的产品参数。 |
|
tariffs* |
Type: CalculatedTariffDTO[] 服务清单及其成本。 对于某些服务,可能会返回几个不同的值。 例如,在模型中 FBS 服务的成本 |
CalculatedTariffDTO
关于Yandex的信息。 市场服务。
|
Name |
Description |
|
parameters* |
Type: TariffParameterDTO[] 资费计算参数。 |
|
type* |
Type: CalculatedTariffType Услуга Маркета. Enum: |
|
amount |
Type: number 该服务的成本是卢布。 |
|
currency |
Type: CurrencyType 货币代码:
Enum: |
TariffParameterDTO
特定市场服务的计算细节。
|
Name |
Description |
|
name* |
Type: string 参数的名称。 |
|
value* |
Type: string 参数的值。 |
CalculatedTariffType
市场服务:
-
AGENCY_COMMISSION— 接受买方的付款。 -
PAYMENT_TRANSFER— 买方付款的转让。 -
FEE— 产品在市场上的放置。 -
DELIVERY_TO_CUSTOMER— 交付给买方。 -
CROSSREGIONAL_DELIVERY— 送到联邦区、市或镇. -
EXPRESS_DELIVERY— 快递给买方。 -
SORTING— 订单处理。 -
MIDDLE_MILE— 平均英里。
阅读更多关于Yandex的信息。市场服务 在市场对卖家的帮助.
|
Type |
Description |
|
Enum: |
400 Bad Request
请求包含不正确的数据。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: ApiErrorDTO[] 错误列表。 Min items: |
|
status |
Type: ApiResponseStatusType 响应的类型。 可能的值:
Enum: |
ApiErrorDTO
一般错误格式。
|
Name |
Description |
|
code* |
Type: string 的错误代码。 |
|
message |
Type: string 错误的描述。 |
401 Unauthorized
请求中未指定授权数据。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: ApiErrorDTO[] 错误列表。 Min items: |
|
status |
Type: ApiResponseStatusType 响应的类型。 可能的值:
Enum: |
403 Forbidden
授权数据不正确或禁止访问资源。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: ApiErrorDTO[] 错误列表。 Min items: |
|
status |
Type: ApiResponseStatusType 响应的类型。 可能的值:
Enum: |
404 Not Found
找不到请求的资源。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: ApiErrorDTO[] 错误列表。 Min items: |
|
status |
Type: ApiResponseStatusType 响应的类型。 可能的值:
Enum: |
420 Method Failure
已超出资源访问限制。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: ApiErrorDTO[] 错误列表。 Min items: |
|
status |
Type: ApiResponseStatusType 响应的类型。 可能的值:
Enum: |
500 Internal Server Error
市场的内部错误。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: ApiErrorDTO[] 错误列表。 Min items: |
|
status |
Type: ApiResponseStatusType 响应的类型。 可能的值:
Enum: |
No longer supported, please use an alternative and newer version.
没有子项的类别。