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

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": 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: object[]

Products for which you need to calculate the cost of services.
The parameters of the product for which you need to calculate the cost of services.

Min items: 1

Max items: 200

parameters*

Type: object

campaignId

Type: integer<int64>

The store's campaign ID.

You can find it using a query GET v2/campaigns or find it in the seller's office on the Market — click on your account icon → Settings and in the menu on the left, select APIs and modules:

  • block Campaign ID;
  • tab Query log → drop-down list in the block Show logs.

⚠️ It does not match the store's ID (which is indicated in the merchant's account on the Market next to the store's name and in some reports). It is linked to the store one-to-one. Does not apply to advertising campaigns.

Min value: 1

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, UE

frequency

Type: string

Frequency of payments:

  • DAILY — daily.
  • WEEKLY — once a week.
  • BIWEEKLY — every two weeks.
  • MONTHLY — once a month.

Read more about the payment schedule. in the Help of the Market for sellers.

Enum: DAILY, WEEKLY, BIWEEKLY, MONTHLY

sellingProgram

Type: string

Work model:

  • FBY — FBY.
  • FBS — FBS.
  • DBS — DBS.
  • EXPRESS — Express.

Enum: FBY, FBS, DBS, EXPRESS, LAAS

Parameters for calculating the cost of services. You must specify the parameter campaignId or sellingProgram. Sharing the parameters will result in an error.

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

status*

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

result

Type: object

offers*

Type: object[]

The cost of services.
The cost of services.

Calculation of the cost of services.

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: object[]

A list of errors.
The general error format.

Min items: 1

status

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • ERROR — an error occurred while processing the request.

Enum: OK, 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: object[]

A list of errors.
The general error format.

Min items: 1

status

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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: object[]

A list of errors.
The general error format.

Min items: 1

status

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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: object[]

A list of errors.
The general error format.

Min items: 1

status

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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: object[]

A list of errors.
The general error format.

Min items: 1

status

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

500 Internal Server Error

Internal error in Yandex. Market. More information about the error

Body

application/json
{
    "status": "OK",
    "errors": [
        {
            "code": "string",
            "message": "string"
        }
    ]
}

Name

Description

errors

Type: object[]

A list of errors.
The general error format.

Min items: 1

status

Type: string

The type of response. Possible values:

  • OK — There are no errors.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

No longer supported, please use an alternative and newer version.

A category that has no children.