正在加载页面,请稍候…

公开文档

应付明细

应付明细

瑞盈毛行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 项

字段名类型是否必填说明示例
pageNonumber必填页码1
pageSizenumber必填页数1
mkDatestring必填开始日期2026-10-01
endDatestring必填结束日期2026-10-30
sumTypestring可选汇总类型:0=应欠款对帐单,1=应欠款汇总—
colorCondstring可选颜色条件:0=分色分缸,1=分单汇总,2=品种汇总—
payTypestring可选付款类型:0=全部,1=未付清,2=已付清,了=本期付,4=存货款—
plidstring可选供应商编号—
字段名类型是否必返说明示例
errcodenumber必返错误码0
errmsgstring必返错误码英文信息ok
dataobject可选成功时返回的具体数据—
totalWeightnumber可选总重量21015
totalAmountnumber可选总金额12
totalPriorPlanOutnumber可选—133102210
totalCurrentRealOutnumber可选—0
totalBalancenumber可选结余金额133102222
pageobject可选当前页记录列表,里面是具体生产/订单记录—
recordsobject[]可选当前页记录列表,里面是具体生产/订单记录—
Tagnumber可选—0
PLIDnumber可选供应商编号12
WPIDstring可选工序ID—
SKIDstring可选单号—
MkDatestring可选开始日期2026-09-30 00:00:00
IOTypestring可选类型期初应付
BalanceWaystring可选付款方式—
WoolTypestring可选品种—
CreateTimestring可选创建时间—
Colorstring可选颜色—
ColorIDstring可选色号—
VatNostring可选缸号—
WoolPNstring可选批号—
Remarksstring可选备注—
Unitstring可选单位—
NetWeightnumber可选配货重0
UnitPricenumber可选单价0
SubTotalnumber可选总数0
PriorPlanInnumber可选期初应收0
CurrentRealInnumber可选本期实收0
IDnumber可选—1
CurrentMoneynumber可选—0
IsPaymentboolean可选是否付款false
Makerstring可选制单人sa
ProviderNamestring可选供应商华锦纺织
IncNamestring可选门店—
Contactstring可选联系人卜志新
Tel1string可选电话13637286061胡娟娟
ShortCodestring可选速记码—
Faxstring可选传真0551-88511520
MaxArrearnumber可选信用额度0
totalnumber可选总记录数370
sizenumber可选每页条数1
currentnumber可选当前页码1
ordersarray可选排序规则列表[]
optimizeCountSqlboolean可选是否优化 count SQLtrue
searchCountboolean可选是否执行 count 查询true
maxLimitstring可选最大查询条数限制—
countIdstring可选count 查询标识—
pagesnumber可选总页数370
timestampnumber必返请求发生时的毫秒级时间戳1791888463480

请求示例

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
}
错误码英文说明中文说明
-1system error系统繁忙,请稍候再试
40001appid invalidAPPID无效或不存在
40002appsecret invalidAppSecret错误,请检查密钥
41001access_token missing请求中未携带access_token
41002access_token expiredacess_token已过期,请重新获取