feat(wxapi): 新增微信小店赠品相关接口

This commit is contained in:
Fu Diwei
2025-05-06 19:04:26 +08:00
parent 834b26339e
commit c414aba33a
43 changed files with 1674 additions and 191 deletions

View File

@@ -186,10 +186,8 @@
| | 微信 API | 备注 |
| :-: | :------------: | :--: |
| √ | 微信小店 | |
| √ | 合作账号 | |
| √ | 企业微信 | |
| √ | 小程序连接小店 | |
| √ | 罗盘商家版 | |
| √ | 达人带货 | |
| √ | 带货助手 | |
</details>

View File

@@ -18,7 +18,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
/// <![CDATA[ https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/access-token/auth.getAccessToken.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/basics/getaccesstoken.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/windowproduct/getaccesstoken.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/API/basics/getaccesstoken.html ]]>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/basics/getaccesstoken.html ]]>
/// <![CDATA[ https://dev.weixin.qq.com/docs/framework/dev/openapi/getaccesstoken.html ]]>
/// </para>
/// </summary>
@@ -48,7 +48,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
/// <![CDATA[ https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/mp-access-token/getStableAccessToken.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/access-token/auth.getStableAccessToken.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/basics/getStableAccessToken.html ]]>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/API/basics/getStableAccessToken.html ]]>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/basics/getStableAccessToken.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>

View File

@@ -17,7 +17,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
/// <![CDATA[ https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/openapi/clearQuota.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/openApi-mgnt/clearQuota.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/apimgnt/clearQuota.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/API/apimgnt/clearQuota.html ]]>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/apimgnt/clearQuota.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
@@ -45,7 +45,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/offiaccount/openApi/clearQuotaByAppSecret.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/apimgnt/clearQuotaByAppSecret.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/API/apimgnt/clearQuotaByAppSecret.html ]]>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/apimgnt/clearQuotaByAppSecret.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
@@ -79,7 +79,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
/// <![CDATA[ https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/openapi/getApiQuota.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/openApi-mgnt/getApiQuota.html ]]>
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/apimgnt/getApiQuota.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/API/apimgnt/getApiQuota.html ]]>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/apimgnt/getApiQuota.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
@@ -106,7 +106,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
/// <![CDATA[ https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/openapi/getRidInfo.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/openApi-mgnt/getRidInfo.html ]]>
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/apimgnt/getRidInfo.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/API/apimgnt/getRidInfo.html ]]>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/apimgnt/getRidInfo.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>

View File

