This commit is contained in:
邹宗楠
2026-03-25 09:13:07 +08:00
parent 93bd28290d
commit c740630ce6
31 changed files with 2077 additions and 556 deletions

View File

@@ -48,17 +48,19 @@ type BrandListParam struct {
// (已停止使用)类目列表
Categories []int64 `json:"categories"`
// (已停止使用)起始位
Offset int64 `json:"offset"`
Offset *int64 `json:"offset"`
// (已停止使用)单次最大条数
Size int64 `json:"size"`
Size *int64 `json:"size"`
// (已停止使用)排序顺序,默认为倒排 0:降序, 1:升序
Sort int32 `json:"sort"`
Sort *int32 `json:"sort"`
// (已停止使用)品牌状态 1:审核中, 2:审核通过, 3:审核拒绝
Status int32 `json:"status"`
Status *int32 `json:"status"`
// (已停止使用)是否返回完全的品牌信息
FullBrandInfo bool `json:"full_brand_info"`
FullBrandInfo *bool `json:"full_brand_info"`
// 推荐使用必填类目id
CategoryId int64 `json:"category_id"`
CategoryId *int64 `json:"category_id"`
// 品牌前缀(中文或者英文),适用于不需要品牌资质的场景,根据前缀搜索品牌
Query string `json:"query"`
Query *string `json:"query"`
// 选填品牌ids传了品牌ids默认直接拿品牌id搜索并返回结果(放在brand_list里),不会使用其他入参
BrandIds []int64 `json:"brand_ids"`
}

View File

