跳到主要内容
版本:202506

批量创建折扣码

POST 

/openapi/2025-06/price_rules/:price_rule_id/discount_codes/batch

批量创建折扣码。

请求

Path参数

    price_rule_id string必填

    价格规则 ID

请求体必填

    discount_codes object[]必填

    折扣码列表

  • Array [
  • codestring

    代码

  • ]

响应

OK

数据结构
    codestring

    错误码

    messagestring

    错误信息

    data object
    discount_codes object[]

    折扣码列表

  • Array [
  • idstring

    折扣 ID

    price_rule_idstring

    价格规则 ID

    codestring

    折扣码

    created_atstring

    创建时间,ISO-8601 格式

    updated_atstring

    最后更新时间,ISO-8601 格式

    use_with_otherint32

    是否可与其他折扣叠加

    usage_countint32

    已使用次数

    errors object

    字段校验错误信息,以字段名为键

    property name*string
  • ]