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/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[] Products for which you need to calculate the cost of services. Min items: Max items: |
parameters* |
Type: CalculateTariffsParametersDTO Parameters for calculating the cost of services. |
CalculateTariffsOfferDTO
The parameters of the product for which you need to calculate the cost of services.
Name |
Description |
categoryId* |
Type: integer<int64> The identifier of the product category on the Market. To calculate the cost of services, you must specify the identifier of the product's leaf category, the one that does not have child categories. To find out the ID of the category to which the product belongs, use the request POST categories/tree. Min value (exclusive): |
height* |
Type: number The height of the product in centimeters. Min value (exclusive): |
length* |
Type: number The length of the product in centimeters. Min value (exclusive): |
price* |
Type: number The price of the product in rubles. Min value (exclusive): |
weight* |
Type: number The weight of the product in kilograms. Min value (exclusive): |
width* |
Type: number The width of the product in centimeters. Min value (exclusive): |
quantity |
Type: integer<int32> The sales quantum is the number of product units in one product offer. Default: Min value: |
CalculateTariffsParametersDTO
Parameters for calculating the cost of services.
Name |
Description |
campaignId |
Type: integer<int64> The campaign ID. You can find it using a query GET campaigns or find it in the seller's office on the Market — click on the name of your business and go to the page:
, Do not send the store's ID instead, which is indicated in the seller's account on the Market next to the store's name and in some reports. The user who executes the request must have access to this campaign. Use the parameter Required parameter if no parameter is specified Min value: |
currency |
Type: CurrencyType Currency codes:
Enum: |
frequency |
Type: PaymentFrequencyType The frequency of payments. Enum: |
sellingProgram |
Type: SellingProgramType The placement model. For sellers of the Yandex Go Market The DBS and Express models are not available. Required parameter, if no parameter is specified Enum: |
CurrencyType
Currency codes:
RUR
— the Russian ruble.UAH
— the Ukrainian hryvnia.BYR
— Belarusian ruble.KZT
— Kazakhstani tenge.UZS
— Uzbek sum.
Type |
Description |
Enum: |
PaymentFrequencyType
Frequency of payments:
DAILY
— daily.WEEKLY
— once a week.BIWEEKLY
— once every two weeks.MONTHLY
— once a month.
Read more about the payment schedule. in the Help of the Market for sellers.
Type |
Description |
Enum: |
SellingProgramType
Placement model:
FBY
— FBY.FBS
— FBS.DBS
— DBS.EXPRESS
— Express.
Type |
Description |
Enum: |
Responses
200 OK
The cost of services.
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 |
result |
Type: CalculateTariffsResponseDTO The cost of services. |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
CalculateTariffsResponseDTO
Calculation of the cost of services.
Name |
Description |
offers* |
Type: CalculateTariffsOfferInfoDTO[] The cost of services. |
ApiResponseStatusType
The type of response. Possible values:
OK
— there are no mistakes.ERROR
— an error occurred while processing the request.
Type |
Description |
Enum: |
CalculateTariffsOfferInfoDTO
The cost of services.
Name |
Description |
offer* |
Type: CalculateTariffsOfferDTO The parameters of the product for which you need to calculate the cost of services. |
tariffs* |
Type: CalculatedTariffDTO[] The list of services and their cost. For some services, several different values may be returned. For example, in the FBS model, the cost of a service is |
CalculatedTariffDTO
Information about Yandex. Market services.
Name |
Description |
parameters* |
Type: TariffParameterDTO[] Tariff calculation parameters. |
type* |
Type: CalculatedTariffType The Market service. Enum: |
amount |
Type: number The cost of the service is in rubles. |
currency |
Type: CurrencyType Currency codes:
Enum: |
TariffParameterDTO
Details of the calculation of a specific Market service.
Name |
Description |
name* |
Type: string The name of the parameter. |
value* |
Type: string The value of the parameter. |
CalculatedTariffType
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 town. -
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.
Type |
Description |
Enum: |
400 Bad Request
The request contains incorrect data. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
ApiErrorDTO
The general error format.
Name |
Description |
code* |
Type: string The error code. |
message |
Type: string Description of the error. |
401 Unauthorized
The authorization data is not specified in the request. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
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": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
404 Not Found
The requested resource was not found. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
420 Method Failure
The resource access limit has been exceeded. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
500 Internal Server Error
Internal error of Yandex. Market. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
No longer supported, please use an alternative and newer version.