应付明细
应付明细
瑞盈毛行ERP公开接口限流 不限
接口地址
按环境选择对应 Base URL,请求方法见下方标识。
请求基础路径
https://api.maoyimall.com/wewin/POST
Request Method
应付明细/open/wool/prmoneydetail/open/wool/prmoneydetail调用说明
鉴权方式、调用限制与参数概览。
鉴权方式
请求需携带应用密钥相关 Header(见下方请求头参数),请先在控制台创建应用并获取 AppId / AppSecret。
调用限制
当前接口日限额为 不限 。超出限额将返回限流错误,请合理控制调用频率。
参数概览
Header 7 项 · Body 8 项 · 其中必填 11 项
请求头参数
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/wool/prmoneydetail';
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": {
"totalWeight": 21015,
"totalAmount": 12,
"totalPriorPlanOut": 133102210,
"totalCurrentRealOut": 0,
"totalBalance": 133102222,
"page": {
"records": [
{
"Tag": 0,
"PLID": 12,
"WPID": null,
"SKID": null,
"MkDate": "2026-09-30 00:00:00",
"IOType": "期初应付",
"BalanceWay": "",
"WoolType": "",
"CreateTime": null,
"Color": "",
"ColorID": "",
"VatNo": "",
"WoolPN": "",
"Remarks": "",
"Unit": "",
"NetWeight": 0,
"UnitPrice": 0,
"SubTotal": 0,
"PriorPlanIn": 0,
"CurrentRealIn": 0,
"ID": 1,
"CurrentMoney": 0,
"IsPayment": false,
"Maker": "sa",
"ProviderName": "华锦纺织",
"IncName": null,
"Contact": "卜志新",
"Tel1": "13637286061胡娟娟",
"ShortCode": null,
"Fax": "0551-88511520",
"MaxArrear": 0
}
],
"total": 370,
"size": 1,
"current": 1,
"orders": [],
"optimizeCountSql": true,
"searchCount": true,
"maxLimit": null,
"countId": null,
"pages": 370
}
},
"timestamp": 1791888463480
}失败响应
{
"code": 500,
"message": "操作失败",
"result": null
}