@@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/activity/del 接口的请求。</para>
/// </summary>
public class ChannelsECActivityDeleteRequest : WechatApiRequest, IInferable<ChannelsECActivityDeleteRequest, ChannelsECActivityDeleteResponse>
{
/// <summary>
/// 获取或设置买赠活动 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("activity_id")]
[System.Text.Json.Serialization.JsonPropertyName("activity_id")]
public long ActivityId { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/activity/del 接口的响应。</para>
/// </summary>
public class ChannelsECActivityDeleteResponse : WechatApiResponse
{
}
}

View File

@@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/activity/stop 接口的请求。</para>
/// </summary>
public class ChannelsECActivityStopRequest : WechatApiRequest, IInferable<ChannelsECActivityStopRequest, ChannelsECActivityStopResponse>
{
/// <summary>
/// 获取或设置买赠活动 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("activity_id")]
[System.Text.Json.Serialization.JsonPropertyName("activity_id")]
public long ActivityId { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/activity/stop 接口的响应。</para>
/// </summary>
public class ChannelsECActivityStopResponse : WechatApiResponse
{
}
}

View File

@@ -0,0 +1,159 @@
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/product/activity/add 接口的请求。</para>
/// </summary>
public class ChannelsECProductActivityAddRequest : WechatApiRequest, IInferable<ChannelsECProductActivityAddRequest, ChannelsECProductActivityAddResponse>
{
public static class Types
{
public class GiftActivity
{
public static class Types
{
public class Detail
{
public static class Types
{
public class ReceiveLimit
{
/// <summary>
/// 获取或设置是否限领。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_limited")]
[System.Text.Json.Serialization.JsonPropertyName("is_limited")]
public bool IsLimited { get; set; }
/// <summary>
/// 获取或设置限领套数。
/// </summary>
[Newtonsoft.Json.JsonProperty("limit_num")]
[System.Text.Json.Serialization.JsonPropertyName("limit_num")]
public int LimitCount { get; set; }
}
public class MainProduct
{
/// <summary>
/// 获取或设置商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
public long ProductId { get; set; }
}
public class GiftSet
{
public static class Types
{
public class Gift
{
/// <summary>
/// 获取或设置赠品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("gift_id")]
[System.Text.Json.Serialization.JsonPropertyName("gift_id")]
public long GiftProductId { get; set; }
/// <summary>
/// 获取或设置赠品件数。
/// </summary>
[Newtonsoft.Json.JsonProperty("give_num")]
[System.Text.Json.Serialization.JsonPropertyName("give_num")]
public int GiveCount { get; set; }
}
}
/// <summary>
/// 获取或设置赠品列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("gift_items")]
[System.Text.Json.Serialization.JsonPropertyName("gift_items")]
public IList<Types.Gift> GiftList { get; set; } = new List<Types.Gift>();
/// <summary>
/// 获取或设置赠品总套数。
/// </summary>
[Newtonsoft.Json.JsonProperty("gift_set_num")]
[System.Text.Json.Serialization.JsonPropertyName("gift_set_num")]
public int GiftSetCount { get; set; }
}
}
/// <summary>
/// 获取或设置场景值。
/// </summary>
[Newtonsoft.Json.JsonProperty("show_scene")]
[System.Text.Json.Serialization.JsonPropertyName("show_scene")]
public int ShowScene { get; set; }
/// <summary>
/// 获取或设置场景值。
/// </summary>
[Newtonsoft.Json.JsonProperty("receive_limit")]
[System.Text.Json.Serialization.JsonPropertyName("receive_limit")]
public Types.ReceiveLimit ReceiveLimit { get; set; } = new Types.ReceiveLimit();
/// <summary>
/// 获取或设置主商品列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("main_products")]
[System.Text.Json.Serialization.JsonPropertyName("main_products")]
public IList<Types.MainProduct> MainProductList { get; set; } = new List<Types.MainProduct>();
/// <summary>
/// 获取或设置赠品套装信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("gift_set")]
[System.Text.Json.Serialization.JsonPropertyName("gift_set")]
public Types.GiftSet GiftSet { get; set; } = new Types.GiftSet();
}
}
/// <summary>
/// 获取或设置买赠活动 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("activity_id")]
[System.Text.Json.Serialization.JsonPropertyName("activity_id")]
public long? ActivityId { get; set; }
/// <summary>
/// 获取或设置买赠活动标题。
/// </summary>
[Newtonsoft.Json.JsonProperty("title")]
[System.Text.Json.Serialization.JsonPropertyName("title")]
public string Title { get; set; } = string.Empty;
/// <summary>
/// 获取或设置买赠活动开始时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("start_time")]
[System.Text.Json.Serialization.JsonPropertyName("start_time")]
public long StartTimestamp { get; set; }
/// <summary>
/// 获取或设置买赠活动开始时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("end_time")]
[System.Text.Json.Serialization.JsonPropertyName("end_time")]
public long EndTimestamp { get; set; }
/// <summary>
/// 获取或设置买赠活动详情。
/// </summary>
[Newtonsoft.Json.JsonProperty("detail")]
[System.Text.Json.Serialization.JsonPropertyName("detail")]
public Types.Detail Detail { get; set; } = new Types.Detail();
}
}
/// <summary>
/// 获取或设置买赠活动信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("gift_activity")]
[System.Text.Json.Serialization.JsonPropertyName("gift_activity")]
public Types.GiftActivity GiftActivity { get; set; } = new Types.GiftActivity();
}
}

View File

@@ -0,0 +1,16 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/product/activity/add 接口的响应。</para>
/// </summary>
public class ChannelsECProductActivityAddResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置买赠活动 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("activity_id")]
[System.Text.Json.Serialization.JsonPropertyName("activity_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long ActivityId { get; set; }
}
}

View File

@@ -78,7 +78,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("out_sku_id")]
[System.Text.Json.Serialization.JsonPropertyName("out_sku_id")]
public string OutSKUId { get; set; } = string.Empty;
public string? OutSKUId { get; set; }
/// <summary>
/// 获取或设置缩略图 Url。
@@ -399,7 +399,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("spu_code")]
[System.Text.Json.Serialization.JsonPropertyName("spu_code")]
public string? SpuCode { get; set; }
public string? SPUCode { get; set; }
/// <summary>
/// 获取或设置品牌 ID。
@@ -474,7 +474,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
public Types.ExtraService? ExtraService { get; set; }
/// <summary>
/// 获取或设置更新后是否立即上架。
/// 获取或设置创建后是否立即上架。
/// </summary>
[Newtonsoft.Json.JsonProperty("listing")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]

View File

