服务成本计算器
方法适用于所有模式.
如果您使用API-Key令牌,调用该方法时需要具备列表中可用权限之一
计算具有指定参数的产品的市场服务成本。 请求和响应中的项的顺序保存以确定, 为哪个产品计算服务的成本。
请注意:计算器执行近似计算。 每个订单的最终成本取决于所提供的服务。
在请求中,您可以指定参数 campaignId,或 sellingProgram. 共享参数将导致错误。
| ⚙️ 限制: 每分钟100个请求 |
|---|
Request
POST
https://api.partner.market.yandex.ru/v2/tariffs/calculate
Body
application/json
{
"parameters": {
"campaignId": 1,
"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: object[]
您需要计算服务成本的产品。 Min items: Max items: Example
|
||||||||||||||
|
parameters |
Type: object
用于计算服务成本的参数。 您必须指定参数 Example
|
Responses
200 OK
务的成本。
Body
application/json
{
"status": "OK",
"result": {
"offers": [
{
"offer": {},
"tariffs": [
null
]
}
]
}
}
Type: object
All of 2 types
-
Type: object
status
Type: string
响应的类型。 可能的值:
OK— 没有错误。ERROR— 处理请求时出错。
Enum:
OK,ERROR服务器响应的标准包装器。
Example
{ "status": "OK" } -
Type: object
result
Type: object
offers
Type: object[]
offer
Type: object
categoryId
Type: integer
市场上的产品类别的标识符。
要计算服务的成本,您必须指定[叶类别]的ID(*list-category) 的产物。
要找出产品所属类别的ID,请使用请求 POST v2/categories/tree.
Min value:
0Exclusive min:
trueheight
Type: number
产品的高度以厘米为单位。
Min value:
0Exclusive min:
truelength
Type: number
产品的长度以厘米为单位。
Min value:
0Exclusive min:
trueprice
Type: number
以卢布为单位的产品价格。
Min value:
0Exclusive min:
trueweight
Type: number
以公斤为单位的产品重量。
Min value:
0Exclusive min:
truewidth
Type: number
产品的宽度以厘米为单位。
Min value:
0Exclusive min:
truequantity
Type: integer
销售量 — 一个产品报价中的产品单元数。
Default:
1Min value:
1您需要计算服务成本的产品参数。
Example
{ "categoryId": 0, "price": 0, "length": 0, "width": 0, "height": 0, "weight": 0, "quantity": 1 }tariffs
Type: object[]
parameters
Type: object[]
name
Type: string
参数的名称。
Example:
examplevalue
Type: string
参数的值。
Example:
example资费计算参数。
Example
[ { "name": "example", "value": "example" } ]type
Type: string
市场服务:
-
AGENCY_COMMISSION— 接受买方的付款。 -
PAYMENT_TRANSFER— 买方付款的转让。 -
FEE— 产品在市场上的放置。 -
DELIVERY_TO_CUSTOMER— 交付给买方。 -
CROSSREGIONAL_DELIVERY— 送到联邦区、市或地方. -
EXPRESS_DELIVERY— 快递给买方。 -
SORTING— 订单处理。 -
MIDDLE_MILE— 平均英里。
阅读更多关于Yandex的信息。市场服务 在市场对卖家的帮助.
Enum:
AGENCY_COMMISSION,PAYMENT_TRANSFER,FEE,DELIVERY_TO_CUSTOMER,CROSSREGIONAL_DELIVERY,EXPRESS_DELIVERY,SORTING,MIDDLE_MILEamount
Type: number
该服务的成本是卢布。
currency
Type: string
货币代码:
RUR— 俄罗斯卢布。UAH— 乌克兰格里夫纳。BYR— 白俄罗斯卢布。KZT— 哈萨克斯坦坚戈。UZS— 乌兹别克总和。
Enum:
RUR,USD,EUR,UAH,AUD,GBP,BYR,BYN,DKK,ISK,KZT,CAD,CNY,NOK,XDR,SGD,TRY,SEK,CHF,JPY,AZN,ALL,DZD,AOA,ARS,AMD,AFN,BHD,BGN,BOB,BWP,BND,BRL,BIF,HUF,VEF,KPW,VND,GMD,GHS,GNF,HKD,GEL,AED,EGP,ZMK,ILS,INR,IDR,JOD,IQD,IRR,YER,QAR,KES,KGS,COP,CDF,CRC,KWD,CUP,LAK,LVL,SLL,LBP,LYD,SZL,LTL,MUR,MRO,MKD,MWK,MGA,MYR,MAD,MXN,MZN,MDL,MNT,NPR,NGN,NIO,NZD,OMR,PKR,PYG,PEN,PLN,KHR,SAR,RON,SCR,SYP,SKK,SOS,SDG,SRD,TJS,THB,TWD,BDT,TZS,TND,TMM,UGX,UZS,UYU,PHP,DJF,XAF,XOF,HRK,CZK,CLP,LKR,EEK,ETB,RSD,ZAR,KRW,NAD,TL,UE服务清单及其成本。
对于某些服务,可能会返回几个不同的值。 例如,在模型中 FBS 服务的成本
SORTING(订单处理)取决于装运方法和装运中的订单数量。 阅读更多有关服务收费的资料 在市场对卖家的帮助.Example
[ { "type": "AGENCY_COMMISSION", "amount": 0.5, "currency": "RUR", "parameters": [ { "name": "example", "value": "example" } ] } ]务的成本。
Example
[ { "offer": { "categoryId": 0, "price": 0, "length": 0, "width": 0, "height": 0, "weight": 0, "quantity": 1 }, "tariffs": [ { "type": "AGENCY_COMMISSION", "amount": 0.5, "currency": "RUR", "parameters": [ {} ] } ] } ]服务成本的计算。
Example
{ "offers": [ { "offer": { "categoryId": 0, "price": 0, "length": 0, "width": 0, "height": 0, "weight": 0, "quantity": 1 }, "tariffs": [ { "type": "AGENCY_COMMISSION", "amount": 0.5, "currency": "RUR", "parameters": [ null ] } ] } ] }Example
{ "result": { "offers": [ { "offer": { "categoryId": 0, "price": 0, "length": 0, "width": 0, "height": 0, "weight": 0, "quantity": 1 }, "tariffs": [ {} ] } ] } } -
400 Bad Request
请求包含不正确的数据。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "example",
"message": "example"
}
]
}
Type: object
All of 1 type
-
Type: object
All of 2 types
-
Type: object
status
Type: string
响应的类型。 可能的值:
OK— 没有错误。ERROR— 处理请求时出错。
Enum:
OK,ERROR服务器响应的标准包装器。
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
的错误代码。
Example:
examplemessage
Type: string
错误的描述。
Example:
example错误列表。
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
服务器错误的标准包装器。
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
401 Unauthorized
请求中未指定授权数据。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "example",
"message": "example"
}
]
}
Type: object
All of 1 type
-
Type: object
All of 2 types
-
Type: object
status
Type: string
响应的类型。 可能的值:
OK— 没有错误。ERROR— 处理请求时出错。
Enum:
OK,ERROR服务器响应的标准包装器。
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
的错误代码。
Example:
examplemessage
Type: string
错误的描述。
Example:
example错误列表。
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
服务器错误的标准包装器。
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
403 Forbidden
授权数据不正确或禁止访问资源。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "example",
"message": "example"
}
]
}
Type: object
All of 1 type
-
Type: object
All of 2 types
-
Type: object
status
Type: string
响应的类型。 可能的值:
OK— 没有错误。ERROR— 处理请求时出错。
Enum:
OK,ERROR服务器响应的标准包装器。
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
的错误代码。
Example:
examplemessage
Type: string
错误的描述。
Example:
example错误列表。
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
服务器错误的标准包装器。
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
404 Not Found
找不到请求的资源。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "example",
"message": "example"
}
]
}
Type: object
All of 1 type
-
Type: object
All of 2 types
-
Type: object
status
Type: string
响应的类型。 可能的值:
OK— 没有错误。ERROR— 处理请求时出错。
Enum:
OK,ERROR服务器响应的标准包装器。
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
的错误代码。
Example:
examplemessage
Type: string
错误的描述。
Example:
example错误列表。
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
服务器错误的标准包装器。
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
420 Method Failure
已超出资源访问限制。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "example",
"message": "example"
}
]
}
Type: object
All of 1 type
-
Type: object
All of 2 types
-
Type: object
status
Type: string
响应的类型。 可能的值:
OK— 没有错误。ERROR— 处理请求时出错。
Enum:
OK,ERROR服务器响应的标准包装器。
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
的错误代码。
Example:
examplemessage
Type: string
错误的描述。
Example:
example错误列表。
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
服务器错误的标准包装器。
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
500 Internal Server Error
Yandex中的内部错误。 市场。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "example",
"message": "example"
}
]
}
Type: object
All of 1 type
-
Type: object
All of 2 types
-
Type: object
status
Type: string
响应的类型。 可能的值:
OK— 没有错误。ERROR— 处理请求时出错。
Enum:
OK,ERROR服务器响应的标准包装器。
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
的错误代码。
Example:
examplemessage
Type: string
错误的描述。
Example:
example错误列表。
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
服务器错误的标准包装器。
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
No longer supported, please use an alternative and newer version.
没有子项的类别。