概述
该接口主要用于第三方平台或自主研发者,通过调用【进货单】的查询接口,将Sunlike ERP或Online ERP系统中的【进货单】信息查询到第三方平台。
参数说明
1.请求方式
请求方式 |
POST |
接口地址 |
http://ERPAPI站点/DRPPC/GETDATA |
格式 |
JSON |
编码类型 |
UTF-8 |
2.header参数
Content-Type |
application/json |
Authorization |
token |
授权接口所获取的值 |
3.请求参数
字段名称 |
字段代号 |
类型 |
长度 |
必填否 |
固定值 |
备注 |
程序代号 |
PGM |
|
|
必填 |
DRPPC |
|
识别代号 |
PS_ID |
string |
2 |
必填 |
PC |
|
单号 |
PS_NO |
string |
20 |
必填 |
|
ERP的单据号码 |
4.转单项次参数
转单项次参数 |
说明 |
TRAN_BIL_ITM |
当使用转单接口时需传转单项次参数值,该参数值可通过当前单据的GETDATA查询接口返回结果查看,为虚拟字段,该参数值是抓取当前单据表身非变动唯一项次TF_PSS.PRE_ITM的字段值。 |
请求JSON示例
{
"PGM":"DRPPC", //单据程序代号
"PS_ID":"PC", //单据识别代号
"PS_NO":"PC20081400000001" //ERP的单据号码
}
返回结果示例
{
"code": 0, //为0表示执行成功,其他表示错误
"message": "查询成功", //提示信息
"data": {
"MF_PSS": [ //查询单据表头信息
{
"MOB_ID": "03",
"PS_ID": "PC",
"PS_NO": "PC20081400000001",
"PS_DD": "2020-08-14 00:00:00",
"PAY_DD": "2020-09-01 00:00:00",
"CHK_DD": "2020-10-01 00:00:00",
"CUS_NO": "C1000",
"CUS_NAME": "外部供应商",
"DEP": "001",
"DEP_NAME": "001部门",
"TAX_ID": "2",
"CAS_NO": "",
"ZHANG_ID": "3",
"CUR_ID": "",
"EXC_RTO": 1.0,
"SAL_NO": "0001",
"SAL_NAME": "0001用户",
"PAY_MTH": "1",
"PAY_DAYS": 1,
"CHK_DAYS": 30,
"INT_DAYS": 30,
"PAY_REM": "结帐期:2020-09-01;票据到期日:2020-10-01",
"USR": "0001",
"PRT_SW": "N",
"CK_CLS_ID": "F",
"LZ_CLS_ID": "F",
"BIL_TYPE": "01",
"AMTN_RCV": 0.0,
"SYS_DATE": "2020-08-18 17:07:59",
"REM": "API产生",
"TOT_QTY": 200.0,
"AMT": 0.0,
"KP_ID": "F",
"TAX_IRP": 0.0,
"CAS_NO1": "",
"AMTN_TAX_IRP": 0.0,
"AMT_TAX_IRP": 0.0
}
],
"TF_PSS": [ //查询单据表身信息
{
"PS_ID": "PC",
"PS_NO": "PC20081400000001",
"ITM": 1,
"PS_DD": "2020-08-14 00:00:00",
"WH": "9902",
"PRD_NO": "0001",
"PRD_NAME": "不粘锅",
"PRD_MARK": "",
"UNIT": "1",
"TAX_RTO": 5.0,
"QTY": 100.0,
"UP": 10.0,
"AMTN_NET": 952.38,
"AMT": 1000.0,
"CST_STD": 0.0,
"PRE_ITM": 1,
"CSTN_SAL": 952.38,
"TAX": 47.62,
"SPC": "4L",
"AMT_ORG": 0.0,
"AMT_ORG1": 0.0,
"CHK_TAX": "F",
"UP_MAIN": 10.0,
"CST_SAL": 1000.0,
"BAR_CODE": "",
"PRD_NO_NO": "0001",
"CST_STD_UNIT": 0.0,
"TRAN_BIL_ITM": 1, //转单项次
"WLGL_UP": "10.00000000"
},
{
"PS_ID": "PC",
"PS_NO": "PC20081400000001",
"ITM": 2,
"PS_DD": "2020-08-14 00:00:00",
"WH": "9902",
"PRD_NO": "0003",
"PRD_NAME": "电饭锅",
"PRD_MARK": "",
"UNIT": "1",
"TAX_RTO": 5.0,
"QTY": 100.0,
"UP": 10.0,
"AMTN_NET": 952.38,
"AMT": 1000.0,
"CST_STD": 0.0,
"PRE_ITM": 2,
"CSTN_SAL": 952.38,
"TAX": 47.62,
"AMT_ORG": 0.0,
"AMT_ORG1": 0.0,
"UP_MAIN": 10.0,
"CST_SAL": 1000.0,
"PRD_NO_NO": "0003",
"CST_STD_UNIT": 0.0,
"TRAN_BIL_ITM": 2, //转单项次
"WLGL_UP": "10.00000000"
}
]
}
}