织机收货列表
获取织机收货列表
瑞盈毛织ERP公开接口限流 不限
接口地址
按环境选择对应 Base URL,请求方法见下方标识。
请求基础路径
https://api.maoyimall.com/wewin/POST
Request Method
织机收货列表/open/erp/knitinlist/open/erp/knitinlist调用说明
鉴权方式、调用限制与参数概览。
鉴权方式
请求需携带应用密钥相关 Header(见下方请求头参数),请先在控制台创建应用并获取 AppId / AppSecret。
调用限制
当前接口日限额为 不限 。超出限额将返回限流错误,请合理控制调用频率。
参数概览
Header 7 项 · Body 10 项 · 其中必填 9 项
请求头参数
7HTTP Header 字段说明,鉴权相关参数通常放在此处。
请求示例
1可直接复制到本地调试的多语言示例。
JavaScript
const crypto = require('crypto');
// 请替换为真实的appid,appsecret,access token
const APP_ID = 'your_app_id';
const APP_SECRET = 'your_app_secret';
const ACCESS_TOKEN = 'your_access_token';
function sign(method, path, query, body) {
const sha256Hex = d => crypto.createHash('sha256').update(d).digest('hex');
const hmac = (k, d) => crypto.createHmac('sha256', k).update(d).digest();
const b64u = b => b.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
const b64uDec = s => Buffer.from(s.replace(/-/g, '+').replace(/_/g, '/'), 'base64');
const timestamp = Math.floor(Date.now() / 1000).toString();
const nonce = crypto.randomBytes(16).toString('hex');
// 派生 signingKey
const signingKey = b64u(hmac(APP_SECRET, 'wewin-openapi-sign-v1
' + ACCESS_TOKEN));
// 构造 query
const canonicalQuery = Object.keys(query || {}).sort()
.map(k => encodeURIComponent(k) + '=' + encodeURIComponent(query[k]))
.join('&');
const canonicalRequest = [
'WEWIN-HMAC-SHA256',
APP_ID,
sha256Hex(ACCESS_TOKEN),
timestamp,
nonce,
method.toUpperCase(),
path,
canonicalQuery,
'application/json',
sha256Hex(body || '')
].join('
');
const signature = b64u(hmac(b64uDec(signingKey), canonicalRequest));
return {
query: canonicalQuery,
headers: {
'Content-Type': 'application/json',
'O-App-Id': APP_ID,
'O-Access-Token': ACCESS_TOKEN,
'O-Timestamp': timestamp,
'O-Nonce': nonce,
'O-Sign-Version': 'v1',
'O-Signature': signature
}
};
}
const method = 'POST';
const path = '/open/erp/knitinlist';
const params = {}; // 查询参数
const body = JSON.stringify({ /* 业务参数 */ }); // 请求体
const { query, headers } = sign(method, path, params, body);
const url = 'https://test.example.com' + path + (query ? '?' + query : '');
fetch(url, {
method: method,
headers: headers,
body: body
})
.then(res => res.json())
.then(data => {
console.log(data);
});
.catch(err => {
console.error('请求失败:', err);
}); 成功响应
{
"errcode": 0,
"errmsg": "ok",
"data": {
"records": [
{
"id": 2115,
"kiid": 1121,
"kcid": 227,
"pn": "123456",
"custId": "阿华",
"styleNo": "asdewq123",
"custStyleNo": null,
"signIndex": null,
"signTime": null,
"wpid": 2004,
"providerName": "7针喻",
"tel1": "19287614013",
"plid": 2,
"maker": "LiuJiaHao",
"isOk": true,
"isAudit": false,
"isOver": false,
"isBalance": false,
"isPayment": false,
"isBarcode": true,
"mkDate": "2026-07-25 00:00:00",
"createTime": "2026-06-23 15:19:33",
"remarks": "",
"isPrint": false,
"isBottom": false,
"priceUnit": null,
"unitPrice": 0,
"subMoney": 0,
"wpName": "织片连吓栏",
"prodQty": 13,
"subWeight": 0.09,
"qtyUnit": null,
"semiIn": false,
"semiOut": false,
"finishedIn": true,
"finishedOut": true,
"linkOut": false
}
],
"total": 1094,
"size": 1,
"current": 1,
"orders": [],
"optimizeCountSql": true,
"searchCount": true,
"maxLimit": null,
"countId": null,
"pages": 1094
},
"timestamp": 1789978055311
}失败响应
{
"code": 500,
"message": "操作失败",
"result": null
}