Service Cost Calculator
The method is available for all models.
If you are using an API Key token, one of the accesses in the list is required to call the method
- pricing — Manage prices
- pricing:read-only — View prices
- finance-and-accounting — View financial data and reports
- all-methods — Full account management
- all-methods:read-only — View all data
Calculates the cost of Market services for products with the specified parameters. The order of the items in the request and response is saved to determine, for which product the cost of the service is calculated.
Please note: the calculator performs approximate calculations. The final cost for each order depends on the services provided.
In the request, you can specify either the parameter campaignId, or sellingProgram. Sharing the parameters will result in an error.
| ⚙️ Limit: 100 requests per minute |
|---|
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[]
Products for which you need to calculate the cost of services. Min items: Max items: Example
|
||||||||||||||
|
parameters |
Type: object
Parameters for calculating the cost of services. You must specify the parameter Example
|
Responses
200 OK
The cost of services.
Body
application/json
{
"status": "OK",
"result": {
"offers": [
{
"offer": {},
"tariffs": [
null
]
}
]
}
}
Type: object
All of 2 types
-
Type: object
status
Type: string
The type of response. Possible values:
OK— There are no errors.ERROR— an error occurred while processing the request.
Enum:
OK,ERRORThe standard wrapper for server responses.
Example
{ "status": "OK" } -
Type: object
result
Type: object
offers
Type: object[]
offer
Type: object
categoryId
Type: integer
The identifier of the product category on the Market.
To calculate the cost of services, you must specify the ID of the leaf category the product.
To find out the ID of the category to which the product belongs, use the request POST v2/categories/tree.
Min value:
0Exclusive min:
trueheight
Type: number
The height of the product in centimeters.
Min value:
0Exclusive min:
truelength
Type: number
The length of the product in centimeters.
Min value:
0Exclusive min:
trueprice
Type: number
The price of the product in rubles.
Min value:
0Exclusive min:
trueweight
Type: number
The weight of the product in kilograms.
Min value:
0Exclusive min:
truewidth
Type: number
The width of the product in centimeters.
Min value:
0Exclusive min:
truequantity
Type: integer
Quantum of sale — the number of product units in one product offer.
Default:
1Min value:
1The parameters of the product for which you need to calculate the cost of services.
Example
{ "categoryId": 0, "price": 0, "length": 0, "width": 0, "height": 0, "weight": 0, "quantity": 1 }tariffs
Type: object[]
parameters
Type: object[]
name
Type: string
The name of the parameter.
Parameter
nameIt can take the following values:Main parameters:
value— the value of the tariff.billingUnit— units of measurement for the product.valueType— type of fare value:absolute(monetary value) orrelative(percentage).priceDependence— the dependence of the tariff on the price of the product.
Product price range parameters:
priceFrom— the minimum price of the product from which the tariff is applied.priceTo— the maximum price of the product to which the tariff applies.
Parameters of the tariff value restrictions:
minValue— the minimum value of the tariff.maxValue— the maximum value of the tariff.
Parameters of the day ranges:
dayFrom— the day on which the tariff (for storage) begins to apply.dayTo— the day on which the tariff expires (for storage).
Transit delivery route parameters:
xdocFrom— the starting point of the route.xdocTo— the end point of the route.
Frequency Parameters:
frequency— the frequency of payments.
Warehouse and logistics parameters:
transitWarehouseType— the type of place where the goods were brought by the seller.orderCargoType— the type of the order's cargo.
Turnover parameters:
turnoverFrom— the lower limit of the turnover range, starting from which the tariff is applied.turnoverTo— the upper limit of the turnover range, excluding which the tariff is applied.
Rating parameters:
ratingLowerBound— the lower limit of the rating range for which the tariff is applied.ratingUpperBound— the upper limit of the rating range for which the tariff is applied.
Order quantity parameters:
fromOrders— the number of orders starting from which the tariff is applied (inclusive).toOrders— the number of orders up to which the tariff is applied (not inclusive).
Delivery parameters from abroad:
shippingPrice— the cost of the shipment upon delivery from abroad.totalSurchargeForWeight— the amount of the extra charge for the weight of the shipment upon delivery from abroad.
Not all parameters are returned for each tariff.
The set of parameters depends on the type of service and the terms of the tariff.
Example:
examplevalue
Type: string
The value of the parameter.
Example:
exampleTariff calculation parameters.
Example
[ { "name": "example", "value": "example" } ]type
Type: string
The Market service:
-
AGENCY_COMMISSION— acceptance of the buyer's payment. -
PAYMENT_TRANSFER— transfer of the buyer's payment. -
FEE— product placement on the Market. -
DELIVERY_TO_CUSTOMER— delivery to the buyer. -
CROSSREGIONAL_DELIVERY— delivery to the federal district, city or locality. -
EXPRESS_DELIVERY— express delivery to the buyer. -
SORTING— order processing. -
MIDDLE_MILE— the average mile.
Read more about Yandex.Market services in the Help of the Market for sellers.
Enum:
AGENCY_COMMISSION,PAYMENT_TRANSFER,FEE,DELIVERY_TO_CUSTOMER,CROSSREGIONAL_DELIVERY,EXPRESS_DELIVERY,SORTING,MIDDLE_MILEamount
Type: number
The cost of the service is in rubles.
currency
Type: string
Currency codes:
RUR— the Russian ruble.UAH— the Ukrainian hryvnia.BYR— the Belarusian ruble.KZT— Kazakhstani tenge.UZS— Uzbek sum.
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,UEThe list of services and their cost.
For some services, several different values may be returned. For example, in the model FBS the cost of the service
SORTING(order processing) depends on the shipping method and the number of orders in the shipment. Read more about the tariffs for services in the Help of the Market for sellers.Example
[ { "type": "AGENCY_COMMISSION", "amount": 0.5, "currency": "RUR", "parameters": [ { "name": "example", "value": "example" } ] } ]The cost of services.
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": [ {} ] } ] } ]Calculation of the cost of services.
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
The request contains incorrect data. More information about the error
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
The type of response. Possible values:
OK— There are no errors.ERROR— an error occurred while processing the request.
Enum:
OK,ERRORThe standard wrapper for server responses.
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
The error code.
Example:
examplemessage
Type: string
Description of the error.
Example:
exampleA list of errors.
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
A standard wrapper for server errors.
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
401 Unauthorized
The authorization data is not specified in the request. More information about the error
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
The type of response. Possible values:
OK— There are no errors.ERROR— an error occurred while processing the request.
Enum:
OK,ERRORThe standard wrapper for server responses.
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
The error code.
Example:
examplemessage
Type: string
Description of the error.
Example:
exampleA list of errors.
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
A standard wrapper for server errors.
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
403 Forbidden
The authorization data is incorrect or access to the resource is prohibited. More information about the error
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
The type of response. Possible values:
OK— There are no errors.ERROR— an error occurred while processing the request.
Enum:
OK,ERRORThe standard wrapper for server responses.
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
The error code.
Example:
examplemessage
Type: string
Description of the error.
Example:
exampleA list of errors.
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
A standard wrapper for server errors.
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
404 Not Found
The requested resource was not found. More information about the error
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
The type of response. Possible values:
OK— There are no errors.ERROR— an error occurred while processing the request.
Enum:
OK,ERRORThe standard wrapper for server responses.
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
The error code.
Example:
examplemessage
Type: string
Description of the error.
Example:
exampleA list of errors.
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
A standard wrapper for server errors.
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
420 Method Failure
The resource access limit has been exceeded. More information about the error
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
The type of response. Possible values:
OK— There are no errors.ERROR— an error occurred while processing the request.
Enum:
OK,ERRORThe standard wrapper for server responses.
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
The error code.
Example:
examplemessage
Type: string
Description of the error.
Example:
exampleA list of errors.
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
A standard wrapper for server errors.
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
500 Internal Server Error
Internal error of Yandex. Market. More information about the error
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
The type of response. Possible values:
OK— There are no errors.ERROR— an error occurred while processing the request.
Enum:
OK,ERRORThe standard wrapper for server responses.
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
The error code.
Example:
examplemessage
Type: string
Description of the error.
Example:
exampleA list of errors.
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
A standard wrapper for server errors.
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
No longer supported, please use an alternative and newer version.
A category that has no children.