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

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: 0

Exclusive min: true

height

Type: number

The height of the product in centimeters.

Min value: 0

Exclusive min: true

length

Type: number

The length of the product in centimeters.

Min value: 0

Exclusive min: true

price

Type: number

The price of the product in rubles.

Min value: 0

Exclusive min: true

weight

Type: number

The weight of the product in kilograms.

Min value: 0

Exclusive min: true

width

Type: number

The width of the product in centimeters.

Min value: 0

Exclusive min: true

quantity

Type: integer

Quantum of sale — the number of product units in one product offer.

Default: 1

Min value: 1

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

Min items: 1

Max items: 200

Example
[
  {
    "categoryId": 0,
    "price": 0,
    "length": 0,
    "width": 0,
    "height": 0,
    "weight": 0,
    "quantity": 1
  }
]

parameters

Type: object

campaignId

Type: integer

The ID of the campaign (store) — The technical identifier that represents your store in the Yandex Market system when working through the API. It is uniquely linked to your store, but it is intended only for automated interaction.

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.

⚠️ Do not confuse it with:

  • the store's identifier, which is displayed in the merchant's personal account.
  • 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

Working 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.

Example
{
  "campaignId": 1,
  "sellingProgram": "FBY",
  "frequency": "DAILY",
  "currency": "RUR"
}

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

    The 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: 0

    Exclusive min: true

    height

    Type: number

    The height of the product in centimeters.

    Min value: 0

    Exclusive min: true

    length

    Type: number

    The length of the product in centimeters.

    Min value: 0

    Exclusive min: true

    price

    Type: number

    The price of the product in rubles.

    Min value: 0

    Exclusive min: true

    weight

    Type: number

    The weight of the product in kilograms.

    Min value: 0

    Exclusive min: true

    width

    Type: number

    The width of the product in centimeters.

    Min value: 0

    Exclusive min: true

    quantity

    Type: integer

    Quantum of sale — the number of product units in one product offer.

    Default: 1

    Min value: 1

    The 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.

    Example: example

    value

    Type: string

    The value of the parameter.

    Example: example

    Tariff 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_MILE

    amount

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

    The 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, ERROR

      The standard wrapper for server responses.

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      The error code.

      Example: example

      message

      Type: string

      Description of the error.

      Example: example

      A list of errors.

      Min items: 1

      Example
      [
        {
          "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, ERROR

      The standard wrapper for server responses.

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      The error code.

      Example: example

      message

      Type: string

      Description of the error.

      Example: example

      A list of errors.

      Min items: 1

      Example
      [
        {
          "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, ERROR

      The standard wrapper for server responses.

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      The error code.

      Example: example

      message

      Type: string

      Description of the error.

      Example: example

      A list of errors.

      Min items: 1

      Example
      [
        {
          "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, ERROR

      The standard wrapper for server responses.

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      The error code.

      Example: example

      message

      Type: string

      Description of the error.

      Example: example

      A list of errors.

      Min items: 1

      Example
      [
        {
          "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, ERROR

      The standard wrapper for server responses.

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      The error code.

      Example: example

      message

      Type: string

      Description of the error.

      Example: example

      A list of errors.

      Min items: 1

      Example
      [
        {
          "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 the 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, ERROR

      The standard wrapper for server responses.

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      The error code.

      Example: example

      message

      Type: string

      Description of the error.

      Example: example

      A list of errors.

      Min items: 1

      Example
      [
        {
          "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.