@@ -192,7 +192,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("spu_code")]
[System.Text.Json.Serialization.JsonPropertyName("spu_code")]
public string? SpuCode { get; set; }
public string? SPUCode { get; set; }
/// <summary>
/// 获取或设置 SKU 列表。

View File

@@ -91,7 +91,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("out_sku_id")]
[System.Text.Json.Serialization.JsonPropertyName("out_sku_id")]
public string OutSKUId { get; set; } = default!;
public string? OutSKUId { get; set; }
/// <summary>
/// 获取或设置缩略图 URL。
@@ -428,7 +428,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("spu_code")]
[System.Text.Json.Serialization.JsonPropertyName("spu_code")]
public string? SpuCode { get; set; }
public string? SPUCode { get; set; }
/// <summary>
/// 获取或设置品牌 ID。

View File

@@ -191,7 +191,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("spu_code")]
[System.Text.Json.Serialization.JsonPropertyName("spu_code")]
public string? SpuCode { get; set; }
public string? SPUCode { get; set; }
/// <summary>
/// 获取或设置品牌 ID。

View File

@@ -0,0 +1,129 @@
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/product/gift/add 接口的请求。</para>
/// </summary>
public class ChannelsECProductGiftAddRequest : WechatApiRequest, IInferable<ChannelsECProductGiftAddRequest, ChannelsECProductGiftAddResponse>
{
public static class Types
{
public class Detail : ChannelsECProductAddRequest.Types.Detail
{
}
public class Category : ChannelsECProductAddRequest.Types.Category
{
}
public class Attribute : ChannelsECProductAddRequest.Types.Attribute
{
}
public class SKU
{
/// <summary>
/// 获取或设置商家自定义 SKU ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("out_sku_id")]
[System.Text.Json.Serialization.JsonPropertyName("out_sku_id")]
public string? OutSKUId { get; set; }
/// <summary>
/// 获取或设置售价(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("sale_price")]
[System.Text.Json.Serialization.JsonPropertyName("sale_price")]
public int SalePrice { get; set; }
/// <summary>
/// 获取或设置库存。
/// </summary>
[Newtonsoft.Json.JsonProperty("stock_num")]
[System.Text.Json.Serialization.JsonPropertyName("stock_num")]
public int? Stock { get; set; }
/// <summary>
/// 获取或设置商品编码。
/// </summary>
[Newtonsoft.Json.JsonProperty("sku_code")]
[System.Text.Json.Serialization.JsonPropertyName("sku_code")]
public string? SKUCode { get; set; }
}
}
/// <summary>
/// 获取或设置商家自定义赠品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("out_product_id")]
[System.Text.Json.Serialization.JsonPropertyName("out_product_id")]
public string? OutProductId { get; set; }
/// <summary>
/// 获取或设置赠品标题。
/// </summary>
[Newtonsoft.Json.JsonProperty("title")]
[System.Text.Json.Serialization.JsonPropertyName("title")]
public string Title { get; set; } = string.Empty;
/// <summary>
/// 获取或设置主图 URL 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("head_imgs")]
[System.Text.Json.Serialization.JsonPropertyName("head_imgs")]
public IList<string> HeadImageUrlList { get; set; } = new List<string>();
/// <summary>
/// 获取或设置商品详情信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("desc_info")]
[System.Text.Json.Serialization.JsonPropertyName("desc_info")]
public Types.Detail Detail { get; set; } = new Types.Detail();
/// <summary>
/// 获取或设置新版商品类目列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("cats_v2")]
[System.Text.Json.Serialization.JsonPropertyName("cats_v2")]
public IList<Types.Category>? CategoryV2List { get; set; }
/// <summary>
/// 获取或设置商品属性列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("attrs")]
[System.Text.Json.Serialization.JsonPropertyName("attrs")]
public IList<Types.Attribute>? AttributeList { get; set; }
/// <summary>
/// 获取或设置赠品编码。
/// </summary>
[Newtonsoft.Json.JsonProperty("spu_code")]
[System.Text.Json.Serialization.JsonPropertyName("spu_code")]
public string? SPUCode { get; set; }
/// <summary>
/// 获取或设置品牌 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("brand_id")]
[System.Text.Json.Serialization.JsonPropertyName("brand_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long? BrandId { get; set; }
/// <summary>
/// 获取或设置 SKU 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("skus")]
[System.Text.Json.Serialization.JsonPropertyName("skus")]
public IList<Types.SKU>? SKUList { get; set; }
/// <summary>
/// 获取或设置创建后是否立即上架。
/// </summary>
[Newtonsoft.Json.JsonProperty("listing")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("listing")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool? RequireListing { get; set; }
}
}

View File

@@ -0,0 +1,40 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/product/gift/add 接口的响应。</para>
/// </summary>
public class ChannelsECProductGiftAddResponse : WechatApiResponse
{
public static class Types
{
public class Data
{
/// <summary>
/// 获取或设置赠品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long ProductId { get; set; }
/// <summary>
/// 获取或设置创建时间。
/// </summary>
[Newtonsoft.Json.JsonProperty("create_time")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.BasicDateTimeOffsetConverter))]
[System.Text.Json.Serialization.JsonPropertyName("create_time")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.BasicDateTimeOffsetConverter))]
public DateTimeOffset CreateTime { get; set; }
}
}
/// <summary>
/// 获取或设置返回数据。
/// </summary>
[Newtonsoft.Json.JsonProperty("data")]
[System.Text.Json.Serialization.JsonPropertyName("data")]
public Types.Data Data { get; set; } = default!;
}
}

