会员销售上传Member Sales
公共参数名称 | 公共参数值 |
---|---|
method | fzapi.crm.MemberSales |
content | 请求参数集合,详见下面请求参数说明 |
请求参数说明
参数 | 类型 | 是否必填 | 最大长度 | 描述 | 示例值 |
---|---|---|---|---|---|
member_code | String | 否 | 20 | 会员号 | |
telephone | String | 否 | 20 | 手机号 | |
store_code | String | 是 | 20 | 店铺编号 | |
sales_amount | String | 是 | 20 | 交易金额 | |
doc_no | String | 是 | 20 | 单据号 | |
sales_date | String | 是 | 10 | 交易日期 | |
oradoc_no | String | 否 | 20 | 原单号(退货时) | |
remark | String | 否 | 100 | 备注 | |
datasoure | String | 否 | 20 | 来源 | |
lastmodifier | String | 否 | 20 | 修改人 | |
salesmemophoto | String | 否 | 100 | 销售小票 | |
salesmemophotos | Array | 否 | 100 | 销售小票(多张) |
响应数据说明
参数 | 类型 | 是否必填 | 最大长度 | 描述 | 示例值 |
---|---|---|---|---|---|
success | bool | 返回成功 | true | ||
code | String | 返回代码 | 1000 | ||
msg | String | 返回描述 | Success | ||
data | String | 返回信息 | 单号存在返回值:会员号vipcode,店铺号store_code,积分bonus 成功返回值:获得积分bonus_sales,当前积分current_bonus |
请求数据示例:
string strurl = "http://localhost:32052/fzapi.ashx?timestamp=2013-01-01 08:08:08&method=fzapi.crm.MemberSales&app_id=FZ2020170011&charset=utf-8&sign_type=md5&sign=udf4+clgqi8qx9nugdzs0r3wpiq=&version=1.0.0&format=json&content={0}";
string str = "{\"member_code\":\"800000000003\",\"store_code\":\"80004L170001\",\"sales_amount\":\"100\",
\"doc_no\":\"03241555\",\"sales_date\":\"2018-03-24\",\"sales_time\":\"2018-03-24 15:50:00\"}";
strurl = string.Format(strurl, HttpUtility.UrlEncode(str));
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(strurl);
Encoding encoding = Encoding.UTF8;
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "GET";
HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
StreamReader streamReader = new StreamReader(httpWebResponse.GetResponseStream());
string responseContent = streamReader.ReadToEnd();
httpWebResponse.Close();
streamReader.Close();
响应数据示例:
{
"success":true,
"code":"1000",
"msg":"Success",
"data":{
"member_code":"80004020000359",
"store_code":"80004L170027",
"bonus_sales":"1",
"current_bonus":"263"
}
}