@@ -6,6 +6,14 @@ type BrandListResponse struct {
doudian_sdk.BaseDoudianOpApiResponse
Data *BrandListData `json:"data"`
}
type BrandListItem struct {
// 品牌id
BrandId int64 `json:"brand_id"`
// 中文名
NameCn string `json:"name_cn"`
// 英文名
NameEn string `json:"name_en"`
}
type BrandListData struct {
// 已停止使用品牌id列表
BrandIds []int64 `json:"brand_ids"`
@@ -54,11 +62,3 @@ type AuthBrandListItem struct {
// 英文名
NameEn string `json:"name_en"`
}
type BrandListItem struct {
// 品牌id
BrandId int64 `json:"brand_id"`
// 中文名
NameCn string `json:"name_cn"`
// 英文名
NameEn string `json:"name_en"`
}

View File

@@ -67,4 +67,6 @@ type ProductGetRecommendCategoryParam struct {
ProductFormatNew map[int64]ProductFormatNewItem `json:"product_format_new"`
// 品牌id
StandardBrandId int64 `json:"standard_brand_id"`
// 深度思考异步任务ID命中深度思考时返回用于轮询深度思考结果
AsyncTaskId *string `json:"async_task_id"`
}

View File

@@ -33,4 +33,14 @@ type CategoryDetailsItem struct {
type ProductGetRecommendCategoryData struct {
// 推荐类目结果
CategoryDetails []CategoryDetailsItem `json:"categoryDetails"`
// 类目预测记录id
RecommendId string `json:"recommend_id"`
// 深度思考异步任务ID命中深度思考时返回用于轮询深度思考结果
AsyncTaskId string `json:"async_task_id"`
// 深度思考任务状态命中深度思考时返回。0-init 1-running 2-success 3-failed
AsyncTaskStatus int64 `json:"async_task_status"`
// 深度思考超时时间单位ms命中深度思考时返回用于轮询深度思考结果
Timeout int64 `json:"timeout"`
// 深度思考轮询间隔单位ms命中深度思考时返回用于轮询深度思考结果
Interval int64 `json:"interval"`
}

View File

@@ -44,202 +44,521 @@ func (c *ProductAddV2Request) GetParams() *ProductAddV2Param {
return c.Param
}
type QualityAttachmentsItem struct {
// 1-图片2-pdf
MediaType int64 `json:"media_type"`
// 凭证url
Url string `json:"url"`
type PropertyDetailItem struct {
// 定制属性名称
Name *string `json:"name"`
// 定制属性扩展信息
ExtraInfo *ExtraInfo `json:"extra_info"`
}
type QualityListItem struct {
// 资质key
QualityKey string `json:"quality_key"`
// 资质名称
QualityName string `json:"quality_name"`
// 资质
QualityAttachments []QualityAttachmentsItem `json:"quality_attachments"`
}
type PoiResource struct {
// 有效时间段从领取日开始计算优先级高于ValidStart-ValidEnd
ValidDays int64 `json:"valid_days"`
// 卡券有效开始时间,秒单位时间戳
ValidStart int64 `json:"valid_start"`
// 卡券有效截止时间,秒单位时间戳
ValidEnd int64 `json:"valid_end"`
// 客服电话
ServiceNum string `json:"service_num"`
// 领取须知
Notification string `json:"notification"`
// 平台产生券码: 1 ; 合作方api实时传入的券码: 4
CodeType int64 `json:"code_type"`
// 券码总量0/-1表示不限制平台券时须\u003e0
Count int64 `json:"count"`
// 0-不支持二次兑换1-支持二次兑换
CouponSecondExchange int64 `json:"couponSecondExchange"`
// 可核销总次数
TotalCanUseCount int32 `json:"total_can_use_count"`
// 兑换链接
Link string `json:"link"`
// 券码使用条件
Condition string `json:"condition"`
// 数组当前只支持一个元素且只可为 1或2其中 1 表示随时退+过期自动退2 表示不支持退
CouponReturnMethods []int64 `json:"coupon_return_methods"`
type DefaultProcessTime struct {
// 商品默认处理时长,单位秒
Value *int64 `json:"value"`
}
type DelayRule struct {
// 是否开启特殊日期延迟发货
Enable bool `json:"enable"`
// 1 时间点2 时间范围
ConfigType int32 `json:"config_type"`
// 特殊日期延迟发货时间最晚发货时间时间戳单位秒当config_type=1时传时间戳代表最晚x发货当config_type=2时传天数代表延迟x天发货
ConfigValue int64 `json:"config_value"`
// 特殊日期延迟发货时间下单开始时间,时间戳,单位秒
StartTime int64 `json:"start_time"`
// 特殊日期延迟发货时间下单结束时间,时间戳,单位秒
EndTime int64 `json:"end_time"`
// 是否开启特殊日期延迟发货
Enable bool `json:"enable"`
// 特殊日期延迟发货时间下单开始时间,时间戳,单位秒
StartTime int64 `json:"start_time"`
}
type RecruitInfo struct {
// 线索ID
RecruitFollowId string `json:"recruit_follow_id"`
// 招商类型
RecruitType string `json:"recruit_type"`
type QualityInspectionInfo struct {
// 质检证书编码
CertificateCode *string `json:"certificate_code"`
// 机构编码,请通过/inspection/QueryBtasAgencyList接口获取
Agency *string `json:"agency"`
// 1: 单库存模式只允许售卖一个sku2: 多库存模式,不限售卖次数
Mode *int32 `json:"mode"`
// 是否支持前置质检
Supported *bool `json:"supported"`
}
type MultiTimeStocksItem struct {
// 时效
TimeType *int64 `json:"time_type"`
// 时效描述
TimeDesc *string `json:"time_desc"`
// 时效库存数
StockNum *int64 `json:"stock_num"`
}
type TaxExemptionSkuInfo struct {
// 是否套装0 否 1 是)
IsSuit *int32 `json:"is_suit"`
// 净含量
Volume *int64 `json:"volume"`
// 套装数量
SuitNum *int64 `json:"suit_num"`
}
type GovSubsidyCargo struct {
// 国补自营货品ID
CargoId *int64 `json:"cargo_id"`
}
type DeliveryInfosItem struct {
// 信息类型
InfoType *string `json:"info_type"`
// 信息计量单位
InfoUnit *string `json:"info_unit"`
// 信息值
InfoValue *string `json:"info_value"`
}
type SpecPricesV2Item struct {
// 外部skuid
OuterSkuId *string `json:"outer_sku_id"`
// 时效库存一个sku可以配置0到多个时效库存
MultiTimeStocks []MultiTimeStocksItem `json:"multi_time_stocks"`
// 阶梯库存数量
StepStockNum *int64 `json:"step_stock_num"`
// 外部skuid
OutSkuId *int64 `json:"out_sku_id"`
// 海南免税Sku 额外信息
TaxExemptionSkuInfo *TaxExemptionSkuInfo `json:"tax_exemption_sku_info"`
// 批次库存
BatchStocks []BatchStocksItem `json:"batch_stocks"`
// 组套包信息
PackageSku []PackageSkuItem `json:"package_sku"`
// 商品规格值id懂车帝场景传递
SpecValueLibId *int64 `json:"spec_value_lib_id"`
// sku分类信息对应枚举值"main_sale_single_product" - 主售款(单品)"main_sale_multi_product" - "主售款(多件装)""main_sale_combination" - 主售款(组合品)"non_main_sale" - 非主售款"information_description" - 信息说明/防拍
SkuClassificationType *string `json:"sku_classification_type"`
// 预售天数
PresellDelay *int64 `json:"presell_delay"`
// 规格信息
SellProperties []SellPropertiesItem `json:"sell_properties"`
// 仓ID -> 库存数量。跨境业务大部分都是必传格式为Map<商家仓ID, 库存数量>
StockNumMap *map[string]int64 `json:"stock_num_map"`
// 黄金加工费单位nil代表不修改
GoldProcessCharge *int64 `json:"gold_process_charge"`
// 规格型号编码-国补场景下国补商品型号
SpecModelCode []string `json:"spec_model_code"`
// 库存数量。跨境必须走区域库存stock_num设置0。
StockNum *int64 `json:"stock_num"`
// 供应商编码
SupplierId *string `json:"supplier_id"`
// 货品信息如果传0 0 表示解绑)
Cargo *Cargo `json:"cargo"`
// 国补自营货品相关
GovSubsidyCargo *GovSubsidyCargo `json:"gov_subsidy_cargo"`
// 商家编码
Code *string `json:"code"`
// 库存类型 0-普通库存1-区域库存10-阶梯库存
SkuType *int64 `json:"sku_type"`
// 海关申报要素
CustomsReportInfo *CustomsReportInfo `json:"customs_report_info"`
// 条形码
Barcodes []string `json:"barcodes"`
// 价格
Price *int64 `json:"price"`
// true表示sku上架 false表示sku下架
SkuStatus *bool `json:"sku_status"`
// SKU运输信息
DeliveryInfos []DeliveryInfosItem `json:"delivery_infos"`
// 供货价,单位nil代表不修改0代表清空
SupplyPrice *int64 `json:"supply_price"`
}
type OpenLogisticsInfo struct {
// 商家仓id
CrossWarehouseId *string `json:"cross_warehouse_id"`
// 原产国id
OriginCountryId *int64 `json:"origin_country_id"`
// 税金承担方一般都填0走商家承担0商家承担1用户承担
TaxPayer *int64 `json:"tax_payer"`
// 货源国id
SourceCountryId *int64 `json:"source_country_id"`
// 品牌所在地id
BrandCountryId *int64 `json:"brand_country_id"`
// 商品净重
NetWeightQty *float64 `json:"net_weight_qty"`
// 通关模式1BBC 2BC 3CC邮关
CustomsClearType *int64 `json:"customs_clear_type"`
}
type QualityAttachmentsItem struct {
// 凭证url
Url string `json:"url"`
// 1-图片
MediaType int64 `json:"media_type"`
}
type BatchStockItemsItem struct {
// 批次库存类型: 1为唯一码
BatchType *int64 `json:"batch_type"`
// 批次库存值
StockNum *int64 `json:"stock_num"`
// 唯一码
UniqueId *string `json:"unique_id"`
}
type CustomProperty struct {
// 定制属性组信息,如:加工服务
CustomPropertyGroups []CustomPropertyGroupsItem `json:"customPropertyGroups"`
}
type CategoryPropertyPicsItem struct {
// 属性图图片链接
Urls []string `json:"urls"`
}
type QualityListItem struct {
// 资质名称
QualityName string `json:"quality_name"`
// 资质名
QualityContentName *string `json:"quality_content_name"`
// 资质id
QualityId *int64 `json:"quality_id"`
// 资质
QualityAttachments []QualityAttachmentsItem `json:"quality_attachments"`
// 资质key
QualityKey string `json:"quality_key"`
}
type ValuesItem_4 struct {
// 度量衡结构化信息
MeasureInfo *MeasureInfo `json:"measure_info"`
// 规格值导航路径
CpvPath []CpvPathItem `json:"cpv_path"`
// 备注
Remark *string `json:"remark"`
// 规格值名称
ValueName string `json:"value_name"`
// 规格值标准属性值id
ValueId *int64 `json:"value_id"`
}
type Cargo struct {
// 货品类型跨境的货品类型传3
SourceType *int64 `json:"source_type"`
// 货品id
CargoId *string `json:"cargo_id"`
}
type PoiResource struct {
// 有效时间段从领取日开始计算优先级高于ValidStart-ValidEnd
ValidDays *int64 `json:"valid_days"`
// 卡券有效开始时间,秒单位时间戳
ValidStart *int64 `json:"valid_start"`
// 客服电话
ServiceNum *string `json:"service_num"`
// 平台产生券码: 1 ; 合作方api实时传入的券码: 4
CodeType *int64 `json:"code_type"`
// 门店库id
PoiLibId *int64 `json:"poi_lib_id"`
// 券码总量0/-1表示不限制平台券时须\u003e0
Count *int64 `json:"count"`
// 领取须知
Notification *string `json:"notification"`
// 兑换链接
Link *string `json:"link"`
// 0-不支持二次兑换1-支持二次兑换
CouponSecondExchange *int64 `json:"couponSecondExchange"`
// 数组当前只支持一个元素且只可为 1或2其中 1 表示随时退+过期自动退2 表示不支持退
CouponReturnMethods []int64 `json:"coupon_return_methods"`
// 券码使用条件
Condition *string `json:"condition"`
// 可核销总次数
TotalCanUseCount *int32 `json:"total_can_use_count"`
// 卡券有效截止时间,秒单位时间戳
ValidEnd *int64 `json:"valid_end"`
}
type ValuesItem struct {
// 度量衡单位id
UnitId *int64 `json:"unit_id"`
// 度量衡值
Value *string `json:"value"`
// 模块id
ModuleId *int64 `json:"module_id"`
// 度量衡值前缀
Prefix *string `json:"prefix"`
// 度量衡单位名称
UnitName *string `json:"unit_name"`
// 度量衡后缀
Suffix *string `json:"suffix"`
}
type CpvPathItem struct {
// 属性id
Cpid int64 `json:"cpid"`
// 属性值id
Cpvid int64 `json:"cpvid"`
}
type BatchStocksItem struct {
// 批次库存项
BatchStockItems []BatchStockItemsItem `json:"batch_stock_items"`
// 外部仓id区域库存模式填写
OutWarehouseId *string `json:"out_warehouse_id"`
}
type ExtraInfo struct {
// 属性处理时长,单位秒
ProcessTime *int64 `json:"process_time"`
}
type UnitPriceInfo struct {
// 1表示投资金2表示首饰金
PriceRuleType int32 `json:"price_rule_type"`
// 如果传了unit_price_info字段请请写死传0。内部不会消费只是用于标识
ProcessCharge int64 `json:"process_charge"`
}
type SpecValuesItem struct {
// 规格项标准属性id
PropertyId *int64 `json:"property_id"`
// 颜色
PropertyName string `json:"property_name"`
// 规格值
Values []ValuesItem_4 `json:"values"`
}
type SellPropertiesItem struct {
// 规格项名称
PropertyName *string `json:"property_name"`
// 规格值名称
ValueName *string `json:"value_name"`
}
type CustomPropertyGroupsItem struct {
// 定制属性组名称
Name *string `json:"name"`
// 定制属性信息,如:宰杀,不宰杀
PropertyDetail []PropertyDetailItem `json:"propertyDetail"`
}
type ProductAddV2Param struct {
// 推荐使用,外部商家编码,支持字符串
OuterProductId string `json:"outer_product_id"`
// 推荐使用,外部商家编码,支持字符串。超市小时达场景不推荐使用。out_product_id 、outer_product_id 都传了的话,要求相等。
OuterProductId *string `json:"outer_product_id"`
// 0-普通3-虚拟6玉石闪购7云闪购
ProductType int64 `json:"product_type"`
// 叶子类目ID通过/shop/getShopCategory接口获取
CategoryLeafId int64 `json:"category_leaf_id"`
// 已废弃用新字段product_format_new属性名称|属性值 之间用|分隔, 多组之间用^分开
ProductFormat string `json:"product_format"`
// 商品名称最多60个字符(30个汉字)不能含emoj表情
// 商品名称至少8个字符4个汉字最多60个字符(30个汉字)不能含emoj表情
Name string `json:"name"`
// 商家推荐语不能含emoj表情
RecommendRemark string `json:"recommend_remark"`
// 商品轮播图,多张图片用 \"|\" 分开第一张图为主图最多5张至少600x600大小不超过1M。
RecommendRemark *string `json:"recommend_remark"`
// 商品轮播图,多张图片用 \"|\" 分开第一张图为主图最多5张至少600x600大小不超过5M。
Pic string `json:"pic"`
// 商品描述,目前只支持图片。多张图片用 \"|\" 分开。不能用其他网站的文本粘贴这样会出现css样式不兼容。
// 商品描述,目前只支持图片。多张图片用 \"|\" 分开。不能用其他网站的文本粘贴这样会出现css样式不兼容。总图片数量不得超过50张。
Description string `json:"description"`
// 支付方式0货到付款 1在线支付2货到付款+在线支付
PayType int64 `json:"pay_type"`
PayType *int64 `json:"pay_type"`
// 海南免税生效。 0:离岛免税、1:邮寄、2:离岛自提+邮寄
DeliveryMethod int32 `json:"delivery_method"`
DeliveryMethod *int32 `json:"delivery_method"`
// 海南免税:海关限购分类编码
CdfCategory string `json:"cdf_category"`
CdfCategory *string `json:"cdf_category"`
// 1 减库存类型1-拍下减库存 2-付款减库存
ReduceType int64 `json:"reduce_type"`
// 同店商品推荐为空表示使用系统推荐多个product_id使用“|”分开
AssocIds string `json:"assoc_ids"`
AssocIds *string `json:"assoc_ids"`
// 运费模板id传0表示包邮通过/freightTemplate/list接口获取
FreightId int64 `json:"freight_id"`
// 重量
Weight float64 `json:"weight"`
Weight *float64 `json:"weight"`
// 重量单位0-kg, 1-g
WeightUnit int64 `json:"weight_unit"`
WeightUnit *int64 `json:"weight_unit"`
// delivery_delay_day 承诺发货时间,单位是天,不传则默认为2天。现货发货(presell_type=0)和阶梯发货模式(presell_type=2)时必填支持传入9999 、1、 2 分别表示当日发、次日发、48小时发具体支持传入的参数范围/product/getProductUpdateRule
DeliveryDelayDay int64 `json:"delivery_delay_day"`
DeliveryDelayDay *int64 `json:"delivery_delay_day"`
// 发货模式0-现货发货1-预售发货2-阶梯发货默认0
PresellType int64 `json:"presell_type"`
PresellType *int64 `json:"presell_type"`
// 全款预售模式时的发货时间/阶梯模式下阶梯发货时间,具体支持传入的参数范围/product/getProductUpdateRule。
PresellDelay int64 `json:"presell_delay"`
PresellDelay *int64 `json:"presell_delay"`
// 预售结束时间格式2020-02-21 18:54:27最多支持设置距离当前30天
PresellEndTime string `json:"presell_end_time"`
// 是否支持7天无理由0不支持1支持2支持拆封后不支持
Supply7dayReturn int64 `json:"supply_7day_return"`
PresellEndTime *string `json:"presell_end_time"`
// 【该字段将在2023年4月30日下线请开发使用最新的after_sale_service字段传值是否支持7天无理由0不支持1支持2支持拆封后不支持
Supply7dayReturn *int64 `json:"supply_7day_return"`
// 客服电话号码
Mobile string `json:"mobile"`
// false仅保存true保存+提审
Commit bool `json:"commit"`
// brand_id已废弃用新字段standard_brand_id品牌id (请求店铺授权品牌接口获取) (效果即为商品详情页面中的品牌字段)
BrandId int64 `json:"brand_id"`
// 商家可见备注
Remark string `json:"remark"`
// 外部product_id
OutProductId int64 `json:"out_product_id"`
Remark *string `json:"remark"`
// 外部product_id。超市小时达场景不推荐使用。out_product_id 、outer_product_id 都传了的话,要求相等。
OutProductId *int64 `json:"out_product_id"`
// 资质,可通过/product/qualificationConfig获取
QualityList []QualityListItem `json:"quality_list"`
// 如果不填,则规格名为各级规格名用 \"-\" 自动生成
SpecName string `json:"spec_name"`
SpecName *string `json:"spec_name"`
// 店铺通用规格,能被同类商品通用。多规格用^分隔,规格与规格值用|分隔,多个规格值用,分隔。如果创建或编辑现货+预售商品或新预售商品时,须包含发货时效,如:颜色|黑色,白色,黄色^尺码|S,M,L^发货时效|5天内发货,15天内发货
Specs string `json:"specs"`
// sku详情数量应该等于规格1规格2规格3sku数量和规格组合数必须一致 sku不可售时库存可设置为0。 delivery_infos为SKU物流信息info_value为字符串类型示例"12"info_type填weightinfo_unit支持mg,g,kg超市小时达场景主品用普通库存子品用区域库存"sku_type": 1 // 区域库存,"stock_num_map": {"123": 99999 // 门店ID:库存数量}
SpecPrices string `json:"spec_prices"`
Specs *string `json:"specs"`
// sku详情数量应该等于规格1规格2规格3sku数量和规格组合数必须一致 sku不可售时库存可设置为0。price单位为分。 delivery_infos为SKU物流信息info_value为字符串类型示例"12"info_type填weightinfo_unit支持mg,g,kg超市小时达场景主品用普通库存子品用区域库存"sku_type": 1 // 区域库存,"stock_num_map": {"123": 99999 // 门店ID:库存数量}; “gold_process_charge”为黄金加工费只有计价金类目可填并且必填。sell_properties为sku规格信息代替spec_detail_name1、spec_detail_name2、spec_detail_name3支持填写超过三级规格样式:[{"property_id":123,"property_name":"颜色","value_id":456,"value_name":"红色","remark":"偏深"},{"property_id":789,"property_name":"净含量","value_id":891,"value_name":"30ml","remark":null,"measurement":{"measure_unit":"ml","measure_unit_id":4,"value":"30"}}] 其中property_id规格项属性id,自定义时传0,property_name为规格项名称,value_id为规格值属性id自定义时传0,value_name为规格值名称,remark为规格值备注(选填),measurement为度量衡信息当规格值为度量衡属性自定义值时传递。
SpecPrices *string `json:"spec_prices"`
// 如颜色-尺寸, 颜色就是主规格, 颜色如黑,白,黄,它们图片url以逗号分隔 注:\"pic\"、\"description\"、\"spec_pic\"这三个字段里的传入的图片数量总和不得超过50张。
SpecPic string `json:"spec_pic"`
SpecPic *string `json:"spec_pic"`
// 每个用户每次下单限购件数
MaximumPerOrder int64 `json:"maximum_per_order"`
MaximumPerOrder *int64 `json:"maximum_per_order"`
// 每个用户累计限购件数
LimitPerBuyer int64 `json:"limit_per_buyer"`
LimitPerBuyer *int64 `json:"limit_per_buyer"`
// 每个用户每次下单至少购买的件数
MinimumPerOrder int64 `json:"minimum_per_order"`
MinimumPerOrder *int64 `json:"minimum_per_order"`
// 属性,通过/product/getCatePropertyV2获取 格式:{"property_id":[{"value":value,"name":"property_name","diy_type":0}]} name的类型是stringvalue和diy_type的类型是number
ProductFormatNew string `json:"product_format_new"`
ProductFormatNew *string `json:"product_format_new"`
// spu_id
SpuId int64 `json:"spu_id"`
SpuId *int64 `json:"spu_id"`
// 可预约发货天数
AppointDeliveryDay int64 `json:"appoint_delivery_day"`
AppointDeliveryDay *int64 `json:"appoint_delivery_day"`
// third_url
ThirdUrl string `json:"third_url"`
ThirdUrl *string `json:"third_url"`
// extra
Extra string `json:"extra"`
Extra *string `json:"extra"`
// src
Src string `json:"src"`
Src *string `json:"src"`
// 品牌id通过/brand/list获取无品牌id则传596120136
StandardBrandId int64 `json:"standard_brand_id"`
StandardBrandId *int64 `json:"standard_brand_id"`
// 卡券类型需要传true
NeedCheckOut bool `json:"need_check_out"`
NeedCheckOut *bool `json:"need_check_out"`
// 卡券信息
PoiResource *PoiResource `json:"poi_resource"`
// 汽车vin码
CarVinCode string `json:"car_vin_code"`
CarVinCode *string `json:"car_vin_code"`
// 0全款预售1sku预售2现货+预售 3新预售
PresellConfigLevel int64 `json:"presell_config_level"`
PresellConfigLevel *int64 `json:"presell_config_level"`
// 充值模式
NeedRechargeMode bool `json:"need_recharge_mode"`
NeedRechargeMode *bool `json:"need_recharge_mode"`
// 账号模板id
// AccountTemplateId string `json:"account_template_id"`
AccountTemplateId *string `json:"account_template_id"`
// 全款预售和sku预售时传递其他不传 0 预售结束后发货 1支付完成后发货
PresellDeliveryType int64 `json:"presell_delivery_type"`
// 白底图url(仅素材中心url有效)
WhiteBackGroundPicUrl string `json:"white_back_ground_pic_url"`
PresellDeliveryType *int64 `json:"presell_delivery_type"`
// 白底图url(仅素材中心url有效)白底图比例要求1:1
WhiteBackGroundPicUrl *string `json:"white_back_ground_pic_url"`
// 3:4长图url(仅素材中心url有效)
LongPicUrl string `json:"long_pic_url"`
LongPicUrl *string `json:"long_pic_url"`
// 推荐传入,售后服务参数,key:value格式。supply_day_return_selector(7天无理由选项)N天-政策代号N只支持7和15政策代号枚举https://bytedance.feishu.cn/docs/doccnF946oh1c98e7mo9DlYZtig 。 supply_red_ass_return红屁屁无忧0不支持1支持。supply_allergy_return过敏无忧,仅跨境可选0不支持1支持。 damaged_order_return坏损包退0不支持1支持。 support_allergy_returnV2过敏包退境内可选0不支持1支持
AfterSaleService map[string]string `json:"after_sale_service"`
AfterSaleService *map[string]string `json:"after_sale_service"`
// 售卖方式;0:全渠道手售卖,1:仅指定直播间售卖
SellChannel []int64 `json:"sell_channel"`
// 审核通过后上架售卖时间配置:0-立即上架售卖 1-放入仓库
StartSaleType int64 `json:"start_sale_type"`
StartSaleType *int64 `json:"start_sale_type"`
// 特殊日期延迟发货规则
DelayRule *DelayRule `json:"delay_rule"`
// 主图视频ID可以先通过https://op.jinritemai.com/docs/api-docs/69/1617接口上传视频获取审核通过的视频素材ID进行传入 任务需要验证
MaterialVideoId string `json:"material_video_id"`
MaterialVideoId *string `json:"material_video_id"`
// 提取方式新字段,推荐使用。"0": 普通商品-使用物流发货, "1": 虚拟商品-无需物流与电子交易凭证, "2": 虚拟商品-使用电子交易凭证, "3": 虚拟商品-充值直连
PickupMethod string `json:"pickup_method"`
PickupMethod *string `json:"pickup_method"`
// 尺码模板ID
SizeInfoTemplateId int64 `json:"size_info_template_id"`
SizeInfoTemplateId *int64 `json:"size_info_template_id"`
// 外部商品url
SubstituteGoodsUrl string `json:"substitute_goods_url"`
SubstituteGoodsUrl *string `json:"substitute_goods_url"`
// 销售渠道类型可选onlineOnly纯电商仅在线上售卖或sameAsOffline专柜同款线上线下都有售卖云零售商家https://fxg.jinritemai.com/ffa/merchant-growth/cloud-retail可以设置
SaleChannelType string `json:"sale_channel_type"`
SaleChannelType *string `json:"sale_channel_type"`
// 招商信息
RecruitInfo *RecruitInfo `json:"recruit_info"`
// 门店ID
StoreId int64 `json:"store_id"`
StoreId *int64 `json:"store_id"`
// 主商品ID
MainProductId int64 `json:"main_product_id"`
MainProductId *int64 `json:"main_product_id"`
// 限售模板ID
SaleLimitId int64 `json:"sale_limit_id"`
SaleLimitId *int64 `json:"sale_limit_id"`
// 通过/product/getRecommendName接口推荐的商品标题前缀注意系统根据类目属性生成前缀字符串时末尾有一个空格
NamePrefix string `json:"name_prefix"`
// 小时达专用
NamePrefix *string `json:"name_prefix"`
// 参考价单位分需大于商品价格并小于商品价格的10倍
ReferencePrice *int64 `json:"reference_price"`
// 参考价凭证信息
ReferencePriceCertificate *ReferencePriceCertificate `json:"reference_price_certificate"`
// 商品主图3:4多张图片用 \"|\" 分开最多5张大小不超过5M。
MainImageThreeToFour *string `json:"main_image_three_to_four"`
// 商品价格规则信息
UnitPriceInfo *UnitPriceInfo `json:"unit_price_info"`
// 前置质检相关(特定二手商家、特定二手类目使用)
QualityInspectionInfo *QualityInspectionInfo `json:"quality_inspection_info"`
// 是否支持c2b小程序特定c2b定制商家使用请使用/product/getProductUpdateRule接口获取是否支持
IsC2bSwitchOn *bool `json:"is_c2b_switch_on"`
// 支持c2b定制时的小程序id特定c2b定制商家使用请使用/product/getProductUpdateRule接口获取是否支持
MicroAppId *string `json:"micro_app_id"`
// 是否是自动充值商品
IsAutoCharge *bool `json:"is_auto_charge"`
// 导购短标题短标题可用于物流打单及商品搜索场景若未填写则系统将智能生成最优短标题在商详购买页面展示说明详见https://school.jinritemai.com/doudian/web/article/aHUW2MCvHqF3?from=shop_article
ShortProductName *string `json:"short_product_name"`
// 售后服务新结构老的after_sale_service中的字段后续会慢慢迁移到这里
AfterSaleServiceV2 *AfterSaleServiceV2 `json:"after_sale_service_v2"`
// 规格详细信息代替specs和spec_name
SpecInfo *SpecInfo `json:"spec_info"`
// 新sku参数代替spec_prices
SpecPricesV2 []SpecPricesV2Item `json:"spec_prices_v2"`
// true:主动设置库存类型(仅对区域库存生效,普通库存、阶梯库存不受此字段影响)
WithSkuType *bool `json:"with_sku_type"`
// 通过/product/getRecommendName接口推荐的商品标题后缀注意系统根据类目属性生成后缀字符串时前面可能有一个空格
NameSuffix *string `json:"name_suffix"`
// 是否勾选使用品牌名, 注意勾选时需要接入/product/getRecommendName接口
UseBrandName *bool `json:"use_brand_name"`
// 跨境物流信息
OpenLogisticsInfo *OpenLogisticsInfo `json:"open_logistics_info"`
// 商品价格是否含税跨境必需填1。 1商品价格含税 2商品价格不含税
PriceHasTax *string `json:"price_has_tax"`
// 商品是否跨境、教育等(跨境/海南商品填写2
BizKind *int64 `json:"biz_kind"`
// 商品定制属性填写,(即时零售,外卖业务填写)
CustomProperty *CustomProperty `json:"custom_property"`
// 测评短视频开关
IsEvaluateOpened *bool `json:"is_evaluate_opened"`
// 商品默认处理时长
DefaultProcessTime *DefaultProcessTime `json:"default_process_time"`
// 管理单元ID
CompanyId *int64 `json:"company_id"`
// 是否二手数码(成色机)
IsSecondHandDigital *bool `json:"is_second_hand_digital"`
// 预测记录id类目预测记录key=category_recommend_id
RecommendIds *map[string]string `json:"recommend_ids"`
// 虚拟商品设置是否订单展示核销去使用
ShowCheckoutEntry *bool `json:"show_checkout_entry"`
// 自提备货时长(单位天);自提商品且不管理门店库存时必填
PickupPrepareTime *int64 `json:"pickup_prepare_time"`
// 上门安装模版传递为空不处理传递0代表C模式传递>0代表A/B模式
HomeInstallServiceTemplateId *int64 `json:"home_install_service_template_id"`
// 属性图key=属性id
CategoryPropertyPics *map[int64]CategoryPropertyPicsItem `json:"category_property_pics"`
}
type ReferencePriceCertificate struct {
// 图片url需要使用商品素材中心的url并且只能有一张
CertificateUrls []string `json:"certificate_urls"`
// 通过/product/getProductUpdateRule获取可选的参考价格类型
CertificateType *int64 `json:"certificate_type"`
}
type AfterSaleServiceV2 struct {
ThreeGuarantees struct {
Duration int64 `json:"duration"` // 售后天数
ServiceType int64 `json:"service_type"` // 服务类型 1-寄修 2-延保
}
IsLargeProduct int64 `json:"is_large_product"` // 当前商品是否是大件商品
// 当前商品是否是大件商品
IsLargeProduct *int64 `json:"is_large_product"`
// 三包服务配置
ThreeGuarantees *ThreeGuarantees `json:"three_guarantees"`
}
type RecruitInfo struct {
// 招商类型
RecruitType string `json:"recruit_type"`
// 发品源
RecruitSource *string `json:"recruit_source"`
// 线索ID
RecruitFollowId string `json:"recruit_follow_id"`
}
type ThreeGuarantees struct {
// 售后天数
Duration *int64 `json:"duration"`
// 服务类型 1-寄修 2-延保
ServiceType *int64 `json:"service_type"`
}
type PackageSkuItem struct {
// 组套子品skuid
SubSkuId *int64 `json:"sub_sku_id"`
// 组套名称
ShortName *string `json:"short_name"`
// 组合数量
ComboNum *int64 `json:"combo_num"`
// 组套子品id
SubProductId *int64 `json:"sub_product_id"`
}
type MeasureInfo struct {
// 模块内容
Values []ValuesItem `json:"values"`
// 模版id
TemplateId *int64 `json:"template_id"`
}
type SpecInfo struct {
// 规格内容
SpecValues []SpecValuesItem `json:"spec_values"`
}
type CustomsReportInfo struct {
// 法定第一计量单位
FirstMeasureUnit *string `json:"first_measure_unit"`
// 品牌
ReportBrandName *string `json:"report_brand_name"`
// 条形码
BarCode *string `json:"bar_code"`
// 法定第二计量数量
SecondMeasureQty *float64 `json:"second_measure_qty"`
// 品名
ReportName *string `json:"report_name"`
// 法定第一计量数量
FirstMeasureQty *float64 `json:"first_measure_qty"`
// 规格型号
GModel *string `json:"g_model"`
// 海关代码
HsCode *string `json:"hs_code"`
// 用途
Usage *string `json:"usage"`
// 法定第二计量单位
SecondMeasureUnit *string `json:"second_measure_unit"`
// 售卖单位
Unit *string `json:"unit"`
}

View File

@@ -21,6 +21,8 @@ type SkuItem struct {
SpecDetailId2 int64 `json:"spec_detail_id2"`
// 子规格id
SpecDetailId3 int64 `json:"spec_detail_id3"`
// 所有的规格值id代替spec_detail_id123
SpecDetailIds []int64 `json:"spec_detail_ids"`
}
type ProductAddV2Data struct {
// product_id

View File

@@ -0,0 +1,54 @@
package product_batchGetChannelCategoryMapping_request
import (
"encoding/json"
product_batchGetChannelCategoryMapping_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_batchGetChannelCategoryMapping/response"
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
)
type ProductBatchGetChannelCategoryMappingRequest struct {
doudian_sdk.BaseDoudianOpApiRequest
Param *ProductBatchGetChannelCategoryMappingParam
}
func (c *ProductBatchGetChannelCategoryMappingRequest) GetUrlPath() string {
return "/product/batchGetChannelCategoryMapping"
}
func New() *ProductBatchGetChannelCategoryMappingRequest {
request := &ProductBatchGetChannelCategoryMappingRequest{
Param: &ProductBatchGetChannelCategoryMappingParam{},
}
request.SetConfig(doudian_sdk.GlobalConfig)
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
return request
}
func (c *ProductBatchGetChannelCategoryMappingRequest) Execute(accessToken *doudian_sdk.AccessToken) (*product_batchGetChannelCategoryMapping_response.ProductBatchGetChannelCategoryMappingResponse, error) {
responseJson, err := c.GetClient().Request(c, accessToken)
if err != nil {
return nil, err
}
response := &product_batchGetChannelCategoryMapping_response.ProductBatchGetChannelCategoryMappingResponse{}
_ = json.Unmarshal([]byte(responseJson), response)
return response, nil
}
func (c *ProductBatchGetChannelCategoryMappingRequest) GetParamObject() interface{} {
return c.Param
}
func (c *ProductBatchGetChannelCategoryMappingRequest) GetParams() *ProductBatchGetChannelCategoryMappingParam {
return c.Param
}
type ReqItemsItem struct {
// 类目ID
CategoryId *int64 `json:"category_id"`
}
type ProductBatchGetChannelCategoryMappingParam struct {
// 一次查询最多50个
ReqItems []ReqItemsItem `json:"req_items"`
}

View File

@@ -0,0 +1,30 @@
package product_batchGetChannelCategoryMapping_response
import (
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
)
type ProductBatchGetChannelCategoryMappingResponse struct {
doudian_sdk.BaseDoudianOpApiResponse
Data *ProductBatchGetChannelCategoryMappingData `json:"data"`
}
type CategoryMappingsItem struct {
// 状态1有效2无效
Valid int64 `json:"valid"`
// 映射类型:0门捷列夫类目到标准类目1标准类目到门捷列夫类目
MappingType int32 `json:"mapping_type"`
// 映射关系类型0一对一1一对多2多对一3多对多
RelationType int32 `json:"relation_type"`
// 映射类目id
MappingCategoryId int64 `json:"mapping_category_id"`
}
type RespItemsItem struct {
// 映射列表
CategoryMappings []CategoryMappingsItem `json:"category_mappings"`
// 入参类目ID
SourceCategoryId int64 `json:"source_category_id"`
}
type ProductBatchGetChannelCategoryMappingData struct {
// 映射关系返回结果列表
RespItems []RespItemsItem `json:"resp_items"`
}

View File

@@ -44,193 +44,481 @@ func (c *ProductEditV2Request) GetParams() *ProductEditV2Param {
return c.Param
}
type QualityAttachmentsItem struct {
// 1-图片2-pdf
MediaType int64 `json:"media_type"`
// 凭证url
Url string `json:"url"`
type CpvPathItem struct {
// 如具体白色系的销售属性值id
Cpvid int64 `json:"cpvid"`
// 如色系的销售属性id
Cpid int64 `json:"cpid"`
}
type QualityListItem struct {
// 资质key
QualityKey string `json:"quality_key"`
// 资质名称
QualityName string `json:"quality_name"`
// 资质
QualityAttachments []QualityAttachmentsItem `json:"quality_attachments"`
type ValuesItem struct {
// 单位id
UnitId *int64 `json:"unit_id"`
// 模块id
ModuleId *int64 `json:"module_id"`
// 值内容如13
Value *string `json:"value"`
// 后缀,如-
Suffix *string `json:"suffix"`
// 前缀,示例中为空
Prefix *string `json:"prefix"`
// 单位名称如g
UnitName *string `json:"unit_name"`
}
type PoiResource struct {
// 有效时间段从领取日开始计算优先级高于ValidStart-ValidEnd
ValidDays int64 `json:"valid_days"`
// 卡券有效开始时间,秒单位时间戳
ValidStart int64 `json:"valid_start"`
// 卡券有效截止时间,秒单位时间戳
ValidEnd int64 `json:"valid_end"`
// 客服电话
ServiceNum string `json:"service_num"`
// 领取须知
Notification string `json:"notification"`
// 平台产生券码: 1 ; 合作方api实时传入的券码: 4
CodeType int64 `json:"code_type"`
// 券码总量0/-1表示不限制平台券时须\u003e0
Count int64 `json:"count"`
// 0-不支持二次兑换1-支持二次兑换
CouponSecondExchange int64 `json:"couponSecondExchange"`
// 可核销总次数
TotalCanUseCount int32 `json:"total_can_use_count"`
// 兑换链接
Link string `json:"link"`
// 券码使用条件
Condition string `json:"condition"`
// 数组当前只支持一个元素且只可为 1或2其中 1 表示随时退+过期自动退2 表示不支持退
CouponReturnMethods []int64 `json:"coupon_return_methods"`
type MeasureInfo struct {
// 度量衡模版id根据/getProductUpdateRule中回填
TemplateId *int64 `json:"template_id"`
// 度量衡模块信息如示例中13克为一个模块
Values []ValuesItem `json:"values"`
}
type ValuesItem_4 struct {
// 规格值的导航样式路径信息,如色系->色值
CpvPath []CpvPathItem `json:"cpv_path"`
// 规格值名称
ValueName string `json:"value_name"`
// 度量衡结构化信息如单果规格的规格值10-13g包含两个模块{ "measure_info": { "template_id": 50, "values": [ { "module_id": 44, "prefix": "", "suffix": "-", "value": "10" }, { "module_id": 45, "prefix": "", "suffix": "", "value": "13", "unit_id": 2, "unit_name": "g" } ] }
MeasureInfo *MeasureInfo `json:"measure_info"`
// 标准销售属性值id
ValueId *int64 `json:"value_id"`
// 规格值备注信息,如偏大
Remark *string `json:"remark"`
}
type SpecValuesItem struct {
// 规格项名称,如颜色
PropertyName string `json:"property_name"`
// 标准销售属性id
PropertyId *int64 `json:"property_id"`
// 规格值
Values []ValuesItem_4 `json:"values"`
}
type PropertyDetailItem struct {
// 商品定制属性明细名称
Name *string `json:"name"`
// 属性扩展信息
ExtraInfo *ExtraInfo `json:"extra_info"`
}
type SellPropertiesItem struct {
// 规格值名称
ValueName *string `json:"value_name"`
// 规格名称
PropertyName *string `json:"property_name"`
}
type Cargo struct {
// 货品id
CargoId *string `json:"cargo_id"`
// 货品类型
SourceType *int64 `json:"source_type"`
}
type UnitPriceInfo struct {
// 废弃字段请写死传0
ProcessCharge int64 `json:"process_charge"`
// 价格规则类型1表示投资金2表示首饰金
PriceRuleType int32 `json:"price_rule_type"`
}
type MultiTimeStocksItem struct {
// 库存数
StockNum *int64 `json:"stock_num"`
// 时效值
TimeType *int64 `json:"time_type"`
// 时效描述
TimeDesc *string `json:"time_desc"`
}
type CustomsReportInfo struct {
// 法定第一计量单位
FirstMeasureUnit *string `json:"first_measure_unit"`
// 法定第二计量单位
SecondMeasureUnit *string `json:"second_measure_unit"`
// 法定第二计量数量
SecondMeasureQty *float64 `json:"second_measure_qty"`
// 法定第一计量数量
FirstMeasureQty *float64 `json:"first_measure_qty"`
// 品名
ReportName *string `json:"report_name"`
// 规格型号
GModel *string `json:"g_model"`
// 条形码
BarCode *string `json:"bar_code"`
// 海关代码
HsCode *string `json:"hs_code"`
// 品牌
ReportBrandName *string `json:"report_brand_name"`
// 售卖单位
Unit *string `json:"unit"`
// 用途
Usage *string `json:"usage"`
}
type DeliveryInfosItem struct {
// 信息计量单位
InfoUnit *string `json:"info_unit"`
// 信息类型
InfoType *string `json:"info_type"`
// 信息值
InfoValue *string `json:"info_value"`
}
type CustomPropertyGroupsItem struct {
// 商品定制属性组名称
Name *string `json:"name"`
// 商品定制属性明细
PropertyDetail []PropertyDetailItem `json:"propertyDetail"`
}
type CategoryPropertyPicsItem struct {
// 属性图url
Urls []string `json:"urls"`
}
type DefaultProcessTime struct {
// 商品维度默认处理时长单位不能超过24小时。
Value *int64 `json:"value"`
}
type QualityInspectionInfo struct {
// 质检证书编码
CertificateCode *string `json:"certificate_code"`
// 机构编码,请通过/inspection/QueryBtasAgencyList接口获取
Agency *string `json:"agency"`
// 1: 单库存模式只允许售卖一个sku2: 多库存模式,不限售卖次数
Mode *int32 `json:"mode"`
// 是否支持前置质检
Supported *bool `json:"supported"`
}
type OpenLogisticsInfo struct {
// 税金承担方一般都填0走商家承担0商家承担1用户承担
TaxPayer *int64 `json:"tax_payer"`
// 品牌所在地id
BrandCountryId *int64 `json:"brand_country_id"`
// 商品净重
NetWeightQty *float64 `json:"net_weight_qty"`
// 原产国id
OriginCountryId *int64 `json:"origin_country_id"`
// 货源国id
SourceCountryId *int64 `json:"source_country_id"`
// 通关模式1BBC 2BC 3CC邮关
CustomsClearType *int64 `json:"customs_clear_type"`
// 商家仓id
CrossWarehouseId *string `json:"cross_warehouse_id"`
}
type ExtraInfo struct {
// 属性维度的处理时长单位不能超过24小时。
ProcessTime *int64 `json:"process_time"`
}
type DelayRule struct {
// 是否开启特殊日期延迟发货
Enable bool `json:"enable"`
// 1 时间点2 时间范围
ConfigType int32 `json:"config_type"`
// 特殊日期延迟发货时间最晚发货时间时间戳单位秒当config_type=1时传时间戳代表最晚x发货当config_type=2时传天数代表延迟x天发货
ConfigValue int64 `json:"config_value"`
// 特殊日期延迟发货时间下单开始时间,时间戳,单位秒
StartTime int64 `json:"start_time"`
// 特殊日期延迟发货时间下单结束时间,时间戳,单位秒
EndTime int64 `json:"end_time"`
// 1 时间点2 时间范围
ConfigType int32 `json:"config_type"`
// 是否开启特殊日期延迟发货
Enable bool `json:"enable"`
// 特殊日期延迟发货时间最晚发货时间时间戳单位秒当config_type=1时传时间戳代表最晚x发货当config_type=2时传天数代表延迟x天发货
ConfigValue int64 `json:"config_value"`
}
type ReferencePriceCertificate struct {
// 参考价凭证类型,通过/product/getProductUpdateRule获取可选类型
CertificateType *int64 `json:"certificate_type"`
// 凭证图片必须是商品素材中心URL最多允许一张图片
CertificateUrls []string `json:"certificate_urls"`
}
type ThreeGuarantees struct {
// 售后天数
Duration *int64 `json:"duration"`
// 服务类型 1-寄修 2-延保
ServiceType *int64 `json:"service_type"`
}
type TaxExemptionSkuInfo struct {
// 是否套装0 否 1 是)
IsSuit *int32 `json:"is_suit"`
// 套装数量
SuitNum *int64 `json:"suit_num"`
// 净含量
Volume *int64 `json:"volume"`
}
type SpecPricesV2Item struct {
// sku规格信息规格项规格值
SellProperties []SellPropertiesItem `json:"sell_properties"`
// 供货价,单位nil代表不修改0代表清空
SupplyPrice *int64 `json:"supply_price"`
// skuId,支持基于skuId修改sku信息
SkuId *int64 `json:"sku_id"`
// 时效库存
MultiTimeStocks []MultiTimeStocksItem `json:"multi_time_stocks"`
// 货品信息如果传0 0 表示解绑)
Cargo *Cargo `json:"cargo"`
// 海南免税Sku 额外信息
TaxExemptionSkuInfo *TaxExemptionSkuInfo `json:"tax_exemption_sku_info"`
// 阶梯库存数
StepStockNum *int64 `json:"step_stock_num"`
// 海关申报要素
CustomsReportInfo *CustomsReportInfo `json:"customs_report_info"`
// 价格
Price *int64 `json:"price"`
// 组套包信息
PackageSku []PackageSkuItem `json:"package_sku"`
// 库存类型 0-普通库存1-区域库存10-阶梯库存
SkuType *int64 `json:"sku_type"`
// SKU维度预售发货延迟时间
PresellDelay *int64 `json:"presell_delay"`
// 商品规格值id懂车帝场景传递
SpecValueLibId *int64 `json:"spec_value_lib_id"`
// 商家编码
Code *string `json:"code"`
// SKU运输信息
DeliveryInfos []DeliveryInfosItem `json:"delivery_infos"`
// 库存数量
StockNum *int64 `json:"stock_num"`
// 供应商编码
SupplierId *string `json:"supplier_id"`
// 仓ID -> 库存数量
StockNumMap *map[string]int64 `json:"stock_num_map"`
// 外部sku_id-string
OuterSkuId *string `json:"outer_sku_id"`
// sku分类信息对应枚举值"main_sale_single_product" - 主售款(单品)"main_sale_multi_product" - "主售款(多件装)""main_sale_combination" - 主售款(组合品)"non_main_sale" - 非主售款"information_description" - 信息说明/防拍
SkuClassificationType *string `json:"sku_classification_type"`
// 条码信息
Barcodes []string `json:"barcodes"`
// 规格型号编码-国补场景下国补商品型号
SpecModelCode []string `json:"spec_model_code"`
// 黄金加工费单位nil代表不修改
GoldProcessCharge *int64 `json:"gold_process_charge"`
// true表示sku上架 false表示sku下架
SkuStatus *bool `json:"sku_status"`
}
type SpecInfo struct {
// 规格项,如颜色、尺码
SpecValues []SpecValuesItem `json:"spec_values"`
}
type QualityAttachmentsItem struct {
// 凭证url
Url string `json:"url"`
// 1-图片
MediaType int64 `json:"media_type"`
}
type QualityListItem struct {
// 资质名称
QualityName string `json:"quality_name"`
// 资质key
QualityKey string `json:"quality_key"`
// 资质
QualityAttachments []QualityAttachmentsItem `json:"quality_attachments"`
}
type AfterSaleServiceV2 struct {
// 三包服务配置
ThreeGuarantees *ThreeGuarantees `json:"three_guarantees"`
// 当前商品是否是大件商品
IsLargeProduct *int64 `json:"is_large_product"`
}
type PackageSkuItem struct {
// 组套包子品商品id
SubProductId *int64 `json:"sub_product_id"`
// 组套名称
ShortName *string `json:"short_name"`
// 组套包子品skuId
SubSkuId *int64 `json:"sub_sku_id"`
// 组套包子品数量
ComboNum *int64 `json:"combo_num"`
}
type PoiResource struct {
// 门店库id
PoiLibId *int64 `json:"poi_lib_id"`
// 券码总量0/-1表示不限制平台券时须\u003e0
Count *int64 `json:"count"`
// 领取须知
Notification *string `json:"notification"`
// 券码使用条件
Condition *string `json:"condition"`
// 数组当前只支持一个元素且只可为 1或2其中 1 表示随时退+过期自动退2 表示不支持退
CouponReturnMethods []int64 `json:"coupon_return_methods"`
// 有效时间段从领取日开始计算优先级高于ValidStart-ValidEnd
ValidDays *int64 `json:"valid_days"`
// 卡券有效开始时间,秒单位时间戳
ValidStart *int64 `json:"valid_start"`
// 0-不支持二次兑换1-支持二次兑换
CouponSecondExchange *int64 `json:"couponSecondExchange"`
// 可核销总次数
TotalCanUseCount *int32 `json:"total_can_use_count"`
// 平台产生券码: 1 ; 合作方api实时传入的券码: 4
CodeType *int64 `json:"code_type"`
// 卡券有效截止时间,秒单位时间戳
ValidEnd *int64 `json:"valid_end"`
// 兑换链接
Link *string `json:"link"`
// 客服电话
ServiceNum *string `json:"service_num"`
}
type CustomProperty struct {
// 商品定制属性组
CustomPropertyGroups []CustomPropertyGroupsItem `json:"customPropertyGroups"`
}
type ProductEditV2Param struct {
// 商品ID
ProductId int64 `json:"product_id"`
// 0-普通3-虚拟6玉石闪购7云闪购
ProductType int64 `json:"product_type"`
ProductType *int64 `json:"product_type"`
// 叶子类目ID通过/shop/getShopCategory接口获取
CategoryLeafId int64 `json:"category_leaf_id"`
// 属性名称|属性值 之间用|分隔, 多组之间用^分开
ProductFormat string `json:"product_format"`
// 商品名称最多60个字符(30个汉字)不能含emoj表情
Name string `json:"name"`
CategoryLeafId *int64 `json:"category_leaf_id"`
// 商品名称至少8个字符4个汉字最多60个字符(30个汉字)不能含emoj表情
Name *string `json:"name"`
// 商家推荐语不能含emoj表情
RecommendRemark string `json:"recommend_remark"`
// 商品轮播图,多张图片用 \"|\" 分开第一张图为主图最多5张至少600x600大小不超过1M 注:\"pic\"、\"description\"、\"spec_pic\"这三个字段里的传入的图片数量总和不得超过50张。
Pic string `json:"pic"`
// 商品轮播图,多张图片用 \"|\" 分开第一张图为主图最多5张至少600x600大小不超过1M 注:\"pic\"、\"description\"、\"spec_pic\"这三个字段里的传入的图片数量总和不得超过50张。
Description string `json:"description"`
RecommendRemark *string `json:"recommend_remark"`
// 商品轮播图,多张图片用 \"|\" 分开第一张图为主图最多5张至少600x600大小不超过5M
Pic *string `json:"pic"`
// 商详图片,多张图片用 | 分开。图片数量总和不得超过50张。
Description *string `json:"description"`
// 已废弃支付方式0货到付款 1在线支付2货到付款+在线支付
PayType int64 `json:"pay_type"`
PayType *int64 `json:"pay_type"`
// 海南免税生效。 0:离岛免税、1:邮寄、2:离岛自提+邮寄
DeliveryMethod int32 `json:"delivery_method"`
DeliveryMethod *int32 `json:"delivery_method"`
// 海南免税:海关限购分类编码
CdfCategory string `json:"cdf_category"`
CdfCategory *string `json:"cdf_category"`
// 1 减库存类型1-拍下减库存 2-付款减库存
ReduceType int64 `json:"reduce_type"`
// 同店商品推荐为空表示使用系统推荐多个product_id使用“|”分开
AssocIds string `json:"assoc_ids"`
ReduceType *int64 `json:"reduce_type"`
// 【已废弃】同店商品推荐为空表示使用系统推荐多个product_id使用“|”分开
AssocIds *string `json:"assoc_ids"`
// 运费模板id传0表示包邮通过/freightTemplate/list接口获取
FreightId int64 `json:"freight_id"`
// 重量
Weight float64 `json:"weight"`
FreightId *int64 `json:"freight_id"`
// 重量。数据范围需要小于10000如果超过请更换的weight_unit
Weight *float64 `json:"weight"`
// 重量单位0-kg, 1-g
WeightUnit int64 `json:"weight_unit"`
WeightUnit *int64 `json:"weight_unit"`
// delivery_delay_day 承诺发货时间,单位是天,不传则默认为2天。现货发货(presell_type=0)和阶梯发货模式(presell_type=2)时必填支持传入9999 、1、 2 分别表示当日发、次日发、48小时发具体支持传入的参数范围/product/getProductUpdateRule
DeliveryDelayDay int64 `json:"delivery_delay_day"`
DeliveryDelayDay *int64 `json:"delivery_delay_day"`
// 发货模式0-现货发货1-预售发货2-阶梯发货默认0
PresellType int64 `json:"presell_type"`
PresellType *int64 `json:"presell_type"`
// 全款预售模式时的发货时间/阶梯模式下阶梯发货时间,具体支持传入的参数范围/product/getProductUpdateRule
PresellDelay int64 `json:"presell_delay"`
PresellDelay *int64 `json:"presell_delay"`
// 预售结束时间格式2020-02-21 18:54:27最多支持设置距离当前30天
PresellEndTime string `json:"presell_end_time"`
// 是否支持7天无理由0不支持1支持2支持拆封后不支持
Supply7dayReturn int64 `json:"supply_7day_return"`
PresellEndTime *string `json:"presell_end_time"`
// 【该字段将在2023年4月30日下线请开发使用最新的after_sale_service字段传值是否支持7天无理由0不支持1支持2支持拆封后不支持
Supply7dayReturn *int64 `json:"supply_7day_return"`
// 客服电话号码
Mobile string `json:"mobile"`
Mobile *string `json:"mobile"`
// false仅保存true保存+提审
Commit bool `json:"commit"`
// 品牌id (请求店铺授权品牌接口获取) (效果即为商品详情页面中的品牌字段)
BrandId int64 `json:"brand_id"`
// 商家可见备注
Remark string `json:"remark"`
// 外部product_id
//OutProductId int64 `json:"out_product_id"`
// 外部product id
//OuterProductId string `json:"outer_product_id"` // 资质信息,可通过/product/qualificationConfig获取
Remark *string `json:"remark"`
// 外部product_id。超市小时达场景不推荐使用
OutProductId *int64 `json:"out_product_id"`
// 资质信息,可通过/product/qualificationConfig获取
QualityList []QualityListItem `json:"quality_list"`
// 如果不填,则规格名为各级规格名用 \"-\" 自动生成
SpecName string `json:"spec_name"`
// 店铺通用规格,能被同类商品通用。多规格用^分隔,规格与规格值用|分隔,多个规格值用,分隔。如果创建或编辑现货+预售商品或新预售商品时,须包含发货时效,如:颜色|黑色,白色,黄色^尺码|S,M,L^发货时效|5天内发货,15天内发货
Specs string `json:"specs"`
// sku详情数量应该等于规格1规格2规格3sku数量和规格组合数必须一致 sku不可售时库存可设置为0。 delivery_infos为SKU物流信息info_value为字符串类型示例"12"info_type填weightinfo_unit支持mg,g,kg
SpecPrices string `json:"spec_prices"`
// 【废弃不再使用请使用spec_info参数】如果不填,则规格名为各级规格名用 \"-\" 自动生成
SpecName *string `json:"spec_name"`
// 【废弃不再使用请使用spec_info参数】店铺通用规格,能被同类商品通用。多规格用^分隔,规格与规格值用|分隔,多个规格值用,分隔。如果创建或编辑现货+预售商品或新预售商品时,须包含发货时效,如:颜色|黑色,白色,黄色^尺码|S,M,L^发货时效|5天内发货,15天内发货
Specs *string `json:"specs"`
// 【字段废弃请使用spec_prices_v2】sku详情数量应该等于规格1规格2规格3sku数量和规格组合数必须一致 sku不可售时库存可设置为0。price单位为分。 delivery_infos为SKU物流信息info_value为字符串类型示例"12"info_type填weightinfo_unit支持mg,g,kg,超市小时达场景主品用普通库存,子品用区域库存("sku_type": 1 // 区域库存,"stock_num_map": {"123": 99999 // 门店ID:库存数量}。gold_process_charge表示商品加工费只有计价金类目可填并必填。sell_properties为sku规格信息代替spec_detail_name1、spec_detail_name2、spec_detail_name3支持填写超过三级规格样式:[{"property_id":123,"property_name":"颜色","value_id":456,"value_name":"红色","remark":"偏深"},{"property_id":789,"property_name":"净含量","value_id":891,"value_name":"30ml","remark":null,"measurement":{"measure_unit":"ml","measure_unit_id":4,"value":"30"}}] 其中property_id规格项属性id,自定义时传0,property_name为规格项名称,value_id为规格值属性id自定义时传0,value_name为规格值名称,remark为规格值备注(选填),measurement为度量衡信息当规格值为度量衡属性自定义值时传递。
SpecPrices *string `json:"spec_prices"`
// 如颜色-尺寸, 颜色就是主规格, 颜色如黑,白,黄,它们图片url以逗号分隔 注:\"pic\"、\"description\"、\"spec_pic\"这三个字段里的传入的图片数量总和不得超过50张。
SpecPic string `json:"spec_pic"`
SpecPic *string `json:"spec_pic"`
// 每个用户每次下单限购件数
MaximumPerOrder int64 `json:"maximum_per_order"`
MaximumPerOrder *int64 `json:"maximum_per_order"`
// 每个用户累计限购件数
LimitPerBuyer int64 `json:"limit_per_buyer"`
LimitPerBuyer *int64 `json:"limit_per_buyer"`
// 每个用户每次下单至少购买的件数
MinimumPerOrder int64 `json:"minimum_per_order"`
// 通过/product/getCatePropertyV2获取 格式:{"property_id":[{"value":value,"name":"property_name","diy_type":0}]}, name的类型是stringvalue和diy_type的类型是number
ProductFormatNew string `json:"product_format_new"`
MinimumPerOrder *int64 `json:"minimum_per_order"`
// 通过/product/getCatePropertyV2获取 格式:{"property_id":[{"value":value,"name":"property_name","diy_type":0}]}, name的类型是stringvalue和diy_type的类型是number 度量衡参照open度量衡对接文档填写
ProductFormatNew *string `json:"product_format_new"`
// spu id
SpuId int64 `json:"spu_id"`
SpuId *int64 `json:"spu_id"`
// 可预约发货天数
AppointDeliveryDay int64 `json:"appoint_delivery_day"`
AppointDeliveryDay *int64 `json:"appoint_delivery_day"`
// third_url
ThirdUrl string `json:"third_url"`
ThirdUrl *string `json:"third_url"`
// extra
Extra string `json:"extra"`
Extra *string `json:"extra"`
// src
Src string `json:"src"`
Src *string `json:"src"`
// 外部product id。超市小时达场景不推荐使用
OuterProductId *string `json:"outer_product_id"`
// standard_brand_id通过/brand/list获取无品牌id则传596120136
StandardBrandId int64 `json:"standard_brand_id"`
StandardBrandId *int64 `json:"standard_brand_id"`
// 卡券类型需要传true
NeedCheckOut bool `json:"need_check_out"`
NeedCheckOut *bool `json:"need_check_out"`
// 卡券信息
PoiResource *PoiResource `json:"poi_resource"`
// 使用qualityList覆盖当前商品资质qualityList传空代表清空
ForceUseQualityList bool `json:"force_use_quality_list"`
ForceUseQualityList *bool `json:"force_use_quality_list"`
// 汽车Vin码
CarVinCode string `json:"car_vin_code"`
CarVinCode *string `json:"car_vin_code"`
// 0全款预售1sku预售2现货+预售 3新预售
PresellConfigLevel int64 `json:"presell_config_level"`
PresellConfigLevel *int64 `json:"presell_config_level"`
// 充值模式
NeedRechargeMode bool `json:"need_recharge_mode"`
NeedRechargeMode *bool `json:"need_recharge_mode"`
// 多账号模板
//AccountTemplateId string `json:"account_template_id"`
AccountTemplateId *string `json:"account_template_id"`
// 全款预售和sku预售时传递其他不传 0 预售结束后发货 1支付完成后发货
PresellDeliveryType int64 `json:"presell_delivery_type"`
PresellDeliveryType *int64 `json:"presell_delivery_type"`
// 白底图url(仅素材中心url有效)
WhiteBackGroundPicUrl string `json:"white_back_ground_pic_url"`
WhiteBackGroundPicUrl *string `json:"white_back_ground_pic_url"`
// 3:4长图url(仅素材中心url有效)
LongPicUrl string `json:"long_pic_url"`
LongPicUrl *string `json:"long_pic_url"`
// 售后服务参数,key:value格式 supply_day_return_selector(7天无理由选项)N天-政策代号N只支持7和15 supply_red_ass_return红屁屁无忧0不支持1支持 supply_allergy_return过敏无忧,仅跨境可选0不支持1支持 damaged_order_return坏损包退0不支持1支持 support_allergy_returnV2过敏包退境内可选0不支持1支持
AfterSaleService map[string]string `json:"after_sale_service"`
AfterSaleService *map[string]string `json:"after_sale_service"`
// 售卖方式;0:全渠道手售卖,1:仅指定直播间售卖
SellChannel []int64 `json:"sell_channel"`
// 审核通过后上架售卖时间配置:0-立即上架售卖 1-放入仓库
StartSaleType int64 `json:"start_sale_type"`
StartSaleType *int64 `json:"start_sale_type"`
// 特殊日期延迟发货规则
DelayRule *DelayRule `json:"delay_rule"`
// 主图视频ID可以先通过https://op.jinritemai.com/docs/api-docs/69/1617接口上传视频获取审核通过的视频素材ID进行传入
MaterialVideoId string `json:"material_video_id"`
MaterialVideoId *string `json:"material_video_id"`
// 提取方式新字段,推荐使用。"0": 普通商品-使用物流发货, "1": 虚拟商品-无需物流与电子交易凭证, "2": 虚拟商品-使用电子交易凭证, "3": 虚拟商品-充值直连
PickupMethod string `json:"pickup_method"`
PickupMethod *string `json:"pickup_method"`
// 尺码模板ID
SizeInfoTemplateId int64 `json:"size_info_template_id"`
SizeInfoTemplateId *int64 `json:"size_info_template_id"`
// 外部商品url
SubstituteGoodsUrl string `json:"substitute_goods_url"`
SubstituteGoodsUrl *string `json:"substitute_goods_url"`
// 销售渠道类型可选onlineOnly纯电商仅在线上售卖或sameAsOffline专柜同款线上线下都有售卖云零售商家https://fxg.jinritemai.com/ffa/merchant-growth/cloud-retail可以设置
SaleChannelType string `json:"sale_channel_type"`
SaleChannelType *string `json:"sale_channel_type"`
// 通过/product/getRecommendName接口推荐的商品标题前缀注意系统根据类目属性生成前缀字符串时末尾有一个空格
NamePrefix string `json:"name_prefix"`
NamePrefix *string `json:"name_prefix"`
// 门店ID
StoreId int64 `json:"store_id"`
StoreId *int64 `json:"store_id"`
// 主商品ID
MainProductId int64 `json:"main_product_id"`
MainProductId *int64 `json:"main_product_id"`
// 限售模板ID
SaleLimitId int64 `json:"sale_limit_id"`
}
type ProductEditV2Param2 struct {
// 商品ID
ProductId int64 `json:"product_id"`
Commit bool `json:"commit"`
SaleLimitId *int64 `json:"sale_limit_id"`
// 商品参考价
ReferencePrice *int64 `json:"reference_price"`
// 参考价凭证相关信息
ReferencePriceCertificate *ReferencePriceCertificate `json:"reference_price_certificate"`
// 商品主图3:4多张图片用 \"|\" 分开最多5张大小不超过5M。
MainImageThreeToFour *string `json:"main_image_three_to_four"`
// 价格规则信息
UnitPriceInfo *UnitPriceInfo `json:"unit_price_info"`
// 前置质检相关(特定二手商家、特定二手类目使用)
QualityInspectionInfo *QualityInspectionInfo `json:"quality_inspection_info"`
// 是否支持c2b小程序特定c2b定制商家使用请使用/product/getProductUpdateRule接口获取是否支持
IsC2bSwitchOn *bool `json:"is_c2b_switch_on"`
// 支持c2b定制时的小程序id特定c2b定制商家使用请使用/product/getProductUpdateRule接口获取是否支持
MicroAppId *string `json:"micro_app_id"`
// 是否修改为自动充值商品
IsAutoCharge *bool `json:"is_auto_charge"`
// 导购短标题短标题可用于物流打单及商品搜索场景说明详见https://school.jinritemai.com/doudian/web/article/aHUW2MCvHqF3?from=shop_article
ShortProductName *string `json:"short_product_name"`
// 售后服务新结构老的after_sale_service中的字段后续会慢慢迁移到这里
AfterSaleServiceV2 *AfterSaleServiceV2 `json:"after_sale_service_v2"`
// sku新参数建议切到新参数后续老参数spec_prices废弃
SpecPricesV2 []SpecPricesV2Item `json:"spec_prices_v2"`
// 规格模版详细信息
SpecInfo *SpecInfo `json:"spec_info"`
// true:主动设置库存类型(仅对区域库存生效,普通库存、阶梯库存不受此字段影响)
WithSkuType *bool `json:"with_sku_type"`
// 通过/product/getRecommendName接口推荐的商品标题后缀注意系统根据类目属性生成后缀字符串时前面可能有一个空格
NameSuffix *string `json:"name_suffix"`
// 是否勾选使用品牌名, 注意勾选时需要接入/product/getRecommendName接口
UseBrandName *bool `json:"use_brand_name"`
// 跨境物流信息
OpenLogisticsInfo *OpenLogisticsInfo `json:"open_logistics_info"`
// 商品定制属性。适用于到家商品场景
CustomProperty *CustomProperty `json:"custom_property"`
// 测评模块是否打开
IsEvaluateOpened *bool `json:"is_evaluate_opened"`
// 商品维度默认处理时长
DefaultProcessTime *DefaultProcessTime `json:"default_process_time"`
// 预测记录id类目预测记录key=category_recommend_id
RecommendIds *map[string]string `json:"recommend_ids"`
// 虚拟商品设置是否订单展示核销去使用
ShowCheckoutEntry *bool `json:"show_checkout_entry"`
// 自提备货时长(单位天)
PickupPrepareTime *int64 `json:"pickup_prepare_time"`
// 上门安装模版传递为空不处理传递0代表绑定C模式传递>0代表绑定/换绑
HomeInstallServiceTemplateId *int64 `json:"home_install_service_template_id"`
// 属性图如水洗标等key=属性id
CategoryPropertyPics *map[int64]CategoryPropertyPicsItem `json:"category_property_pics"`
}

View File

@@ -6,6 +6,20 @@ type ProductGetCatePropertyV2Response struct {
doudian_sdk.BaseDoudianOpApiResponse
Data *ProductGetCatePropertyV2Data `json:"data"`
}
type PropertyPicRule struct {
// 是否支持上传属性图
Available bool `json:"available"`
// 属性图是否必填
Required bool `json:"required"`
}
type RuleCondition struct {
// 预期值
Value string `json:"value"`
// 运算符
Operator string `json:"operator"`
// 度量衡模块id
ModuleId int64 `json:"module_id"`
}
type OptionsItem struct {
// 可选值名称
Name string `json:"name"`
@@ -16,8 +30,80 @@ type OptionsItem struct {
// 属性值顺序
Sequence int64 `json:"sequence"`
}
type ProductGetCatePropertyV2Data struct {
// 返回参数列表
Data []DataItem `json:"data"`
// 模板类型SPU为1结构化为2默认为0无特殊需求忽略该字段即可
TplType int64 `json:"tpl_type"`
}
type GlobalCheckRulesItem struct {
// 报错文案
ErrMsg string `json:"err_msg"`
// 运算符
Operator string `json:"operator"`
// 预期值
TargetValue string `json:"target_value"`
// 度量衡模块id
ModuleId int64 `json:"module_id"`
// 模板id
TemplateId int64 `json:"template_id"`
}
type ValidateRule struct {
// 不同单位下的值约束
UnitRules []UnitRulesItem `json:"unit_rules"`
// date_type = date 时有值如YYYY-MM-DD
TimeFormat string `json:"time_format"`
// 最大值
Max float64 `json:"max"`
// 最小值
Min float64 `json:"min"`
// 小数位数当data_type为float时有值
Precision int64 `json:"precision"`
// 填写值的数据格式integer, float, date
DataType string `json:"data_type"`
}
type ValuesItem struct {
// 值名称
ValueName string `json:"value_name"`
}
type ValueModulesItem struct {
// 模块是否必填为false时表示这个模块可以不填
ValueRequired bool `json:"value_required"`
// 填写规则
ValidateRule *ValidateRule `json:"validate_rule"`
// 可选单位,可为空
Units []UnitsItem `json:"units"`
// 值的可选项,如材质属性可能会有:棉、麻等选项
Values []ValuesItem `json:"values"`
// 输入类型: 枚举、输入、枚举可输入: enum, input, enum_diy
InputType string `json:"input_type"`
// 后缀
Suffix string `json:"suffix"`
// 前缀
Prefix string `json:"prefix"`
// 模块id
ModuleId int64 `json:"module_id"`
}
type MeasureTemplatesItem struct {
// 材质度量衡填写规则
InputRule *InputRule `json:"input_rule"`
// 模版名称
DisplayName string `json:"display_name"`
// 度量衡模版下的模块,可为多个,一般情况为一个,一般情况一个模块就是一个值+单位形式
ValueModules []ValueModulesItem `json:"value_modules"`
// 度量衡模版id
TemplateId int64 `json:"template_id"`
}
type DataItem struct {
// 老类目id
// 属性图规则
PropertyPicRule *PropertyPicRule `json:"property_pic_rule"`
// 属性feature类型列表
FeatureTypeList []int64 `json:"feature_type_list"`
// 度量衡模版,可为多个,一般情况为一个
MeasureTemplates []MeasureTemplatesItem `json:"measure_templates"`
// 是否有下级级联属性
HasSubProperty bool `json:"has_sub_property"`
// 【已废弃】老类目id请使用category_id字段
Cid int64 `json:"cid"`
// 属性名称
PropertyName string `json:"property_name"`
@@ -41,14 +127,48 @@ type DataItem struct {
Sequence int64 `json:"sequence"`
// 关系id,SPU类目使用表示自己的上一个关键属性ID
RelationId int64 `json:"relation_id"`
// 是否支持枚举可输入,0表示不支持1表示支持支持枚举可输入的属性在发布/编辑接口的类目属性参数中可以传入自定义的属性值自定义属性值value为0diy_type为1
// 商品属性是否有支持商家自定义1=支持自定义0=不支持自定义。 使用场景当开发者传入自定义的属性值时需在创建或更新商品接口的属性时需把【product_format_new】字段中传入diy_type=1并且value=0
DiyType int64 `json:"diy_type"`
// 0:非重要属性1:重要属性
ImportantType int64 `json:"important_type"`
}
type ProductGetCatePropertyV2Data struct {
// 返回参数列表
Data []DataItem `json:"data"`
// 模板类型SPU为1结构化为2默认为0无特殊需求忽略该字段即可
TplType int64 `json:"tpl_type"`
type UnitRulesItem struct {
// 最大值
Max float64 `json:"max"`
// 最小值
Min float64 `json:"min"`
// 单位id
UnitId int64 `json:"unit_id"`
}
type UnitsItem struct {
// 单位名称
UnitName string `json:"unit_name"`
// 单位id
UnitId int64 `json:"unit_id"`
}
type RuleConstraint struct {
// 报错文案
ErrMsg string `json:"err_msg"`
// 预期值
Value string `json:"value"`
// 分组函数
GroupFunc string `json:"group_func"`
// 运算符
Operator string `json:"operator"`
// 度量衡模版id
ModuleId int64 `json:"module_id"`
}
type DependencyCheckRulesItem struct {
// 验证规则
RuleConstraint *RuleConstraint `json:"rule_constraint"`
// 触发条件
RuleCondition *RuleCondition `json:"rule_condition"`
// 度量衡模版id
TemplateId int64 `json:"template_id"`
}
type InputRule struct {
// 度量衡间校验规则
DependencyCheckRules []DependencyCheckRulesItem `json:"dependency_check_rules"`
// 全局校验规则
GlobalCheckRules []GlobalCheckRulesItem `json:"global_check_rules"`
}

View File

@@ -8,91 +8,97 @@ type ProductGetProductUpdateRuleResponse struct {
doudian_sdk.BaseDoudianOpApiResponse
Data *ProductGetProductUpdateRuleData `json:"data"`
}
type SpuControlRule struct {
// 是否支持spu发品
SupportSpuProduct bool `json:"support_spu_product"`
// 0不管控 1弱管控 2强管控
ControlType int64 `json:"control_type"`
// 是否支持新建spu
SupportCreateSpu bool `json:"support_create_spu"`
// 是否支持spu纠错
SupportRectifySpu bool `json:"support_rectify_spu"`
// 是否支持spu举报
SupportReportSpu bool `json:"support_report_spu"`
// 是否spu免审
NoNeedAuditSpu bool `json:"no_need_audit_spu"`
type AfterSaleRule struct {
// 三包服务承诺配置规则
ThreeGuarantees *ThreeGuarantees `json:"three_guarantees"`
// 过敏包退规则
AllergyReturnV2Rule *AllergyReturnV2Rule `json:"allergy_return_v2_rule"`
// 大件商品规则
LargeProductRule *LargeProductRule `json:"large_product_rule"`
// 无理由退货规则
SupplyDayReturnRule *SupplyDayReturnRule `json:"supply_day_return_rule"`
}
type StepRule struct {
// 是否支持
Support bool `json:"support"`
// 阶梯现货部分延迟返货时间范围
type UnitsItem struct {
// 度量衡单位id
UnitId int64 `json:"unit_id"`
// 度量衡单位名称
UnitName string `json:"unit_name"`
}
type NormalRule_5_5 struct {
// 描述信息
Description string `json:"description"`
// 可用的延迟发货天数
DelayOptions []int64 `json:"delay_options"`
// 是特殊时间延迟发货,可忽略
IsSpecialDelayOption bool `json:"is_special_delay_option"`
// 阶梯发货阶梯部分发货时间最小值
StepMinDelay int64 `json:"step_min_delay"`
// 阶梯发货阶梯部分发货时间最大值
StepMaxDelay int64 `json:"step_max_delay"`
}
type SkuPresellRule struct {
// 不可用信息
DenyDescription string `json:"deny_description"`
// 是否可见
Display string `json:"display"`
// 是否支持
Support bool `json:"support"`
// 预售门槛价
MinPresellPrice int64 `json:"min_presell_price"`
// 是否支持支付结束后发货
SupportDeliveryAfterPay bool `json:"support_delivery_after_pay"`
// 是否支持预售结束后发货
SupportDeliveryAfterPresell bool `json:"support_delivery_after_presell"`
// 支付结束后规则
DeliveryAfterPayConfig *DeliveryAfterPayConfig `json:"delivery_after_pay_config"`
// 预售结束后规则
DeliveryAfterPresellConfig *DeliveryAfterPresellConfig `json:"delivery_after_presell_config"`
Support string `json:"support"`
}
type TimeSkuSpecDetialItem struct {
// 规格值
SpecValue string `json:"spec_value"`
// 是否预售时效
IsPresellSpec bool `json:"is_presell_spec"`
// product_time_spec_same_day 当日发 product_time_spec_next_day 次日发 product_time_spec_48h 48小时内发货 product_time_spec_5d 5天内发货 product_time_spec_15d 15天内发货 product_time_spec_45d 45天内发货
SpecCode string `json:"spec_code"`
type SelectedFulfillmentRule struct {
// 支持c2b定制时可用的发货规则
NormalRule *NormalRule_5_5 `json:"normal_rule"`
}
type RecommendNameRule struct {
// 当前类目id是否命中前缀推荐规则
SatisfyPrefix bool `json:"satisfy_prefix"`
// 命中规则的属性id详情
PropertyIds []int64 `json:"property_ids"`
type UnitRulesItem struct {
// 度量衡单位id
UnitId int64 `json:"unit_id"`
// 最小值
Min float64 `json:"min"`
// 最大值
Max float64 `json:"max"`
}
type TimeSkuSpecDetialItem_4_4 struct {
// 规格值
SpecValue string `json:"spec_value"`
// 是否预售时效
IsPresellSpec bool `json:"is_presell_spec"`
type PropertyEffectItem struct {
// 类目属性名称是否需要被覆写成label_name目前只有资质证号有这个逻辑
LabelName string `json:"label_name"`
// 类目属性是否必填(目前只有生产企业名称和资质证号): 0-必填, 1-非必填
IsRequired int64 `json:"is_required"`
}
type TimeSkuPurePresellRule struct {
type DeliveryAfterPresellConfig struct {
// 延迟发货时间最小值
MinDeliveryDays int64 `json:"min_delivery_days"`
// 延迟发货时间最大值
MaxDeliveryDays int64 `json:"max_delivery_days"`
// 最长预售结束时间
MaxPresellEndDays int64 `json:"max_presell_end_days"`
// 是否需要人审,可忽略
NeedAudit bool `json:"need_audit"`
}
type AppListItem struct {
// 小程序名称
Name string `json:"name"`
// 小程序id
Value string `json:"value"`
}
type SupportAutoChargeRule struct {
// 是否支持自动充值
Value bool `json:"value"`
// 1
Disabled bool `json:"disabled"`
}
type MultiTimesItem struct {
// 时效描述
TimeDesc string `json:"time_desc"`
// 时效
TimeType int64 `json:"time_type"`
}
type TimeSkuPresellWithNormalRule struct {
// 是否支持
Support bool `json:"support"`
// 发货时效规格名称
TimeSkuSpecName string `json:"time_sku_spec_name"`
// 发货时效规格选项
TimeSkuSpecDetial []TimeSkuSpecDetialItem_4_4 `json:"time_sku_spec_detial"`
TimeSkuSpecDetial []TimeSkuSpecDetialItem `json:"time_sku_spec_detial"`
// 预售门槛价,单位分
MinPresellPrice int64 `json:"min_presell_price"`
}
type AfterSaleRule struct {
// 无理由退货规则
SupplyDayReturnRule *SupplyDayReturnRule `json:"supply_day_return_rule"`
}
type ProductSpecRule struct {
// totally_use_given_spec完全使用系统下发规格partly_use_given_spec部分使用系统下发规格not_use_given_spec不管控规格
SpecRuleCode string `json:"spec_rule_code"`
// 商品规格列表
RequiredSpecDetails []RequiredSpecDetailsItem `json:"required_spec_details"`
}
type ComponentTemplateRule struct {
// 是否展示尺码信息
IsShow bool `json:"is_show"`
// 尺码信息是否必填
MustInput bool `json:"must_input"`
type RuleClauseItem struct {
// 1 - 相等2 - 不相等, 3 - 包含, 4 - 不包含
Operand int64 `json:"operand"`
// 操作(值枚举:"等于"、"不等于"
OperandStr string `json:"operand_str"`
// 属性值ID列表
PropertyValues []int64 `json:"property_values"`
}
type ProductGetProductUpdateRuleData struct {
// 履约规则
@@ -109,18 +115,24 @@ type ProductGetProductUpdateRuleData struct {
ProductSpecRule *ProductSpecRule `json:"product_spec_rule"`
// 商品尺码模板配置规则
ComponentTemplateRule *ComponentTemplateRule `json:"component_template_rule"`
}
type DeliveryAfterPayConfig struct {
// 延迟发货时间最小值
MinDeliveryDays int64 `json:"min_delivery_days"`
// 延迟发货时间最大值
MaxDeliveryDays int64 `json:"max_delivery_days"`
// 最长预售结束时间
MaxPresellEndDays int64 `json:"max_presell_end_days"`
// 是否需要人审,可忽略
NeedAudit bool `json:"need_audit"`
// 商品主图3:4配置规则
MainImageThreeToFourRule *MainImageThreeToFourRule `json:"main_image_three_to_four_rule"`
// 金价信息计价金类目下sku价格可以按照公式进行计算价格=克重*每克价格+加工费),本字段提供相关信息
GoldPriceRule *GoldPriceRule `json:"gold_price_rule"`
// 其他规则
ExtraRule *ExtraRule `json:"extra_rule"`
// 交易相关的规则
TradeRule *TradeRule `json:"trade_rule"`
// sku规则
SkuRule *SkuRule_2_2 `json:"sku_rule"`
// 资质规则,类目属性影响资质必填和资质属性必填
QualificationRule []QualificationRuleItem `json:"qualification_rule"`
// 提取方式规则
PickUpMethodRule *PickUpMethodRule `json:"pick_up_method_rule"`
}
type FulfillmentRule struct {
// 特殊时间延迟发货规则
DelayRule *DelayRule `json:"delay_rule"`
// 现货发货模式规则
NormalRule *NormalRule `json:"normal_rule"`
// 阶梯发货模式规则
@@ -134,11 +146,91 @@ type FulfillmentRule struct {
// 新预售发货模式规则
TimeSkuPurePresellRule *TimeSkuPurePresellRule `json:"time_sku_pure_presell_rule"`
}
type TitleLimitRule struct {
// 标题最长长度
MaxLength string `json:"max_length"`
// 标题最短长度
MinLength string `json:"min_length"`
}
type OptionsItem struct {
// 选项值
Value string `json:"value"`
// 选项名称
Name string `json:"name"`
}
type SpuControlRule struct {
// 是否支持spu发品
SupportSpuProduct bool `json:"support_spu_product"`
// 0不管控 1弱管控 2强管控
ControlType int64 `json:"control_type"`
// 是否支持新建spu
SupportCreateSpu bool `json:"support_create_spu"`
// 是否支持spu纠错
SupportRectifySpu bool `json:"support_rectify_spu"`
// 是否支持spu举报
SupportReportSpu bool `json:"support_report_spu"`
// 是否spu免审
NoNeedAuditSpu bool `json:"no_need_audit_spu"`
}
type ValuePic struct {
// 规格值图片内容
PicValue string `json:"pic_value"`
// 规格值图片类型rgb和url
PicType string `json:"pic_type"`
}
type VirtualGoodsRule struct {
// 是否可能设置订单页展示核销入口;当该字段为 true且提取方式为「使用电子凭证」或「充值直连」时可以设置
SupportShowCheckoutEntry bool `json:"support_show_checkout_entry"`
}
type NormalRule struct {
// sku发货时效规则
SkuRule *SkuRule `json:"sku_rule"`
// 特殊时间延迟发货规则
DelayRule *DelayRule_4_4 `json:"delay_rule"`
// 是否支持
Support bool `json:"support"`
// 发货时效选项如当日发、次日发、48小时
DelayOptions []int64 `json:"delay_options"`
// 是否是特殊的时间发货,可忽略
IsSpecialDelayOption bool `json:"is_special_delay_option"`
}
type SkuPresellRule struct {
// 是否支持
Support bool `json:"support"`
// 预售门槛价
MinPresellPrice int64 `json:"min_presell_price"`
// 是否支持支付结束后发货
SupportDeliveryAfterPay bool `json:"support_delivery_after_pay"`
// 是否支持预售结束后发货
SupportDeliveryAfterPresell bool `json:"support_delivery_after_presell"`
// 支付结束后规则
DeliveryAfterPayConfig *DeliveryAfterPayConfig `json:"delivery_after_pay_config"`
// 预售结束后规则
DeliveryAfterPresellConfig *DeliveryAfterPresellConfig `json:"delivery_after_presell_config"`
}
type OptionsItem_4 struct {
// 售后天数选项列表
Options []OptionsItem `json:"options"`
// 三包服务类型名称
Name string `json:"name"`
// 三包服务类型值
Value string `json:"value"`
}
type OptionsItem_4_4 struct {
// sku分类对应举例
Example string `json:"example"`
// sku分类对应介绍
Description string `json:"description"`
// sku分类枚举信息
Value string `json:"value"`
// sku分类信息中文名称
Name string `json:"name"`
}
type SupplyDayReturnRule struct {
// true 支持七天无理由false 不支持七天无理由
Enable bool `json:"enable"`
// 可选的无理由退货选项列表
Options []OptionsItem `json:"options"`
Options []OptionsItem_4_4 `json:"options"`
}
type ReferencePriceRule struct {
// true表示可填写参考价false表示不可填写参考价
@@ -150,47 +242,151 @@ type ReferencePriceRule struct {
// 参考价最高高于最低SKU价格的倍数比如最低SKU价格为1此值为10则参考价不可高于10
LowerSkuPriceTimes int64 `json:"lower_sku_price_times"`
}
type OptionsItem struct {
// 天无理由退货文案描述
Name string `json:"name"`
// 无理由退货的类型
Value string `json:"value"`
type PriceRulesItem struct {
// 是否可选true表示可选false表示不可选如果不可选则表示商家没有设置过基础金价需要前往抖店后台设置
CanSelect bool `json:"can_select"`
// 金价描述
Desc string `json:"desc"`
// 每克重黄金对应的价格,单位:分
Value int64 `json:"value"`
// 价格规则枚举1是投资金2是首饰金
Type int64 `json:"type"`
}
type PropertyValuesItem struct {
// 规格值id
SellPropertyValueId int64 `json:"sell_property_value_id"`
// 规格值名称
SellPropertyValueName string `json:"sell_property_value_name"`
type GoldPriceRule struct {
// 价格规则信息,内有黄金的不同的单位价格以及枚举
PriceRules []PriceRulesItem `json:"price_rules"`
// 销售属性规格id价格基于这个规格填写的数值按照公式进行计算
SellPropertyId string `json:"sell_property_id"`
// 是否必填true表示必填false表示非必填
IsRequired bool `json:"is_required"`
// 是否需要展示可填true表示需要展示可填false表示无需展示不可填
IsShow bool `json:"is_show"`
}
type RequiredSpecDetailsItem struct {
// 规格项名称
SellPropertyName string `json:"sell_property_name"`
// 规格项id
SellPropertyId int64 `json:"sell_property_id"`
// 规格值选项
PropertyValues []PropertyValuesItem `json:"property_values"`
// 是否支持备注
SupportRemark bool `json:"support_remark"`
// 是否可以自定义规格值
SupportDiy bool `json:"support_diy"`
type HomeInstallServiceRule struct {
// 上门安装可选模式
Options []OptionsItem_4 `json:"options"`
// 是否必选
MustSelect bool `json:"must_select"`
}
type NormalRule struct {
type SkuClassificationRule struct {
// sku分类信息扩展项
Options []OptionsItem_4_4 `json:"options"`
// sku分类信息是否必填
MustSelect bool `json:"must_select"`
// 是否允许填写sku分类信息
Enable bool `json:"enable"`
}
type SkuRule_2_2 struct {
// 是否支持国补商品型号
SupportSpecModelCode bool `json:"support_spec_model_code"`
// 是否支持填写条形码
SupportBarcode bool `json:"support_barcode"`
// sku分类信息填写规则
SkuClassificationRule *SkuClassificationRule `json:"sku_classification_rule"`
}
type MatchableRuleItem struct {
// 资质规则生效的触发条件结构属性id -> 属性值clause作用当命中ruleClause中给出的全部属性对时刷新相关资质的「必填/非必填」配置
RuleClause map[int64]RuleClauseItem `json:"rule_clause"`
// 资质规则触发时受影响的类目属性结构属性id -> 属性effect包含属性是否必填属性名是否需要被覆写作用当命中ruleClause中给出的全部属性对时刷新相关资质的「必填/非必填」配置
PropertyEffect map[int64]PropertyEffectItem `json:"property_effect"`
}
type ValueModulesItem struct {
// 模块id
ModuleId int64 `json:"module_id"`
// 前缀
Prefix string `json:"prefix"`
// 后缀
Suffix string `json:"suffix"`
// 输入类型:枚举 enum, 输入 input enum_diy 枚举可输入
InputType string `json:"input_type"`
// 度量衡值选项
Values []ValuesItem `json:"values"`
// 度量衡单位
Units []UnitsItem `json:"units"`
// 度量衡规则
ValidateRule *ValidateRule `json:"validate_rule"`
}
type NavigationPropertiesItem struct {
// 导航属性id
PropertyId int64 `json:"property_id"`
// 导航属性名称
PropertyName string `json:"property_name"`
}
type SizeDimensionRangeItem struct {
// 最小范围
Max int64 `json:"max"`
// 最大范围
Min int64 `json:"min"`
}
type PickUpMethodRule struct {
// 虚拟商品提货方式规则
VirtualGoodsRule *VirtualGoodsRule `json:"virtual_goods_rule"`
}
type DelayRule_4_4 struct {
// 配置类型
ConfigType int32 `json:"config_type"`
// 配置值
ConfigValue int64 `json:"config_value"`
// 商家配置的开始时间
StartTime int64 `json:"start_time"`
// 商家配置的结束时间
EndTime int64 `json:"end_time"`
}
type TitleIllegalKeywordRuleItem struct {
// 规则提示
Tip string `json:"tip"`
// 不允许出现的后缀关键词
KeywordsInSuffix []string `json:"keywords_in_suffix"`
// 不允许出现的前缀关键词
KeywordsInPrefix []string `json:"keywords_in_prefix"`
// 不允许出现的全局关键词
Keywords []string `json:"keywords"`
}
type ThreeGuarantees struct {
// 三包服务类型1-寄修2-延保
Options []OptionsItem_4 `json:"options"`
// 是否必填
MustSelect bool `json:"must_select"`
// 是否支持三包服务
Enable bool `json:"enable"`
}
type LargeProductRule struct {
// 是否可选大件商品
Enable bool `json:"enable"`
// 是否必须大件商品
MustSelect bool `json:"must_select"`
// 可选项
Options []OptionsItem_4_4 `json:"options"`
}
type StepRule struct {
// 支持的时效列表
MultiTimes []MultiTimesItem `json:"multi_times"`
// 是否支持
Support bool `json:"support"`
// 发货时效选项如当日发、次日发、48小时
// 阶梯现货部分延迟返货时间范围
DelayOptions []int64 `json:"delay_options"`
// 是特殊时间延迟发货,可忽略
// 是特殊时间延迟发货,可忽略
IsSpecialDelayOption bool `json:"is_special_delay_option"`
// 阶梯发货阶梯部分发货时间最小值
StepMinDelay int64 `json:"step_min_delay"`
// 阶梯发货阶梯部分发货时间最大值
StepMaxDelay int64 `json:"step_max_delay"`
// 延迟发货规则
DelayRule *DelayRule_4_4 `json:"delay_rule"`
}
type DeliveryAfterPresellConfig struct {
// 延迟发货时间最小值
MinDeliveryDays int64 `json:"min_delivery_days"`
// 延迟发货时间最大值
MaxDeliveryDays int64 `json:"max_delivery_days"`
// 最长预售结束时间
MaxPresellEndDays int64 `json:"max_presell_end_days"`
// 是否需要人审,可忽略
NeedAudit bool `json:"need_audit"`
type C2bCustomizeRule struct {
// 支持c2b定制时可用的履约规则
SelectedFulfillmentRule *SelectedFulfillmentRule `json:"selected_fulfillment_rule"`
// 可选小程序
AppList []AppListItem `json:"app_list"`
// 支持c2b定制时可用的7天无理由
SupplyDayReturnSelector []SupplyDayReturnSelectorItem `json:"supply_day_return_selector"`
// 是否支持c2b定制
Enable bool `json:"enable"`
}
type TradeRule struct {
// 自动充值相关的规则
SupportAutoChargeRule *SupportAutoChargeRule `json:"support_auto_charge_rule"`
}
type ProductPresellRule struct {
// 是否支持全款预售
@@ -206,7 +402,83 @@ type ProductPresellRule struct {
// 预售结束后规则
DeliveryAfterPresellConfig *DeliveryAfterPresellConfig `json:"delivery_after_presell_config"`
}
type TimeSkuPresellWithNormalRule struct {
type SupplyDayReturnSelectorItem struct {
// 7天无理由选项名称
Name string `json:"name"`
// 7天无理由选项值
Value string `json:"value"`
}
type SkuRule struct {
// 最大绝对发货时间秒级标准Unix时间戳
AbsoluteMaxDate string `json:"absolute_max_date"`
// 最小绝对发货时间秒级标准Unix时间戳
AbsoluteMinDate string `json:"absolute_min_date"`
// 最大相对发货时间
RelativeMaxDelay string `json:"relative_max_delay"`
// sku发货时效是否支持范围输入
SupportRangeOption bool `json:"support_range_option"`
// 最小相对发货时间
RelativeMinDelay string `json:"relative_min_delay"`
// 是否支持sku发货时效
Support bool `json:"support"`
}
type TimeSkuSpecDetialItem struct {
// 规格值
SpecValue string `json:"spec_value"`
// 是否预售时效
IsPresellSpec bool `json:"is_presell_spec"`
// product_time_spec_same_day 当日发/次日发 product_time_spec_next_day 次日发 product_time_spec_48h 48小时内发货 product_time_spec_5d 5天内发货 product_time_spec_15d 15天内发货 product_time_spec_45d 45天内发货
SpecCode string `json:"spec_code"`
}
type PropertyValuesItem struct {
// 规格值id
SellPropertyValueId int64 `json:"sell_property_value_id"`
// 规格值名称
SellPropertyValueName string `json:"sell_property_value_name"`
// 规格值图片
ValuePic *ValuePic `json:"value_pic"`
}
type ValuesItem struct {
// 度量衡值
ValueName string `json:"value_name"`
}
type RequiredSpecDetailsItem struct {
// 规格项名称
SellPropertyName string `json:"sell_property_name"`
// 规格项id
SellPropertyId int64 `json:"sell_property_id"`
// 规格值选项
PropertyValues []PropertyValuesItem `json:"property_values"`
// 是否支持备注
SupportRemark bool `json:"support_remark"`
// 是否可以自定义规格值
SupportDiy bool `json:"support_diy"`
// 是否必填
IsRequired bool `json:"is_required"`
// 规格样式cascader是为导航样式
ValueDisplayStyle string `json:"value_display_style"`
// 度量衡模版,可能有多个
MeasureTemplates []MeasureTemplatesItem `json:"measure_templates"`
// 是否需要二次查询规格值
NeedPagingQueryValue bool `json:"need_paging_query_value"`
// 导航属性
NavigationProperties []NavigationPropertiesItem `json:"navigation_properties"`
// 1
PropertyDefaultDisplay bool `json:"property_default_display"`
}
type SizeDimensions struct {
// 有用列
UsefulDimensions []string `json:"useful_dimensions"`
// 其他可用列
OtherDimensions []string `json:"other_dimensions"`
}
type ExtraRule struct {
// 上门安装服务规则
HomeInstallServiceRule *HomeInstallServiceRule `json:"home_install_service_rule"`
// c2b定制相关规则
C2bCustomizeRule *C2bCustomizeRule `json:"c2b_customize_rule"`
}
type TimeSkuPurePresellRule struct {
// 是否支持
Support bool `json:"support"`
// 发货时效规格名称
@@ -216,3 +488,117 @@ type TimeSkuPresellWithNormalRule struct {
// 预售门槛价,单位分
MinPresellPrice int64 `json:"min_presell_price"`
}
type RecommendNameRule struct {
// 商品标题非法关键词规则
TitleIllegalKeywordRule []TitleIllegalKeywordRuleItem `json:"title_illegal_keyword_rule"`
// 品牌没有权限是否可以勾选
PrefixBrandUnauthCanSel bool `json:"prefix_brand_unauth_can_sel"`
// 前缀规则是否包含品牌
PrefixPropHasBrand bool `json:"prefix_prop_has_brand"`
// 标题长度规则
TitleLimitRule *TitleLimitRule `json:"title_limit_rule"`
// 当前类目id是否命中前缀推荐规则
SatisfyPrefix bool `json:"satisfy_prefix"`
// 命中规则的属性id详情
PropertyIds []int64 `json:"property_ids"`
}
type ValidateRule struct {
// 数据类型integer、float
DataType string `json:"data_type"`
// 小数位数data_type为float时有值
Precision int64 `json:"precision"`
// 最小值
Min float64 `json:"min"`
// 最大值
Max float64 `json:"max"`
// 单位规则明细
UnitRules []UnitRulesItem `json:"unit_rules"`
}
type ProductSpecRule struct {
// 为true时规格图要么全不填要么全填
AllSpecPicRequired bool `json:"all_spec_pic_required"`
// 是否支持规格项顺序调整true表示支持
SupportPropertySequenceVariable bool `json:"support_property_sequence_variable"`
// 【废弃字段,请勿依赖】totally_use_given_spec完全使用系统下发规格partly_use_given_spec部分使用系统下发规格not_use_given_spec不管控规格;"":为空时表示不管控规格
SpecRuleCode string `json:"spec_rule_code"`
// 商品规格列表
RequiredSpecDetails []RequiredSpecDetailsItem `json:"required_spec_details"`
// 最大可支持的规格层级数量
MaxSpecNumLimit int64 `json:"max_spec_num_limit"`
// sku组合数量上限
SpecCombinationLimit int64 `json:"spec_combination_limit"`
// 单个规格的规格值数量上限
SpecSingleLimit int64 `json:"spec_single_limit"`
// 是否支持规格项自定义
SupportPropertyDiy bool `json:"support_property_diy"`
}
type ComponentTemplateRule struct {
// 尺码列配置
SizeDimensions *SizeDimensions `json:"size_dimensions"`
// 区间符号
IntervalSizeSymbol []string `json:"interval_size_symbol"`
// 维度下尺码范围
SizeDimensionRange map[string]SizeDimensionRangeItem `json:"size_dimension_range"`
// 当前类目支持的尺码模版子类型
SupportTemplateSubType string `json:"support_template_sub_type"`
// 是否展示尺码信息
IsShow bool `json:"is_show"`
// 尺码信息是否必填
MustInput bool `json:"must_input"`
}
type MainImageThreeToFourRule struct {
// 是否展示主图3:4信息
IsShow bool `json:"is_show"`
// 主图3:4信息是否必填
MustInput bool `json:"must_input"`
}
type QualificationRuleItem struct {
// 是否千川收取资质
IsQianchuanNeed bool `json:"is_qianchuan_need"`
// 是否必填
IsRequired bool `json:"is_required"`
// 资质要求描述文字
TextList []string `json:"text_list"`
// 资质名称
Name string `json:"name"`
// 资质ID
Key string `json:"key"`
// 资质规则和规则的效果
MatchableRule []MatchableRuleItem `json:"matchable_rule"`
}
type DelayRule struct {
// 支持的配置类型1代表时间点此时对应的config_value的值为支持的最晚发货的秒级时间戳2代表相对时间此时对应的config_value的值表示支付后几天发货比如config_value=3表示支付后三天发货
ConfigType int64 `json:"config_type"`
// 与规则配置类型对应的配置值
ConfigValue int64 `json:"config_value"`
// 规则开始时间
StartTime int64 `json:"start_time"`
// 规则结束时间
EndTime int64 `json:"end_time"`
}
type DeliveryAfterPayConfig struct {
// 延迟发货时间最小值
MinDeliveryDays int64 `json:"min_delivery_days"`
// 延迟发货时间最大值
MaxDeliveryDays int64 `json:"max_delivery_days"`
// 最长预售结束时间
MaxPresellEndDays int64 `json:"max_presell_end_days"`
// 是否需要人审,可忽略
NeedAudit bool `json:"need_audit"`
}
type MeasureTemplatesItem struct {
// 模版名称
DisplayName string `json:"display_name"`
// 度量衡模版id
TemplateId int64 `json:"template_id"`
// 度量衡模版模块内容,一个模版多个模块
ValueModules []ValueModulesItem `json:"value_modules"`
}
type AllergyReturnV2Rule struct {
// 是否可选过敏包退
Enable string `json:"enable"`
// 是否必选过敏包退
MustSelect string `json:"must_select"`
// 可选项
Options []OptionsItem_4_4 `json:"options"`
}

View File

@@ -47,4 +47,6 @@ func (c *ShopGetShopCategoryRequest) GetParams() *ShopGetShopCategoryParam {
type ShopGetShopCategoryParam struct {
// 父类目id根据父id可以获取子类目。首次请求传值为0 可以获取所有一级类目。循环调用接口获取最小层级类目id根据响应参数判断is_leaf=true或false。is_leaf=true表示是叶子节点获取最小层级类目idis_leaf=false表示不是子节点请求参数cid=上一次响应参数id直到获取最小层级类目id。
Cid int64 `json:"cid"`
// 类目渠道0门捷列夫类目1标准类目若不传入当cid=0时由类目服务内部自行开关控制0:默认查询门捷列夫类目1:获取商家灰度标跟随大盘灰度节奏切换2:默认查询标准类目
Channel *int32 `json:"channel"`
}

View File

@@ -24,4 +24,6 @@ type DataItem struct {
IsLeaf bool `json:"is_leaf"`
// 类目使用有效enable=true有效如果enable=false表示该类目已经失效请勿使用
Enable bool `json:"enable"`
// 类目渠道0门捷列夫类目1标准类目
Channel int32 `json:"channel"`
}