View File

@@ -0,0 +1,22 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/product/gift/get 接口的请求。</para>
/// </summary>
public class ChannelsECProductGiftGetRequest : WechatApiRequest, IInferable<ChannelsECProductGiftGetRequest, ChannelsECProductGiftGetResponse>
{
/// <summary>
/// 获取或设置赠品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
public long ProductId { get; set; }
/// <summary>
/// 获取或设置数据类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("data_type")]
[System.Text.Json.Serialization.JsonPropertyName("data_type")]
public int? DataType { get; set; }
}
}

View File

@@ -0,0 +1,199 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/product/gift/get 接口的响应。</para>
/// </summary>
public class ChannelsECProductGiftGetResponse : WechatApiResponse
{
public static class Types
{
public class Product
{
public static class Types
{
public class Detail : ChannelsECProductGetResponse.Types.Product.Types.Detail
{
}
public class Category : ChannelsECProductGetResponse.Types.Product.Types.Category
{
}
public class Attribute : ChannelsECProductGetResponse.Types.Product.Types.Attribute
{
}
public class SKU
{
/// <summary>
/// 获取或设置 SKU ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("sku_id")]
[System.Text.Json.Serialization.JsonPropertyName("sku_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long SKUId { get; set; }
/// <summary>
/// 获取或设置商家自定义 SKU ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("out_sku_id")]
[System.Text.Json.Serialization.JsonPropertyName("out_sku_id")]
public string? OutSKUId { get; set; }
/// <summary>
/// 获取或设置售价(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("sale_price")]
[System.Text.Json.Serialization.JsonPropertyName("sale_price")]
public int SalePrice { get; set; }
/// <summary>
/// 获取或设置库存。
/// </summary>
[Newtonsoft.Json.JsonProperty("stock_num")]
[System.Text.Json.Serialization.JsonPropertyName("stock_num")]
public int Stock { get; set; }
/// <summary>
/// 获取或设置商品编码。
/// </summary>
[Newtonsoft.Json.JsonProperty("sku_code")]
[System.Text.Json.Serialization.JsonPropertyName("sku_code")]
public string? SKUCode { get; set; }
/// <summary>
/// 获取或设置 SKU 状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("status")]
[System.Text.Json.Serialization.JsonPropertyName("status")]
public int Status { get; set; }
}
}
/// <summary>
/// 获取或设置赠品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long ProductId { get; set; }
/// <summary>
/// 获取或设置商家自定义赠品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("out_product_id")]
[System.Text.Json.Serialization.JsonPropertyName("out_product_id")]
public string? OutProductId { get; set; }
/// <summary>
/// 获取或设置商品标题。
/// </summary>
[Newtonsoft.Json.JsonProperty("title")]
[System.Text.Json.Serialization.JsonPropertyName("title")]
public string Title { get; set; } = default!;
/// <summary>
/// 获取或设置主图 URL 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("head_imgs")]
[System.Text.Json.Serialization.JsonPropertyName("head_imgs")]
public string[] HeadImageUrlList { get; set; } = default!;
/// <summary>
/// 获取或设置商品详情信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("desc_info")]
[System.Text.Json.Serialization.JsonPropertyName("desc_info")]
public Types.Detail Detail { get; set; } = default!;
/// <summary>
/// 获取或设置新版商品类目列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("cats_v2")]
[System.Text.Json.Serialization.JsonPropertyName("cats_v2")]
public Types.Category[]? CategoryV2List { get; set; }
/// <summary>
/// 获取或设置商品属性列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("attrs")]
[System.Text.Json.Serialization.JsonPropertyName("attrs")]
public Types.Attribute[]? AttributeList { get; set; }
/// <summary>
/// 获取或设置商品编码。
/// </summary>
[Newtonsoft.Json.JsonProperty("spu_code")]
[System.Text.Json.Serialization.JsonPropertyName("spu_code")]
public string? SPUCode { get; set; }
/// <summary>
/// 获取或设置品牌 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("brand_id")]
[System.Text.Json.Serialization.JsonPropertyName("brand_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long? BrandId { get; set; }
/// <summary>
/// 获取或设置商品状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("status")]
[System.Text.Json.Serialization.JsonPropertyName("status")]
public int Status { get; set; }
/// <summary>
/// 获取或设置商品草稿状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("edit_status")]
[System.Text.Json.Serialization.JsonPropertyName("edit_status")]
public int EditingStatus { get; set; }
/// <summary>
/// 获取或设置 SKU 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("skus")]
[System.Text.Json.Serialization.JsonPropertyName("skus")]
public Types.SKU[]? SKUList { get; set; }
/// <summary>
/// 获取或设置商品类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_type")]
[System.Text.Json.Serialization.JsonPropertyName("product_type")]
public int? ProductType { get; set; }
/// <summary>
/// 获取或设置商品草稿最近一次修改时间。
/// </summary>
[Newtonsoft.Json.JsonProperty("edit_time")]
[System.Text.Json.Serialization.JsonPropertyName("edit_time")]
public long EditTimestamp { get; set; }
/// <summary>
/// 获取或设置导入的来源商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("src_product_id")]
[System.Text.Json.Serialization.JsonPropertyName("src_product_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long? SourceProductId { get; set; }
}
}
/// <summary>
/// 获取或设置线上赠品信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("product")]
[System.Text.Json.Serialization.JsonPropertyName("product")]
public Types.Product? Product { get; set; }
/// <summary>
/// 获取或设置草稿赠品信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("edit_product")]
[System.Text.Json.Serialization.JsonPropertyName("edit_product")]
public Types.Product? EditingProduct { get; set; }
}
}

View File

@@ -0,0 +1,30 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/product/gift/list/get 接口的请求。</para>
/// </summary>
public class ChannelsECProductGiftListGetRequest : WechatApiRequest, IInferable<ChannelsECProductGiftListGetRequest, ChannelsECProductGiftListGetResponse>
{
/// <summary>
/// 获取或设置商品状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("status")]
[System.Text.Json.Serialization.JsonPropertyName("status")]
public int? Status { get; set; }
/// <summary>
/// 获取或设置翻页标记。
/// </summary>
[Newtonsoft.Json.JsonProperty("next_key")]
[System.Text.Json.Serialization.JsonPropertyName("next_key")]
public string? Cursor { get; set; }
/// <summary>
/// 获取或设置分页每页数量。
/// <para>默认值10</para>
/// </summary>
[Newtonsoft.Json.JsonProperty("page_size")]
[System.Text.Json.Serialization.JsonPropertyName("page_size")]
public int Limit { get; set; } = 10;
}
}

View File

@@ -0,0 +1,30 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/product/gift/list/get 接口的响应。</para>
/// </summary>
public class ChannelsECProductGiftListGetResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置赠品 ID 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_ids")]
[System.Text.Json.Serialization.JsonPropertyName("product_ids")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long[] ProductIdList { get; set; } = default!;
/// <summary>
/// 获取或设置翻页标记。
/// </summary>
[Newtonsoft.Json.JsonProperty("next_key")]
[System.Text.Json.Serialization.JsonPropertyName("next_key")]
public string? NextCursor { get; set; }
/// <summary>
/// 获取或设置总数量。
/// </summary>
[Newtonsoft.Json.JsonProperty("total_num")]
[System.Text.Json.Serialization.JsonPropertyName("total_num")]
public int TotalCount { get; set; }
}
}

View File

@@ -0,0 +1,44 @@
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/product/gift/onsale/set 接口的请求。</para>
/// </summary>
public class ChannelsECProductGiftOnSaleSetRequest : WechatApiRequest, IInferable<ChannelsECProductGiftOnSaleSetRequest, ChannelsECProductGiftOnSaleSetResponse>
{
public static class Types
{
public class SKU
{
/// <summary>
/// 获取或设置原始 SKU ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("sku_id")]
[System.Text.Json.Serialization.JsonPropertyName("sku_id")]
public long? SKUId { get; set; }
/// <summary>
/// 获取或设置库存。
/// </summary>
[Newtonsoft.Json.JsonProperty("stock_num")]
[System.Text.Json.Serialization.JsonPropertyName("stock_num")]
public int? Stock { get; set; }
}
}
/// <summary>
/// 获取或设置原始商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
public long ProductId { get; set; }
/// <summary>
/// 获取或设置 SKU 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("skus")]
[System.Text.Json.Serialization.JsonPropertyName("skus")]
public IList<Types.SKU>? SKUList { get; set; }
}
}

View File

@@ -0,0 +1,68 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/product/gift/onsale/set 接口的响应。</para>
/// </summary>
public class ChannelsECProductGiftOnSaleSetResponse : WechatApiResponse
{
public static class Types
{
public class Data
{
public static class Types
{
public class SKU
{
/// <summary>
/// 获取或设置原始商品 SKU ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("src_sku_id")]
[System.Text.Json.Serialization.JsonPropertyName("src_sku_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long SourceSKUId { get; set; }
/// <summary>
/// 获取或设置赠品 SKU ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("gift_sku_id")]
[System.Text.Json.Serialization.JsonPropertyName("gift_sku_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long GiftSKUId { get; set; }
}
}
/// <summary>
/// 获取或设置原始商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("src_product_id")]
[System.Text.Json.Serialization.JsonPropertyName("src_product_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long SourceProductId { get; set; }
/// <summary>
/// 获取或设置赠品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("gift_product_id")]
[System.Text.Json.Serialization.JsonPropertyName("gift_product_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long GiftProductId { get; set; }
/// <summary>
/// 获取或设置 SKU 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("sku_mappings")]
[System.Text.Json.Serialization.JsonPropertyName("sku_mappings")]
public Types.SKU[] SKUList { get; set; } = default!;
}
}
/// <summary>
/// 获取或设置返回数据。
/// </summary>
[Newtonsoft.Json.JsonProperty("data")]
[System.Text.Json.Serialization.JsonPropertyName("data")]
public Types.Data Data { get; set; } = default!;
}
}

View File

@@ -0,0 +1,36 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/product/gift/stock/update 接口的请求。</para>
/// </summary>
public class ChannelsECProductGiftStockUpdateRequest : WechatApiRequest, IInferable<ChannelsECProductGiftStockUpdateRequest, ChannelsECProductGiftStockUpdateResponse>
{
/// <summary>
/// 获取或设置赠品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
public long ProductId { get; set; }
/// <summary>
/// 获取或设置 SKU ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("sku_id")]
[System.Text.Json.Serialization.JsonPropertyName("sku_id")]
public long SKUId { get; set; }
/// <summary>
/// 获取或设置修改类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("diff_type")]
[System.Text.Json.Serialization.JsonPropertyName("diff_type")]
public int DiffType { get; set; }
/// <summary>
/// 获取或设置修改数量。
/// </summary>
[Newtonsoft.Json.JsonProperty("num")]
[System.Text.Json.Serialization.JsonPropertyName("num")]
public int DiffCount { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/product/gift/stock/update 接口的响应。</para>
/// </summary>
public class ChannelsECProductGiftStockUpdateResponse : WechatApiResponse
{
}
}

View File

@@ -0,0 +1,163 @@
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/product/gift/update 接口的请求。</para>
/// </summary>
public class ChannelsECProductGiftUpdateRequest : WechatApiRequest, IInferable<ChannelsECProductGiftUpdateRequest, ChannelsECProductGiftUpdateResponse>
{
public static class Types
{
public class Detail : ChannelsECProductGiftAddRequest.Types.Detail
{
}
public class Category : ChannelsECProductGiftAddRequest.Types.Category
{
}
public class Attribute : ChannelsECProductGiftAddRequest.Types.Attribute
{
}
public class SKU
{
public static class Types
{
public class StockDiff
{
/// <summary>
/// 获取或设置修改类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("diff_type")]
[System.Text.Json.Serialization.JsonPropertyName("diff_type")]
public int Type { get; set; }
/// <summary>
/// 获取或设置修改数量。
/// </summary>
[Newtonsoft.Json.JsonProperty("num")]
[System.Text.Json.Serialization.JsonPropertyName("num")]
public int Count { get; set; }
}
}
/// <summary>
/// 获取或设置 SKU ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("sku_id")]
[System.Text.Json.Serialization.JsonPropertyName("sku_id")]
public long? SKUId { get; set; }
/// <summary>
/// 获取或设置商家自定义 SKU ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("out_sku_id")]
[System.Text.Json.Serialization.JsonPropertyName("out_sku_id")]
public string? OutSKUId { get; set; }
/// <summary>
/// 获取或设置售价(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("sale_price")]
[System.Text.Json.Serialization.JsonPropertyName("sale_price")]
public int SalePrice { get; set; }
/// <summary>
/// 获取或设置库存。
/// </summary>
[Newtonsoft.Json.JsonProperty("stock_num")]
[System.Text.Json.Serialization.JsonPropertyName("stock_num")]
public int? Stock { get; set; }
/// <summary>
/// 获取或设置库存变更信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("stock_diff")]
[System.Text.Json.Serialization.JsonPropertyName("stock_diff")]
public Types.StockDiff? StockDiff { get; set; }
/// <summary>
/// 获取或设置商品编码。
/// </summary>
[Newtonsoft.Json.JsonProperty("sku_code")]
[System.Text.Json.Serialization.JsonPropertyName("sku_code")]
public string? SKUCode { get; set; }
}
}
/// <summary>
/// 获取或设置赠品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
public long ProductId { get; set; }
/// <summary>
/// 获取或设置赠品标题。
/// </summary>
[Newtonsoft.Json.JsonProperty("title")]
[System.Text.Json.Serialization.JsonPropertyName("title")]
public string Title { get; set; } = string.Empty;
/// <summary>
/// 获取或设置主图 URL 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("head_imgs")]
[System.Text.Json.Serialization.JsonPropertyName("head_imgs")]
public IList<string> HeadImageUrlList { get; set; } = new List<string>();
/// <summary>
/// 获取或设置商品详情信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("desc_info")]
[System.Text.Json.Serialization.JsonPropertyName("desc_info")]
public Types.Detail Detail { get; set; } = new Types.Detail();
/// <summary>
/// 获取或设置新版商品类目列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("cats_v2")]
[System.Text.Json.Serialization.JsonPropertyName("cats_v2")]
public IList<Types.Category>? CategoryV2List { get; set; }
/// <summary>
/// 获取或设置商品属性列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("attrs")]
[System.Text.Json.Serialization.JsonPropertyName("attrs")]
public IList<Types.Attribute>? AttributeList { get; set; }
/// <summary>
/// 获取或设置商品编码。
/// </summary>
[Newtonsoft.Json.JsonProperty("spu_code")]
[System.Text.Json.Serialization.JsonPropertyName("spu_code")]
public string? SPUCode { get; set; }
/// <summary>
/// 获取或设置品牌 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("brand_id")]
[System.Text.Json.Serialization.JsonPropertyName("brand_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long? BrandId { get; set; }
/// <summary>
/// 获取或设置 SKU 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("skus")]
[System.Text.Json.Serialization.JsonPropertyName("skus")]
public IList<Types.SKU>? SKUList { get; set; }
/// <summary>
/// 获取或设置更新后是否立即上架。
/// </summary>
[Newtonsoft.Json.JsonProperty("listing")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("listing")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool? RequireListing { get; set; }
}
}

View File

@@ -0,0 +1,40 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/product/gift/update 接口的响应。</para>
/// </summary>
public class ChannelsECProductGiftUpdateResponse : WechatApiResponse
{
public static class Types
{
public class Data
{
/// <summary>
/// 获取或设置赠品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long ProductId { get; set; }
/// <summary>
/// 获取或设置更新时间。
/// </summary>
[Newtonsoft.Json.JsonProperty("update_time")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.BasicDateTimeOffsetConverter))]
[System.Text.Json.Serialization.JsonPropertyName("update_time")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.BasicDateTimeOffsetConverter))]
public DateTimeOffset UpdateTime { get; set; }
}
}
/// <summary>
/// 获取或设置返回数据。
/// </summary>
[Newtonsoft.Json.JsonProperty("data")]
[System.Text.Json.Serialization.JsonPropertyName("data")]
public Types.Data Data { get; set; } = default!;
}
}

View File

@@ -1,4 +1,4 @@
using System;
using System;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{

View File

@@ -0,0 +1,29 @@
{
"gift_activity": {
"activity_id": 123456789147,
"detail": {
"gift_set": {
"gift_items": [
{
"gift_id": 121212,
"give_num": 1
}
],
"gift_set_num": 1
},
"main_products": [
{
"product_id": 121212
}
],
"receive_limit": {
"is_limited": true,
"limit_num": 111
},
"show_scene": 1
},
"end_time": "11111",
"start_time": "222222",
"title": "测试创建赠品活动"
}
}

View File

@@ -0,0 +1,5 @@
{
"errcode": 0,
"errmsg": "ok",
"activity_id": "123456789147"
}

View File

@@ -0,0 +1,37 @@
{
"title": "宠物玩具5",
"head_imgs": [
"https://mmecimage.cn/p/wx37f38d59298839c3/HJE9eJaEc5bJk-eaArVdILSB7MMaHgdK2-JIn51nMQ"
],
"desc_info": {
"imgs": [
"https://mmecimage.cn/p/wx37f38d59298839c3/HJE9eJaEc5bJk-eaArVdILSB7MMaHgdK2-JIn51nMQ"
],
"desc": "物美价廉"
},
"cats_v2": [
{
"cat_id": "10000026"
},
{
"cat_id": "10000032"
},
{
"cat_id": "1246"
}
],
"attrs": [
{
"attr_key": "产品净重kg",
"attr_value": "1"
}
],
"skus": [
{
"sale_price": 100,
"stock_num": 0
}
],
"spu_code": "SPU_CODE_XXX",
"brand_id": "2100000000"
}

View File

@@ -0,0 +1,8 @@
{
"errcode": 0,
"errmsg": "ok",
"data": {
"product_id": "1700000000000",
"create_time": "2020-03-25 12:05:25"
}
}

View File

@@ -0,0 +1,4 @@
{
"product_id": "324545",
"data_type": 1
}

View File

@@ -0,0 +1,40 @@
{
"product": {
"product_id": "1700000000000",
"title": "宠物玩具5",
"head_imgs": [
"https://mmecimage.cn/p/wx37f38d59298839c3/HJE9eJaEc5bJk-eaArVdILSB7MMaHgdK2-JIn51nMQ"
],
"desc_info": {
"imgs": [
"https://mmecimage.cn/p/wx37f38d59298839c3/HJE9eJaEc5bJk-eaArVdILSB7MMaHgdK2-JIn51nMQ"
],
"desc": "物美价廉"
},
"cats_v2": [
{
"cat_id": "10000026"
},
{
"cat_id": "10000032"
},
{
"cat_id": "1246"
}
],
"attrs": [
{
"attr_key": "产品净重kg",
"attr_value": "1"
}
],
"skus": [
{
"sku_id": "462966903",
"sale_price": 100
}
],
"spu_code": "SPU_CODE_XXX",
"brand_id": "2100000000"
}
}

View File

@@ -0,0 +1,5 @@
{
"status": 5,
"page_size": 10,
"next_key": "THE_NEXT_KEY"
}

View File

@@ -0,0 +1,18 @@
{
"errcode": 0,
"errmsg": "ok",
"product_ids": [
"1234567001",
"1234567002",
"1234567003",
"1234567004",
"1234567005",
"1234567006",
"1234567007",
"1234567008",
"1234567009",
"1234567010"
],
"next_key": "THE_NEXT_KEY_NEW",
"total_num": 100
}

View File

@@ -0,0 +1,9 @@
{
"product_id": "10000186383709",
"skus": [
{
"sku_id": "2967856845",
"stock_num": 1
}
]
}

View File

@@ -0,0 +1,14 @@
{
"errcode": 0,
"errmsg": "ok",
"data": {
"src_product_id": "10000186383709",
"gift_product_id": "17000001344346",
"sku_mappings": [
{
"src_sku_id": "2967856845",
"gift_sku_id": "3185803880"
}
]
}
}

View File

@@ -0,0 +1,6 @@
{
"product_id": "17000186383709",
"sku_id": "9328425",
"diff_type": 1,
"num": 10
}

View File

@@ -0,0 +1,42 @@
{
"product_id": "1700000000000",
"title": "宠物玩具5",
"head_imgs": [
"https://mmecimage.cn/p/wx37f38d59298839c3/HJE9eJaEc5bJk-eaArVdILSB7MMaHgdK2-JIn51nMQ"
],
"desc_info": {
"imgs": [
"https://mmecimage.cn/p/wx37f38d59298839c3/HJE9eJaEc5bJk-eaArVdILSB7MMaHgdK2-JIn51nMQ"
],
"desc": "物美价廉"
},
"cats_v2": [
{
"cat_id": "10000026"
},
{
"cat_id": "10000032"
},
{
"cat_id": "1246"
}
],
"attrs": [
{
"attr_key": "产品净重kg",
"attr_value": "1"
}
],
"skus": [
{
"sku_id": "462966903",
"sale_price": 100,
"stock_diff": {
"diff_type": 1,
"num": 1
}
}
],
"spu_code": "SPU_CODE_XXX",
"brand_id": "2100000000"
}

View File

@@ -0,0 +1,8 @@
{
"errcode": 0,
"errmsg": "ok",
"data": {
"product_id": "1700000000000",
"update_time": "2020-06-20 10:00:00"
}
}