服务成本计算器

方法适用于所有模式.

如果您使用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[]

categoryId

Type: integer

市场上的产品类别的标识符。

要计算服务的成本,您必须指定[叶类别]的ID(*list-category) 的产物。

要找出产品所属类别的ID,请使用请求 POST v2/categories/tree.

Min value: 0

Exclusive min: true

height

Type: number

产品的高度以厘米为单位。

Min value: 0

Exclusive min: true

length

Type: number

产品的长度以厘米为单位。

Min value: 0

Exclusive min: true

price

Type: number

以卢布为单位的产品价格。

Min value: 0

Exclusive min: true

weight

Type: number

以公斤为单位的产品重量。

Min value: 0

Exclusive min: true

width

Type: number

产品的宽度以厘米为单位。

Min value: 0

Exclusive min: true

quantity

Type: integer

销售量 — 一个产品报价中的产品单元数。

Default: 1

Min value: 1

您需要计算服务成本的产品。

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

广告系列(商店)的ID — 通过API工作时,代表您在Yandex市场系统中的商店的技术标识符。 它与您的商店唯一链接,但仅用于自动交互。

您可以使用查询找到它 GET v2/campaigns 或者在市场上的卖家办公室找到它。 点击您的帐户图标→ 设置 在左边的菜单中,选择 Api和模块:

  • 运动ID;
  • 标签 查询日志 →块中的下拉列表 显示日志.

⚠️ 不要把它与:

  • 商店的标识符,显示在商家的个人帐户中。
  • 广告活动。

Min value: 1

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

frequency

Type: string

付款频率:

  • DAILY — 每天。
  • WEEKLY — 每周一次。
  • BIWEEKLY — 每两周。
  • MONTHLY — 每月一次。

阅读更多有关付款时间表的资料 在市场对卖家的帮助.

Enum: DAILY, WEEKLY, BIWEEKLY, MONTHLY

sellingProgram

Type: string

工作模式:

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

Enum: FBY, FBS, DBS, EXPRESS, LAAS

用于计算服务成本的参数。 您必须指定参数 campaignIdsellingProgram. 共享参数将导致错误。

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

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

    Exclusive min: true

    height

    Type: number

    产品的高度以厘米为单位。

    Min value: 0

    Exclusive min: true

    length

    Type: number

    产品的长度以厘米为单位。

    Min value: 0

    Exclusive min: true

    price

    Type: number

    以卢布为单位的产品价格。

    Min value: 0

    Exclusive min: true

    weight

    Type: number

    以公斤为单位的产品重量。

    Min value: 0

    Exclusive min: true

    width

    Type: number

    产品的宽度以厘米为单位。

    Min value: 0

    Exclusive min: true

    quantity

    Type: integer

    销售量 — 一个产品报价中的产品单元数。

    Default: 1

    Min 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: example

    value

    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_MILE

    amount

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

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

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

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

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

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

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

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

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

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

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

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

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

没有子项的类别。

上一篇
下一篇