文档
测试

更新库存(Guid)

POST
https://api.sooxie.com/Stock/UpdateStockByGuid

接口描述

根据Guid更新库存

请求头

参数名
类型
描述
必填
Content-Type
string
application/json
必填
appid
string
应用id
必填
sign
string
签名
必填
timestamp
long
时间戳
必填
accesstoken
string
访问令牌
必填

请求参数

application/json
参数名
类型
描述
必填
list
array
数据列表
必填
guid
string
示例:56b0c22190124c55bd851814ef666367
必填
stock
int
示例:100
必填

响应参数

application/json
参数名
类型
描述
必填
success
boolean
示例:true
必填

说明 / 示例

**请求参数** ```json [ { "guid": "56b0c22190124c55bd851814ef666367", "stock": 100 }, { "guid": "56b0c22190124c55bd851814ef666366", "stock": 100 },{ "guid": "56b0c22190124c55bd851814ef666365", "stock": 100 },{ "guid": "56b0c22190124c55bd851814ef666364", "stock": 100 },{ "guid": "56b0c22190124c55bd851814ef666363", "stock": 100 },{ "guid": "56b0c22190124c55bd851814ef666362", "stock": 100 },{ "guid": "56b0c22190124c55bd851814ef666361", "stock": 100 } ] ``` **C#实体** ```cpp public class EntitiesStock { public string Guid{ get; set; } public int Stock { get; set; } } ``` **C#请求实例 NuGet: Flurl, Flurl.Http** ```cpp using Flurl.Http; string url = "https://api.sooxie.com/Stock/UpdateStockByGuid"; var stock = new List<EntitiesStock>() { new EntitiesStock{ Guid="111111",Stock=100 }, new EntitiesStock{ Guid="222222",Stock=100 }, new EntitiesStock{ Guid="333333",Stock=100 }, new EntitiesStock{ Guid="444444",Stock=100 } }; //省略了请求头 可参考库存列表 var result = await url.PostJsonAsync(stock).ReceiveString(); Console.WriteLine(result); ```