生产订单列表
获取生产订单列表
瑞盈毛织ERP公开接口限流 15 次 / 日
接口地址
按环境选择对应 Base URL,请求方法见下方标识。
请求基础路径
https://api.maoyimall.com/wewin/POST
Request Method
生产订单列表/open/erp/molist/open/erp/molist调用说明
鉴权方式、调用限制与参数概览。
鉴权方式
请求需携带应用密钥相关 Header(见下方请求头参数),请先在控制台创建应用并获取 AppId / AppSecret。
调用限制
当前接口日限额为 15 次 / 日 。超出限额将返回限流错误,请合理控制调用频率。
参数概览
Header 7 项 · Body 6 项 · 其中必填 6 项
请求头参数
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 = '/wewin/ry/open/erp/molist';
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": 1,
"pn": "pn0001",
"custId": "客户11",
"styleNo": "styleNo001",
"custStyleNo": null,
"po": null,
"gauge": "12G",
"styleDesc": "女装.....",
"orderQty": 450,
"produceRate": 0,
"prodQty": 450,
"dyeQty": 450,
"packQty": 0,
"sizeUnit": null,
"isOk": true,
"isOver": false,
"isDye": false,
"isMultiCust": false,
"isWool": false,
"fullEmbroider": false,
"woolType": null,
"processRequest": null,
"approver": null,
"mkDate": "2026-09-10",
"shipDate": null,
"maker": "maker11",
"xser": "张三",
"designer": null,
"qtyUnit": "件",
"sampleType": null,
"bpid": 1,
"itemCode": null,
"custFollower": null,
"qzOver": false,
"collection": null,
"season": null,
"brand": null,
"hzOver": false,
"plid": null,
"unitPrice": 0,
"team": "",
"taxRate": 0,
"inBaseDate": null,
"factoryContractNo": null,
"shipBy": null,
"salePrice": 0,
"exchangeRate": 0,
"exchangeBill": null,
"lastUpdate": "2026-09-10 00:01:01",
"okTimes": 2,
"firstShipDate": null,
"createTime": "2026-09-10 00:01:01",
"isAudit": false,
"linkOver": false,
"hideLinkWill": false,
"baseSize": null,
"programmer": null,
"sampler": null,
"makerName": "张三",
"auditor": null,
"makeDye": false,
"dyeFty": null,
"qzEndDate": null,
"woolEndDate": null,
"hzEndDate": null,
"isPrint": false,
"okTime": "2026-09-10 01:01:01",
"auditTime": null,
"follower": "",
"isBalance": false,
"isPayment": false,
"payDate": null,
"applyMoneyState": null,
"applyMoneyDate": null,
"realShipDate": null,
"isProdSample": false,
"isProdMetting": false,
"remarks": null,
"useWoolType": 0,
"spu": null,
"isBomOK": false,
"avgSizeWeight": 0,
"isNoKnit": false,
"outPrice": 0,
"qrCode": "qrCode......"
}
],
"total": 1,
"size": 10,
"current": 1,
"orders": [],
"optimizeCountSql": true,
"searchCount": true,
"maxLimit": null,
"countId": null,
"pages": 1
},
"timestamp": 1789031883367
}失败响应
{
"errcode": 42001,
"errmsg": "pageNo missing",
"timestamp": 1789032545775
}